summaryrefslogtreecommitdiff
path: root/source3/libsmb/pwd_cache.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-03-14 20:22:57 +0000
committerGerald Carter <jerry@samba.org>2001-03-14 20:22:57 +0000
commitfb3d8452e5250973eae682dd4a13bf530ccfc56a (patch)
tree1efd72d8a26b7485e8df6cf9bc93cb617fa50f6c /source3/libsmb/pwd_cache.c
parent762c6e3f84141a1c7ef697f1b0a3339d655c86ad (diff)
downloadsamba-fb3d8452e5250973eae682dd4a13bf530ccfc56a.tar.gz
samba-fb3d8452e5250973eae682dd4a13bf530ccfc56a.tar.bz2
samba-fb3d8452e5250973eae682dd4a13bf530ccfc56a.zip
set of changes in the beginning of bringing rpcclient changes
back to working order. The main change is that the cli_*() RPC functions from libsmb/*.c now should accept a struct cli_state*. The reason for this is that rpcclient should establish the connection to the server at startup so that it is not necessary to keep the clear test or password hash in memory for each command. enumports and enumprinters now works as well. lsa* functions have been tested. SAMR calls may or may not work (one of the core dumps I know), but it compiles :-) jerry (This used to be commit d98ac8852ae6b39b6fcff92c346ba56d9e63c518)
Diffstat (limited to 'source3/libsmb/pwd_cache.c')
-rw-r--r--source3/libsmb/pwd_cache.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source3/libsmb/pwd_cache.c b/source3/libsmb/pwd_cache.c
index 26b1d192f0..420b49ed2e 100644
--- a/source3/libsmb/pwd_cache.c
+++ b/source3/libsmb/pwd_cache.c
@@ -103,11 +103,21 @@ void pwd_read(struct pwd_info *pwd, char *passwd_report, BOOL do_encrypt)
user_pass = (char*)getpass(passwd_report);
+ /*
+ * Do not assume that an empty string is a NULL password.
+ * If you do this will break the session key generation for
+ * and account with an emtpy password. If you wish to use
+ * a NULL password, use the -N option to smbclient and rpcclient
+ * --jerry
+ */
+#if 0
if (user_pass == NULL || user_pass[0] == 0)
{
pwd_set_nullpwd(pwd);
}
else if (do_encrypt)
+#endif
+ if (do_encrypt)
{
pwd_make_lm_nt_16(pwd, user_pass);
}