共用方式為


安全性實體物件

安全性實體物件是可以具有 安全性描述元的物件。 所有具名 Windows 物件都是安全性實體。 某些未命名的物件,例如 進程 和線程物件,也可以有安全性描述元。 對於大多數安全性實體物件,您可以在建立物件的函式呼叫中指定物件的 安全性描述元。 例如,您可以在 CreateFile CreateProcess 函式中指定安全性描述元。

此外,Windows 安全性函式可讓您取得和設定在 Windows 以外的作系統上建立之安全性實體物件的安全性資訊。 Windows 安全性函式也支援搭配使用具有私用、應用程式定義物件的安全性描述元。 如需私人安全性實體物件的詳細資訊,請參閱 用戶端/伺服器存取控制

每種安全性實體物件類型都會定義自己的一組特定 訪問許可權,以及其本身 一般訪問許可權的對應。 如需每種安全性實體物件類型之特定和一般訪問許可權的相關信息,請參閱該類型物件的概觀。

下表顯示用來作某些常見安全性實體物件之安全性資訊的函式。

物件類型 安全性描述元函式
NTFS 檔案系統上的檔案或目錄 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
命名管道
匿名管道
GetSecurityInfoSetSecurityInfo
進程
線程
GetSecurityInfoSetSecurityInfo
檔案對應物件 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
存取令牌 SetKernelObjectSecurityGetKernelObjectSecurity
視窗管理物件(視窗站臺桌面 GetSecurityInfoSetSecurityInfo
登錄機碼 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
Windows 服務 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
本機或遠端印表機 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
網路共用 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
行程間同步處理物件(事件、mutex、號誌和可等候定時器) GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
Job 物件 GetNamedSecurityInfoSetNamedSecurityInfoGetSecurityInfoSetSecurityInfo
目錄服務物件 這些物件是由 Active Directory 對象處理。 如需詳細資訊,請參閱 Active Directory 服務介面