* src/chfn.c, src/chsh.c, src/groupdel.c, src/groupmems.c,
src/groupmod.c, src/grpck.c, src/login.c, src/logoutd.c, src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c, src/suauth.c, src/useradd.c, src/userdel.c, src/usermod.c, src/vipw.c: Complete the switch from the `' quotation style to ''. Do it also in SYSLOG messages. Quote some parameters. All this permits to merge some messages.
This commit is contained in:
parent
2ebd2a08ff
commit
538600ef48
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
2008-08-01 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* src/chfn.c, src/chsh.c, src/groupdel.c, src/groupmems.c,
|
||||||
|
src/groupmod.c, src/grpck.c, src/login.c, src/logoutd.c,
|
||||||
|
src/newgrp.c, src/newusers.c, src/passwd.c, src/pwck.c,
|
||||||
|
src/suauth.c, src/useradd.c, src/userdel.c, src/usermod.c,
|
||||||
|
src/vipw.c: Complete the switch from the `' quotation style to ''.
|
||||||
|
Do it also in SYSLOG messages. Quote some parameters. All this
|
||||||
|
permits to merge some messages.
|
||||||
|
|
||||||
2008-07-30 Lukáš Kuklínek <lkukline@redhat.com>
|
2008-07-30 Lukáš Kuklínek <lkukline@redhat.com>
|
||||||
|
|
||||||
* src/groupmems.c: Only check if the adduser user exists when an
|
* src/groupmems.c: Only check if the adduser user exists when an
|
||||||
|
@ -711,7 +711,7 @@ int main (int argc, char **argv)
|
|||||||
/* Rewrite the user's gecos in the passwd file */
|
/* Rewrite the user's gecos in the passwd file */
|
||||||
update_gecos (user, new_gecos);
|
update_gecos (user, new_gecos);
|
||||||
|
|
||||||
SYSLOG ((LOG_INFO, "changed user `%s' information", user));
|
SYSLOG ((LOG_INFO, "changed user '%s' information", user));
|
||||||
|
|
||||||
nscd_flush_cache ("passwd");
|
nscd_flush_cache ("passwd");
|
||||||
|
|
||||||
|
14
src/chsh.c
14
src/chsh.c
@ -240,10 +240,10 @@ static void check_perms (const struct passwd *pw)
|
|||||||
* UID of the user matches the current real UID.
|
* UID of the user matches the current real UID.
|
||||||
*/
|
*/
|
||||||
if (!amroot && pw->pw_uid != getuid ()) {
|
if (!amroot && pw->pw_uid != getuid ()) {
|
||||||
SYSLOG ((LOG_WARN, "can't change shell for `%s'", pw->pw_name));
|
SYSLOG ((LOG_WARN, "can't change shell for '%s'", pw->pw_name));
|
||||||
closelog ();
|
closelog ();
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("You may not change the shell for %s.\n"),
|
_("You may not change the shell for '%s'.\n"),
|
||||||
pw->pw_name);
|
pw->pw_name);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
@ -253,10 +253,10 @@ static void check_perms (const struct passwd *pw)
|
|||||||
* is not a restricted one.
|
* is not a restricted one.
|
||||||
*/
|
*/
|
||||||
if (!amroot && is_restricted_shell (pw->pw_shell)) {
|
if (!amroot && is_restricted_shell (pw->pw_shell)) {
|
||||||
SYSLOG ((LOG_WARN, "can't change shell for `%s'", pw->pw_name));
|
SYSLOG ((LOG_WARN, "can't change shell for '%s'", pw->pw_name));
|
||||||
closelog ();
|
closelog ();
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("You may not change the shell for %s.\n"),
|
_("You may not change the shell for '%s'.\n"),
|
||||||
pw->pw_name);
|
pw->pw_name);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
@ -268,10 +268,10 @@ static void check_perms (const struct passwd *pw)
|
|||||||
if ((pw->pw_uid != getuid ())
|
if ((pw->pw_uid != getuid ())
|
||||||
&& (is_selinux_enabled () > 0)
|
&& (is_selinux_enabled () > 0)
|
||||||
&& (selinux_check_passwd_access (PASSWD__CHSH) != 0)) {
|
&& (selinux_check_passwd_access (PASSWD__CHSH) != 0)) {
|
||||||
SYSLOG ((LOG_WARN, "can't change shell for `%s'", pw->pw_name));
|
SYSLOG ((LOG_WARN, "can't change shell for '%s'", pw->pw_name));
|
||||||
closelog ();
|
closelog ();
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("You may not change the shell for %s.\n"),
|
_("You may not change the shell for '%s'.\n"),
|
||||||
pw->pw_name);
|
pw->pw_name);
|
||||||
exit (1);
|
exit (1);
|
||||||
}
|
}
|
||||||
@ -537,7 +537,7 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
update_shell (user, loginsh);
|
update_shell (user, loginsh);
|
||||||
|
|
||||||
SYSLOG ((LOG_INFO, "changed user `%s' shell to `%s'", user, loginsh));
|
SYSLOG ((LOG_INFO, "changed user '%s' shell to '%s'", user, loginsh));
|
||||||
|
|
||||||
nscd_flush_cache ("passwd");
|
nscd_flush_cache ("passwd");
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ static void close_files (void)
|
|||||||
"deleting group",
|
"deleting group",
|
||||||
group_name, (unsigned int) group_id, 1);
|
group_name, (unsigned int) group_id, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "remove group `%s'\n", group_name));
|
SYSLOG ((LOG_INFO, "remove group '%s'\n", group_name));
|
||||||
|
|
||||||
if (gr_close () == 0) {
|
if (gr_close () == 0) {
|
||||||
fprintf (stderr, _("%s: cannot rewrite group file\n"), Prog);
|
fprintf (stderr, _("%s: cannot rewrite group file\n"), Prog);
|
||||||
@ -315,7 +315,7 @@ int main (int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
grp = getgrnam (group_name); /* local, no need for xgetgrnam */
|
grp = getgrnam (group_name); /* local, no need for xgetgrnam */
|
||||||
if (NULL == grp) {
|
if (NULL == grp) {
|
||||||
fprintf (stderr, _("%s: group %s does not exist\n"),
|
fprintf (stderr, _("%s: group '%s' does not exist\n"),
|
||||||
Prog, group_name);
|
Prog, group_name);
|
||||||
#ifdef WITH_AUDIT
|
#ifdef WITH_AUDIT
|
||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||||
|
@ -165,7 +165,7 @@ static void process_flags (int argc, char **argv)
|
|||||||
/* local, no need for xgetpwnam */
|
/* local, no need for xgetpwnam */
|
||||||
if ( (NULL != adduser)
|
if ( (NULL != adduser)
|
||||||
&& (getpwnam (adduser) == NULL)) {
|
&& (getpwnam (adduser) == NULL)) {
|
||||||
fprintf (stderr, _("%s: user `%s' does not exist\n"),
|
fprintf (stderr, _("%s: user '%s' does not exist\n"),
|
||||||
Prog, adduser);
|
Prog, adduser);
|
||||||
fail_exit (EXIT_INVALID_USER);
|
fail_exit (EXIT_INVALID_USER);
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ void main (int argc, char **argv)
|
|||||||
grp = (struct group *) gr_locate (name);
|
grp = (struct group *) gr_locate (name);
|
||||||
|
|
||||||
if (NULL == grp) {
|
if (NULL == grp) {
|
||||||
fprintf (stderr, _("%s: `%s' not found in /etc/group\n"),
|
fprintf (stderr, _("%s: '%s' not found in /etc/group\n"),
|
||||||
Prog, name);
|
Prog, name);
|
||||||
fail_exit (EXIT_INVALID_GROUP);
|
fail_exit (EXIT_INVALID_GROUP);
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ void main (int argc, char **argv)
|
|||||||
} else if (NULL != adduser) {
|
} else if (NULL != adduser) {
|
||||||
if (is_on_list (grp->gr_mem, adduser)) {
|
if (is_on_list (grp->gr_mem, adduser)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user `%s' is already a member of `%s'\n"),
|
_("%s: user '%s' is already a member of '%s'\n"),
|
||||||
Prog, adduser, grp->gr_name);
|
Prog, adduser, grp->gr_name);
|
||||||
fail_exit (EXIT_MEMBER_EXISTS);
|
fail_exit (EXIT_MEMBER_EXISTS);
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ void main (int argc, char **argv)
|
|||||||
} else if (NULL != deluser) {
|
} else if (NULL != deluser) {
|
||||||
if (!is_on_list (grp->gr_mem, adduser)) {
|
if (!is_on_list (grp->gr_mem, adduser)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user `%s' is not a member of `%s'\n"),
|
_("%s: user '%s' is not a member of '%s'\n"),
|
||||||
Prog, deluser, grp->gr_name);
|
Prog, deluser, grp->gr_name);
|
||||||
fail_exit (EXIT_NOT_MEMBER);
|
fail_exit (EXIT_NOT_MEMBER);
|
||||||
}
|
}
|
||||||
|
@ -282,12 +282,12 @@ static void grp_update (void)
|
|||||||
group_name, (unsigned int) group_id, 1);
|
group_name, (unsigned int) group_id, 1);
|
||||||
#endif
|
#endif
|
||||||
if (nflg) {
|
if (nflg) {
|
||||||
SYSLOG ((LOG_INFO, "change group `%s' to `%s'",
|
SYSLOG ((LOG_INFO, "change group '%s' to '%s'",
|
||||||
group_name, group_newname));
|
group_name, group_newname));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gflg) {
|
if (gflg) {
|
||||||
SYSLOG ((LOG_INFO, "change GID for `%s' to %lu",
|
SYSLOG ((LOG_INFO, "change GID for '%s' to %lu",
|
||||||
nflg ? group_newname : group_name,
|
nflg ? group_newname : group_name,
|
||||||
(unsigned long) group_newid));
|
(unsigned long) group_newid));
|
||||||
}
|
}
|
||||||
@ -660,7 +660,7 @@ int main (int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
grp = getgrnam (group_name); /* local, no need for xgetgrnam */
|
grp = getgrnam (group_name); /* local, no need for xgetgrnam */
|
||||||
if (NULL == grp) {
|
if (NULL == grp) {
|
||||||
fprintf (stderr, _("%s: group %s does not exist\n"),
|
fprintf (stderr, _("%s: group '%s' does not exist\n"),
|
||||||
Prog, group_name);
|
Prog, group_name);
|
||||||
#ifdef WITH_AUDIT
|
#ifdef WITH_AUDIT
|
||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||||
|
12
src/grpck.c
12
src/grpck.c
@ -440,7 +440,7 @@ static void check_grp_file (int *errors, bool *changed)
|
|||||||
* to try out the next list element.
|
* to try out the next list element.
|
||||||
*/
|
*/
|
||||||
delete_gr:
|
delete_gr:
|
||||||
SYSLOG ((LOG_INFO, "delete group line `%s'",
|
SYSLOG ((LOG_INFO, "delete group line '%s'",
|
||||||
gre->line));
|
gre->line));
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
||||||
@ -516,7 +516,7 @@ static void check_grp_file (int *errors, bool *changed)
|
|||||||
if (check_members (grp->gr_name, grp->gr_mem,
|
if (check_members (grp->gr_name, grp->gr_mem,
|
||||||
_("group %s: no user %s\n"),
|
_("group %s: no user %s\n"),
|
||||||
_("delete member '%s'? "),
|
_("delete member '%s'? "),
|
||||||
"delete member `%s' from group `%s'",
|
"delete member '%s' from group '%s'",
|
||||||
errors) == 1) {
|
errors) == 1) {
|
||||||
*changed = true;
|
*changed = true;
|
||||||
gre->changed = true;
|
gre->changed = true;
|
||||||
@ -547,7 +547,7 @@ static void check_grp_file (int *errors, bool *changed)
|
|||||||
sg.sg_adm = ∅
|
sg.sg_adm = ∅
|
||||||
sg.sg_mem = grp->gr_mem;
|
sg.sg_mem = grp->gr_mem;
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"add group `%s' to `%s'",
|
"add group '%s' to '%s'",
|
||||||
grp->gr_name, sgr_file));
|
grp->gr_name, sgr_file));
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ static void check_sgr_file (int *errors, bool *changed)
|
|||||||
* of the loop to try out the next list element.
|
* of the loop to try out the next list element.
|
||||||
*/
|
*/
|
||||||
delete_sg:
|
delete_sg:
|
||||||
SYSLOG ((LOG_INFO, "delete shadow line `%s'",
|
SYSLOG ((LOG_INFO, "delete shadow line '%s'",
|
||||||
sge->line));
|
sge->line));
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
||||||
@ -710,7 +710,7 @@ static void check_sgr_file (int *errors, bool *changed)
|
|||||||
if (check_members (sgr->sg_name, sgr->sg_adm,
|
if (check_members (sgr->sg_name, sgr->sg_adm,
|
||||||
_("shadow group %s: no administrative user %s\n"),
|
_("shadow group %s: no administrative user %s\n"),
|
||||||
_("delete administrative member '%s'? "),
|
_("delete administrative member '%s'? "),
|
||||||
"delete admin `%s' from shadow group `%s'",
|
"delete admin '%s' from shadow group '%s'",
|
||||||
errors) == 1) {
|
errors) == 1) {
|
||||||
*changed = true;
|
*changed = true;
|
||||||
sge->changed = true;
|
sge->changed = true;
|
||||||
@ -723,7 +723,7 @@ static void check_sgr_file (int *errors, bool *changed)
|
|||||||
if (check_members (sgr->sg_name, sgr->sg_mem,
|
if (check_members (sgr->sg_name, sgr->sg_mem,
|
||||||
_("shadow group %s: no user %s\n"),
|
_("shadow group %s: no user %s\n"),
|
||||||
_("delete member '%s'? "),
|
_("delete member '%s'? "),
|
||||||
"delete member `%s' from shadow group `%s'",
|
"delete member '%s' from shadow group '%s'",
|
||||||
errors) == 1) {
|
errors) == 1) {
|
||||||
*changed = true;
|
*changed = true;
|
||||||
sge->changed = true;
|
sge->changed = true;
|
||||||
|
20
src/login.c
20
src/login.c
@ -722,7 +722,7 @@ int main (int argc, char **argv)
|
|||||||
|
|
||||||
if (retcode == PAM_MAXTRIES || failcount >= retries) {
|
if (retcode == PAM_MAXTRIES || failcount >= retries) {
|
||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"TOO MANY LOGIN TRIES (%d)%s FOR `%s'",
|
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
||||||
failcount, fromhost, failent_user));
|
failcount, fromhost, failent_user));
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
_("Maximum number of tries exceeded (%d)\n"),
|
_("Maximum number of tries exceeded (%d)\n"),
|
||||||
@ -736,7 +736,7 @@ int main (int argc, char **argv)
|
|||||||
PAM_END;
|
PAM_END;
|
||||||
exit(99);
|
exit(99);
|
||||||
} else if (retcode != PAM_SUCCESS) {
|
} else if (retcode != PAM_SUCCESS) {
|
||||||
SYSLOG ((LOG_NOTICE,"FAILED LOGIN (%d)%s FOR `%s', %s",
|
SYSLOG ((LOG_NOTICE,"FAILED LOGIN (%d)%s FOR '%s', %s",
|
||||||
failcount, fromhost, failent_user,
|
failcount, fromhost, failent_user,
|
||||||
pam_strerror (pamh, retcode)));
|
pam_strerror (pamh, retcode)));
|
||||||
failed = true;
|
failed = true;
|
||||||
@ -855,7 +855,7 @@ int main (int argc, char **argv)
|
|||||||
pwent.pw_passwd = spwd->sp_pwdp;
|
pwent.pw_passwd = spwd->sp_pwdp;
|
||||||
} else {
|
} else {
|
||||||
SYSLOG ((LOG_WARN,
|
SYSLOG ((LOG_WARN,
|
||||||
"no shadow password for `%s'%s",
|
"no shadow password for '%s'%s",
|
||||||
username, fromhost));
|
username, fromhost));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -888,7 +888,7 @@ int main (int argc, char **argv)
|
|||||||
* username at least once. Should probably use LOG_AUTHPRIV
|
* username at least once. Should probably use LOG_AUTHPRIV
|
||||||
* for those who really want to log them. --marekm
|
* for those who really want to log them. --marekm
|
||||||
*/
|
*/
|
||||||
SYSLOG ((LOG_WARN, "invalid password for `%s' %s",
|
SYSLOG ((LOG_WARN, "invalid password for '%s' %s",
|
||||||
( (NULL != pwd)
|
( (NULL != pwd)
|
||||||
|| getdef_bool ("LOG_UNKFAIL_ENAB")) ?
|
|| getdef_bool ("LOG_UNKFAIL_ENAB")) ?
|
||||||
username : "UNKNOWN", fromhost));
|
username : "UNKNOWN", fromhost));
|
||||||
@ -909,7 +909,7 @@ int main (int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if ( !failed
|
if ( !failed
|
||||||
&& !login_access (username, *hostname ? hostname : tty)) {
|
&& !login_access (username, *hostname ? hostname : tty)) {
|
||||||
SYSLOG ((LOG_WARN, "LOGIN `%s' REFUSED %s",
|
SYSLOG ((LOG_WARN, "LOGIN '%s' REFUSED %s",
|
||||||
username, fromhost));
|
username, fromhost));
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
@ -917,7 +917,7 @@ int main (int argc, char **argv)
|
|||||||
&& getdef_bool ("FAILLOG_ENAB")
|
&& getdef_bool ("FAILLOG_ENAB")
|
||||||
&& !failcheck (pwent.pw_uid, &faillog, failed)) {
|
&& !failcheck (pwent.pw_uid, &faillog, failed)) {
|
||||||
SYSLOG ((LOG_CRIT,
|
SYSLOG ((LOG_CRIT,
|
||||||
"exceeded failure limit for `%s' %s",
|
"exceeded failure limit for '%s' %s",
|
||||||
username, fromhost));
|
username, fromhost));
|
||||||
failed = true;
|
failed = true;
|
||||||
}
|
}
|
||||||
@ -1007,7 +1007,7 @@ int main (int argc, char **argv)
|
|||||||
*/
|
*/
|
||||||
if ( getdef_bool ("PORTTIME_CHECKS_ENAB")
|
if ( getdef_bool ("PORTTIME_CHECKS_ENAB")
|
||||||
&& !isttytime (pwent.pw_name, tty, time ((time_t *) 0))) {
|
&& !isttytime (pwent.pw_name, tty, time ((time_t *) 0))) {
|
||||||
SYSLOG ((LOG_WARN, "invalid login time for `%s'%s",
|
SYSLOG ((LOG_WARN, "invalid login time for '%s'%s",
|
||||||
username, fromhost));
|
username, fromhost));
|
||||||
closelog ();
|
closelog ();
|
||||||
bad_time_notify ();
|
bad_time_notify ();
|
||||||
@ -1159,7 +1159,7 @@ int main (int argc, char **argv)
|
|||||||
puts (_
|
puts (_
|
||||||
("Warning: login re-enabled after temporary lockout."));
|
("Warning: login re-enabled after temporary lockout."));
|
||||||
SYSLOG ((LOG_WARN,
|
SYSLOG ((LOG_WARN,
|
||||||
"login `%s' re-enabled after temporary lockout (%d failures)",
|
"login '%s' re-enabled after temporary lockout (%d failures)",
|
||||||
username, (int) faillog.fail_cnt));
|
username, (int) faillog.fail_cnt));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1215,9 +1215,9 @@ int main (int argc, char **argv)
|
|||||||
SYSLOG ((LOG_NOTICE, "ROOT LOGIN %s", fromhost));
|
SYSLOG ((LOG_NOTICE, "ROOT LOGIN %s", fromhost));
|
||||||
} else if (getdef_bool ("LOG_OK_LOGINS")) {
|
} else if (getdef_bool ("LOG_OK_LOGINS")) {
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
SYSLOG ((LOG_INFO, "`%s' logged in %s", pam_user, fromhost));
|
SYSLOG ((LOG_INFO, "'%s' logged in %s", pam_user, fromhost));
|
||||||
#else
|
#else
|
||||||
SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
|
SYSLOG ((LOG_INFO, "'%s' logged in %s", username, fromhost));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
closelog ();
|
closelog ();
|
||||||
|
@ -263,7 +263,7 @@ int main (int argc, char **argv)
|
|||||||
user[sizeof (user) - 1] = '\0';
|
user[sizeof (user) - 1] = '\0';
|
||||||
|
|
||||||
SYSLOG ((LOG_NOTICE,
|
SYSLOG ((LOG_NOTICE,
|
||||||
"logged off user `%s' on `%s'", user,
|
"logged off user '%s' on '%s'", user,
|
||||||
tty_name));
|
tty_name));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
10
src/newgrp.c
10
src/newgrp.c
@ -191,7 +191,7 @@ static void check_perms (const struct group *grp,
|
|||||||
(unsigned int) getuid (), 0);
|
(unsigned int) getuid (), 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"Invalid password for group `%s' from `%s'",
|
"Invalid password for group '%s' from '%s'",
|
||||||
groupname, pwd->pw_name));
|
groupname, pwd->pw_name));
|
||||||
sleep (1);
|
sleep (1);
|
||||||
fputs (_("Invalid password.\n"), stderr);
|
fputs (_("Invalid password.\n"), stderr);
|
||||||
@ -258,7 +258,7 @@ static void syslog_sg (const char *name, const char *group)
|
|||||||
tty += 5;
|
tty += 5;
|
||||||
}
|
}
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"user `%s' (login `%s' on %s) switched to group `%s'",
|
"user '%s' (login '%s' on %s) switched to group '%s'",
|
||||||
name, loginname, tty, group));
|
name, loginname, tty, group));
|
||||||
#ifdef USE_PAM
|
#ifdef USE_PAM
|
||||||
/*
|
/*
|
||||||
@ -327,11 +327,11 @@ static void syslog_sg (const char *name, const char *group)
|
|||||||
/* local, no need for xgetgrgid */
|
/* local, no need for xgetgrgid */
|
||||||
if (NULL != grp) {
|
if (NULL != grp) {
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"user `%s' (login `%s' on %s) returned to group `%s'",
|
"user '%s' (login '%s' on %s) returned to group '%s'",
|
||||||
name, loginname, tty, grp->gr_name));
|
name, loginname, tty, grp->gr_name));
|
||||||
} else {
|
} else {
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"user `%s' (login `%s' on %s) returned to group `%lu'",
|
"user '%s' (login '%s' on %s) returned to group '%lu'",
|
||||||
name, loginname, tty,
|
name, loginname, tty,
|
||||||
(unsigned long) gid));
|
(unsigned long) gid));
|
||||||
/* Either the user's passwd entry has a
|
/* Either the user's passwd entry has a
|
||||||
@ -339,7 +339,7 @@ static void syslog_sg (const char *name, const char *group)
|
|||||||
* or the group was deleted while the user
|
* or the group was deleted while the user
|
||||||
* was in a newgrp session.*/
|
* was in a newgrp session.*/
|
||||||
SYSLOG ((LOG_WARN,
|
SYSLOG ((LOG_WARN,
|
||||||
"unknown GID `%lu' used by user `%s'",
|
"unknown GID '%lu' used by user '%s'",
|
||||||
(unsigned long) gid, name));
|
(unsigned long) gid, name));
|
||||||
}
|
}
|
||||||
closelog ();
|
closelog ();
|
||||||
|
@ -182,7 +182,7 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid)
|
|||||||
unsigned long int i = strtoul (gid, &endptr, 10);
|
unsigned long int i = strtoul (gid, &endptr, 10);
|
||||||
if ((*endptr != '\0') || (ERANGE == errno)) {
|
if ((*endptr != '\0') || (ERANGE == errno)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: group ID `%s' is not valid\n"),
|
_("%s: group ID '%s' is not valid\n"),
|
||||||
Prog, gid);
|
Prog, gid);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid)
|
|||||||
/* Check if this is a valid group name */
|
/* Check if this is a valid group name */
|
||||||
if (!is_valid_group_name (grent.gr_name)) {
|
if (!is_valid_group_name (grent.gr_name)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: invalid group name `%s'\n"),
|
_("%s: invalid group name '%s'\n"),
|
||||||
Prog, grent.gr_name);
|
Prog, grent.gr_name);
|
||||||
free (grent.gr_name);
|
free (grent.gr_name);
|
||||||
return -1;
|
return -1;
|
||||||
@ -237,7 +237,7 @@ static int add_group (const char *name, const char *gid, gid_t *ngid, uid_t uid)
|
|||||||
|
|
||||||
if (NULL != sg) {
|
if (NULL != sg) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: group %s is a shadow group, but does not exist in /etc/group\n"),
|
_("%s: group '%s' is a shadow group, but does not exist in /etc/group\n"),
|
||||||
Prog, grent.gr_name);
|
Prog, grent.gr_name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ static int get_uid (const char *uid, uid_t *nuid) {
|
|||||||
unsigned long int i = strtoul (uid, &endptr, 10);
|
unsigned long int i = strtoul (uid, &endptr, 10);
|
||||||
if (('\0' != *endptr) || (ERANGE == errno)) {
|
if (('\0' != *endptr) || (ERANGE == errno)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user ID `%s' is not valid\n"),
|
_("%s: user ID '%s' is not valid\n"),
|
||||||
Prog, uid);
|
Prog, uid);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -299,7 +299,7 @@ static int get_uid (const char *uid, uid_t *nuid) {
|
|||||||
*nuid = pwd->pw_uid;
|
*nuid = pwd->pw_uid;
|
||||||
} else {
|
} else {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: user `%s' does not exist\n"),
|
_("%s: user '%s' does not exist\n"),
|
||||||
Prog, uid);
|
Prog, uid);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -323,7 +323,7 @@ static int add_user (const char *name, uid_t uid, gid_t gid)
|
|||||||
/* Check if this is a valid user name */
|
/* Check if this is a valid user name */
|
||||||
if (!is_valid_user_name (name)) {
|
if (!is_valid_user_name (name)) {
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("%s: invalid user name `%s'\n"),
|
_("%s: invalid user name '%s'\n"),
|
||||||
Prog, name);
|
Prog, name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -378,7 +378,7 @@ static void check_password (const struct passwd *pw, const struct spwd *sp)
|
|||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("The password for %s cannot be changed.\n"),
|
_("The password for %s cannot be changed.\n"),
|
||||||
sp->sp_namp);
|
sp->sp_namp);
|
||||||
SYSLOG ((LOG_WARN, "password locked for `%s'", sp->sp_namp));
|
SYSLOG ((LOG_WARN, "password locked for '%s'", sp->sp_namp));
|
||||||
closelog ();
|
closelog ();
|
||||||
exit (E_NOPERM);
|
exit (E_NOPERM);
|
||||||
}
|
}
|
||||||
@ -394,7 +394,7 @@ static void check_password (const struct passwd *pw, const struct spwd *sp)
|
|||||||
_
|
_
|
||||||
("The password for %s cannot be changed yet.\n"),
|
("The password for %s cannot be changed yet.\n"),
|
||||||
pw->pw_name);
|
pw->pw_name);
|
||||||
SYSLOG ((LOG_WARN, "now < minimum age for `%s'", pw->pw_name));
|
SYSLOG ((LOG_WARN, "now < minimum age for '%s'", pw->pw_name));
|
||||||
closelog ();
|
closelog ();
|
||||||
exit (E_NOPERM);
|
exit (E_NOPERM);
|
||||||
}
|
}
|
||||||
@ -1036,7 +1036,7 @@ int main (int argc, char **argv)
|
|||||||
nscd_flush_cache ("passwd");
|
nscd_flush_cache ("passwd");
|
||||||
nscd_flush_cache ("group");
|
nscd_flush_cache ("group");
|
||||||
|
|
||||||
SYSLOG ((LOG_INFO, "password for `%s' changed by `%s'", name, myname));
|
SYSLOG ((LOG_INFO, "password for '%s' changed by '%s'", name, myname));
|
||||||
closelog ();
|
closelog ();
|
||||||
if (!qflg) {
|
if (!qflg) {
|
||||||
if (!eflg) {
|
if (!eflg) {
|
||||||
|
@ -298,7 +298,7 @@ static void check_pw_file (int *errors, bool *changed)
|
|||||||
* loop to try out the next list element.
|
* loop to try out the next list element.
|
||||||
*/
|
*/
|
||||||
delete_pw:
|
delete_pw:
|
||||||
SYSLOG ((LOG_INFO, "delete passwd line `%s'",
|
SYSLOG ((LOG_INFO, "delete passwd line '%s'",
|
||||||
pfe->line));
|
pfe->line));
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
||||||
@ -381,7 +381,7 @@ static void check_pw_file (int *errors, bool *changed)
|
|||||||
/*
|
/*
|
||||||
* Home directory doesn't exist, give a warning
|
* Home directory doesn't exist, give a warning
|
||||||
*/
|
*/
|
||||||
printf (_("user %s: directory %s does not exist\n"),
|
printf (_("user '%s': directory '%s' does not exist\n"),
|
||||||
pwd->pw_name, pwd->pw_dir);
|
pwd->pw_name, pwd->pw_dir);
|
||||||
*errors += 1;
|
*errors += 1;
|
||||||
}
|
}
|
||||||
@ -396,7 +396,7 @@ static void check_pw_file (int *errors, bool *changed)
|
|||||||
/*
|
/*
|
||||||
* Login shell doesn't exist, give a warning
|
* Login shell doesn't exist, give a warning
|
||||||
*/
|
*/
|
||||||
printf (_("user %s: program %s does not exist\n"),
|
printf (_("user '%s': program '%s' does not exist\n"),
|
||||||
pwd->pw_name, pwd->pw_shell);
|
pwd->pw_name, pwd->pw_shell);
|
||||||
*errors += 1;
|
*errors += 1;
|
||||||
}
|
}
|
||||||
@ -508,7 +508,7 @@ static void check_spw_file (int *errors, bool *changed)
|
|||||||
* to try out the next list element.
|
* to try out the next list element.
|
||||||
*/
|
*/
|
||||||
delete_spw:
|
delete_spw:
|
||||||
SYSLOG ((LOG_INFO, "delete shadow line `%s'",
|
SYSLOG ((LOG_INFO, "delete shadow line '%s'",
|
||||||
spe->line));
|
spe->line));
|
||||||
*changed = true;
|
*changed = true;
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ int check_su_auth (const char *actual_id, const char *wanted_id)
|
|||||||
continue;
|
continue;
|
||||||
if (!strcmp (action, "DENY")) {
|
if (!strcmp (action, "DENY")) {
|
||||||
SYSLOG ((pwent.pw_uid ? LOG_NOTICE : LOG_WARN,
|
SYSLOG ((pwent.pw_uid ? LOG_NOTICE : LOG_WARN,
|
||||||
"DENIED su from `%s' to `%s' (%s)\n",
|
"DENIED su from '%s' to '%s' (%s)\n",
|
||||||
actual_id, wanted_id, SUAUTHFILE));
|
actual_id, wanted_id, SUAUTHFILE));
|
||||||
fputs (_("Access to su to that account DENIED.\n"),
|
fputs (_("Access to su to that account DENIED.\n"),
|
||||||
stderr);
|
stderr);
|
||||||
@ -138,14 +138,14 @@ int check_su_auth (const char *actual_id, const char *wanted_id)
|
|||||||
return DENY;
|
return DENY;
|
||||||
} else if (!strcmp (action, "NOPASS")) {
|
} else if (!strcmp (action, "NOPASS")) {
|
||||||
SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
|
SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
|
||||||
"NO password asked for su from `%s' to `%s' (%s)\n",
|
"NO password asked for su from '%s' to '%s' (%s)\n",
|
||||||
actual_id, wanted_id, SUAUTHFILE));
|
actual_id, wanted_id, SUAUTHFILE));
|
||||||
fputs (_("Password authentication bypassed.\n"),stderr);
|
fputs (_("Password authentication bypassed.\n"),stderr);
|
||||||
fclose (authfile_fd);
|
fclose (authfile_fd);
|
||||||
return NOPWORD;
|
return NOPWORD;
|
||||||
} else if (!strcmp (action, "OWNPASS")) {
|
} else if (!strcmp (action, "OWNPASS")) {
|
||||||
SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
|
SYSLOG ((pwent.pw_uid ? LOG_INFO : LOG_NOTICE,
|
||||||
"su from `%s' to `%s': asking for user's own password (%s)\n",
|
"su from '%s' to '%s': asking for user's own password (%s)\n",
|
||||||
actual_id, wanted_id, SUAUTHFILE));
|
actual_id, wanted_id, SUAUTHFILE));
|
||||||
fputs (_("Please enter your OWN password as authentication.\n"),
|
fputs (_("Please enter your OWN password as authentication.\n"),
|
||||||
stderr);
|
stderr);
|
||||||
|
@ -217,7 +217,7 @@ static void fail_exit (int code)
|
|||||||
"adding user",
|
"adding user",
|
||||||
user_name, AUDIT_NO_ID, 0);
|
user_name, AUDIT_NO_ID, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "failed adding user `%s', data deleted", user_name));
|
SYSLOG ((LOG_INFO, "failed adding user '%s', data deleted", user_name));
|
||||||
exit (code);
|
exit (code);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -812,7 +812,7 @@ static void grp_update (void)
|
|||||||
"adding user to group",
|
"adding user to group",
|
||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "add `%s' to group `%s'",
|
SYSLOG ((LOG_INFO, "add '%s' to group '%s'",
|
||||||
user_name, ngrp->gr_name));
|
user_name, ngrp->gr_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -864,7 +864,7 @@ static void grp_update (void)
|
|||||||
"adding user to shadow group",
|
"adding user to shadow group",
|
||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "add `%s' to shadow group `%s'",
|
SYSLOG ((LOG_INFO, "add '%s' to shadow group '%s'",
|
||||||
user_name, nsgrp->sg_name));
|
user_name, nsgrp->sg_name));
|
||||||
}
|
}
|
||||||
#endif /* SHADOWGRP */
|
#endif /* SHADOWGRP */
|
||||||
|
@ -175,7 +175,7 @@ static void update_groups (void)
|
|||||||
"deleting user from group",
|
"deleting user from group",
|
||||||
user_name, (unsigned int) user_id, 0);
|
user_name, (unsigned int) user_id, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "delete `%s' from group `%s'\n",
|
SYSLOG ((LOG_INFO, "delete '%s' from group '%s'\n",
|
||||||
user_name, ngrp->gr_name));
|
user_name, ngrp->gr_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ static void update_groups (void)
|
|||||||
user_name, (unsigned int) user_id, 0);
|
user_name, (unsigned int) user_id, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"removed group `%s' owned by `%s'\n",
|
"removed group '%s' owned by '%s'\n",
|
||||||
grp->gr_name, user_name));
|
grp->gr_name, user_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -284,7 +284,7 @@ static void update_groups (void)
|
|||||||
"deleting user from shadow group",
|
"deleting user from shadow group",
|
||||||
user_name, (unsigned int) user_id, 0);
|
user_name, (unsigned int) user_id, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "delete `%s' from shadow group `%s'\n",
|
SYSLOG ((LOG_INFO, "delete '%s' from shadow group '%s'\n",
|
||||||
user_name, nsgrp->sg_name));
|
user_name, nsgrp->sg_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ static void update_user (void)
|
|||||||
"deleting user entries",
|
"deleting user entries",
|
||||||
user_name, (unsigned int) user_id, 1);
|
user_name, (unsigned int) user_id, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "delete user `%s'\n", user_name));
|
SYSLOG ((LOG_INFO, "delete user '%s'\n", user_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -742,7 +742,7 @@ int main (int argc, char **argv)
|
|||||||
struct passwd *pwd;
|
struct passwd *pwd;
|
||||||
pwd = getpwnam (user_name); /* local, no need for xgetpwnam */
|
pwd = getpwnam (user_name); /* local, no need for xgetpwnam */
|
||||||
if (NULL == pwd) {
|
if (NULL == pwd) {
|
||||||
fprintf (stderr, _("%s: user %s does not exist\n"),
|
fprintf (stderr, _("%s: user '%s' does not exist\n"),
|
||||||
Prog, user_name);
|
Prog, user_name);
|
||||||
#ifdef WITH_AUDIT
|
#ifdef WITH_AUDIT
|
||||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||||
|
@ -349,7 +349,7 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
"updating passwd",
|
"updating passwd",
|
||||||
user_newname, (unsigned int) user_newid, 0);
|
user_newname, (unsigned int) user_newid, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "lock user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "lock user '%s' password", user_newname));
|
||||||
strcpy (buf, "!");
|
strcpy (buf, "!");
|
||||||
strcat (buf, pw_pass);
|
strcat (buf, pw_pass);
|
||||||
pw_pass = buf;
|
pw_pass = buf;
|
||||||
@ -369,7 +369,7 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
"updating password",
|
"updating password",
|
||||||
user_newname, (unsigned int) user_newid, 0);
|
user_newname, (unsigned int) user_newid, 0);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "unlock user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "unlock user '%s' password", user_newname));
|
||||||
s = pw_pass;
|
s = pw_pass;
|
||||||
while ('\0' != *s) {
|
while ('\0' != *s) {
|
||||||
*s = *(s + 1);
|
*s = *(s + 1);
|
||||||
@ -381,7 +381,7 @@ static char *new_pw_passwd (char *pw_pass)
|
|||||||
"changing password",
|
"changing password",
|
||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "change user `%s' password", user_newname));
|
SYSLOG ((LOG_INFO, "change user '%s' password", user_newname));
|
||||||
pw_pass = xstrdup (user_pass);
|
pw_pass = xstrdup (user_pass);
|
||||||
}
|
}
|
||||||
return pw_pass;
|
return pw_pass;
|
||||||
@ -401,7 +401,7 @@ static void new_pwent (struct passwd *pwent)
|
|||||||
"changing name",
|
"changing name",
|
||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "change user name `%s' to `%s'",
|
SYSLOG ((LOG_INFO, "change user name '%s' to '%s'",
|
||||||
pwent->pw_name, user_newname));
|
pwent->pw_name, user_newname));
|
||||||
pwent->pw_name = xstrdup (user_newname);
|
pwent->pw_name = xstrdup (user_newname);
|
||||||
}
|
}
|
||||||
@ -417,7 +417,7 @@ static void new_pwent (struct passwd *pwent)
|
|||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' UID from `%d' to `%d'",
|
"change user '%s' UID from '%d' to '%d'",
|
||||||
pwent->pw_name, pwent->pw_uid, user_newid));
|
pwent->pw_name, pwent->pw_uid, user_newid));
|
||||||
pwent->pw_uid = user_newid;
|
pwent->pw_uid = user_newid;
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ static void new_pwent (struct passwd *pwent)
|
|||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' GID from `%d' to `%d'",
|
"change user '%s' GID from '%d' to '%d'",
|
||||||
pwent->pw_name, pwent->pw_gid, user_newgid));
|
pwent->pw_name, pwent->pw_gid, user_newgid));
|
||||||
pwent->pw_gid = user_newgid;
|
pwent->pw_gid = user_newgid;
|
||||||
}
|
}
|
||||||
@ -448,7 +448,7 @@ static void new_pwent (struct passwd *pwent)
|
|||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' home from `%s' to `%s'",
|
"change user '%s' home from '%s' to '%s'",
|
||||||
pwent->pw_name, pwent->pw_dir, user_newhome));
|
pwent->pw_name, pwent->pw_dir, user_newhome));
|
||||||
pwent->pw_dir = user_newhome;
|
pwent->pw_dir = user_newhome;
|
||||||
}
|
}
|
||||||
@ -458,7 +458,7 @@ static void new_pwent (struct passwd *pwent)
|
|||||||
"changing user shell",
|
"changing user shell",
|
||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "change user `%s' shell from `%s' to `%s'",
|
SYSLOG ((LOG_INFO, "change user '%s' shell from '%s' to '%s'",
|
||||||
pwent->pw_name, pwent->pw_shell, user_newshell));
|
pwent->pw_name, pwent->pw_shell, user_newshell));
|
||||||
pwent->pw_shell = user_newshell;
|
pwent->pw_shell = user_newshell;
|
||||||
}
|
}
|
||||||
@ -483,7 +483,7 @@ static void new_spent (struct spwd *spent)
|
|||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' inactive from `%ld' to `%ld'",
|
"change user '%s' inactive from '%ld' to '%ld'",
|
||||||
spent->sp_namp, spent->sp_inact, user_newinactive));
|
spent->sp_namp, spent->sp_inact, user_newinactive));
|
||||||
spent->sp_inact = user_newinactive;
|
spent->sp_inact = user_newinactive;
|
||||||
}
|
}
|
||||||
@ -500,7 +500,7 @@ static void new_spent (struct spwd *spent)
|
|||||||
user_newname, (unsigned int) user_newid, 1);
|
user_newname, (unsigned int) user_newid, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change user `%s' expiration from `%s' to `%s'",
|
"change user '%s' expiration from '%s' to '%s'",
|
||||||
spent->sp_namp, old_exp, new_exp));
|
spent->sp_namp, old_exp, new_exp));
|
||||||
spent->sp_expire = user_newexpire;
|
spent->sp_expire = user_newexpire;
|
||||||
}
|
}
|
||||||
@ -587,7 +587,7 @@ static void update_group (void)
|
|||||||
user_newname, AUDIT_NO_ID, 1);
|
user_newname, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change `%s' to `%s' in group `%s'",
|
"change '%s' to '%s' in group '%s'",
|
||||||
user_name, user_newname,
|
user_name, user_newname,
|
||||||
ngrp->gr_name));
|
ngrp->gr_name));
|
||||||
}
|
}
|
||||||
@ -599,7 +599,7 @@ static void update_group (void)
|
|||||||
"removing group member",
|
"removing group member",
|
||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "delete `%s' from group `%s'",
|
SYSLOG ((LOG_INFO, "delete '%s' from group '%s'",
|
||||||
user_name, ngrp->gr_name));
|
user_name, ngrp->gr_name));
|
||||||
} else if (!was_member && Gflg && is_member) {
|
} else if (!was_member && Gflg && is_member) {
|
||||||
ngrp->gr_mem = add_list (ngrp->gr_mem, user_newname);
|
ngrp->gr_mem = add_list (ngrp->gr_mem, user_newname);
|
||||||
@ -609,7 +609,7 @@ static void update_group (void)
|
|||||||
"adding user to group",
|
"adding user to group",
|
||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "add `%s' to group `%s'",
|
SYSLOG ((LOG_INFO, "add '%s' to group '%s'",
|
||||||
user_newname, ngrp->gr_name));
|
user_newname, ngrp->gr_name));
|
||||||
}
|
}
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
@ -684,7 +684,7 @@ static void update_gshadow (void)
|
|||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change admin `%s' to `%s' in shadow group `%s'",
|
"change admin '%s' to '%s' in shadow group '%s'",
|
||||||
user_name, user_newname, nsgrp->sg_name));
|
user_name, user_newname, nsgrp->sg_name));
|
||||||
}
|
}
|
||||||
if (was_member && (!Gflg || is_member)) {
|
if (was_member && (!Gflg || is_member)) {
|
||||||
@ -700,7 +700,7 @@ static void update_gshadow (void)
|
|||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"change `%s' to `%s' in shadow group `%s'",
|
"change '%s' to '%s' in shadow group '%s'",
|
||||||
user_name, user_newname,
|
user_name, user_newname,
|
||||||
nsgrp->sg_name));
|
nsgrp->sg_name));
|
||||||
}
|
}
|
||||||
@ -713,7 +713,7 @@ static void update_gshadow (void)
|
|||||||
user_name, AUDIT_NO_ID, 1);
|
user_name, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO,
|
SYSLOG ((LOG_INFO,
|
||||||
"delete `%s' from shadow group `%s'",
|
"delete '%s' from shadow group '%s'",
|
||||||
user_name, nsgrp->sg_name));
|
user_name, nsgrp->sg_name));
|
||||||
} else if (!was_member && Gflg && is_member) {
|
} else if (!was_member && Gflg && is_member) {
|
||||||
nsgrp->sg_mem = add_list (nsgrp->sg_mem, user_newname);
|
nsgrp->sg_mem = add_list (nsgrp->sg_mem, user_newname);
|
||||||
@ -723,7 +723,7 @@ static void update_gshadow (void)
|
|||||||
"adding user to shadow group",
|
"adding user to shadow group",
|
||||||
user_newname, AUDIT_NO_ID, 1);
|
user_newname, AUDIT_NO_ID, 1);
|
||||||
#endif
|
#endif
|
||||||
SYSLOG ((LOG_INFO, "add `%s' to shadow group `%s'",
|
SYSLOG ((LOG_INFO, "add '%s' to shadow group '%s'",
|
||||||
user_newname, nsgrp->sg_name));
|
user_newname, nsgrp->sg_name));
|
||||||
}
|
}
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
@ -811,7 +811,7 @@ static void process_flags (int argc, char **argv)
|
|||||||
/* local, no need for xgetpwnam */
|
/* local, no need for xgetpwnam */
|
||||||
pwd = getpwnam (argv[argc - 1]);
|
pwd = getpwnam (argv[argc - 1]);
|
||||||
if (NULL == pwd) {
|
if (NULL == pwd) {
|
||||||
fprintf (stderr, _("%s: user %s does not exist\n"),
|
fprintf (stderr, _("%s: user '%s' does not exist\n"),
|
||||||
Prog, argv[argc - 1]);
|
Prog, argv[argc - 1]);
|
||||||
exit (E_NOTFOUND);
|
exit (E_NOTFOUND);
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
#define MSG_WARN_EDIT_OTHER_FILE _( \
|
#define MSG_WARN_EDIT_OTHER_FILE _( \
|
||||||
"You have modified %s.\n"\
|
"You have modified %s.\n"\
|
||||||
"You may need to modify %s for consistency.\n"\
|
"You may need to modify %s for consistency.\n"\
|
||||||
"Please use the command `%s' to do so.\n")
|
"Please use the command '%s' to do so.\n")
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global variables
|
* Global variables
|
||||||
|
Loading…
x
Reference in New Issue
Block a user