summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-05-21 11:25:01 +1000
committerGünther Deschner <gd@samba.org>2010-05-21 10:39:59 +0200
commitcba7f8b8273e661d3c43652900d93e5a8eab4e5f (patch)
tree714e00240ddc0c7e689240d2c8fb7d9196b1fff2 /source3/passdb
parenta92b653af964364ee438c6ee69a87eb7603ceab0 (diff)
downloadsamba-cba7f8b8273e661d3c43652900d93e5a8eab4e5f.tar.gz
samba-cba7f8b8273e661d3c43652900d93e5a8eab4e5f.tar.bz2
samba-cba7f8b8273e661d3c43652900d93e5a8eab4e5f.zip
s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to, and removes one more of the old-style named structures, and the need to know that is is just an alias for struct dom_sid. Andrew Bartlett Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c52
-rw-r--r--source3/passdb/machine_sid.c22
-rw-r--r--source3/passdb/passdb.c4
-rw-r--r--source3/passdb/pdb_ads.c56
-rw-r--r--source3/passdb/pdb_compat.c8
-rw-r--r--source3/passdb/pdb_get_set.c22
-rw-r--r--source3/passdb/pdb_interface.c88
-rw-r--r--source3/passdb/pdb_ldap.c102
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
-rw-r--r--source3/passdb/pdb_tdb.c2
-rw-r--r--source3/passdb/pdb_wbc_sam.c40
-rw-r--r--source3/passdb/secrets.c4
-rw-r--r--source3/passdb/util_builtin.c6
-rw-r--r--source3/passdb/util_unixsids.c20
-rw-r--r--source3/passdb/util_wellknown.c14
15 files changed, 221 insertions, 221 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index ff8777493a..181b17a838 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -32,14 +32,14 @@
bool lookup_name(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
- DOM_SID *ret_sid, enum lsa_SidType *ret_type)
+ struct dom_sid *ret_sid, enum lsa_SidType *ret_type)
{
char *p;
const char *tmp;
const char *domain = NULL;
const char *name = NULL;
uint32 rid;
- DOM_SID sid;
+ struct dom_sid sid;
enum lsa_SidType type;
TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
@@ -253,7 +253,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
* that (yet), but give it a chance. */
if (IS_DC && winbind_lookup_name("", name, &sid, &type)) {
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 tmp_rid;
enum lsa_SidType domain_type;
@@ -357,7 +357,7 @@ bool lookup_name(TALLOC_CTX *mem_ctx,
bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
const char *full_name, int flags,
const char **ret_domain, const char **ret_name,
- DOM_SID *ret_sid, enum lsa_SidType *ret_type)
+ struct dom_sid *ret_sid, enum lsa_SidType *ret_type)
{
char *qualified_name;
const char *p;
@@ -415,7 +415,7 @@ bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
}
static bool wb_lookup_rids(TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_rids, uint32 *rids,
const char **domain_name,
const char **names, enum lsa_SidType *types)
@@ -465,7 +465,7 @@ static bool wb_lookup_rids(TALLOC_CTX *mem_ctx,
return true;
}
-static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
+static bool lookup_rids(TALLOC_CTX *mem_ctx, const struct dom_sid *domain_sid,
int num_rids, uint32_t *rids,
const char **domain_name,
const char ***names, enum lsa_SidType **types)
@@ -539,7 +539,7 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
if (sid_check_is_wellknown_domain(domain_sid, NULL)) {
for (i=0; i<num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
sid_compose(&sid, domain_sid, rids[i]);
if (lookup_wellknown_sid(mem_ctx, &sid,
domain_name, &(*names)[i])) {
@@ -600,7 +600,7 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
* Is the SID a domain as such? If yes, lookup its name.
*/
-static bool lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
+static bool lookup_as_domain(const struct dom_sid *sid, TALLOC_CTX *mem_ctx,
const char **name)
{
const char *tmp;
@@ -688,7 +688,7 @@ static bool lookup_as_domain(const DOM_SID *sid, TALLOC_CTX *mem_ctx,
* Level 6: Like 4
*/
-static bool check_dom_sid_to_level(const DOM_SID *sid, int level)
+static bool check_dom_sid_to_level(const struct dom_sid *sid, int level)
{
int ret = false;
@@ -729,7 +729,7 @@ static bool check_dom_sid_to_level(const DOM_SID *sid, int level)
*/
NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
- const DOM_SID **sids, int level,
+ const struct dom_sid **sids, int level,
struct lsa_dom_info **ret_domains,
struct lsa_name_info **ret_names)
{
@@ -777,7 +777,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
*/
for (i=0; i<num_sids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
uint32 rid;
const char *domain_name = NULL;
@@ -948,7 +948,7 @@ NTSTATUS lookup_sids(TALLOC_CTX *mem_ctx, int num_sids,
*THE CANONICAL* convert SID to name function.
*****************************************************************/
-bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
const char **ret_domain, const char **ret_name,
enum lsa_SidType *ret_type)
{
@@ -1012,7 +1012,7 @@ bool lookup_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
Find a SID given a uid.
*****************************************************************/
-static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
+static bool fetch_sid_from_uid_cache(struct dom_sid *psid, uid_t uid)
{
DATA_BLOB cache_value;
@@ -1033,7 +1033,7 @@ static bool fetch_sid_from_uid_cache(DOM_SID *psid, uid_t uid)
Find a uid given a SID.
*****************************************************************/
-static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
+static bool fetch_uid_from_cache( uid_t *puid, const struct dom_sid *psid )
{
DATA_BLOB cache_value;
@@ -1053,7 +1053,7 @@ static bool fetch_uid_from_cache( uid_t *puid, const DOM_SID *psid )
Store uid to SID mapping in cache.
*****************************************************************/
-void store_uid_sid_cache(const DOM_SID *psid, uid_t uid)
+void store_uid_sid_cache(const struct dom_sid *psid, uid_t uid)
{
memcache_add(NULL, SID_UID_CACHE,
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
@@ -1067,7 +1067,7 @@ void store_uid_sid_cache(const DOM_SID *psid, uid_t uid)
Find a SID given a gid.
*****************************************************************/
-static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
+static bool fetch_sid_from_gid_cache(struct dom_sid *psid, gid_t gid)
{
DATA_BLOB cache_value;
@@ -1088,7 +1088,7 @@ static bool fetch_sid_from_gid_cache(DOM_SID *psid, gid_t gid)
Find a gid given a SID.
*****************************************************************/
-static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
+static bool fetch_gid_from_cache(gid_t *pgid, const struct dom_sid *psid)
{
DATA_BLOB cache_value;
@@ -1108,7 +1108,7 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
Store gid to SID mapping in cache.
*****************************************************************/
-void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
+void store_gid_sid_cache(const struct dom_sid *psid, gid_t gid)
{
memcache_add(NULL, SID_GID_CACHE,
data_blob_const(psid, ndr_size_dom_sid(psid, 0)),
@@ -1122,7 +1122,7 @@ void store_gid_sid_cache(const DOM_SID *psid, gid_t gid)
*THE LEGACY* convert uid_t to SID function.
*****************************************************************/
-static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
+static void legacy_uid_to_sid(struct dom_sid *psid, uid_t uid)
{
bool ret;
@@ -1153,7 +1153,7 @@ static void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
*THE LEGACY* convert gid_t to SID function.
*****************************************************************/
-static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
+static void legacy_gid_to_sid(struct dom_sid *psid, gid_t gid)
{
bool ret;
@@ -1184,7 +1184,7 @@ static void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
*THE LEGACY* convert SID to uid function.
*****************************************************************/
-static bool legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
+static bool legacy_sid_to_uid(const struct dom_sid *psid, uid_t *puid)
{
enum lsa_SidType type;
@@ -1227,7 +1227,7 @@ done:
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+static bool legacy_sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
{
GROUP_MAP map;
union unid_t id;
@@ -1289,7 +1289,7 @@ static bool legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
*THE CANONICAL* convert uid_t to SID function.
*****************************************************************/
-void uid_to_sid(DOM_SID *psid, uid_t uid)
+void uid_to_sid(struct dom_sid *psid, uid_t uid)
{
bool expired = true;
bool ret;
@@ -1342,7 +1342,7 @@ void uid_to_sid(DOM_SID *psid, uid_t uid)
*THE CANONICAL* convert gid_t to SID function.
*****************************************************************/
-void gid_to_sid(DOM_SID *psid, gid_t gid)
+void gid_to_sid(struct dom_sid *psid, gid_t gid)
{
bool expired = true;
bool ret;
@@ -1395,7 +1395,7 @@ void gid_to_sid(DOM_SID *psid, gid_t gid)
*THE CANONICAL* convert SID to uid function.
*****************************************************************/
-bool sid_to_uid(const DOM_SID *psid, uid_t *puid)
+bool sid_to_uid(const struct dom_sid *psid, uid_t *puid)
{
bool expired = true;
bool ret;
@@ -1457,7 +1457,7 @@ bool sid_to_uid(const DOM_SID *psid, uid_t *puid)
Group mapping is used for gids that maps to Wellknown SIDs
*****************************************************************/
-bool sid_to_gid(const DOM_SID *psid, gid_t *pgid)
+bool sid_to_gid(const struct dom_sid *psid, gid_t *pgid)
{
bool expired = true;
bool ret;
diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c
index d70e7c4dc4..703e6ef268 100644
--- a/source3/passdb/machine_sid.c
+++ b/source3/passdb/machine_sid.c
@@ -25,7 +25,7 @@
/* NOTE! the global_sam_sid is the SID of our local SAM. This is only
equal to the domain SID when we are a DC, otherwise its our
workstation SID */
-static DOM_SID *global_sam_sid=NULL;
+static struct dom_sid *global_sam_sid=NULL;
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_PASSDB
@@ -35,7 +35,7 @@ static DOM_SID *global_sam_sid=NULL;
style of SID storage
****************************************************************************/
-static bool read_sid_from_file(const char *fname, DOM_SID *sid)
+static bool read_sid_from_file(const char *fname, struct dom_sid *sid)
{
char **lines;
int numlines;
@@ -56,7 +56,7 @@ static bool read_sid_from_file(const char *fname, DOM_SID *sid)
/*
generate a random sid - used to build our own sid if we don't have one
*/
-static void generate_random_sid(DOM_SID *sid)
+static void generate_random_sid(struct dom_sid *sid)
{
int i;
uchar raw_sid_data[12];
@@ -77,13 +77,13 @@ static void generate_random_sid(DOM_SID *sid)
Generate the global machine sid.
****************************************************************************/
-static DOM_SID *pdb_generate_sam_sid(void)
+static struct dom_sid *pdb_generate_sam_sid(void)
{
- DOM_SID domain_sid;
+ struct dom_sid domain_sid;
char *fname = NULL;
- DOM_SID *sam_sid;
+ struct dom_sid *sam_sid;
- if(!(sam_sid=SMB_MALLOC_P(DOM_SID)))
+ if(!(sam_sid=SMB_MALLOC_P(struct dom_sid)))
return NULL;
if ( IS_DC ) {
@@ -179,7 +179,7 @@ static DOM_SID *pdb_generate_sam_sid(void)
}
/* return our global_sam_sid */
-DOM_SID *get_global_sam_sid(void)
+struct dom_sid *get_global_sam_sid(void)
{
struct db_context *db;
@@ -228,7 +228,7 @@ void reset_global_sam_sid(void)
Check if the SID is our domain SID (S-1-5-21-x-y-z).
*****************************************************************/
-bool sid_check_is_domain(const DOM_SID *sid)
+bool sid_check_is_domain(const struct dom_sid *sid)
{
return sid_equal(sid, get_global_sam_sid());
}
@@ -237,9 +237,9 @@ bool sid_check_is_domain(const DOM_SID *sid)
Check if the SID is our domain SID (S-1-5-21-x-y-z).
*****************************************************************/
-bool sid_check_is_in_our_domain(const DOM_SID *sid)
+bool sid_check_is_in_our_domain(const struct dom_sid *sid)
{
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index b6b3c530f8..abcd4d1dc3 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -242,7 +242,7 @@ static NTSTATUS samu_set_unix_internal(struct samu *user, const struct passwd *p
if ( create && (pdb_capabilities() & PDB_CAP_STORE_RIDS)) {
uint32_t user_rid;
- DOM_SID user_sid;
+ struct dom_sid user_sid;
if ( !pdb_new_rid( &user_rid ) ) {
DEBUG(3, ("Could not allocate a new RID\n"));
@@ -604,7 +604,7 @@ bool lookup_global_sam_name(const char *name, int flags, uint32_t *rid,
if ((flags & LOOKUP_NAME_GROUP) == 0) {
struct samu *sam_account = NULL;
- DOM_SID user_sid;
+ struct dom_sid user_sid;
if ( !(sam_account = samu_new( NULL )) ) {
return False;
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index a01d94e287..722bfacfb1 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -38,9 +38,9 @@ struct pdb_ads_samu_private {
static NTSTATUS pdb_ads_getsampwsid(struct pdb_methods *m,
struct samu *sam_acct,
- const DOM_SID *sid);
+ const struct dom_sid *sid);
static bool pdb_ads_gid_to_sid(struct pdb_methods *m, gid_t gid,
- DOM_SID *sid);
+ struct dom_sid *sid);
static bool pdb_ads_dnblob2sid(struct pdb_ads_state *state, DATA_BLOB *dnblob,
struct dom_sid *psid);
static NTSTATUS pdb_ads_sid2dn(struct pdb_ads_state *state,
@@ -428,7 +428,7 @@ static NTSTATUS pdb_ads_getsampwnam(struct pdb_methods *m,
static NTSTATUS pdb_ads_getsampwsid(struct pdb_methods *m,
struct samu *sam_acct,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct pdb_ads_state *state = talloc_get_type_abort(
m->private_data, struct pdb_ads_state);
@@ -688,7 +688,7 @@ static NTSTATUS pdb_ads_getgrfilter(struct pdb_methods *m, GROUP_MAP *map,
}
static NTSTATUS pdb_ads_getgrsid(struct pdb_methods *m, GROUP_MAP *map,
- DOM_SID sid)
+ struct dom_sid sid)
{
char *filter;
NTSTATUS status;
@@ -884,13 +884,13 @@ static NTSTATUS pdb_ads_update_group_mapping_entry(struct pdb_methods *m,
}
static NTSTATUS pdb_ads_delete_group_mapping_entry(struct pdb_methods *m,
- DOM_SID sid)
+ struct dom_sid sid)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
static NTSTATUS pdb_ads_enum_group_mapping(struct pdb_methods *m,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries,
@@ -901,7 +901,7 @@ static NTSTATUS pdb_ads_enum_group_mapping(struct pdb_methods *m,
static NTSTATUS pdb_ads_enum_group_members(struct pdb_methods *m,
TALLOC_CTX *mem_ctx,
- const DOM_SID *group,
+ const struct dom_sid *group,
uint32 **pmembers,
size_t *pnum_members)
{
@@ -963,7 +963,7 @@ static NTSTATUS pdb_ads_enum_group_members(struct pdb_methods *m,
static NTSTATUS pdb_ads_enum_group_memberships(struct pdb_methods *m,
TALLOC_CTX *mem_ctx,
struct samu *user,
- DOM_SID **pp_sids,
+ struct dom_sid **pp_sids,
gid_t **pp_gids,
size_t *p_num_groups)
{
@@ -1184,7 +1184,7 @@ static NTSTATUS pdb_ads_create_alias(struct pdb_methods *m,
}
static NTSTATUS pdb_ads_delete_alias(struct pdb_methods *m,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct pdb_ads_state *state = talloc_get_type_abort(
m->private_data, struct pdb_ads_state);
@@ -1239,7 +1239,7 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods *m,
}
static NTSTATUS pdb_ads_set_aliasinfo(struct pdb_methods *m,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
struct acct_info *info)
{
struct pdb_ads_state *state = talloc_get_type_abort(
@@ -1363,8 +1363,8 @@ static NTSTATUS pdb_ads_sid2dn(struct pdb_ads_state *state,
}
static NTSTATUS pdb_ads_mod_aliasmem(struct pdb_methods *m,
- const DOM_SID *alias,
- const DOM_SID *member,
+ const struct dom_sid *alias,
+ const struct dom_sid *member,
int mod_op)
{
struct pdb_ads_state *state = talloc_get_type_abort(
@@ -1422,15 +1422,15 @@ static NTSTATUS pdb_ads_mod_aliasmem(struct pdb_methods *m,
}
static NTSTATUS pdb_ads_add_aliasmem(struct pdb_methods *m,
- const DOM_SID *alias,
- const DOM_SID *member)
+ const struct dom_sid *alias,
+ const struct dom_sid *member)
{
return pdb_ads_mod_aliasmem(m, alias, member, TLDAP_MOD_ADD);
}
static NTSTATUS pdb_ads_del_aliasmem(struct pdb_methods *m,
- const DOM_SID *alias,
- const DOM_SID *member)
+ const struct dom_sid *alias,
+ const struct dom_sid *member)
{
return pdb_ads_mod_aliasmem(m, alias, member, TLDAP_MOD_DELETE);
}
@@ -1467,9 +1467,9 @@ static bool pdb_ads_dnblob2sid(struct pdb_ads_state *state, DATA_BLOB *dnblob,
}
static NTSTATUS pdb_ads_enum_aliasmem(struct pdb_methods *m,
- const DOM_SID *alias,
+ const struct dom_sid *alias,
TALLOC_CTX *mem_ctx,
- DOM_SID **pmembers,
+ struct dom_sid **pmembers,
size_t *pnum_members)
{
struct pdb_ads_state *state = talloc_get_type_abort(
@@ -1527,8 +1527,8 @@ static NTSTATUS pdb_ads_enum_aliasmem(struct pdb_methods *m,
static NTSTATUS pdb_ads_enum_alias_memberships(struct pdb_methods *m,
TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
- const DOM_SID *members,
+ const struct dom_sid *domain_sid,
+ const struct dom_sid *members,
size_t num_members,
uint32_t **palias_rids,
size_t *pnum_alias_rids)
@@ -1622,7 +1622,7 @@ done:
}
static NTSTATUS pdb_ads_lookup_rids(struct pdb_methods *m,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_rids,
uint32 *rids,
const char **names,
@@ -1698,7 +1698,7 @@ static NTSTATUS pdb_ads_lookup_rids(struct pdb_methods *m,
}
static NTSTATUS pdb_ads_lookup_names(struct pdb_methods *m,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_names,
const char **pp_names,
uint32 *rids,
@@ -1895,7 +1895,7 @@ static bool pdb_ads_search_groups(struct pdb_methods *m,
static bool pdb_ads_search_aliases(struct pdb_methods *m,
struct pdb_search *search,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct pdb_ads_search_state *sstate;
char *filter;
@@ -1920,7 +1920,7 @@ static bool pdb_ads_search_aliases(struct pdb_methods *m,
}
static bool pdb_ads_uid_to_sid(struct pdb_methods *m, uid_t uid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
struct pdb_ads_state *state = talloc_get_type_abort(
m->private_data, struct pdb_ads_state);
@@ -1929,7 +1929,7 @@ static bool pdb_ads_uid_to_sid(struct pdb_methods *m, uid_t uid,
}
static bool pdb_ads_gid_to_sid(struct pdb_methods *m, gid_t gid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
struct pdb_ads_state *state = talloc_get_type_abort(
m->private_data, struct pdb_ads_state);
@@ -1937,7 +1937,7 @@ static bool pdb_ads_gid_to_sid(struct pdb_methods *m, gid_t gid,
return true;
}
-static bool pdb_ads_sid_to_id(struct pdb_methods *m, const DOM_SID *sid,
+static bool pdb_ads_sid_to_id(struct pdb_methods *m, const struct dom_sid *sid,
union unid_t *id, enum lsa_SidType *type)
{
struct pdb_ads_state *state = talloc_get_type_abort(
@@ -1996,7 +1996,7 @@ static bool pdb_ads_new_rid(struct pdb_methods *m, uint32 *rid)
static bool pdb_ads_get_trusteddom_pw(struct pdb_methods *m,
const char *domain, char** pwd,
- DOM_SID *sid,
+ struct dom_sid *sid,
time_t *pass_last_set_time)
{
return false;
@@ -2004,7 +2004,7 @@ static bool pdb_ads_get_trusteddom_pw(struct pdb_methods *m,
static bool pdb_ads_set_trusteddom_pw(struct pdb_methods *m,
const char* domain, const char* pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return false;
}
diff --git a/source3/passdb/pdb_compat.c b/source3/passdb/pdb_compat.c
index b65be70758..13a7b5f69f 100644
--- a/source3/passdb/pdb_compat.c
+++ b/source3/passdb/pdb_compat.c
@@ -49,8 +49,8 @@ uint32 pdb_get_group_rid (struct samu *sampass)
bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value_state flag)
{
- DOM_SID u_sid;
- const DOM_SID *global_sam_sid;
+ struct dom_sid u_sid;
+ const struct dom_sid *global_sam_sid;
if (!sampass)
return False;
@@ -75,8 +75,8 @@ bool pdb_set_user_sid_from_rid (struct samu *sampass, uint32 rid, enum pdb_value
bool pdb_set_group_sid_from_rid (struct samu *sampass, uint32 grid, enum pdb_value_state flag)
{
- DOM_SID g_sid;
- const DOM_SID *global_sam_sid;
+ struct dom_sid g_sid;
+ const struct dom_sid *global_sam_sid;
if (!sampass)
return False;
diff --git a/source3/passdb/pdb_get_set.c b/source3/passdb/pdb_get_set.c
index 554e8127d2..96f6b40b2d 100644
--- a/source3/passdb/pdb_get_set.c
+++ b/source3/passdb/pdb_get_set.c
@@ -175,14 +175,14 @@ const char *pdb_get_plaintext_passwd(const struct samu *sampass)
return sampass->plaintext_pw;
}
-const DOM_SID *pdb_get_user_sid(const struct samu *sampass)
+const struct dom_sid *pdb_get_user_sid(const struct samu *sampass)
{
return &sampass->user_sid;
}
-const DOM_SID *pdb_get_group_sid(struct samu *sampass)
+const struct dom_sid *pdb_get_group_sid(struct samu *sampass)
{
- DOM_SID *gsid;
+ struct dom_sid *gsid;
struct passwd *pwd;
bool need_lookup_sid = false;
@@ -193,7 +193,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
/* generate the group SID from the user's primary Unix group */
- if ( !(gsid = TALLOC_ZERO_P( sampass, DOM_SID )) ) {
+ if ( !(gsid = TALLOC_ZERO_P( sampass, struct dom_sid )) ) {
return NULL;
}
@@ -215,7 +215,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
gid_to_sid(gsid, pwd->pw_gid);
if (!is_null_sid(gsid)) {
- DOM_SID dgsid;
+ struct dom_sid dgsid;
uint32_t rid;
sid_copy(&dgsid, gsid);
@@ -246,7 +246,7 @@ const DOM_SID *pdb_get_group_sid(struct samu *sampass)
enum lsa_SidType type = SID_NAME_UNKNOWN;
TALLOC_CTX *mem_ctx;
bool lookup_ret;
- const DOM_SID *usid = pdb_get_user_sid(sampass);
+ const struct dom_sid *usid = pdb_get_user_sid(sampass);
mem_ctx = talloc_init("pdb_get_group_sid");
if (!mem_ctx) {
@@ -525,7 +525,7 @@ bool pdb_set_init_flags(struct samu *sampass, enum pdb_elements element, enum pd
return True;
}
-bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value_state flag)
+bool pdb_set_user_sid(struct samu *sampass, const struct dom_sid *u_sid, enum pdb_value_state flag)
{
if (!u_sid)
return False;
@@ -540,7 +540,7 @@ bool pdb_set_user_sid(struct samu *sampass, const DOM_SID *u_sid, enum pdb_value
bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_value_state flag)
{
- DOM_SID new_sid;
+ struct dom_sid new_sid;
if (!u_sid)
return False;
@@ -569,15 +569,15 @@ bool pdb_set_user_sid_from_string(struct samu *sampass, fstring u_sid, enum pdb_
have to allow the explicitly setting of a group SID here.
********************************************************************/
-bool pdb_set_group_sid(struct samu *sampass, const DOM_SID *g_sid, enum pdb_value_state flag)
+bool pdb_set_group_sid(struct samu *sampass, const struct dom_sid *g_sid, enum pdb_value_state flag)
{
gid_t gid;
- DOM_SID dug_sid;
+ struct dom_sid dug_sid;
if (!g_sid)
return False;
- if ( !(sampass->group_sid = TALLOC_P( sampass, DOM_SID )) ) {
+ if ( !(sampass->group_sid = TALLOC_P( sampass, struct dom_sid )) ) {
return False;
}
diff --git a/source3/passdb/pdb_interface.c b/source3/passdb/pdb_interface.c
index ac53e52d14..4cc8b0815f 100644
--- a/source3/passdb/pdb_interface.c
+++ b/source3/passdb/pdb_interface.c
@@ -270,7 +270,7 @@ static bool guest_user_info( struct samu *user )
/**********************************************************************
**********************************************************************/
-bool pdb_getsampwsid(struct samu *sam_acct, const DOM_SID *sid)
+bool pdb_getsampwsid(struct samu *sam_acct, const struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
uint32_t rid;
@@ -537,7 +537,7 @@ NTSTATUS pdb_update_login_attempts(struct samu *sam_acct, bool success)
return pdb->update_login_attempts(pdb, sam_acct, success);
}
-bool pdb_getgrsid(GROUP_MAP *map, DOM_SID sid)
+bool pdb_getgrsid(GROUP_MAP *map, struct dom_sid sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return NT_STATUS_IS_OK(pdb->getgrsid(pdb, map, sid));
@@ -560,7 +560,7 @@ static NTSTATUS pdb_default_create_dom_group(struct pdb_methods *methods,
const char *name,
uint32_t *rid)
{
- DOM_SID group_sid;
+ struct dom_sid group_sid;
struct group *grp;
fstring tmp;
@@ -605,7 +605,7 @@ static NTSTATUS pdb_default_delete_dom_group(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
uint32_t rid)
{
- DOM_SID group_sid;
+ struct dom_sid group_sid;
GROUP_MAP map;
NTSTATUS status;
struct group *grp;
@@ -670,13 +670,13 @@ NTSTATUS pdb_update_group_mapping_entry(GROUP_MAP *map)
return pdb->update_group_mapping_entry(pdb, map);
}
-NTSTATUS pdb_delete_group_mapping_entry(DOM_SID sid)
+NTSTATUS pdb_delete_group_mapping_entry(struct dom_sid sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->delete_group_mapping_entry(pdb, sid);
}
-bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
+bool pdb_enum_group_mapping(const struct dom_sid *sid, enum lsa_SidType sid_name_use, GROUP_MAP **pp_rmap,
size_t *p_num_entries, bool unix_only)
{
struct pdb_methods *pdb = pdb_get_methods();
@@ -685,7 +685,7 @@ bool pdb_enum_group_mapping(const DOM_SID *sid, enum lsa_SidType sid_name_use, G
}
NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
uint32_t **pp_member_rids,
size_t *p_num_members)
{
@@ -714,7 +714,7 @@ NTSTATUS pdb_enum_group_members(TALLOC_CTX *mem_ctx,
}
NTSTATUS pdb_enum_group_memberships(TALLOC_CTX *mem_ctx, struct samu *user,
- DOM_SID **pp_sids, gid_t **pp_gids,
+ struct dom_sid **pp_sids, gid_t **pp_gids,
size_t *p_num_groups)
{
struct pdb_methods *pdb = pdb_get_methods();
@@ -756,9 +756,9 @@ NTSTATUS pdb_set_unix_primary_group(TALLOC_CTX *mem_ctx, struct samu *user)
*/
static bool pdb_user_in_group(TALLOC_CTX *mem_ctx, struct samu *account,
- const DOM_SID *group_sid)
+ const struct dom_sid *group_sid)
{
- DOM_SID *sids;
+ struct dom_sid *sids;
gid_t *gids;
size_t i, num_groups;
@@ -781,7 +781,7 @@ static NTSTATUS pdb_default_add_groupmem(struct pdb_methods *methods,
uint32_t group_rid,
uint32_t member_rid)
{
- DOM_SID group_sid, member_sid;
+ struct dom_sid group_sid, member_sid;
struct samu *account = NULL;
GROUP_MAP map;
struct group *grp;
@@ -846,7 +846,7 @@ static NTSTATUS pdb_default_del_groupmem(struct pdb_methods *methods,
uint32_t group_rid,
uint32_t member_rid)
{
- DOM_SID group_sid, member_sid;
+ struct dom_sid group_sid, member_sid;
struct samu *account = NULL;
GROUP_MAP map;
struct group *grp;
@@ -909,38 +909,38 @@ NTSTATUS pdb_create_alias(const char *name, uint32_t *rid)
return pdb->create_alias(pdb, name, rid);
}
-NTSTATUS pdb_delete_alias(const DOM_SID *sid)
+NTSTATUS pdb_delete_alias(const struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->delete_alias(pdb, sid);
}
-NTSTATUS pdb_get_aliasinfo(const DOM_SID *sid, struct acct_info *info)
+NTSTATUS pdb_get_aliasinfo(const struct dom_sid *sid, struct acct_info *info)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->get_aliasinfo(pdb, sid, info);
}
-NTSTATUS pdb_set_aliasinfo(const DOM_SID *sid, struct acct_info *info)
+NTSTATUS pdb_set_aliasinfo(const struct dom_sid *sid, struct acct_info *info)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->set_aliasinfo(pdb, sid, info);
}
-NTSTATUS pdb_add_aliasmem(const DOM_SID *alias, const DOM_SID *member)
+NTSTATUS pdb_add_aliasmem(const struct dom_sid *alias, const struct dom_sid *member)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->add_aliasmem(pdb, alias, member);
}
-NTSTATUS pdb_del_aliasmem(const DOM_SID *alias, const DOM_SID *member)
+NTSTATUS pdb_del_aliasmem(const struct dom_sid *alias, const struct dom_sid *member)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->del_aliasmem(pdb, alias, member);
}
-NTSTATUS pdb_enum_aliasmem(const DOM_SID *alias, TALLOC_CTX *mem_ctx,
- DOM_SID **pp_members, size_t *p_num_members)
+NTSTATUS pdb_enum_aliasmem(const struct dom_sid *alias, TALLOC_CTX *mem_ctx,
+ struct dom_sid **pp_members, size_t *p_num_members)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->enum_aliasmem(pdb, alias, mem_ctx, pp_members,
@@ -948,8 +948,8 @@ NTSTATUS pdb_enum_aliasmem(const DOM_SID *alias, TALLOC_CTX *mem_ctx,
}
NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
- const DOM_SID *members, size_t num_members,
+ const struct dom_sid *domain_sid,
+ const struct dom_sid *members, size_t num_members,
uint32_t **pp_alias_rids,
size_t *p_num_alias_rids)
{
@@ -961,7 +961,7 @@ NTSTATUS pdb_enum_alias_memberships(TALLOC_CTX *mem_ctx,
p_num_alias_rids);
}
-NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
+NTSTATUS pdb_lookup_rids(const struct dom_sid *domain_sid,
int num_rids,
uint32_t *rids,
const char **names,
@@ -983,7 +983,7 @@ NTSTATUS pdb_lookup_rids(const DOM_SID *domain_sid,
* used in this context some day.
*/
#if 0
-NTSTATUS pdb_lookup_names(const DOM_SID *domain_sid,
+NTSTATUS pdb_lookup_names(const struct dom_sid *domain_sid,
int num_names,
const char **names,
uint32_t *rids,
@@ -1024,19 +1024,19 @@ bool pdb_get_seq_num(time_t *seq_num)
return NT_STATUS_IS_OK(pdb->get_seq_num(pdb, seq_num));
}
-bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid)
+bool pdb_uid_to_sid(uid_t uid, struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->uid_to_sid(pdb, uid, sid);
}
-bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid)
+bool pdb_gid_to_sid(gid_t gid, struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->gid_to_sid(pdb, gid, sid);
}
-bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
+bool pdb_sid_to_id(const struct dom_sid *sid, union unid_t *id,
enum lsa_SidType *type)
{
struct pdb_methods *pdb = pdb_get_methods();
@@ -1136,7 +1136,7 @@ static NTSTATUS pdb_default_getsampwnam (struct pdb_methods *methods, struct sam
return NT_STATUS_NO_SUCH_USER;
}
-static NTSTATUS pdb_default_getsampwsid(struct pdb_methods *my_methods, struct samu * user, const DOM_SID *sid)
+static NTSTATUS pdb_default_getsampwsid(struct pdb_methods *my_methods, struct samu * user, const struct dom_sid *sid)
{
return NT_STATUS_NO_SUCH_USER;
}
@@ -1185,7 +1185,7 @@ static NTSTATUS pdb_default_get_seq_num(struct pdb_methods *methods, time_t *seq
}
static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
struct samu *sampw = NULL;
struct passwd *unix_pw;
@@ -1224,7 +1224,7 @@ static bool pdb_default_uid_to_sid(struct pdb_methods *methods, uid_t uid,
}
static bool pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
GROUP_MAP map;
@@ -1237,7 +1237,7 @@ static bool pdb_default_gid_to_sid(struct pdb_methods *methods, gid_t gid,
}
static bool pdb_default_sid_to_id(struct pdb_methods *methods,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
union unid_t *id, enum lsa_SidType *type)
{
TALLOC_CTX *mem_ctx;
@@ -1367,7 +1367,7 @@ static bool get_memberuids(TALLOC_CTX *mem_ctx, gid_t gid, uid_t **pp_uids, size
static NTSTATUS pdb_default_enum_group_members(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
- const DOM_SID *group,
+ const struct dom_sid *group,
uint32_t **pp_member_rids,
size_t *p_num_members)
{
@@ -1390,7 +1390,7 @@ static NTSTATUS pdb_default_enum_group_members(struct pdb_methods *methods,
*pp_member_rids = TALLOC_ZERO_ARRAY(mem_ctx, uint32_t, num_uids);
for (i=0; i<num_uids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
uid_to_sid(&sid, uids[i]);
@@ -1410,7 +1410,7 @@ static NTSTATUS pdb_default_enum_group_members(struct pdb_methods *methods,
static NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
struct samu *user,
- DOM_SID **pp_sids,
+ struct dom_sid **pp_sids,
gid_t **pp_gids,
size_t *p_num_groups)
{
@@ -1439,7 +1439,7 @@ static NTSTATUS pdb_default_enum_group_memberships(struct pdb_methods *methods,
smb_panic("primary group missing");
}
- *pp_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, *p_num_groups);
+ *pp_sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, *p_num_groups);
if (*pp_sids == NULL) {
TALLOC_FREE(*pp_gids);
@@ -1465,7 +1465,7 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,
struct samu *sam_account = NULL;
GROUP_MAP map;
bool ret;
- DOM_SID sid;
+ struct dom_sid sid;
*psid_name_use = SID_NAME_UNKNOWN;
@@ -1547,7 +1547,7 @@ static bool lookup_global_sam_rid(TALLOC_CTX *mem_ctx, uint32_t rid,
}
static NTSTATUS pdb_default_lookup_rids(struct pdb_methods *methods,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_rids,
uint32_t *rids,
const char **names,
@@ -1611,7 +1611,7 @@ static NTSTATUS pdb_default_lookup_rids(struct pdb_methods *methods,
#if 0
static NTSTATUS pdb_default_lookup_names(struct pdb_methods *methods,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_names,
const char **names,
uint32_t *rids,
@@ -1760,7 +1760,7 @@ static void search_end_groups(struct pdb_search *search)
}
static bool pdb_search_grouptype(struct pdb_search *search,
- const DOM_SID *sid, enum lsa_SidType type)
+ const struct dom_sid *sid, enum lsa_SidType type)
{
struct group_search *state;
@@ -1791,7 +1791,7 @@ static bool pdb_default_search_groups(struct pdb_methods *methods,
static bool pdb_default_search_aliases(struct pdb_methods *methods,
struct pdb_search *search,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return pdb_search_grouptype(search, sid, SID_NAME_ALIAS);
@@ -1857,7 +1857,7 @@ struct pdb_search *pdb_search_groups(TALLOC_CTX *mem_ctx)
return result;
}
-struct pdb_search *pdb_search_aliases(TALLOC_CTX *mem_ctx, const DOM_SID *sid)
+struct pdb_search *pdb_search_aliases(TALLOC_CTX *mem_ctx, const struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
struct pdb_search *result;
@@ -1903,7 +1903,7 @@ uint32_t pdb_search_entries(struct pdb_search *search,
trustdom methods
*******************************************************************/
-bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid,
+bool pdb_get_trusteddom_pw(const char *domain, char** pwd, struct dom_sid *sid,
time_t *pass_last_set_time)
{
struct pdb_methods *pdb = pdb_get_methods();
@@ -1912,7 +1912,7 @@ bool pdb_get_trusteddom_pw(const char *domain, char** pwd, DOM_SID *sid,
}
bool pdb_set_trusteddom_pw(const char* domain, const char* pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct pdb_methods *pdb = pdb_get_methods();
return pdb->set_trusteddom_pw(pdb, domain, pwd, sid);
@@ -1940,7 +1940,7 @@ NTSTATUS pdb_enum_trusteddoms(TALLOC_CTX *mem_ctx, uint32_t *num_domains,
static bool pdb_default_get_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
char** pwd,
- DOM_SID *sid,
+ struct dom_sid *sid,
time_t *pass_last_set_time)
{
return secrets_fetch_trusted_domain_password(domain, pwd,
@@ -1951,7 +1951,7 @@ static bool pdb_default_get_trusteddom_pw(struct pdb_methods *methods,
static bool pdb_default_set_trusteddom_pw(struct pdb_methods *methods,
const char* domain,
const char* pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return secrets_store_trusted_domain_password(domain, pwd, sid);
}
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c
index 32eacd1bc8..9e85ca67ed 100644
--- a/source3/passdb/pdb_ldap.c
+++ b/source3/passdb/pdb_ldap.c
@@ -399,7 +399,7 @@ static int ldapsam_search_suffix_by_rid (struct ldapsam_privates *ldap_state,
******************************************************************/
static int ldapsam_search_suffix_by_sid (struct ldapsam_privates *ldap_state,
- const DOM_SID *sid, LDAPMessage ** result,
+ const struct dom_sid *sid, LDAPMessage ** result,
const char **attr)
{
char *filter = NULL;
@@ -1032,8 +1032,8 @@ static bool init_sam_from_ldap(struct ldapsam_privates *ldap_state,
struct passwd unix_pw;
bool have_uid = false;
bool have_gid = false;
- DOM_SID mapped_gsid;
- const DOM_SID *primary_gsid;
+ struct dom_sid mapped_gsid;
+ const struct dom_sid *primary_gsid;
ZERO_STRUCT(unix_pw);
@@ -1201,7 +1201,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
/* only update the RID if we actually need to */
if (need_update(sampass, PDB_USERSID)) {
fstring sid_string;
- const DOM_SID *user_sid = pdb_get_user_sid(sampass);
+ const struct dom_sid *user_sid = pdb_get_user_sid(sampass);
switch ( ldap_state->schema_ver ) {
case SCHEMAVER_SAMBAACCOUNT:
@@ -1238,7 +1238,7 @@ static bool init_ldap_from_sam (struct ldapsam_privates *ldap_state,
if (need_update(sampass, PDB_GROUPSID)) {
fstring sid_string;
- const DOM_SID *group_sid = pdb_get_group_sid(sampass);
+ const struct dom_sid *group_sid = pdb_get_group_sid(sampass);
switch ( ldap_state->schema_ver ) {
case SCHEMAVER_SAMBAACCOUNT:
@@ -1624,7 +1624,7 @@ static NTSTATUS ldapsam_getsampwnam(struct pdb_methods *my_methods, struct samu
}
static int ldapsam_get_ldap_user_by_sid(struct ldapsam_privates *ldap_state,
- const DOM_SID *sid, LDAPMessage **result)
+ const struct dom_sid *sid, LDAPMessage **result)
{
int rc = -1;
const char ** attr_list;
@@ -1674,7 +1674,7 @@ static int ldapsam_get_ldap_user_by_sid(struct ldapsam_privates *ldap_state,
Get struct samu entry from LDAP by SID.
*********************************************************************/
-static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, struct samu * user, const DOM_SID *sid)
+static NTSTATUS ldapsam_getsampwsid(struct pdb_methods *my_methods, struct samu * user, const struct dom_sid *sid)
{
struct ldapsam_privates *ldap_state = (struct ldapsam_privates *)my_methods->private_data;
LDAPMessage *result = NULL;
@@ -2074,7 +2074,7 @@ static NTSTATUS ldapsam_del_groupmem(struct pdb_methods *my_methods,
static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
struct samu *user,
- DOM_SID **pp_sids,
+ struct dom_sid **pp_sids,
gid_t **pp_gids,
size_t *p_num_groups);
@@ -2179,7 +2179,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s
const char **attr_list;
char *escape_user = NULL;
const char *username = pdb_get_username(newpwd);
- const DOM_SID *sid = pdb_get_user_sid(newpwd);
+ const struct dom_sid *sid = pdb_get_user_sid(newpwd);
char *filter = NULL;
char *dn = NULL;
NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
@@ -2592,7 +2592,7 @@ static NTSTATUS ldapsam_getgroup(struct pdb_methods *methods,
*********************************************************************/
static NTSTATUS ldapsam_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
- DOM_SID sid)
+ struct dom_sid sid)
{
char *filter = NULL;
NTSTATUS status;
@@ -2662,11 +2662,11 @@ static NTSTATUS ldapsam_getgrnam(struct pdb_methods *methods, GROUP_MAP *map,
static bool ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
LDAPMessage *entry,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
uint32_t *rid)
{
fstring str;
- DOM_SID sid;
+ struct dom_sid sid;
if (!smbldap_get_single_attribute(ldap_struct, entry, "sambaSID",
str, sizeof(str)-1)) {
@@ -2695,7 +2695,7 @@ static bool ldapsam_extract_rid_from_entry(LDAP *ldap_struct,
static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
- const DOM_SID *group,
+ const struct dom_sid *group,
uint32_t **pp_member_rids,
size_t *p_num_members)
{
@@ -2813,7 +2813,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
entry = ldap_next_entry(conn->ldap_struct, entry))
{
char *sidstr;
- DOM_SID sid;
+ struct dom_sid sid;
uint32_t rid;
sidstr = smbldap_talloc_single_attribute(conn->ldap_struct,
@@ -2896,7 +2896,7 @@ static NTSTATUS ldapsam_enum_group_members(struct pdb_methods *methods,
static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
struct samu *user,
- DOM_SID **pp_sids,
+ struct dom_sid **pp_sids,
gid_t **pp_gids,
size_t *p_num_groups)
{
@@ -3013,7 +3013,7 @@ static NTSTATUS ldapsam_enum_group_memberships(struct pdb_methods *methods,
entry = ldap_next_entry(conn->ldap_struct, entry))
{
fstring str;
- DOM_SID sid;
+ struct dom_sid sid;
gid_t gid;
char *end;
@@ -3138,7 +3138,7 @@ static NTSTATUS ldapsam_add_group_mapping_entry(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx;
NTSTATUS result;
- DOM_SID sid;
+ struct dom_sid sid;
int rc;
@@ -3343,7 +3343,7 @@ static NTSTATUS ldapsam_update_group_mapping_entry(struct pdb_methods *methods,
*********************************************************************/
static NTSTATUS ldapsam_delete_group_mapping_entry(struct pdb_methods *methods,
- DOM_SID sid)
+ struct dom_sid sid)
{
struct ldapsam_privates *priv =
(struct ldapsam_privates *)methods->private_data;
@@ -3506,7 +3506,7 @@ static NTSTATUS ldapsam_getsamgrent(struct pdb_methods *my_methods,
*********************************************************************/
static NTSTATUS ldapsam_enum_group_mapping(struct pdb_methods *methods,
- const DOM_SID *domsid, enum lsa_SidType sid_name_use,
+ const struct dom_sid *domsid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap,
size_t *p_num_entries,
bool unix_only)
@@ -3556,8 +3556,8 @@ static NTSTATUS ldapsam_enum_group_mapping(struct pdb_methods *methods,
}
static NTSTATUS ldapsam_modify_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias,
- const DOM_SID *member,
+ const struct dom_sid *alias,
+ const struct dom_sid *member,
int modop)
{
struct ldapsam_privates *ldap_state =
@@ -3661,24 +3661,24 @@ static NTSTATUS ldapsam_modify_aliasmem(struct pdb_methods *methods,
}
static NTSTATUS ldapsam_add_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias,
- const DOM_SID *member)
+ const struct dom_sid *alias,
+ const struct dom_sid *member)
{
return ldapsam_modify_aliasmem(methods, alias, member, LDAP_MOD_ADD);
}
static NTSTATUS ldapsam_del_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias,
- const DOM_SID *member)
+ const struct dom_sid *alias,
+ const struct dom_sid *member)
{
return ldapsam_modify_aliasmem(methods, alias, member,
LDAP_MOD_DELETE);
}
static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias,
+ const struct dom_sid *alias,
TALLOC_CTX *mem_ctx,
- DOM_SID **pp_members,
+ struct dom_sid **pp_members,
size_t *p_num_members)
{
struct ldapsam_privates *ldap_state =
@@ -3764,7 +3764,7 @@ static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods,
count = ldap_count_values(values);
for (i=0; i<count; i++) {
- DOM_SID member;
+ struct dom_sid member;
NTSTATUS status;
if (!string_to_sid(&member, values[i]))
@@ -3788,8 +3788,8 @@ static NTSTATUS ldapsam_enum_aliasmem(struct pdb_methods *methods,
static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
- const DOM_SID *members,
+ const struct dom_sid *domain_sid,
+ const struct dom_sid *members,
size_t num_members,
uint32_t **pp_alias_rids,
size_t *p_num_alias_rids)
@@ -3869,7 +3869,7 @@ static NTSTATUS ldapsam_alias_memberships(struct pdb_methods *methods,
entry = ldap_next_entry(ldap_struct, entry))
{
fstring sid_str;
- DOM_SID sid;
+ struct dom_sid sid;
uint32_t rid;
if (!smbldap_get_single_attribute(ldap_struct, entry,
@@ -4098,7 +4098,7 @@ static NTSTATUS ldapsam_get_account_policy(struct pdb_methods *methods,
}
static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_rids,
uint32_t *rids,
const char **names,
@@ -4141,7 +4141,7 @@ static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
}
for (i=0; i<num_rids; i++) {
- DOM_SID sid;
+ struct dom_sid sid;
sid_compose(&sid, domain_sid, rids[i]);
allsids = talloc_asprintf_append_buffer(
allsids, "(sambaSid=%s)",
@@ -4557,7 +4557,7 @@ static bool ldapuser2displayentry(struct ldap_search_state *state,
{
char **vals;
size_t converted_size;
- DOM_SID sid;
+ struct dom_sid sid;
uint32_t acct_flags;
vals = ldap_get_values(ld, entry, "sambaAcctFlags");
@@ -4703,7 +4703,7 @@ static bool ldapgroup2displayentry(struct ldap_search_state *state,
{
char **vals;
size_t converted_size;
- DOM_SID sid;
+ struct dom_sid sid;
uint16_t group_type;
result->account_name = "";
@@ -4822,7 +4822,7 @@ static bool ldapgroup2displayentry(struct ldap_search_state *state,
static bool ldapsam_search_grouptype(struct pdb_methods *methods,
struct pdb_search *search,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
enum lsa_SidType type)
{
struct ldapsam_privates *ldap_state =
@@ -4874,7 +4874,7 @@ static bool ldapsam_search_groups(struct pdb_methods *methods,
static bool ldapsam_search_aliases(struct pdb_methods *methods,
struct pdb_search *search,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return ldapsam_search_grouptype(methods, search, sid, SID_NAME_ALIAS);
}
@@ -5010,7 +5010,7 @@ static bool ldapsam_new_rid(struct pdb_methods *methods, uint32_t *rid)
}
static bool ldapsam_sid_to_id(struct pdb_methods *methods,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
union unid_t *id, enum lsa_SidType *type)
{
struct ldapsam_privates *priv =
@@ -5107,7 +5107,7 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
* This is shortcut is only used if ldapsam:trusted is set to true.
*/
static bool ldapsam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
struct ldapsam_privates *priv =
(struct ldapsam_privates *)methods->private_data;
@@ -5179,7 +5179,7 @@ static bool ldapsam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
* This is shortcut is only used if ldapsam:trusted is set to true.
*/
static bool ldapsam_gid_to_sid(struct pdb_methods *methods, gid_t gid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
struct ldapsam_privates *priv =
(struct ldapsam_privates *)methods->private_data;
@@ -5189,7 +5189,7 @@ static bool ldapsam_gid_to_sid(struct pdb_methods *methods, gid_t gid,
LDAPMessage *entry = NULL;
bool ret = false;
char *group_sid_string;
- DOM_SID group_sid;
+ struct dom_sid group_sid;
int rc;
TALLOC_CTX *tmp_ctx = talloc_stackframe();
@@ -5278,8 +5278,8 @@ static NTSTATUS ldapsam_create_user(struct pdb_methods *my_methods,
char *uidstr;
char *shell;
const char *dn = NULL;
- DOM_SID group_sid;
- DOM_SID user_sid;
+ struct dom_sid group_sid;
+ struct dom_sid user_sid;
gid_t gid = -1;
uid_t uid = -1;
NTSTATUS ret;
@@ -5598,7 +5598,7 @@ static NTSTATUS ldapsam_create_dom_group(struct pdb_methods *my_methods,
char *grouptype;
char *gidstr;
const char *dn = NULL;
- DOM_SID group_sid;
+ struct dom_sid group_sid;
gid_t gid = -1;
int rc;
@@ -5744,7 +5744,7 @@ static NTSTATUS ldapsam_delete_dom_group(struct pdb_methods *my_methods, TALLOC_
const char *dn;
char *gidstr;
char *filter;
- DOM_SID group_sid;
+ struct dom_sid group_sid;
int rc;
/* get the group sid */
@@ -5843,8 +5843,8 @@ static NTSTATUS ldapsam_change_groupmem(struct pdb_methods *my_methods,
char *filter;
char *uidstr;
const char *dn = NULL;
- DOM_SID group_sid;
- DOM_SID member_sid;
+ struct dom_sid group_sid;
+ struct dom_sid member_sid;
int rc;
switch (modop) {
@@ -6178,7 +6178,7 @@ static bool get_trusteddom_pw_int(struct ldapsam_privates *ldap_state,
static bool ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
char** pwd,
- DOM_SID *sid,
+ struct dom_sid *sid,
time_t *pass_last_set_time)
{
struct ldapsam_privates *ldap_state =
@@ -6241,7 +6241,7 @@ static bool ldapsam_get_trusteddom_pw(struct pdb_methods *methods,
static bool ldapsam_set_trusteddom_pw(struct pdb_methods *methods,
const char* domain,
const char* pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
struct ldapsam_privates *ldap_state =
(struct ldapsam_privates *)methods->private_data;
@@ -6560,8 +6560,8 @@ NTSTATUS pdb_init_ldapsam(struct pdb_methods **pdb_method, const char *location)
char *alg_rid_base_string = NULL;
LDAPMessage *result = NULL;
LDAPMessage *entry = NULL;
- DOM_SID ldap_domain_sid;
- DOM_SID secrets_domain_sid;
+ struct dom_sid ldap_domain_sid;
+ struct dom_sid secrets_domain_sid;
char *domain_sid_string = NULL;
char *dn = NULL;
char *uri = talloc_strdup( NULL, location );
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 78bd0e7561..bfd996436e 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -1317,7 +1317,7 @@ static NTSTATUS smbpasswd_getsampwnam(struct pdb_methods *my_methods,
return NT_STATUS_OK;
}
-static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct samu *sam_acct, const DOM_SID *sid)
+static NTSTATUS smbpasswd_getsampwsid(struct pdb_methods *my_methods, struct samu *sam_acct, const struct dom_sid *sid)
{
NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL;
struct smbpasswd_privates *smbpasswd_state = (struct smbpasswd_privates*)my_methods->private_data;
diff --git a/source3/passdb/pdb_tdb.c b/source3/passdb/pdb_tdb.c
index c413ec3be7..526633b58d 100644
--- a/source3/passdb/pdb_tdb.c
+++ b/source3/passdb/pdb_tdb.c
@@ -617,7 +617,7 @@ static NTSTATUS tdbsam_getsampwrid (struct pdb_methods *my_methods,
}
static NTSTATUS tdbsam_getsampwsid(struct pdb_methods *my_methods,
- struct samu * user, const DOM_SID *sid)
+ struct samu * user, const struct dom_sid *sid)
{
uint32 rid;
diff --git a/source3/passdb/pdb_wbc_sam.c b/source3/passdb/pdb_wbc_sam.c
index df80411a7a..e90cd109a5 100644
--- a/source3/passdb/pdb_wbc_sam.c
+++ b/source3/passdb/pdb_wbc_sam.c
@@ -64,26 +64,26 @@ static NTSTATUS pdb_wbc_sam_getsampwnam(struct pdb_methods *methods, struct samu
return _pdb_wbc_sam_getsampw(methods, user, winbind_getpwnam(sname));
}
-static NTSTATUS pdb_wbc_sam_getsampwsid(struct pdb_methods *methods, struct samu *user, const DOM_SID *sid)
+static NTSTATUS pdb_wbc_sam_getsampwsid(struct pdb_methods *methods, struct samu *user, const struct dom_sid *sid)
{
return _pdb_wbc_sam_getsampw(methods, user, winbind_getpwsid(sid));
}
static bool pdb_wbc_sam_uid_to_sid(struct pdb_methods *methods, uid_t uid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
return winbind_uid_to_sid(sid, uid);
}
static bool pdb_wbc_sam_gid_to_sid(struct pdb_methods *methods, gid_t gid,
- DOM_SID *sid)
+ struct dom_sid *sid)
{
return winbind_gid_to_sid(sid, gid);
}
static NTSTATUS pdb_wbc_sam_enum_group_members(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
- const DOM_SID *group,
+ const struct dom_sid *group,
uint32 **pp_member_rids,
size_t *p_num_members)
{
@@ -93,7 +93,7 @@ static NTSTATUS pdb_wbc_sam_enum_group_members(struct pdb_methods *methods,
static NTSTATUS pdb_wbc_sam_enum_group_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
struct samu *user,
- DOM_SID **pp_sids,
+ struct dom_sid **pp_sids,
gid_t **pp_gids,
size_t *p_num_groups)
{
@@ -110,7 +110,7 @@ static NTSTATUS pdb_wbc_sam_enum_group_memberships(struct pdb_methods *methods,
smb_panic("primary group missing");
}
- *pp_sids = TALLOC_ARRAY(mem_ctx, DOM_SID, *p_num_groups);
+ *pp_sids = TALLOC_ARRAY(mem_ctx, struct dom_sid, *p_num_groups);
if (*pp_sids == NULL) {
TALLOC_FREE(*pp_gids);
@@ -125,7 +125,7 @@ static NTSTATUS pdb_wbc_sam_enum_group_memberships(struct pdb_methods *methods,
}
static NTSTATUS pdb_wbc_sam_lookup_rids(struct pdb_methods *methods,
- const DOM_SID *domain_sid,
+ const struct dom_sid *domain_sid,
int num_rids,
uint32 *rids,
const char **names,
@@ -185,7 +185,7 @@ static bool pdb_wbc_sam_search_groups(struct pdb_methods *methods,
static bool pdb_wbc_sam_search_aliases(struct pdb_methods *methods,
struct pdb_search *search,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return false;
@@ -194,7 +194,7 @@ static bool pdb_wbc_sam_search_aliases(struct pdb_methods *methods,
static bool pdb_wbc_sam_get_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
char **pwd,
- DOM_SID *sid,
+ struct dom_sid *sid,
time_t *pass_last_set_time)
{
return false;
@@ -204,7 +204,7 @@ static bool pdb_wbc_sam_get_trusteddom_pw(struct pdb_methods *methods,
static bool pdb_wbc_sam_set_trusteddom_pw(struct pdb_methods *methods,
const char *domain,
const char *pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
return false;
}
@@ -223,7 +223,7 @@ static NTSTATUS pdb_wbc_sam_enum_trusteddoms(struct pdb_methods *methods,
return NT_STATUS_NOT_IMPLEMENTED;
}
-static bool _make_group_map(struct pdb_methods *methods, const char *domain, const char *name, enum lsa_SidType name_type, gid_t gid, DOM_SID *sid, GROUP_MAP *map)
+static bool _make_group_map(struct pdb_methods *methods, const char *domain, const char *name, enum lsa_SidType name_type, gid_t gid, struct dom_sid *sid, GROUP_MAP *map)
{
snprintf(map->nt_name, sizeof(map->nt_name), "%s%c%s",
domain, *lp_winbind_separator(), name);
@@ -234,7 +234,7 @@ static bool _make_group_map(struct pdb_methods *methods, const char *domain, con
}
static NTSTATUS pdb_wbc_sam_getgrsid(struct pdb_methods *methods, GROUP_MAP *map,
- DOM_SID sid)
+ struct dom_sid sid)
{
NTSTATUS result = NT_STATUS_OK;
char *name = NULL;
@@ -278,7 +278,7 @@ static NTSTATUS pdb_wbc_sam_getgrgid(struct pdb_methods *methods, GROUP_MAP *map
NTSTATUS result = NT_STATUS_OK;
char *name = NULL;
char *domain = NULL;
- DOM_SID sid;
+ struct dom_sid sid;
enum lsa_SidType name_type;
if (!winbind_gid_to_sid(&sid, gid)) {
@@ -317,7 +317,7 @@ static NTSTATUS pdb_wbc_sam_getgrnam(struct pdb_methods *methods, GROUP_MAP *map
{
NTSTATUS result = NT_STATUS_OK;
const char *domain = "";
- DOM_SID sid;
+ struct dom_sid sid;
gid_t gid;
enum lsa_SidType name_type;
@@ -350,7 +350,7 @@ done:
}
static NTSTATUS pdb_wbc_sam_enum_group_mapping(struct pdb_methods *methods,
- const DOM_SID *sid, enum lsa_SidType sid_name_use,
+ const struct dom_sid *sid, enum lsa_SidType sid_name_use,
GROUP_MAP **pp_rmap, size_t *p_num_entries,
bool unix_only)
{
@@ -358,16 +358,16 @@ static NTSTATUS pdb_wbc_sam_enum_group_mapping(struct pdb_methods *methods,
}
static NTSTATUS pdb_wbc_sam_get_aliasinfo(struct pdb_methods *methods,
- const DOM_SID *sid,
+ const struct dom_sid *sid,
struct acct_info *info)
{
return NT_STATUS_NOT_IMPLEMENTED;
}
static NTSTATUS pdb_wbc_sam_enum_aliasmem(struct pdb_methods *methods,
- const DOM_SID *alias,
+ const struct dom_sid *alias,
TALLOC_CTX *mem_ctx,
- DOM_SID **pp_members,
+ struct dom_sid **pp_members,
size_t *p_num_members)
{
return NT_STATUS_NOT_IMPLEMENTED;
@@ -375,8 +375,8 @@ static NTSTATUS pdb_wbc_sam_enum_aliasmem(struct pdb_methods *methods,
static NTSTATUS pdb_wbc_sam_alias_memberships(struct pdb_methods *methods,
TALLOC_CTX *mem_ctx,
- const DOM_SID *domain_sid,
- const DOM_SID *members,
+ const struct dom_sid *domain_sid,
+ const struct dom_sid *members,
size_t num_members,
uint32 **pp_alias_rids,
size_t *p_num_alias_rids)
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index a0bc4cea94..b673ad12a4 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -214,7 +214,7 @@ static char *trustdom_keystr(const char *domain)
************************************************************************/
bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
- DOM_SID *sid, time_t *pass_last_set_time)
+ struct dom_sid *sid, time_t *pass_last_set_time)
{
struct TRUSTED_DOM_PASS pass;
enum ndr_err_code ndr_err;
@@ -266,7 +266,7 @@ bool secrets_fetch_trusted_domain_password(const char *domain, char** pwd,
**/
bool secrets_store_trusted_domain_password(const char* domain, const char* pwd,
- const DOM_SID *sid)
+ const struct dom_sid *sid)
{
bool ret;
diff --git a/source3/passdb/util_builtin.c b/source3/passdb/util_builtin.c
index 2b8bb6e573..05a46371b3 100644
--- a/source3/passdb/util_builtin.c
+++ b/source3/passdb/util_builtin.c
@@ -102,7 +102,7 @@ const char *builtin_domain_name(void)
Check if the SID is the builtin SID (S-1-5-32).
*****************************************************************/
-bool sid_check_is_builtin(const DOM_SID *sid)
+bool sid_check_is_builtin(const struct dom_sid *sid)
{
return sid_equal(sid, &global_sid_Builtin);
}
@@ -111,9 +111,9 @@ bool sid_check_is_builtin(const DOM_SID *sid)
Check if the SID is one of the builtin SIDs (S-1-5-32-a).
*****************************************************************/
-bool sid_check_is_in_builtin(const DOM_SID *sid)
+bool sid_check_is_in_builtin(const struct dom_sid *sid)
{
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
diff --git a/source3/passdb/util_unixsids.c b/source3/passdb/util_unixsids.c
index afda253c70..08c887e9fa 100644
--- a/source3/passdb/util_unixsids.c
+++ b/source3/passdb/util_unixsids.c
@@ -19,14 +19,14 @@
#include "includes.h"
-bool sid_check_is_unix_users(const DOM_SID *sid)
+bool sid_check_is_unix_users(const struct dom_sid *sid)
{
return sid_equal(sid, &global_sid_Unix_Users);
}
-bool sid_check_is_in_unix_users(const DOM_SID *sid)
+bool sid_check_is_in_unix_users(const struct dom_sid *sid)
{
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
@@ -35,12 +35,12 @@ bool sid_check_is_in_unix_users(const DOM_SID *sid)
return sid_check_is_unix_users(&dom_sid);
}
-bool uid_to_unix_users_sid(uid_t uid, DOM_SID *sid)
+bool uid_to_unix_users_sid(uid_t uid, struct dom_sid *sid)
{
return sid_compose(sid, &global_sid_Unix_Users, uid);
}
-bool gid_to_unix_groups_sid(gid_t gid, DOM_SID *sid)
+bool gid_to_unix_groups_sid(gid_t gid, struct dom_sid *sid)
{
return sid_compose(sid, &global_sid_Unix_Groups, gid);
}
@@ -50,7 +50,7 @@ const char *unix_users_domain_name(void)
return "Unix User";
}
-bool lookup_unix_user_name(const char *name, DOM_SID *sid)
+bool lookup_unix_user_name(const char *name, struct dom_sid *sid)
{
struct passwd *pwd;
bool ret;
@@ -69,14 +69,14 @@ bool lookup_unix_user_name(const char *name, DOM_SID *sid)
return ret;
}
-bool sid_check_is_unix_groups(const DOM_SID *sid)
+bool sid_check_is_unix_groups(const struct dom_sid *sid)
{
return sid_equal(sid, &global_sid_Unix_Groups);
}
-bool sid_check_is_in_unix_groups(const DOM_SID *sid)
+bool sid_check_is_in_unix_groups(const struct dom_sid *sid)
{
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
@@ -90,7 +90,7 @@ const char *unix_groups_domain_name(void)
return "Unix Group";
}
-bool lookup_unix_group_name(const char *name, DOM_SID *sid)
+bool lookup_unix_group_name(const char *name, struct dom_sid *sid)
{
struct group *grp;
diff --git a/source3/passdb/util_wellknown.c b/source3/passdb/util_wellknown.c
index 0c45faab46..7f670f9225 100644
--- a/source3/passdb/util_wellknown.c
+++ b/source3/passdb/util_wellknown.c
@@ -29,7 +29,7 @@ struct rid_name_map {
struct sid_name_map_info
{
- const DOM_SID *sid;
+ const struct dom_sid *sid;
const char *name;
const struct rid_name_map *known_users;
};
@@ -70,7 +70,7 @@ static struct sid_name_map_info special_domains[] = {
{ &global_sid_NT_Authority, "NT Authority", nt_authority_users },
{ NULL, NULL, NULL }};
-bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
+bool sid_check_is_wellknown_domain(const struct dom_sid *sid, const char **name)
{
int i;
@@ -85,9 +85,9 @@ bool sid_check_is_wellknown_domain(const DOM_SID *sid, const char **name)
return False;
}
-bool sid_check_is_in_wellknown_domain(const DOM_SID *sid)
+bool sid_check_is_in_wellknown_domain(const struct dom_sid *sid)
{
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
sid_copy(&dom_sid, sid);
@@ -100,11 +100,11 @@ bool sid_check_is_in_wellknown_domain(const DOM_SID *sid)
Looks up a known username from one of the known domains.
***************************************************************************/
-bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
+bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid,
const char **domain, const char **name)
{
int i;
- DOM_SID dom_sid;
+ struct dom_sid dom_sid;
uint32 rid;
const struct rid_name_map *users = NULL;
@@ -145,7 +145,7 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const DOM_SID *sid,
***************************************************************************/
bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name,
- DOM_SID *sid, const char **domain)
+ struct dom_sid *sid, const char **domain)
{
int i, j;