xfs
[Top] [All Lists]

[patch 3/4] acl: Return error status on setfacl failures

To: xfs@xxxxxxxxxxx
Subject: [patch 3/4] acl: Return error status on setfacl failures
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 30 Dec 2008 12:14:16 -0600
References: <20081230181413.518122170@xxxxxxxxxxx>
User-agent: quilt/0.46-1
Resolves Red Hat bug:
 Bug 368451 -  setfacl returns 0 even though it fails

From: Jiri Moskovcak <jmoskovc@xxxxxxxxxx>
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

Index: xfs-cmds/acl/setfacl/setfacl.c
===================================================================
--- xfs-cmds.orig/acl/setfacl/setfacl.c
+++ xfs-cmds/acl/setfacl/setfacl.c
@@ -137,7 +137,7 @@ restore(
                if (error < 0)
                        goto fail;
                if (error == 0)
-                       return 0;
+                       return status;
 
                if (path_p == NULL) {
                        if (filename) {
@@ -151,6 +151,7 @@ restore(
                                                 "aborting\n"),
                                        progname, backup_line);
                        }
+                       status = 1;
                        goto getout;
                }
 
@@ -169,6 +170,7 @@ restore(
                        fprintf(stderr, _("%s: %s: %s in line %d\n"),
                                progname, xquote(filename), strerror(errno),
                                line);
+                       status = 1;
                        goto getout;
                }
 

-- 

<Prev in Thread] Current Thread [Next in Thread>