summaryrefslogtreecommitdiff
path: root/source4/libcli/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-27 23:24:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:24 -0500
commitf3d684a48c1339a8df4fb5b8e79b194a1752bb7c (patch)
tree0c46b37e84cf53e1d9239b7566a49e942e2b3816 /source4/libcli/auth
parent3f96df61dadb107867c174880029838c5c850cd3 (diff)
downloadsamba-f3d684a48c1339a8df4fb5b8e79b194a1752bb7c.tar.gz
samba-f3d684a48c1339a8df4fb5b8e79b194a1752bb7c.tar.bz2
samba-f3d684a48c1339a8df4fb5b8e79b194a1752bb7c.zip
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 bb7835eced00607eb6b1725be6d96a6dcb842049)
Diffstat (limited to 'source4/libcli/auth')
-rw-r--r--source4/libcli/auth/smbencrypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/libcli/auth/smbencrypt.c b/source4/libcli/auth/smbencrypt.c
index 9fce590d43..67da795a44 100644
--- a/source4/libcli/auth/smbencrypt.c
+++ b/source4/libcli/auth/smbencrypt.c
@@ -460,6 +460,9 @@ BOOL encode_pw_buffer(uint8_t buffer[516], const char *password, int string_flag
uint8_t new_pw[512];
size_t new_pw_len;
+ /* the incoming buffer can be any alignment. */
+ string_flags |= STR_NOALIGN;
+
new_pw_len = push_string(new_pw,
password,
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;
+ /* the incoming buffer can be any alignment. */
+ string_flags |= STR_NOALIGN;
+
/*
Warning !!! : This function is called from some rpc call.
The password IN the buffer may be a UNICODE string.