diff options
author | Steve Langasek <vorlon@debian.org> | 2019-01-22 15:01:39 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-22 15:02:03 -0800 |
commit | 5cd7bb4511a7c2b355a615f19a9eca193320aa3e (patch) | |
tree | ceb3e40947d1f0f4712f473e410494177d5763e0 /modules/pam_securetty/pam_securetty.c | |
parent | cfa575497a113d8da1a2c79ef028b5c9648dc136 (diff) | |
parent | f00afb1ef201b2eef7f9ddbe5a0c6ca802cf49bb (diff) | |
download | pam-5cd7bb4511a7c2b355a615f19a9eca193320aa3e.tar.gz pam-5cd7bb4511a7c2b355a615f19a9eca193320aa3e.tar.bz2 pam-5cd7bb4511a7c2b355a615f19a9eca193320aa3e.zip |
Merge upstream version 1.3.0
Diffstat (limited to 'modules/pam_securetty/pam_securetty.c')
-rw-r--r-- | modules/pam_securetty/pam_securetty.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/modules/pam_securetty/pam_securetty.c b/modules/pam_securetty/pam_securetty.c index 5f2d1bec..e279efac 100644 --- a/modules/pam_securetty/pam_securetty.c +++ b/modules/pam_securetty/pam_securetty.c @@ -159,11 +159,10 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl, if (cmdlinefile != NULL) { char line[LINE_MAX], *p; - line[0] = 0; - fgets(line, sizeof(line), cmdlinefile); + p = fgets(line, sizeof(line), cmdlinefile); fclose(cmdlinefile); - for (p = line; p; p = strstr(p+1, "console=")) { + for (; p; p = strstr(p+1, "console=")) { char *e; /* Test whether this is a beginning of a word? */ @@ -236,7 +235,6 @@ securetty_perform_check (pam_handle_t *pamh, int ctrl, /* --- authentication management functions --- */ -PAM_EXTERN int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { @@ -248,7 +246,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags UNUSED, int argc, return securetty_perform_check(pamh, ctrl, __FUNCTION__); } -PAM_EXTERN int +int pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED, int argc UNUSED, const char **argv UNUSED) { @@ -257,7 +255,7 @@ pam_sm_setcred (pam_handle_t *pamh UNUSED, int flags UNUSED, /* --- account management functions --- */ -PAM_EXTERN int +int pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { @@ -270,21 +268,4 @@ pam_sm_acct_mgmt (pam_handle_t *pamh, int flags UNUSED, return securetty_perform_check(pamh, ctrl, __FUNCTION__); } - -#ifdef PAM_STATIC - -/* static module data */ - -struct pam_module _pam_securetty_modstruct = { - "pam_securetty", - pam_sm_authenticate, - pam_sm_setcred, - pam_sm_acct_mgmt, - NULL, - NULL, - NULL, -}; - -#endif /* PAM_STATIC */ - /* end of module definition */ |