Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 91327 | Differences between
and this patch

Collapse All | Expand All

(-)./bashhist.c (+4 lines)
Lines 698-704 Link Here
698
     char *line;
698
     char *line;
699
{
699
{
700
  hist_last_line_added = 1;
700
  hist_last_line_added = 1;
701
# ifdef USE_SYSLOG
702
  add_history (line, 1);
703
# else
701
  add_history (line);
704
  add_history (line);
705
# endif
702
  history_lines_this_session++;
706
  history_lines_this_session++;
703
}
707
}
704
708
(-)./configure.in (+6 lines)
Lines 58-63 Link Here
58
opt_afs=no
58
opt_afs=no
59
opt_curses=no
59
opt_curses=no
60
opt_with_installed_readline=no
60
opt_with_installed_readline=no
61
opt_syslog=no
61
62
62
#htmldir=
63
#htmldir=
63
64
Lines 111-116 Link Here
111
AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval)
112
AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval)
112
AC_ARG_WITH(purecov, AC_HELP_STRING([--with-purecov], [configure to postprocess with pure coverage]), opt_purecov=$withval)
113
AC_ARG_WITH(purecov, AC_HELP_STRING([--with-purecov], [configure to postprocess with pure coverage]), opt_purecov=$withval)
113
AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
114
AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
115
AC_ARG_WITH(syslog, AC_HELP_STRING([--with-syslog], [additional logging via syslog]), opt_syslog=$withval)
116
117
if test "$opt_syslog" = yes; then
118
  AC_DEFINE(USE_SYSLOG)
119
fi
114
120
115
if test "$opt_bash_malloc" = yes; then
121
if test "$opt_bash_malloc" = yes; then
116
	MALLOC_TARGET=malloc
122
	MALLOC_TARGET=malloc
(-)./lib/readline/histexpand.c (-2 / +4 lines)
Lines 1220-1228 Link Here
1220
1220
1221
  if (only_printing)
1221
  if (only_printing)
1222
    {
1222
    {
1223
#if 0
1223
#     ifdef USE_SYSLOG
1224
      add_history (result, 1);
1225
#     else
1224
      add_history (result);
1226
      add_history (result);
1225
#endif
1227
#     endif
1226
      return (2);
1228
      return (2);
1227
    }
1229
    }
1228
1230
(-)./lib/readline/histfile.c (-1 / +6 lines)
Lines 262-268 Link Here
262
	  {
262
	  {
263
	    if (HIST_TIMESTAMP_START(line_start) == 0)
263
	    if (HIST_TIMESTAMP_START(line_start) == 0)
264
	      {
264
	      {
265
		add_history (line_start);
265
#		ifdef USE_SYSLOG
266
	          add_history (line_start,0); /* Ant: new 2nd arg means skip syslog */
267
#		else
268
		  add_history (line_start);  /* orig */
269
#		endif
270
266
		if (last_ts)
271
		if (last_ts)
267
		  {
272
		  {
268
		    add_history_time (last_ts);
273
		    add_history_time (last_ts);
(-)./lib/readline/history.c (+25 lines)
Lines 31-36 Link Here
31
31
32
#include <stdio.h>
32
#include <stdio.h>
33
33
34
#ifdef USE_SYSLOG
35
#	include <syslog.h>
36
#endif
37
34
#if defined (HAVE_STDLIB_H)
38
#if defined (HAVE_STDLIB_H)
35
#  include <stdlib.h>
39
#  include <stdlib.h>
36
#else
40
#else
Lines 246-255 Link Here
246
/* Place STRING at the end of the history list.  The data field
250
/* Place STRING at the end of the history list.  The data field
247
   is  set to NULL. */
251
   is  set to NULL. */
248
void
252
void
253
#ifdef USE_SYSLOG
254
add_history (string, logme)
255
     const char *string;
256
     int logme; /* 0 means no sending history to syslog */
257
#else
249
add_history (string)
258
add_history (string)
250
     const char *string;
259
     const char *string;
260
#endif
251
{
261
{
252
  HIST_ENTRY *temp;
262
  HIST_ENTRY *temp;
263
#ifdef USE_SYSLOG
264
  if (logme) {
265
    if (strlen(string)<600) {
266
      syslog(LOG_LOCAL5 | LOG_INFO, "HISTORY: PID=%d UID=%d %s",
267
        getpid(), getuid(), string);
268
    } 
269
    else {
270
      char trunc[600];
271
      strncpy(trunc,string,sizeof(trunc));
272
      trunc[sizeof(trunc)-1]='\0';
273
      syslog(LOG_LOCAL5, LOG_INFO, "HISTORY: PID=%d UID=%d %s(++TRUNC)",
274
          getpid(), getuid(), trunc);
275
    }
276
  }
277
#endif
253
278
254
  if (history_stifled && (history_length == history_max_entries))
279
  if (history_stifled && (history_length == history_max_entries))
255
    {
280
    {
(-)./lib/readline/history.h (-1 / +5 lines)
Lines 80-86 Link Here
80
80
81
/* Place STRING at the end of the history list.
81
/* Place STRING at the end of the history list.
82
   The associated data field (if any) is set to NULL. */
82
   The associated data field (if any) is set to NULL. */
83
extern void add_history PARAMS((const char *));
83
#ifdef USE_SYSLOG  /* kev added config time */
84
extern void add_history PARAMS((const char *, int )); /* Ant added arg */
85
#else
86
extern void add_history PARAMS((const char *)); 
87
#endif
84
88
85
/* Change the timestamp associated with the most recent history entry to
89
/* Change the timestamp associated with the most recent history entry to
86
   STRING. */
90
   STRING. */

Return to bug 91327