diff options
author | John Helmert III <jchelmert3@posteo.net> | 2020-07-30 14:08:10 -0500 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2020-12-21 02:55:33 +0100 |
commit | 20a6be318ebc738b8ca0fb36e01499035277f39d (patch) | |
tree | f43a9e374276a948efe8f5fb10fcd99a615cd8c9 /sys-libs/readline/files | |
parent | app-admin/puppet-agent: Drop <6.17 for readline cleanup (diff) | |
download | gentoo-20a6be318ebc738b8ca0fb36e01499035277f39d.tar.gz gentoo-20a6be318ebc738b8ca0fb36e01499035277f39d.tar.bz2 gentoo-20a6be318ebc738b8ca0fb36e01499035277f39d.zip |
sys-libs/readline: Security cleanup (drop <8)
Bug: https://bugs.gentoo.org/717924
Package-Manager: Portage-3.0.1, Repoman-2.3.23
Signed-off-by: John Helmert III <jchelmert3@posteo.net>
Closes: https://github.com/gentoo/gentoo/pull/16911
Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'sys-libs/readline/files')
4 files changed, 0 insertions, 246 deletions
diff --git a/sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch b/sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch deleted file mode 100644 index 23d785054e75..000000000000 --- a/sys-libs/readline/files/readline-6.3-fix-long-prompt-vi-search.patch +++ /dev/null @@ -1,26 +0,0 @@ -https://lists.gnu.org/archive/html/bug-bash/2014-08/msg00082.html - -From 2774192e93991e3d85ccc37c714aa018e442af6d Mon Sep 17 00:00:00 2001 -From: Dylan Cali <calid1984@gmail.com> -Date: Sat, 23 Aug 2014 02:26:05 -0500 -Subject: [PATCH] fix vi search prompt bug for long prompts - ---- - display.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/display.c b/display.c -index 4df1f73..e575b16 100644 ---- a/display.c -+++ b/display.c -@@ -2259,7 +2259,7 @@ rl_message (va_alist) - va_start (args); - format = va_arg (args, char *); - #endif -- vsnprintf (msg_buf, msg_bufsiz - 1, format, args); -+ vsnprintf (msg_buf, msg_bufsiz, format, args); - } - #else - vsprintf (msg_buf, format, args); --- -1.7.10.4 diff --git a/sys-libs/readline/files/readline-6.3-read-eof.patch b/sys-libs/readline/files/readline-6.3-read-eof.patch deleted file mode 100644 index f74aad63be1f..000000000000 --- a/sys-libs/readline/files/readline-6.3-read-eof.patch +++ /dev/null @@ -1,54 +0,0 @@ -http://lists.gnu.org/archive/html/bug-bash/2014-12/msg00152.html - -*** ../bash-4.3-patched/lib/readline/readline.c 2014-10-01 13:08:28.000000000 -0400 ---- lib/readline/readline.c 2014-12-20 22:37:28.000000000 -0500 -*************** -*** 580,592 **** - } - -! /* EOF typed to a non-blank line is a <NL>. If we want to change this, -! to force any existing line to be ignored when read(2) reads EOF, -! for example, this is the place to change. */ - if (c == EOF && rl_end) -! c = NEWLINE; - - /* The character _rl_eof_char typed to blank line, and not as the -! previous character is interpreted as EOF. */ -! if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end) - { - #if defined (READLINE_CALLBACKS) ---- 587,620 ---- - } - -! /* EOF typed to a non-blank line is ^D the first time, EOF the second -! time in a row. This won't return any partial line read from the tty. -! If we want to change this, to force any existing line to be returned -! when read(2) reads EOF, for example, this is the place to change. */ - if (c == EOF && rl_end) -! { -! if (RL_SIG_RECEIVED ()) -! { -! RL_CHECK_SIGNALS (); -! if (rl_signal_event_hook) -! (*rl_signal_event_hook) (); /* XXX */ -! } -! -! /* XXX - reading two consecutive EOFs returns EOF */ -! if (RL_ISSTATE (RL_STATE_TERMPREPPED)) -! { -! if (lastc == _rl_eof_char || lastc == EOF) -! rl_end = 0; -! else -! c = _rl_eof_char; -! } -! else -! c = NEWLINE; -! } - - /* The character _rl_eof_char typed to blank line, and not as the -! previous character is interpreted as EOF. This doesn't work when -! READLINE_CALLBACKS is defined, so hitting a series of ^Ds will -! erase all the chars on the line and then return EOF. */ -! if (((c == _rl_eof_char && lastc != c) || c == EOF) && rl_end == 0) - { - #if defined (READLINE_CALLBACKS) diff --git a/sys-libs/readline/files/readline-7.0-mingw.patch b/sys-libs/readline/files/readline-7.0-mingw.patch deleted file mode 100644 index f003038d2c0f..000000000000 --- a/sys-libs/readline/files/readline-7.0-mingw.patch +++ /dev/null @@ -1,152 +0,0 @@ ---- a/colors.c -+++ b/colors.c -@@ -37,6 +37,10 @@ - #include "posixstat.h" // stat related macros (S_ISREG, ...) - #include <fcntl.h> // S_ISUID - -+#ifndef S_ISDIR -+#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -+#endif -+ - // strlen() - #if defined (HAVE_STRING_H) - # include <string.h> -@@ -182,12 +186,17 @@ _rl_print_color_indicator (const char *f - if (S_ISREG (mode)) - { - colored_filetype = C_FILE; -- -+#ifdef S_ISUID - if ((mode & S_ISUID) != 0 && is_colored (C_SETUID)) - colored_filetype = C_SETUID; -- else if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) -+ else -+#endif -+#ifdef S_ISGID -+ if ((mode & S_ISGID) != 0 && is_colored (C_SETGID)) - colored_filetype = C_SETGID; -- else if (is_colored (C_CAP) && 0) //f->has_capability) -+ else -+#endif -+ if (is_colored (C_CAP) && 0) //f->has_capability) - colored_filetype = C_CAP; - else if ((mode & S_IXUGO) != 0 && is_colored (C_EXEC)) - colored_filetype = C_EXEC; -@@ -211,12 +220,16 @@ _rl_print_color_indicator (const char *f - colored_filetype = C_STICKY; - #endif - } -+#if defined (S_ISLNK) - else if (S_ISLNK (mode)) - colored_filetype = C_LINK; -+#endif - else if (S_ISFIFO (mode)) - colored_filetype = C_FIFO; -+#if defined (S_ISSOCK) - else if (S_ISSOCK (mode)) - colored_filetype = C_SOCK; -+#endif - else if (S_ISBLK (mode)) - colored_filetype = C_BLK; - else if (S_ISCHR (mode)) ---- a/histfile.c -+++ b/histfile.c -@@ -606,12 +606,14 @@ history_truncate_file (fname, lines) - history_lines_written_to_file = 0; - } - -+#if defined (HAVE_CHOWN) - /* Make sure the new filename is owned by the same user as the old. If one - user is running this, it's a no-op. If the shell is running after sudo - with a shared history file, we don't want to leave the history file - owned by root. */ - if (rv == 0 && exists) - r = chown (filename, finfo.st_uid, finfo.st_gid); -+#endif - - xfree (filename); - FREE (tempname); -@@ -753,12 +755,14 @@ mmap_error: - history_lines_written_to_file = 0; - } - -+#if defined (HAVE_CHOWN) - /* Make sure the new filename is owned by the same user as the old. If one - user is running this, it's a no-op. If the shell is running after sudo - with a shared history file, we don't want to leave the history file - owned by root. */ - if (rv == 0 && exists) - mode = chown (histname, finfo.st_uid, finfo.st_gid); -+#endif - - FREE (histname); - FREE (tempname); ---- a/input.c -+++ b/input.c -@@ -71,6 +71,10 @@ extern int errno; - #include "rlshell.h" - #include "xmalloc.h" - -+#if defined (__MINGW32__) -+#include <conio.h> -+#endif -+ - /* What kind of non-blocking I/O do we have? */ - #if !defined (O_NDELAY) && defined (O_NONBLOCK) - # define O_NDELAY O_NONBLOCK /* Posix style */ ---- a/posixstat.h -+++ b/posixstat.h -@@ -78,30 +78,44 @@ - - #if defined (S_IFBLK) && !defined (S_ISBLK) - #define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */ -+#elif !defined (S_IFBLK) -+#define S_ISBLK(m) 0 - #endif - - #if defined (S_IFCHR) && !defined (S_ISCHR) - #define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */ -+#elif !defined (S_IFCHR) -+#define S_ISCHR(m) 0 - #endif - - #if defined (S_IFDIR) && !defined (S_ISDIR) - #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */ -+#elif !defined (S_IFDIR) -+#define S_ISDIR(m) 0 - #endif - - #if defined (S_IFREG) && !defined (S_ISREG) - #define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */ -+#elif !defined (S_IFREG) -+#define S_ISREG(m) 0 - #endif - - #if defined (S_IFIFO) && !defined (S_ISFIFO) - #define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */ -+#elif !defined (S_IFIFO) -+#define S_ISFIFO(m) 0 - #endif - - #if defined (S_IFLNK) && !defined (S_ISLNK) - #define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */ -+#elif !defined (S_IFLNK) -+#define S_ISLNK(m) 0 - #endif - - #if defined (S_IFSOCK) && !defined (S_ISSOCK) - #define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */ -+#elif !defined (S_IFSOCK) -+#define S_ISSOCK(m) 0 - #endif - - /* -@@ -137,6 +151,8 @@ - /* These are non-standard, but are used in builtins.c$symbolic_umask() */ - #define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH) - #define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH) -+#if defined(S_IXUSR) && defined(S_IXOTH) - #define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) -+#endif - - #endif /* _POSIXSTAT_H_ */ diff --git a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch b/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch deleted file mode 100644 index cad3c8ca2c44..000000000000 --- a/sys-libs/readline/files/readline-7.0-missing-echo-proto.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://lists.gnu.org/archive/html/bug-readline/2016-11/msg00000.html - -fix from upstream - ---- a/readline.h -+++ b/readline.h -@@ -413,6 +413,7 @@ - extern void rl_tty_set_default_bindings PARAMS((Keymap)); - extern void rl_tty_unset_default_bindings PARAMS((Keymap)); - -+extern int rl_tty_set_echoing PARAMS((int)); - extern int rl_reset_terminal PARAMS((const char *)); - extern void rl_resize_terminal PARAMS((void)); - extern void rl_set_screen_size PARAMS((int, int)); |