Fixup the NET-API-USERMOD test.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 6 Mar 2008 22:05:24 +0000 (09:05 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Mar 2008 22:05:24 +0000 (09:05 +1100)
This test needed to be updated to handle the fact that you cannot
clear the ACB_PW_EXPIRED bit, and to always use the torture comment
functions (not printf directly).

Andrew Bartlett

source/torture/libnet/libnet_user.c
source/torture/libnet/userman.c

index 31300a793774606eb9d1781a7e1de348d74d495c..5446087034bd66a98a792dab8ae4241309a8c608 100644 (file)
@@ -339,9 +339,9 @@ static void set_test_changes(TALLOC_CTX *mem_ctx, struct libnet_ModifyUser *r,
        const char* logon_scripts[] = { "start_login.cmd", "login.bat", "start.cmd" };
        const char* home_dirs[] = { "\\\\srv\\home", "\\\\homesrv\\home\\user", "\\\\pdcsrv\\domain" };
        const char* home_drives[] = { "H:", "z:", "I:", "J:", "n:" };
-       const uint32_t flags[] = { (ACB_DISABLED | ACB_NORMAL),
+       const uint32_t flags[] = { (ACB_DISABLED | ACB_NORMAL | ACB_PW_EXPIRED),
                                   (ACB_NORMAL | ACB_PWNOEXP),
-                                  (ACB_NORMAL) };
+                                  (ACB_NORMAL | ACB_PW_EXPIRED) };
        const char *homedir, *homedrive, *logonscript;
        struct timeval now;
        int i, testfld;
index 5ce0a64022c842b115631fa877a22242fbc33a55..a5d8540d7b23fd17776b541f0fd5074d999d2254 100644 (file)
@@ -88,9 +88,9 @@ static bool test_usermod(struct torture_context *tctx, struct dcerpc_pipe *p,
        const char* home_dirs[] = { "\\\\srv\\home", "\\\\homesrv\\home\\user", "\\\\pdcsrv\\domain" };
        const char* home_drives[] = { "H:", "z:", "I:", "J:", "n:" };
        const char *homedir, *homedrive, *logonscript;
-       const uint32_t flags[] = { (ACB_DISABLED | ACB_NORMAL),
+       const uint32_t flags[] = { (ACB_DISABLED | ACB_NORMAL | ACB_PW_EXPIRED),
                                   (ACB_NORMAL | ACB_PWNOEXP),
-                                  (ACB_NORMAL) };
+                                  (ACB_NORMAL | ACB_PW_EXPIRED) };
 
        NTSTATUS status;
        struct timeval now;
@@ -201,7 +201,7 @@ static bool test_usermod(struct torture_context *tctx, struct dcerpc_pipe *p,
                        break;
                }
 
-               printf(((i < num_changes - 1) ? "%s," : "%s"), fldname);
+               torture_comment(tctx, ((i < num_changes - 1) ? "%s," : "%s"), fldname);
        }
        torture_comment(tctx, "]\n");