Check that the new fields set with -u, -s, -l, -g, -f, -e, -d, and -c

differ from the old ones. If a requested new value is equal to the old
one, no changes will be performed for that field. If no fields are
changed, usermod will exist successfully with a warning. This avoids
logging changes to syslog when there are actually no changes.
This commit is contained in:
nekral-guest
2008-01-23 21:50:27 +00:00
parent 0d1be15e0f
commit 934ac07b06
3 changed files with 47 additions and 9 deletions

View File

@@ -1,3 +1,12 @@
2008-01-23 Nicolas François <nicolas.francois@centraliens.net>
* NEWS, src/usermod.c: Check that the new fields set with -u, -s,
-l, -g, -f, -e, -d, and -c differ from the old ones. If a
requested new value is equal to the old one, no changes will
be performed for that field. If no fields are changed, usermod
will exist successfully with a warning. This avoids logging
changes to syslog when there are actually no changes.
2008-01-23 Nicolas François <nicolas.francois@centraliens.net>
* src/usermod.c: Always define user_newcomment, user_newshell,