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

(-)file_not_specified_in_diff (-13 / +27 lines)
Line  Link Here
0
-- bashhist.c
0
++ bashhist.c
Lines 705-711 Link Here
705
{
705
{
706
  hist_last_line_added = 1;
706
  hist_last_line_added = 1;
707
  hist_last_line_pushed = 0;
707
  hist_last_line_pushed = 0;
708
  add_history (line);
708
  add_history (line, 1);
709
  history_lines_this_session++;
709
  history_lines_this_session++;
710
}
710
}
711
711
712
-- lib/readline/histexpand.c
712
++ lib/readline/histexpand.c
Lines 1222-1230 Link Here
1222
1222
1223
  if (only_printing)
1223
  if (only_printing)
1224
    {
1224
    {
1225
#if 0
1225
      add_history (result, 1);
1226
      add_history (result);
1227
#endif
1228
      return (2);
1226
      return (2);
1229
    }
1227
    }
1230
1228
1231
-- lib/readline/histfile.c
1229
++ lib/readline/histfile.c
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
		add_history (line_start,0);
266
		if (last_ts)
266
		if (last_ts)
267
		  {
267
		  {
268
		    add_history_time (last_ts);
268
		    add_history_time (last_ts);
269
-- lib/readline/history.c
269
++ lib/readline/history.c
Lines 31-36 Link Here
31
31
32
#include <stdio.h>
32
#include <stdio.h>
33
33
34
#include <syslog.h>
35
34
#if defined (HAVE_STDLIB_H)
36
#if defined (HAVE_STDLIB_H)
35
#  include <stdlib.h>
37
#  include <stdlib.h>
36
#else
38
#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
249
add_history (string)
253
add_history (string, logme)
250
     const char *string;
254
     const char *string;
255
     int logme; /* 0 means no sending history to syslog */
251
{
256
{
252
  HIST_ENTRY *temp;
257
  HIST_ENTRY *temp;
258
  if (logme) {
259
    if (strlen(string)<600) {
260
      syslog(LOG_LOCAL5 | LOG_INFO, "HISTORY: PID=%d UID=%d %s",
261
        getpid(), getuid(), string);
262
    }
263
    else {
264
      char trunc[600];
265
      strncpy(trunc,string,sizeof(trunc));
266
      trunc[sizeof(trunc)-1]='\0';
267
      syslog(LOG_LOCAL5 | LOG_INFO, "HISTORY: PID=%d UID=%d %s(++TRUNC)",
268
          getpid(), getuid(), trunc);
269
    }
270
  }
253
271
254
  if (history_stifled && (history_length == history_max_entries))
272
  if (history_stifled && (history_length == history_max_entries))
255
    {
273
    {
256
-- lib/readline/history.h
274
++ lib/readline/history.h
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
extern void add_history PARAMS((const char *, int ));
84
84
85
/* Change the timestamp associated with the most recent history entry to
85
/* Change the timestamp associated with the most recent history entry to
86
   STRING. */
86
   STRING. */

Return to bug 91327