mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
libcli/auth: reject computer_name longer than 15 chars
This matches Windows, it seems they use a fixed size field to store netlogon_creds_CredentialState. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
387ed2e15d
commit
b8fdeb8ca7
@ -78,6 +78,14 @@ NTSTATUS schannel_store_session_key_tdb(struct db_context *db_sc,
|
||||
char *name_upper;
|
||||
NTSTATUS status;
|
||||
|
||||
if (strlen(creds->computer_name) > 15) {
|
||||
/*
|
||||
* We may want to check for a completely
|
||||
* valid netbios name.
|
||||
*/
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
name_upper = strupper_talloc(mem_ctx, creds->computer_name);
|
||||
if (!name_upper) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
|
Loading…
x
Reference in New Issue
Block a user