lib: modules: Change XXX_init interface from XXX_init(void) to XXX_init(TALLOC_CTX *)
[ambi/samba-autobuild/.git] / source4 / torture / krb5 / kdc-mit.c
1
2 /*
3    Unix SMB/CIFS implementation.
4
5    Validate the krb5 pac generation routines
6
7    Copyright (c) 2016      Andreas Schneider <asn@samba.org>
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #include "includes.h"
24 #include "system/kerberos.h"
25 #include "torture/smbtorture.h"
26 #include "torture/winbind/proto.h"
27 #include "torture/krb5/proto.h"
28 #include "auth/credentials/credentials.h"
29 #include "lib/cmdline/popt_common.h"
30 #include "source4/auth/kerberos/kerberos.h"
31 #include "source4/auth/kerberos/kerberos_util.h"
32 #include "lib/util/util_net.h"
33
34 static bool test_skip(struct torture_context *tctx)
35 {
36         torture_skip(tctx, "Skip kdc tests with MIT Kerberos");
37
38         return true;
39 }
40
41 NTSTATUS torture_krb5_init(TALLOC_CTX *ctx)
42 {
43         struct torture_suite *suite =
44                 torture_suite_create(talloc_autofree_context(), "krb5");
45         struct torture_suite *kdc_suite = torture_suite_create(suite, "kdc");
46         suite->description = talloc_strdup(suite, "Kerberos tests");
47         kdc_suite->description = talloc_strdup(kdc_suite, "Kerberos KDC tests");
48
49         torture_suite_add_simple_test(kdc_suite, "skip", test_skip);
50
51         torture_suite_add_suite(suite, kdc_suite);
52
53         torture_register_suite(suite);
54
55         return NT_STATUS_OK;
56 }