diff --git a/source4/torture/krb5/kdc-canon.c b/source4/torture/krb5/kdc-canon-heimdal.c similarity index 100% rename from source4/torture/krb5/kdc-canon.c rename to source4/torture/krb5/kdc-canon-heimdal.c diff --git a/source4/torture/krb5/kdc.c b/source4/torture/krb5/kdc-heimdal.c similarity index 100% rename from source4/torture/krb5/kdc.c rename to 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 + + 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 . +*/ + +#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)