Skip to content
This repository has been archived by the owner on Aug 31, 2020. It is now read-only.

Commit

Permalink
Merge pull request #2 from garnieretienne/master
Browse files Browse the repository at this point in the history
Fix issue #1 - Use Process uid to get the current user
  • Loading branch information
rkistner committed Jan 31, 2013
2 parents 7e7f97b + 874d7e0 commit acfd1fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/foreman_god/god_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit acfd1fa

Please sign in to comment.