]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
make afsdump_scan get ACLs right
authorStephan Wiesand <Stephan.Wiesand@desy.de>
Sun, 17 Apr 2011 22:37:36 +0000 (23:37 +0100)
committerDerrick Brashear <shadow@dementix.org>
Fri, 16 Dec 2011 11:57:51 +0000 (03:57 -0800)
This makes afsdump_scan get the ACLs right on little endian systems.
It also corrects and slightly beautifies some output (indentation,
cut&paste error for negative ACL label).

Reviewed-on: http://gerrit.openafs.org/4494
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 1105d63ddf5a32b9381ff47e8101c3f141366fa6)

Change-Id: Iec0fa5bc9673bdce616611f422d74e55b0aa90f1
Reviewed-on: http://gerrit.openafs.org/6292
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/tests/parsevnode.c

index f259ee5e74819552e8dc7cd9e2a8389cf35c188f..8f09fd1374dd27f4fdaa2de5d905541682717ad4 100644 (file)
@@ -407,17 +407,17 @@ parse_acl(XFILE * X, unsigned char *tag, tagged_field * field,
        acl = (struct acl_accessList *)(v->acl);
        n = ntohl(acl->positive);
        if (n) {
-           printf("Positive ACL: %d entries\n", n);
+           printf(" Positive ACL: %d entries\n", n);
            for (i = 0; i < n; i++)
                printf("              %9d  %s\n", ntohl(acl->entries[i].id),
-                      rights2str(acl->entries[i].rights));
+                      rights2str(ntohl(acl->entries[i].rights)));
        }
        n = ntohl(acl->negative);
        if (n) {
-           printf("Positive ACL: %d entries\n", n);
+           printf(" Negative ACL: %d entries\n", n);
            for (i = ntohl(acl->positive); i < ntohl(acl->total); i++)
                printf("              %9d  %s\n", ntohl(acl->entries[i].id),
-                      rights2str(acl->entries[i].rights));
+                      rights2str(ntohl(acl->entries[i].rights)));
        }
     }
     return ReadByte(X, tag);
@@ -463,7 +463,7 @@ parse_vdata(XFILE * X, unsigned char *tag, tagged_field * field,
                    return r;
                symlink_buf[v->size] = 0;
                if (p->print_flags & DSPRINT_VNODE)
-                   printf("Target:       %s\n", symlink_buf);
+                   printf(" Target:       %s\n", symlink_buf);
            } else {
                /* Call the callback here, because it's non-fatal */
                if (p->cb_error)