1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-25 09:44:20 +03:00

CVE-2022-37966 python:/tests/krb5: call sys.path.insert(0, "bin/python") before any other imports

This allows the tests to be executed without an explicit
PYTHONPATH="bin/python".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15237

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Dec 13 14:06:14 UTC 2022 on sn-devel-184

(similar to commit 987cba9057)
[jsutton@samba.org Fixed conflicts; removed changes to non-existent
 tests]

Autobuild-User(v4-16-test): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(v4-16-test): Wed Dec 14 11:34:00 UTC 2022 on sn-devel-184
This commit is contained in:
Stefan Metzmacher
2022-11-29 14:14:32 +01:00
parent 160e566d59
commit d5a8e41313
18 changed files with 64 additions and 56 deletions

View File

@@ -20,6 +20,9 @@
import sys
import os
sys.path.insert(0, 'bin/python')
os.environ['PYTHONUNBUFFERED'] = '1'
from ldb import SCOPE_SUBTREE
from samba import NTSTATUSError
from samba.credentials import DONT_USE_KERBEROS
@@ -34,9 +37,6 @@ from samba.samba3 import param as s3param
from samba.tests.krb5.kdc_base_test import KDCBaseTest
sys.path.insert(0, 'bin/python')
os.environ['PYTHONUNBUFFERED'] = '1'
global_asn1_print = False
global_hexdump = False