summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-27 23:31:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:52 -0500
commitb6b9898a0710585751eab45a0d16a61a4cff208a (patch)
tree10a2daae61916e6c7093962ab553ed531e7f7e10
parent95e4091596324e3f36ed95cdb13a6e179cb9de08 (diff)
downloadsamba-b6b9898a0710585751eab45a0d16a61a4cff208a.tar.gz
samba-b6b9898a0710585751eab45a0d16a61a4cff208a.tar.bz2
samba-b6b9898a0710585751eab45a0d16a61a4cff208a.zip
r18966: this bug affects Samba3 too. I'm actually surprised nobody has
reported that Samba3 on Solaris Sparc with the native compiler can't join Windows domains. If it worked we were just lucky. I suspect it just didn't work. (This used to be commit 9df1e7d98973ac1ec6ba25d528591216e568f2f3)
-rw-r--r--source3/libsmb/smbencrypt.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libsmb/smbencrypt.c b/source3/libsmb/smbencrypt.c
index 96c086d680..5f7b5b1809 100644
--- a/source3/libsmb/smbencrypt.c
+++ b/source3/libsmb/smbencrypt.c
@@ -496,6 +496,9 @@ BOOL encode_pw_buffer(uint8 buffer[516], const char *password, int string_flags)
uchar new_pw[512];
size_t new_pw_len;
+ /* the incoming buffer can be any alignment. */
+ string_flags |= STR_NOALIGN;
+
new_pw_len = push_string(NULL, new_pw,
password,
sizeof(new_pw), string_flags);
@@ -526,6 +529,9 @@ BOOL decode_pw_buffer(uint8 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.