Make sure the program name is hardcoded when write to the log.
Reported-by: "Serge E. Hallyn" <serge@hallyn.com>
Reported-by: "Skyler Ferrante (RIT Student)" <sjf5462@rit.edu>
Signed-off-by: Karel Zak <kzak@redhat.com>
{
DBG(LOG, ul_debug("syslog logging"));
- openlog(program_invocation_short_name, LOG_PID, LOG_AUTH);
+ openlog(su->runuser ? "runuser" : "su", LOG_PID, LOG_AUTH);
syslog(LOG_NOTICE, "%s(to %s) %s on %s",
successful ? "" :
su->runuser ? "FAILED RUNUSER " : "FAILED SU ",
* automatically prepended to the message. If we write directly to
* /dev/console, we must prepend the process name ourselves.
*/
- openlog(program_invocation_short_name, LOG_PID, LOG_AUTHPRIV);
+ openlog("agetty", LOG_PID, LOG_AUTHPRIV);
vsyslog(priority, fmt, ap);
closelog();
#else