diff options
author | Günther Deschner <gd@samba.org> | 2009-04-27 18:47:41 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-04-27 21:05:40 +0200 |
commit | d9805878e242d0d279f340b4a1fd084c77f240b1 (patch) | |
tree | c6e6e753fb08b9fb247dea860476c2146f18900c /source3 | |
parent | a94bd62d28838d04ff32c34205a073c7a4d9fa9b (diff) | |
download | samba-d9805878e242d0d279f340b4a1fd084c77f240b1.tar.gz samba-d9805878e242d0d279f340b4a1fd084c77f240b1.tar.bz2 samba-d9805878e242d0d279f340b4a1fd084c77f240b1.zip |
s3-auth-charcnv: fix push_string(). Don't push to ucs2 and ascii after another.
This fixes all kinds of encrypted passwords used in the shared auth code naturally.
Andrew B., please check.
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/charcnv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index eb794d8347..b94566863c 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -1672,8 +1672,9 @@ ssize_t push_string(void *dest, const char *src, size_t dest_len, int flags) if (!(flags & STR_ASCII) && \ (flags & STR_UNICODE)) { ret = push_ucs2(NULL, dest, src, dest_len, flags); + } else { + ret = push_ascii(dest, src, dest_len, flags); } - ret = push_ascii(dest, src, dest_len, flags); if (ret == (size_t)-1) { return -1; } |