mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-28 18:02:38 +02:00
Merge pull request #123 from pymnh/getuser
Use getpass.getuser() to determine user login
This commit is contained in:
commit
7a4788f7a4
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import sys
|
|||
import pipes
|
||||
import shutil
|
||||
import os
|
||||
import getpass
|
||||
|
||||
# What is the container runtime for this platform?
|
||||
if platform.system() == "Darwin":
|
||||
|
@ -39,7 +40,7 @@ def exec_container(args):
|
|||
# In Tails, tell the container runtime to download over Tor
|
||||
if (
|
||||
platform.system() == "Linux"
|
||||
and os.getlogin() == "amnesia"
|
||||
and getpass.getuser() == "amnesia"
|
||||
and os.getuid() == 1000
|
||||
):
|
||||
env = os.environ.copy()
|
||||
|
|
Loading…
Reference in a new issue