[Libguestfs] [PATCH nbdkit 1/5] Revert "vddk: Disallow password=-"

Richard W.M. Jones
2020-06-02T12:27:02Z

This reverts commit cc1cd671a03cd6d4528f2c859ece870f1486d85b.
---
 plugins/vddk/nbdkit-vddk-plugin.pod | 7 ++++++-
 plugins/vddk/vddk.c                 | 4 ----
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod
b/plugins/vddk/nbdkit-vddk-plugin.pod
index 96a665b6..73316dd1 100644
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
@@ -7,7 +7,8 @@ nbdkit-vddk-plugin - nbdkit VMware VDDK plugin
  nbdkit vddk [file=]FILENAME
              [config=FILENAME] [cookie=COOKIE] [libdir=LIBRARY]
              [nfchostport=PORT] [single-link=true]
-             [password=PASSWORD | password=+FILENAME | password=-FD]
+             [password=PASSWORD | password=- | password=+FILENAME
+             | password=-FD]
              [port=PORT] [server=HOSTNAME] [snapshot=MOREF]
              [thumbprint=THUMBPRINT] [transports=MODE:MODE:...]
              [unbuffered=true] [user=USERNAME] [vm=moref=ID]
@@ -158,6 +159,10 @@ Set the password to use when connecting to the remote
server.
 Note that passing this on the command line is not secure on shared
 machines.

+=item B<password=->
+
+Ask for the password (interactively) when nbdkit starts up.
+
 =item B<password=+>FILENAME

 Read the password from the named file.  This is a secure method
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
index 54a6e019..4815a43e 100644
--- a/plugins/vddk/vddk.c
+++ b/plugins/vddk/vddk.c
@@ -240,10 +240,6 @@ vddk_config (const char *key, const char *value)
       return -1;
   }
   else if (strcmp (key, "password") == 0) {
-    if (strcmp (value, "-") == 0) {
-      nbdkit_error ("password=- is not supported with the VDDK
plugin");
-      return -1;
-    }
     free (password);
     if (nbdkit_read_password (value, &password) == -1)
       return -1;
--
2.25.0