class Falcon::Service::Virtual

def assume_privileges(path)

@parameter path [String] The path to the application directory.
Drop privileges according to the user and group of the specified path.
def assume_privileges(path)
	stat = File.stat(path)
	
	Process::GID.change_privilege(stat.gid)
	Process::UID.change_privilege(stat.uid)
	
	home = Etc.getpwuid(stat.uid).dir
	
	return {
		'HOME' => home,
	}
end