mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
silence warnings
This commit is contained in:
@@ -121,12 +121,11 @@ unsigned j;
|
||||
READ_MULTI_LINE("auth", auth, auth_size, 1);
|
||||
for (j=0;j<auth_size;j++) {
|
||||
if (strcasecmp(auth[j], "pam") == 0) {
|
||||
if (config->auth_types & AUTH_TYPE_USERNAME_PASS != 0) {
|
||||
if ((config->auth_types & AUTH_TYPE_USERNAME_PASS) != 0) {
|
||||
fprintf(stderr, "You cannot mix multiple username/password authentication methods\n");
|
||||
exit(1);
|
||||
}
|
||||
#ifdef HAVE_PAM
|
||||
config->auth_types |= AUTH_TYPE_USERNAME_PASS;
|
||||
config->auth_types |= AUTH_TYPE_PAM;
|
||||
#else
|
||||
fprintf(stderr, "PAM support is disabled\n");
|
||||
@@ -135,7 +134,7 @@ unsigned j;
|
||||
} else if (strncasecmp(auth[j], "plain[", 6) == 0) {
|
||||
char* p;
|
||||
|
||||
if (config->auth_types & AUTH_TYPE_USERNAME_PASS != 0) {
|
||||
if ((config->auth_types & AUTH_TYPE_USERNAME_PASS) != 0) {
|
||||
fprintf(stderr, "You cannot mix multiple username/password authentication methods\n");
|
||||
exit(1);
|
||||
}
|
||||
@@ -147,7 +146,6 @@ unsigned j;
|
||||
exit(1);
|
||||
}
|
||||
*p = 0;
|
||||
config->auth_types |= AUTH_TYPE_USERNAME_PASS;
|
||||
config->auth_types |= AUTH_TYPE_PLAIN;
|
||||
} else if (strcasecmp(auth[j], "certificate") == 0) {
|
||||
config->auth_types |= AUTH_TYPE_CERTIFICATE;
|
||||
|
||||
Reference in New Issue
Block a user