From ce63d31a2e6de74d6aaab0d4c0838aeaeb4e53d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Fri, 9 Jun 2017 23:09:58 +0200 Subject: [PATCH] Make all scripts in qubes-rpc executable Don't rely on legacy feature of interpreting non-executable files as scripts there. --- Makefile | 14 +++++++------- qubes-rpc/qubes.Backup | 2 ++ qubes-rpc/qubes.DetachPciDevice | 0 qubes-rpc/qubes.Filecopy | 1 + qubes-rpc/qubes.GetAppmenus | 1 + qubes-rpc/qubes.GetImageRGBA | 1 + qubes-rpc/qubes.OpenInVM | 1 + qubes-rpc/qubes.Restore | 1 + qubes-rpc/qubes.SelectDirectory | 1 + qubes-rpc/qubes.SelectFile | 1 + qubes-rpc/qubes.SetDateTime | 0 qubes-rpc/qubes.SuspendPost | 1 + qubes-rpc/qubes.SuspendPre | 1 + qubes-rpc/qubes.SyncNtpClock | 1 + qubes-rpc/qubes.VMShell | 1 + 15 files changed, 20 insertions(+), 7 deletions(-) mode change 100644 => 100755 qubes-rpc/qubes.Backup mode change 100644 => 100755 qubes-rpc/qubes.DetachPciDevice mode change 100644 => 100755 qubes-rpc/qubes.Filecopy mode change 100644 => 100755 qubes-rpc/qubes.GetAppmenus mode change 100644 => 100755 qubes-rpc/qubes.GetImageRGBA mode change 100644 => 100755 qubes-rpc/qubes.OpenInVM mode change 100644 => 100755 qubes-rpc/qubes.Restore mode change 100644 => 100755 qubes-rpc/qubes.SelectDirectory mode change 100644 => 100755 qubes-rpc/qubes.SelectFile mode change 100644 => 100755 qubes-rpc/qubes.SetDateTime mode change 100644 => 100755 qubes-rpc/qubes.SuspendPost mode change 100644 => 100755 qubes-rpc/qubes.SuspendPre mode change 100644 => 100755 qubes-rpc/qubes.SyncNtpClock mode change 100644 => 100755 qubes-rpc/qubes.VMShell diff --git a/Makefile b/Makefile index 4915413..525d1a5 100644 --- a/Makefile +++ b/Makefile @@ -253,18 +253,18 @@ install-common: install -d $(DESTDIR)/$(KDESERVICEDIR) install -m 0644 qubes-rpc/{qvm-copy.desktop,qvm-move.desktop,qvm-dvm.desktop} $(DESTDIR)/$(KDESERVICEDIR) install -d $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.SyncNtpClock} $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/{qubes.Filecopy,qubes.OpenInVM,qubes.VMShell,qubes.SyncNtpClock} $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.VMRootShell $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.OpenURL $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/{qubes.SuspendPre,qubes.SuspendPost,qubes.GetAppmenus} $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.SuspendPreAll $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.SuspendPostAll $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.WaitForSession $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc - install -m 0644 qubes-rpc/qubes.SetDateTime $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.DetachPciDevice $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.{Backup,Restore} $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.Select{File,Directory} $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.GetImageRGBA $(DESTDIR)/etc/qubes-rpc + install -m 0755 qubes-rpc/qubes.SetDateTime $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.InstallUpdatesGUI $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.ResizeDisk $(DESTDIR)/etc/qubes-rpc install -m 0755 qubes-rpc/qubes.StartApp $(DESTDIR)/etc/qubes-rpc diff --git a/qubes-rpc/qubes.Backup b/qubes-rpc/qubes.Backup old mode 100644 new mode 100755 index b07478c..fed97e4 --- a/qubes-rpc/qubes.Backup +++ b/qubes-rpc/qubes.Backup @@ -1,3 +1,5 @@ +#!/bin/sh + echo Starting Backupcopy read args echo Arguments: $args diff --git a/qubes-rpc/qubes.DetachPciDevice b/qubes-rpc/qubes.DetachPciDevice old mode 100644 new mode 100755 diff --git a/qubes-rpc/qubes.Filecopy b/qubes-rpc/qubes.Filecopy old mode 100644 new mode 100755 index 34e4c7b..9b497f5 --- a/qubes-rpc/qubes.Filecopy +++ b/qubes-rpc/qubes.Filecopy @@ -1 +1,2 @@ +#!/bin/sh exec /usr/lib/qubes/qfile-unpacker diff --git a/qubes-rpc/qubes.GetAppmenus b/qubes-rpc/qubes.GetAppmenus old mode 100644 new mode 100755 index 696deab..d75570c --- a/qubes-rpc/qubes.GetAppmenus +++ b/qubes-rpc/qubes.GetAppmenus @@ -1,3 +1,4 @@ +#!/bin/sh find /usr/share/applications/ /usr/local/share/applications/ -name '*.desktop' -print0 2>/dev/null | \ xargs -0 awk ' BEGINFILE { entry="" } diff --git a/qubes-rpc/qubes.GetImageRGBA b/qubes-rpc/qubes.GetImageRGBA old mode 100644 new mode 100755 index cf068bc..db68e61 --- a/qubes-rpc/qubes.GetImageRGBA +++ b/qubes-rpc/qubes.GetImageRGBA @@ -1,3 +1,4 @@ +#!/bin/sh set -e read filename diff --git a/qubes-rpc/qubes.OpenInVM b/qubes-rpc/qubes.OpenInVM old mode 100644 new mode 100755 index fe1966c..82b645d --- a/qubes-rpc/qubes.OpenInVM +++ b/qubes-rpc/qubes.OpenInVM @@ -1 +1,2 @@ +#!/bin/sh exec /usr/lib/qubes/vm-file-editor diff --git a/qubes-rpc/qubes.Restore b/qubes-rpc/qubes.Restore old mode 100644 new mode 100755 index 2e0a057..b97e4b6 --- a/qubes-rpc/qubes.Restore +++ b/qubes-rpc/qubes.Restore @@ -1,3 +1,4 @@ +#!/bin/sh echo Starting Restorecopy >&2 read args read paths diff --git a/qubes-rpc/qubes.SelectDirectory b/qubes-rpc/qubes.SelectDirectory old mode 100644 new mode 100755 index 62550f6..c6e5fae --- a/qubes-rpc/qubes.SelectDirectory +++ b/qubes-rpc/qubes.SelectDirectory @@ -1 +1,2 @@ +#!/bin/sh exec zenity --title="Qubes" --file-selection --directory diff --git a/qubes-rpc/qubes.SelectFile b/qubes-rpc/qubes.SelectFile old mode 100644 new mode 100755 index bc7c2d3..9bd8c5e --- a/qubes-rpc/qubes.SelectFile +++ b/qubes-rpc/qubes.SelectFile @@ -1 +1,2 @@ +#!/bin/sh exec zenity --title="Qubes" --file-selection diff --git a/qubes-rpc/qubes.SetDateTime b/qubes-rpc/qubes.SetDateTime old mode 100644 new mode 100755 diff --git a/qubes-rpc/qubes.SuspendPost b/qubes-rpc/qubes.SuspendPost old mode 100644 new mode 100755 index 73bf2ea..55c4fbe --- a/qubes-rpc/qubes.SuspendPost +++ b/qubes-rpc/qubes.SuspendPost @@ -1 +1,2 @@ +#!/bin/sh /usr/lib/qubes/prepare-suspend resume diff --git a/qubes-rpc/qubes.SuspendPre b/qubes-rpc/qubes.SuspendPre old mode 100644 new mode 100755 index ad49fa6..d116d23 --- a/qubes-rpc/qubes.SuspendPre +++ b/qubes-rpc/qubes.SuspendPre @@ -1 +1,2 @@ +#!/bin/sh /usr/lib/qubes/prepare-suspend suspend diff --git a/qubes-rpc/qubes.SyncNtpClock b/qubes-rpc/qubes.SyncNtpClock old mode 100644 new mode 100755 index 087a421..dcd090c --- a/qubes-rpc/qubes.SyncNtpClock +++ b/qubes-rpc/qubes.SyncNtpClock @@ -1 +1,2 @@ +#!/bin/sh /usr/lib/qubes/sync-ntp-clock diff --git a/qubes-rpc/qubes.VMShell b/qubes-rpc/qubes.VMShell old mode 100644 new mode 100755 index 8d8d8c4..3ee4feb --- a/qubes-rpc/qubes.VMShell +++ b/qubes-rpc/qubes.VMShell @@ -1 +1,2 @@ +#!/bin/sh exec /bin/bash