C# Class Abstractions.Windows.Security

Show file Open project: MutonUfoAI/pgina

Public Methods

Method Description
GetNameFromSID ( System.Security.Principal.SecurityIdentifier sid ) : string
GetSIDFromName ( string name ) : System.Security.Principal.SecurityIdentifier
GetWellKnownName ( WellKnownSidType type ) : string
GetWellknownSID ( WellKnownSidType type ) : System.Security.Principal.SecurityIdentifier
RegSec ( pInvokes where, string keyname, string username ) : System.Boolean

apply registry security settings to user profiles

RemoveAccRuleFromUnknownUser ( string dir ) : System.Boolean

remove users who are unknown to the system from the directory acl

ReplaceDirectorySecurity ( string dir, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
ReplaceDirectorySecurity ( string dir, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
ReplaceFileSecurity ( string File, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
ReplaceFileSecurity ( string File, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
SetDirOwner ( string dir, IdentityReference Account ) : System.Boolean
SetDirOwner ( string dir, string Account ) : System.Boolean
SetDirectorySecurity ( string dir, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
SetDirectorySecurity ( string dir, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
SetRecDirAttrib ( DirectoryInfo dir, FileAttributes attrib ) : System.Boolean

apply recursive attribute to directories and files

Method Details

GetNameFromSID() public static method

public static GetNameFromSID ( System.Security.Principal.SecurityIdentifier sid ) : string
sid System.Security.Principal.SecurityIdentifier
return string

GetSIDFromName() public static method

public static GetSIDFromName ( string name ) : System.Security.Principal.SecurityIdentifier
name string
return System.Security.Principal.SecurityIdentifier

GetWellKnownName() public static method

public static GetWellKnownName ( WellKnownSidType type ) : string
type WellKnownSidType
return string

GetWellknownSID() public static method

public static GetWellknownSID ( WellKnownSidType type ) : System.Security.Principal.SecurityIdentifier
type WellKnownSidType
return System.Security.Principal.SecurityIdentifier

RegSec() public static method

apply registry security settings to user profiles
public static RegSec ( pInvokes where, string keyname, string username ) : System.Boolean
where Abstractions.WindowsApi.pInvokes
keyname string
username string
return System.Boolean

RemoveAccRuleFromUnknownUser() public static method

remove users who are unknown to the system from the directory acl
public static RemoveAccRuleFromUnknownUser ( string dir ) : System.Boolean
dir string
return System.Boolean

ReplaceDirectorySecurity() public static method

public static ReplaceDirectorySecurity ( string dir, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
dir string
Account System.Security.Principal.IdentityReference
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

ReplaceDirectorySecurity() public static method

public static ReplaceDirectorySecurity ( string dir, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
dir string
Account string
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

ReplaceFileSecurity() public static method

public static ReplaceFileSecurity ( string File, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
File string
Account System.Security.Principal.IdentityReference
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

ReplaceFileSecurity() public static method

public static ReplaceFileSecurity ( string File, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
File string
Account string
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

SetDirOwner() public static method

public static SetDirOwner ( string dir, IdentityReference Account ) : System.Boolean
dir string
Account System.Security.Principal.IdentityReference
return System.Boolean

SetDirOwner() public static method

public static SetDirOwner ( string dir, string Account ) : System.Boolean
dir string
Account string
return System.Boolean

SetDirectorySecurity() public static method

public static SetDirectorySecurity ( string dir, IdentityReference Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
dir string
Account System.Security.Principal.IdentityReference
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

SetDirectorySecurity() public static method

public static SetDirectorySecurity ( string dir, string Account, FileSystemRights Rights, AccessControlType ControlType, InheritanceFlags Inherit, PropagationFlags Propagation ) : System.Boolean
dir string
Account string
Rights FileSystemRights
ControlType AccessControlType
Inherit InheritanceFlags
Propagation PropagationFlags
return System.Boolean

SetRecDirAttrib() public static method

apply recursive attribute to directories and files
public static SetRecDirAttrib ( DirectoryInfo dir, FileAttributes attrib ) : System.Boolean
dir System.IO.DirectoryInfo
attrib FileAttributes
return System.Boolean