diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-07-22 20:46:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:19 -0500 |
commit | dc833fa69413dd2747c2730bf051b1c54c064698 (patch) | |
tree | bcc269a6ea1400bc870de2a602ae6050a0968ef8 /source3/rpc_server | |
parent | e85be720a39c10724d5b6e50f794f5cf36648c2a (diff) | |
download | samba-dc833fa69413dd2747c2730bf051b1c54c064698.tar.gz samba-dc833fa69413dd2747c2730bf051b1c54c064698.tar.xz samba-dc833fa69413dd2747c2730bf051b1c54c064698.zip |
r17194: To run rpc-samba3-lsa in the build farm, we can't rely on geteuid()==0. Adapt
it to other "Am I root?" checks.
Jerry, Jeremy, please check this!
Thanks,
Volker
(This used to be commit f777b2d294f7258e676976d7807adbb644c85a2f)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index e609eac9507..04747406d46 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -544,7 +544,7 @@ NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL lsa_get_generic_sd(p->mem_ctx, &psd, &sd_size); if(!se_access_check(psd, p->pipe_user.nt_user_token, des_access, &acc_granted, &status)) { - if (geteuid() != 0) { + if (p->pipe_user.ut.uid != sec_initial_uid()) { return status; } DEBUG(4,("ACCESS should be DENIED (granted: %#010x; required: %#010x)\n", @@ -554,7 +554,7 @@ NTSTATUS _lsa_open_policy2(pipes_struct *p, LSA_Q_OPEN_POL2 *q_u, LSA_R_OPEN_POL /* This is needed for lsa_open_account and rpcclient .... :-) */ - if (geteuid() == 0) + if (p->pipe_user.ut.uid == sec_initial_uid()) acc_granted = POLICY_ALL_ACCESS; /* associate the domain SID with the (unique) handle. */ |