From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-misc/cw/files/1.0.16-collision.patch | 34 ++++++++++++++++++++++++++ app-misc/cw/files/1.0.16-format-security.patch | 16 ++++++++++++ app-misc/cw/files/1.0.16-ldflags.patch | 18 ++++++++++++++ app-misc/cw/files/1.0.16-path.patch | 19 ++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 app-misc/cw/files/1.0.16-collision.patch create mode 100644 app-misc/cw/files/1.0.16-format-security.patch create mode 100644 app-misc/cw/files/1.0.16-ldflags.patch create mode 100644 app-misc/cw/files/1.0.16-path.patch (limited to 'app-misc/cw/files') diff --git a/app-misc/cw/files/1.0.16-collision.patch b/app-misc/cw/files/1.0.16-collision.patch new file mode 100644 index 000000000000..52bb8cab8f3b --- /dev/null +++ b/app-misc/cw/files/1.0.16-collision.patch @@ -0,0 +1,34 @@ +diff --git a/src/cw.c b/src/cw.c +index d7b4875..a7811d8 100644 +--- a/src/cw.c ++++ b/src/cw.c +@@ -1336,7 +1336,7 @@ unsigned char is_cwfile(char *file){ + s=strlen(buf); + if(buf[s]=='\n')s--; + if(buf[s]=='\r')s--; +- if(s>4&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-4),"/cw",3))return(1); ++ if(s>15&&!strncmp(buf,"#!",2)&&!strncmp(buf+(s-15),"/color-wrapper",14))return(1); + return(0); + } + /* sets left and right borders. */ +diff --git a/src/cwu.c b/src/cwu.c +index 823618d..63f566b 100644 +--- a/src/cwu.c ++++ b/src/cwu.c +@@ -37,12 +37,12 @@ signed int main(signed int argc,char **argv){ + if(argc>1&&!strcmp(argv[1],"-v")) + cwuexit(1,"cwu (color wrapper directive updater) v"VERSION); + if(argc<2) +- cwuexit(1,"syntax: cwu "); ++ cwuexit(1,"syntax: cwu "); + if(argc<3)cwuexit(1,"no path provided to update with."); +- if(strncmp(argv[2]+(strlen(argv[2])-3),"/cw",3)) +- cwuexit(1,"cw binary path doesn't end with `/cw'."); ++ if(strncmp(argv[2]+(strlen(argv[2])-14),"/color-wrapper",14)) ++ cwuexit(1,"cw binary path doesn't end with `/color-wrapper'."); + if(access(argv[2],X_OK)) +- cwuexit(1,"cw binary does not exist or is not executable."); ++ cwuexit(1,"color-wrapper binary does not exist or is not executable."); + globcw(argv[1],argv[2]); + cwuexit(0,0); + exit(0); diff --git a/app-misc/cw/files/1.0.16-format-security.patch b/app-misc/cw/files/1.0.16-format-security.patch new file mode 100644 index 000000000000..20f0b1d06b1e --- /dev/null +++ b/app-misc/cw/files/1.0.16-format-security.patch @@ -0,0 +1,16 @@ + src/cw.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cw.c b/src/cw.c +index d7b4875..3ec1ac1 100644 +--- a/src/cw.c ++++ b/src/cw.c +@@ -643,7 +643,7 @@ void sighandler(signed int sig){ + else if(sig==SIGUSR1)ext=1; + else if(sig==SIGALRM)ext=2; + else if(sig==SIGPIPE||sig==SIGINT){ +- fprintf(stderr,pal2[16]); ++ fprintf(stderr,"%s", pal2[16]); + fflush(stderr); + cwexit(0,0); + } diff --git a/app-misc/cw/files/1.0.16-ldflags.patch b/app-misc/cw/files/1.0.16-ldflags.patch new file mode 100644 index 000000000000..46037312c6c3 --- /dev/null +++ b/app-misc/cw/files/1.0.16-ldflags.patch @@ -0,0 +1,18 @@ +diff --git a/Makefile.in b/Makefile.in +index 9a6e4ec..e510493 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -19,11 +19,11 @@ all: + + cw: + @$(ECHO) "* Compiling cw(color wrapper)..." +- @$(CC) src/cw.c -o bin/cw @CFLAGS@ @LIBS@ @DEFS@ ++ $(CC) $(CFLAGS) $(LDFLAGS) src/cw.c -o bin/cw @CFLAGS@ @LIBS@ @DEFS@ + + cwu: + @$(ECHO) "* Compiling cwu(color wrapper directive updater)..." +- @$(CC) src/cwu.c -o bin/cwu @CFLAGS@ ++ $(CC) $(CFLAGS) $(LDFLAGS) src/cwu.c -o bin/cwu + + local: cw cwu + diff --git a/app-misc/cw/files/1.0.16-path.patch b/app-misc/cw/files/1.0.16-path.patch new file mode 100644 index 000000000000..f62b5bd994d4 --- /dev/null +++ b/app-misc/cw/files/1.0.16-path.patch @@ -0,0 +1,19 @@ +diff --git a/bin/colorcfg b/bin/colorcfg +index cf73b50..3e78c73 100755 +--- a/bin/colorcfg ++++ b/bin/colorcfg +@@ -10,13 +10,7 @@ echo "[ cw/color wrapper: user setup script. ]" + if test -x "${HOME}/.cw/bin/colorcfg";then + CWLIB="${HOME}/.cw/def" + else +- SED="`which sed 2>/dev/null`" +- if test -z "$SED";then +- CWLIB="/usr/local/lib/cw" +- echo "(NOTE: using static cw library path, this could be invalid)" +- else +- CWLIB="`echo \"$0/lib/cw\"|sed \"s/\/bin\/colorcfg//g\"`" +- fi ++ CWLIB="/usr/libexec/cw" + fi + + echo "[ cw library path: $CWLIB ]" -- cgit v1.2.3