From ca62ddd8d901cce923d1cda958793054f80b1f57 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Mon, 5 Jun 2006 21:48:29 +0000 Subject: r16051: Move the XATTR compatability code into a new file, so I can use it for the getntacl utility. Andrew Bartlett (This used to be commit b1e0d4747b412929e1d4e24d6d9e504df3ddc824) --- source4/utils/getntacl.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'source4/utils/getntacl.c') diff --git a/source4/utils/getntacl.c b/source4/utils/getntacl.c index 98aec2804e..441f233a84 100644 --- a/source4/utils/getntacl.c +++ b/source4/utils/getntacl.c @@ -23,8 +23,7 @@ #include "includes.h" #include "system/filesys.h" #include "librpc/gen_ndr/ndr_xattr.h" - -#if HAVE_XATTR_SUPPORT +#include "lib/util/wrap_xattr.h" static void ntacl_print_debug_helper(struct ndr_print *ndr, const char *format, ...) PRINTF_ATTRIBUTE(2,3); @@ -57,7 +56,7 @@ static NTSTATUS get_ntacl(char *filename, struct xattr_NTACL **ntacl, *ntacl = talloc(NULL, struct xattr_NTACL); - size = getxattr(filename, XATTR_NTACL_NAME, NULL, 0); + size = wrap_getxattr(filename, XATTR_NTACL_NAME, NULL, 0); if (size < 0) { fprintf(stderr, "get_ntacl: %s\n", strerror(errno)); @@ -65,7 +64,7 @@ static NTSTATUS get_ntacl(char *filename, struct xattr_NTACL **ntacl, } blob.data = talloc_size(*ntacl, size); - size = getxattr(filename, XATTR_NTACL_NAME, blob.data, size); + size = wrap_getxattr(filename, XATTR_NTACL_NAME, blob.data, size); if (size < 0) { fprintf(stderr, "get_ntacl: %s\n", strerror(errno)); return NT_STATUS_INTERNAL_ERROR; @@ -109,14 +108,3 @@ int main(int argc, char *argv[]) return 0; } - -#else - -int main(int argc, char *argv[]) -{ - printf("getntacl: not compiled with xattr support!\n"); - return 1; - -} - -#endif -- cgit