* 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 committed 2009-05-18 18:37:16 +00:00
1 parent 4a4549c49b
commit b9ecd1cf42
3 files changed
+20

No files matched your search

+12
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
{