diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2009-04-23 22:07:05 +0200 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-04-28 11:57:15 -0400 |
commit | c1a1b0464b5fad4daa9868b846182ad391f716a2 (patch) | |
tree | b739f02ccea1b92d16a774d8f6270388fc1094d5 /server/tools/tools_util.h | |
parent | 6207b76613168e6aa386b7b71b492b66b14fff57 (diff) | |
download | sssd-c1a1b0464b5fad4daa9868b846182ad391f716a2.tar.gz sssd-c1a1b0464b5fad4daa9868b846182ad391f716a2.tar.bz2 sssd-c1a1b0464b5fad4daa9868b846182ad391f716a2.zip |
Invoke shadow-utils in sss_ tools
Make shadow-utils base path configurable
Use default values for params, allow configuring them
Diffstat (limited to 'server/tools/tools_util.h')
-rw-r--r-- | server/tools/tools_util.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/server/tools/tools_util.h b/server/tools/tools_util.h index ef55dede..e055fe23 100644 --- a/server/tools/tools_util.h +++ b/server/tools/tools_util.h @@ -4,6 +4,30 @@ #define UID_NOT_SET 0 #define GID_NOT_SET 0 +#define APPEND_PARAM(str, param, val) do { \ + if (val) { \ + str = talloc_asprintf_append(str, param, val); \ + if (str == NULL) { \ + return ENOMEM; \ + } \ + } \ +} while(0) + +#define APPEND_STRING(str, val) do { \ + str = talloc_asprintf_append(str, "%s ", val); \ + if (str == NULL) { \ + return ENOMEM; \ + } \ +} while(0) + +enum id_domain { + ID_IN_LOCAL = 0, + ID_IN_LEGACY_LOCAL, + ID_IN_OTHER, + ID_OUTSIDE, + ID_ERROR +}; + struct tools_ctx { struct tevent_context *ev; struct confdb_ctx *confdb; @@ -18,4 +42,8 @@ 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); + #endif /* __TOOLS_UTIL_H__ */ |