diff options
Diffstat (limited to 'src/db/sysdb_ops.c')
-rw-r--r-- | src/db/sysdb_ops.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c index d6260b97c..1fb389da9 100644 --- a/src/db/sysdb_ops.c +++ b/src/db/sysdb_ops.c @@ -934,7 +934,8 @@ done: int sysdb_add_fake_user(struct sysdb_ctx *ctx, struct sss_domain_info *domain, - const char *name) + const char *name, + const char *original_dn) { TALLOC_CTX *tmpctx; struct ldb_message *msg; @@ -983,6 +984,12 @@ int sysdb_add_fake_user(struct sysdb_ctx *ctx, (unsigned long) now-1); if (ret) goto done; + if (original_dn) { + ret = add_string(msg, LDB_FLAG_MOD_ADD, + SYSDB_ORIG_DN, original_dn); + if (ret) goto done; + } + ret = ldb_add(ctx->ldb, msg); ret = sysdb_error_to_errno(ret); |