summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-01-07 18:16:26 -0500
committerJakub Hrozek <jhrozek@redhat.com>2013-01-15 10:53:01 +0100
commitefc81d1b44169206a2e55bb8e900d3859375abe3 (patch)
treeeed767b50ce9daef4808052db45669a0774d6d8e /src/db
parent722c364c39bc0ed81e9577fb522f684c0104e26c (diff)
downloadsssd-efc81d1b44169206a2e55bb8e900d3859375abe3.tar.gz
sssd-efc81d1b44169206a2e55bb8e900d3859375abe3.tar.bz2
sssd-efc81d1b44169206a2e55bb8e900d3859375abe3.zip
Add domain argument to sysdb_add_basic_user()
Diffstat (limited to 'src/db')
-rw-r--r--src/db/sysdb.h1
-rw-r--r--src/db/sysdb_ops.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/src/db/sysdb.h b/src/db/sysdb.h
index ab247f2f..a57da489 100644
--- a/src/db/sysdb.h
+++ b/src/db/sysdb.h
@@ -601,6 +601,7 @@ int sysdb_get_new_id(struct sysdb_ctx *sysdb,
/* Add user (only basic attrs and w/o checks) */
int sysdb_add_basic_user(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
uid_t uid, gid_t gid,
const char *gecos,
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 59ec82b2..640a928a 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -814,6 +814,7 @@ done:
/* =Add-Basic-User-NO-CHECKS============================================== */
int sysdb_add_basic_user(struct sysdb_ctx *sysdb,
+ struct sss_domain_info *domain,
const char *name,
uid_t uid, gid_t gid,
const char *gecos,
@@ -836,7 +837,7 @@ int sysdb_add_basic_user(struct sysdb_ctx *sysdb,
}
/* user dn */
- msg->dn = sysdb_user_dn(sysdb, msg, sysdb->domain, name);
+ msg->dn = sysdb_user_dn(sysdb, msg, domain, name);
if (!msg->dn) {
ERROR_OUT(ret, ENOMEM, done);
}
@@ -1144,7 +1145,8 @@ int sysdb_add_user(struct sysdb_ctx *sysdb,
}
/* try to add the user */
- ret = sysdb_add_basic_user(sysdb, name, uid, gid, gecos, homedir, shell);
+ ret = sysdb_add_basic_user(sysdb, domain, name,
+ uid, gid, gecos, homedir, shell);
if (ret) goto done;
if (uid == 0) {