From 16802de42f27a9060eb395751e82c9ad85cb8fe3 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 5 Mar 2009 15:37:30 -0500 Subject: 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. --- server/db/sysdb.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'server/db/sysdb.h') diff --git a/server/db/sysdb.h b/server/db/sysdb.h index 4083edd8..544a81f5 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, -- cgit