Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't set empty values for HOME, SHELL #228

Merged
merged 1 commit into from
Apr 12, 2015

Conversation

minrk
Copy link
Member

@minrk minrk commented Apr 12, 2015

in weird cases (probably misconfigured systems), these can be empty strings. Leave them unset in such cases.

@ellisonbg
Copy link
Contributor

So if the user doesn't have a default shell set, this will simply not do the export of SHELL and let the system pick (which will be sh it looks like).

env['HOME'] = home
shell = pwd.getpwnam(self.user.name).pw_shell
if shell:
env['SHELL'] = shell
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a comment in the code for future readers, indicating that why setting an empty SHELL is problematic.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

comment added

in weird cases (probably misconfigured systems),
these can be empty strings.
Leave them unset in such cases.
ellisonbg added a commit that referenced this pull request Apr 12, 2015
don't set empty values for HOME, SHELL
@ellisonbg ellisonbg merged commit bdbb616 into jupyterhub:master Apr 12, 2015
consideRatio pushed a commit to consideRatio/jupyterhub that referenced this pull request Feb 19, 2018
@minrk minrk deleted the no-empty-shell branch February 23, 2018 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants