mirror of
https://github.com/samba-team/samba.git
synced 2025-01-08 21:18:16 +03:00
CVE-2021-20251 s4 auth test: Unit tests for source4/auth/sam.c
cmocka unit tests for the authsam_reread_user_logon_data in source4/auth/sam.c BUG: https://bugzilla.samba.org/show_bug.cgi?id=14611 Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
7b8e32efc3
commit
d6cf245b96
25
selftest/knownfail.d/auth-sam
Normal file
25
selftest/knownfail.d/auth-sam
Normal file
@ -0,0 +1,25 @@
|
||||
^samba.unittests.auth.sam.test_reread_account_not_locked.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_add_control_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_build_mod_req_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_commit_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_ldb_msg_new_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_ldb_request_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_ldb_wait_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_reread_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_rollback_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_samdb_rodc_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_spurious_bad_pwd_indicator.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_start_txn_failed.none
|
||||
^samba.unittests.auth.sam.test_success_accounting_update_lastlogon_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_add_control_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_build_mod_request_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_commit_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_get_pso_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_ldb_request_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_ldb_wait_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_no_update_required.none
|
||||
^samba.unittests.auth.sam.test_update_bad_reread_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_reread_locked_out.none
|
||||
^samba.unittests.auth.sam.test_update_bad_start_txn_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_txn_cancel_failed.none
|
||||
^samba.unittests.auth.sam.test_update_bad_update_count_failed.none
|
@ -446,6 +446,8 @@ plantestsuite("samba.unittests.test_registry_regfio", "none",
|
||||
[os.path.join(bindir(), "default/source3/test_registry_regfio")])
|
||||
plantestsuite("samba.unittests.test_oLschema2ldif", "none",
|
||||
[os.path.join(bindir(), "default/source4/utils/oLschema2ldif/test_oLschema2ldif")])
|
||||
plantestsuite("samba.unittests.auth.sam", "none",
|
||||
[os.path.join(bindir(), "test_auth_sam")])
|
||||
if with_elasticsearch_backend:
|
||||
plantestsuite("samba.unittests.mdsparser_es", "none",
|
||||
[os.path.join(bindir(), "default/source3/test_mdsparser_es")] + [configuration])
|
||||
|
2746
source4/auth/tests/sam.c
Normal file
2746
source4/auth/tests/sam.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -49,6 +49,17 @@ bld.SAMBA_BINARY('test_kerberos',
|
||||
for_selftest=True
|
||||
)
|
||||
|
||||
bld.SAMBA_BINARY('test_auth_sam',
|
||||
source='tests/sam.c',
|
||||
deps='cmocka samdb samba-security ldb tevent',
|
||||
local_include=False,
|
||||
for_selftest=True,
|
||||
ldflags='''
|
||||
-Wl,--wrap,dsdb_search_dn
|
||||
-Wl,--wrap,samdb_msg_add_int64
|
||||
'''
|
||||
)
|
||||
|
||||
pytalloc_util = bld.pyembed_libname('pytalloc-util')
|
||||
pyparam_util = bld.pyembed_libname('pyparam_util')
|
||||
pyldb_util = bld.pyembed_libname('pyldb-util')
|
||||
|
Loading…
Reference in New Issue
Block a user