mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
wkssvc: Use dom_sid_str_buf
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
1ab6c336a3
commit
d425cd5b68
@ -345,6 +345,8 @@ static struct wkssvc_NetWkstaInfo102 *create_wks_info_102(TALLOC_CTX *mem_ctx)
|
||||
WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
struct wkssvc_NetWkstaGetInfo *r)
|
||||
{
|
||||
struct dom_sid_buf buf;
|
||||
|
||||
switch (r->in.level) {
|
||||
case 100:
|
||||
/* Level 100 can be allowed from anyone including anonymous
|
||||
@ -362,8 +364,9 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
"101\n"));
|
||||
DEBUGADD(3,(" - does not have sid for Authenticated "
|
||||
"Users %s:\n",
|
||||
sid_string_dbg(
|
||||
&global_sid_Authenticated_Users)));
|
||||
dom_sid_str_buf(
|
||||
&global_sid_Authenticated_Users,
|
||||
&buf)));
|
||||
security_token_debug(DBGC_CLASS, 3,
|
||||
p->session_info->security_token);
|
||||
return WERR_ACCESS_DENIED;
|
||||
@ -381,7 +384,9 @@ WERROR _wkssvc_NetWkstaGetInfo(struct pipes_struct *p,
|
||||
"102\n"));
|
||||
DEBUGADD(3,(" - does not have sid for Administrators "
|
||||
"group %s, sids are:\n",
|
||||
sid_string_dbg(&global_sid_Builtin_Administrators)));
|
||||
dom_sid_str_buf(
|
||||
&global_sid_Builtin_Administrators,
|
||||
&buf)));
|
||||
security_token_debug(DBGC_CLASS, 3,
|
||||
p->session_info->security_token);
|
||||
return WERR_ACCESS_DENIED;
|
||||
@ -563,10 +568,13 @@ WERROR _wkssvc_NetWkstaEnumUsers(struct pipes_struct *p,
|
||||
/* This with any level should only be allowed from a domain administrator */
|
||||
if (!nt_token_check_sid(&global_sid_Builtin_Administrators,
|
||||
p->session_info->security_token)) {
|
||||
struct dom_sid_buf buf;
|
||||
DEBUG(1,("User not allowed for NetWkstaEnumUsers\n"));
|
||||
DEBUGADD(3,(" - does not have sid for Administrators group "
|
||||
"%s\n", sid_string_dbg(
|
||||
&global_sid_Builtin_Administrators)));
|
||||
"%s\n",
|
||||
dom_sid_str_buf(
|
||||
&global_sid_Builtin_Administrators,
|
||||
&buf)));
|
||||
security_token_debug(DBGC_CLASS, 3, p->session_info->security_token);
|
||||
return WERR_ACCESS_DENIED;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user