当前位置:首页 科普知识 SECURITY

SECURITY

发布时间:2023-09-05 00:02:58

SECURITY_ATTRIBUTES,结构包含一个对象的安全描述符,并指定检索到指定这个结构的句柄是否是可继承的。

SECURITY详细介绍

SECURITY_ATTRIBUTES,结构包含一个对象的安全描述符,并指定检索到指定这个结构的句柄是否是可继承的。

SECURITY

SECURITY_ATTRIBUTES简介

这个结构为很多函数创建对象时提供安全性设置。如:CreateFile,CreatePipe,CreateProcess,RegCreateKeyEx,RegSaveKeyEx。

typedef struct _SECURITY_ATTRIBUTES {

DWORD nLength; / /结构体的大小,可用SIZEOF取得

LPVOID lpSecurityDescriptor; / /安全描述符

BOOL bInheritHandle ;/ /安全描述的对象能否被新创建的进程继承

SECURITY

} SECURITY_ATTRIBUTES,* PSECURITY_ATTRIBUTES;

SECURITY_ATTRIBUTESn长度

The size, in bytes, of this structure. Set this value to the size of the SECURITY_ATTRIBUTES structure.

为了方便以后对API可能的修改,这个参数定义了整个SECURITY_ATTRIBUTES的结构所占字节数。通常只需要写sizeof("SECURITY_ATTRIBUTES")

SECURITY_ATTRIBUTES描述

lpSecurityDescriptor

A pointer to a security descriptor for the object that controls the sharing of it. If NULL is specified for this member, the object is assigned the default security descriptor of the calling process. This is not the same as granting access to everyone by assigning a NULL discretionary access control list (DACL). The default security descriptor is based on the default DACL of the access token belonging to the calling process. By default, the default DACL in the access token of a process allows access only to the user represented by the access token. If other users must access the object, you can either create a security descriptor with the appropriate access, or add ACEs to the DACL that grants access to a group of users.

Windows Me/98/95: The lpSecurityDescriptor member of this structure is ignored.

SECURITY

SECURITY_ATTRIBUTES操作

A Boolean value that specifies whether the returned handle is inherited when a new process is created. If this member is TRUE, the new process inherits the handle.

SECURITY_ATTRIBUTES资格

Windows NT/2000/XP:Included in Windows NT 3.1 and later.

Header:Declared in Winbase.h; include Windows.h.

转:MSDN

温馨提示:
本文【SECURITY】由作者 爱百科 转载提供。 该文观点仅代表作者本人, 自学教育网 信息发布平台,仅提供信息存储空间服务, 若存在侵权问题,请及时联系管理员或作者进行删除。
(c)2008-2025 自学教育网 All Rights Reserved 汕头市灵创科技有限公司
粤ICP备2024240640号-6