summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-11-27 11:46:47 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-08 15:05:48 +0100
commit035008dc7676339c9568ab4d44b5fcc1fee98f54 (patch)
tree8bb251b3a4474a919083645857d37ba2cc09fbaa
parent72f3a9e8442a7753de4f46ec6fb71364bdf4e2a0 (diff)
downloadsssd-035008dc7676339c9568ab4d44b5fcc1fee98f54.tar.gz
sssd-035008dc7676339c9568ab4d44b5fcc1fee98f54.tar.xz
sssd-035008dc7676339c9568ab4d44b5fcc1fee98f54.zip
Always get user data from PAC
Currently some user specific data from the PAC is only read when the user is not already in the cache. Since some of this information is needed later on, e.g. the domain SID the user belongs to, with this patch the data is read always from the PAC.
-rw-r--r--src/responder/pac/pacsrv_cmd.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/responder/pac/pacsrv_cmd.c b/src/responder/pac/pacsrv_cmd.c
index 9f201f5c8..d2609f577 100644
--- a/src/responder/pac/pacsrv_cmd.c
+++ b/src/responder/pac/pacsrv_cmd.c
@@ -380,18 +380,18 @@ static errno_t save_pac_user(struct pac_req_ctx *pr_ctx)
goto done;
}
+ ret = get_pwd_from_pac(tmp_ctx, pr_ctx->pac_ctx, pr_ctx->dom,
+ pr_ctx->logon_info, &pwd, &user_attrs);
+ if (ret != EOK) {
+ DEBUG(SSSDBG_OP_FAILURE, ("get_pwd_from_pac failed.\n"));
+ goto done;
+ }
+
ret = sysdb_search_user_by_name(tmp_ctx, sysdb, pr_ctx->fq_name, attrs,
&msg);
if (ret == EOK) {
/* TODO: check id uid and gid are equal. */
} else if (ret == ENOENT) {
- ret = get_pwd_from_pac(tmp_ctx, pr_ctx->pac_ctx, pr_ctx->dom,
- pr_ctx->logon_info, &pwd, &user_attrs);
- if (ret != EOK) {
- DEBUG(SSSDBG_OP_FAILURE, ("get_pwd_from_pac failed.\n"));
- goto done;
- }
-
ret = sysdb_store_user(sysdb, pwd->pw_name, NULL,
pwd->pw_uid, pwd->pw_gid, pwd->pw_gecos,
pwd->pw_dir,