summaryrefslogtreecommitdiffstats
path: root/server/db/sysdb.h
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-03-05 15:37:30 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-03-05 16:50:48 -0500
commit16802de42f27a9060eb395751e82c9ad85cb8fe3 (patch)
tree60c5eb51da099abe3d7f63a09cb4224ece1059bc /server/db/sysdb.h
parent1083065853c9d95137c620a2a1af0ad87c9dcf58 (diff)
downloadsssd-16802de42f27a9060eb395751e82c9ad85cb8fe3.tar.gz
sssd-16802de42f27a9060eb395751e82c9ad85cb8fe3.tar.xz
sssd-16802de42f27a9060eb395751e82c9ad85cb8fe3.zip
Add functions to add regular users and groups
Calulates next id automatically if uid/gid are not specified. Fixes to sysdb_get_next_available_id. Add tests to create users and groups through the new functions.
Diffstat (limited to 'server/db/sysdb.h')
-rw-r--r--server/db/sysdb.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/server/db/sysdb.h b/server/db/sysdb.h
index 4083edd8d..544a81f5a 100644
--- a/server/db/sysdb.h
+++ b/server/db/sysdb.h
@@ -39,6 +39,7 @@
#define SYSDB_NEXTID "nextID"
#define SYSDB_UIDNUM "uidNumber"
#define SYSDB_GIDNUM "gidNumber"
+#define SYSDB_CREATE_TIME "createTimestamp"
#define SYSDB_PW_NAME "uid"
#define SYSDB_PW_PWD "userPassword"
@@ -268,6 +269,18 @@ int sysdb_set_user_attr(struct sysdb_req *sysreq,
struct sysdb_attrs *attributes,
sysdb_callback_t fn, void *ptr);
+int sysdb_add_user(struct sysdb_req *sysreq,
+ struct sss_domain_info *domain,
+ const char *name,
+ uid_t uid, gid_t gid, const char *gecos,
+ const char *homedir, const char *shell,
+ sysdb_callback_t fn, void *pvt);
+
+int sysdb_add_group(struct sysdb_req *sysreq,
+ struct sss_domain_info *domain,
+ const char *name, gid_t gid,
+ sysdb_callback_t fn, void *pvt);
+
/* legacy functions for proxy providers */
int sysdb_legacy_store_user(struct sysdb_req *sysreq,