|
From: Herwin W. <he...@sn...> - 2008-07-06 10:33:22
|
On Fri, Jun 27, 2008 at 02:03:41PM +0200, Collen Blijenberg wrote: > [...] > still need to figure out: > > - enumeration on users (seems that it's no longer there with samba 3.2) I fixed that one in pdb_pgsql.c yesterday: samba 3.2 uses a kind of iteration-mechanism to retreive the userlist, see the pgsqlsam_search_user function to see how it works. While working on it I noticed a number of things that were a little bit unlogical: - The mysql table defaults to `user', the postgres table to `users'. Probably because `user' is a keyword in postgres. This kind of inconsistency makes it hell to migrate to another database. I'd propose to use the names that work on both databases as a default, so the usertable should be called `users', the new grouptable should be called `groups' and the column with the name of the group should be called `groupname'. (Groups are added in Samba 3.2.0) - In the pdb_pgsql.c file I've counted three occurences of the `execute query, check results, print warnings if erorr'-session (line 358-369, 470-479, 524-533) and without looking at the source I guess the mysql version is not much different. A simple function that accepts a string, tries to run the query, DEBUG and return NULL if error, return result pointer would be nicer, it saves some code-copy-paste. - The names True/true and False/false are both valid and both in use and sometimes mixed, but this problem also exists in the original source (take a look at pdb_smbpasswd). As long as there's no ``official'' Samba standard for this I'd propose to use the uppercased names (True and False). Any comments on these proposals? Regards, Herwin |