diff options
Diffstat (limited to 'modules/pam_tally')
-rw-r--r-- | modules/pam_tally/Makefile | 10 | ||||
-rw-r--r-- | modules/pam_tally/pam_tally.c | 3 |
2 files changed, 10 insertions, 3 deletions
diff --git a/modules/pam_tally/Makefile b/modules/pam_tally/Makefile index c39970dd..718d3b30 100644 --- a/modules/pam_tally/Makefile +++ b/modules/pam_tally/Makefile @@ -44,6 +44,12 @@ endif APPLICATION = $(TITLE) APPMODE = 755 +LINK_PAMMODUTILS = -L../pammodutil -lpammodutil -L../../libpam -lpam +INCLUDE_PAMMODUTILS = -I../pammodutil/include + +LDFLAGS += $(LINK_PAMMODUTILS) +CFLAGS += $(INCLUDE_PAMMODUTILS) + ####################### don't edit below ####################### all: dirs $(LIBSHARED) $(LIBSTATIC) register $(APPLICATION) @@ -65,10 +71,10 @@ ifdef DYNAMIC $(LIBOBJD): $(LIBSRC) $(LIBSHARED): $(LIBOBJD) - $(LD_D) -o $@ $(LIBOBJD) -L../../libpam -lpam $(NEED_LINK_LIB_C) + $(LD_D) -o $@ $(LIBOBJD) $(LDFLAGS) $(APPLICATION): $(APPOBJD) $(TITLE).c - $(CC) $(CFLAGS) -o $@ $(APPOBJD) $(LOADLIBES) + $(CC) $(CFLAGS) -o $@ $(APPOBJD) $(LDFLAGS) $(LOADLIBES) endif diff --git a/modules/pam_tally/pam_tally.c b/modules/pam_tally/pam_tally.c index 27fe0b37..341f448e 100644 --- a/modules/pam_tally/pam_tally.c +++ b/modules/pam_tally/pam_tally.c @@ -49,6 +49,7 @@ /* #define PAM_SM_PASSWORD */ #include <security/pam_modules.h> +#include <security/_pam_modutil.h> /*---------------------------------------------------------------------*/ @@ -123,7 +124,7 @@ static int pam_get_uid( pam_handle_t *pamh, uid_t *uid, const char **userp ) return PAM_AUTH_ERR; } - if ( ! ( pw = getpwnam( user ) ) ) { + if ( ! ( pw = _pammodutil_getpwnam( pamh, user ) ) ) { _pam_log(LOG_ERR,MODULE_NAME ": pam_get_uid; no such user %s",user); return PAM_USER_UNKNOWN; } |