@@ -1180,7 +1180,15 @@ async def add_priv_addmember(self, user_dn:str, group_dn:str):
1180
1180
changes = {
1181
1181
'nTSecurityDescriptor' : [('replace' , new_sd .to_bytes ())]
1182
1182
}
1183
- _ , err = await self .modify (group_dn , changes )
1183
+ req_flags = SDFlagsRequestValue ({
1184
+ 'Flags' : SDFlagsRequest .DACL_SECURITY_INFORMATION
1185
+ })
1186
+ controls = [{
1187
+ 'controlType' : b'1.2.840.113556.1.4.801' ,
1188
+ 'controlValue' : req_flags .dump (),
1189
+ 'criticality' : False
1190
+ }]
1191
+ _ , err = await self .modify (group_dn , changes , controls )
1184
1192
if err is not None :
1185
1193
raise err
1186
1194
@@ -1229,7 +1237,15 @@ async def add_priv_dcsync(self, user_dn:str, forest_dn:str = None):
1229
1237
changes = {
1230
1238
'nTSecurityDescriptor' : [('replace' , new_sd .to_bytes ())]
1231
1239
}
1232
- _ , err = await self .modify (forest_dn , changes )
1240
+ req_flags = SDFlagsRequestValue ({
1241
+ 'Flags' : SDFlagsRequest .DACL_SECURITY_INFORMATION
1242
+ })
1243
+ controls = [{
1244
+ 'controlType' : b'1.2.840.113556.1.4.801' ,
1245
+ 'controlValue' : req_flags .dump (),
1246
+ 'criticality' : False
1247
+ }]
1248
+ _ , err = await self .modify (forest_dn , changes , controls )
1233
1249
if err is not None :
1234
1250
raise err
1235
1251
0 commit comments