File permissions-fix-error-output.patch of Package permissions.13185
commit a6b94a65016f9d36ea26d0e183a8adb8d322373d
Author: Marcus Meissner <meissner@suse.de>
Date: Thu Jan 25 14:11:22 2018 +0100
the eror should be reported for permfiles[i], not argv[i], as these
are not the same files. (bsc#1047247)
diff --git a/chkstat.c b/chkstat.c
index 460b69f..dde3b6c 100644
--- a/chkstat.c
+++ b/chkstat.c
@@ -33,7 +33,7 @@
#include <fcntl.h>
#define BAD_LINE() \
- fprintf(stderr, "bad permissions line %s:%d\n", argv[i], lcnt);
+ fprintf(stderr, "bad permissions line %s:%d\n", permfiles[i], lcnt);
struct perm {
struct perm *next;
@@ -787,7 +787,7 @@ main(int argc, char **argv)
{
if ((fp = fopen(permfiles[i], "r")) == 0)
{
- perror(argv[i]);
+ perror(permfiles[i]);
exit(1);
}
lcnt = 0;