Revert "dom0/qrexec: use default user from VM settings"
This reverts commit b1ccc9a510e465b8b59f12bafb7735664c4101d0. This can be handled by qrexec_daemon itself. Conflicts: qrexec/qrexec_policy
This commit is contained in:
parent
46fd664ba3
commit
3f5a34f635
@ -6,7 +6,6 @@ import subprocess
|
|||||||
import xen.lowlevel.xl
|
import xen.lowlevel.xl
|
||||||
import qubes.guihelpers
|
import qubes.guihelpers
|
||||||
from optparse import OptionParser
|
from optparse import OptionParser
|
||||||
from qubes.qubes import QubesVmCollection
|
|
||||||
import fcntl
|
import fcntl
|
||||||
|
|
||||||
POLICY_FILE_DIR="/etc/qubes_rpc/policy"
|
POLICY_FILE_DIR="/etc/qubes_rpc/policy"
|
||||||
@ -175,16 +174,7 @@ def main():
|
|||||||
if policy_dict.has_key("action.user"):
|
if policy_dict.has_key("action.user"):
|
||||||
user=policy_dict["action.user"]
|
user=policy_dict["action.user"]
|
||||||
else:
|
else:
|
||||||
qvm_collection = QubesVmCollection()
|
user="user"
|
||||||
qvm_collection.lock_db_for_reading()
|
|
||||||
qvm_collection.load()
|
|
||||||
qvm_collection.unlock_db()
|
|
||||||
vm = qvm_collection.get_vm_by_name(target)
|
|
||||||
if vm is None:
|
|
||||||
print >> sys.stderr, "Cannot find settings of VM '%s', assuming default user 'user'" % target
|
|
||||||
user = "user"
|
|
||||||
else:
|
|
||||||
user = vm.default_user
|
|
||||||
do_execute(domain, target, user, exec_index, process_ident)
|
do_execute(domain, target, user, exec_index, process_ident)
|
||||||
|
|
||||||
print >> sys.stderr, "Rpc denied:", domain, target, exec_index
|
print >> sys.stderr, "Rpc denied:", domain, target, exec_index
|
||||||
|
Loading…
Reference in New Issue
Block a user