nis_parse_ldap_conf.c revision 4a19049349b8aa3a6f741b8303a0a60e1fa770c9
0N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
0N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
0N/A#include "ldap_map.h"
0N/A#include "ldap_parse.h"
0N/A#include "ldap_glob.h"
0N/A#include "nis_parse_ldap_conf.h"
0N/Aint cur_line_num = 0;
0N/Aint start_line_num = 0;
0N/Astatic void get_attribute_list(
0N/A char **ldap_config_attributes);
0N/A const char *const *cmdline_options,
0N/A const char *config_file)
} else if (verbose)
return (rc);
const char *const *cmdline_options,
int rc = 0;
const char *begin_s;
const char *end_s;
if (verbose)
if (verbose)
if (rc < 0) {
return (rc);
int rc = 0;
char *attr;
static char *attr_val;
int defflags;
int len;
int attr_len;
if (verbose)
if (attr_val == 0) {
if (attr_val == 0) {
if (attr_val == 0) {
if (attr_val == 0)
attr_val++;
attr_val++;
attr_val++;
while (len > 0 &&
len--;
if (verbose) {
(void) defopen(0);
return (rc);
int rc = 0;
char *attr;
static char *attr_val;
int defflags;
if (verbose)
sizeof (attr_buf))) >=
sizeof (attr_buf)) {
attr_val++;
attr_val++;
attr_val++;
while (len > 0 &&
len--;
if (verbose) {
(void) defopen(0);
return (rc);
static config_key
const char **begin_s,
const char **end_s)
const char *equal_s;
const char *s1;
return (key_bad);
if (s1 == s) {
return (key_bad);
s1++;
s_end--;
return (attrib_num);
const char *config_file,
int rc = 0;
int fd;
char *attr_val;
int len;
if (verbose)
if (rc < 0) {
if (attr_val)
if (attr_val)
start_line_num = 0;
return (rc);
* file. If no file is specified, /var/yp/NISLDAPmapping
const char *config_file,
int rc = 0;
int numDomains = 0;
int fd;
int len;
if (verbose)
if (rc < 0) {
if (attr_val)
if (attr_val) {
start_line_num = 0;
return (rc);
static config_key
char *start_tag;
char *start_val;
char *end_val;
char *cut_here;
char *attribute_value;
int ret;
int found_quote = 0;
start_tag = s;
if (verbose)
return (key_bad);
while (is_whitespace(*s))
return (attrib_num);
start_val = s;
if (*s == ESCAPE_CHAR)
return (key_bad);
a = *attr_val;
end_val = s;
cut_here = 0;
if (*s == POUND_SIGN) {
cut_here = s;
while (s < end_val) {
if (*s == DOUBLE_QUOTE_CHAR ||
*s == SINGLE_QUOTE_CHAR) {
cut_here = 0;
if (cut_here != 0)
return (key_bad);
return (attrib_num);
static LDAP *
char *sever_name,
int server_port,
int rc = 0;
int errnum;
return (NULL);
return (NULL);
return (NULL);
&ldapVersion);
if (verbose)
if (!retrying) {
if (verbose)
NULL);
return (NULL);
if (verbose)
return (ld);
LDAPMessage *e;
int errnum;
char *attr;
char **vals;
char *attr_val;
int len;
int rc = 0;
if (e != NULL) {
if (verbose)
attr_val++;
if (verbose)
while (len > 0 &&
len--;
if (yp2ldap) {
} else if (IS_YP_OPER_INFO(
attrib_num)) {
} else if (IS_YP_MAP_ATTR(
attrib_num)) {
p_error =
&errnum);
return (rc);
char *url,
char **attrs,
int rc;
int errnum;
#ifdef LDAP_URL_OPT_SECURE
return (rc);
char **attrs,
int errCode;
int rc;
NULL, 0);
if (rc <= 0)
referralsp[i]);
if (rc > 0) {
report_error(0, 0);
if (referralsp)
return (rc);
int rc = 0;
int errnum;
if (verbose)
return (rc);
const char *begin_s;
const char *end_s;
return (FALSE);
char **attributes)
int n_attrs;
n_attrs = 0;
if (yp2ldap) {
if (yp2ldap) {
if (yp2ldap) {
* 3. In the header file nis_parse_ldap_conf.h, add the name
* nis_parse_ldap_attr.c, which is used to determine the config_key
* usr/src/pkgdefs/common_files/i.defrpc.nisd, if the user