Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libs/vpnproviders.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
# Various pieces of VPN provider code used by the add-on.

import os
# For os.chmod
import stat
import xbmc
import xbmcgui
import xbmcvfs
Expand Down Expand Up @@ -301,6 +303,9 @@ def copyKeyAndCert(vpn_provider, ovpn_name, user_key, user_cert):
errorTrace("vpnproviders.py", str(e))
return False

# Attack surface reduction: set the key and cert file to 0600
os.chmod(key_dest, stat.S_IRUSR|stat.S_IWUSR)
os.chmod(cert_dest, stat.S_IRUSR|stat.S_IWUSR)

def getKeyName(vpn_provider, ovpn_name):
# Determines the user key name based on the provider
Expand Down