diff options
author | Richard Jones <rjones@redhat.com> | 2010-04-20 13:22:09 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-04-20 13:22:09 +0100 |
commit | 199f218bf431b77c12a728f7072bed1553a0f0af (patch) | |
tree | ddd8a2e05ba362dd81bd45f4a975ffd21443590c /src | |
parent | 175c01d2336c07113f1c2966966957de5c344e3a (diff) | |
download | libguestfs-199f218bf431b77c12a728f7072bed1553a0f0af.tar.gz libguestfs-199f218bf431b77c12a728f7072bed1553a0f0af.tar.xz libguestfs-199f218bf431b77c12a728f7072bed1553a0f0af.zip |
Check user doesn't run configure, make or make check as root.
(Thanks to Yufang Zhang for helping to debug this issue).
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 43f1b0d2..ad3b4789 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -179,3 +179,14 @@ guestfs.3: guestfs.pod \ --name "guestfs" \ --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \ > $@ + +# Check user doesn't try to do 'make all' or 'make check' as root. +# https://www.redhat.com/archives/libguestfs/2010-April/msg00098.html + +all-local: checkroot +check-local: checkroot +checkroot: + @if [ "`id -u`" = 0 ]; then \ + echo "*** Error: Don't run 'make' or 'make check' as root."; \ + exit 1; \ + fi |