summaryrefslogtreecommitdiff
path: root/src/lib/idmap
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/idmap')
-rw-r--r--src/lib/idmap/sss_idmap.c6
-rw-r--r--src/lib/idmap/sss_idmap.h14
-rw-r--r--src/lib/idmap/sss_idmap_conv.c26
3 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/idmap/sss_idmap.c b/src/lib/idmap/sss_idmap.c
index c970293b..c589bd45 100644
--- a/src/lib/idmap/sss_idmap.c
+++ b/src/lib/idmap/sss_idmap.c
@@ -361,7 +361,7 @@ enum idmap_error_code sss_idmap_unix_to_sid(struct sss_idmap_ctx *ctx,
}
enum idmap_error_code sss_idmap_dom_sid_to_unix(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
uint32_t *id)
{
enum idmap_error_code err;
@@ -407,11 +407,11 @@ done:
enum idmap_error_code sss_idmap_unix_to_dom_sid(struct sss_idmap_ctx *ctx,
uint32_t id,
- struct dom_sid **_dom_sid)
+ struct sss_dom_sid **_dom_sid)
{
enum idmap_error_code err;
char *sid = NULL;
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
CHECK_IDMAP_CTX(ctx, IDMAP_CONTEXT_INVALID);
diff --git a/src/lib/idmap/sss_idmap.h b/src/lib/idmap/sss_idmap.h
index 78e786af..a3ec919c 100644
--- a/src/lib/idmap/sss_idmap.h
+++ b/src/lib/idmap/sss_idmap.h
@@ -90,7 +90,7 @@ struct sss_idmap_range {
/**
* Opaque type for SIDs
*/
-struct dom_sid;
+struct sss_dom_sid;
/**
* Opaque type for the idmap context
@@ -167,7 +167,7 @@ enum idmap_error_code sss_idmap_sid_to_unix(struct sss_idmap_ctx *ctx,
* idmap context
*/
enum idmap_error_code sss_idmap_dom_sid_to_unix(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
uint32_t *id);
/**
@@ -220,7 +220,7 @@ enum idmap_error_code sss_idmap_unix_to_sid(struct sss_idmap_ctx *ctx,
*/
enum idmap_error_code sss_idmap_unix_to_dom_sid(struct sss_idmap_ctx *ctx,
uint32_t id,
- struct dom_sid **dom_sid);
+ struct sss_dom_sid **dom_sid);
/**
* @brief Translate unix UID or GID to a binary SID
@@ -288,7 +288,7 @@ bool is_domain_sid(const char *str);
enum idmap_error_code sss_idmap_bin_sid_to_dom_sid(struct sss_idmap_ctx *ctx,
const uint8_t *bin_sid,
size_t length,
- struct dom_sid **dom_sid);
+ struct sss_dom_sid **dom_sid);
/**
* @brief Convert binary SID to SID string
@@ -322,7 +322,7 @@ enum idmap_error_code sss_idmap_bin_sid_to_sid(struct sss_idmap_ctx *ctx,
* - #IDMAP_OUT_OF_MEMORY: Failed to allocate memory for the result
*/
enum idmap_error_code sss_idmap_dom_sid_to_bin_sid(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
uint8_t **bin_sid,
size_t *length);
@@ -357,7 +357,7 @@ enum idmap_error_code sss_idmap_sid_to_bin_sid(struct sss_idmap_ctx *ctx,
* - #IDMAP_OUT_OF_MEMORY: Failed to allocate memory for the result
*/
enum idmap_error_code sss_idmap_dom_sid_to_sid(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
char **sid);
/**
@@ -374,7 +374,7 @@ enum idmap_error_code sss_idmap_dom_sid_to_sid(struct sss_idmap_ctx *ctx,
*/
enum idmap_error_code sss_idmap_sid_to_dom_sid(struct sss_idmap_ctx *ctx,
const char *sid,
- struct dom_sid **dom_sid);
+ struct sss_dom_sid **dom_sid);
/**
* @}
*/
diff --git a/src/lib/idmap/sss_idmap_conv.c b/src/lib/idmap/sss_idmap_conv.c
index e2064f6d..df96fcc3 100644
--- a/src/lib/idmap/sss_idmap_conv.c
+++ b/src/lib/idmap/sss_idmap_conv.c
@@ -33,7 +33,7 @@
#define SID_ID_AUTHS 6
#define SID_SUB_AUTHS 15
-struct dom_sid {
+struct sss_dom_sid {
uint8_t sid_rev_num;
int8_t num_auths; /* [range(0,15)] */
uint8_t id_auth[SID_ID_AUTHS]; /* highest order byte has index 0 */
@@ -43,19 +43,19 @@ struct dom_sid {
enum idmap_error_code sss_idmap_bin_sid_to_dom_sid(struct sss_idmap_ctx *ctx,
const uint8_t *bin_sid,
size_t length,
- struct dom_sid **_dom_sid)
+ struct sss_dom_sid **_dom_sid)
{
enum idmap_error_code err;
- struct dom_sid *dom_sid;
+ struct sss_dom_sid *dom_sid;
size_t i = 0;
size_t p = 0;
uint32_t val;
CHECK_IDMAP_CTX(ctx, IDMAP_CONTEXT_INVALID);
- if (length > sizeof(struct dom_sid)) return IDMAP_SID_INVALID;
+ if (length > sizeof(struct sss_dom_sid)) return IDMAP_SID_INVALID;
- dom_sid = ctx->alloc_func(sizeof(struct dom_sid), ctx->alloc_pvt);
+ dom_sid = ctx->alloc_func(sizeof(struct sss_dom_sid), ctx->alloc_pvt);
if (dom_sid == NULL) {
return IDMAP_OUT_OF_MEMORY;
}
@@ -101,7 +101,7 @@ done:
}
enum idmap_error_code sss_idmap_dom_sid_to_bin_sid(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
uint8_t **_bin_sid,
size_t *_length)
{
@@ -157,7 +157,7 @@ done:
}
enum idmap_error_code sss_idmap_dom_sid_to_sid(struct sss_idmap_ctx *ctx,
- struct dom_sid *dom_sid,
+ struct sss_dom_sid *dom_sid,
char **_sid)
{
enum idmap_error_code err;
@@ -222,13 +222,13 @@ done:
enum idmap_error_code sss_idmap_sid_to_dom_sid(struct sss_idmap_ctx *ctx,
const char *sid,
- struct dom_sid **_dom_sid)
+ struct sss_dom_sid **_dom_sid)
{
enum idmap_error_code err;
unsigned long ul;
char *r;
char *end;
- struct dom_sid *dom_sid;
+ struct sss_dom_sid *dom_sid;
CHECK_IDMAP_CTX(ctx, IDMAP_CONTEXT_INVALID);
@@ -236,11 +236,11 @@ enum idmap_error_code sss_idmap_sid_to_dom_sid(struct sss_idmap_ctx *ctx,
return IDMAP_SID_INVALID;
}
- dom_sid = ctx->alloc_func(sizeof(struct dom_sid), ctx->alloc_pvt);
+ dom_sid = ctx->alloc_func(sizeof(struct sss_dom_sid), ctx->alloc_pvt);
if (dom_sid == NULL) {
return IDMAP_OUT_OF_MEMORY;
}
- memset(dom_sid, 0, sizeof(struct dom_sid));
+ memset(dom_sid, 0, sizeof(struct sss_dom_sid));
if (!isdigit(sid[2])) {
@@ -330,7 +330,7 @@ enum idmap_error_code sss_idmap_sid_to_bin_sid(struct sss_idmap_ctx *ctx,
size_t *_length)
{
enum idmap_error_code err;
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
size_t length;
uint8_t *bin_sid = NULL;
@@ -363,7 +363,7 @@ enum idmap_error_code sss_idmap_bin_sid_to_sid(struct sss_idmap_ctx *ctx,
char **_sid)
{
enum idmap_error_code err;
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
char *sid = NULL;
err = sss_idmap_bin_sid_to_dom_sid(ctx, bin_sid, length, &dom_sid);