diff options
author | Toomas Soome <tsoome@me.com> | 2020-05-19 13:51:43 +0300 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2021-03-12 08:49:00 +0200 |
commit | 9c508120caba0f594e67ae6e1f0ca8a7e3a274e5 (patch) | |
tree | 931378136b5728e1eb9693b190db443cba14be56 | |
parent | 518a3de174fca27c87a655a6dab31dc0d75a66a9 (diff) | |
download | illumos-joyent-9c508120caba0f594e67ae6e1f0ca8a7e3a274e5.tar.gz |
13521 libnisdb: symbol 'ldapConfig' is multiply-defined
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/lib/libnisdb/nis_ldap.c | 12 | ||||
-rw-r--r-- | usr/src/lib/libnisdb/nis_parse_ldap_conf.c | 23 |
2 files changed, 14 insertions, 21 deletions
diff --git a/usr/src/lib/libnisdb/nis_ldap.c b/usr/src/lib/libnisdb/nis_ldap.c index d185fc7a67..2be4df3770 100644 --- a/usr/src/lib/libnisdb/nis_ldap.c +++ b/usr/src/lib/libnisdb/nis_ldap.c @@ -24,9 +24,6 @@ * All rights reserved. */ -#pragma ident "%Z%%M% %I% %E% SMI" - - #include <poll.h> #include <sys/time.h> #include <stdlib.h> @@ -81,7 +78,8 @@ __nis_config_t ldapConfig = { * > 0 Decrement 'attempts', sleep as indicated, return 1 */ int -__nis_retry_sleep(__nisdb_retry_t *retry, int forceSleep) { +__nis_retry_sleep(__nisdb_retry_t *retry, int forceSleep) +{ if (retry == NULL) return (0); @@ -111,7 +109,8 @@ static int rootDirTtl = 0; * Return 1 if the root dir has expired, 0 otherwise. */ int -rootDirExpired(void) { +rootDirExpired(void) +{ struct timeval now; (void) gettimeofday(&now, 0); @@ -127,7 +126,8 @@ rootDirExpired(void) { * Also establishes the TTL if not set. */ int -touchRootDir(void) { +touchRootDir(void) +{ struct timeval now; int ttl; diff --git a/usr/src/lib/libnisdb/nis_parse_ldap_conf.c b/usr/src/lib/libnisdb/nis_parse_ldap_conf.c index 584932ce6d..ecd0836fbf 100644 --- a/usr/src/lib/libnisdb/nis_parse_ldap_conf.c +++ b/usr/src/lib/libnisdb/nis_parse_ldap_conf.c @@ -46,7 +46,6 @@ __nis_ldap_proxy_info proxyInfo = {NULL, (auth_method_t)NO_VALUE_SET, (tls_method_t)NO_VALUE_SET, NULL, NULL, NULL, NULL, NULL, (follow_referral_t)NO_VALUE_SET}; -__nis_config_t ldapConfig; __nisdb_table_mapping_t ldapDBTableMapping; __nis_table_mapping_t *ldapTableMapping = NULL; __yp_domain_context_t ypDomains; @@ -54,7 +53,7 @@ __yp_domain_context_t ypDomains; parse_error p_error = no_parse_error; int cur_line_num = 0; int start_line_num = 0; -int seq_num = 0; +int seq_num = 0; const char *warn_file = NULL; char _key_val[38]; @@ -88,7 +87,7 @@ static int yp_parse_ldap_default_conf(__nis_ldap_proxy_info *proxy_info, /* Forward declarations */ int yp_parse_ldap_config_file(const char *, __nis_ldap_proxy_info *, __nis_config_t *, __nis_table_mapping_t **, __nis_config_info_t *, - __nisdb_table_mapping_t *, __yp_domain_context_t *); + __nisdb_table_mapping_t *, __yp_domain_context_t *); /* helper functions */ @@ -417,7 +416,7 @@ yp_parse_ldap_default_conf( char *attr_val; int defflags; config_key attrib_num; - int i, len; + int i, len; void *defp; if ((defp = defopen_r(YP_ETCCONFFILE)) != NULL) { @@ -506,10 +505,7 @@ yp_parse_ldap_default_conf( */ static config_key -get_attrib_num_cmdline( - const char *s, - const char **begin_s, - const char **end_s) +get_attrib_num_cmdline(const char *s, const char **begin_s, const char **end_s) { const char *s_end = s + strlen(s); const char *equal_s; @@ -564,13 +560,10 @@ get_attrib_num_cmdline( */ static int -parse_ldap_config_file( - const char *config_file, - __nis_ldap_proxy_info *proxy_info, - __nis_config_t *nis_config, - __nis_table_mapping_t **table_mapping, - __nis_config_info_t *config_info, - __nisdb_table_mapping_t *table_info) +parse_ldap_config_file(const char *config_file, + __nis_ldap_proxy_info *proxy_info, __nis_config_t *nis_config, + __nis_table_mapping_t **table_mapping, __nis_config_info_t *config_info, + __nisdb_table_mapping_t *table_info) { int rc = 0; config_key attrib_num; |