mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
traffic_packets: replace level 102 to 101 for packet_srvsvc_21
Level 102 will cause WERR_ACCESS_DENIED error against Windows, because: > If the level is 102 or 502, the Windows implementation checks whether > the caller is a member of one of the groups previously mentioned or > is a member of the Power Users local group. It passed against Samba since this check is not implemented by Samba yet. refer to: https://msdn.microsoft.com/en-us/library/cc247297.aspx#Appendix_A_80 Signed-off-by: Joe Guo <joeg@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
This commit is contained in:
parent
34e35c4c80
commit
51333c1538
@ -935,9 +935,25 @@ def packet_srvsvc_16(packet, conversation, context):
|
||||
|
||||
|
||||
def packet_srvsvc_21(packet, conversation, context):
|
||||
# NetSrvGetInfo
|
||||
"""NetSrvGetInfo
|
||||
|
||||
FIXME: Level changed from 102 to 101 here, to bypass Windows error.
|
||||
|
||||
Level 102 will cause WERR_ACCESS_DENIED error against Windows, because:
|
||||
|
||||
> If the level is 102 or 502, the Windows implementation checks whether
|
||||
> the caller is a member of one of the groups previously mentioned or
|
||||
> is a member of the Power Users local group.
|
||||
|
||||
It passed against Samba since this check is not implemented by Samba yet.
|
||||
|
||||
refer to:
|
||||
|
||||
https://msdn.microsoft.com/en-us/library/cc247297.aspx#Appendix_A_80
|
||||
|
||||
"""
|
||||
srvsvc = context.get_srvsvc_connection()
|
||||
server_unc = "\\\\" + context.server
|
||||
level = 102
|
||||
level = 101
|
||||
srvsvc.NetSrvGetInfo(server_unc, level)
|
||||
return True
|
||||
|
Loading…
x
Reference in New Issue
Block a user