summaryrefslogtreecommitdiffstats
path: root/src/responder/pac
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 14:42:56 +0100
commit929e41b69350baa4d6577f29a738c3119dc4527b (patch)
tree17a98a3fb04bd6a2a790743783c12757b17e5614 /src/responder/pac
parentbaac15d2f47bcc0368d569804792d3eadca341f7 (diff)
downloadsssd-929e41b69350baa4d6577f29a738c3119dc4527b.tar.gz
sssd-929e41b69350baa4d6577f29a738c3119dc4527b.tar.xz
sssd-929e41b69350baa4d6577f29a738c3119dc4527b.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.
Diffstat (limited to 'src/responder/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,