[SSSD] [PATCH] Fix error messages in tools

Stephen Gallagher sgallagh at redhat.com
Tue Oct 6 11:40:09 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10/06/2009 06:32 AM, Jakub Hrozek wrote:
> On 10/05/2009 07:43 PM, Stephen Gallagher wrote:
>> Replied to the wrong patch earlier...
> 
>> Nack.
>> sss_getpwnam_done() and friends should return EIO if the sysdb replies
>> with more than one result, I think. EINVAL implies that the fault was
>> with the caller, whereas EIO shows us that something went wrong internally.
> 
> 
> Fixed in getpwnam(), in getgrnam() there is no such check as it also
> returns the members of the group.
> 
>> I don't like the gratuitous use of discard_const_p in
>> sss_getpwnam_done(). These sync ops are theoretically useful in other
>> places in our code. I don't want people assuming that they can modify
>> the contents of the res->data->name field (for example). They should be
>> talloc_strdup()-ed into the res structure.
> 
> 
> True, talloc_strdup() is used now.
> 
>> sss_useradd.c:
>> ERROR("A user or group with the same name or UID already exists\n");
>> should be
>> ERROR("A user or group with the same name or ID already exists\n");
> 
> 
> Fixed.
> 
>> tools_util.c:
>> If enumerate=true, shouldn't we just make a call to something like a
>> sysdb_getgrent_sync and compare the resulting complete list with the
>> received groups instead of making N complete sync calls, where N could
>> be equal to (or greater than) the total list of groups in the DB?
> 
>> For that matter, since this is the local domain, it might be worth
>> enumerating them anyway, even if enumerations would normally not happen,
>> since local performance won't be a problem.
> 
> This is not addressed. I discussed this (very briefly) with Simo, we
> agreed that we should stick to sysdb_getgrnam() for now, because as long
> as our searches match indexes (they do, we search based on name) the
> search for a single group is pretty fast.
> 
> 	Jakub

It all looks good to me.

Ack.

- ------------------------------------------------------------------------

_______________________________________________
sssd-devel mailing list
sssd-devel at lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel


- -- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkrLLJUACgkQeiVVYja6o6NIAgCfY2NEfuGEHnN9Y/4Cyrl+5KBn
wpoAoIBg8u3xmUt9IKsOTOdBJxqBmpl5
=dlHy
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list