maybe_drop_privileges
Change process privileges to new user/group.
If UID and GID is specified, the real user/group is changed.
If only UID is specified, the real user is changed, and the group is
changed to the users primary group.
If only GID is specified, only the group is changed.
def maybe_drop_privileges(
uid: string|int|null = None,
gid: string|int|null = None
) - > null
Change process privileges to new user/group. If UID and GID is specified, the real user/group is changed. If only UID is specified, the real user is changed, and the group is changed to the users primary group. If only GID is specified, only the group is changed.
Parameters
| Name | Type | Description |
|---|---|---|
| uid | `string | int |
| gid | `string | int |
Returns
| Type | Description |
|---|---|
null | Nothing is returned; the process identity is modified in-place. |