summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-04-23 04:47:23 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-31 15:46:26 -0400
commit8c8cbddeabe585377a5fb3d5df09cc9a236b77dd (patch)
tree854f0ee33e07f9c188c144385e5684846b9ddec7
parent9bd757c0484e8c4eddeab98ec74773a5d5228532 (diff)
downloadsssd-8c8cbddeabe585377a5fb3d5df09cc9a236b77dd.tar.gz
sssd-8c8cbddeabe585377a5fb3d5df09cc9a236b77dd.tar.xz
sssd-8c8cbddeabe585377a5fb3d5df09cc9a236b77dd.zip
Ghost members - support in proxy provider
-rw-r--r--src/providers/proxy/proxy_id.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index e7d9206e5..fe8c113ff 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -489,6 +489,7 @@ done:
static errno_t proxy_process_missing_users(struct sysdb_ctx *sysdb,
+ struct sysdb_attrs *group_attrs,
struct group *grp,
time_t now);
static int save_group(struct sysdb_ctx *sysdb, struct sss_domain_info *dom,
@@ -530,8 +531,8 @@ static int save_group(struct sysdb_ctx *sysdb, struct sss_domain_info *dom,
goto done;
}
- /* Create fake users if they don't already exist */
- ret = proxy_process_missing_users(sysdb, grp, now);
+ /* Create ghost users */
+ ret = proxy_process_missing_users(sysdb, attrs, grp, now);
if (ret != EOK) {
DEBUG(SSSDBG_OP_FAILURE, ("Could not add missing members\n"));
goto done;
@@ -612,6 +613,7 @@ done:
}
static errno_t proxy_process_missing_users(struct sysdb_ctx *sysdb,
+ struct sysdb_attrs *group_attrs,
struct group *grp,
time_t now)
{
@@ -636,15 +638,15 @@ static errno_t proxy_process_missing_users(struct sysdb_ctx *sysdb,
talloc_zfree(msg);
continue;
} else if (ret == ENOENT) {
- /* No entry for this user. Create a fake user */
+ /* No entry for this user. Create a ghost user */
DEBUG(SSSDBG_TRACE_LIBS,
- ("Member [%s] not cached, creating fake user entry\n",
+ ("Member [%s] not cached, creating ghost user entry\n",
grp->gr_mem[i]));
- ret = sysdb_add_fake_user(sysdb, grp->gr_mem[i], NULL, now);
+ ret = sysdb_attrs_add_string(group_attrs, SYSDB_GHOST, grp->gr_mem[i]);
if (ret != EOK) {
DEBUG(SSSDBG_MINOR_FAILURE,
- ("Cannot store fake user entry: [%d]: %s\n",
+ ("Cannot store ghost user entry: [%d]: %s\n",
ret, strerror(ret)));
goto done;
}