Privilege module

Privilege module.

Control judge privileges.

Privilege.JUDGE_UID

int

UID of judge account.

Privilege.JUDGE_GID

int

GID of judge account.

Privilege.NOBODY_YID

int

UID of nobody account.

Privilege.NOBODY_GID

int

GID of nobody account.

Privilege.drop(uid, gid)[source]

Drop privilege.

Parameters:
  • uid (int) – UID to set.
  • gid (int) – GID to set.
Returns:

None

Privilege.fileaccess()[source]

File access contextmanager.

Privilege.fullaccess()[source]

Full access contextmanager.

Privilege.init()[source]

Initialize the module.