[SSSD] [PATCH] Make sss_userdel check for logged in users

Stephen Gallagher sgallagh at redhat.com
Thu Apr 1 11:41:50 UTC 2010


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

On 04/01/2010 03:35 AM, Jakub Hrozek wrote:
> On 03/31/2010 09:48 PM, Stephen Gallagher wrote:
>> Nack.
> 
>> The switch statement after is_logged_in() should check for ENOSYS and
>> print a warning that the status of the user cannot be determined on this
>> platform.
> 
> 
> OK

Thanks

> 
>> Why are you passing KILL_CMD as an argument to KILL_CMD? I think this is
>> probably a typo.
> 
> 
> That's argv[0]

Right, I forgot exec() requires that.

> 
>> Failing to kick the user should be a survivable error. You should
>> probably warn loudly and proceed with the user deletion anyway.
>> Otherwise, you may end up in an inconsistent state (the account lock may
>> have worked, but the killall command failed, for example).


> 
> Currently we fail and return != EOK only if the usermod transaction
> fails (in which case userdel would fail anyway) or the fork() call fails
> (I wasn't sure if we should proceed in this case but I think we are in
> enough trouble if we cannot fork). The return code of exec or killall is
> not taken into account.

Ok, but I still think that if the killall returns a nonzero error code,
we should still emit a warning that there may still be live processes
owned by this user.


- -- 
Stephen Gallagher
RHCE 804006346421761

Delivering value year after year.
Red Hat ranks #1 in value among software vendors.
http://www.redhat.com/promo/vendor/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAku0hn4ACgkQeiVVYja6o6N7HQCgqL37+hkgyqVGxhqoTZWRyRUi
fpkAnR27oMDjs2sKVvh7r5JDvNjdxZwn
=ZR/c
-----END PGP SIGNATURE-----



More information about the sssd-devel mailing list