diff options
author | Andreas Schneider <asn@samba.org> | 2019-05-29 16:51:01 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2019-06-27 12:54:23 +0000 |
commit | 99d250a3abb1761e509359532e72caee2af6ee81 (patch) | |
tree | 361f2c504ab66d1210403be722fc86063213b6aa /libcli | |
parent | cad3adb0b478e3bb2b964d4eefba4e96f34d4270 (diff) | |
download | samba-99d250a3abb1761e509359532e72caee2af6ee81.tar.gz |
libcli:auth: Return NTSTATUS for netlogon_creds_crypt_samlogon_logon()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r-- | libcli/auth/credentials.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c index e0fec6e2ef2..175c5ee6039 100644 --- a/libcli/auth/credentials.c +++ b/libcli/auth/credentials.c @@ -702,13 +702,13 @@ NTSTATUS netlogon_creds_encrypt_samlogon_validation(struct netlogon_creds_Creden true); } -static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_CredentialState *creds, - enum netr_LogonInfoClass level, - union netr_LogonLevel *logon, - bool do_encrypt) +static NTSTATUS netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_CredentialState *creds, + enum netr_LogonInfoClass level, + union netr_LogonLevel *logon, + bool do_encrypt) { if (logon == NULL) { - return; + return NT_STATUS_INVALID_PARAMETER; } switch (level) { @@ -717,7 +717,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential case NetlogonServiceInformation: case NetlogonServiceTransitiveInformation: if (logon->password == NULL) { - return; + return NT_STATUS_INVALID_PARAMETER; } if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) { @@ -780,7 +780,7 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential case NetlogonGenericInformation: if (logon->generic == NULL) { - return; + return NT_STATUS_INVALID_PARAMETER; } if (creds->negotiate_flags & NETLOGON_NEG_SUPPORTS_AES) { @@ -802,24 +802,22 @@ static void netlogon_creds_crypt_samlogon_logon(struct netlogon_creds_Credential } break; } + + return NT_STATUS_OK; } NTSTATUS netlogon_creds_decrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds, enum netr_LogonInfoClass level, union netr_LogonLevel *logon) { - netlogon_creds_crypt_samlogon_logon(creds, level, logon, false); - - return NT_STATUS_OK; + return netlogon_creds_crypt_samlogon_logon(creds, level, logon, false); } NTSTATUS netlogon_creds_encrypt_samlogon_logon(struct netlogon_creds_CredentialState *creds, enum netr_LogonInfoClass level, union netr_LogonLevel *logon) { - netlogon_creds_crypt_samlogon_logon(creds, level, logon, true); - - return NT_STATUS_OK; + return netlogon_creds_crypt_samlogon_logon(creds, level, logon, true); } union netr_LogonLevel *netlogon_creds_shallow_copy_logon(TALLOC_CTX *mem_ctx, |