chef-cookbooks / runit

Development repository for the Chef Runit Cookbook
https://supermarket.chef.io/cookbooks/runit
Apache License 2.0
107 stars 197 forks source link

Preserve system PATH variable for init script. #237

Closed rhass closed 6 years ago

rhass commented 6 years ago

Description

This prevents the init scripts from overwriting the PATH environment variable when this is called. This fixes issues with omnibus applications where the path is outside of the hard-coded value.

Issues Resolved

Internal issue SUSTAIN-985

Check List

markan commented 6 years ago

It's traditional to hardcode paths in init scripts run as root (instead of inheriting the PATH from the parent process) because that controls the opportunities for abuse. This is mitigated because we're inheriting the path from the runit supervisor, which should be relatively controlled.

I agree there needs to be some way to inject the PATH for apps that aren't in that very restrictive hardcoded path, but I wonder if we want another approach. (configurable in the resource maybe?) @tas50 @lamont-granquist Thoughts?

rhass commented 6 years ago

I am going to close this in favor of scoping this change to just chef-server to fix the ctl commands.