Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37814012
en ru br
Репозитории ALT
S:2.5.0-alt1
5.1: 2.4.4-alt12
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
www.altlinux.org/Changes

Группа :: Сети/Прочее
Пакет: ppp

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: ppp-2.4.1-pidfile-owner.patch
Скачать


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;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin