From 6c0e567929cb9623743181f53808d0c3236a87eb Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Fri, 6 Feb 2015 19:47:13 +0100 Subject: [PATCH 1/2] qubes-rpc-multiplexer: deprecate /etc/qubes_rpc, allow /usr/local /usr/local resides in private.img, so it is possible to define per-appvm RPC Also, with the upcoming 3.0 release support for old (R1) paths is removed. --- qrexec/qubes-rpc-multiplexer | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/qrexec/qubes-rpc-multiplexer b/qrexec/qubes-rpc-multiplexer index eac70cf..d90b746 100755 --- a/qrexec/qubes-rpc-multiplexer +++ b/qrexec/qubes-rpc-multiplexer @@ -6,23 +6,19 @@ exec 2>/tmp/qrexec-rpc-stderr.$$ rm -f /tmp/qrexec-rpc-stderr.$$ QUBES_RPC=/etc/qubes-rpc -# XXX: Backward compatibility -DEPRECATED_QUBES_RPC=/etc/qubes_rpc +LOCAL_QUBES_RPC=/usr/local/etc/qubes-rpc + if ! [ $# = 2 ] ; then echo $0: bad argument count, usage: $0 SERVICE-NAME REMOTE-DOMAIN-NAME >&2 exit 1 fi export QREXEC_REMOTE_DOMAIN="$2" -if [ -s "$QUBES_RPC/$1" ]; then - CFG_FILE=$QUBES_RPC/"$1" -elif [ -s "$DEPRECATED_QUBES_RPC/$1" ]; then - echo "$0: RPC service '$1' uses deprecated directory, please move to $QUBES_RPC" >&2 - CFG_FILE=$DEPRECATED_QUBES_RPC/"$1" -else - echo "$0: Cannot find service $1 file in $QUBES_RPC" >&2 - exit 1 -fi +for CFG_FILE in $QUBES_RPC/"$1" $LOCAL_QUBES_RPC/"$1"; do + if [ -s "$CFG_FILE" ]; then + break + fi +done if [ -x "$CFG_FILE" ] ; then exec "$CFG_FILE" From daf4a72f286094285a0deb5a47a4053deab991b8 Mon Sep 17 00:00:00 2001 From: Wojtek Porczyk Date: Mon, 9 Mar 2015 20:04:50 +0100 Subject: [PATCH 2/2] sudoers: do not require TTY This is required to run sudo from qubes-rpc. --- misc/qubes.sudoers | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc/qubes.sudoers b/misc/qubes.sudoers index 8087a90..b3b1307 100644 --- a/misc/qubes.sudoers +++ b/misc/qubes.sudoers @@ -1,3 +1,4 @@ +Defaults !requiretty user ALL=(ALL) NOPASSWD: ALL # WTF?! Have you lost your mind?! @@ -44,3 +45,5 @@ user ALL=(ALL) NOPASSWD: ALL # be seen by the xinput program...) # # joanna. + +# vim: ft=sudoers