* @APPLE_LICENSE_HEADER_END@
*/
-#include <SecBase.h>
+#include <Security/SecBase.h>
#include <Security/SecAccess.h>
#include <Security/SecAccessPriv.h>
#include <Security/SecTrustedApplication.h>
CFRelease(debugStr);
#endif
- CSSM_ACL_AUTHORIZATION_TAG rights[numAcls];
- memset(rights, 0, sizeof(rights));
+ std::vector<CSSM_ACL_AUTHORIZATION_TAG> rights(numAcls);
for (CFIndex iCnt = 0; iCnt < numAcls; iCnt++)
{
{ CSSM_LIST_TYPE_UNKNOWN, &subject1, &subject2 },
false, // Delegate
// rights for this entry
- { (uint32)(sizeof(rights) / sizeof(rights[0])), rights },
+ { (uint32)numAcls, rights.data() },
// rest is defaulted
}
}
if (!trustedAppsURL)
goto xit;
- if ( trustedAppListFileNameWithoutExtension )
- CFRelease(trustedAppListFileNameWithoutExtension);
-
if (!CFURLCreateDataAndPropertiesFromResource(kCFAllocatorDefault,trustedAppsURL,&xmlDataRef,NULL,NULL,&errorCode))
goto xit;
trustedAppList = (CFArrayRef)trustedAppsPlist;
xit:
+ CFReleaseNull(trustedAppListFileNameWithoutExtension);
if (bundleURL)
CFRelease(bundleURL);
if (secBundle)