summaryrefslogtreecommitdiff
path: root/applets/applets.c
diff options
context:
space:
mode:
authorManuel Novoa III2004-02-17 10:16:21 +0000
committerManuel Novoa III2004-02-17 10:16:21 +0000
commit7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9 (patch)
tree996bc01958f230cac4aecae3f63431f32400d1f9 /applets/applets.c
parentc2266bd51990883ff6f7de4a4ca22a4bef2050c9 (diff)
downloadbusybox-7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9.zip
busybox-7b565a0c8ae3c4b1fc982bd8a08bd303e87fd1a9.tar.gz
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.
Diffstat (limited to 'applets/applets.c')
-rw-r--r--applets/applets.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/applets/applets.c b/applets/applets.c
index f24679a..8bb36dd 100644
--- a/applets/applets.c
+++ b/applets/applets.c
@@ -71,6 +71,7 @@ struct BB_suid_config
};
static struct BB_suid_config *suid_config;
+static int suid_cfg_readable;
#endif /* CONFIG_FEATURE_SUID_CONFIG */
@@ -192,7 +193,7 @@ check_suid (struct BB_applet *applet)
uid_t rgid = getgid ();
#ifdef CONFIG_FEATURE_SUID_CONFIG
- if (suid_config) {
+ if (suid_cfg_readable) {
struct BB_suid_config *sct;
for (sct = suid_config; sct; sct = sct->m_next) {
@@ -315,6 +316,7 @@ static void parse_config_file(void)
return;
}
+ suid_cfg_readable = 1;
sct_head = NULL;
section = lc = 0;