[PATCH 3/4] tools: intel_gpu_abrt checking for root access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



needed by other igt tools that are collecting more usefull information.
---
 tools/intel_gpu_abrt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/intel_gpu_abrt b/tools/intel_gpu_abrt
index fe3684d..9ca58c0 100755
--- a/tools/intel_gpu_abrt
+++ b/tools/intel_gpu_abrt
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if [[ $UID -ne 0 ]]; then
+    echo "$0 must be run as root"
+    exit 1
+fi
+
 get(){
     if [ ! -e $tardir/${@:$#} ] ; then
 	mkdir -p $tardir/${@:$#}
-- 
1.7.11.7



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux