qrexec: change qrexec_client_vm syntax to be nicer to read
Now the local_program is just before arguments, which is nicer.
This commit is contained in:
parent
d46150b8d3
commit
b3ce35b5e2
@ -40,4 +40,4 @@ if [ $PROGRESS_TYPE = console ] ; then
|
||||
export FILECOPY_TOTAL_SIZE=$(du --apparent-size -c "$@" | tail -1 | cut -f 1)
|
||||
fi
|
||||
|
||||
exec /usr/lib/qubes/qrexec_client_vm /usr/lib/qubes/qfile-agent $VM qubes.Filecopy "$@"
|
||||
exec /usr/lib/qubes/qrexec_client_vm $VM qubes.Filecopy /usr/lib/qubes/qfile-agent "$@"
|
||||
|
@ -27,8 +27,7 @@ SIZE=$(du --apparent-size -c "$@" | tail -1 | cut -f 1)
|
||||
|
||||
export PROGRESS_TYPE=gui
|
||||
|
||||
/usr/lib/qubes/qrexec_client_vm /usr/lib/qubes/qfile-agent \
|
||||
$VM qubes.Filecopy "$@" |
|
||||
/usr/lib/qubes/qrexec_client_vm $VM qubes.Filecopy /usr/lib/qubes/qfile-agent "$@" |
|
||||
(while read sentsize ; do
|
||||
CURRSIZE=$(($sentsize/1024))
|
||||
echo $((100*$CURRSIZE/$SIZE))
|
||||
|
@ -29,8 +29,8 @@ qdbus $REF org.freedesktop.DBus.Properties.Set "" maximum $SIZE
|
||||
|
||||
export PROGRESS_TYPE=gui
|
||||
|
||||
/usr/lib/qubes/qrexec_client_vm /usr/lib/qubes/qfile-agent \
|
||||
$VM qubes.Filecopy "$@" |
|
||||
/usr/lib/qubes/qrexec_client_vm $VM qubes.Filecopy \
|
||||
/usr/lib/qubes/qfile-agent "$@" |
|
||||
(while read sentsize ; do
|
||||
CURRSIZE=$(($sentsize/1024))
|
||||
qdbus $REF org.freedesktop.DBus.Properties.Set "" value $CURRSIZE
|
||||
|
@ -25,4 +25,4 @@ if ! [ $# = 1 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec /usr/lib/qubes/qrexec_client_vm "/usr/lib/qubes/qopen-in-vm" dispvm qubes.OpenInVM "$1"
|
||||
exec /usr/lib/qubes/qrexec_client_vm dispvm qubes.OpenInVM "/usr/lib/qubes/qopen-in-vm" "$1"
|
||||
|
@ -25,4 +25,4 @@ if ! [ $# = 2 ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec /usr/lib/qubes/qrexec_client_vm "/usr/lib/qubes/qopen-in-vm" "$1" qubes.OpenInVM "$2"
|
||||
exec /usr/lib/qubes/qrexec_client_vm "$1" qubes.OpenInVM "/usr/lib/qubes/qopen-in-vm" "$2"
|
||||
|
@ -3,5 +3,5 @@
|
||||
UPDATEABLE=`/usr/bin/xenstore-read qubes_vm_updateable`
|
||||
|
||||
if [ "$UPDATEABLE" = "True" ]; then
|
||||
/usr/lib/qubes/qrexec_vm /bin/grep dom0 qubes.SyncAppMenus -H = /usr/share/applications/*.desktop
|
||||
/usr/lib/qubes/qrexec_client_vm dom0 qubes.SyncAppMenus /bin/grep -H = /usr/share/applications/*.desktop
|
||||
fi
|
||||
|
@ -66,7 +66,7 @@ int main(int argc, char **argv)
|
||||
|
||||
if (argc < 4) {
|
||||
fprintf(stderr,
|
||||
"usage: %s local_program target_vmname program_ident [local program arguments]\n",
|
||||
"usage: %s target_vmname program_ident local_program [local program arguments]\n",
|
||||
argv[0]);
|
||||
exit(1);
|
||||
}
|
||||
@ -90,8 +90,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
strncpy(params.exec_index, argv[3], sizeof(params.exec_index));
|
||||
strncpy(params.target_vmname, argv[2],
|
||||
strncpy(params.exec_index, argv[2], sizeof(params.exec_index));
|
||||
strncpy(params.target_vmname, argv[1],
|
||||
sizeof(params.target_vmname));
|
||||
snprintf(params.process_fds.ident,
|
||||
sizeof(params.process_fds.ident), "%d %d %d",
|
||||
@ -100,7 +100,7 @@ int main(int argc, char **argv)
|
||||
write(trigger_fd, ¶ms, sizeof(params));
|
||||
close(trigger_fd);
|
||||
|
||||
argv[3] = get_program_name(argv[1]);
|
||||
argv[3] = get_program_name(argv[3]);
|
||||
execv(argv[1], argv + 3);
|
||||
perror("execv");
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user