summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2001-03-14 20:17:27 +0000
committerGerald Carter <jerry@samba.org>2001-03-14 20:17:27 +0000
commit762c6e3f84141a1c7ef697f1b0a3339d655c86ad (patch)
treee04279b8dc4e9f21f5cc86eb437b1715dc390b25
parentfbab616c149a9549f30c7f9f0550386c815b69e8 (diff)
downloadsamba-762c6e3f84141a1c7ef697f1b0a3339d655c86ad.tar.gz
samba-762c6e3f84141a1c7ef697f1b0a3339d655c86ad.tar.bz2
samba-762c6e3f84141a1c7ef697f1b0a3339d655c86ad.zip
patches from Simo. Couple of snity things
(This used to be commit af3f2a30c657fc42171bbf7da2354bc4cc7b088d)
-rw-r--r--source3/passdb/passdb.c4
-rw-r--r--source3/utils/pdbedit.c8
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 48424b5fa2..404163c67b 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -283,7 +283,9 @@ BOOL pdb_gethexpwd(char *p, unsigned char *pwd)
unsigned char lonybble, hinybble;
char *hexchars = "0123456789ABCDEF";
char *p1, *p2;
-
+
+ if (!p) return (False);
+
for (i = 0; i < 32; i += 2)
{
hinybble = toupper(p[i]);
diff --git a/source3/utils/pdbedit.c b/source3/utils/pdbedit.c
index cd77cbc436..a86ea2ef5f 100644
--- a/source3/utils/pdbedit.c
+++ b/source3/utils/pdbedit.c
@@ -50,8 +50,8 @@ static void usage(void)
printf("(actually to add a user you need to use smbpasswd)\n");
printf("options:\n");
printf(" -l list usernames\n");
- printf(" -v verbose output\n");
- printf(" -w smbpasswd file style\n");
+ printf(" -v verbose output\n");
+ printf(" -w smbpasswd file style\n");
printf(" -u username print user's info\n");
printf(" -f fullname set Full Name\n");
printf(" -h homedir set home directory\n");
@@ -89,8 +89,8 @@ static int print_sam_info (SAM_ACCOUNT *sam_pwent, BOOL verbosity, BOOL smbpwdst
{
char lm_passwd[33];
char nt_passwd[33];
- pdb_gethexpwd(pdb_get_lanman_passwd(sam_pwent), lm_passwd);
- pdb_gethexpwd(pdb_get_nt_passwd(sam_pwent), nt_passwd);
+ pdb_sethexpwd(lm_passwd, pdb_get_lanman_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
+ pdb_sethexpwd(nt_passwd, pdb_get_nt_passwd(sam_pwent), pdb_get_acct_ctrl(sam_pwent));
printf ("%s:%d:%s:%s:%s:LCT-%08x:\n",
pdb_get_username(sam_pwent),