summaryrefslogtreecommitdiffstats
path: root/src/lib/idmap/sss_idmap.h
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-11-26 22:16:25 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-08 14:42:56 +0100
commit6f504738cad1ee9daa1bd6eec721caceef65f21d (patch)
tree855e4f1bee2743f12879feaebddf205d21aeb8e4 /src/lib/idmap/sss_idmap.h
parent12bfb1b3c9683ccc9972749772a6e6be495c0769 (diff)
downloadsssd-6f504738cad1ee9daa1bd6eec721caceef65f21d.tar.gz
sssd-6f504738cad1ee9daa1bd6eec721caceef65f21d.tar.xz
sssd-6f504738cad1ee9daa1bd6eec721caceef65f21d.zip
IDMAP: add sss_idmap_smb_sid_to_unix()
To avoid a conversion on the caller side a new call is added to libsss_idmap which converts a Samba dom_sid structure to a Posix ID.
Diffstat (limited to 'src/lib/idmap/sss_idmap.h')
-rw-r--r--src/lib/idmap/sss_idmap.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/idmap/sss_idmap.h b/src/lib/idmap/sss_idmap.h
index 22a4d5484..ced7074a9 100644
--- a/src/lib/idmap/sss_idmap.h
+++ b/src/lib/idmap/sss_idmap.h
@@ -200,6 +200,23 @@ enum idmap_error_code sss_idmap_bin_sid_to_unix(struct sss_idmap_ctx *ctx,
uint32_t *id);
/**
+ * @brief Translate a Samba dom_sid stucture to a unix UID or GID
+ *
+ * @param[in] ctx Idmap context
+ * @param[in] smb_sid Samba dom_sid structure
+ * @param[out] id Returned unix UID or GID
+ *
+ * @return
+ * - #IDMAP_NO_DOMAIN: No domains are added to the idmap context
+ * - #IDMAP_SID_INVALID: Invalid SID provided
+ * - #IDMAP_SID_UNKNOWN: SID cannot be found in the domains added to the
+ * idmap context
+ */
+enum idmap_error_code sss_idmap_smb_sid_to_unix(struct sss_idmap_ctx *ctx,
+ struct dom_sid *smb_sid,
+ uint32_t *id);
+
+/**
* @brief Translate unix UID or GID to a SID
*
* @param[in] ctx Idmap context