diff mbox

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

Message ID 1355415084-8431-3-git-send-email-rodrigo.vivi@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Rodrigo Vivi Dec. 13, 2012, 4:11 p.m. UTC
needed by other igt tools that are collecting more usefull information.
---
 tools/intel_gpu_abrt | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

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/${@:$#}