diff options
author | Günther Deschner <gd@samba.org> | 2010-03-02 18:35:01 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-03-02 19:03:17 +0100 |
commit | f36dafd852b1ed608e0c988c3c5f8823e909a4d6 (patch) | |
tree | eb141e5598711d1ffda3d65bd017237744e775c2 /source4/torture | |
parent | 8492f92843aa17eaf4a3ea9d5a9c6319afc97854 (diff) | |
download | samba-f36dafd852b1ed608e0c988c3c5f8823e909a4d6.tar.gz samba-f36dafd852b1ed608e0c988c3c5f8823e909a4d6.tar.bz2 samba-f36dafd852b1ed608e0c988c3c5f8823e909a4d6.zip |
s4-smbtorture: fix WINBIND-STRUCT assumptions about getpwent() for s3.
In samba3 it is not an error when no users are returned in getpwent() calls
(e.g. on a DC w/o interdomain trusts).
Kai, please check.
Guenther
Diffstat (limited to 'source4/torture')
-rw-r--r-- | source4/torture/winbind/struct_based.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/source4/torture/winbind/struct_based.c b/source4/torture/winbind/struct_based.c index 872e17bb0d..5a621bc772 100644 --- a/source4/torture/winbind/struct_based.c +++ b/source4/torture/winbind/struct_based.c @@ -849,12 +849,23 @@ static bool torture_winbind_struct_getpwent(struct torture_context *torture) ZERO_STRUCT(req); ZERO_STRUCT(rep); req.data.num_entries = 1; - DO_STRUCT_REQ_REP(WINBINDD_GETPWENT, &req, &rep); + if (torture_setting_bool(torture, "samba3", false)) { + bool __noop = false; + DO_STRUCT_REQ_REP_EXT(WINBINDD_GETPWENT, &req, &rep, + NSS_STATUS_SUCCESS, false, __noop=true, + NULL); + } else { + DO_STRUCT_REQ_REP(WINBINDD_GETPWENT, &req, &rep); + } pwent = (struct winbindd_pw *)rep.extra_data.data; - torture_assert(torture, (pwent != NULL), "NULL pwent"); - torture_comment(torture, "name: %s, uid: %d, gid: %d, shell: %s\n", - pwent->pw_name, pwent->pw_uid, pwent->pw_gid, - pwent->pw_shell); + if (!torture_setting_bool(torture, "samba3", false)) { + torture_assert(torture, (pwent != NULL), "NULL pwent"); + } + if (pwent) { + torture_comment(torture, "name: %s, uid: %d, gid: %d, shell: %s\n", + pwent->pw_name, pwent->pw_uid, pwent->pw_gid, + pwent->pw_shell); + } return true; } |