summaryrefslogtreecommitdiff
path: root/libpam/pam_env.c
diff options
context:
space:
mode:
authorThorsten Kukuk <kukuk@thkukuk.de>2005-09-04 20:32:25 +0000
committerThorsten Kukuk <kukuk@thkukuk.de>2005-09-04 20:32:25 +0000
commit6a2e5db6331d0f115b1b678891ed0a9ca0571a0b (patch)
tree8d2ff646bc5ce87b3cf0c9237608cb7ec7e99e6b /libpam/pam_env.c
parent70813f3c8c7e5b6ccb8bbd20395765d83f05d35a (diff)
Relevant BUGIDs: none
Purpose of commit: cleanup Commit summary: --------------- Replace _pam_system_log with pam_syslog.
Diffstat (limited to 'libpam/pam_env.c')
-rw-r--r--libpam/pam_env.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/libpam/pam_env.c b/libpam/pam_env.c
index 0e08cbdd..dcdac7ab 100644
--- a/libpam/pam_env.c
+++ b/libpam/pam_env.c
@@ -57,7 +57,7 @@ int _pam_make_env(pam_handle_t *pamh)
pamh->env = (struct pam_environ *) malloc(sizeof(struct pam_environ));
if (pamh->env == NULL) {
- _pam_system_log(LOG_CRIT, "_pam_make_env: out of memory");
+ pam_syslog(pamh, LOG_CRIT, "_pam_make_env: out of memory");
return PAM_BUF_ERR;
}
@@ -67,7 +67,7 @@ int _pam_make_env(pam_handle_t *pamh)
pamh->env->list = (char **)calloc( PAM_ENV_CHUNK, sizeof(char *) );
if (pamh->env->list == NULL) {
- _pam_system_log(LOG_CRIT, "_pam_make_env: no memory for list");
+ pam_syslog(pamh, LOG_CRIT, "_pam_make_env: no memory for list");
_pam_drop(pamh->env);
return PAM_BUF_ERR;
}
@@ -157,7 +157,7 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value)
IF_NO_PAMH("pam_putenv", pamh, PAM_ABORT);
if (name_value == NULL) {
- _pam_system_log(LOG_ERR, "pam_putenv: no variable indicated");
+ pam_syslog(pamh, LOG_ERR, "pam_putenv: no variable indicated");
return PAM_PERM_DENIED;
}
@@ -167,7 +167,7 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value)
for (l2eq=0; name_value[l2eq] && name_value[l2eq] != '='; ++l2eq);
if (l2eq <= 0) {
- _pam_system_log(LOG_ERR, "pam_putenv: bad variable");
+ pam_syslog(pamh, LOG_ERR, "pam_putenv: bad variable");
return PAM_BAD_ITEM;
}
@@ -176,7 +176,7 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value)
*/
if (pamh->env == NULL || pamh->env->list == NULL) {
- _pam_system_log(LOG_ERR, "pam_putenv: no env%s found",
+ pam_syslog(pamh, LOG_ERR, "pam_putenv: no env%s found",
pamh->env == NULL ? "":"-list");
return PAM_ABORT;
}
@@ -199,8 +199,8 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value)
, sizeof(char *) );
if (tmp == NULL) {
/* nothing has changed - old env intact */
- _pam_system_log(LOG_CRIT,
- "pam_putenv: cannot grow environment");
+ pam_syslog(pamh, LOG_CRIT,
+ "pam_putenv: cannot grow environment");
return PAM_BUF_ERR;
}
@@ -251,8 +251,8 @@ int pam_putenv(pam_handle_t *pamh, const char *name_value)
/* getting to here implies we are deleting an item */
if (item < 0) {
- _pam_system_log(LOG_ERR, "pam_putenv: delete non-existent entry; %s",
- name_value);
+ pam_syslog(pamh, LOG_ERR,
+ "pam_putenv: delete non-existent entry; %s", name_value);
return PAM_BAD_ITEM;
}
@@ -290,13 +290,13 @@ const char *pam_getenv(pam_handle_t *pamh, const char *name)
IF_NO_PAMH("pam_getenv", pamh, NULL);
if (name == NULL) {
- _pam_system_log(LOG_ERR, "pam_getenv: no variable indicated");
+ pam_syslog(pamh, LOG_ERR, "pam_getenv: no variable indicated");
return NULL;
}
if (pamh->env == NULL || pamh->env->list == NULL) {
- _pam_system_log(LOG_ERR, "pam_getenv: no env%s found",
- pamh->env == NULL ? "":"-list" );
+ pam_syslog(pamh, LOG_ERR, "pam_getenv: no env%s found",
+ pamh->env == NULL ? "":"-list" );
return NULL;
}
@@ -363,22 +363,22 @@ char **pam_getenvlist(pam_handle_t *pamh)
IF_NO_PAMH("pam_getenvlist", pamh, NULL);
if (pamh->env == NULL || pamh->env->list == NULL) {
- _pam_system_log(LOG_ERR, "pam_getenvlist: no env%s found",
- pamh->env == NULL ? "":"-list" );
+ pam_syslog(pamh, LOG_ERR, "pam_getenvlist: no env%s found",
+ pamh->env == NULL ? "":"-list" );
return NULL;
}
/* some quick checks */
if (pamh->env->requested > pamh->env->entries) {
- _pam_system_log(LOG_ERR, "pam_getenvlist: environment corruption");
+ pam_syslog(pamh, LOG_ERR, "pam_getenvlist: environment corruption");
_pam_dump_env(pamh); /* only active when debugging */
return NULL;
}
for (i=pamh->env->requested-1; i-- > 0; ) {
if (pamh->env->list[i] == NULL) {
- _pam_system_log(LOG_ERR, "pam_getenvlist: environment broken");
+ pam_syslog(pamh, LOG_ERR, "pam_getenvlist: environment broken");
_pam_dump_env(pamh); /* only active when debugging */
return NULL; /* somehow we've broken the environment!? */
}