Permalink
Browse files

Ignore errors in initgroups. Some systems are broken.

  • Loading branch information...
1 parent 459e2a5 commit f4e4e229fc0266b57e13b2116cf89e1a1ca4ee6b @FooBarWidget FooBarWidget committed May 17, 2008
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/passenger/application_spawner.rb
@@ -226,7 +226,10 @@ def switch_to_user(user)
if uid == ROOT_UID
return false
else
- Process.groups = Process.initgroups(username, gid)
+ # Some systems are broken. initgroups can fail because of
+ # all kinds of stupid reasons. So we ignore any errors
+ # raised by initgroups.
+ Process.groups = Process.initgroups(username, gid) rescue nil
Process::Sys.setgid(gid)
Process::Sys.setuid(uid)
return true

0 comments on commit f4e4e22

Please sign in to comment.