first set amod and then use it

That fixes a crash with PAM module on startup.
Reported by Ismail Donmez.
This commit is contained in:
Nikos Mavrogiannopoulos
2014-12-11 11:36:23 +01:00
parent 6989b6a0c4
commit b18eeb7d74

View File

@@ -418,8 +418,8 @@ unsigned force_cert_auth;
exit(1);
}
#ifdef HAVE_PAM
config->auth_types |= amod->type;
amod = &pam_auth_funcs;
config->auth_types |= amod->type;
#else
fprintf(stderr, "PAM support is disabled\n");
exit(1);