Lines 103-113
call_exec (const char *pam_type, pam_handle_t *pamh,
Link Here
|
103 |
int optargc; |
103 |
int optargc; |
104 |
const char *logfile = NULL; |
104 |
const char *logfile = NULL; |
105 |
const char *authtok = NULL; |
105 |
const char *authtok = NULL; |
|
|
106 |
char authtok_buf[PAM_MAX_RESP_SIZE+1]; |
107 |
|
106 |
pid_t pid; |
108 |
pid_t pid; |
107 |
int fds[2]; |
109 |
int fds[2]; |
108 |
int stdout_fds[2]; |
110 |
int stdout_fds[2]; |
109 |
FILE *stdout_file = NULL; |
111 |
FILE *stdout_file = NULL; |
110 |
|
112 |
|
|
|
113 |
memset(authtok_buf, 0, sizeof(authtok_buf)); |
111 |
if (argc < 1) { |
114 |
if (argc < 1) { |
112 |
pam_syslog (pamh, LOG_ERR, |
115 |
pam_syslog (pamh, LOG_ERR, |
113 |
"This module needs at least one argument"); |
116 |
"This module needs at least one argument"); |
Lines 180-191
call_exec (const char *pam_type, pam_handle_t *pamh,
Link Here
|
180 |
if (resp) |
183 |
if (resp) |
181 |
{ |
184 |
{ |
182 |
pam_set_item (pamh, PAM_AUTHTOK, resp); |
185 |
pam_set_item (pamh, PAM_AUTHTOK, resp); |
183 |
authtok = strndupa (resp, PAM_MAX_RESP_SIZE); |
186 |
authtok = strncpy(authtok_buf, resp, sizeof(authtok_buf)); |
184 |
_pam_drop (resp); |
187 |
_pam_drop (resp); |
185 |
} |
188 |
} |
186 |
} |
189 |
} |
187 |
else |
190 |
else |
188 |
authtok = strndupa (void_pass, PAM_MAX_RESP_SIZE); |
191 |
authtok = strncpy(authtok_buf, void_pass, sizeof(authtok_buf)); |
189 |
|
192 |
|
190 |
if (pipe(fds) != 0) |
193 |
if (pipe(fds) != 0) |
191 |
{ |
194 |
{ |
192 |
- |
|
|