const
asked on
AccessCheck() return error with empty security descriptor
The expected way of work of the attached program is the
following:
a) allocate security descriptor
b) initialize security descriptor
after this all access is allowed.
c) impersonate self in order to get impersonated access
token.
d) fake call of AccessCheck() in order to get size of
buffers needed
e) allocating buffers
f) real call of AccessCheck()
g) print returned values
It should be "Access denied\nGranted access = 7".
h) restore state
The problem is that at (f) error returned
GetLastError() = 1338 "The security descriptor structure is
invalid."
I call IsValidSecurityDescriptor(
it returns true. Setting DACL, Owner and Group to security
descriptor does not help. Converting Security descriptor to
selfrealtive format does not helps too.
The problem is reproducable on both NT 4.0 and NT3.51.
------------ begin of program ----------
<code>
section 1 of uuencode 4.13 of file TST.ZIP by R.E.M.
begin 644 TST.ZIP
M4$L#!!0````(`(@AER)R*2"*N
M_V%SIYS,U;G+7=I&"KU6!`RQR
M*)QZK>(/V*S-L_/R[.S,F&,6N
M$$3NVJ`C!.6Q'(1AC_HLI(3PN
MF^<>?&HUPEUR19Y[?X5'^GC<-
M4P7WKR[E9-E4Y`N?RS&A';OZL
ME+BA3M)+?Z%G5TPG011.2<#TU
MX%`[XC,G[E$AG"G5V@.KU[#'/
MWGCXY]`V>GJ"5SCZHVY7-8YRJ
MM!NCKEW3"3D_)2WJ.XL@)H$33
M3P8SUGQ@X:M+LL&=HA\EC^#&D
M=7)0&6^1^(:2R<+W*3_;$#`Q0
M<H(^X$,W<#@E#O'I/=`7U"=W#
MYE<_Y5<_YU>O,_I<#XWFR#+M/
M]T8"NN')9]F/"\<YKOX03,=IO
MD^.Z$%A('-W2L!(I"5?$8TZ)=
M@0!FB)A^X$P52-?7EOD>5A<$S
MVD02[#.M1/+4-,#@*A_8@4\=H
M2(>-*NX-=6_)W`%?TQB"''%"#
MN.``";>H$F8B4M7BRY"02-N1U
MCX8QBS\A%^8LG!9FVT3ZP%E,)
M;V#:NR2V,Q%1@#H*4)6C&!`S7
MNT:_8[_+TB#F$PU)2:ZN`+.FX
M0J<L))%/)O#[VQ(K)5=I^7"A5
ME7[#\]=MNM'02PQ%2RR5(4UD:
MW#.`6_=9+A,\4*7;0WDNK<8N]
MSPP?O>_*="QU''F\OCOL;F#.Y
MD@UIX&N9]Y;C+`I3![(5+58M_
M&<?#""1SHSL*FT(B6^!,:%!`V
M:C7='OQN]+'C-&XTF\9PJ-O6R
MC7JR'_C!:-672#+U]%AY<9XA]
M?,R<9A4R^%E=XV`(E>D28:JR_
MY()J8C,#\^\5I*U%GK(5GAP84
M&-&T9;112&^32;YSR)%@JU.O;
MU'/MTF[AU@ZD"@G;D7G,W+D#F
MWV_45Y$PJ`9P;^M^AU%%OC@9F
MCW"?J)+X/(XB(K`X+Y5IY6W)A
M*E+:[=.*_>BL,Y.P/=4RV?0*O
M)[A?!IS*+$NMW4/4A=\SD^^9R
MO66'%3Q?Q$)#9_UVU"BXZ.A--
M1B&_JH)Y_H9-&N*CTDXKEOJHK
M(=)F)O:L,A.3R<5:"K:&=,CUX
M:??LJDQYE0UE?W$="1Z07$[W'
ME)0*:TAY],+`JJ\@[I@:[VGQ"
M4,E4U&T5<;^\7[;(*Q9ETCLH;
M`(@AER)R*2"*NP<``,(J```%`
1`````0`!`#,```#>!P``````R
``
end
sum -r/size 48793/2950 section (from "begin" to "end")
sum -r/size 18333/2087 entire input file
</code>
------------ end of program-------------
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.