Репозитории ALT
S: | 3.0.19-alt1.qa1 |
5.1: | 3.0.19-alt1 |
4.1: | 3.0.19-alt1 |
4.0: | 3.0.19-alt1 |
3.0: | 3.0.16-alt1.2 |
+updates: | 3.0.19-alt1 |
Группа :: Система/Серверы
Пакет: pidentd
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: pidentd-3.0.14-droproot.patch
Скачать
Скачать
diff -Naur pidentd-3.0.14.orig/src/main.c pidentd-3.0.14/src/main.c
--- pidentd-3.0.14.orig/src/main.c Fri Aug 31 12:20:34 2001
+++ pidentd-3.0.14/src/main.c Mon Dec 10 12:25:21 2001
@@ -95,7 +95,7 @@
{
if (server_uid == NO_UID)
{
- if (str2uid("nobody", &server_uid, &server_gid) < 0)
+ if (str2uid("pidentd", &server_uid, &server_gid) < 0)
server_uid = ROOT_UID;
}
@@ -128,7 +128,7 @@
int socket_type = -1;
int init_mode = 0;
int log_header = 0;
-
+ int xinetd = 0;
if (argv[0] != NULL)
{
@@ -200,6 +200,7 @@
case 'i':
listen_sock = STDIN_FILENO;
socket_type = SOCKTYPE_CONNECTED;
+ xinetd = 1;
break;
case 'I':
@@ -406,7 +407,7 @@
have different uid's... Luckily Linux doesn't need root to get at
the needed information anyway. */
#ifdef __linux__
- drop_root_privs();
+ if (!xinetd) drop_root_privs();
#endif
if (kernel_init() < 0)
@@ -418,7 +419,7 @@
}
#ifndef __linux__
- drop_root_privs();
+ if (!xinetd) drop_root_privs();
#endif
timeout_init();