* 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>
|
||||
|
||||
* 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 */
|
||||
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");
|
||||
|
||||
|
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.
|
||||
*/
|
||||
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 ();
|
||||
fprintf (stderr,
|
||||
_("You may not change the shell for %s.\n"),
|
||||
_("You may not change the shell for '%s'.\n"),
|
||||
pw->pw_name);
|
||||
exit (1);
|
||||
}
|
||||
@ -253,10 +253,10 @@ static void check_perms (const struct passwd *pw)
|
||||
* is not a restricted one.
|
||||
*/
|
||||
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 ();
|
||||
fprintf (stderr,
|
||||
_("You may not change the shell for %s.\n"),
|
||||
_("You may not change the shell for '%s'.\n"),
|
||||
pw->pw_name);
|
||||
exit (1);
|
||||
}
|
||||
@ -268,10 +268,10 @@ static void check_perms (const struct passwd *pw)
|
||||
if ((pw->pw_uid != getuid ())
|
||||
&& (is_selinux_enabled () > 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 ();
|
||||
fprintf (stderr,
|
||||
_("You may not change the shell for %s.\n"),
|
||||
_("You may not change the shell for '%s'.\n"),
|
||||
pw->pw_name);
|
||||
exit (1);
|
||||
}
|
||||
@ -537,7 +537,7 @@ int main (int argc, char **argv)
|
||||
|
||||
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");
|
||||
|
||||
|
@ -148,7 +148,7 @@ static void close_files (void)
|
||||
"deleting group",
|
||||
group_name, (unsigned int) group_id, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "remove group `%s'\n", group_name));
|
||||
SYSLOG ((LOG_INFO, "remove group '%s'\n", group_name));
|
||||
|
||||
if (gr_close () == 0) {
|
||||
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 */
|
||||
if (NULL == grp) {
|
||||
fprintf (stderr, _("%s: group %s does not exist\n"),
|
||||
fprintf (stderr, _("%s: group '%s' does not exist\n"),
|
||||
Prog, group_name);
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
|
@ -165,7 +165,7 @@ static void process_flags (int argc, char **argv)
|
||||
/* local, no need for xgetpwnam */
|
||||
if ( (NULL != adduser)
|
||||
&& (getpwnam (adduser) == NULL)) {
|
||||
fprintf (stderr, _("%s: user `%s' does not exist\n"),
|
||||
fprintf (stderr, _("%s: user '%s' does not exist\n"),
|
||||
Prog, adduser);
|
||||
fail_exit (EXIT_INVALID_USER);
|
||||
}
|
||||
@ -264,7 +264,7 @@ void main (int argc, char **argv)
|
||||
grp = (struct group *) gr_locate (name);
|
||||
|
||||
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);
|
||||
fail_exit (EXIT_INVALID_GROUP);
|
||||
}
|
||||
@ -274,7 +274,7 @@ void main (int argc, char **argv)
|
||||
} else if (NULL != adduser) {
|
||||
if (is_on_list (grp->gr_mem, adduser)) {
|
||||
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);
|
||||
fail_exit (EXIT_MEMBER_EXISTS);
|
||||
}
|
||||
@ -283,7 +283,7 @@ void main (int argc, char **argv)
|
||||
} else if (NULL != deluser) {
|
||||
if (!is_on_list (grp->gr_mem, adduser)) {
|
||||
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);
|
||||
fail_exit (EXIT_NOT_MEMBER);
|
||||
}
|
||||
|
@ -282,12 +282,12 @@ static void grp_update (void)
|
||||
group_name, (unsigned int) group_id, 1);
|
||||
#endif
|
||||
if (nflg) {
|
||||
SYSLOG ((LOG_INFO, "change group `%s' to `%s'",
|
||||
SYSLOG ((LOG_INFO, "change group '%s' to '%s'",
|
||||
group_name, group_newname));
|
||||
}
|
||||
|
||||
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,
|
||||
(unsigned long) group_newid));
|
||||
}
|
||||
@ -660,7 +660,7 @@ int main (int argc, char **argv)
|
||||
*/
|
||||
grp = getgrnam (group_name); /* local, no need for xgetgrnam */
|
||||
if (NULL == grp) {
|
||||
fprintf (stderr, _("%s: group %s does not exist\n"),
|
||||
fprintf (stderr, _("%s: group '%s' does not exist\n"),
|
||||
Prog, group_name);
|
||||
#ifdef WITH_AUDIT
|
||||
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.
|
||||
*/
|
||||
delete_gr:
|
||||
SYSLOG ((LOG_INFO, "delete group line `%s'",
|
||||
SYSLOG ((LOG_INFO, "delete group line '%s'",
|
||||
gre->line));
|
||||
*changed = true;
|
||||
|
||||
@ -516,7 +516,7 @@ static void check_grp_file (int *errors, bool *changed)
|
||||
if (check_members (grp->gr_name, grp->gr_mem,
|
||||
_("group %s: no user %s\n"),
|
||||
_("delete member '%s'? "),
|
||||
"delete member `%s' from group `%s'",
|
||||
"delete member '%s' from group '%s'",
|
||||
errors) == 1) {
|
||||
*changed = true;
|
||||
gre->changed = true;
|
||||
@ -547,7 +547,7 @@ static void check_grp_file (int *errors, bool *changed)
|
||||
sg.sg_adm = ∅
|
||||
sg.sg_mem = grp->gr_mem;
|
||||
SYSLOG ((LOG_INFO,
|
||||
"add group `%s' to `%s'",
|
||||
"add group '%s' to '%s'",
|
||||
grp->gr_name, sgr_file));
|
||||
*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.
|
||||
*/
|
||||
delete_sg:
|
||||
SYSLOG ((LOG_INFO, "delete shadow line `%s'",
|
||||
SYSLOG ((LOG_INFO, "delete shadow line '%s'",
|
||||
sge->line));
|
||||
*changed = true;
|
||||
|
||||
@ -710,7 +710,7 @@ static void check_sgr_file (int *errors, bool *changed)
|
||||
if (check_members (sgr->sg_name, sgr->sg_adm,
|
||||
_("shadow group %s: no administrative user %s\n"),
|
||||
_("delete administrative member '%s'? "),
|
||||
"delete admin `%s' from shadow group `%s'",
|
||||
"delete admin '%s' from shadow group '%s'",
|
||||
errors) == 1) {
|
||||
*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,
|
||||
_("shadow group %s: no user %s\n"),
|
||||
_("delete member '%s'? "),
|
||||
"delete member `%s' from shadow group `%s'",
|
||||
"delete member '%s' from shadow group '%s'",
|
||||
errors) == 1) {
|
||||
*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) {
|
||||
SYSLOG ((LOG_NOTICE,
|
||||
"TOO MANY LOGIN TRIES (%d)%s FOR `%s'",
|
||||
"TOO MANY LOGIN TRIES (%d)%s FOR '%s'",
|
||||
failcount, fromhost, failent_user));
|
||||
fprintf(stderr,
|
||||
_("Maximum number of tries exceeded (%d)\n"),
|
||||
@ -736,7 +736,7 @@ int main (int argc, char **argv)
|
||||
PAM_END;
|
||||
exit(99);
|
||||
} 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,
|
||||
pam_strerror (pamh, retcode)));
|
||||
failed = true;
|
||||
@ -855,7 +855,7 @@ int main (int argc, char **argv)
|
||||
pwent.pw_passwd = spwd->sp_pwdp;
|
||||
} else {
|
||||
SYSLOG ((LOG_WARN,
|
||||
"no shadow password for `%s'%s",
|
||||
"no shadow password for '%s'%s",
|
||||
username, fromhost));
|
||||
}
|
||||
}
|
||||
@ -888,7 +888,7 @@ int main (int argc, char **argv)
|
||||
* username at least once. Should probably use LOG_AUTHPRIV
|
||||
* 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)
|
||||
|| getdef_bool ("LOG_UNKFAIL_ENAB")) ?
|
||||
username : "UNKNOWN", fromhost));
|
||||
@ -909,7 +909,7 @@ int main (int argc, char **argv)
|
||||
}
|
||||
if ( !failed
|
||||
&& !login_access (username, *hostname ? hostname : tty)) {
|
||||
SYSLOG ((LOG_WARN, "LOGIN `%s' REFUSED %s",
|
||||
SYSLOG ((LOG_WARN, "LOGIN '%s' REFUSED %s",
|
||||
username, fromhost));
|
||||
failed = true;
|
||||
}
|
||||
@ -917,7 +917,7 @@ int main (int argc, char **argv)
|
||||
&& getdef_bool ("FAILLOG_ENAB")
|
||||
&& !failcheck (pwent.pw_uid, &faillog, failed)) {
|
||||
SYSLOG ((LOG_CRIT,
|
||||
"exceeded failure limit for `%s' %s",
|
||||
"exceeded failure limit for '%s' %s",
|
||||
username, fromhost));
|
||||
failed = true;
|
||||
}
|
||||
@ -1007,7 +1007,7 @@ int main (int argc, char **argv)
|
||||
*/
|
||||
if ( getdef_bool ("PORTTIME_CHECKS_ENAB")
|
||||
&& !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));
|
||||
closelog ();
|
||||
bad_time_notify ();
|
||||
@ -1159,7 +1159,7 @@ int main (int argc, char **argv)
|
||||
puts (_
|
||||
("Warning: login re-enabled after temporary lockout."));
|
||||
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));
|
||||
}
|
||||
}
|
||||
@ -1215,9 +1215,9 @@ int main (int argc, char **argv)
|
||||
SYSLOG ((LOG_NOTICE, "ROOT LOGIN %s", fromhost));
|
||||
} else if (getdef_bool ("LOG_OK_LOGINS")) {
|
||||
#ifdef USE_PAM
|
||||
SYSLOG ((LOG_INFO, "`%s' logged in %s", pam_user, fromhost));
|
||||
SYSLOG ((LOG_INFO, "'%s' logged in %s", pam_user, fromhost));
|
||||
#else
|
||||
SYSLOG ((LOG_INFO, "`%s' logged in %s", username, fromhost));
|
||||
SYSLOG ((LOG_INFO, "'%s' logged in %s", username, fromhost));
|
||||
#endif
|
||||
}
|
||||
closelog ();
|
||||
|
@ -263,7 +263,7 @@ int main (int argc, char **argv)
|
||||
user[sizeof (user) - 1] = '\0';
|
||||
|
||||
SYSLOG ((LOG_NOTICE,
|
||||
"logged off user `%s' on `%s'", user,
|
||||
"logged off user '%s' on '%s'", user,
|
||||
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);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"Invalid password for group `%s' from `%s'",
|
||||
"Invalid password for group '%s' from '%s'",
|
||||
groupname, pwd->pw_name));
|
||||
sleep (1);
|
||||
fputs (_("Invalid password.\n"), stderr);
|
||||
@ -258,7 +258,7 @@ static void syslog_sg (const char *name, const char *group)
|
||||
tty += 5;
|
||||
}
|
||||
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));
|
||||
#ifdef USE_PAM
|
||||
/*
|
||||
@ -327,11 +327,11 @@ static void syslog_sg (const char *name, const char *group)
|
||||
/* local, no need for xgetgrgid */
|
||||
if (NULL != grp) {
|
||||
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));
|
||||
} else {
|
||||
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,
|
||||
(unsigned long) gid));
|
||||
/* 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
|
||||
* was in a newgrp session.*/
|
||||
SYSLOG ((LOG_WARN,
|
||||
"unknown GID `%lu' used by user `%s'",
|
||||
"unknown GID '%lu' used by user '%s'",
|
||||
(unsigned long) gid, name));
|
||||
}
|
||||
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);
|
||||
if ((*endptr != '\0') || (ERANGE == errno)) {
|
||||
fprintf (stderr,
|
||||
_("%s: group ID `%s' is not valid\n"),
|
||||
_("%s: group ID '%s' is not valid\n"),
|
||||
Prog, gid);
|
||||
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 */
|
||||
if (!is_valid_group_name (grent.gr_name)) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid group name `%s'\n"),
|
||||
_("%s: invalid group name '%s'\n"),
|
||||
Prog, grent.gr_name);
|
||||
free (grent.gr_name);
|
||||
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) {
|
||||
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);
|
||||
return -1;
|
||||
}
|
||||
@ -282,7 +282,7 @@ static int get_uid (const char *uid, uid_t *nuid) {
|
||||
unsigned long int i = strtoul (uid, &endptr, 10);
|
||||
if (('\0' != *endptr) || (ERANGE == errno)) {
|
||||
fprintf (stderr,
|
||||
_("%s: user ID `%s' is not valid\n"),
|
||||
_("%s: user ID '%s' is not valid\n"),
|
||||
Prog, uid);
|
||||
return -1;
|
||||
}
|
||||
@ -299,7 +299,7 @@ static int get_uid (const char *uid, uid_t *nuid) {
|
||||
*nuid = pwd->pw_uid;
|
||||
} else {
|
||||
fprintf (stderr,
|
||||
_("%s: user `%s' does not exist\n"),
|
||||
_("%s: user '%s' does not exist\n"),
|
||||
Prog, uid);
|
||||
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 */
|
||||
if (!is_valid_user_name (name)) {
|
||||
fprintf (stderr,
|
||||
_("%s: invalid user name `%s'\n"),
|
||||
_("%s: invalid user name '%s'\n"),
|
||||
Prog, name);
|
||||
return -1;
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ static void check_password (const struct passwd *pw, const struct spwd *sp)
|
||||
fprintf (stderr,
|
||||
_("The password for %s cannot be changed.\n"),
|
||||
sp->sp_namp);
|
||||
SYSLOG ((LOG_WARN, "password locked for `%s'", sp->sp_namp));
|
||||
SYSLOG ((LOG_WARN, "password locked for '%s'", sp->sp_namp));
|
||||
closelog ();
|
||||
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"),
|
||||
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 ();
|
||||
exit (E_NOPERM);
|
||||
}
|
||||
@ -1036,7 +1036,7 @@ int main (int argc, char **argv)
|
||||
nscd_flush_cache ("passwd");
|
||||
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 ();
|
||||
if (!qflg) {
|
||||
if (!eflg) {
|
||||
|
@ -298,7 +298,7 @@ static void check_pw_file (int *errors, bool *changed)
|
||||
* loop to try out the next list element.
|
||||
*/
|
||||
delete_pw:
|
||||
SYSLOG ((LOG_INFO, "delete passwd line `%s'",
|
||||
SYSLOG ((LOG_INFO, "delete passwd line '%s'",
|
||||
pfe->line));
|
||||
*changed = true;
|
||||
|
||||
@ -381,7 +381,7 @@ static void check_pw_file (int *errors, bool *changed)
|
||||
/*
|
||||
* 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);
|
||||
*errors += 1;
|
||||
}
|
||||
@ -396,7 +396,7 @@ static void check_pw_file (int *errors, bool *changed)
|
||||
/*
|
||||
* 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);
|
||||
*errors += 1;
|
||||
}
|
||||
@ -508,7 +508,7 @@ static void check_spw_file (int *errors, bool *changed)
|
||||
* to try out the next list element.
|
||||
*/
|
||||
delete_spw:
|
||||
SYSLOG ((LOG_INFO, "delete shadow line `%s'",
|
||||
SYSLOG ((LOG_INFO, "delete shadow line '%s'",
|
||||
spe->line));
|
||||
*changed = true;
|
||||
|
||||
|
@ -130,7 +130,7 @@ int check_su_auth (const char *actual_id, const char *wanted_id)
|
||||
continue;
|
||||
if (!strcmp (action, "DENY")) {
|
||||
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));
|
||||
fputs (_("Access to su to that account DENIED.\n"),
|
||||
stderr);
|
||||
@ -138,14 +138,14 @@ int check_su_auth (const char *actual_id, const char *wanted_id)
|
||||
return DENY;
|
||||
} else if (!strcmp (action, "NOPASS")) {
|
||||
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));
|
||||
fputs (_("Password authentication bypassed.\n"),stderr);
|
||||
fclose (authfile_fd);
|
||||
return NOPWORD;
|
||||
} else if (!strcmp (action, "OWNPASS")) {
|
||||
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));
|
||||
fputs (_("Please enter your OWN password as authentication.\n"),
|
||||
stderr);
|
||||
|
@ -217,7 +217,7 @@ static void fail_exit (int code)
|
||||
"adding user",
|
||||
user_name, AUDIT_NO_ID, 0);
|
||||
#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);
|
||||
}
|
||||
|
||||
@ -812,7 +812,7 @@ static void grp_update (void)
|
||||
"adding user to group",
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add `%s' to group `%s'",
|
||||
SYSLOG ((LOG_INFO, "add '%s' to group '%s'",
|
||||
user_name, ngrp->gr_name));
|
||||
}
|
||||
|
||||
@ -864,7 +864,7 @@ static void grp_update (void)
|
||||
"adding user to shadow group",
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add `%s' to shadow group `%s'",
|
||||
SYSLOG ((LOG_INFO, "add '%s' to shadow group '%s'",
|
||||
user_name, nsgrp->sg_name));
|
||||
}
|
||||
#endif /* SHADOWGRP */
|
||||
|
@ -175,7 +175,7 @@ static void update_groups (void)
|
||||
"deleting user from group",
|
||||
user_name, (unsigned int) user_id, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "delete `%s' from group `%s'\n",
|
||||
SYSLOG ((LOG_INFO, "delete '%s' from group '%s'\n",
|
||||
user_name, ngrp->gr_name));
|
||||
}
|
||||
|
||||
@ -228,7 +228,7 @@ static void update_groups (void)
|
||||
user_name, (unsigned int) user_id, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"removed group `%s' owned by `%s'\n",
|
||||
"removed group '%s' owned by '%s'\n",
|
||||
grp->gr_name, user_name));
|
||||
}
|
||||
}
|
||||
@ -284,7 +284,7 @@ static void update_groups (void)
|
||||
"deleting user from shadow group",
|
||||
user_name, (unsigned int) user_id, 0);
|
||||
#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));
|
||||
}
|
||||
|
||||
@ -459,7 +459,7 @@ static void update_user (void)
|
||||
"deleting user entries",
|
||||
user_name, (unsigned int) user_id, 1);
|
||||
#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;
|
||||
pwd = getpwnam (user_name); /* local, no need for xgetpwnam */
|
||||
if (NULL == pwd) {
|
||||
fprintf (stderr, _("%s: user %s does not exist\n"),
|
||||
fprintf (stderr, _("%s: user '%s' does not exist\n"),
|
||||
Prog, user_name);
|
||||
#ifdef WITH_AUDIT
|
||||
audit_logger (AUDIT_USER_CHAUTHTOK, Prog,
|
||||
|
@ -349,7 +349,7 @@ static char *new_pw_passwd (char *pw_pass)
|
||||
"updating passwd",
|
||||
user_newname, (unsigned int) user_newid, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "lock user `%s' password", user_newname));
|
||||
SYSLOG ((LOG_INFO, "lock user '%s' password", user_newname));
|
||||
strcpy (buf, "!");
|
||||
strcat (buf, pw_pass);
|
||||
pw_pass = buf;
|
||||
@ -369,7 +369,7 @@ static char *new_pw_passwd (char *pw_pass)
|
||||
"updating password",
|
||||
user_newname, (unsigned int) user_newid, 0);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "unlock user `%s' password", user_newname));
|
||||
SYSLOG ((LOG_INFO, "unlock user '%s' password", user_newname));
|
||||
s = pw_pass;
|
||||
while ('\0' != *s) {
|
||||
*s = *(s + 1);
|
||||
@ -381,7 +381,7 @@ static char *new_pw_passwd (char *pw_pass)
|
||||
"changing password",
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "change user `%s' password", user_newname));
|
||||
SYSLOG ((LOG_INFO, "change user '%s' password", user_newname));
|
||||
pw_pass = xstrdup (user_pass);
|
||||
}
|
||||
return pw_pass;
|
||||
@ -401,7 +401,7 @@ static void new_pwent (struct passwd *pwent)
|
||||
"changing name",
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#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 = xstrdup (user_newname);
|
||||
}
|
||||
@ -417,7 +417,7 @@ static void new_pwent (struct passwd *pwent)
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
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_uid = user_newid;
|
||||
}
|
||||
@ -428,7 +428,7 @@ static void new_pwent (struct passwd *pwent)
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
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_gid = user_newgid;
|
||||
}
|
||||
@ -448,7 +448,7 @@ static void new_pwent (struct passwd *pwent)
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
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_dir = user_newhome;
|
||||
}
|
||||
@ -458,7 +458,7 @@ static void new_pwent (struct passwd *pwent)
|
||||
"changing user shell",
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#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_shell = user_newshell;
|
||||
}
|
||||
@ -483,7 +483,7 @@ static void new_spent (struct spwd *spent)
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
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_inact = user_newinactive;
|
||||
}
|
||||
@ -500,7 +500,7 @@ static void new_spent (struct spwd *spent)
|
||||
user_newname, (unsigned int) user_newid, 1);
|
||||
#endif
|
||||
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_expire = user_newexpire;
|
||||
}
|
||||
@ -587,7 +587,7 @@ static void update_group (void)
|
||||
user_newname, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"change `%s' to `%s' in group `%s'",
|
||||
"change '%s' to '%s' in group '%s'",
|
||||
user_name, user_newname,
|
||||
ngrp->gr_name));
|
||||
}
|
||||
@ -599,7 +599,7 @@ static void update_group (void)
|
||||
"removing group member",
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "delete `%s' from group `%s'",
|
||||
SYSLOG ((LOG_INFO, "delete '%s' from group '%s'",
|
||||
user_name, ngrp->gr_name));
|
||||
} else if (!was_member && Gflg && is_member) {
|
||||
ngrp->gr_mem = add_list (ngrp->gr_mem, user_newname);
|
||||
@ -609,7 +609,7 @@ static void update_group (void)
|
||||
"adding user to group",
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add `%s' to group `%s'",
|
||||
SYSLOG ((LOG_INFO, "add '%s' to group '%s'",
|
||||
user_newname, ngrp->gr_name));
|
||||
}
|
||||
if (!changed) {
|
||||
@ -684,7 +684,7 @@ static void update_gshadow (void)
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
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));
|
||||
}
|
||||
if (was_member && (!Gflg || is_member)) {
|
||||
@ -700,7 +700,7 @@ static void update_gshadow (void)
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"change `%s' to `%s' in shadow group `%s'",
|
||||
"change '%s' to '%s' in shadow group '%s'",
|
||||
user_name, user_newname,
|
||||
nsgrp->sg_name));
|
||||
}
|
||||
@ -713,7 +713,7 @@ static void update_gshadow (void)
|
||||
user_name, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO,
|
||||
"delete `%s' from shadow group `%s'",
|
||||
"delete '%s' from shadow group '%s'",
|
||||
user_name, nsgrp->sg_name));
|
||||
} else if (!was_member && Gflg && is_member) {
|
||||
nsgrp->sg_mem = add_list (nsgrp->sg_mem, user_newname);
|
||||
@ -723,7 +723,7 @@ static void update_gshadow (void)
|
||||
"adding user to shadow group",
|
||||
user_newname, AUDIT_NO_ID, 1);
|
||||
#endif
|
||||
SYSLOG ((LOG_INFO, "add `%s' to shadow group `%s'",
|
||||
SYSLOG ((LOG_INFO, "add '%s' to shadow group '%s'",
|
||||
user_newname, nsgrp->sg_name));
|
||||
}
|
||||
if (!changed) {
|
||||
@ -811,7 +811,7 @@ static void process_flags (int argc, char **argv)
|
||||
/* local, no need for xgetpwnam */
|
||||
pwd = getpwnam (argv[argc - 1]);
|
||||
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]);
|
||||
exit (E_NOTFOUND);
|
||||
}
|
||||
|
@ -48,7 +48,7 @@
|
||||
#define MSG_WARN_EDIT_OTHER_FILE _( \
|
||||
"You have modified %s.\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
|
||||
|
Loading…
Reference in New Issue
Block a user