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.*
|
*_enterprise.*
|
||||||
.settings/
|
.settings/
|
||||||
.ipynb_checkpoints
|
.ipynb_checkpoints
|
||||||
|
.mypy_cache
|
||||||
|
|
||||||
# Debian buildings
|
# Debian buildings
|
||||||
*.debhelper*
|
*.debhelper*
|
||||||
|
@ -29,7 +29,7 @@ def updateAuthorizedKeys(user, pubKey):
|
|||||||
sshFolder = '{}/.ssh'.format(home)
|
sshFolder = '{}/.ssh'.format(home)
|
||||||
if not os.path.exists(sshFolder):
|
if not os.path.exists(sshFolder):
|
||||||
try:
|
try:
|
||||||
os.makedirs(sshFolder, 0700)
|
os.makedirs(sshFolder, 0o700)
|
||||||
os.chown(sshFolder, uid, -1)
|
os.chown(sshFolder, uid, -1)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.EEXIST:
|
if e.errno != errno.EEXIST:
|
||||||
@ -53,7 +53,7 @@ def updateAuthorizedKeys(user, pubKey):
|
|||||||
|
|
||||||
# Ensure access is correct
|
# Ensure access is correct
|
||||||
os.chown(authorizedKeys, uid, -1)
|
os.chown(authorizedKeys, uid, -1)
|
||||||
os.chmod(authorizedKeys, 0600)
|
os.chmod(authorizedKeys, 0o600)
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user