-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/31/2010 07:12 AM, Jakub Hrozek wrote:
On 03/24/2010 10:09 PM, Stephen Gallagher wrote:
> In other words:
> On platforms that support get_uid_table():
> If the user is not logged in:
> 1) Delete the user.
> If the user is logged in:
> 1) Delete the user.
> 2) Print a message stating that the user (with uid N) was logged in
> when you deleted it.
> 3) (Optional) Add a --kick flag to sss_userdel that disables the
> user's password, then invokes 'killall -u <username>' and
then
> delete the user (to avoid race conditions where a user might
> log back in immediately after being kicked)
> On platforms that do not support get_uid_table():
> 1) Delete the user.
> 2) (Optional) Add a --kick flag to sss_userdel that disables the
> user's password, then invokes 'killall -u <username>' and
then
> delete the user (to avoid race conditions where a user might
> log back in immediately after being kicked)
A patch that implements the above is attached.
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.
Why are you passing KILL_CMD as an argument to KILL_CMD? I think this is
probably a typo.
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).
- --
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/
iEYEARECAAYFAkuzpvMACgkQeiVVYja6o6OXlACfVrn6zFESKO7tD6RB+yhPGAeN
ki0AnjdTsrHRmBkuUG8NWPFbbs70BS1A
=V4+T
-----END PGP SIGNATURE-----