mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
torture: Add a dummy test for MIT Kerberos case
This is a preperatory test to add tests for the MIT KDC. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
This commit is contained in:
parent
38faafef23
commit
db23c0fa97
56
source4/torture/krb5/kdc-mit.c
Normal file
56
source4/torture/krb5/kdc-mit.c
Normal file
@ -0,0 +1,56 @@
|
||||
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
Validate the krb5 pac generation routines
|
||||
|
||||
Copyright (c) 2016 Andreas Schneider <asn@samba.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "includes.h"
|
||||
#include "system/kerberos.h"
|
||||
#include "torture/smbtorture.h"
|
||||
#include "torture/winbind/proto.h"
|
||||
#include "torture/krb5/proto.h"
|
||||
#include "auth/credentials/credentials.h"
|
||||
#include "lib/cmdline/popt_common.h"
|
||||
#include "source4/auth/kerberos/kerberos.h"
|
||||
#include "source4/auth/kerberos/kerberos_util.h"
|
||||
#include "lib/util/util_net.h"
|
||||
|
||||
static bool test_skip(struct torture_context *tctx)
|
||||
{
|
||||
torture_skip(tctx, "Skip kdc tests with MIT Kerberos");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
NTSTATUS torture_krb5_init(void)
|
||||
{
|
||||
struct torture_suite *suite =
|
||||
torture_suite_create(talloc_autofree_context(), "krb5");
|
||||
struct torture_suite *kdc_suite = torture_suite_create(suite, "kdc");
|
||||
suite->description = talloc_strdup(suite, "Kerberos tests");
|
||||
kdc_suite->description = talloc_strdup(kdc_suite, "Kerberos KDC tests");
|
||||
|
||||
torture_suite_add_simple_test(kdc_suite, "skip", test_skip);
|
||||
|
||||
torture_suite_add_suite(suite, kdc_suite);
|
||||
|
||||
torture_register_suite(suite);
|
||||
|
||||
return NT_STATUS_OK;
|
||||
}
|
@ -1,11 +1,19 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
if bld.CONFIG_SET('SAMBA4_USES_HEIMDAL'):
|
||||
bld.SAMBA_MODULE('TORTURE_KRB5',
|
||||
source='kdc.c kdc-canon.c',
|
||||
source='kdc-heimdal.c kdc-canon-heimdal.c',
|
||||
autoproto='proto.h',
|
||||
subsystem='smbtorture',
|
||||
init_function='torture_krb5_init',
|
||||
deps='authkrb5 popt POPT_CREDENTIALS torture KERBEROS_UTIL',
|
||||
internal_module=True
|
||||
)
|
||||
|
||||
else:
|
||||
bld.SAMBA_MODULE('TORTURE_KRB5',
|
||||
source='kdc-mit.c',
|
||||
autoproto='proto.h',
|
||||
subsystem='smbtorture',
|
||||
init_function='torture_krb5_init',
|
||||
deps='authkrb5 popt POPT_CREDENTIALS torture KERBEROS_UTIL',
|
||||
internal_module=True)
|
||||
|
Loading…
Reference in New Issue
Block a user