mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
r18965: fixed the bug with RPC-NETLOGON and solaris sparc machines. This bug
took a _LONG_ time to find.
The problem was that when encoding/decoding password buffers we use
the pull/push string functions, which by default align unicode
strings. But on solaris sparc the buffer is not aligned always (its a
stack variable, an array of uint8_t). That perfectly OK in C, so we
just tell the pull/push functions not to auto-align.
(This used to be commit bb7835eced
)
This commit is contained in:
committed by
Gerald (Jerry) Carter
parent
3f96df61da
commit
f3d684a48c
@ -460,6 +460,9 @@ BOOL encode_pw_buffer(uint8_t buffer[516], const char *password, int string_flag
|
|||||||
uint8_t new_pw[512];
|
uint8_t new_pw[512];
|
||||||
size_t new_pw_len;
|
size_t new_pw_len;
|
||||||
|
|
||||||
|
/* the incoming buffer can be any alignment. */
|
||||||
|
string_flags |= STR_NOALIGN;
|
||||||
|
|
||||||
new_pw_len = push_string(new_pw,
|
new_pw_len = push_string(new_pw,
|
||||||
password,
|
password,
|
||||||
sizeof(new_pw), string_flags);
|
sizeof(new_pw), string_flags);
|
||||||
@ -489,6 +492,9 @@ BOOL decode_pw_buffer(uint8_t in_buffer[516], char *new_pwrd,
|
|||||||
{
|
{
|
||||||
int byte_len=0;
|
int byte_len=0;
|
||||||
|
|
||||||
|
/* the incoming buffer can be any alignment. */
|
||||||
|
string_flags |= STR_NOALIGN;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Warning !!! : This function is called from some rpc call.
|
Warning !!! : This function is called from some rpc call.
|
||||||
The password IN the buffer may be a UNICODE string.
|
The password IN the buffer may be a UNICODE string.
|
||||||
|
Reference in New Issue
Block a user