* Reset oflg with uflg if the new UID is equal to
the old one. * Reset mflg with dflg if the new home directory is the same as the old one.
This commit is contained in:
parent
a5f949165a
commit
1599d3d128
@ -1,3 +1,10 @@
|
||||
2008-02-10 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* src/usermod.c: Reset oflg with uflg if the new UID is equal to
|
||||
the old one.
|
||||
* src/usermod.c: Reset mflg with dflg if the new home directory is
|
||||
the same as the old one.
|
||||
|
||||
2008-02-10 Nicolas François <nicolas.francois@centraliens.net>
|
||||
|
||||
* NEWS, src/usermod.c: Fix the handling of -a when a user is being
|
||||
|
@ -967,6 +967,7 @@ static void process_flags (int argc, char **argv)
|
||||
|
||||
if (user_newid == user_id) {
|
||||
uflg = 0;
|
||||
oflg = 0;
|
||||
}
|
||||
if (user_newgid == user_gid) {
|
||||
gflg = 0;
|
||||
@ -985,6 +986,7 @@ static void process_flags (int argc, char **argv)
|
||||
}
|
||||
if (strcmp (user_newhome, user_home) == 0) {
|
||||
dflg = 0;
|
||||
mflg = 0;
|
||||
}
|
||||
if (strcmp (user_newcomment, user_comment) == 0) {
|
||||
cflg = 0;
|
||||
@ -1039,12 +1041,6 @@ static void process_flags (int argc, char **argv)
|
||||
exit (E_USAGE);
|
||||
}
|
||||
|
||||
if (dflg && strcmp (user_home, user_newhome) == 0)
|
||||
dflg = mflg = 0;
|
||||
|
||||
if (uflg && user_id == user_newid)
|
||||
uflg = oflg = 0;
|
||||
|
||||
/* local, no need for xgetpwnam */
|
||||
if (lflg && getpwnam (user_newname)) {
|
||||
fprintf (stderr, _("%s: user %s exists\n"), Prog, user_newname);
|
||||
|
Loading…
Reference in New Issue
Block a user