Desktop Functions: Smart Device Functions:
|
Search Results for "Tyde" in [All]mqrt
, IntPtr pSecurityDescriptor
, IntPtr pSecurityDescriptor
byte[] securityDescriptor;
securityDescriptor = new byte[length];
GCHandle hSD = GCHandle.Alloc(securityDescriptor, GCHandleType.Pinned);
string message = "There was an error calling MQGetQueueSecurity to read the SecurityDescriptor."
//owner = getSecurityDescriptorOwnerName(securityDescriptor);
, IntPtr pSecurityDescriptor
, IntPtr pSecurityDescriptor
, IntPtr pSecurityDescriptor
//Call advapi32!InitializeSecurityDescriptor()
//Call advapi32!SetSecurityDescriptorOwner() netapi32
aObjectAttributes.SecurityDescriptor = IntPtr.Zero; Constants4: WINBASE
private const uint SECURITY_DELEGATION = ((uint)SECURITY_IMPERSONATION_LEVEL.SecurityDelegation << 16); httpapi
void FreeURL(string networkURL, string securityDescriptor)
HTTP_SERVICE_CONFIG_URLACL_PARAM urlAclParam = new HTTP_SERVICE_CONFIG_URLACL_PARAM(securityDescriptor);
void ReserveURL(string networkURL, string securityDescriptor)
HTTP_SERVICE_CONFIG_URLACL_PARAM paramDesc = new HTTP_SERVICE_CONFIG_URLACL_PARAM(securityDescriptor); ntdll7: NtCreateFile
public IntPtr SecurityDescriptor;
objAttributes.SecurityDescriptor = IntPtr.Zero; Structures
public string pStringSecurityDescriptor;
public HTTP_SERVICE_CONFIG_URLACL_PARAM(string securityDescriptor)
pStringSecurityDescriptor = securityDescriptor;
Public pStringSecurityDescriptor As String
Public Sub New(ByVal stringSecurityDescriptor As String)
pStringSecurityDescriptor = StringSecurityDescriptor
public IntPtr SecurityDescriptor;
Dim SecurityDescriptor As IntPtr
Public SecurityDescriptor As IntPtr
SecurityDescriptor = IntPtr.Zero
public IntPtr SecurityDescriptor;
SecurityDescriptor = IntPtr.Zero; 11: PRINTER_INFO_2
public IntPtr pSecurityDescriptor;
Public pSecurityDescriptor As IntPtr
public unsafe byte* lpSecurityDescriptor;
public IntPtr lpSecurityDescriptor;
Public lpSecurityDescriptor As IntPtr
public IntPtr lpSecurityDescriptor;
byte[] src = security.GetSecurityDescriptorBinaryForm();
lpSecurityAttributes.lpSecurityDescriptor = dest; user3213: CreateWindow
private IntPtr mSecurityDescriptor;
mSecurityDescriptor = IntPtr.Zero;
public IntPtr SecurityDescriptor
get { return mSecurityDescriptor; }
set { mSecurityDescriptor = value; } Interfaces
public uint lpSecurityDescriptor; 15: IFileSaveDialog
// Not currently supported: IPropertyDescriptionList
public interface _ZoneSecurityDemo
[ProgId("IEZoneSecurity.ZoneSecurityDemo")]
public class ZoneSecurityDemo : System.Windows.Forms.Control, _ZoneSecurityDemo
MyObject = new ActiveXObject("IEZoneSecurity.ZoneSecurityDemo"); 17: IObjectSafety
public class IObjectSafetyDemo : IObjectSafety 18: IShellItemArray
void GetPropertyDescriptionList ( [In] ref NativeMethods.PROPERTYKEY keyType, [In] ref Guid riid, out IntPtr ppv );
Function GetPropertyDescriptionList(<[In]()> keyType As PROPERTYKEY, <[In]()> riid As Guid, ByRef ppv As IntPtr) As Integer coredll19: CreateProcess
public IntPtr lpSecurityDescriptor; 20: RegQueryInfoKey
out uint lpcbMaxValueLen, IntPtr lpSecurityDescriptor, IntPtr lpftLastWriteTime); kernel3221: CreateMutex
public static extern bool SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR securityDescriptor, bool daclPresent, IntPtr dacl, bool daclDefaulted);
public static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR securityDescriptor, uint dwRevision);
public IntPtr lpSecurityDescriptor;
IntPtr securityDescPtr = new IntPtr( 0 );
Native.SECURITY_DESCRIPTOR securityDesc;
worked = Native.InitializeSecurityDescriptor( out securityDesc, SdRevisionLevel );
worked = Native.SetSecurityDescriptorDacl(ref securityDesc, true, IntPtr.Zero, false);
securityDescPtr = Marshal.AllocCoTaskMem( Marshal.SizeOf( securityDesc ) );
Marshal.StructureToPtr( securityDesc, securityDescPtr, false );
secAttribs.lpSecurityDescriptor = securityDescPtr;
if( securityDescPtr != IntPtr.Zero )
Marshal.FreeCoTaskMem( securityDescPtr ); 22: CreateNamedPipe
IntPtr pipeSecurityDescriptor // SD 23: IsProcessInJob
public IntPtr pSecurityDescriptor; //хз))
this.pSecurityDescriptor = IntPtr.Zero; Enums24: NtStatus
InvalidSecurityDescr = 0xc0000079,
SecurityDelegation
SecurityDelegation rapi
public long lpSecurityDescriptor; advapi32
static extern TODO ConvertSecurityDescriptorToStringSecurityDescriptor(TODO);
Declare Unicode Function ConvertSecurityDescriptorToStringSecurityDescriptor Lib "advapi32.dll" Alias "ConvertSecurityDescriptorToStringSecurityDescriptorW" (SD As IntPtr, SDRevision As Integer, SecurityInfo As SECURITY_INFORMATION, ByRef StringSD As IntPtr, StringSDLength As IntPtr) As Boolean
static extern bool ConvertStringSecurityDescriptorToSecurityDescriptor(;
string StringSecurityDescriptor,
out IntPtr SecurityDescriptor,
out UIntPtr SecurityDescriptorSize
Declare Function ConvertStringSecurityDescriptorToSecurityDescriptor Lib "advapi32.dll" (TODO) As TODO
ManagementBaseObject inParams1 = UserObject.GetMethodParameters("GetSecurityDescriptor");
ManagementBaseObject outParams1 = UserObject.InvokeMethod("GetSecurityDescriptor", inParams1, null);
inParams["SecurityDescriptor"] = Descriptor;
#region SecurtyDescriptor 31: GetAce
static extern bool GetSecurityDescriptorDacl(
IntPtr pSecurityDescriptor,
GetSecurityDescriptorDacl(shareInfo.shi502_security_descriptor, out bDaclPresent, ref pAcl, out bDaclDefaulted);
out IntPtr pSecurityDescriptor);
ByRef pSecurityDescriptor As IntPtr) As Integer
public static extern Int32 GetSecurityDescriptorLength(IntPtr pSecurityDescriptor);
Declare Function GetSecurityDescriptorLength Lib "advapi32.dll" (TODO) As TODO 34: GetSecurityInfo
out IntPtr pSecurityDescriptor);
out IntPtr securityDescriptor);
IntPtr securityDescriptor = IntPtr.Zero;
returnValue = GetSecurityInfo(fileStream.Handle, SE_OBJECT_TYPE.SE_FILE_OBJECT, SECURITY_INFORMATION.OWNER_SECURITY_INFORMATION | SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, out ownerSid, out groupSid, out dacl, out sacl, out securityDescriptor);
LocalFree(securityDescriptor);
static extern bool InitializeSecurityDescriptor(out SECURITY_DESCRIPTOR SecurityDescriptor, uint dwRevision);
Private Shared Function InitializeSecurityDescriptor(ByRef SecurityDescriptor As SECURITY_DESCRIPTOR, dwRevision As UInteger) As Boolean SECURITY_DESCRIPTOR securityDesc = new SECURITY_DESCRIPTOR(); InitializeSecurityDescriptor(out securityDesc, 1); SetSecurityDescriptorDacl(ref securityDesc, true, IntPtr.Zero, false);
internal IntPtr SecurityDescriptor;
lsaAttr.SecurityDescriptor = IntPtr.Zero; 37: LsaLookupSids
internal IntPtr SecurityDescriptor;
lsaAttr.SecurityDescriptor = IntPtr.Zero; 38: LsaOpenPolicy
aObjectAttributes.SecurityDescriptor = IntPtr.Zero;
ObjectAttributes.SecurityDescriptor = IntPtr.Zero;
public IntPtr SecurityDescriptor;
public IntPtr SecurityDescriptor;
objectAttributes.SecurityDescriptor = IntPtr.Zero; New in .NET v2.0: Security.AccessControl namespace, including gems to manipulate DACLs in raw (binary) form. So rather than using a ref SECURITY_DESCRIPTOR I'd advocate using a byte[] and RawSecurityDescriptor(byte[], 0). See sample code below.
RawSecurityDescriptor rsd = new RawSecurityDescriptor(psd, 0);
out SECURITY_DESCRIPTOR pSecurityDescriptor,
ref UInt32 lpcbSecurityDescriptor);
ref SECURITY_DESCRIPTOR pSecurityDescriptor);
SecurityDelegation
SecurityDelegation SecurityDelegation
static extern bool SetSecurityDescriptorDacl(ref SECURITY_DESCRIPTOR sd, bool daclPresent, IntPtr dacl, bool daclDefaulted); <DllImportAttribute("advapi32.dll", EntryPoint:="SetSecurityDescriptorDacl")> Private Shared Function SetSecurityDescriptorDacl(ByRef pSecurityDescriptor As SECURITY_DESCRIPTOR, <MarshalAsAttribute(UnmanagedType.Bool)> ByVal bDaclPresent As Boolean, <InAttribute()> ByVal pDacl As System.IntPtr, <MarshalAsAttribute(UnmanagedType.Bool)> ByVal bDaclDefaulted As Boolean) As UInteger SECURITY_DESCRIPTOR securityDesc = new SECURITY_DESCRIPTOR(); InitializeSecurityDescriptor(out securityDesc, 1); SetSecurityDescriptorDacl(ref securityDesc, true, IntPtr.Zero, false);
GetSecurityDescriptorGroup(pSecurityDescriptor, out pSidGroup , out retref);
GetSecurityDescriptorOwner(pSecurityDescriptor, out pSidOwner, out retref));
GetSecurityDescriptorDacl(pSecurityDescriptor, out present, out pDacl, out retref);
GetSecurityDescriptorSacl(pSecurityDescriptor, out present, out pSacl, out retref); |