r14058: Try to make the continuation on the list of password set mechs clearer.
authorAndrew Bartlett <abartlet@samba.org>
Thu, 9 Mar 2006 00:59:54 +0000 (00:59 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:52:38 +0000 (13:52 -0500)
Andrew Bartlett

source/libnet/libnet_passwd.c

index 3ccba754ea8e4733f2ea5821a6de01b37a1475cf..e7a474811f5782b429ed63c67b7374aef59cc53b 100644 (file)
@@ -480,9 +480,12 @@ static NTSTATUS libnet_SetPassword_samr_handle(struct libnet_context *ctx, TALLO
        for (i=0; i < ARRAY_SIZE(levels); i++) {
                r->generic.level = levels[i];
                status = libnet_SetPassword(ctx, mem_ctx, r);
-               if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS) && !NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
-                       break;
+               if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_INFO_CLASS)
+                   || NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) {
+                       /* Try another password set mechanism */
+                       continue;
                }
+               break;
        }
        
        return status;