qdzhulf
驱动牛犊
驱动牛犊
  • 注册日期2005-03-28
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望3点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:2458回复:3

FileDisk中,SeCreateClientSecurity()函数是做什么用的阿??

楼主#
更多 发布于:2005-07-05 15:47
  FileDisk中,
有几个Se开头的函数,SeCreateClientSecurity()、SeImpersonateClient()、SeTokenType()
我在微软的msdn中找不到这些函数的说明
哪位有这几个相关函数的文档阿?
不胜感激

ABC里面每人回答,只好转到这里来了,希望高人能够帮忙啊
tooflat
论坛版主
论坛版主
  • 注册日期2002-07-08
  • 最后登录2014-03-11
  • 粉丝2
  • 关注0
  • 积分1007分
  • 威望551点
  • 贡献值3点
  • 好评度476点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-07-06 13:14
打开网络上的文件所需要的,

SeCreateClientSecurity
The SeCreateClientSecurity routine initializes a security client context structure with the information needed to call SeImpersonateClientEx.

NTSTATUS
  SeCreateClientSecurity(
    IN PETHREAD  ClientThread,
    IN PSECURITY_QUALITY_OF_SERVICE  ClientSecurityQos,
    IN BOOLEAN  ServerIsRemote,
    OUT PSECURITY_CLIENT_CONTEXT  ClientContext
    );
Parameters
ClientThread
Pointer to the thread of the client to be impersonated.
ClientSecurityQos
Pointer to a caller-allocated SECURITY_QUALITY_OF_SERVICE structure indicating what form of impersonation is to be performed.
ServerIsRemote
Set to TRUE if the server of the client's request is remote.
ClientContext
Pointer to a caller-allocated SECURITY_CLIENT_CONTEXT structure to be initialized.
Headers
Declared in ntifs.h. Include ntifs.h.

Return Value
STATUS_SUCCESS
The security client context was successfully initialized.
STATUS_BAD_IMPERSONATION_LEVEL
The client to be impersonated is currently impersonating a client of its own, and one of the following is true:
The client's effective token can not be passed on for use by another server, because its impersonation level is SecurityAnonymous or SecurityIdentification.
ServerIsRemote is TRUE, and the client thread is impersonating its client at other than SecurityDelegation level.
Comments
SeCreateClientSecurity initializes a client security context block to represent a client's security context.

If the ContextTrackingMode member of ClientSecurityQos is set to SECURITY_DYNAMIC_TRACKING and ServerIsRemote is set to FALSE, SeCreateClientSecurity uses a reference to the client's effective token. Otherwise, SeCreateClientSecurity creates a copy of the client's token.

Each call to SeCreateClientSecurity must be matched by a subsequent call to SeDeleteClientSecurity.

For more information on security and access control, see the documentation on these topics in the Platform SDK.

Callers of SeCreateClientSecurity must be running at IRQL PASSIVE_LEVEL.

See Also
SeDeleteClientSecurity, SeImpersonateClientEx

Built on Wednesday, January 15, 2003

SeImpersonateClientEx
The SeImpersonateClientEx routine causes a thread to impersonate a user.

NTSTATUS
  SeImpersonateClientEx(
    IN PSECURITY_CLIENT_CONTEXT  ClientContext,
    IN PETHREAD  ServerThread  OPTIONAL
    );
Parameters
ClientContext
Pointer to the user's security client context.
ServerThread
Pointer to the thread that is to impersonate the user. If not specified, the calling thread is used.
Headers
Declared in ntifs.h. Include ntifs.h.

Return Value
STATUS_SUCCESS
The impersonation attempt succeeded.
STATUS_ACCESS_DENIED
The thread specified in ServerThread did not have sufficient access rights to impersonate the user whose security client context is specified in ClientContext.
STATUS_NO_MEMORY
SeImpersonateClientEx encountered a pool allocation failure when allocating memory for the impersonation information structure.
Comments
This routine is available on Microsoft? Windows? 2000 and later.

SeImpersonateClientEx is used to cause a thread to impersonate a user. The client security context in ClientContext is assumed to be up to date.

For more information on security and access control, see the documentation on these topics in the Platform SDK.

Callers of SeImpersonateClientEx must be running at IRQL PASSIVE_LEVEL.

See Also
SeCreateClientSecurity, SeCreateClientSecurityFromSubjectContext

Built on Wednesday, January 15, 2003

SeTokenType
This routine is reserved for system use. See SeQueryInformationToken.

Built on Wednesday, January 15, 2003
qdzhulf
驱动牛犊
驱动牛犊
  • 注册日期2005-03-28
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望3点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2005-07-06 16:16
终于有老大回复了
多谢!
qdzhulf
驱动牛犊
驱动牛犊
  • 注册日期2005-03-28
  • 最后登录2016-01-09
  • 粉丝0
  • 关注0
  • 积分13分
  • 威望3点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
地板#
发布于:2005-07-06 16:21
多谢!
这种资料太少了,网上都搜不到
游客

返回顶部