From 3aa4adbc0ff1ffca7e8fafeebaf2f4bdc00b78c5 Mon Sep 17 00:00:00 2001 From: hno <> Date: Tue, 15 Jan 2002 23:49:19 +0000 Subject: [PATCH] Changed my mint how to regain root privs when rereading the configuration. this is better placed in main.c. --- src/cache_cf.cc | 4 +--- src/main.cc | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cache_cf.cc b/src/cache_cf.cc index b40740e22d..a72d0696a0 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.cc,v 1.399 2002/01/15 16:26:41 hno Exp $ + * $Id: cache_cf.cc,v 1.400 2002/01/15 16:49:19 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -239,7 +239,6 @@ parseConfigFile(const char *file_name) int err_count = 0; configFreeMemory(); default_all(); - enter_suid(); if ((fp = fopen(file_name, "r")) == NULL) fatalf("Unable to open configuration file: %s: %s", file_name, xstrerror()); @@ -270,7 +269,6 @@ parseConfigFile(const char *file_name) safe_free(tmp_line); } fclose(fp); - leave_suid(); defaults_if_none(); configDoConfigure(); cachemgrRegister("config", diff --git a/src/main.cc b/src/main.cc index 777fa43a69..05e28aa006 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.346 2001/12/24 15:33:43 adrian Exp $ + * $Id: main.cc,v 1.347 2002/01/15 16:49:19 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -346,7 +346,9 @@ mainReconfigure(void) authenticateShutdown(); storeDirCloseSwapLogs(); errorClean(); + enter_suid(); /* root to read config file */ parseConfigFile(ConfigFile); + setEffectiveUser(); _db_init(Config.Log.log, Config.debugOptions); ipcache_restart(); /* clear stuck entries */ authenticateUserCacheRestart(); /* clear stuck ACL entries */ -- 2.47.3