From f692694b99319ef1f534ea29f001922656402cdf Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 29 Nov 2007 17:25:41 -0800 Subject: Remove PSTRING_LEN from smbd/ nmbd/. Remove pstring from libsmb/clidfs.c except for a nasty hack (that will be removed when pstrings are gone from client/). Jeremy. (This used to be commit cc257b71d13daa47e6f2315d0f07a60eb4aaeca6) --- source3/libsmb/cliconnect.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'source3/libsmb/cliconnect.c') diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c index e3800bfb33..14140811d2 100644 --- a/source3/libsmb/cliconnect.c +++ b/source3/libsmb/cliconnect.c @@ -879,8 +879,8 @@ ntlmssp: password is in plaintext, the same should be done. ****************************************************************************/ -NTSTATUS cli_session_setup(struct cli_state *cli, - const char *user, +NTSTATUS cli_session_setup(struct cli_state *cli, + const char *user, const char *pass, int passlen, const char *ntpass, int ntpasslen, const char *workgroup) @@ -888,8 +888,17 @@ NTSTATUS cli_session_setup(struct cli_state *cli, char *p; fstring user2; + if (user) { + fstrcpy(user2, user); + } else { + user2[0] ='\0'; + } + + if (!workgroup) { + workgroup = ""; + } + /* allow for workgroups as part of the username */ - fstrcpy(user2, user); if ((p=strchr_m(user2,'\\')) || (p=strchr_m(user2,'/')) || (p=strchr_m(user2,*lp_winbind_separator()))) { *p = 0; -- cgit