summaryrefslogtreecommitdiff
path: root/libpam/pam_start.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpam/pam_start.c')
-rw-r--r--libpam/pam_start.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libpam/pam_start.c b/libpam/pam_start.c
index f8955854..bf7c9af9 100644
--- a/libpam/pam_start.c
+++ b/libpam/pam_start.c
@@ -25,12 +25,13 @@ int pam_start (
,service_name, user, pam_conversation, pamh));
if (pamh == NULL) {
- _pam_system_log(LOG_CRIT, "pam_start: invalid argument: pamh == NULL");
+ pam_syslog(NULL, LOG_CRIT,
+ "pam_start: invalid argument: pamh == NULL");
return (PAM_BUF_ERR);
}
if ((*pamh = calloc(1, sizeof(**pamh))) == NULL) {
- _pam_system_log(LOG_CRIT, "pam_start: calloc failed for *pamh");
+ pam_syslog(NULL, LOG_CRIT, "pam_start: calloc failed for *pamh");
return (PAM_BUF_ERR);
}
@@ -48,8 +49,8 @@ int pam_start (
char *tmp;
if (((*pamh)->service_name = _pam_strdup(service_name)) == NULL) {
- _pam_system_log(LOG_CRIT,
- "pam_start: _pam_strdup failed for service name");
+ pam_syslog(*pamh, LOG_CRIT,
+ "pam_start: _pam_strdup failed for service name");
_pam_drop(*pamh);
return (PAM_BUF_ERR);
}
@@ -60,8 +61,8 @@ int pam_start (
if (user) {
if (((*pamh)->user = _pam_strdup(user)) == NULL) {
- _pam_system_log(LOG_CRIT,
- "pam_start: _pam_strdup failed for user");
+ pam_syslog(*pamh, LOG_CRIT,
+ "pam_start: _pam_strdup failed for user");
_pam_drop((*pamh)->service_name);
_pam_drop(*pamh);
return (PAM_BUF_ERR);
@@ -81,7 +82,7 @@ int pam_start (
if (pam_conversation == NULL
|| ((*pamh)->pam_conversation = (struct pam_conv *)
malloc(sizeof(struct pam_conv))) == NULL) {
- _pam_system_log(LOG_CRIT, "pam_start: malloc failed for pam_conv");
+ pam_syslog(*pamh, LOG_CRIT, "pam_start: malloc failed for pam_conv");
_pam_drop((*pamh)->service_name);
_pam_drop((*pamh)->user);
_pam_drop(*pamh);
@@ -93,7 +94,7 @@ int pam_start (
(*pamh)->data = NULL;
if ( _pam_make_env(*pamh) != PAM_SUCCESS ) {
- _pam_system_log(LOG_ERR,"pam_start: failed to initialize environment");
+ pam_syslog(*pamh,LOG_ERR,"pam_start: failed to initialize environment");
_pam_drop((*pamh)->service_name);
_pam_drop((*pamh)->user);
_pam_drop(*pamh);
@@ -108,7 +109,7 @@ int pam_start (
* symbols happens on the first call from the application. */
if ( _pam_init_handlers(*pamh) != PAM_SUCCESS ) {
- _pam_system_log(LOG_ERR, "pam_start: failed to initialize handlers");
+ pam_syslog(*pamh, LOG_ERR, "pam_start: failed to initialize handlers");
_pam_drop_env(*pamh); /* purge the environment */
_pam_drop((*pamh)->service_name);
_pam_drop((*pamh)->user);