From 8d834060b5af54dcc9581840dfb6452a17a7a7d3 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 5 Sep 2013 11:28:25 +0200 Subject: extract-compat: Skip extraction if running as non-root --- trust/trust-extract-compat.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/trust/trust-extract-compat.in b/trust/trust-extract-compat.in index 2d8809c..9b46055 100755 --- a/trust/trust-extract-compat.in +++ b/trust/trust-extract-compat.in @@ -11,6 +11,12 @@ if [ $# -ne 0 ]; then exit 2 fi +uid=$(id -u) +if [ "$uid" != 0 ]; then + echo "trust: running as non-root user: skip extracting compat bundles" >&2 + exit 0 +fi + echo "trust: the placeholder extract-compat command has not been customized by your distribution." >&2 # You can use commands like this to extract data from trust modules -- cgit v1.1