# ProcessIdentityBinding

`import { ProcessIdentityBinding } from "destack:process/binding";`

Identity binding family.

```ds title="ProcessIdentityBinding"
export interface ProcessIdentityBinding {
    getProcessId(): Result<ProcessId, HostError>;
    getParentProcessId(): Result<ProcessId, HostError>;
    getUid(): Result<UserId, HostError>;
    getGid(): Result<GroupId, HostError>;
    getEffectiveUid(): Result<UserId, HostError>;
    getEffectiveGid(): Result<GroupId, HostError>;
    getUserIds(): Result<ProcessUserIds, HostError>;
    getGroupIds(): Result<ProcessGroupIds, HostError>;
    setUid(userId: UserId): Result<void, HostError>;
    setEffectiveUid(userId: UserId): Result<void, HostError>;
    setGid(groupId: GroupId): Result<void, HostError>;
    setEffectiveGid(groupId: GroupId): Result<void, HostError>;
    setUserIds(ids: ProcessUserIds): Result<void, HostError>;
    setGroupIds(ids: ProcessGroupIds): Result<void, HostError>;
    listSupplementaryGroups(): Result<GroupId[], HostError>;
    setSupplementaryGroups(groups: &'a readonly [GroupId]): Result<void, HostError>;
}
```

[language/library/src/process/binding/identity.ds:34:178](https://github.com/destack-sh/destack/blob/main/language/library/src/process/binding/identity.ds#L34-L178)

## Members

### `getProcessId(): Result<ProcessId, HostError>`

Return the current process id.

### `getParentProcessId(): Result<ProcessId, HostError>`

Return the parent process id.

### `getUid(): Result<UserId, HostError>`

Return the current user identifier.

### `getGid(): Result<GroupId, HostError>`

Return the current group identifier.

### `getEffectiveUid(): Result<UserId, HostError>`

Return the effective user identifier.

### `getEffectiveGid(): Result<GroupId, HostError>`

Return the effective group identifier.

### `getUserIds(): Result<ProcessUserIds, HostError>`

Return real, effective, and saved-set user identifiers.

### `getGroupIds(): Result<ProcessGroupIds, HostError>`

Return real, effective, and saved-set group identifiers.

### `setUid(userId: UserId): Result<void, HostError>`

Set the user identifier through host `setuid` behavior.

### `setEffectiveUid(userId: UserId): Result<void, HostError>`

Set the effective user identifier only.

### `setGid(groupId: GroupId): Result<void, HostError>`

Set the group identifier through host `setgid` behavior.

### `setEffectiveGid(groupId: GroupId): Result<void, HostError>`

Set the effective group identifier only.

### `setUserIds(ids: ProcessUserIds): Result<void, HostError>`

Set real, effective, and saved-set user identifiers together.

### `setGroupIds(ids: ProcessGroupIds): Result<void, HostError>`

Set real, effective, and saved-set group identifiers together.

### `listSupplementaryGroups(): Result<GroupId[], HostError>`

Return supplementary group identifiers.

### `setSupplementaryGroups(groups: &'a readonly [GroupId]): Result<void, HostError>`

Set supplementary group identifiers.
