summaryrefslogtreecommitdiff
path: root/usr/src/lib/libsldap/common/ns_confmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libsldap/common/ns_confmgr.c')
-rw-r--r--usr/src/lib/libsldap/common/ns_confmgr.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/usr/src/lib/libsldap/common/ns_confmgr.c b/usr/src/lib/libsldap/common/ns_confmgr.c
index 5b99b9b4c2..862e20d035 100644
--- a/usr/src/lib/libsldap/common/ns_confmgr.c
+++ b/usr/src/lib/libsldap/common/ns_confmgr.c
@@ -123,7 +123,8 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
(void) snprintf(errstr, sizeof (errstr),
gettext("Unable to open filename '%s' "
"for reading (errno=%d)."), file, errno);
- MKERROR(LOG_ERR, *error, NS_CONFIG_FILE, strdup(errstr), NULL);
+ MKERROR(LOG_ERR, *error, NS_CONFIG_FILE, strdup(errstr),
+ NS_LDAP_MEMORY);
return (NS_NOTFOUND);
}
@@ -149,7 +150,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
gettext("Missing Name or Value on line %d."),
lineno);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX,
- strdup(errstr), NULL);
+ strdup(errstr), NS_LDAP_MEMORY);
(void) fclose(fp);
return (NS_PARSE_ERR);
}
@@ -158,7 +159,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
gettext("Illegal profile type on line %d."),
lineno);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX,
- strdup(errstr), NULL);
+ strdup(errstr), NS_LDAP_MEMORY);
(void) fclose(fp);
return (NS_PARSE_ERR);
}
@@ -167,7 +168,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
gettext("Illegal NS_LDAP_FILE_VERSION "
"on line %d."), lineno);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX,
- strdup(errstr), NULL);
+ strdup(errstr), NS_LDAP_MEMORY);
(void) fclose(fp);
return (NS_PARSE_ERR);
}
@@ -187,7 +188,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
gettext("Illegal entry in '%s' on "
"line %d"), file, lineno);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX,
- strdup(errstr), NULL);
+ strdup(errstr), NS_LDAP_MEMORY);
(void) fclose(fp);
return (NS_PARSE_ERR);
}
@@ -207,7 +208,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
gettext("Illegal entry in '%s' on "
"line %d"), file, lineno);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX,
- strdup(errstr), NULL);
+ strdup(errstr), NS_LDAP_MEMORY);
(void) fclose(fp);
return (NS_PARSE_ERR);
}
@@ -219,7 +220,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
(void) snprintf(errstr, sizeof (errstr),
gettext("Empty config file: '%s'"), file);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, strdup(errstr),
- NULL);
+ NS_LDAP_MEMORY);
return (NS_PARSE_ERR);
}
if (linelen == -2) {
@@ -227,7 +228,7 @@ read_file(ns_config_t *ptr, int cred_file, ns_ldap_error_t **error)
(void) snprintf(errstr, sizeof (errstr),
gettext("Line too long in '%s'"), file);
MKERROR(LOG_ERR, *error, NS_CONFIG_SYNTAX, strdup(errstr),
- NULL);
+ NS_LDAP_MEMORY);
return (NS_PARSE_ERR);
}
return (NS_SUCCESS);
@@ -265,7 +266,8 @@ set_attr(ns_config_t *config_struct,
__s_api_get_versiontype(config_struct, attr_name, &idx) < 0) {
(void) snprintf(errmsg, sizeof (errmsg),
gettext("Illegal DUAProfile property: <%s>."), attr_name);
- MKERROR(LOG_ERR, *errorp, NS_LDAP_CONFIG, strdup(errmsg), NULL);
+ MKERROR(LOG_ERR, *errorp, NS_LDAP_CONFIG, strdup(errmsg),
+ NS_LDAP_MEMORY);
return (NS_LDAP_CONFIG);
}
@@ -1013,7 +1015,7 @@ __ns_ldap_download(const char *profile, char *addr, char *baseDN,
(void) snprintf(errstr, sizeof (errstr),
gettext("No configuration information available."));
MKERROR(LOG_ERR, *errorp, NS_CONFIG_NOTLOADED, strdup(errstr),
- NULL);
+ NS_LDAP_MEMORY);
return (NS_LDAP_CONFIG);
}
@@ -1047,7 +1049,7 @@ __ns_ldap_download(const char *profile, char *addr, char *baseDN,
if (rc != NS_LDAP_SUCCESS) {
__s_api_destroy_config(new_ptr);
MKERROR(LOG_ERR, *errorp, NS_CONFIG_NOTLOADED, strdup(errstr),
- NULL);
+ NS_LDAP_MEMORY);
return (NS_LDAP_CONFIG);
}