summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-03-11 19:56:51 +0100
committerSimo Sorce <ssorce@redhat.com>2009-03-11 16:26:58 -0400
commit22ff503ab1a8b8fb76f759048e64c621e7560b31 (patch)
treef3fdb46ab3b3373a2bdeb3cd024d543cf5a53dd4
parent9a4c22335dff7d6999b97669609e2ca223a54e76 (diff)
downloadsssd-22ff503ab1a8b8fb76f759048e64c621e7560b31.tar.gz
sssd-22ff503ab1a8b8fb76f759048e64c621e7560b31.tar.xz
sssd-22ff503ab1a8b8fb76f759048e64c621e7560b31.zip
remove an unnecessary call to confdb
-rw-r--r--server/responder/pam/pamsrv_cmd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c
index 56e997e37..c13a5b53d 100644
--- a/server/responder/pam/pamsrv_cmd.c
+++ b/server/responder/pam/pamsrv_cmd.c
@@ -205,7 +205,6 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd)
size_t blen;
int ret;
struct pam_data *pd;
- char *default_domain;
pd = talloc(cctx, struct pam_data);
if (pd == NULL) return ENOMEM;
@@ -229,14 +228,11 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd)
pd->resp_list = NULL;
if (pd->domain == NULL) {
- ret = confdb_get_string(cctx->nctx->cdb, cctx, "config/domains",
- "defaultDomain", "LOCAL", &default_domain);
- if (ret != EOK) {
- DEBUG(1, ("Failed to call confdb.\n"));
- talloc_free(pd);
- return ret;
+ if (cctx->nctx->default_domain != NULL) {
+ pd->domain = cctx->nctx->default_domain;
+ } else {
+ pd->domain = talloc_strdup(pd, "LOCAL");
}
- pd->domain = default_domain;
DEBUG(4, ("Using default domain [%s].\n", pd->domain));
}