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