def DropPrivileges():
  """Attempt to drop privileges if required."""
  if config_lib.CONFIG["Server.username"]:
    try:
      os.setuid(pwd.getpwnam(config_lib.CONFIG["Server.username"]).pw_uid)
    except (KeyError, __HOLE__):
      logging.exception("Unable to switch to user %s",
                        config_lib.CONFIG["Server.username"])
      raise
dataset/ETHPy150Open google/grr/grr/lib/startup.py/DropPrivileges