mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
netcmd: Make sure SMB connection is signed when backing up sysvol
i.e. protect the client against man-in-the-middle attacks by default. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13621 Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit 0122f45f053ecc545950c31bf1fb33fba143478c)
This commit is contained in:
parent
db233146d5
commit
d3be8e21e6
@ -239,7 +239,7 @@ class cmd_domain_backup_online(samba.netcmd.Command):
|
||||
|
||||
# Grab the remote DC's sysvol files and bundle them into a tar file
|
||||
sysvol_tar = os.path.join(tmpdir, 'sysvol.tar.gz')
|
||||
smb_conn = smb.SMB(server, "sysvol", lp=lp, creds=creds)
|
||||
smb_conn = smb.SMB(server, "sysvol", lp=lp, creds=creds, sign=True)
|
||||
backup_online(smb_conn, sysvol_tar, remote_sam.get_domain_sid())
|
||||
|
||||
# remove the default sysvol files created by the clone (we want to
|
||||
@ -762,7 +762,7 @@ class cmd_domain_backup_rename(samba.netcmd.Command):
|
||||
# use the old realm) backed here, as well as default files generated
|
||||
# for the new realm as part of the clone/join.
|
||||
sysvol_tar = os.path.join(tmpdir, 'sysvol.tar.gz')
|
||||
smb_conn = smb.SMB(server, "sysvol", lp=lp, creds=creds)
|
||||
smb_conn = smb.SMB(server, "sysvol", lp=lp, creds=creds, sign=True)
|
||||
backup_online(smb_conn, sysvol_tar, remote_sam.get_domain_sid())
|
||||
|
||||
# connect to the local DB (making sure we use the new/renamed config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user