]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Configuring OVT with the --without-pam option will implicitly disable vgauth.
authorJohn Wolfe <jwolfe@vmware.com>
Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Thu, 4 Mar 2021 21:48:46 +0000 (13:48 -0800)
When no vgauth option is given alongside -–without-pam, a warning
is displayed with a message “Building without PAM; vgauth will be
disabled.”.

When -–disable-vgauth is supplied alongside –-without-pam, no
warning or error message is displayed.

When -–enable-vgauth is supplied alongside -–without-pam, an
error will be thrown and the configure stage will be aborted with an
error message “Cannot enable vgauth without PAM. Please configure
without --without-pam or without --enable-vgauth.”

Github Issue: https://github.com/vmware/open-vm-tools/issues/481

open-vm-tools/configure.ac

index d085933462be1b0091205880be5eb0831872975f..9a8afef1b3d7b9f435452ec5380a3a89beca4b77 100644 (file)
@@ -535,8 +535,8 @@ AC_VMW_CHECK_LIB([fuse],
 #
 AC_ARG_WITH([pam],
    [AS_HELP_STRING([--without-pam],
-     [compiles without PAM support.])],
-   [],
+     [compiles without PAM support (disables vgauth).])],
+   [with_pam="$withval"],
    [with_pam=yes])
 
 if test "$with_pam" = "yes"; then
@@ -556,11 +556,19 @@ AC_ARG_ENABLE([vgauth],
    [AS_HELP_STRING([--disable-vgauth],
      [do not build vgauth.])],
    [
+    if test "$with_pam" = "no" -a "$enableval" = "yes"; then
+       AC_MSG_ERROR([Cannot enable vgauth without PAM. Please configure
+                     without --without-pam or without --enable-vgauth.])
+    fi
     enable_vgauth="$enableval"
     use_xmlsec1=yes
    ],
    [
-    if test "$os" = "linux"; then
+    if test "$with_pam" = "no"; then
+       enable_vgauth="no"
+       use_xmlsec1="no"
+       AC_MSG_WARN("Building without PAM; vgauth will be disabled.")
+    elif test "$os" = "linux"; then
        enable_vgauth=yes
        use_xmlsec1=yes
     else