summaryrefslogtreecommitdiff
path: root/src/providers/ipa
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-07-25 20:44:29 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-07-29 12:54:36 +0200
commit68c26d9ec785b8af0b45247705b20e82656bfd05 (patch)
tree1d4639b06e3a50a7c738cdea72076cb5229bbf75 /src/providers/ipa
parentfed544f8c960bf346679870843854bf43e83c453 (diff)
downloadsssd-68c26d9ec785b8af0b45247705b20e82656bfd05.tar.gz
sssd-68c26d9ec785b8af0b45247705b20e82656bfd05.tar.bz2
sssd-68c26d9ec785b8af0b45247705b20e82656bfd05.zip
Use GID if subdomain is not MPG
https://fedorahosted.org/sssd/ticket/2032 In non-MPG subdomains (such as those that manage their IDs manually with POSIX attributes), we need to set the GID ourself.
Diffstat (limited to 'src/providers/ipa')
-rw-r--r--src/providers/ipa/ipa_s2n_exop.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/providers/ipa/ipa_s2n_exop.c b/src/providers/ipa/ipa_s2n_exop.c
index f589a06f..e16ec149 100644
--- a/src/providers/ipa/ipa_s2n_exop.c
+++ b/src/providers/ipa/ipa_s2n_exop.c
@@ -654,6 +654,7 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
char *realm;
char *upn;
struct berval *bv_req = NULL;
+ gid_t gid;
ret = ipa_s2n_exop_recv(subreq, state, &retoid, &retdata);
talloc_zfree(subreq);
@@ -815,8 +816,14 @@ static void ipa_s2n_get_user_done(struct tevent_req *subreq)
}
}
+ gid = 0;
+ if (state->dom->mpg == false) {
+ gid = attrs->a.user.pw_gid;
+ }
+
ret = sysdb_store_user(state->dom->sysdb, state->dom, name, NULL,
- attrs->a.user.pw_uid, 0, NULL, /* gecos */
+ attrs->a.user.pw_uid,
+ gid, NULL, /* gecos */
homedir, NULL, NULL, user_attrs, NULL,
timeout, now);
break;