diff options
author | Günther Deschner <gdeschner@redhat.com> | 2012-05-30 17:26:10 +0200 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-05-31 18:30:25 -0400 |
commit | 95596fb8fac8e94eccdcde087d4972cd82b21903 (patch) | |
tree | 79c2d75d87ae4e3caa5aa2a5afd386376590af0d /proxy/src | |
parent | 375ed9210ce229ed05e38f92b86488787a60edd7 (diff) | |
download | gss-proxy-95596fb8fac8e94eccdcde087d4972cd82b21903.tar.gz gss-proxy-95596fb8fac8e94eccdcde087d4972cd82b21903.tar.xz gss-proxy-95596fb8fac8e94eccdcde087d4972cd82b21903.zip |
add option_is_set() helper function for config parsing.
Guenther
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'proxy/src')
-rw-r--r-- | proxy/src/gp_config.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/proxy/src/gp_config.c b/proxy/src/gp_config.c index bae52e1..384f0a4 100644 --- a/proxy/src/gp_config.c +++ b/proxy/src/gp_config.c @@ -79,6 +79,18 @@ static int get_int_value(dictionary *dict, return ret; } +static bool option_is_set(const char *s) +{ + if (strcasecmp(s, "1") == 0 || + strcasecmp(s, "on") == 0 || + strcasecmp(s, "true") == 0 || + strcasecmp(s, "yes")) { + return true; + } + + return false; +} + static int get_krb5_mech_cfg(struct gp_service *svc, dictionary *dict, const char *secname) |