[SCM] Samba Shared Repository - branch master updated - release-4-0-0alpha7-2050-g34014f8

Günther Deschner gd at samba.org
Fri Jun 5 11:41:12 GMT 2009


The branch, master has been updated
       via  34014f8aa6456a002e88b139774dd5a58533247b (commit)
      from  360c3c4a80e1fcf84abd4e620c95f003779b1f1f (commit)

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


- Log -----------------------------------------------------------------
commit 34014f8aa6456a002e88b139774dd5a58533247b
Author: Günther Deschner <gd at samba.org>
Date:   Thu Jun 4 23:49:02 2009 +0200

    nss_wrapper: add more coherency checks for user and group enumeration.
    
    Guenther

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

Summary of changes:
 lib/nss_wrapper/testsuite.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/nss_wrapper/testsuite.c b/lib/nss_wrapper/testsuite.c
index e3ba5bf..c1b6e9e 100644
--- a/lib/nss_wrapper/testsuite.c
+++ b/lib/nss_wrapper/testsuite.c
@@ -235,8 +235,12 @@ static bool test_nwrap_passwd(struct torture_context *tctx)
 	for (i=0; i < num_pwd; i++) {
 		torture_assert(tctx, test_nwrap_getpwnam(tctx, pwd[i].pw_name, &pwd1),
 			"failed to call getpwnam for enumerated user");
+		torture_assert_passwd_equal(tctx, &pwd[i], &pwd1,
+			"getpwent and getpwnam gave different results");
 		torture_assert(tctx, test_nwrap_getpwuid(tctx, pwd[i].pw_uid, &pwd2),
 			"failed to call getpwuid for enumerated user");
+		torture_assert_passwd_equal(tctx, &pwd[i], &pwd2,
+			"getpwent and getpwuid gave different results");
 		torture_assert_passwd_equal(tctx, &pwd1, &pwd2,
 			"getpwnam and getpwuid gave different results");
 	}
@@ -317,8 +321,12 @@ static bool test_nwrap_group(struct torture_context *tctx)
 	for (i=0; i < num_grp; i++) {
 		torture_assert(tctx, test_nwrap_getgrnam(tctx, grp[i].gr_name, &grp1),
 			"failed to call getgrnam for enumerated user");
+		torture_assert_group_equal(tctx, &grp[i], &grp1,
+			"getgrent and getgrnam gave different results");
 		torture_assert(tctx, test_nwrap_getgrgid(tctx, grp[i].gr_gid, &grp2),
 			"failed to call getgrgid for enumerated user");
+		torture_assert_group_equal(tctx, &grp[i], &grp2,
+			"getgrent and getgruid gave different results");
 		torture_assert_group_equal(tctx, &grp1, &grp2,
 			"getgrnam and getgrgid gave different results");
 	}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list