-
Notifications
You must be signed in to change notification settings - Fork 163
Improved restricted shell messages #4511
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
Improved restricted shell messages #4511
Conversation
Defining two new variables that can be defined in `nginx_stage.yml` for better customization of error messages that appear when blocking a user by a restricted shell.
Added a conditional for hiding the stderr nginx_stage help message.
Use the custom or default disabled shell message defined either in nginx_stage.yml or in configuration.rb
|
My guess is tests will fail because you need to add these to the example template file: https://github.com/OSC/ondemand/blob/master/nginx_stage/share/nginx_stage_example.yml (we run tests to be sure that any configuration is also listed in this example config) |
| self.min_uid = 1000 | ||
| self.disabled_shell = '/access/denied' | ||
| self.disabled_shell_message = 'user has a disabled shell: %s' | ||
| self.disable_nginx_stage_help_message = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like double negatives here. Instead of disable set to false can we have just nginx_stage_help_message set to true?
Or maybe it's show_nginx_stage_help_message set to true?
It's just the double negatives that make it hard to understand at a glance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. I like the show_nginx_stage_help_message = true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, this should be updated.
I'll get this fixed too. |
Got rid of the double negative.
Got rid of the double negative
Added the new options to the example config.
Okay, I've added this as well. |
Add documentation for two new nginx_stage options per a recent commit - OSC/ondemand#4511
) Add documentation for two new nginx_stage options per a recent commit - OSC/ondemand#4511
This PR adds two new configuration items in
/etc/ood/config/nginx_stage.yml.Most folks running OOD would never need to worry about this. But this is helpful for those who do need to configure
disabled_shell.With the current installation, and the new installation, here is what is shown when a user has a disabled_shell.
When
disable_nginx_stage_help_message: trueinnginx_stage.yml:# /opt/ood/nginx_stage/sbin/nginx_stage pun --user username user has disabled shell: usernameSecond line is hidden.
When
disabled_shell_message: 'this is a test':