acl/acl-2.2.49-setfacl-restore....

28 lines
717 B
Diff

diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
index 7142af0..23784a7 100644
--- a/setfacl/setfacl.c
+++ b/setfacl/setfacl.c
@@ -125,7 +125,7 @@ restore(
uid_t uid;
gid_t gid;
mode_t mask, flags;
- struct do_set_args args;
+ struct do_set_args args = { 0 };
int line = 0, backup_line;
int error, status = 0;
int chmod_required = 0;
diff --git a/test/misc.test b/test/misc.test
index e6140da..a910bd0 100644
--- a/test/misc.test
+++ b/test/misc.test
@@ -424,3 +424,9 @@ Now, chmod should change the group_obj entry
>
$ rmdir d
+
+Malformed restore file
+
+ $ echo "# owner: root" > f
+ $ setfacl --restore=f 2>&1
+ >setfacl: f: No filename found in line 0, aborting