diff -Nru bash-2.05b.orig/bashhist.c bash-2.05b.mod/bashhist.c
--- bash-2.05b.orig/bashhist.c	2002-03-12 16:29:56.000000000 +0100
+++ bash-2.05b.mod/bashhist.c	2003-05-31 00:03:37.000000000 +0200
@@ -654,7 +654,7 @@
      char *line;
 {
   hist_last_line_added = 1;
-  add_history (line);
+  add_history (line, 1);
   history_lines_this_session++;
 }
 
diff -Nru bash-2.05b.orig/lib/readline/histexpand.c bash-2.05b.mod/lib/readline/histexpand.c
--- bash-2.05b.orig/lib/readline/histexpand.c	2002-04-16 17:47:59.000000000 +0200
+++ bash-2.05b.mod/lib/readline/histexpand.c	2003-05-31 00:00:53.000000000 +0200
@@ -1160,7 +1160,8 @@
 
   if (only_printing)
     {
-      add_history (result);
+      /* Ant: new 2nd argument means do syslog */
+      add_history (result, 1);
       return (2);
     }
 
diff -Nru bash-2.05b.orig/lib/readline/histfile.c bash-2.05b.mod/lib/readline/histfile.c
--- bash-2.05b.orig/lib/readline/histfile.c	2002-03-26 15:00:26.000000000 +0100
+++ bash-2.05b.mod/lib/readline/histfile.c	2003-05-31 00:00:20.000000000 +0200
@@ -231,7 +231,8 @@
 	*line_end = '\0';
 
 	if (*line_start)
-	  add_history (line_start);
+    /* Ant: new 2nd argument means skip syslog */
+	  add_history (line_start, 0);
 
 	current_line++;
 
diff -Nru bash-2.05b.orig/lib/readline/history.c bash-2.05b.mod/lib/readline/history.c
--- bash-2.05b.orig/lib/readline/history.c	2002-03-12 17:27:34.000000000 +0100
+++ bash-2.05b.mod/lib/readline/history.c	2003-05-30 23:55:13.000000000 +0200
@@ -30,6 +30,7 @@
 #endif
 
 #include <stdio.h>
+#include <syslog.h>
 
 #if defined (HAVE_STDLIB_H)
 #  include <stdlib.h>
@@ -209,11 +210,27 @@
 /* Place STRING at the end of the history list.  The data field
    is  set to NULL. */
 void
-add_history (string)
+add_history (string, logme)
      const char *string;
+     int logme; /* 0 means no sending history to syslog */
 {
   HIST_ENTRY *temp;
 
+  if (logme) {
+      if (strlen(string) < 60)
+          syslog(LOG_INFO, "BASH2 HISTORY: PID = %d UID = %d %s", 
+                 getpid(), getuid(), string);
+      else {
+          char trunc[60];
+  
+          strncpy(trunc, string, sizeof(trunc));
+          trunc[sizeof(trunc) - 1] = '\0';
+          syslog(LOG_INFO, "BASH2 HISTORY: PID = %d UID = %d \
+                            %s(++TRUNC)", getpid(), getuid(), trunc);
+      }
+  }
+ 
+
   if (history_stifled && (history_length == history_max_entries))
     {
       register int i;
diff -Nru bash-2.05b.orig/lib/readline/history.h bash-2.05b.mod/lib/readline/history.h
--- bash-2.05b.orig/lib/readline/history.h	2001-08-22 15:37:23.000000000 +0200
+++ bash-2.05b.mod/lib/readline/history.h	2003-05-31 00:02:34.000000000 +0200
@@ -74,7 +74,7 @@
 
 /* Place STRING at the end of the history list.
    The associated data field (if any) is set to NULL. */
-extern void add_history PARAMS((const char *));
+extern void add_history PARAMS((const char *, int)); /* Added arg */
 
 /* A reasonably useless function, only here for completeness.  WHICH
    is the magic number that tells us which element to delete.  The

