summaryrefslogtreecommitdiffstats
path: root/src/responder
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:57:29 +0100
commit1e21d1079f372c390f4d8d14e4c94afaf5a00385 (patch)
tree20e43c0300d111e5d890cfe2d02ba0adb57c3dca /src/responder
parent32cc86be9c8325f45cef1b8f340e7cd888999f56 (diff)
downloadsssd-1e21d1079f372c390f4d8d14e4c94afaf5a00385.tar.gz
sssd-1e21d1079f372c390f4d8d14e4c94afaf5a00385.tar.xz
sssd-1e21d1079f372c390f4d8d14e4c94afaf5a00385.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')
-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,