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

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