mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Don't set cwd to user's home for services
allow `cwd` setting to take effect
This commit is contained in:
@@ -56,7 +56,7 @@ from traitlets.config import LoggingConfigurable
|
||||
|
||||
from .. import orm
|
||||
from ..traitlets import Command
|
||||
from ..spawner import LocalProcessSpawner
|
||||
from ..spawner import LocalProcessSpawner, set_user_setuid
|
||||
from ..utils import url_path_join
|
||||
|
||||
class _MockUser(HasTraits):
|
||||
@@ -80,7 +80,7 @@ class _ServiceSpawner(LocalProcessSpawner):
|
||||
if not name or name == getuser():
|
||||
# no setuid if no name
|
||||
return
|
||||
return super().make_preexec_fn(name)
|
||||
return set_user_setuid(name, chdir=False)
|
||||
|
||||
def start(self):
|
||||
"""Start the process"""
|
||||
|
Reference in New Issue
Block a user