1
0
mirror of https://github.com/samba-team/samba.git synced 2025-09-16 01:44:21 +03:00

r3557: Use a switch, not a series of if/else if statements.

Andrew Bartlett
(This used to be commit fb7bc73f58)
This commit is contained in:
Andrew Bartlett
2004-11-05 12:52:09 +00:00
committed by Gerald (Jerry) Carter
parent 6e3b0a0378
commit dc73064bc5

View File

@@ -280,6 +280,7 @@ struct samlogon_state {
struct netr_LogonSamLogon r; struct netr_LogonSamLogon r;
struct netr_Authenticator auth, auth2; struct netr_Authenticator auth, auth2;
struct creds_CredentialState creds; struct creds_CredentialState creds;
DATA_BLOB chall; DATA_BLOB chall;
}; };
@@ -374,14 +375,16 @@ static NTSTATUS check_samlogon(struct samlogon_state *samlogon_state,
} }
/* find and decyrpt the session keys, return in parameters above */ /* find and decyrpt the session keys, return in parameters above */
if (r->in.validation_level == 2) { switch (r->in.validation_level) {
case 2:
base = &r->out.validation.sam2->base; base = &r->out.validation.sam2->base;
} else if (r->in.validation_level == 3) { break;
case 3:
base = &r->out.validation.sam3->base; base = &r->out.validation.sam3->base;
} else if (r->in.validation_level == 6) { break;
case 6:
base = &r->out.validation.sam6->base; base = &r->out.validation.sam6->base;
} else { break;
base = NULL;
} }
if (r->in.validation_level != 6) { if (r->in.validation_level != 6) {