diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2006-11-26 12:01:49 +0000 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2006-11-26 12:01:49 +0000 |
commit | 16be7ee5d30c8bce08f32563c4fa846a6928aed4 (patch) | |
tree | c733f223e6bf7a008991307dd30999a7df3aa110 /server/util.c | |
parent | 70f10e2b6c10e7e47ab3377854e61a4534af79fb (diff) |
get rid of automount map information lookups through NSS as this is not used (at least not with glibc), autofs-ldap looks up the information on it's own (but does parse /etc/nsswitch.conf)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/libnss_ldapd@124 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'server/util.c')
-rw-r--r-- | server/util.c | 75 |
1 files changed, 36 insertions, 39 deletions
diff --git a/server/util.c b/server/util.c index 6372c1f..cfe19b2 100644 --- a/server/util.c +++ b/server/util.c @@ -435,6 +435,42 @@ do_getrdnvalue (const char *dn, return NSS_STATUS_NOTFOUND; } +static enum ldap_map_selector +_nss_ldap_str2selector (const char *key) +{ + enum ldap_map_selector sel; + + if (!strcasecmp (key, MP_passwd)) + sel = LM_PASSWD; + else if (!strcasecmp (key, MP_shadow)) + sel = LM_SHADOW; + else if (!strcasecmp (key, MP_group)) + sel = LM_GROUP; + else if (!strcasecmp (key, MP_hosts)) + sel = LM_HOSTS; + else if (!strcasecmp (key, MP_services)) + sel = LM_SERVICES; + else if (!strcasecmp (key, MP_networks)) + sel = LM_NETWORKS; + else if (!strcasecmp (key, MP_protocols)) + sel = LM_PROTOCOLS; + else if (!strcasecmp (key, MP_rpc)) + sel = LM_RPC; + else if (!strcasecmp (key, MP_ethers)) + sel = LM_ETHERS; + else if (!strcasecmp (key, MP_netmasks)) + sel = LM_NETMASKS; + else if (!strcasecmp (key, MP_bootparams)) + sel = LM_BOOTPARAMS; + else if (!strcasecmp (key, MP_aliases)) + sel = LM_ALIASES; + else if (!strcasecmp (key, MP_netgroup)) + sel = LM_NETGROUP; + else + sel = LM_NONE; + return sel; +} + static enum nss_status do_parse_map_statement (struct ldap_config * cfg, const char *statement, enum ldap_map_type type) @@ -530,45 +566,6 @@ do_parse_list (char *values, char ***valptr, return NSS_STATUS_SUCCESS; } -enum ldap_map_selector -_nss_ldap_str2selector (const char *key) -{ - enum ldap_map_selector sel; - - if (!strcasecmp (key, MP_passwd)) - sel = LM_PASSWD; - else if (!strcasecmp (key, MP_shadow)) - sel = LM_SHADOW; - else if (!strcasecmp (key, MP_group)) - sel = LM_GROUP; - else if (!strcasecmp (key, MP_hosts)) - sel = LM_HOSTS; - else if (!strcasecmp (key, MP_services)) - sel = LM_SERVICES; - else if (!strcasecmp (key, MP_networks)) - sel = LM_NETWORKS; - else if (!strcasecmp (key, MP_protocols)) - sel = LM_PROTOCOLS; - else if (!strcasecmp (key, MP_rpc)) - sel = LM_RPC; - else if (!strcasecmp (key, MP_ethers)) - sel = LM_ETHERS; - else if (!strcasecmp (key, MP_netmasks)) - sel = LM_NETMASKS; - else if (!strcasecmp (key, MP_bootparams)) - sel = LM_BOOTPARAMS; - else if (!strcasecmp (key, MP_aliases)) - sel = LM_ALIASES; - else if (!strcasecmp (key, MP_netgroup)) - sel = LM_NETGROUP; - else if (!strcasecmp (key, MP_automount)) - sel = LM_AUTOMOUNT; - else - sel = LM_NONE; - - return sel; -} - static enum nss_status do_searchdescriptorconfig (const char *key, const char *value, size_t len, struct ldap_service_search_descriptor ** result, |