Blame SOURCES/0014-getcifsacl-Do-not-go-to-parse_sec_desc-if-getxattr-f.patch

75f41f
From cb086a53b73901cf0dfc957915ff454a30f333b3 Mon Sep 17 00:00:00 2001
75f41f
From: Kenneth D'souza <kdsouza@redhat.com>
75f41f
Date: Tue, 19 Feb 2019 07:13:43 +0530
75f41f
Subject: [PATCH 14/36] getcifsacl: Do not go to parse_sec_desc if getxattr
75f41f
 fails.
75f41f
75f41f
Add more to the error message by printing the filename and error.
75f41f
75f41f
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
75f41f
Reviewed-by: Steve French <stfrench@microsoft.com>
75f41f
(cherry picked from commit 670f416d2c0d07a4d9ff469eb797e5bef624d863)
75f41f
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
75f41f
---
75f41f
 getcifsacl.c | 8 ++++++--
75f41f
 1 file changed, 6 insertions(+), 2 deletions(-)
75f41f
75f41f
diff --git a/getcifsacl.c b/getcifsacl.c
75f41f
index f08cdea..aaf15fa 100644
75f41f
--- a/getcifsacl.c
75f41f
+++ b/getcifsacl.c
75f41f
@@ -398,8 +398,12 @@ cifsacl:
75f41f
 			free(attrval);
75f41f
 			bufsize += BUFSIZE;
75f41f
 			goto cifsacl;
75f41f
-		} else
75f41f
-			printf("getxattr error: %d\n", errno);
75f41f
+		} else {
75f41f
+			fprintf(stderr, "getxattr failed on %s: %s\n", filename, strerror(errno) );
75f41f
+			free(attrval);
75f41f
+			ret = -1;
75f41f
+			goto out;
75f41f
+		}
75f41f
 	}
75f41f
 
75f41f
 	parse_sec_desc((struct cifs_ntsd *)attrval, attrlen, raw);
75f41f
-- 
75f41f
1.8.3.1
75f41f