diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-04-09 04:59:34 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-04-09 04:59:34 +0000 |
commit | 5cdc9e1685200a51aa970051057eb6da8221845e (patch) | |
tree | 91faa75e222e54a1ac99456d6b39c669b8524d7f /source3/rpc_server | |
parent | 07a65b3f078733b198ede49e3f4828ba6b82b93e (diff) | |
download | samba-5cdc9e1685200a51aa970051057eb6da8221845e.tar.gz samba-5cdc9e1685200a51aa970051057eb6da8221845e.tar.bz2 samba-5cdc9e1685200a51aa970051057eb6da8221845e.zip |
Add a become_root()/unbecome_root() pair to allow acces to the passdb for
SID lookup. This fixes a bug where SIDs (rather than names) are displayed in windows ACL lists
(This used to be commit e60c509813a9113cd76135b6ded3018ff04d49f2)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_lsa_nt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c index af02a97769..84ab44bc30 100644 --- a/source3/rpc_server/srv_lsa_nt.c +++ b/source3/rpc_server/srv_lsa_nt.c @@ -233,6 +233,8 @@ static void init_lsa_trans_names(TALLOC_CTX *ctx, DOM_R_REF *ref, LSA_TRANS_NAME } } + become_root(); /* Need root to get to passdb to for local sids */ + for (i = 0; i < num_entries; i++) { BOOL status = False; DOM_SID find_sid = sid[i].sid; @@ -276,6 +278,8 @@ static void init_lsa_trans_names(TALLOC_CTX *ctx, DOM_R_REF *ref, LSA_TRANS_NAME total++; } + unbecome_root(); + trn->num_entries = total; trn->ptr_trans_names = 1; trn->num_entries2 = total; |