Changeset 760

Show
Ignore:
Timestamp:
10/26/07 03:00:27 (10 months ago)
Author:
evanweaver
Message:

sometimes no patch is better than any patch :(

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tags/rel_1-0-2/lib/mongrel/configurator.rb

    r759 r760  
    5959        target_gid = Etc.getgrnam(group).gid if group 
    6060 
    61         if group and user and (uid != target_uid or gid != target_gid) 
     61        if uid != target_uid or gid != target_gid 
    6262          log "Initiating groups for #{user.inspect}:#{group.inspect}." 
    6363          Process.initgroups(user, target_id) 
    64         end 
    6564         
    66         if group and gid != target_gid 
    67             log "Changing group to #{group.inspect}." 
    68             Process::GID.change_privilege(target_gid) 
    69         end 
    70  
    71         if user and uid != target_uid 
    72           if Etc.getpwnam(user).uid != Process.euid 
    73             log "Changing user to #{user.inspect}."  
    74             Process::UID.change_privilege(target_uid) 
    75           end 
     65          log "Changing group to #{group.inspect}." 
     66          Process::GID.change_privilege(target_gid) 
     67 
     68          log "Changing user to #{user.inspect}."  
     69          Process::UID.change_privilege(target_uid) 
    7670        end 
    7771      rescue Errno::EPERM => e