[packages/xfsprogs] Open target file in read only mode (fixes case of running it from non-root for root owned files etc)

arekm arekm at pld-linux.org
Thu Dec 9 17:06:05 CET 2021


commit 9f476f9567e0de93fe65018c0be13c068a9737c0
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Dec 9 17:05:34 2021 +0100

    Open target file in read only mode (fixes case of running it from non-root for root owned files etc).

 xfs_lsprojid | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/xfs_lsprojid b/xfs_lsprojid
index 75a847d..ff630a4 100644
--- a/xfs_lsprojid
+++ b/xfs_lsprojid
@@ -2,7 +2,7 @@
 
 # simple wrapper to show project id for specified paths, arekm at maven.pl 20111117
 
-xfs_io -p "$0" -c "stat" $@ | awk '
+xfs_io -r -p "$0" -c "stat" $@ | awk '
 /^fd\.path =/ { projid=""; path=$3; gsub(/^\"/, "", path); gsub(/\"$/, "", path); }
 /^fsxattr\.projid =/ { projid=$3; print path ": " projid; }
 '
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xfsprogs.git/commitdiff/9f476f9567e0de93fe65018c0be13c068a9737c0



More information about the pld-cvs-commit mailing list