diff options
author | Sumit Bose <sbose@redhat.com> | 2013-08-08 12:04:11 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-08-19 22:32:34 +0200 |
commit | 75dd4b05e1dacc76dc9d5f16be31978f84a71dc5 (patch) | |
tree | c01533ef057253df9b22d83db188744a554923c2 /src/db/sysdb_ops.c | |
parent | fd04fbbf93d33db729404cdc4408f59226025ea6 (diff) | |
download | sssd-75dd4b05e1dacc76dc9d5f16be31978f84a71dc5.tar.gz sssd-75dd4b05e1dacc76dc9d5f16be31978f84a71dc5.tar.bz2 sssd-75dd4b05e1dacc76dc9d5f16be31978f84a71dc5.zip |
sysdb_add_incomplete_group: store SID string is available
During initgroups request we read the SID of a group from the server but
do not save it to the cache. This patch fixes this and might help to
avoid an additional lookup of the SID later.
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r-- | src/db/sysdb_ops.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index ff8fb008..45f3289b 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -1409,6 +1409,7 @@ int sysdb_add_incomplete_group(struct sysdb_ctx *sysdb, const char *name, gid_t gid, const char *original_dn, + const char *sid_str, bool posix, time_t now) { @@ -1450,6 +1451,11 @@ int sysdb_add_incomplete_group(struct sysdb_ctx *sysdb, if (ret) goto done; } + if (sid_str) { + ret = sysdb_attrs_add_string(attrs, SYSDB_SID_STR, sid_str); + if (ret) goto done; + } + ret = sysdb_set_group_attr(sysdb, domain, name, attrs, SYSDB_MOD_REP); done: |