* NEWS, src/usermod.c: Check if the user is busy when the user's

UID, name or home directory is changed.
This commit is contained in:
nekral-guest
2009-05-18 18:37:16 +00:00
parent 4a4549c49b
commit b9ecd1cf42
3 changed files with 20 additions and 0 deletions

View File

@ -1715,6 +1715,18 @@ int main (int argc, char **argv)
process_flags (argc, argv);
/*
* The home directory, the username and the user's UID should not
* be changed while the user is logged in.
*/
if ( (uflg || lflg || dflg)
&& (user_busy (user_name, user_id) != 0)) {
fprintf (stderr,
_("%s: user %s is currently logged in\n"),
Prog, user_name);
exit (E_USER_BUSY);
}
#ifdef ACCT_TOOLS_SETUID
#ifdef USE_PAM
{