Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37820034
en ru br
Репозитории ALT
S:1.0.6-alt2
5.1: 1.0.5-alt3
4.0: 1.0.5-alt0.M40.1
www.altlinux.org/Changes

Группа :: Безопасность/Сети
Пакет: sshutout

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

Патч: sshutout-1.0.5-alt-open.patch
Скачать


diff -Naur sshutout-1.0.5-orig/sshutout.c sshutout-1.0.5/sshutout.c
--- sshutout-1.0.5-orig/sshutout.c	2007-12-31 04:19:26 +0200
+++ sshutout-1.0.5/sshutout.c	2008-11-05 17:27:43 +0200
@@ -1292,7 +1292,7 @@
 
 		        while (isspace(*p)) p++;	/* flush leading whitespace */
                         if (!strcmp(pid_file, p)) continue;
-		        if ((pf = open(p, O_WRONLY | O_CREAT | O_EXCL)) == -1) {
+		        if ((pf = open(p, O_WRONLY | O_CREAT | O_EXCL, 0)) == -1) {
         			Syslog(LOG_ERR, "Either there is a stale PID file: %s,"
                                 	"or another instance of the daemon is running.\n", p);
 		        }
@@ -1631,7 +1631,7 @@
         }
 
 	/* Prevent more than one instance of the daemon from running. */
-        if ((p = open(pid_file, O_WRONLY | O_CREAT | O_EXCL)) == -1) {
+        if ((p = open(pid_file, O_WRONLY | O_CREAT | O_EXCL, 0)) == -1) {
         	fprintf(stderr, "Either there is a stale PID file: \"%s\",\n"
                                 "or another instance of the daemon is running.\n", pid_file);
                 exit(1);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin