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 /configure.ac | |
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 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 99b74df2..0dc4e4bd 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,17 @@ AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number]) AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number]) AC_DEFINE([PACKAGE_VERSION_EXTRA],["libguestfs_extra"],[Extra version string]) +dnl Die if the user tries to configure as root, see: +dnl https://www.redhat.com/archives/libguestfs/2010-April/msg00098.html +AC_MSG_CHECKING([if you are trying to configure as root]) +AS_IF([test "`id -u`" = 0 ],[ + AC_MSG_RESULT([yes]) + AC_MSG_FAILURE([Don't run './configure' or 'make' as root.]) + ],[ + AC_MSG_RESULT([no]) + ]) + +dnl Early gnulib initialization. gl_EARLY gl_INIT |