- got client code cleartext passwords working again in cli_session_setup.
[samba.git] / source / smbwrapper / smbw.c
index faaa9f047b0537b9aa552f97d010361215a4c1ba..dfe99a7ed1afa7cd75e80ba05535cebe8af66d9b 100644 (file)
@@ -403,6 +403,7 @@ struct smbw_server *smbw_server(char *server, char *share)
        pstring ipenv;
        struct in_addr ip;
        extern struct in_addr ipzero;
+       char lm_24[24], nt_24[24];
 
        ip = ipzero;
        ZERO_STRUCT(c);
@@ -488,9 +489,12 @@ struct smbw_server *smbw_server(char *server, char *share)
                return NULL;
        }
 
+       SMBencrypt  ((uchar *)password,(uchar *)c.cryptkey,(uchar *)lm_24);
+       SMBNTencrypt((uchar *)password,(uchar *)c.cryptkey,(uchar *)nt_24);
+
        if (!cli_session_setup(&c, username, 
-                              password, strlen(password),
-                              password, strlen(password),
+                              lm_24, 24,
+                              nt_24, 24,
                               workgroup) &&
            /* try an anonymous login if it failed */
            !cli_session_setup(&c, "", "", 1,"", 0, workgroup)) {