[SCM] Samba Shared Repository - branch master updated

Günther Deschner gd at samba.org
Wed May 26 15:18:16 MDT 2010


The branch, master has been updated
       via  6a14dad... s3-net: fix the build.
       via  66e9b8c... s4-smbtorture: add usergetinfo to RAP-SAM.
       via  e94e13b... rap: use rap_LogonHours in rap_NetUserInfo11 as well.
      from  20f843b... s3-waf: more work on krb5 build.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6a14dad13cc4b619a5901e54747085e81e42597d
Author: Günther Deschner <gd at samba.org>
Date:   Wed May 26 23:17:35 2010 +0200

    s3-net: fix the build.
    
    Guenther

commit 66e9b8c888c8c7b1bbb46c9e562bd5be1fd3118d
Author: Günther Deschner <gd at samba.org>
Date:   Wed May 26 21:22:13 2010 +0200

    s4-smbtorture: add usergetinfo to RAP-SAM.
    
    Guenther

commit e94e13bd8d013d2c58cf4f2c647056b5a1b53e79
Author: Günther Deschner <gd at samba.org>
Date:   Wed May 26 22:55:45 2010 +0200

    rap: use rap_LogonHours in rap_NetUserInfo11 as well.
    
    Guenther

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

Summary of changes:
 librpc/idl/rap.idl        |    2 +-
 source3/utils/net_rap.c   |    2 +-
 source4/torture/rap/sam.c |   25 +++++++++++++++++++++++++
 3 files changed, 27 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/rap.idl b/librpc/idl/rap.idl
index e403e8c..6b73169 100644
--- a/librpc/idl/rap.idl
+++ b/librpc/idl/rap.idl
@@ -884,7 +884,7 @@ interface rap
 		uint16 WorkStationsHigh;
 		uint32 MaxStorage;
 		uint16 UnitsPerWeek;
-		[relative_short] uint8 *LogonHours[21];
+		[relative_short] rap_LogonHours *LogonHours;
 		uint16 LogonHoursHigh;
 		uint16 CodePage;
 	} rap_NetUserInfo11;
diff --git a/source3/utils/net_rap.c b/source3/utils/net_rap.c
index 8d5a3db..9b42a08 100644
--- a/source3/utils/net_rap.c
+++ b/source3/utils/net_rap.c
@@ -23,8 +23,8 @@
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "includes.h"
-#include "utils/net.h"
 #include "../librpc/gen_ndr/rap.h"
+#include "utils/net.h"
 
 /* The following messages were for error checking that is not properly
    reported at the moment.  Which should be reinstated? */
diff --git a/source4/torture/rap/sam.c b/source4/torture/rap/sam.c
index 0149322..53b0512 100644
--- a/source4/torture/rap/sam.c
+++ b/source4/torture/rap/sam.c
@@ -186,12 +186,37 @@ static bool test_oemchangepassword(struct torture_context *tctx,
 	return ret;
 }
 
+static bool test_usergetinfo(struct torture_context *tctx,
+			     struct smbcli_state *cli)
+{
+	struct rap_NetUserGetInfo r;
+	int i;
+	uint16_t levels[] = { 0, 1, /*2,*/ 10, /*11*/ };
+
+	for (i=0; i < ARRAY_SIZE(levels); i++) {
+
+		r.in.UserName = TEST_RAP_USER;
+		r.in.level = levels[i];
+		r.in.bufsize = 8192;
+
+		torture_comment(tctx,
+			"Testing rap_NetUserGetInfo(%s) level %d\n", r.in.UserName, r.in.level);
+
+		torture_assert_ntstatus_ok(tctx,
+			smbcli_rap_netusergetinfo(cli->tree, tctx, &r),
+			"smbcli_rap_netusergetinfo failed");
+	}
+
+	return true;
+}
+
 struct torture_suite *torture_rap_sam(TALLOC_CTX *mem_ctx)
 {
 	struct torture_suite *suite = torture_suite_create(mem_ctx, "SAM");
 
 	torture_suite_add_1smb_test(suite, "userpasswordset2", test_userpasswordset2);
 	torture_suite_add_1smb_test(suite, "oemchangepassword", test_oemchangepassword);
+	torture_suite_add_1smb_test(suite, "usergetinfo", test_usergetinfo);
 
 	return suite;
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list