diff options
author | Tomas Mraz <tm@t8m.info> | 2005-09-21 10:00:58 +0000 |
---|---|---|
committer | Tomas Mraz <tm@t8m.info> | 2005-09-21 10:00:58 +0000 |
commit | be09d6354efcb2571731bdffc47da86f22621ac8 (patch) | |
tree | 82117bfbaadb46495a545ba4f567dc9bddd97c33 /modules/pam_unix | |
parent | 627a0401899af257f0fb711ad54194e14a75c530 (diff) | |
download | pam-be09d6354efcb2571731bdffc47da86f22621ac8.tar.gz pam-be09d6354efcb2571731bdffc47da86f22621ac8.tar.bz2 pam-be09d6354efcb2571731bdffc47da86f22621ac8.zip |
Relevant BUGIDs:
Purpose of commit: new feature
Commit summary:
---------------
Moved functions from pammodutil to libpam.
Diffstat (limited to 'modules/pam_unix')
-rw-r--r-- | modules/pam_unix/Makefile.am | 2 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_acct.c | 10 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_passwd.c | 12 | ||||
-rw-r--r-- | modules/pam_unix/pam_unix_sess.c | 4 | ||||
-rw-r--r-- | modules/pam_unix/support.c | 16 |
5 files changed, 21 insertions, 23 deletions
diff --git a/modules/pam_unix/Makefile.am b/modules/pam_unix/Makefile.am index 9997603b..608a095f 100644 --- a/modules/pam_unix/Makefile.am +++ b/modules/pam_unix/Makefile.am @@ -12,7 +12,6 @@ securelibdir = $(SECUREDIR) secureconfdir = $(SCONFIGDIR) AM_CFLAGS = -I$(top_srcdir)/libpam/include -I$(top_srcdir)/libpamc/include \ - -I$(top_srcdir)/modules/pammodutil/include/ \ -DCHKPWD_HELPER=\"$(sbindir)/unix_chkpwd\" AM_LDFLAGS = -L$(top_builddir)/libpam -lpam @LIBCRYPT@ @LIBSELINUX@ @@ -25,7 +24,6 @@ if HAVE_LIBCRACK endif pam_unix_la_LDFLAGS = -no-undefined -avoid-version -module \ - $(top_builddir)/modules/pammodutil/libpammodutil.la \ @LIBCRACK@ @LIBNSL@ if HAVE_VERSIONING pam_unix_la_LDFLAGS += -Wl,--version-script=../modules.map diff --git a/modules/pam_unix/pam_unix_acct.c b/modules/pam_unix/pam_unix_acct.c index d01a1fc0..03143d96 100644 --- a/modules/pam_unix/pam_unix_acct.c +++ b/modules/pam_unix/pam_unix_acct.c @@ -59,7 +59,7 @@ #define PAM_SM_ACCOUNT #include <security/pam_modules.h> -#include <security/_pam_modutil.h> +#include <security/pam_modutil.h> #ifndef LINUX_PAM #include <security/pam_appl.h> @@ -143,7 +143,7 @@ struct spwd *_unix_run_verify_binary(pam_handle_t *pamh, unsigned int ctrl, cons } else { retval = WEXITSTATUS(retval); if (retval != PAM_AUTHINFO_UNAVAIL) { - rc = _pammodutil_read(fds[0], buf, sizeof(buf) - 1); + rc = pam_modutil_read(fds[0], buf, sizeof(buf) - 1); if(rc > 0) { buf[rc] = '\0'; if (sscanf(buf,"%ld:%ld:%ld:%ld:%ld:%ld", @@ -208,7 +208,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, return PAM_USER_UNKNOWN; } - pwent = _pammodutil_getpwnam(pamh, uname); + pwent = pam_modutil_getpwnam(pamh, uname); if (!pwent) { _log_err(LOG_ALERT, pamh ,"could not identify user (from getpwnam(%s))" @@ -232,7 +232,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, return PAM_CRED_INSUFFICIENT; } } - spent = _pammodutil_getspnam (pamh, uname); + spent = pam_modutil_getspnam (pamh, uname); if (save_uid == pwent->pw_uid) setreuid( save_uid, save_euid ); else { @@ -242,7 +242,7 @@ PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t * pamh, int flags, } } else if (_unix_shadowed (pwent)) - spent = _pammodutil_getspnam (pamh, uname); + spent = pam_modutil_getspnam (pamh, uname); else return PAM_SUCCESS; diff --git a/modules/pam_unix/pam_unix_passwd.c b/modules/pam_unix/pam_unix_passwd.c index 54b3de83..7212952e 100644 --- a/modules/pam_unix/pam_unix_passwd.c +++ b/modules/pam_unix/pam_unix_passwd.c @@ -83,7 +83,7 @@ static security_context_t prev_context=NULL; #include <security/pam_appl.h> #endif /* LINUX_PAM */ -#include <security/_pam_modutil.h> +#include <security/pam_modutil.h> #include "yppasswd.h" #include "md5.h" @@ -282,14 +282,14 @@ static int _unix_run_shadow_binary(pam_handle_t *pamh, unsigned int ctrl, const /* if the stored password is NULL */ int rc=0; if (fromwhat) - _pammodutil_write(fds[1], fromwhat, strlen(fromwhat)+1); + pam_modutil_write(fds[1], fromwhat, strlen(fromwhat)+1); else - _pammodutil_write(fds[1], "", 1); + pam_modutil_write(fds[1], "", 1); if (towhat) { - _pammodutil_write(fds[1], towhat, strlen(towhat)+1); + pam_modutil_write(fds[1], towhat, strlen(towhat)+1); } else - _pammodutil_write(fds[1], "", 1); + pam_modutil_write(fds[1], "", 1); close(fds[0]); /* close here to avoid possible SIGPIPE above */ close(fds[1]); @@ -463,7 +463,7 @@ static int save_old_password(pam_handle_t *pamh, fclose(opwfile); if (!found) { - pwd = _pammodutil_getpwnam(pamh, forwho); + pwd = pam_modutil_getpwnam(pamh, forwho); if (pwd == NULL) { err = 1; } else { diff --git a/modules/pam_unix/pam_unix_sess.c b/modules/pam_unix/pam_unix_sess.c index e783039e..49aa29aa 100644 --- a/modules/pam_unix/pam_unix_sess.c +++ b/modules/pam_unix/pam_unix_sess.c @@ -53,7 +53,7 @@ #include <security/_pam_macros.h> #include <security/pam_modules.h> -#include <security/_pam_modutil.h> +#include <security/pam_modutil.h> #ifndef LINUX_PAM #include <security/pam_appl.h> @@ -91,7 +91,7 @@ PAM_EXTERN int pam_sm_open_session(pam_handle_t * pamh, int flags, "open_session - error recovering service"); return PAM_SESSION_ERR; } - login_name = _pammodutil_getlogin(pamh); + login_name = pam_modutil_getlogin(pamh); if (login_name == NULL) { login_name = ""; } diff --git a/modules/pam_unix/support.c b/modules/pam_unix/support.c index 91920291..f9b84da5 100644 --- a/modules/pam_unix/support.c +++ b/modules/pam_unix/support.c @@ -25,7 +25,7 @@ #include <security/_pam_macros.h> #include <security/pam_modules.h> -#include <security/_pam_modutil.h> +#include <security/pam_modutil.h> #include "md5.h" #include "support.h" @@ -476,7 +476,7 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name) /* UNIX passwords area */ /* Get password file entry... */ - pwd = _pammodutil_getpwnam (pamh, name); + pwd = pam_modutil_getpwnam (pamh, name); if (pwd != NULL) { if (strcmp( pwd->pw_passwd, "*NP*" ) == 0) @@ -498,7 +498,7 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name) } } - spwdent = _pammodutil_getspnam (pamh, name); + spwdent = pam_modutil_getspnam (pamh, name); if (save_uid == pwd->pw_uid) setreuid( save_uid, save_euid ); else { @@ -511,7 +511,7 @@ _unix_blankpasswd (pam_handle_t *pamh, unsigned int ctrl, const char *name) * ...and shadow password file entry for this user, * if shadowing is enabled */ - spwdent = _pammodutil_getspnam(pamh, name); + spwdent = pam_modutil_getspnam(pamh, name); } if (spwdent) salt = x_strdup(spwdent->sp_pwdp); @@ -662,7 +662,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name D(("locating user's record")); /* UNIX passwords area */ - pwd = _pammodutil_getpwnam (pamh, name); /* Get password file entry... */ + pwd = pam_modutil_getpwnam (pamh, name); /* Get password file entry... */ if (pwd != NULL) { if (strcmp( pwd->pw_passwd, "*NP*" ) == 0) @@ -683,7 +683,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name } } - spwdent = _pammodutil_getspnam (pamh, name); + spwdent = pam_modutil_getspnam (pamh, name); if (save_uid == pwd->pw_uid) setreuid( save_uid, save_euid ); else { @@ -696,7 +696,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name * ...and shadow password file entry for this user, * if shadowing is enabled */ - spwdent = _pammodutil_getspnam (pamh, name); + spwdent = pam_modutil_getspnam (pamh, name); } if (spwdent) salt = x_strdup(spwdent->sp_pwdp); @@ -806,7 +806,7 @@ int _unix_verify_password(pam_handle_t * pamh, const char *name const void *void_old; - login_name = _pammodutil_getlogin(pamh); + login_name = pam_modutil_getlogin(pamh); if (login_name == NULL) { login_name = ""; } |