forked from shaba/openuds
fixed authorize of x2go for python2/3 compat
This commit is contained in:
parent
8a61986dad
commit
4b9b386f14
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
*_enterprise.*
|
||||
.settings/
|
||||
.ipynb_checkpoints
|
||||
.mypy_cache
|
||||
|
||||
# Debian buildings
|
||||
*.debhelper*
|
||||
|
@ -29,7 +29,7 @@ def updateAuthorizedKeys(user, pubKey):
|
||||
sshFolder = '{}/.ssh'.format(home)
|
||||
if not os.path.exists(sshFolder):
|
||||
try:
|
||||
os.makedirs(sshFolder, 0700)
|
||||
os.makedirs(sshFolder, 0o700)
|
||||
os.chown(sshFolder, uid, -1)
|
||||
except OSError as e:
|
||||
if e.errno != errno.EEXIST:
|
||||
@ -53,7 +53,7 @@ def updateAuthorizedKeys(user, pubKey):
|
||||
|
||||
# Ensure access is correct
|
||||
os.chown(authorizedKeys, uid, -1)
|
||||
os.chmod(authorizedKeys, 0600)
|
||||
os.chmod(authorizedKeys, 0o600)
|
||||
|
||||
# Done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user