[Pkg-privacy-commits] [tails-installer] 154/210: Make the application request admin rights on start
Intrigeri
intrigeri at moszumanska.debian.org
Wed May 24 15:26:40 UTC 2017
This is an automated email from the git hooks/post-receive script.
intrigeri pushed a commit to tag 3.90.0
in repository tails-installer.
commit 8044f99b3018130e7ba11637cf5e0d622dd5d2ff
Author: Martin Briza <mbriza at redhat.com>
Date: Thu Sep 3 16:03:57 2015 +0200
Make the application request admin rights on start
---
liveusb-creator | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/liveusb-creator b/liveusb-creator
index 80901d0..c1b48d9 100755
--- a/liveusb-creator
+++ b/liveusb-creator
@@ -100,4 +100,14 @@ if __name__ == '__main__':
if os.getuid() != 0:
print >> sys.stderr, _("You must run this application as root")
sys.exit(1)
+
+ if sys.platform == 'win32':
+ import win32com.shell.shell as shell
+ ASADMIN = 'asadmin'
+ if sys.argv[-1] != ASADMIN:
+ script = os.path.abspath(sys.argv[0])
+ params = ' '.join([script] + sys.argv[1:] + [ASADMIN])
+ shell.ShellExecuteEx(lpVerb='runas', lpFile=sys.executable, lpParameters=params)
+ sys.exit(0)
+
main()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/tails-installer.git
More information about the Pkg-privacy-commits
mailing list