summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-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
-rw-r--r--src/tests/sss_idmap-tests.c16
5 files changed, 32 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am
index 5089b8e5c..2e13a9777 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -500,7 +500,7 @@ libsss_idmap_la_SOURCES = \
src/lib/idmap/sss_idmap.c \
src/lib/idmap/sss_idmap_conv.c
libsss_idmap_la_LDFLAGS = \
- -version 1:0:1
+ -version-info 0:1:0
include_HEADERS = \
diff --git a/src/lib/idmap/sss_idmap.c b/src/lib/idmap/sss_idmap.c
index c970293bc..c589bd458 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 78e786afe..a3ec919c8 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 e2064f6da..df96fcc32 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);
diff --git a/src/tests/sss_idmap-tests.c b/src/tests/sss_idmap-tests.c
index d81922f11..b821dfc98 100644
--- a/src/tests/sss_idmap-tests.c
+++ b/src/tests/sss_idmap-tests.c
@@ -182,7 +182,7 @@ START_TEST(idmap_test_dom_sid2uid)
{
enum idmap_error_code err;
uint32_t id;
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
err = sss_idmap_sid_to_dom_sid(idmap_ctx, "S-1-5-21-1-2-3-1000", &dom_sid);
fail_unless(err == IDMAP_SUCCESS, "Failed to convert SID to SID structure");
@@ -219,7 +219,7 @@ END_TEST
START_TEST(idmap_test_uid2dom_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_unix_to_dom_sid(idmap_ctx, 10000, &dom_sid);
@@ -269,7 +269,7 @@ END_TEST
START_TEST(idmap_test_sid_bin2dom_sid)
{
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
enum idmap_error_code err;
uint8_t *new_bin_sid = NULL;
size_t new_bin_sid_length;
@@ -278,12 +278,12 @@ START_TEST(idmap_test_sid_bin2dom_sid)
test_bin_sid_length, &dom_sid);
fail_unless(err == IDMAP_SUCCESS,
- "Failed to convert binary SID to struct dom_sid.");
+ "Failed to convert binary SID to struct sss_dom_sid.");
err = sss_idmap_dom_sid_to_bin_sid(idmap_ctx, dom_sid, &new_bin_sid,
&new_bin_sid_length);
fail_unless(err == IDMAP_SUCCESS,
- "Failed to convert struct dom_sid to binary SID.");
+ "Failed to convert struct sss_dom_sid to binary SID.");
fail_unless(new_bin_sid_length == test_bin_sid_length,
"Length of binary SIDs do not match.");
@@ -297,18 +297,18 @@ END_TEST
START_TEST(idmap_test_sid2dom_sid)
{
- struct dom_sid *dom_sid = NULL;
+ struct sss_dom_sid *dom_sid = NULL;
enum idmap_error_code err;
char *new_sid = NULL;
err = sss_idmap_sid_to_dom_sid(idmap_ctx, "S-1-5-21-1-2-3-1000", &dom_sid);
fail_unless(err == IDMAP_SUCCESS,
- "Failed to convert SID string to struct dom_sid.");
+ "Failed to convert SID string to struct sss_dom_sid.");
err = sss_idmap_dom_sid_to_sid(idmap_ctx, dom_sid, &new_sid);
fail_unless(err == IDMAP_SUCCESS,
- "Failed to convert struct dom_sid to SID string.");
+ "Failed to convert struct sss_dom_sid to SID string.");
fail_unless(new_sid != NULL, "SID string not set");
fail_unless(strlen("S-1-5-21-1-2-3-1000") == strlen(new_sid),