summaryrefslogtreecommitdiffstats
path: root/server/tools/tools_util.h
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-07-27 09:49:45 +0200
committerStephen Gallagher <sgallagh@redhat.com>2009-08-05 10:19:20 -0400
commit1f6d7dfad2956cb2f6c33104eda4fdbefe380a42 (patch)
tree3763e4fd1cfe233bbdcd342b26545577f141273e /server/tools/tools_util.h
parenta5fe74914ab920bfaed87c046c525ee7148623f2 (diff)
downloadsssd-1f6d7dfad2956cb2f6c33104eda4fdbefe380a42.tar.gz
sssd-1f6d7dfad2956cb2f6c33104eda4fdbefe380a42.tar.xz
sssd-1f6d7dfad2956cb2f6c33104eda4fdbefe380a42.zip
Parse fully qualified names in tools
Allow adding users into different domains not only by specifying ID directly but also by specifying fully qualified name. Exit when both specifications are used in conflict.
Diffstat (limited to 'server/tools/tools_util.h')
-rw-r--r--server/tools/tools_util.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/server/tools/tools_util.h b/server/tools/tools_util.h
index 5bf3b3840..772ba36b8 100644
--- a/server/tools/tools_util.h
+++ b/server/tools/tools_util.h
@@ -44,6 +44,7 @@ struct tools_ctx {
struct tevent_context *ev;
struct confdb_ctx *confdb;
struct sysdb_ctx *sysdb;
+ struct sss_names_ctx *snctx;
struct sss_domain_info *domains;
};
@@ -53,7 +54,7 @@ struct ops_ctx {
struct tevent_context *ev;
struct sss_domain_info *domain;
- const char *name;
+ char *name;
uid_t uid;
gid_t gid;
char *gecos;
@@ -71,7 +72,7 @@ struct ops_ctx {
bool done;
};
-int init_sss_tools(struct tools_ctx **ctx);
+int init_sss_tools(struct tools_ctx **_ctx);
int setup_db(struct tools_ctx **ctx);
@@ -79,10 +80,16 @@ void usage(poptContext pc, const char *error);
int parse_groups(TALLOC_CTX *mem_ctx, const char *optstr, char ***_out);
-enum id_domain find_domain_for_id(struct tools_ctx *ctx,
- uint32_t id,
- struct sss_domain_info **dom_ret);
+enum id_domain get_domain_type(struct tools_ctx *ctx,
+ struct sss_domain_info *dom);
+
+int get_domain_by_id(struct tools_ctx *ctx,
+ uint32_t id,
+ struct sss_domain_info **_dom);
int set_locale(void);
+int parse_name_domain(struct ops_ctx *octx,
+ const char *fullname);
+
#endif /* __TOOLS_UTIL_H__ */