[SCM] Samba Shared Repository - branch master updated
Günther Deschner
gd at samba.org
Fri May 28 06:30:23 MDT 2010
The branch, master has been updated
via 8703700... s3-samr: Fix crash bug in _samr_QueryUserInfo{2} level 18.
from e5fca6a... s4:build Don't automatically mark as 'not a git snapshot'.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 87037006bd27601b620d0d31f72261ba968d9567
Author: Günther Deschner <gd at samba.org>
Date: Fri May 28 14:11:53 2010 +0200
s3-samr: Fix crash bug in _samr_QueryUserInfo{2} level 18.
Guenther
-----------------------------------------------------------------------
Summary of changes:
source3/rpc_server/srv_samr_nt.c | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 09b56ed..0b8e7a5 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -2764,6 +2764,8 @@ static NTSTATUS get_user_info_18(pipes_struct *p,
{
struct samu *smbpass=NULL;
bool ret;
+ const uint8_t *nt_pass = NULL;
+ const uint8_t *lm_pass = NULL;
ZERO_STRUCTP(r);
@@ -2798,10 +2800,17 @@ static NTSTATUS get_user_info_18(pipes_struct *p,
return NT_STATUS_ACCOUNT_DISABLED;
}
- r->lm_pwd_active = true;
- r->nt_pwd_active = true;
- memcpy(r->lm_pwd.hash, pdb_get_lanman_passwd(smbpass), 16);
- memcpy(r->nt_pwd.hash, pdb_get_nt_passwd(smbpass), 16);
+ lm_pass = pdb_get_lanman_passwd(smbpass);
+ if (lm_pass != NULL) {
+ memcpy(r->lm_pwd.hash, lm_pass, 16);
+ r->lm_pwd_active = true;
+ }
+
+ nt_pass = pdb_get_nt_passwd(smbpass);
+ if (nt_pass != NULL) {
+ memcpy(r->nt_pwd.hash, nt_pass, 16);
+ r->nt_pwd_active = true;
+ }
r->password_expired = 0; /* FIXME */
TALLOC_FREE(smbpass);
--
Samba Shared Repository
More information about the samba-cvs
mailing list