mirror of
https://github.com/samba-team/samba.git
synced 2025-01-13 13:18:06 +03:00
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 e60c509813
)
This commit is contained in:
parent
07a65b3f07
commit
5cdc9e1685
@ -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++) {
|
for (i = 0; i < num_entries; i++) {
|
||||||
BOOL status = False;
|
BOOL status = False;
|
||||||
DOM_SID find_sid = sid[i].sid;
|
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++;
|
total++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unbecome_root();
|
||||||
|
|
||||||
trn->num_entries = total;
|
trn->num_entries = total;
|
||||||
trn->ptr_trans_names = 1;
|
trn->ptr_trans_names = 1;
|
||||||
trn->num_entries2 = total;
|
trn->num_entries2 = total;
|
||||||
|
Loading…
Reference in New Issue
Block a user