1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-18 06:04:06 +03:00

libcli/auth: s/encrypt/do_encrypt

This avoids compiler warnings.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Stefan Metzmacher 2014-02-27 09:40:03 +01:00 committed by Andrew Bartlett
parent c8519003a3
commit cd648ec00f

View File

@ -624,7 +624,7 @@ void netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_Credential
static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_CredentialState *creds,
enum netr_LogonInfoClass level,
union netr_LogonLevel *logon,
bool encrypt)
bool do_encrypt)
{
static const char zeros[16];
@ -646,7 +646,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
h = logon->password->lmpassword.hash;
if (memcmp(h, zeros, 16) != 0) {
if (encrypt) {
if (do_encrypt) {
netlogon_creds_aes_encrypt(creds, h, 16);
} else {
netlogon_creds_aes_decrypt(creds, h, 16);
@ -655,7 +655,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
h = logon->password->ntpassword.hash;
if (memcmp(h, zeros, 16) != 0) {
if (encrypt) {
if (do_encrypt) {
netlogon_creds_aes_encrypt(creds, h, 16);
} else {
netlogon_creds_aes_decrypt(creds, h, 16);
@ -678,7 +678,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
p = &logon->password->lmpassword;
if (memcmp(p->hash, zeros, 16) != 0) {
if (encrypt) {
if (do_encrypt) {
netlogon_creds_des_encrypt(creds, p);
} else {
netlogon_creds_des_decrypt(creds, p);
@ -686,7 +686,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
}
p = &logon->password->ntpassword;
if (memcmp(p->hash, zeros, 16) != 0) {
if (encrypt) {
if (do_encrypt) {
netlogon_creds_des_encrypt(creds, p);
} else {
netlogon_creds_des_decrypt(creds, p);
@ -705,7 +705,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential
}
if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) {
if (encrypt) {
if (do_encrypt) {
netlogon_creds_aes_encrypt(creds,
logon->generic->data,
logon->generic->length);