1 diff -Naur ppp-2.4.1/pppd/main.c ppp-2.4.1-p/pppd/main.c
2 --- ppp-2.4.1/pppd/main.c Thu May 16 11:34:27 2002
3 +++ ppp-2.4.1-p/pppd/main.c Thu May 16 11:36:43 2002
5 if ((pidfile = fopen(pidfilename, "w")) != NULL) {
6 fprintf(pidfile, "%d\n", getpid());
7 (void) fclose(pidfile);
8 + if (getuid() != geteuid()) {
9 + if ((chown(pidfilename, getuid(), -1)) < 0) {
10 + error("Failed to chown pid file %s: %m", pidfilename);
14 error("Failed to create pid file %s: %m", pidfilename);
18 fprintf(pidfile, "%s\n", ifname);
19 (void) fclose(pidfile);
20 + if (getuid() != geteuid()) {
21 + if ((chown(linkpidfile, getuid(), -1)) < 0) {
22 + error("Failed to chown pid file %s: %m", linkpidfile);
26 error("Failed to create pid file %s: %m", linkpidfile);