getcifsacl: Do not go to parse_sec_desc if getxattr fails.
Subsystems (2)
PATCH 1/1 getcifsacl: Do not go to parse_sec_desc if getxattr fails.
Add more to the error message by printing the filename and error.
Signed-off-by Kenneth D'souza <[email protected]>
--- getcifsacl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
getcifsacl.c +6 -1
@@ -399,7 +399,12 @@ cifsacl: bufsize +=BUFSIZE ; goto cifsacl; }else -printf ("getxattr error: %d\n" , errno); + { +fprintf (stderr,"getxattr failed on %s: %s\n" , filename,strerror (errno) ); +free (attrval); + ret =-1 ; + goto out; + } }parse_sec_desc ((struct cifs_ntsd *)attrval, attrlen, raw);
Signature · 1 line
2.20.1
Reviewed-by Steve French <[email protected]>
Quoted 29 lines · Kenneth D'souza
Add more to the error message by printing the filename and error.
Signed-off-by Kenneth D'souza <[email protected]>--- getcifsacl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)getcifsacl.c +6
-2@@ -399,7 +399,12 @@ cifsacl: bufsize +=BUFSIZE ; goto cifsacl; }else -printf ("getxattr error: %d\n" , errno); + { +fprintf (stderr,"getxattr failed on %s: %s\n" , filename,strerror (errno) ); +free (attrval); + ret =-1 ; + goto out; + } }parse_sec_desc ((struct cifs_ntsd *)attrval, attrlen, raw); --2.20.1
Signature · 3 lines
Thanks, Steve
пн, 18 февр. 2019 г. в 20:40, Steve French <[email protected]>:
Quoted 29 lines
Reviewed-by Steve French <[email protected]>Quoted 25 lines · Kenneth D'souza
Add more to the error message by printing the filename and error.
Signed-off-by Kenneth D'souza <[email protected]>--- getcifsacl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)getcifsacl.c +6
-1@@ -399,7 +399,12 @@ cifsacl: bufsize +=BUFSIZE ; goto cifsacl; }else -printf ("getxattr error: %d\n" , errno); + { +fprintf (stderr,"getxattr failed on %s: %s\n" , filename,strerror (errno) ); +free (attrval); + ret =-1 ; + goto out; + } }
Quoted 4 lines
Quoted 4 lines
getcifsacl.c +0
-1parse_sec_desc ((struct cifs_ntsd *)attrval, attrlen, raw); --2.20.1
merged, thanks.
--
Best regards,
Pavel Shilovsky