JOBOBJECT_SECURITY_LIMIT_INFORMATION

[This is preliminary documentation and subject to change.]

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 object. This member can be one or more of the following values.
Value Meaning
JOB_OBJECT_SECURITY_NO_ADMIN Prevents any process in the job object from using a token that specifies the local administrators group.
JOB_OBJECT_SECURITY_RESTRICTED_TOKEN Prevents any process in the job object from using a token that was not created with the CreateRestrictedToken function.
JOB_OBJECT_SECURITY_ONLY_TOKEN Forces processes in the job object 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 object, they cannot be revoked.

To retrieve the token for a job object, use the OpenJobObjectToken function.

QuickInfo

  Windows NT: Requires version 5.0 or later.
  Windows: Unsupported.
  Windows CE: Unsupported.
  Header: Declared in winnt.h.

See Also

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