/[packages]/cauldron/net-tools/current/SOURCES/net-tools-1.60-slattach-fchown.patch
ViewVC logotype

Contents of /cauldron/net-tools/current/SOURCES/net-tools-1.60-slattach-fchown.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 318 - (show annotations) (download)
Fri Jan 7 23:30:25 2011 UTC (13 years, 3 months ago) by tmb
File size: 803 byte(s)
imported package net-tools
1 diff -up net-tools-1.60/slattach.c.slattach-fchown net-tools-1.60/slattach.c
2 --- net-tools-1.60/slattach.c.slattach-fchown 2000-10-28 12:59:41.000000000 +0200
3 +++ net-tools-1.60/slattach.c 2009-09-15 18:17:01.000000000 +0200
4 @@ -195,15 +195,17 @@ tty_lock(char *path, int mode)
5 return(-1);
6 }
7
8 - (void) close(fd);
9 -
10 /* Make sure UUCP owns the lockfile. Required by some packages. */
11 if ((pw = getpwnam(_UID_UUCP)) == NULL) {
12 if (opt_q == 0) fprintf(stderr, _("slattach: tty_lock: UUCP user %s unknown!\n"),
13 _UID_UUCP);
14 + (void) close(fd);
15 return(0); /* keep the lock anyway */
16 }
17 - (void) chown(saved_path, pw->pw_uid, pw->pw_gid);
18 + (void) fchown(fd, pw->pw_uid, pw->pw_gid);
19 +
20 + (void) close(fd);
21 +
22 saved_lock = 1;
23 } else { /* unlock */
24 if (saved_lock != 1) return(0);

  ViewVC Help
Powered by ViewVC 1.1.30