diff options
author | Sumit Bose <sbose@redhat.com> | 2009-08-21 16:54:48 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-08-21 12:55:43 -0400 |
commit | c1410419224a504954791dbfd36fd19ad78cfb65 (patch) | |
tree | 6743909accd5fe9da6b2f0632e9b162ca8fae0bc /server/responder/nss/nsssrv.c | |
parent | bd3d8fc1d59837f3c80de22780c146c43b2eb45d (diff) | |
download | sssd-c1410419224a504954791dbfd36fd19ad78cfb65.tar.gz sssd-c1410419224a504954791dbfd36fd19ad78cfb65.tar.bz2 sssd-c1410419224a504954791dbfd36fd19ad78cfb65.zip |
fix handling of filtersUsers in groups
- with the boolean option filterUsersInGroups it can be controlled
wether filtered users appear in groups or not.
- fixed an error which prevented the display of groups with filtered
members
- removed some tab indents
Diffstat (limited to 'server/responder/nss/nsssrv.c')
-rw-r--r-- | server/responder/nss/nsssrv.c | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/server/responder/nss/nsssrv.c b/server/responder/nss/nsssrv.c index a896ef31..ad804389 100644 --- a/server/responder/nss/nsssrv.c +++ b/server/responder/nss/nsssrv.c @@ -102,6 +102,11 @@ static int nss_get_config(struct nss_ctx *nctx, &nctx->neg_timeout); if (ret != EOK) goto done; + ret = confdb_get_bool(cdb, nctx, NSS_SRV_CONFIG, + "filterUsersInGroups", true, + &nctx->filter_users_in_groups); + if (ret != EOK) goto done; + ret = confdb_get_string_as_list(cdb, tmpctx, NSS_SRV_CONFIG, "filterUsers", &filter_list); if (ret == ENOENT) filter_list = NULL; @@ -293,24 +298,24 @@ int main(int argc, const char *argv[]) struct main_context *main_ctx; int ret; - struct poptOption long_options[] = { - POPT_AUTOHELP + struct poptOption long_options[] = { + POPT_AUTOHELP SSSD_MAIN_OPTS - { NULL } - }; - - pc = poptGetContext(argv[0], argc, argv, long_options, 0); - while((opt = poptGetNextOpt(pc)) != -1) { - switch(opt) { - default: - fprintf(stderr, "\nInvalid option %s: %s\n\n", - poptBadOption(pc, 0), poptStrerror(opt)); - poptPrintUsage(pc, stderr, 0); - return 1; - } - } - - poptFreeContext(pc); + { NULL } + }; + + pc = poptGetContext(argv[0], argc, argv, long_options, 0); + while((opt = poptGetNextOpt(pc)) != -1) { + switch(opt) { + default: + fprintf(stderr, "\nInvalid option %s: %s\n\n", + poptBadOption(pc, 0), poptStrerror(opt)); + poptPrintUsage(pc, stderr, 0); + return 1; + } + } + + poptFreeContext(pc); /* set up things like debug , signals, daemonization, etc... */ ret = server_setup("sssd[nss]", 0, NSS_SRV_CONFIG, &main_ctx); |