diff --git a/lib/prototypes.h b/lib/prototypes.h index f2c7ebbb..ccbf1bce 100644 --- a/lib/prototypes.h +++ b/lib/prototypes.h @@ -239,9 +239,11 @@ extern void motd (void); extern /*@null@*/struct passwd *get_my_pwent (void); /* pam_pass_non_interractive.c */ +#ifdef USE_PAM extern int do_pam_passwd_non_interractive (const char *pam_service, const char *username, - const char* password) + const char* password); +#endif /* USE_PAM */ /* obscure.c */ #ifndef USE_PAM diff --git a/libmisc/pam_pass_non_interractive.c b/libmisc/pam_pass_non_interractive.c index 7c597249..8bdb3426 100644 --- a/libmisc/pam_pass_non_interractive.c +++ b/libmisc/pam_pass_non_interractive.c @@ -159,6 +159,8 @@ int do_pam_passwd_non_interractive (const char *pam_service, } (void) pam_end (pamh, PAM_SUCCESS); + + return ((PAM_SUCCESS == ret) ? 0 : 1); } #else /* !USE_PAM */ extern int errno; /* warning: ANSI C forbids an empty source file */