]> git.ipfire.org Git - thirdparty/readline.git/commitdiff
commit readline-20150918 snapshot
authorChet Ramey <chet.ramey@case.edu>
Mon, 21 Sep 2015 20:35:45 +0000 (16:35 -0400)
committerChet Ramey <chet.ramey@case.edu>
Mon, 21 Sep 2015 20:35:45 +0000 (16:35 -0400)
config.h.in
configure
configure.ac
kill.c
readline.c
rlconf.h
util.c

index e5658c218e8a40d896ede134e5dadb8944000c13..d03ebe00844d2d602d254b2b6441df74985b7af0 100644 (file)
 /* Define if you have the <langinfo.h> header file.  */
 #undef HAVE_LANGINFO_H
 
+/* Define if you have the <libaudit.h> header file.  */
+#undef HAVE_LIBAUDIT_H
+
 /* Define if you have the <limits.h> header file.  */
 #undef HAVE_LIMITS_H
 
index 655a451ab8d891bf6681b2b44f78f4ef9feb11fa..d200b96af99556cabc6204055b5f9abc2dc48d18 100755 (executable)
--- a/configure
+++ b/configure
@@ -5862,6 +5862,18 @@ $as_echo "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h
 fi
 
 
+for ac_header in libaudit.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
+if test "x$ac_cv_header_libaudit_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAUDIT_H 1
+_ACEOF
+
+fi
+
+done
+
 ac_fn_c_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h>
 "
 if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes; then :
index 64f33865b46b55d51c2d9ce10d0cc90a115c547a..27a9a026d0a61367b70670991275231585e82c59 100644 (file)
@@ -176,6 +176,7 @@ BASH_STRUCT_WINSIZE
 BASH_STRUCT_DIRENT_D_INO
 BASH_STRUCT_DIRENT_D_FILENO
 
+AC_CHECK_HEADERS(libaudit.h)
 AC_CHECK_DECLS([AUDIT_USER_TTY],,, [[#include <linux/audit.h>]])
 
 dnl yuck
diff --git a/kill.c b/kill.c
index 166302cfa0d98e4f5a060bf0e097d2116ed4b987..7a0708cb066bf48cebf35d446c1236cae289e665 100644 (file)
--- a/kill.c
+++ b/kill.c
@@ -97,7 +97,7 @@ _rl_copy_to_kill_ring (text, append)
   int slot;
 
   /* First, find the slot to work with. */
-  if (_rl_last_command_was_kill == 0)
+  if (_rl_last_command_was_kill == 0 || rl_kill_ring == 0)
     {
       /* Get a new slot.  */
       if (rl_kill_ring == 0)
index 332b8cb8f64ffcbac79efd0f40b872233f489d2d..6f30e3deb194c585a2957a99a3e397963cfb8b88 100644 (file)
@@ -386,7 +386,7 @@ readline (prompt)
     RL_SETSTATE (RL_STATE_CALLBACK);
 #endif
 
-#if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)
+#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT)
   if (value)
     _rl_audit_tty (value);
 #endif
index fa528355cf00393890de1f665dd0ecc95eb462d0..82fd0de104a653c8246ab479a3f85ec72aa81a60 100644 (file)
--- a/rlconf.h
+++ b/rlconf.h
@@ -64,7 +64,7 @@
 
 /* Define this if you want to enable code that talks to the Linux kernel
    tty auditing system. */
-#define ENABLE_TTY_AUDIT_SUPPORT
+/* #define ENABLE_TTY_AUDIT_SUPPORT */
 
 /* Defaults for the various editing mode indicators, inserted at the beginning
    of the last (maybe only) line of the prompt if show-mode-in-prompt is on */
diff --git a/util.c b/util.c
index b253f08c4475a8f69ca317569bd2903f6b07b79c..4840494b04df9d16373c252f11140001bb6b0af2 100644 (file)
--- a/util.c
+++ b/util.c
@@ -549,7 +549,7 @@ _rl_settracefp (fp)
 #endif /* DEBUG */
 
 
-#if HAVE_DECL_AUDIT_USER_TTY && defined (ENABLE_TTY_AUDIT_SUPPORT)
+#if HAVE_DECL_AUDIT_USER_TTY && defined (HAVE_LIBAUDIT_H) && defined (ENABLE_TTY_AUDIT_SUPPORT)
 #include <sys/socket.h>
 #include <libaudit.h>
 #include <linux/audit.h>