# File ../../auditor/lib/kasp_auditor.rb, line 390
    def change_privilege(user, group)
      return if !user && !group
      begin
        uid, gid = Process.euid, Process.egid
        target_uid = Etc.getpwnam((user+"").untaint).uid if user
        target_gid = Etc.getgrnam((group+"").untaint).gid if group

        if uid != target_uid or gid != target_gid
          Process.initgroups(user, target_gid) if target_gid

          Process::GID.change_privilege(target_gid) if target_gid

          Process::UID.change_privilege(target_uid) if target_uid
        end
      rescue Exception => e
        KASPAuditor.exit("Couldn't set User, Group to #{user.inspect}, #{group.inspect} : (#{e})", 1)
      end
    end