diff options
| author | mjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-02-17 10:16:21 +0000 |
|---|---|---|
| committer | mjn3 <mjn3@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2004-02-17 10:16:21 +0000 |
| commit | ca08288ad9888fcdb2dc2ebf1510bb52669bdbc7 (patch) | |
| tree | 996bc01958f230cac4aecae3f63431f32400d1f9 | |
| parent | 822f5bcf861e05384d56300a10f46ea6e614dd13 (diff) | |
| download | busybox-w32-ca08288ad9888fcdb2dc2ebf1510bb52669bdbc7.tar.gz busybox-w32-ca08288ad9888fcdb2dc2ebf1510bb52669bdbc7.tar.bz2 busybox-w32-ca08288ad9888fcdb2dc2ebf1510bb52669bdbc7.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.
git-svn-id: svn://busybox.net/trunk/busybox@8494 69ca8d6d-28ef-0310-b511-8ec308f3f277
| -rw-r--r-- | applets/applets.c | 4 |
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 | ||
| 73 | static struct BB_suid_config *suid_config; | 73 | static struct BB_suid_config *suid_config; |
| 74 | static 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 | ||
