检索指定 DFS 命名空间的根对象的安全描述符。
语法
NET_API_STATUS NET_API_FUNCTION NetDfsGetSecurity(
[in] LPWSTR DfsEntryPath,
[in] SECURITY_INFORMATION SecurityInformation,
[out] PSECURITY_DESCRIPTOR *ppSecurityDescriptor,
[out] LPDWORD lpcbSecurityDescriptor
);
参数
[in] DfsEntryPath
指向指定通用命名约定 (UNC) DFS 命名空间根路径的字符串的指针。
字符串可以是两种形式之一。 第一种形式如下所示:
\\ ServerName\DfsName
其中 ,ServerName 是托管独立 DFS 命名空间的根目标服务器的名称, Dfsname 是 DFS 命名空间的名称。
第二种形式如下所示:
\\ DomainName\DomDfsName
其中 ,DomainName 是托管基于域的 DFS 命名空间的域的名称, DomDfsName 是 DFS 命名空间的名称。
[in] SecurityInformation
SECURITY_INFORMATION 结构,其中包含指示要从根对象检索的安全信息类型的位标志。
[out] ppSecurityDescriptor
指向包含 SecurityInformation 参数中请求的安全项的SECURITY_DESCRIPTOR结构列表的指针。
[out] lpcbSecurityDescriptor
ppSecurityDescriptor 指向的缓冲区的大小(以字节为单位)。
返回值
如果函数成功,则返回值 NERR_Success。
如果函数失败,则返回值为系统错误代码。 有关错误代码的列表,请参阅 系统错误代码。
注解
对于基于域的 DFS 命名空间,安全描述符是从 Active Directory 中的“CN=DomDfsName,CN=DFS-Configuration,CN=System,DC=domain”对象中从主域控制器 (PDC) 托管 DFS 命名空间的域检索,其中 DomDfsName 是基于域的 DFS 命名空间的名称, <domain> 是托管命名空间的 Active Directory 域的可分辨名称。
对于独立根,安全描述符是从 HKLM\Software\Microsoft\Dfs\独立\<根名称> 注册表项指定的 对象中检索的。
要求
| 要求 | 值 |
|---|---|
| 最低受支持的客户端 | Windows Vista |
| 最低受支持的服务器 | Windows Server 2008、Windows Server 2008 |
| 目标平台 | Windows |
| 标头 | lmdfs.h (包括 LmDfs.h、Lm.h) |
| Library | Netapi32.lib |
| DLL | Netapi32.dll |