summaryrefslogtreecommitdiffstats
path: root/src/providers
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-10-09 21:06:58 +0200
committerSumit Bose <sbose@redhat.com>2012-10-26 10:32:05 +0200
commit4cf3bc3b94ccf1e60d29c0eb765f02cb49fbac2d (patch)
tree89c9bd77d557e571b55b7be5af6ca65c0ebf41a4 /src/providers
parent804b26a0d91d0b551f2f0df11507ef065f8a1f67 (diff)
downloadsssd-4cf3bc3b94ccf1e60d29c0eb765f02cb49fbac2d.tar.gz
sssd-4cf3bc3b94ccf1e60d29c0eb765f02cb49fbac2d.tar.xz
sssd-4cf3bc3b94ccf1e60d29c0eb765f02cb49fbac2d.zip
subdomain-id: Generate homedir only for users not groups
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c22
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 */