aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2004-02-17 10:16:21 +0000
committerManuel Novoa III <mjn3@codepoet.org>2004-02-17 10:16:21 +0000
commit7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9 (patch)
tree996bc01958f230cac4aecae3f63431f32400d1f9
parentc2266bd51990883ff6f7de4a4ca22a4bef2050c9 (diff)
downloadbusybox-w32-7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9.tar.gz
busybox-w32-7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9.tar.bz2
busybox-w32-7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9.zip
Patch from Florian Schirmer <jolt@tuxbox.org>. When I rewrote the parser,
I overlooked the case of someone wanting to use a valid but empty suid config file.
-rw-r--r--applets/applets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/applets/applets.c b/applets/applets.c
index f24679a1a..8bb36dd6a 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -71,6 +71,7 @@ struct BB_suid_config
71}; 71};
72 72
73static struct BB_suid_config *suid_config; 73static struct BB_suid_config *suid_config;
74static int suid_cfg_readable;
74 75
75#endif /* CONFIG_FEATURE_SUID_CONFIG */ 76#endif /* CONFIG_FEATURE_SUID_CONFIG */
76 77
@@ -192,7 +193,7 @@ check_suid (struct BB_applet *applet)
192 uid_t rgid = getgid (); 193 uid_t rgid = getgid ();
193 194
194#ifdef CONFIG_FEATURE_SUID_CONFIG 195#ifdef CONFIG_FEATURE_SUID_CONFIG
195 if (suid_config) { 196 if (suid_cfg_readable) {
196 struct BB_suid_config *sct; 197 struct BB_suid_config *sct;
197 198
198 for (sct = suid_config; sct; sct = sct->m_next) { 199 for (sct = suid_config; sct; sct = sct->m_next) {
@@ -315,6 +316,7 @@ static void parse_config_file(void)
315 return; 316 return;
316 } 317 }
317 318
319 suid_cfg_readable = 1;
318 sct_head = NULL; 320 sct_head = NULL;
319 section = lc = 0; 321 section = lc = 0;
320 322