s3: Fix bug 8009 - net rap session cannot get username
authorVolker Lendecke <vl@samba.org>
Mon, 14 Mar 2011 17:35:23 +0000 (10:35 -0700)
committerKarolin Seeger <kseeger@samba.org>
Tue, 14 Jun 2011 10:55:57 +0000 (12:55 +0200)
Looking in [MS-RAP].pdf - these strings are always 4 bytes as an
offset in the rparam area, the string length is the size in the rdata area.
Se we must always return we have consumed 4 param bytes.
(cherry picked from commit dd2e6fde0ab2e929b108c22244aac746e036a22c)

source3/libsmb/clirap2.c

index 4fd9dc6b843d6a245124d7e52040e4bddcec5b2f..011c4c2b455919a3e5ebd319d02da17942f35a54 100644 (file)
@@ -210,7 +210,7 @@ static size_t rap_getstringp(TALLOC_CTX *ctx, char *p, char **dest, char *r, uin
                }
        }
        pull_string_talloc(ctx,src,0,dest,src,len,STR_ASCII);
-       return len;
+       return 4;
 }
 
 static char *make_header(char *param, uint16 apinum, const char *reqfmt, const char *datafmt)