Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1574418
 поиск   регистрация   авторизация 
 
Группа :: Система/Серверы
Пакет: pdnsd

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

Патч: pdnsd-1.2-alt-chroot_dir.patch


--- pdnsd-1.2~/src/conf-keywords.h	2004-08-31 20:21:44 +0000
+++ pdnsd-1.2/src/conf-keywords.h	2004-10-13 22:16:09 +0000
@@ -25,6 +25,7 @@ enum {
 	MAX_TTL,
 	MIN_TTL,
 	RUN_AS,
+	CHROOT_DIR,
 	STRICT_SETUID,
 	PARANOID,
 	STATUS_CTL,
@@ -99,6 +100,7 @@ static const namevalue_t section_headers
 /* table for looking up global options. Order alphabetically! */
 static const namevalue_t global_options[]= {
 	{"cache_dir",        CACHE_DIR},
+	{"chroot_dir",       CHROOT_DIR},
 	{"ctl_perms",        C_CTL_PERMS},
 	{"daemon",           DAEMON},
 	{"debug",            C_DEBUG},
--- pdnsd-1.2~/src/conf-parser.c	2004-10-06 20:31:27 +0000
+++ pdnsd-1.2/src/conf-parser.c	2004-10-13 22:15:37 +0000
@@ -477,6 +477,11 @@ int confparse(FILE* in, globparm_t *glob
 	    STRNCP(global->run_as, ps,len, "run_as");
 	    break;
 
+	  case CHROOT_DIR:
+	    SCAN_STRING(ps,p,len);
+	    STRNDUP(global->chroot_dir,ps,len);
+	    break;
+
 	  case STRICT_SETUID:
 	    ASSIGN_ON_OFF(global->strict_suid, p,C_ON,"bad qualifier in strict_setuid= option.");
 	    break;
--- pdnsd-1.2~/src/conff.c	2004-09-08 20:32:17 +0000
+++ pdnsd-1.2/src/conff.c	2004-10-13 22:17:53 +0000
@@ -60,6 +60,7 @@ globparm_t global={
   neg_domain_pol:    C_AUTH,
   verbosity:         VERBOSITY,
   run_as:            "",
+  chroot_dir:        NULL,
   daemon:            0,
   debug:             0,
   stat_pipe:         0,
--- pdnsd-1.2~/src/conff.h	2004-08-10 15:48:46 +0000
+++ pdnsd-1.2/src/conff.h	2004-10-13 22:15:37 +0000
@@ -105,6 +105,7 @@ typedef struct {
 	short         neg_domain_pol;
 	short         verbosity;
 	char          run_as[21];
+	char          *chroot_dir;
 	char          daemon;
 	char          debug;
 	char          stat_pipe;
 
design & coding: Vladimir Lettiev aka crux © 2004-2005