]> git.pld-linux.org Git - packages/compat-ncurses5.git/blame - ncurses-setuid.patch
patch from rawhide bud with fiew corrections:
[packages/compat-ncurses5.git] / ncurses-setuid.patch
CommitLineData
99e0e4e6 1diff -Nur ncurses-4.2/ncurses/tinfo/read_termcap.c ncurses-4.2.orig/ncurses/tinfo/read_termcap.c
2--- ncurses-4.2/ncurses/tinfo/read_termcap.c Tue Dec 8 20:47:42 1998
3+++ ncurses-4.2.orig/ncurses/tinfo/read_termcap.c Tue Dec 8 20:47:13 1998
4@@ -1039,8 +1039,11 @@
5 for (i = 0; i < filecount; i++) {
6
7 T(("Looking for %s in %s", tn, termpaths[i]));
8- if ((fp = fopen(termpaths[i], "r")) != (FILE *)0)
9+ if ((_nc_access(termpaths[i], R_OK) < 0)
10+ || (fp = fopen(termpaths[i], "r")) == (FILE *)0)
11 {
12+ T(("Could not open %s (error %d)", termpaths[i], errno));
13+ } else {
14 _nc_set_source(termpaths[i]);
15
16 /*
This page took 0.070859 seconds and 4 git commands to generate.