From 291a6c8af9759e41cec6f332cb72606ca90768c3 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Dec 14 2015 12:29:46 +0000 Subject: KRB5: Mark globals in krb5_opts.h as extern To avoid collisions when we want to work with them elsewhere in the code. Reviewed-by: Jakub Hrozek --- diff --git a/Makefile.am b/Makefile.am index 265384e..9f76dd6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1518,6 +1518,7 @@ krb5_utils_tests_SOURCES = \ src/providers/krb5/krb5_utils.c \ src/providers/krb5/krb5_ccache.c \ src/providers/krb5/krb5_common.c \ + src/providers/krb5/krb5_opts.c \ src/util/sss_krb5.c \ src/providers/data_provider_fo.c \ src/providers/data_provider_opts.c \ @@ -1655,6 +1656,7 @@ ipa_ldap_opt_tests_SOURCES = \ src/providers/ldap/ldap_opts.c \ src/providers/ad/ad_opts.c \ src/providers/ipa/ipa_opts.c \ + src/providers/krb5/krb5_opts.c \ src/util/sss_ldap.c \ src/tests/ipa_ldap_opt-tests.c ipa_ldap_opt_tests_CFLAGS = \ @@ -1671,6 +1673,7 @@ ipa_ldap_opt_tests_LDADD = \ ad_ldap_opt_tests_SOURCES = \ src/providers/ldap/ldap_opts.c \ src/providers/ad/ad_opts.c \ + src/providers/krb5/krb5_opts.c \ src/tests/ad_ldap_opt-tests.c ad_ldap_opt_tests_CFLAGS = \ $(AM_CFLAGS) \ @@ -1792,6 +1795,7 @@ krb5_child_test_SOURCES = \ src/providers/krb5/krb5_ccache.c \ src/providers/krb5/krb5_child_handler.c \ src/providers/krb5/krb5_common.c \ + src/providers/krb5/krb5_opts.c \ src/util/sss_krb5.c \ src/providers/data_provider_fo.c \ src/providers/data_provider_opts.c \ @@ -2869,6 +2873,7 @@ libsss_krb5_common_la_SOURCES = \ src/providers/krb5/krb5_renew_tgt.c \ src/providers/krb5/krb5_wait_queue.c \ src/providers/krb5/krb5_common.c \ + src/providers/krb5/krb5_opts.c \ src/providers/krb5/krb5_auth.c \ src/providers/krb5/krb5_access.c \ src/providers/krb5/krb5_child_handler.c \ diff --git a/src/providers/krb5/krb5_opts.c b/src/providers/krb5/krb5_opts.c new file mode 100644 index 0000000..6bec527 --- /dev/null +++ b/src/providers/krb5/krb5_opts.c @@ -0,0 +1,47 @@ +/* + SSSD + + Authors: + Stephen Gallagher + + Copyright (C) 2012 Red Hat + + 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 "src/providers/data_provider.h" + +struct dp_option default_krb5_opts[] = { + { "krb5_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_backup_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_realm", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_ccachedir", DP_OPT_STRING, { DEFAULT_CCACHE_DIR }, NULL_STRING }, + { "krb5_ccname_template", DP_OPT_STRING, NULL_STRING, NULL_STRING}, + { "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 6 }, NULL_NUMBER }, + { "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING }, + { "krb5_validate", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, + { "krb5_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_backup_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_store_password_if_offline", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, + { "krb5_renewable_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_renew_interval", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_use_fast", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_fast_principal", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + { "krb5_canonicalize", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, + { "krb5_use_enterprise_principal", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, + { "krb5_use_kdcinfo", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE }, + { "krb5_map_user", DP_OPT_STRING, NULL_STRING, NULL_STRING }, + DP_OPTION_TERMINATOR +}; diff --git a/src/providers/krb5/krb5_opts.h b/src/providers/krb5/krb5_opts.h index 50d701b..798008d 100644 --- a/src/providers/krb5/krb5_opts.h +++ b/src/providers/krb5/krb5_opts.h @@ -25,28 +25,6 @@ #include "src/providers/data_provider.h" -struct dp_option default_krb5_opts[] = { - { "krb5_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_backup_server", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_realm", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_ccachedir", DP_OPT_STRING, { DEFAULT_CCACHE_DIR }, NULL_STRING }, - { "krb5_ccname_template", DP_OPT_STRING, NULL_STRING, NULL_STRING}, - { "krb5_auth_timeout", DP_OPT_NUMBER, { .number = 6 }, NULL_NUMBER }, - { "krb5_keytab", DP_OPT_STRING, { "/etc/krb5.keytab" }, NULL_STRING }, - { "krb5_validate", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, - { "krb5_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_backup_kpasswd", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_store_password_if_offline", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, - { "krb5_renewable_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_lifetime", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_renew_interval", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_use_fast", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_fast_principal", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - { "krb5_canonicalize", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, - { "krb5_use_enterprise_principal", DP_OPT_BOOL, BOOL_FALSE, BOOL_FALSE }, - { "krb5_use_kdcinfo", DP_OPT_BOOL, BOOL_TRUE, BOOL_TRUE }, - { "krb5_map_user", DP_OPT_STRING, NULL_STRING, NULL_STRING }, - DP_OPTION_TERMINATOR -}; +extern struct dp_option default_krb5_opts[]; #endif /* KRB5_OPTS_H_ */