summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2015-12-14 11:17:37 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-12-14 13:29:46 +0100
commit291a6c8af9759e41cec6f332cb72606ca90768c3 (patch)
tree4c61549cdae12e4f83126df2da5422f6175396b3
parent676bf6dda60776d9db79dad1c2506c0e57bb5503 (diff)
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 <jhrozek@redhat.com>
-rw-r--r--Makefile.am5
-rw-r--r--src/providers/krb5/krb5_opts.c47
-rw-r--r--src/providers/krb5/krb5_opts.h24
3 files changed, 53 insertions, 23 deletions
diff --git a/Makefile.am b/Makefile.am
index 265384e8..9f76dd60 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 00000000..6bec5276
--- /dev/null
+++ b/src/providers/krb5/krb5_opts.c
@@ -0,0 +1,47 @@
+/*
+ SSSD
+
+ Authors:
+ Stephen Gallagher <sgallagh@redhat.com>
+
+ 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 <http://www.gnu.org/licenses/>.
+*/
+
+#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 50d701b8..798008dc 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_ */