Privilege module

Privilege module.

Control judge privileges.

Privilege.JUDGE_UID

UID of judge account.

Type

int

Privilege.JUDGE_GID

GID of judge account.

Type

int

Privilege.NOBODY_YID

UID of nobody account.

Type

int

Privilege.NOBODY_GID

GID of nobody account.

Type

int

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.