New upstream version 4.17.0
This commit is contained in:
@@ -862,7 +862,7 @@ static void process_flags (int argc, char **argv)
|
||||
if (optind < argc) {
|
||||
STRTCPY(name, argv[optind++]); /* use this login id */
|
||||
}
|
||||
if ('\0' == name[0]) { /* use default user */
|
||||
if (streq(name, "")) { /* use default user */
|
||||
struct passwd *root_pw = getpwnam ("root");
|
||||
if ((NULL != root_pw) && (0 == root_pw->pw_uid)) {
|
||||
(void) strcpy (name, "root");
|
||||
@@ -1080,15 +1080,15 @@ int main (int argc, char **argv)
|
||||
/*
|
||||
* Set the default shell.
|
||||
*/
|
||||
if ((NULL == shellstr) || ('\0' == shellstr[0])) {
|
||||
if ((NULL == shellstr) || streq(shellstr, "")) {
|
||||
shellstr = SHELL;
|
||||
}
|
||||
|
||||
sulog (caller_tty, true, caller_name, name); /* save SU information */
|
||||
if (getdef_bool ("SYSLOG_SU_ENAB")) {
|
||||
SYSLOG ((LOG_INFO, "+ %s %s:%s", caller_tty,
|
||||
('\0' != caller_name[0]) ? caller_name : "???",
|
||||
('\0' != name[0]) ? name : "???"));
|
||||
(!streq(caller_name, "")) ? caller_name : "???",
|
||||
(!streq(name, "")) ? name : "???"));
|
||||
}
|
||||
|
||||
#ifdef USE_PAM
|
||||
@@ -1143,7 +1143,7 @@ int main (int argc, char **argv)
|
||||
AUDIT_USER_ROLE_CHANGE,
|
||||
NULL, /* Prog. name */
|
||||
"su",
|
||||
('\0' != caller_name[0]) ? caller_name : "???",
|
||||
(!streq(caller_name, "")) ? caller_name : "???",
|
||||
AUDIT_NO_ID,
|
||||
"localhost",
|
||||
NULL, /* addr */
|
||||
|
||||
Reference in New Issue
Block a user