From 68c26d9ec785b8af0b45247705b20e82656bfd05 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 25 Jul 2013 20:44:29 +0200 Subject: 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. --- src/providers/ipa/ipa_s2n_exop.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/providers/ipa') 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; -- cgit