summaryrefslogtreecommitdiff
path: root/source3/passdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-04-05 23:56:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:11 -0500
commitbc45c82904e268327bfbf72cd3f35699ae6e7397 (patch)
tree1ff4f7e3d1befc81659a01f1dedf72756ff020a6 /source3/passdb
parent90dc2613153bb8c865a1cfda0318ae4db3cf212e (diff)
downloadsamba-bc45c82904e268327bfbf72cd3f35699ae6e7397.tar.gz
samba-bc45c82904e268327bfbf72cd3f35699ae6e7397.tar.bz2
samba-bc45c82904e268327bfbf72cd3f35699ae6e7397.zip
r22096: become_root_uid_only() is unneeded - it's only used in
messages.c. Refactor to use become_root() instead and make it local to messages.c Jeremy. (This used to be commit f3ffb3f98472b69b476b702dfe5c0575b32da018)
Diffstat (limited to 'source3/passdb')
-rw-r--r--source3/passdb/lookup_sid.c24
-rw-r--r--source3/passdb/passdb.c8
2 files changed, 16 insertions, 16 deletions
diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c
index cd9d8d7092..b260d8ce57 100644
--- a/source3/passdb/lookup_sid.c
+++ b/source3/passdb/lookup_sid.c
@@ -465,10 +465,10 @@ static BOOL lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
return False;
}
- become_root_uid_only();
+ become_root();
result = pdb_lookup_rids(domain_sid, num_rids, rids,
*names, *types);
- unbecome_root_uid_only();
+ unbecome_root();
return (NT_STATUS_IS_OK(result) ||
NT_STATUS_EQUAL(result, NT_STATUS_NONE_MAPPED) ||
@@ -1127,9 +1127,9 @@ void legacy_uid_to_sid(DOM_SID *psid, uid_t uid)
ZERO_STRUCTP(psid);
- become_root_uid_only();
+ become_root();
ret = pdb_uid_to_rid(uid, &rid);
- unbecome_root_uid_only();
+ unbecome_root();
if (ret) {
/* This is a mapped user */
@@ -1160,9 +1160,9 @@ void legacy_gid_to_sid(DOM_SID *psid, gid_t gid)
ZERO_STRUCTP(psid);
- become_root_uid_only();
+ become_root();
ret = pdb_gid_to_sid(gid, psid);
- unbecome_root_uid_only();
+ unbecome_root();
if (ret) {
/* This is a mapped group */
@@ -1200,9 +1200,9 @@ BOOL legacy_sid_to_uid(const DOM_SID *psid, uid_t *puid)
union unid_t id;
BOOL ret;
- become_root_uid_only();
+ become_root();
ret = pdb_sid_to_id(psid, &id, &type);
- unbecome_root_uid_only();
+ unbecome_root();
if (ret) {
if (type != SID_NAME_USER) {
@@ -1251,9 +1251,9 @@ BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
sid_check_is_in_wellknown_domain(psid))) {
BOOL ret;
- become_root_uid_only();
+ become_root();
ret = pdb_getgrsid(&map, *psid);
- unbecome_root_uid_only();
+ unbecome_root();
if (ret) {
*pgid = map.gid;
@@ -1266,9 +1266,9 @@ BOOL legacy_sid_to_gid(const DOM_SID *psid, gid_t *pgid)
if (sid_peek_check_rid(get_global_sam_sid(), psid, &rid)) {
BOOL ret;
- become_root_uid_only();
+ become_root();
ret = pdb_sid_to_id(psid, &id, &type);
- unbecome_root_uid_only();
+ unbecome_root();
if (ret) {
if ((type != SID_NAME_DOM_GRP) &&
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index a061977f3c..0ad5e21c78 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -1390,9 +1390,9 @@ BOOL pdb_update_bad_password_count(struct samu *sampass, BOOL *updated)
return True;
}
- become_root_uid_only();
+ become_root();
res = pdb_get_account_policy(AP_RESET_COUNT_TIME, &resettime);
- unbecome_root_uid_only();
+ unbecome_root();
if (!res) {
DEBUG(0, ("pdb_update_bad_password_count: pdb_get_account_policy failed.\n"));
@@ -1435,9 +1435,9 @@ BOOL pdb_update_autolock_flag(struct samu *sampass, BOOL *updated)
return True;
}
- become_root_uid_only();
+ become_root();
res = pdb_get_account_policy(AP_LOCK_ACCOUNT_DURATION, &duration);
- unbecome_root_uid_only();
+ unbecome_root();
if (!res) {
DEBUG(0, ("pdb_update_autolock_flag: pdb_get_account_policy failed.\n"));