diff options
author | Andreas Schneider <asn@samba.org> | 2016-05-13 09:42:44 +0200 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2016-06-02 12:48:13 +0200 |
commit | db23c0fa97386062eea9c9982243fdecbf4133b9 (patch) | |
tree | 64a60c806159339cfaf3ad930c6e8ee42699e6af /source4/torture/krb5 | |
parent | 38faafef23cab51140f13e125ef80c704057ea01 (diff) | |
download | samba-db23c0fa97386062eea9c9982243fdecbf4133b9.tar.gz |
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>
Diffstat (limited to 'source4/torture/krb5')
-rw-r--r-- | source4/torture/krb5/kdc-canon-heimdal.c (renamed from source4/torture/krb5/kdc-canon.c) | 0 | ||||
-rw-r--r-- | source4/torture/krb5/kdc-heimdal.c (renamed from source4/torture/krb5/kdc.c) | 0 | ||||
-rw-r--r-- | source4/torture/krb5/kdc-mit.c | 56 | ||||
-rw-r--r-- | source4/torture/krb5/wscript_build | 12 |
4 files changed, 66 insertions, 2 deletions
diff --git a/source4/torture/krb5/kdc-canon.c b/source4/torture/krb5/kdc-canon-heimdal.c index fece17f3249..fece17f3249 100644 --- a/source4/torture/krb5/kdc-canon.c +++ b/source4/torture/krb5/kdc-canon-heimdal.c diff --git a/source4/torture/krb5/kdc.c b/source4/torture/krb5/kdc-heimdal.c index fffe773e21b..fffe773e21b 100644 --- a/source4/torture/krb5/kdc.c +++ b/source4/torture/krb5/kdc-heimdal.c diff --git a/source4/torture/krb5/kdc-mit.c b/source4/torture/krb5/kdc-mit.c new file mode 100644 index 00000000000..88bff0b0ee4 --- /dev/null +++ b/source4/torture/krb5/kdc-mit.c @@ -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; +} diff --git a/source4/torture/krb5/wscript_build b/source4/torture/krb5/wscript_build index 3d3a84051cd..b9d9eb70d03 100644 --- a/source4/torture/krb5/wscript_build +++ b/source4/torture/krb5/wscript_build @@ -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) |