]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
torture: Add a dummy test for MIT Kerberos case
authorAndreas Schneider <asn@samba.org>
Fri, 13 May 2016 07:42:44 +0000 (09:42 +0200)
committerAlexander Bokovoy <ab@samba.org>
Thu, 2 Jun 2016 10:48:13 +0000 (12:48 +0200)
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>
source4/torture/krb5/kdc-canon-heimdal.c [moved from source4/torture/krb5/kdc-canon.c with 100% similarity]
source4/torture/krb5/kdc-heimdal.c [moved from source4/torture/krb5/kdc.c with 100% similarity]
source4/torture/krb5/kdc-mit.c [new file with mode: 0644]
source4/torture/krb5/wscript_build

diff --git a/source4/torture/krb5/kdc-mit.c b/source4/torture/krb5/kdc-mit.c
new file mode 100644 (file)
index 0000000..88bff0b
--- /dev/null
@@ -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;
+}
index 3d3a84051cd90eed6a4c42d960b3be2105672b87..b9d9eb70d033f1070fbd3be15811ca7f1c30a663 100644 (file)
@@ -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)