[SCM] NSS Wrapper Repository - branch master updated
Michael Adam
obnox at samba.org
Fri Aug 15 04:40:01 MDT 2014
The branch, master has been updated
via 3125e76 tests: use return code of copy_group() in test_nwrap_getgrgid()
via 36cfee6 tests: reduce indentation in test_nwrap_getgrgid() by using early returns.
via 6e4e7c5 tests: use return value of copy_group() in test_nwrap_getgrnam().
via 96f53f2 tests: reduce indentation in test_nwrap_getgrnam() by using early returns.
via b8dfbd2 tests: use return value of copy_passwd() in test_nwrap_getpwuid()
via 0795d66 tests: reduce indentation in test_nwrap_getpwuid() by using early returns.
via add66c4 tests: use return code of copy_passwd() in test_nwrap_getpwnam().
via 3f2a44c tests: reduce indentation in test_nwrap_getpwnam() by using early returns.
from e5f6917 tests: Fix possible null pointer dereference in testsuite.
http://gitweb.samba.org/?p=nss_wrapper.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 3125e76052a97f337ffe5939288b06dec732d328
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:57:12 2014 +0200
tests: use return code of copy_group() in test_nwrap_getgrgid()
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 36cfee6e11136993fd4f011a90f9a193f618a901
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:56:11 2014 +0200
tests: reduce indentation in test_nwrap_getgrgid() by using early returns.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 6e4e7c565b7526aa991460aa273455f665fe4c76
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:55:09 2014 +0200
tests: use return value of copy_group() in test_nwrap_getgrnam().
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 96f53f2c5f7de225cf8c08bb40e2b8488b770c7a
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:54:06 2014 +0200
tests: reduce indentation in test_nwrap_getgrnam() by using early returns.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit b8dfbd2917a4276ec42ba18d67a974d2925e7739
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:51:51 2014 +0200
tests: use return value of copy_passwd() in test_nwrap_getpwuid()
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 0795d6687dac865f7a4896c663d20e9fdef3c42b
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:50:33 2014 +0200
tests: reduce indentation in test_nwrap_getpwuid() by using early returns.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit add66c49914261e7dc7f674dd0b4c86b649a09a3
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 12:03:46 2014 +0200
tests: use return code of copy_passwd() in test_nwrap_getpwnam().
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
commit 3f2a44c5897dbef4173e5f44316bfc42eeff10a0
Author: Michael Adam <obnox at samba.org>
Date: Fri Aug 15 11:09:40 2014 +0200
tests: reduce indentation in test_nwrap_getpwnam() by using early returns.
Signed-off-by: Michael Adam <obnox at samba.org>
Reviewed-by: Andreas Schneider <asn at samba.org>
-----------------------------------------------------------------------
Summary of changes:
tests/testsuite.c | 68 ++++++++++++++++++++++++++++++++++------------------
1 files changed, 44 insertions(+), 24 deletions(-)
Changeset truncated at 500 lines:
diff --git a/tests/testsuite.c b/tests/testsuite.c
index 4a84778..627e49c 100644
--- a/tests/testsuite.c
+++ b/tests/testsuite.c
@@ -124,19 +124,24 @@ static void print_passwd(struct passwd *pwd)
static bool test_nwrap_getpwnam(const char *name, struct passwd *pwd_p)
{
struct passwd *pwd = NULL;
+ bool ok;
DEBUG("Testing getpwnam: %s\n", name);
pwd = getpwnam(name);
- if (pwd != NULL) {
- print_passwd(pwd);
+ if (pwd == NULL) {
+ return false;
+ }
- if (pwd_p != NULL) {
- copy_passwd(pwd, pwd_p);
- }
+ print_passwd(pwd);
+
+ if (pwd_p == NULL) {
+ return true;
}
- return pwd != NULL ? true : false;
+ ok = copy_passwd(pwd, pwd_p);
+
+ return ok;
}
static void test_nwrap_getpwnam_r(const char *name,
@@ -167,19 +172,24 @@ static bool test_nwrap_getpwuid(uid_t uid,
struct passwd *pwd_p)
{
struct passwd *pwd = NULL;
+ bool ok;
DEBUG("Testing getpwuid: %lu\n", (unsigned long)uid);
pwd = getpwuid(uid);
- if (pwd != NULL) {
- print_passwd(pwd);
+ if (pwd == NULL) {
+ return false;
+ }
- if (pwd_p != NULL) {
- copy_passwd(pwd, pwd_p);
- }
+ print_passwd(pwd);
+
+ if (pwd_p == NULL) {
+ return true;
}
- return pwd != NULL ? true : false;
+ ok = copy_passwd(pwd, pwd_p);
+
+ return ok;
}
static bool test_nwrap_getpwuid_r(uid_t uid,
@@ -286,19 +296,24 @@ static bool test_nwrap_getgrnam(const char *name,
struct group *grp_p)
{
struct group *grp = NULL;
+ bool ok;
DEBUG("Testing getgrnam: %s\n", name);
grp = getgrnam(name);
- if (grp != NULL) {
- print_group(grp);
+ if (grp == NULL) {
+ return false;
+ }
- if (grp_p != NULL) {
- copy_group(grp, grp_p);
- }
+ print_group(grp);
+
+ if (grp_p == NULL) {
+ return true;
}
- return grp != NULL ? true : false;
+ ok = copy_group(grp, grp_p);
+
+ return ok;
}
static bool test_nwrap_getgrnam_r(const char *name,
@@ -331,19 +346,24 @@ static bool test_nwrap_getgrgid(gid_t gid,
struct group *grp_p)
{
struct group *grp = NULL;
+ bool ok;
DEBUG("Testing getgrgid: %lu\n", (unsigned long)gid);
grp = getgrgid(gid);
- if (grp != NULL) {
- print_group(grp);
+ if (grp == NULL) {
+ return false;
+ }
- if (grp_p != NULL) {
- copy_group(grp, grp_p);
- }
+ print_group(grp);
+
+ if (grp_p == NULL) {
+ return true;
}
- return grp != NULL ? true : false;
+ ok = copy_group(grp, grp_p);
+
+ return ok;
}
static bool test_nwrap_getgrgid_r(gid_t gid,
--
NSS Wrapper Repository
More information about the samba-cvs
mailing list