commit bash-20150813 snapshot

This commit is contained in:
Chet Ramey
2015-09-01 14:44:02 -04:00
parent e9eee9d4b0
commit f2d7e1a3bc
19 changed files with 223 additions and 33 deletions
+13
View File
@@ -730,11 +730,24 @@ check_add_history (line, force)
#if defined (SYSLOG_HISTORY)
#define SYSLOG_MAXLEN 600
extern char *shell_name;
#ifndef OPENLOG_OPTS
#define OPENLOG_OPTS 0
#endif
void
bash_syslog_history (line)
const char *line;
{
char trunc[SYSLOG_MAXLEN];
static int first = 1;
if (first)
{
openlog (shell_name, OPENLOG_OPTS, SYSLOG_FACILITY);
first = 0;
}
if (strlen(line) < SYSLOG_MAXLEN)
syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line);