summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/winbind/struct_based.c21
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;
}