Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix issue #1 - Use Process uid to get the current user #2

Merged
merged 1 commit into from

2 participants

@garnieretienne

Use 'Etc.getpwuid' and 'Process.uid' instead of 'Etc.getlogin' to get the current user name. (issue #1)

@rkistner rkistner merged commit acfd1fa into from
@rkistner
Owner

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 30, 2013
  1. @garnieretienne
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/foreman_god/god_config.rb
View
2  lib/foreman_god/god_config.rb
@@ -143,7 +143,7 @@ def watch_process(name, process, n)
w.start = wrap_command(process.expanded_command(env))
# Only set the uid if the user is different from the current user
- if user_name && (Etc.getlogin != user_name)
+ if user_name && (Etc.getpwuid(Process.uid).name != user_name)
w.uid = user_name
w.gid = group_name
end
Something went wrong with that request. Please try again.