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:
Rafal Wojtczuk 2011-07-06 14:21:35 +02:00
parent d46150b8d3
commit b3ce35b5e2
7 changed files with 11 additions and 12 deletions

View File

@ -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 "$@"

View File

@ -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))

View File

@ -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

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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(&params, 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, &params, 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;