Prefer 'on' | 'off' over 'yes' | 'no' for bool options
PATCH 1/1 Prefer 'on' | 'off' over 'yes' | 'no' for bool options
Update some docs and test cases to use 'on' | 'off' as the preferred value for bool options.
--- docs/system/vnc-security.rst | 6 +++--- include/authz/listfile.h | 2 +- qemu-options.hx | 4 ++-- tests/qemu-iotests/233 | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
docs/system/vnc-security.rst +3 -3
@@ -89,7 +89,7 @@ but with ``verify-peer`` set to ``yes`` instead. .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0 -monitor stdio .. _vnc_005fsec_005fcertificate_005fpw:
@@ -103,7 +103,7 @@ authentication to provide two layers of authentication for clients. .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0,password -monitor stdio (qemu) change vnc password Password: ********
@@ -145,7 +145,7 @@ x509 options: .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0,sasl -monitor stdio .. _vnc_005fsetup_005fsasl:
include/authz/listfile.h +1 -1
@@ -73,7 +73,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(QAuthZListFile,* The object can be created on the command line using * * -object authz-list-file,id=authz0,\ -* filename=/etc/qemu/myvm-vnc.acl,refresh=yes +* filename=/etc/qemu/myvm-vnc.acl,refresh=on * */ struct QAuthZListFile {
qemu-options.hx +2 -2
@@ -5002,7 +5002,7 @@ SRST Note the use of quotes due to the x509 distinguished name containing whitespace, and escaping of ','. - ``-object authz-listfile,id=id,filename=path,refresh=yes|no`` + ``-object authz-listfile,id=id,filename=path,refresh=on|off`` Create an authorization object that will control access to network services.
@@ -5047,7 +5047,7 @@ SRST # |qemu_system| \\ ... \\ - -object authz-simple,id=auth0,filename=/etc/qemu/vnc-sasl.acl,refresh=yes \\ + -object authz-simple,id=auth0,filename=/etc/qemu/vnc-sasl.acl,refresh=on \\ ... ``-object authz-pam,id=id,service=string``
tests/qemu-iotests/233 +2 -2
@@ -83,7 +83,7 @@ echo echo "== check plain client to TLS server fails ==" nbd_server_start_tcp_socket \ - --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=yes \ + --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=on \ --tls-creds tls0 \ -f $IMGFMT "$TEST_IMG" 2>> "$TEST_DIR/server.log"
@@ -128,7 +128,7 @@ echo "== check TLS with authorization ==" nbd_server_stop nbd_server_start_tcp_socket \ - --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=yes \ + --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=on \ --object "authz-simple,id=authz0,identity=CN=localhost,, \ O=Cthulu Dark Lord Enterprises client1,,L=R'lyeh,,C=South Pacific" \ --tls-authz authz0 \
Signature · 1 line
2.28.0
Quoted 92 lines · Daniel P. Berrangé
Update some docs and test cases to use 'on' | 'off' as the preferred value for bool options.
Signed-off-by Daniel P. Berrangé <[email protected]>--- docs/system/vnc-security.rst | 6 +++--- include/authz/listfile.h | 2 +- qemu-options.hx | 4 ++-- tests/qemu-iotests/233 | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)docs/system/vnc-security.rst +3
-3@@ -89,7 +89,7 @@ but with ``verify-peer`` set to ``yes`` instead. .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0 -monitor stdio .. _vnc_005fsec_005fcertificate_005fpw:@@ -103,7 +103,7 @@ authentication to provide two layers of authentication for clients. .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0,password -monitor stdio (qemu) change vnc password Password: ********@@ -145,7 +145,7 @@ x509 options: .. parsed-literal:: |qemu_system| [...OPTIONS...] \ - -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=yes \ + -object tls-creds-x509,id=tls0,dir=/etc/pki/qemu,endpoint=server,verify-peer=on \ -vnc :1,tls-creds=tls0,sasl -monitor stdio .. _vnc_005fsetup_005fsasl:include/authz/listfile.h +1
-1@@ -73,7 +73,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(QAuthZListFile,* The object can be created on the command line using * * -object authz-list-file,id=authz0,\ -* filename=/etc/qemu/myvm-vnc.acl,refresh=yes +* filename=/etc/qemu/myvm-vnc.acl,refresh=on * */ struct QAuthZListFile {qemu-options.hx +2
-2@@ -5002,7 +5002,7 @@ SRST Note the use of quotes due to the x509 distinguished name containing whitespace, and escaping of ','. - ``-object authz-listfile,id=id,filename=path,refresh=yes|no`` + ``-object authz-listfile,id=id,filename=path,refresh=on|off`` Create an authorization object that will control access to network services.@@ -5047,7 +5047,7 @@ SRST # |qemu_system| \\ ... \\ - -object authz-simple,id=auth0,filename=/etc/qemu/vnc-sasl.acl,refresh=yes \\ + -object authz-simple,id=auth0,filename=/etc/qemu/vnc-sasl.acl,refresh=on \\ ``-object authz-pam,id=id,service=string``tests/qemu-iotests/233 +1
-1@@ -83,7 +83,7 @@ echo echo "== check plain client to TLS server fails ==" nbd_server_start_tcp_socket \ - --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=yes \ + --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=on \ --tls-creds tls0 \ -f $IMGFMT "$TEST_IMG" 2>> "$TEST_DIR/server.log"
tests/qemu-iotests/233 echo "== check TLS with authorization ==" · line 134
Quoted 8 lines
tests/qemu-iotests/233 +1
-1@@ -128,7 +128,7 @@ echo "== check TLS with authorization ==" nbd_server_stop nbd_server_start_tcp_socket \ - --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=yes \ + --object tls-creds-x509,dir=${tls_dir}/server1,endpoint=server,id=tls0,verify-peer=on \ --object "authz-simple,id=authz0,identity=CN=localhost,, \ O=Cthulu Dark Lord Enterprises client1,,L=R'lyeh,,C=South Pacific" \ --tls-authz authz0 \
Quoted 10 lines · Daniel P. Berrangé
Update some docs and test cases to use 'on' | 'off' as the preferred value for bool options.
Signed-off-by Daniel P. Berrangé <[email protected]>--- docs/system/vnc-security.rst | 6 +++--- include/authz/listfile.h | 2 +- qemu-options.hx | 4 ++-- tests/qemu-iotests/233 | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
Am 04.11.2020 um 15:05 hat Daniel P. Berrangé geschrieben:
docs/system/vnc-security.rst but with ``verify-peer`` set to ``yes`` instead.
Quoted 16 lines
Update some docs and test cases to use 'on' | 'off' as the preferred value for bool options.
Signed-off-by Daniel P. Berrangé <[email protected]>--- docs/system/vnc-security.rst | 6 +++--- include/authz/listfile.h | 2 +- qemu-options.hx | 4 ++-- tests/qemu-iotests/233 | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)docs/system/vnc-security.rst +0
-0@@ -89,7 +89,7 @@ but with ``verify-peer`` set to ``yes`` instead.
Looks like it's not only in example, but the text has a mention of "yes", too. It seems to be the only one, but we'll probably want to replace it there as well.
There is also an example of verify-peer=no in the file which this patch misses.
Kevin