diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 21:23:37 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 22:11:51 -0800 |
commit | 7e6c4749370338c9af7e1b959f8ab96d089786d6 (patch) | |
tree | 2da5e702d7da7b222237ea5ac71e208dd70791a6 /modules/pam_unix/pam_unix_auth.c | |
parent | fa4960114fc50965a9696f2db7406a9d792e3ff8 (diff) | |
parent | 795badba7f95e737f979917859cd32c9bd47bcad (diff) | |
download | pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.tar.gz pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.tar.bz2 pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.zip |
Merge upstream version 1.1.8
Diffstat (limited to 'modules/pam_unix/pam_unix_auth.c')
-rw-r--r-- | modules/pam_unix/pam_unix_auth.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/modules/pam_unix/pam_unix_auth.c b/modules/pam_unix/pam_unix_auth.c index d9c4ea55..44573e6c 100644 --- a/modules/pam_unix/pam_unix_auth.c +++ b/modules/pam_unix/pam_unix_auth.c @@ -50,7 +50,11 @@ /* indicate the following groups are defined */ -#define PAM_SM_AUTH +#ifdef PAM_STATIC +# include "pam_unix_static.h" +#else +# define PAM_SM_AUTH +#endif #define _PAM_EXTERN_FUNCTIONS #include <security/_pam_macros.h> @@ -98,9 +102,8 @@ setcred_free (pam_handle_t *pamh UNUSED, void *ptr, int err UNUSED) free (ptr); } - -PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags - ,int argc, const char **argv) +int +pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc, const char **argv) { unsigned int ctrl; int retval, *ret_data = NULL; @@ -190,7 +193,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags * warned you. -- AOY */ -PAM_EXTERN int +int pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED, int argc UNUSED, const char **argv UNUSED) { @@ -206,22 +209,10 @@ pam_sm_setcred (pam_handle_t *pamh, int flags UNUSED, don't worry about an explicit check of argv. */ if (pam_get_data(pamh, "unix_setcred_return", &pretval) == PAM_SUCCESS && pretval) { - retval = *(const int *)pretval; + retval = *(const int *)pretval; pam_set_data(pamh, "unix_setcred_return", NULL, NULL); D(("recovered data indicates that old retval was %d", retval)); } return retval; } - -#ifdef PAM_STATIC -struct pam_module _pam_unix_auth_modstruct = { - "pam_unix_auth", - pam_sm_authenticate, - pam_sm_setcred, - NULL, - NULL, - NULL, - NULL, -}; -#endif |