summaryrefslogtreecommitdiff
path: root/source4/utils/getntacl.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/utils/getntacl.c')
-rw-r--r--source4/utils/getntacl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/utils/getntacl.c b/source4/utils/getntacl.c
index 942183de3e..98aec2804e 100644
--- a/source4/utils/getntacl.c
+++ b/source4/utils/getntacl.c
@@ -65,12 +65,12 @@ static NTSTATUS get_ntacl(char *filename, struct xattr_NTACL **ntacl,
}
blob.data = talloc_size(*ntacl, size);
- blob.length = getxattr(filename, XATTR_NTACL_NAME, blob.data, size);
-
- if (blob.length < 0) {
+ size = getxattr(filename, XATTR_NTACL_NAME, blob.data, size);
+ if (size < 0) {
fprintf(stderr, "get_ntacl: %s\n", strerror(errno));
return NT_STATUS_INTERNAL_ERROR;
}
+ blob.length = size;
ndr = ndr_pull_init_blob(&blob, NULL);