Platform SDK: DLLs, Processes, and Threads

JOBOBJECT_SECURITY_LIMIT_INFORMATION

The JOBOBJECT_SECURITY_LIMIT_INFORMATION structure contains the security limitations for a job object.

typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
    DWORD SecurityLimitFlags ;
    HANDLE JobToken ;
    PTOKEN_GROUPS SidsToDisable ;
    PTOKEN_PRIVILEGES PrivilegesToDelete ;
    PTOKEN_GROUPS RestrictedSids ;
} JOBOBJECT_SECURITY_LIMIT_INFORMATION, *PJOBOBJECT_SECURITY_LIMIT_INFORMATION ;

Members

SecurityLimitFlags
Specifies the security limitations for the job. This member can be one or more of the following values.
Value Meaning
JOB_OBJECT_SECURITY_NO_ADMIN Prevents any process in the job from using a token that specifies the local administrators group.
JOB_OBJECT_SECURITY_RESTRICTED_TOKEN Prevents any process in the job from using a token that was not created with the CreateRestrictedToken function.
JOB_OBJECT_SECURITY_ONLY_TOKEN Forces processes in the job to run under a specific token. Requires a token handle in the JobToken member.
JOB_OBJECT_SECURITY_FILTER_TOKENS Applies a filter to the token when a process impersonates a client. Requires at least one of the following members to be set: SidsToDisable, PrivilegesToDelete, or RestrictedSids.

JobToken
Handle to a primary token that represents a user. The handle must have TOKEN_ASSIGN_PRIMARY access.

If the token was created with CreateRestrictedToken, all processes in the job are limited to that token or a further restricted token. Otherwise, the caller must have the SE_ASSIGNPRIMARYTOKEN_NAME privilege.

SidsToDisable
Pointer to a TOKEN_GROUPS structure that specifies the SIDs to disable for access checking, if SecurityLimitFlags is JOB_OBJECT_SECURITY_FILTER_TOKENS.

This member can be NULL if you do not want to disable any SIDs.

PrivilegesToDelete
Pointer to a TOKEN_PRIVILEGES structure that specifies the privileges to delete from the token, if SecurityLimitFlags is JOB_OBJECT_SECURITY_FILTER_TOKENS.

This member can be NULL if you do not want to delete any privileges.

RestrictedSids
Pointer to a TOKEN_GROUPS structure that specifies the deny-only SIDs that will be added to the access token, if SecurityLimitFlags is JOB_OBJECT_SECURITY_FILTER_TOKENS.

This member can be NULL if you do not want to specify any deny-only SIDs.

Remarks

After security limitations are placed on processes in a job, they cannot be revoked.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Windows 95/98: Unsupported.
  Header: Declared in Winnt.h; include Windows.h.

See Also

Processes and Threads Overview, Process and Thread Structures, CreateRestrictedToken, QueryInformationJobObject, SetInformationJobObject, TOKEN_GROUPS, TOKEN_PRIVILEGES