diff options
author | Sumit Bose <sbose@redhat.com> | 2012-10-09 21:06:58 +0200 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2012-10-26 12:10:23 -0400 |
commit | 4ecd8c54400eb13202397eb85eadb27c6177c2f3 (patch) | |
tree | 8076bee0ec6273da59d290b69e8ca76a0ffe3604 | |
parent | 606865b5236b9d6cc57533cc94e9d82627f8395b (diff) | |
download | sssd-4ecd8c54400eb13202397eb85eadb27c6177c2f3.tar.gz sssd-4ecd8c54400eb13202397eb85eadb27c6177c2f3.tar.xz sssd-4ecd8c54400eb13202397eb85eadb27c6177c2f3.zip |
subdomain-id: Generate homedir only for users not groups
-rw-r--r-- | src/providers/ipa/ipa_s2n_exop.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c index a96304d43..004cdab63 100644 --- a/src/providers/ipa/ipa_s2n_exop.c +++ b/src/providers/ipa/ipa_s2n_exop.c @@ -612,19 +612,21 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq) } now = time(NULL); - if (state->dom->subdomain_homedir) { - homedir = expand_homedir_template(state, state->dom->subdomain_homedir, - attrs->a.user.pw_name, - attrs->a.user.pw_uid, - state->dom->name); - if (homedir == NULL) { - ret = ENOMEM; - goto done; - } - } switch (attrs->response_type) { case RESP_USER: + if (state->dom->subdomain_homedir) { + homedir = expand_homedir_template(state, + state->dom->subdomain_homedir, + attrs->a.user.pw_name, + attrs->a.user.pw_uid, + state->dom->name); + if (homedir == NULL) { + ret = ENOMEM; + goto done; + } + } + ret = sysdb_store_domuser(state->dom, attrs->a.user.pw_name, NULL, attrs->a.user.pw_uid, 0, NULL, /* gecos */ |