diff options
author | Simo Sorce <idra@samba.org> | 2009-01-12 18:14:14 -0500 |
---|---|---|
committer | Simo Sorce <idra@samba.org> | 2009-01-12 18:27:53 -0500 |
commit | be1a20d965497c96b6cf1ca14832a30fa7c140b7 (patch) | |
tree | 60c94602cd9c562288d6d23255d499771bc3d1e1 /server/nss/nsssrv.c | |
parent | a62a56ec87ab81d2264900716972ec22bfb7b9d9 (diff) | |
download | sssd-be1a20d965497c96b6cf1ca14832a30fa7c140b7.tar.gz sssd-be1a20d965497c96b6cf1ca14832a30fa7c140b7.tar.bz2 sssd-be1a20d965497c96b6cf1ca14832a30fa7c140b7.zip |
Add checks to make sure we are getting a user from the correct domain.
Diffstat (limited to 'server/nss/nsssrv.c')
-rw-r--r-- | server/nss/nsssrv.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/nss/nsssrv.c b/server/nss/nsssrv.c index 0c7bf060..93a897a2 100644 --- a/server/nss/nsssrv.c +++ b/server/nss/nsssrv.c @@ -359,9 +359,12 @@ failed: return EIO; } +/* domain names are case insensitive for now + * NOTE: this function is not utf-8 safe, + * only ASCII names for now */ static int _domain_comparator(void *key1, void *key2) { - return strcmp((char *)key1, (char *)key2); + return strcasecmp((char *)key1, (char *)key2); } static int nss_init_domains(struct nss_ctx *nctx) @@ -397,6 +400,14 @@ static int nss_init_domains(struct nss_ctx *nctx) goto done; } + ret = confdb_get_string(nctx->cdb, nctx, + "config/domains", "default", + NULL, &nctx->default_domain); + if (ret != EOK) { + retval = ret; + goto done; + } + retval = EOK; done: |