Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ vi config-top.h
- #define SYSLOG_HISTORY
- #if defined (SYSLOG_HISTORY)
- # define SYSLOG_FACILITY LOG_USER
- # define SYSLOG_LEVEL LOG_INFO
- #endif
- ./configure
- make install
- $ grep configure bash.spec
- %configure --with-bash-malloc=no --with-afs
- - Use the configure macro instead of calling ./configure directly
- $ rpmdev-setuptree
- $ rpm -ivh bash-4.2.46-20.el7_2.src.rpm
- $ cd rpmbuild/SOURCES
- $ tar zxf bash-4.2.tar.gz
- $ cp -prf bash-4.2 bash-4.2-orig
- $ cd bash-4.2
- /* Define if you want each line saved to the history list in bashhist.c:
- bash_add_history() to be sent to syslog(). */
- #define SYSLOG_HISTORY
- #if defined (SYSLOG_HISTORY)
- # define SYSLOG_FACILITY LOG_LOCAL1
- # define SYSLOG_LEVEL LOG_DEBUG
- #endif
- void
- bash_syslog_history (line)
- const char *line;
- {
- char trunc[SYSLOG_MAXLEN];
- if (strlen(line) < SYSLOG_MAXLEN)
- syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d USER=%s CMD=%s", getpid(), current_user.uid, current_user.user_name, line);
- else
- {
- strncpy (trunc, line, SYSLOG_MAXLEN);
- trunc[SYSLOG_MAXLEN - 1] = '