summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-06-23 05:53:18 +0000
committerTim Potter <tpot@samba.org>2000-06-23 05:53:18 +0000
commit218653764f55b5fe16ffbda93d415a1495460956 (patch)
tree4d6ce4a1c02e160b817dbe2773726f29e5f83a5d /source3
parent8005c837f5425397131b0a798d63521f61e25375 (diff)
downloadsamba-218653764f55b5fe16ffbda93d415a1495460956.tar.gz
samba-218653764f55b5fe16ffbda93d415a1495460956.tar.bz2
samba-218653764f55b5fe16ffbda93d415a1495460956.zip
Removed save directory argument to become_root() calls. Probably most of
this stuff doesn't need to be done as root anyway. (This used to be commit c3cad0ff6482784f95fd54ba51ee5be2354bb95d)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_lookup.c16
-rw-r--r--source3/rpc_server/srv_netlog.c16
-rw-r--r--source3/rpc_server/srv_pipe.c8
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c4
-rw-r--r--source3/rpc_server/srv_samr.c32
-rw-r--r--source3/rpc_server/srv_util.c8
6 files changed, 42 insertions, 42 deletions
diff --git a/source3/rpc_server/srv_lookup.c b/source3/rpc_server/srv_lookup.c
index 274c68f18d..e81f3051f3 100644
--- a/source3/rpc_server/srv_lookup.c
+++ b/source3/rpc_server/srv_lookup.c
@@ -113,9 +113,9 @@ int make_dom_gids(DOMAIN_GRP *mem, int num_members, DOM_GID **ppgids)
uint8 attr = mem[count].attr;
char *name = mem[count].name;
- become_root(True);
+ become_root();
status = lookup_grp_rid(name, &rid, &type);
- unbecome_root(True);
+ unbecome_root();
if (status == 0x0)
{
@@ -344,9 +344,9 @@ uint32 lookup_user_name(uint32 rid, char *user_name, uint8 *type)
DEBUG(5,("lookup_user_name: rid: %d", rid));
/* find the user account */
- become_root(True);
+ become_root();
disp_info = getsamdisprid(rid);
- unbecome_root(True);
+ unbecome_root();
if (disp_info != NULL)
{
@@ -537,9 +537,9 @@ uint32 lookup_added_user_rids(char *user_name,
(*grp_rid) = 0;
/* find the user account */
- become_root(True);
+ become_root();
sam_pass = getsam21pwnam(user_name);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass != NULL)
{
@@ -561,9 +561,9 @@ uint32 lookup_added_user_rid(char *user_name, uint32 *rid, uint8 *type)
(*type) = SID_NAME_USER;
/* find the user account */
- become_root(True);
+ become_root();
sam_pass = getsam21pwnam(user_name);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass != NULL)
{
diff --git a/source3/rpc_server/srv_netlog.c b/source3/rpc_server/srv_netlog.c
index 80e9894b59..7fe89f90b6 100644
--- a/source3/rpc_server/srv_netlog.c
+++ b/source3/rpc_server/srv_netlog.c
@@ -284,9 +284,9 @@ static BOOL get_md4pw(char *md4pw, char *mach_name, char *mach_acct)
}
#endif /* 0 */
- become_root(True);
+ become_root();
smb_pass = getsmbpwnam(mach_acct);
- unbecome_root(True);
+ unbecome_root();
if ((smb_pass) != NULL && !(smb_pass->acct_ctrl & ACB_DISABLED) &&
(smb_pass->smb_nt_passwd != NULL))
@@ -453,9 +453,9 @@ static BOOL api_net_srv_pwset(pipes_struct *p)
DEBUG(3,("Server Password Set Wksta:[%s]\n", mach_acct));
- become_root(True);
+ become_root();
smb_pass = getsmbpwnam(mach_acct);
- unbecome_root(True);
+ unbecome_root();
if (smb_pass != NULL) {
unsigned char pwd[16];
@@ -473,9 +473,9 @@ static BOOL api_net_srv_pwset(pipes_struct *p)
smb_pass->smb_nt_passwd = pwd;
smb_pass->acct_ctrl = ACB_WSTRUST;
- become_root(True);
+ become_root();
ret = mod_smbpwd_entry(smb_pass,False);
- unbecome_root(True);
+ unbecome_root();
if (ret) {
/* hooray! */
@@ -718,9 +718,9 @@ static BOOL api_net_sam_logon(pipes_struct *p)
*/
pw=Get_Pwnam(nt_username, True);
- become_root(True);
+ become_root();
smb_pass = getsmbpwnam(nt_username);
- unbecome_root(True);
+ unbecome_root();
if (smb_pass == NULL)
status = 0xC0000000 | NT_STATUS_NO_SUCH_USER;
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index 46cb521018..a5d69efd7e 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -360,24 +360,24 @@ static BOOL api_pipe_ntlmssp_verify(pipes_struct *p, RPC_AUTH_NTLMSSP_RESP *ntlm
if(!guest_user) {
- become_root(True);
+ become_root();
if(!(p->ntlmssp_auth_validated = pass_check_smb(unix_user_name, domain,
(uchar*)p->challenge, lm_owf, nt_owf, NULL))) {
DEBUG(1,("api_pipe_ntlmssp_verify: User %s\\%s from machine %s \
failed authentication on named pipe %s.\n", domain, unix_user_name, wks, p->name ));
- unbecome_root(True);
+ unbecome_root();
return False;
}
if(!(smb_pass = getsmbpwnam(unix_user_name))) {
DEBUG(1,("api_pipe_ntlmssp_verify: Cannot find user %s in smb passwd database.\n",
unix_user_name));
- unbecome_root(True);
+ unbecome_root();
return False;
}
- unbecome_root(True);
+ unbecome_root();
if (smb_pass == NULL) {
DEBUG(1,("api_pipe_ntlmssp_verify: Couldn't find user '%s' in smb_passwd file.\n",
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index e01ecf82a2..b11c76b75d 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -144,9 +144,9 @@ static void attempt_remote_rpc_connect(pipes_struct *p)
make_creds_nt_sec(&usr.nts);
*/
- become_root(False); /* to connect to pipe */
+ become_root(); /* to connect to pipe */
p->m = msrpc_use_add(p->name, sys_getpid(), &usr, False);
- unbecome_root(False);
+ unbecome_root();
if (p->m == NULL)
DEBUG(10,("attempt_remote_rpc_connect: msrpc redirect failed - using local implementation.\n"));
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index c1d0444b36..50fe613e49 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -611,9 +611,9 @@ static BOOL samr_reply_enum_dom_users(SAMR_Q_ENUM_DOM_USERS *q_u,
DEBUG(5,("samr_reply_enum_dom_users: %d\n", __LINE__));
- become_root(True);
+ become_root();
get_sampwd_entries(pass, 0, &total_entries, &num_entries, MAX_SAM_ENTRIES, q_u->acb_mask);
- unbecome_root(True);
+ unbecome_root();
init_samr_r_enum_dom_users(&r_e, total_entries,
q_u->unknown_0, num_entries,
@@ -852,9 +852,9 @@ static BOOL samr_reply_query_dispinfo(SAMR_Q_QUERY_DISPINFO *q_u, prs_struct *rd
DEBUG(10,("samr_reply_query_dispinfo: Setting q_u->max_entries to %u\n",q_u->max_entries));
- become_root(True);
+ become_root();
got_pwds = get_passwd_entries(pass, q_u->start_idx, &total_entries, &num_entries, q_u->max_entries, 0);
- unbecome_root(True);
+ unbecome_root();
/* more left - set resume handle */
if(total_entries > num_entries)
@@ -1028,9 +1028,9 @@ static BOOL samr_reply_lookup_ids(SAMR_Q_LOOKUP_IDS *q_u,
q_u->uni_user_name[i].uni_str_len));
/* find the user account */
- become_root(True);
+ become_root();
sam_pass = get_smb21pwd_entry(user_name, 0);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass == NULL)
{
@@ -1374,9 +1374,9 @@ static BOOL samr_reply_open_user(SAMR_Q_OPEN_USER *q_u, prs_struct *rdata, int s
r_u.status = 0xC0000000 | NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
- become_root(True);
+ become_root();
sam_pass = getsam21pwrid(q_u->user_rid);
- unbecome_root(True);
+ unbecome_root();
/* check that the RID exists in our domain. */
if (r_u.status == 0x0 && sam_pass == NULL)
@@ -1441,9 +1441,9 @@ static BOOL get_user_info_10(SAM_USER_INFO_10 *id10, uint32 user_rid)
return False;
}
- become_root(True);
+ become_root();
smb_pass = getsmbpwrid(user_rid);
- unbecome_root(True);
+ unbecome_root();
if (smb_pass == NULL)
{
@@ -1474,9 +1474,9 @@ static BOOL get_user_info_21(SAM_USER_INFO_21 *id21, uint32 user_rid)
return False;
}
- become_root(True);
+ become_root();
sam_pass = getsam21pwrid(user_rid);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass == NULL)
{
@@ -1669,9 +1669,9 @@ static BOOL samr_reply_query_usergroups(SAMR_Q_QUERY_USERGROUPS *q_u,
if (status == 0x0)
{
- become_root(True);
+ become_root();
sam_pass = getsam21pwrid(rid);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass == NULL)
{
@@ -1859,9 +1859,9 @@ static BOOL api_samr_unknown_32(pipes_struct *p)
fstrcpy(mach_acct, dos_unistrn2(q_u.uni_mach_acct.buffer,
q_u.uni_mach_acct.uni_str_len));
- become_root(True);
+ become_root();
sam_pass = getsam21pwnam(mach_acct);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass != NULL)
{
diff --git a/source3/rpc_server/srv_util.c b/source3/rpc_server/srv_util.c
index 8264741db0..a1f2a7c085 100644
--- a/source3/rpc_server/srv_util.c
+++ b/source3/rpc_server/srv_util.c
@@ -270,9 +270,9 @@ uint32 lookup_user_name(uint32 rid, char *user_name, uint32 *type)
}
/* ok, it's a user. find the user account */
- become_root(True);
+ become_root();
disp_info = getsamdisprid(rid);
- unbecome_root(True);
+ unbecome_root();
if (disp_info != NULL)
{
@@ -332,9 +332,9 @@ uint32 lookup_user_rid(char *user_name, uint32 *rid)
(*rid) = 0;
/* find the user account */
- become_root(True);
+ become_root();
sam_pass = getsam21pwnam(user_name);
- unbecome_root(True);
+ unbecome_root();
if (sam_pass != NULL)
{