[SCM] Samba Shared Repository - branch v3-4-test updated - release-4-0-0alpha7-912-g2d52c7c

Günther Deschner gd at samba.org
Fri May 8 00:17:13 GMT 2009


The branch, v3-4-test has been updated
       via  2d52c7c605d92356211aa11c31ce9c8392952557 (commit)
       via  5fc5c808962ee87e618ab9661f449cd587dce361 (commit)
       via  7dee64aa3544057bc4d436974441052bc863fb3e (commit)
       via  664cc387c18aafdf481ce468127dfba05009ea94 (commit)
       via  d0ab51ff71c726af483cc71ac721b624087d54d7 (commit)
       via  8e0390378ab8afed728bdd76d977fd8207b5defc (commit)
       via  ae7d88941121190ef999c281a0ddd972e2661321 (commit)
       via  e754be3e03f96952ab1d8a4af1762a9f68562fa3 (commit)
       via  2c0238226e95101b193615fd122e0494480b746a (commit)
       via  bcf7dbdcfde8704e8990871706904c31c008d651 (commit)
       via  e43120ebef1d3e4c9710d4d913fda41f9b727bb9 (commit)
       via  970ccd28f32e4b67188629b99a0a1a2d6762b897 (commit)
       via  07f33f9d7d9401390eb304866e5e1010b6d5ff13 (commit)
       via  281d035ab2ca526dc7772a1124d2c612ea2a6e6c (commit)
      from  48818f8e5ebd64efa9fd26508422db7feba7dc25 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-4-test


- Log -----------------------------------------------------------------
commit 2d52c7c605d92356211aa11c31ce9c8392952557
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 8 01:23:54 2009 +0200

    s3-samr: Fix potential memory leak in _samr_ChangePasswordUser().
    
    Guenther
    (cherry picked from commit d7b32b51f840d34e0ecb62dd8b7df862974d6271)

commit 5fc5c808962ee87e618ab9661f449cd587dce361
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 8 00:31:11 2009 +0200

    s3-selftest: finally enable RPC-SAMR-PASSWORDS which samba3 now passes.
    
    Guenther
    (cherry picked from commit 53713be2cbc1156769b8b82d3df9da02459232ce)

commit 7dee64aa3544057bc4d436974441052bc863fb3e
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 8 00:30:11 2009 +0200

    s4-smbtorture: avoid acct_flags check at the end of RPC-SAMR-PASSWORDS for Samba3.
    
    I don't get this, why would the account suddenly get ACB_PWNOTREQ ?
    
    Guenther
    (cherry picked from commit 310031274d8b0fdf15a5e33fccfd7b6cb81c8a50)

commit 664cc387c18aafdf481ce468127dfba05009ea94
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 8 00:18:28 2009 +0200

    s3-selftest: need to enable lanman auth in order make RPC-SAMR-PASSWORDS pass.
    
    Guenther
    (cherry picked from commit 6f4b5798c96ed69d965d6c3c005518f87afda8d6)

commit d0ab51ff71c726af483cc71ac721b624087d54d7
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 23:56:22 2009 +0200

    s3-samr: Do not leak information whether a user exist or not in pwd change calls.
    
    Found by torture test.
    
    Guenther
    (cherry picked from commit 227b61d7ea9895240e0e7f554fbb10d3e78feaae)

commit 8e0390378ab8afed728bdd76d977fd8207b5defc
Author: Günther Deschner <gd at samba.org>
Date:   Fri May 8 00:16:43 2009 +0200

    s3-samr: implement _samr_ChangePasswordUser().
    
    This is vastly copied from samba4 samr server.
    
    Guenther
    (cherry picked from commit 5773d7d10253f6f53a9ae96e9979a87393b242a6)

commit ae7d88941121190ef999c281a0ddd972e2661321
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 23:26:54 2009 +0200

    s3-samr: implement _samr_OemChangePasswordUser2().
    
    Guenther
    (cherry picked from commit d17c6af57c6e5ec10d71a9fcbffc6ce4d34a553f)

commit e754be3e03f96952ab1d8a4af1762a9f68562fa3
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 23:54:58 2009 +0200

    s3-samr: disable check for ACB_DISABLED in check_oem_password().
    
    It is a bad idea to just tell everyone that an account is disabled without
    really having checked the password first.
    
    Found by torture test.
    
    Guenther
    (cherry picked from commit c400fc1e1e9a0c3db82c9a96e9684c8debfb3b74)

commit 2c0238226e95101b193615fd122e0494480b746a
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 23:22:26 2009 +0200

    s3-samr: rework check_oem_password() to take a struct samu, not to return one.
    
    Guenther

commit bcf7dbdcfde8704e8990871706904c31c008d651
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 21:47:47 2009 +0200

    s4-smbtorture: prepare for running RPC-SAMR-USERS against samba3.
    
    In Samba 3 there are no pdb calls to store comments, codepages and countrycodes
    (yet).
    
    Guenther
    (cherry picked from commit 41cb06fba7126c79fe536321f2dc461e87e83076)

commit e43120ebef1d3e4c9710d4d913fda41f9b727bb9
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 18:42:28 2009 +0200

    s3-samr: Let _samr_TestPrivateFunctionsUser() return not supported.
    
    This is to get us closer to pass RPC-SAMR-USERS.
    
    Guenther
    (cherry picked from commit 6aca5fca8dd73ff33cfac5000480520def04e7fa)

commit 970ccd28f32e4b67188629b99a0a1a2d6762b897
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 21:45:51 2009 +0200

    s3-samr: let set_user_info_16 and 20 follow the same pattern as all other levels.
    
    Guenther
    (cherry picked from commit f05d888d7ab910b3ed39e4d36eeb52cb86bd990e)

commit 07f33f9d7d9401390eb304866e5e1010b6d5ff13
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 17:06:26 2009 +0200

    s3-samr: support some more info levels in samr_SetUserInfo calls.
    
    Guenther
    (cherry picked from commit f93f713898f2208fda51f24121b060ee09f5fe3a)

commit 281d035ab2ca526dc7772a1124d2c612ea2a6e6c
Author: Günther Deschner <gd at samba.org>
Date:   Thu May 7 17:05:49 2009 +0200

    s3-samr: support some more info levels in samr_QueryUser calls.
    
    Guenther
    (cherry picked from commit b0df0e8cc76e67a977129aca8b254fe38de85ebd)

-----------------------------------------------------------------------

Summary of changes:
 selftest/target/Samba3.pm             |    1 +
 source3/include/proto.h               |   22 +
 source3/rpc_server/srv_samr_nt.c      |  736 ++++++++++++++++++++++++++++++---
 source3/rpc_server/srv_samr_util.c    |  239 +++++++++++
 source3/script/tests/selftest.sh      |    1 +
 source3/script/tests/test_posix_s3.sh |    2 +-
 source3/smbd/chgpasswd.c              |   71 ++--
 source4/torture/rpc/samr.c            |   45 ++-
 8 files changed, 1011 insertions(+), 106 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index d05b5ca..55341f3 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -114,6 +114,7 @@ sub setup_dc($$)
 	my $dc_options = "
 	domain master = yes
 	domain logons = yes
+	lanman auth = yes
 ";
 
 	my $vars = $self->provision($path,
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 062c577..7166461 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -5891,6 +5891,28 @@ NTSTATUS np_read_recv(struct tevent_req *req, ssize_t *nread,
 
 /* The following definitions come from rpc_server/srv_samr_util.c  */
 
+void copy_id2_to_sam_passwd(struct samu *to,
+			    struct samr_UserInfo2 *from);
+void copy_id4_to_sam_passwd(struct samu *to,
+			    struct samr_UserInfo4 *from);
+void copy_id6_to_sam_passwd(struct samu *to,
+			    struct samr_UserInfo6 *from);
+void copy_id8_to_sam_passwd(struct samu *to,
+			    struct samr_UserInfo8 *from);
+void copy_id10_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo10 *from);
+void copy_id11_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo11 *from);
+void copy_id12_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo12 *from);
+void copy_id13_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo13 *from);
+void copy_id14_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo14 *from);
+void copy_id16_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo16 *from);
+void copy_id17_to_sam_passwd(struct samu *to,
+			     struct samr_UserInfo17 *from);
 void copy_id18_to_sam_passwd(struct samu *to,
 			     struct samr_UserInfo18 *from);
 void copy_id20_to_sam_passwd(struct samu *to,
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 44c4ed4..a86ebe5 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -1852,6 +1852,124 @@ NTSTATUS _samr_LookupNames(pipes_struct *p,
 	return status;
 }
 
+/****************************************************************
+ _samr_ChangePasswordUser
+****************************************************************/
+
+NTSTATUS _samr_ChangePasswordUser(pipes_struct *p,
+				  struct samr_ChangePasswordUser *r)
+{
+	NTSTATUS status;
+	bool ret = false;
+	struct samu *pwd;
+	struct samr_Password new_lmPwdHash, new_ntPwdHash, checkHash;
+	struct samr_Password lm_pwd, nt_pwd;
+	uint32_t acc_granted;
+	struct dom_sid sid;
+
+	DISP_INFO *disp_info = NULL;
+
+	if (!get_lsa_policy_samr_sid(p, r->in.user_handle, &sid, &acc_granted, &disp_info)) {
+		return NT_STATUS_INVALID_HANDLE;
+	}
+
+	status = access_check_samr_function(acc_granted,
+					    SAMR_USER_ACCESS_SET_PASSWORD,
+					    "_samr_ChangePasswordUser");
+	if (!NT_STATUS_IS_OK(status)) {
+		return status;
+	}
+
+	DEBUG(5,("_samr_ChangePasswordUser: sid:%s\n",
+		  sid_string_dbg(&sid)));
+
+	if (!(pwd = samu_new(NULL))) {
+		return NT_STATUS_NO_MEMORY;
+	}
+
+	become_root();
+	ret = pdb_getsampwsid(pwd, &sid);
+	unbecome_root();
+
+	if (!ret) {
+		TALLOC_FREE(pwd);
+		return NT_STATUS_WRONG_PASSWORD;
+	}
+
+	{
+		const uint8_t *lm_pass, *nt_pass;
+
+		lm_pass = pdb_get_lanman_passwd(pwd);
+		nt_pass = pdb_get_nt_passwd(pwd);
+
+		if (!lm_pass || !nt_pass) {
+			status = NT_STATUS_WRONG_PASSWORD;
+			goto out;
+		}
+
+		memcpy(&lm_pwd.hash, lm_pass, sizeof(lm_pwd.hash));
+		memcpy(&nt_pwd.hash, nt_pass, sizeof(nt_pwd.hash));
+	}
+
+	/* basic sanity checking on parameters.  Do this before any database ops */
+	if (!r->in.lm_present || !r->in.nt_present ||
+	    !r->in.old_lm_crypted || !r->in.new_lm_crypted ||
+	    !r->in.old_nt_crypted || !r->in.new_nt_crypted) {
+		/* we should really handle a change with lm not
+		   present */
+		status = NT_STATUS_INVALID_PARAMETER_MIX;
+		goto out;
+	}
+
+	/* decrypt and check the new lm hash */
+	D_P16(lm_pwd.hash, r->in.new_lm_crypted->hash, new_lmPwdHash.hash);
+	D_P16(new_lmPwdHash.hash, r->in.old_lm_crypted->hash, checkHash.hash);
+	if (memcmp(checkHash.hash, lm_pwd.hash, 16) != 0) {
+		status = NT_STATUS_WRONG_PASSWORD;
+		goto out;
+	}
+
+	/* decrypt and check the new nt hash */
+	D_P16(nt_pwd.hash, r->in.new_nt_crypted->hash, new_ntPwdHash.hash);
+	D_P16(new_ntPwdHash.hash, r->in.old_nt_crypted->hash, checkHash.hash);
+	if (memcmp(checkHash.hash, nt_pwd.hash, 16) != 0) {
+		status = NT_STATUS_WRONG_PASSWORD;
+		goto out;
+	}
+
+	/* The NT Cross is not required by Win2k3 R2, but if present
+	   check the nt cross hash */
+	if (r->in.cross1_present && r->in.nt_cross) {
+		D_P16(lm_pwd.hash, r->in.nt_cross->hash, checkHash.hash);
+		if (memcmp(checkHash.hash, new_ntPwdHash.hash, 16) != 0) {
+			status = NT_STATUS_WRONG_PASSWORD;
+			goto out;
+		}
+	}
+
+	/* The LM Cross is not required by Win2k3 R2, but if present
+	   check the lm cross hash */
+	if (r->in.cross2_present && r->in.lm_cross) {
+		D_P16(nt_pwd.hash, r->in.lm_cross->hash, checkHash.hash);
+		if (memcmp(checkHash.hash, new_lmPwdHash.hash, 16) != 0) {
+			status = NT_STATUS_WRONG_PASSWORD;
+			goto out;
+		}
+	}
+
+	if (!pdb_set_nt_passwd(pwd, new_ntPwdHash.hash, PDB_CHANGED) ||
+	    !pdb_set_lanman_passwd(pwd, new_lmPwdHash.hash, PDB_CHANGED)) {
+		status = NT_STATUS_ACCESS_DENIED;
+		goto out;
+	}
+
+	status = pdb_update_sam_account(pwd);
+ out:
+	TALLOC_FREE(pwd);
+
+	return status;
+}
+
 /*******************************************************************
  _samr_ChangePasswordUser2
  ********************************************************************/
@@ -1891,6 +2009,62 @@ NTSTATUS _samr_ChangePasswordUser2(pipes_struct *p,
 
 	DEBUG(5,("_samr_ChangePasswordUser2: %d\n", __LINE__));
 
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
+		return NT_STATUS_WRONG_PASSWORD;
+	}
+
+	return status;
+}
+
+/****************************************************************
+ _samr_OemChangePasswordUser2
+****************************************************************/
+
+NTSTATUS _samr_OemChangePasswordUser2(pipes_struct *p,
+				      struct samr_OemChangePasswordUser2 *r)
+{
+	NTSTATUS status;
+	fstring user_name;
+	const char *wks = NULL;
+
+	DEBUG(5,("_samr_OemChangePasswordUser2: %d\n", __LINE__));
+
+	fstrcpy(user_name, r->in.account->string);
+	if (r->in.server && r->in.server->string) {
+		wks = r->in.server->string;
+	}
+
+	DEBUG(5,("_samr_OemChangePasswordUser2: user: %s wks: %s\n", user_name, wks));
+
+	/*
+	 * Pass the user through the NT -> unix user mapping
+	 * function.
+	 */
+
+	(void)map_username(user_name);
+
+	/*
+	 * UNIX username case mangling not required, pass_oem_change
+	 * is case insensitive.
+	 */
+
+	if (!r->in.hash || !r->in.password) {
+		return NT_STATUS_INVALID_PARAMETER;
+	}
+
+	status = pass_oem_change(user_name,
+				 r->in.password->data,
+				 r->in.hash->hash,
+				 0,
+				 0,
+				 NULL);
+
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
+		return NT_STATUS_WRONG_PASSWORD;
+	}
+
+	DEBUG(5,("_samr_OemChangePasswordUser2: %d\n", __LINE__));
+
 	return status;
 }
 
@@ -1936,6 +2110,9 @@ NTSTATUS _samr_ChangePasswordUser3(pipes_struct *p,
 				 r->in.nt_password->data,
 				 r->in.nt_verifier->hash,
 				 &reject_reason);
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NO_SUCH_USER)) {
+		return NT_STATUS_WRONG_PASSWORD;
+	}
 
 	if (NT_STATUS_EQUAL(status, NT_STATUS_PASSWORD_RESTRICTION) ||
 	    NT_STATUS_EQUAL(status, NT_STATUS_ACCOUNT_RESTRICTION)) {
@@ -2222,6 +2399,130 @@ static NTSTATUS init_samr_parameters_string(TALLOC_CTX *mem_ctx,
 	return NT_STATUS_OK;
 }
 
+/*************************************************************************
+ get_user_info_1.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_1(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo1 *r,
+				struct samu *pw,
+				DOM_SID *domain_sid)
+{
+	const DOM_SID *sid_group;
+	uint32_t primary_gid;
+
+	become_root();
+	sid_group = pdb_get_group_sid(pw);
+	unbecome_root();
+
+	if (!sid_peek_check_rid(domain_sid, sid_group, &primary_gid)) {
+		DEBUG(0, ("get_user_info_1: User %s has Primary Group SID %s, \n"
+			  "which conflicts with the domain sid %s.  Failing operation.\n",
+			  pdb_get_username(pw), sid_string_dbg(sid_group),
+			  sid_string_dbg(domain_sid)));
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
+	r->account_name.string		= talloc_strdup(mem_ctx, pdb_get_username(pw));
+	r->full_name.string		= talloc_strdup(mem_ctx, pdb_get_fullname(pw));
+	r->primary_gid			= primary_gid;
+	r->description.string		= talloc_strdup(mem_ctx, pdb_get_acct_desc(pw));
+	r->comment.string		= talloc_strdup(mem_ctx, pdb_get_comment(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_2.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_2(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo2 *r,
+				struct samu *pw)
+{
+	r->comment.string		= talloc_strdup(mem_ctx, pdb_get_comment(pw));
+	r->unknown.string		= NULL;
+	r->country_code			= 0;
+	r->code_page			= 0;
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_3.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_3(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo3 *r,
+				struct samu *pw,
+				DOM_SID *domain_sid)
+{
+	const DOM_SID *sid_user, *sid_group;
+	uint32_t rid, primary_gid;
+
+	sid_user = pdb_get_user_sid(pw);
+
+	if (!sid_peek_check_rid(domain_sid, sid_user, &rid)) {
+		DEBUG(0, ("get_user_info_3: User %s has SID %s, \nwhich conflicts with "
+			  "the domain sid %s.  Failing operation.\n",
+			  pdb_get_username(pw), sid_string_dbg(sid_user),
+			  sid_string_dbg(domain_sid)));
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
+	become_root();
+	sid_group = pdb_get_group_sid(pw);
+	unbecome_root();
+
+	if (!sid_peek_check_rid(domain_sid, sid_group, &primary_gid)) {
+		DEBUG(0, ("get_user_info_3: User %s has Primary Group SID %s, \n"
+			  "which conflicts with the domain sid %s.  Failing operation.\n",
+			  pdb_get_username(pw), sid_string_dbg(sid_group),
+			  sid_string_dbg(domain_sid)));
+		return NT_STATUS_UNSUCCESSFUL;
+	}
+
+	unix_to_nt_time(&r->last_logon, pdb_get_logon_time(pw));
+	unix_to_nt_time(&r->last_logoff, pdb_get_logoff_time(pw));
+	unix_to_nt_time(&r->last_password_change, pdb_get_pass_last_set_time(pw));
+	unix_to_nt_time(&r->allow_password_change, pdb_get_pass_can_change_time(pw));
+	unix_to_nt_time(&r->force_password_change, pdb_get_pass_must_change_time(pw));
+
+	r->account_name.string	= talloc_strdup(mem_ctx, pdb_get_username(pw));
+	r->full_name.string	= talloc_strdup(mem_ctx, pdb_get_fullname(pw));
+	r->home_directory.string= talloc_strdup(mem_ctx, pdb_get_homedir(pw));
+	r->home_drive.string	= talloc_strdup(mem_ctx, pdb_get_dir_drive(pw));
+	r->logon_script.string	= talloc_strdup(mem_ctx, pdb_get_logon_script(pw));
+	r->profile_path.string	= talloc_strdup(mem_ctx, pdb_get_profile_path(pw));
+	r->workstations.string	= talloc_strdup(mem_ctx, pdb_get_workstations(pw));
+
+	r->logon_hours		= get_logon_hours_from_pdb(mem_ctx, pw);
+	r->rid			= rid;
+	r->primary_gid		= primary_gid;
+	r->acct_flags		= pdb_get_acct_ctrl(pw);
+	r->bad_password_count	= pdb_get_bad_password_count(pw);
+	r->logon_count		= pdb_get_logon_count(pw);
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_4.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_4(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo4 *r,
+				struct samu *pw)
+{
+	r->logon_hours		= get_logon_hours_from_pdb(mem_ctx, pw);
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_5.
+ *************************************************************************/
+
 static NTSTATUS get_user_info_5(TALLOC_CTX *mem_ctx,
 				struct samr_UserInfo5 *r,
 				struct samu *pw,
@@ -2277,6 +2578,20 @@ static NTSTATUS get_user_info_5(TALLOC_CTX *mem_ctx,
 }
 
 /*************************************************************************
+ get_user_info_6.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_6(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo6 *r,
+				struct samu *pw)
+{
+	r->account_name.string	= talloc_strdup(mem_ctx, pdb_get_username(pw));
+	r->full_name.string	= talloc_strdup(mem_ctx, pdb_get_fullname(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
  get_user_info_7. Safe. Only gives out account_name.
  *************************************************************************/
 
@@ -2293,6 +2608,19 @@ static NTSTATUS get_user_info_7(TALLOC_CTX *mem_ctx,
 }
 
 /*************************************************************************
+ get_user_info_8.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_8(TALLOC_CTX *mem_ctx,
+				struct samr_UserInfo8 *r,
+				struct samu *pw)
+{
+	r->full_name.string	= talloc_strdup(mem_ctx, pdb_get_fullname(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
  get_user_info_9. Only gives out primary group SID.
  *************************************************************************/
 
@@ -2306,6 +2634,72 @@ static NTSTATUS get_user_info_9(TALLOC_CTX *mem_ctx,
 }
 
 /*************************************************************************
+ get_user_info_10.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_10(TALLOC_CTX *mem_ctx,
+				 struct samr_UserInfo10 *r,
+				 struct samu *pw)
+{
+	r->home_directory.string= talloc_strdup(mem_ctx, pdb_get_homedir(pw));
+	r->home_drive.string	= talloc_strdup(mem_ctx, pdb_get_dir_drive(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_11.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_11(TALLOC_CTX *mem_ctx,
+				 struct samr_UserInfo11 *r,
+				 struct samu *pw)
+{
+	r->logon_script.string	= talloc_strdup(mem_ctx, pdb_get_logon_script(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_12.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_12(TALLOC_CTX *mem_ctx,
+				 struct samr_UserInfo12 *r,
+				 struct samu *pw)
+{
+	r->profile_path.string	= talloc_strdup(mem_ctx, pdb_get_profile_path(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_13.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_13(TALLOC_CTX *mem_ctx,
+				 struct samr_UserInfo13 *r,
+				 struct samu *pw)
+{
+	r->description.string	= talloc_strdup(mem_ctx, pdb_get_acct_desc(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
+ get_user_info_14.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_14(TALLOC_CTX *mem_ctx,
+				 struct samr_UserInfo14 *r,
+				 struct samu *pw)
+{
+	r->workstations.string	= talloc_strdup(mem_ctx, pdb_get_workstations(pw));
+
+	return NT_STATUS_OK;
+}
+
+/*************************************************************************
  get_user_info_16. Safe. Only gives out acb bits.
  *************************************************************************/
 
@@ -2319,6 +2713,19 @@ static NTSTATUS get_user_info_16(TALLOC_CTX *mem_ctx,
 }
 
 /*************************************************************************
+ get_user_info_17.
+ *************************************************************************/
+
+static NTSTATUS get_user_info_17(TALLOC_CTX *mem_ctx,


-- 
Samba Shared Repository


More information about the samba-cvs mailing list