summaryrefslogtreecommitdiff
path: root/sys-fs/quota/files/quota-4.03-repqouta_F_option_arg.patch
blob: d4fffd4f03fab8285ad111bbd19ff6c68e3e19a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
commit ab2bf5b51a1ca14cef63e8a7a88b039f173a210a
Author: Eric Sandeen <sandeen@redhat.com>
Date:   Mon Jan 18 20:11:01 2016 -0600

    repquota: -F option takes an arg
    
    Commit a5876145 added a new -O option which takes an
    argument, but in the process lost the argument specifier
    for "F".  As a result, the use of "-F" segfaults when NULL
    is sent to name2fmt() instead of the provided argument.
    
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Signed-off-by: Jan Kara <jack@suse.cz>

diff --git a/repquota.c b/repquota.c
index 744af70..6fe9f0c 100644
--- a/repquota.c
+++ b/repquota.c
@@ -90,7 +90,7 @@ static void parse_options(int argcnt, char **argstr)
 		{ NULL, 0, NULL, 0 }
 	};
 
-	while ((ret = getopt_long(argcnt, argstr, "VavughtspncCiFO:", long_opts, NULL)) != -1) {
+	while ((ret = getopt_long(argcnt, argstr, "VavughtspncCiF:O:", long_opts, NULL)) != -1) {
 		switch (ret) {
 			case '?':
 			case 'h':