Patch for quota-tools to avoid project quota crash
PATCH 1/1 Patch for quota-tools to avoid project quota crash
Hi Jan,
This patch is needed to avoid "quota -v -P 123" from crashing if /etc/projid does not exist.
Cheers,
- Ted
Quoted 1 line
From
b5edd1734a69364d614140273b812dc50d61842cMon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Tue, 5 Jul 2016 21:16:43 -0400
Subject: [PATCH] Don't crash if /etc/projid file does not exist
In endprent(), if project_file is NULL, don't try to fclose it, or else glibc will not be amused.
--- quotasys.c | 2 ++ 1 file changed, 2 insertions(+)
quotasys.c +2 -0
@@ -98,6 +98,8 @@ void setprent(void)/* Close /etc/projid file */ void endprent (void ) { +if (!project_file) +return ;fclose (project_file); project_file =NULL ; }
Signature · 1 line
2.5.0
Quoted 4 lines · Theodore Ts'o
Hi Jan,
This patch is needed to avoid "quota -v -P 123" from crashing if
/etc/projiddoes not exist.
Oops, I didn't see that Wang shilong had submitted a similar patch.
- Ted
Jan Kara
reviewerQuoted 7 lines · Ted Tso
Quoted 4 lines · Theodore Ts'o
Hi Jan,
This patch is needed to avoid "quota -v -P 123" from crashing if
/etc/projiddoes not exist.Oops, I didn't see that Wang shilong had submitted a similar patch.
Yes. I've merged the patch from Wang Shilong. Thanks for the fix anyway.
Honza
Signature · 2 lines
Jan Kara <[email protected]> SUSE Labs, CR