ALT Linux repos
S: | 2.5.0-alt1 |
5.0: | 2.4.4-alt11 |
4.1: | 2.4.4-alt10.M41.1 |
4.0: | 2.4.4-alt10 |
+updates: | 2.4.4-alt10 |
3.0: | 2.4.2-alt6 |
+updates: | 2.4.2-alt6.M30.1 |
Group :: System/Servers
RPM: ppp
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: ppp-2.4.1-pidfile-owner.patch
Download
Download
diff -Naur ppp-2.4.1/pppd/main.c ppp-2.4.1-p/pppd/main.c
--- ppp-2.4.1/pppd/main.c Thu May 16 11:34:27 2002
+++ ppp-2.4.1-p/pppd/main.c Thu May 16 11:36:43 2002
@@ -795,6 +795,11 @@
if ((pidfile = fopen(pidfilename, "w")) != NULL) {
fprintf(pidfile, "%d\n", getpid());
(void) fclose(pidfile);
+ if (getuid() != geteuid()) {
+ if ((chown(pidfilename, getuid(), -1)) < 0) {
+ error("Failed to chown pid file %s: %m", pidfilename);
+ }
+ }
} else {
error("Failed to create pid file %s: %m", pidfilename);
pidfilename[0] = 0;
@@ -816,6 +821,11 @@
if (ifname[0])
fprintf(pidfile, "%s\n", ifname);
(void) fclose(pidfile);
+ if (getuid() != geteuid()) {
+ if ((chown(linkpidfile, getuid(), -1)) < 0) {
+ error("Failed to chown pid file %s: %m", linkpidfile);
+ }
+ }
} else {
error("Failed to create pid file %s: %m", linkpidfile);
linkpidfile[0] = 0;