optimizers from removing memset() calls.
char *prompt;
sudo_auth *auth;
{
- char *message, *pass;
+ volatile char *pass;
+ char *message;
int reenter = 1;
int rval = AUTH_FAILURE;
pass = tgetpass(prompt, def_ival(I_PASSWD_TIMEOUT) * 60, tgetpass_flags);
if (pass) {
- if (authenticate(pw->pw_name, pass, &reenter, &message) == 0)
+ if (authenticate(pw->pw_name, (char *)pass, &reenter, &message) == 0)
rval = AUTH_SUCCESS;
memset(pass, 0, strlen(pass));
}
char *prompt;
sudo_auth *auth;
{
- char *s, *pass;
+ volatile char *pass;
+ char *s;
size_t len;
int authok = 0;
sigaction_t sa, osa;
nil_pw = 1;
if (pass) {
- authok = auth_userresponse(as, pass, 1);
+ authok = auth_userresponse(as, (char *)pass, 1);
memset(pass, 0, strlen(pass));
}
char *prompt;
sudo_auth *auth;
{
- char *pass; /* Password from the user */
- char buf[SUDO_PASS_MAX + 12]; /* General prupose buffer */
+ volatile char *pass; /* Password from the user */
+ volatile char buf[SUDO_PASS_MAX + 12]; /* General prupose buffer */
char resp[128]; /* Response from the server */
int error;
extern int nil_pw;
struct pam_response **response;
VOID *appdata_ptr;
{
- struct pam_response *pr;
+ volatile struct pam_response *pr;
PAM_CONST struct pam_message *pm;
const char *p = def_prompt;
- char *pass;
+ volatile char *pass;
int n;
extern int nil_pw;
int success = AUTH_FAILURE;
int status;
int flags;
- char *p;
+ volatile char *p;
sudo_auth *auth;
sigaction_t sa, osa;
if (NEEDS_USER(auth))
set_perms(PERM_USER);
- success = auth->status = (auth->verify)(pw, p, auth);
+ success = auth->status = (auth->verify)(pw, (char *)p, auth);
if (NEEDS_USER(auth))
set_perms(PERM_ROOT);