Группа :: Безопасность/Сети
Пакет: 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);