]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - utils/mount/mount.c
Fix error reporting when probe_bothports() fails while rewriting mount
[nfs-utils.git] / utils / mount / mount.c
index 839a3296214ac654aa5738bc33f004ba5003dc31..d7271a1c32757b3cadc451e9f093f9aec672dc44 100644 (file)
  *
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <unistd.h>
 #include <sys/types.h>
 #include <stdio.h>
@@ -536,6 +539,12 @@ int main(int argc, char *argv[])
                        mnt_err = EX_USAGE;
                        goto out;
                }
+
+               if (geteuid() != 0) {
+                       nfs_error(_("%s: not installed setuid - "
+                                   "\"user\" NFS mounts not supported."), progname);
+                       exit(EX_FAIL);
+               }
        }
 
        if (chk_mountpoint(mount_point)) {