]> git.pld-linux.org Git - packages/dip.git/blame - dip-3.3.7o-suffix.patch
- dropped pre-cvs changelog
[packages/dip.git] / dip-3.3.7o-suffix.patch
CommitLineData
e4270eee
JR
1--- dip-3.3.7o/main.c.orig Wed Aug 28 16:50:42 1996
2+++ dip-3.3.7o/main.c Wed Aug 28 16:55:13 1996
3@@ -428,7 +428,6 @@
4 strncpy(path, argv[optind], sizeof(path) - sizeof(DIP_SFX) + 1);
5 if ((sp = strrchr(path, '/')) != (char *)NULL) sp++;
6 else sp = path;
7- if (strchr(sp, '.') == (char *)NULL) strcat(path, DIP_SFX);
8
9 /* set euid to ruid */
10 if (setreuid(geteuid(), getuid()) != 0){
11@@ -438,8 +437,11 @@
12 }
13 /* open file with real uid */
14 if ((fp = fopen(path, "r")) == (FILE *)NULL) {
15- fprintf(stderr, "dip: %s: %s\n", path, strerror(errno));
16- exit(-1);
17+ if (strchr(sp, '.') == (char *)NULL) strcat(path, DIP_SFX);
18+ if ((fp = fopen(path, "r")) == (FILE *)NULL) {
19+ fprintf(stderr, "dip: %s: %s\n", path, strerror(errno));
20+ exit(-1);
21+ }
22 }
23 /* set uids back */
24 if (setreuid(geteuid(), getuid()) != 0){
This page took 0.047391 seconds and 4 git commands to generate.