[SSSD] [PATCH] Fix error messages in tools

Stephen Gallagher sgallagh at redhat.com
Mon Oct 5 17:43:16 UTC 2009


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

On 10/05/2009 12:13 PM, Jakub Hrozek wrote:
> On 10/05/2009 05:49 PM, Jakub Hrozek wrote:
>> Add getpwnam, getgrnam sync versions
> 
>> Fix ticket #164: Groupnames in non-local domains
>> Fix ticket #100: Error Message Modifying a user that doesn't Exist
>> Fix ticket #214: incorrect error message when MPG already exists
>> Fix ticket #188: Deleting and modifying users in non-local domain
> 
> 
> Sorry, I forgot to squash in a patch for #120: Adding a user to a "full"
> domain gives unhelpful error message.
> 
> New patch attached

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.

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.

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");

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.

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

_______________________________________________
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/

iEYEARECAAYFAkrKMC4ACgkQeiVVYja6o6O75gCglnX2q8KwT3bIwIJIjSZi8e/e
EPIAoJinhHsRlM2n5fa61p/S8/ajb/Fm
=lBtt
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list