Skip to content

Commit

Permalink
13521 libnisdb: symbol 'ldapConfig' is multiply-defined
Browse files Browse the repository at this point in the history
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
tsoome committed Mar 12, 2021
1 parent 518a3de commit 9c50812
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
12 changes: 6 additions & 6 deletions usr/src/lib/libnisdb/nis_ldap.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
* All rights reserved.
*/

#pragma ident "%Z%%M% %I% %E% SMI"


#include <poll.h>
#include <sys/time.h>
#include <stdlib.h>
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand All @@ -127,7 +126,8 @@ rootDirExpired(void) {
* Also establishes the TTL if not set.
*/
int
touchRootDir(void) {
touchRootDir(void)
{
struct timeval now;
int ttl;

Expand Down
23 changes: 8 additions & 15 deletions usr/src/lib/libnisdb/nis_parse_ldap_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,14 @@
__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;

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];
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 9c50812

Please sign in to comment.