Print this page
5910 libnisdb won't build with modern GCC

*** 17,26 **** --- 17,27 ---- * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END */ /* + * Copyright 2015 Gary Mills * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ #include <stdio.h>
*** 82,92 **** --- 83,98 ---- __nis_config_info_t *config_info, __nisdb_table_mapping_t *table_info); static int yp_parse_ldap_default_conf(__nis_ldap_proxy_info *proxy_info, __nis_config_t *nis_config, __nis_config_info_t *config_info, __nisdb_table_mapping_t *table_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 *); + /* helper functions */ static config_key get_attrib_num_cmdline(const char *s, const char **begin_s, const char **end_s); static config_key get_file_attr_val(int fd, char **attr_val); static void get_attribute_list(
*** 126,136 **** __nis_config_info_t config_info = {NULL, NULL, (auth_method_t)NO_VALUE_SET, (tls_method_t)NO_VALUE_SET, NULL, NULL, NULL}; struct stat buf; - int i = 0; p_error = no_parse_error; if (verbose) report_info("Getting LDAP configuration", NULL); --- 132,141 ----
*** 410,420 **** char attr_buf[128]; char *attr; char *attr_val; int defflags; config_key attrib_num; ! int i, len, attr_len; void *defp; if ((defp = defopen_r(YP_ETCCONFFILE)) != NULL) { file_source = YP_ETCCONFFILE; if (verbose) --- 415,425 ---- char attr_buf[128]; char *attr; char *attr_val; int defflags; config_key attrib_num; ! int i, len; void *defp; if ((defp = defopen_r(YP_ETCCONFFILE)) != NULL) { file_source = YP_ETCCONFFILE; if (verbose)
*** 644,654 **** __nis_config_info_t *config_info, __nisdb_table_mapping_t *table_info, __yp_domain_context_t *ypDomains) { int rc = 0; - int numDomains = 0; config_key attrib_num; int fd; char *attr_val = NULL; int len; --- 649,658 ----
*** 731,741 **** char *s; char *a; char *attribute_value; int ret; config_key attrib_num = no_more_keys; - int found_quote = 0; *attr_val = NULL; if ((ret = read_line(fd, buf, sizeof (buf))) > 0) { for (s = buf; is_whitespace(*s); s++) --- 735,744 ----
*** 806,816 **** connect_to_ldap_config_server( char *sever_name, int server_port, __nis_config_info_t *config_info) { - int rc = 0; LDAP *ld = NULL; int ldapVersion = LDAP_VERSION3; int derefOption = LDAP_DEREF_ALWAYS; int timelimit = LDAP_NO_LIMIT; int sizelimit = LDAP_NO_LIMIT; --- 809,818 ----