1 commit 340a70e71c690902cd7f15d07ae76f332064a5d9
2 Author: Kamil Dudka <kdudka@redhat.com>
3 Date: Wed Mar 24 15:36:08 2010 +0100
5 Prevent setfacl --restore from SIGSEGV on malformed restore file
7 originally reported at:
8 https://bugzilla.redhat.com/576550
10 diff --git a/setfacl/setfacl.c b/setfacl/setfacl.c
11 index 731e417..4f4ff27 100644
12 --- a/setfacl/setfacl.c
13 +++ b/setfacl/setfacl.c
14 @@ -125,7 +125,7 @@ restore(
18 - struct do_set_args args;
19 + struct do_set_args args = { };
20 int line = 0, backup_line;
21 int error, status = 0;
22 int chmod_required = 0;
23 diff --git a/test/misc.test b/test/misc.test
24 index d5d7680..2cf0360 100644
27 @@ -452,3 +452,9 @@ Dangling symlink test http://savannah.nongnu.org/bugs/?28131
28 $ setfacl -RL -m u:bin:rw d
29 > setfacl: d/b: No such file or directory
32 +Malformed restore file
34 + $ echo "# owner: root" > f
35 + $ setfacl --restore=f 2>&1
36 + >setfacl: f: No filename found in line 0, aborting