Репозитории ALT
S: | 1.6b15-alt1 |
5.1: | 1.5p6-alt1 |
4.1: | 1.5p5-alt3 |
4.0: | 1.5p5-alt3 |
3.0: | 1.5p4-alt1 |
Группа :: Система/Серверы
Пакет: mathopd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: mathopd-1.5p5-alt-pidfile.patch
Скачать
Скачать
--- mathopd-1.5p5/src/main.c.orig 2005-03-22 21:46:55 +0300
+++ mathopd-1.5p5/src/main.c 2005-09-07 16:19:56 +0400
@@ -235,6 +235,13 @@ int main(int argc, char *argv[])
if (chdir("/") == -1)
die("chdir", 0);
}
+ if (pid_filename) {
+ pid_fd = open(pid_filename, O_WRONLY | O_CREAT, 0600);
+ if (pid_fd == -1)
+ die("open", "Cannot open PID file");
+ } else {
+ pid_fd = -1;
+ }
setuid(geteuid());
if (geteuid() == 0) {
if (server_uid == 0)
@@ -265,12 +272,6 @@ int main(int argc, char *argv[])
}
setrlimit(RLIMIT_CORE, &rl);
umask(fcm);
- if (pid_filename) {
- pid_fd = open(pid_filename, O_WRONLY | O_CREAT, 0666);
- if (pid_fd == -1)
- die("open", "Cannot open PID file");
- } else
- pid_fd = -1;
current_time = time(0);
if (init_logs(tee) == -1)
die("open", "Cannot open log files");