]>
git.saurik.com Git - apple/security.git/blob - cdsa/cdsa_client/aclclient.h
2 * Copyright (c) 2000-2001 Apple Computer, Inc. All Rights Reserved.
4 * The contents of this file constitute Original Code as defined in and are
5 * subject to the Apple Public Source License Version 1.2 (the 'License').
6 * You may not use this file except in compliance with the License. Please obtain
7 * a copy of the License at http://www.apple.com/publicsource and read it before
10 * This Original Code and all software distributed under the License are
11 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS
12 * OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT
13 * LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
14 * PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the
15 * specific language governing rights and limitations under the License.
22 #ifndef _H_CDSA_CLIENT_ACLCLIENT
23 #define _H_CDSA_CLIENT_ACLCLIENT 1
25 #include <Security/cssmaclpod.h>
26 #include <Security/cssmcred.h>
37 // AclClient -- abstract interface implemented by objects that can manipulate their acls
43 virtual void getAcl(const char *selectionTag
, AutoAclEntryInfoList
&aclInfos
) const = 0;
44 virtual void changeAcl(const CSSM_ACCESS_CREDENTIALS
*accessCred
,
45 const CSSM_ACL_EDIT
&aclEdit
) = 0;
47 // Acl owner manipulation
48 virtual void getOwner(AutoAclOwnerPrototype
&owner
) const = 0;
49 virtual void changeOwner(const CSSM_ACCESS_CREDENTIALS
*accessCred
,
50 const CSSM_ACL_OWNER_PROTOTYPE
&newOwner
) = 0;
53 // Create a random owner
54 static void makeRandomOwner(CSP
&csp
, AutoAclOwnerPrototype
&owner
, AutoCredentials
&cred
);
55 void setOwnerAndAcl(const AutoCredentials
&cred
, const AutoAclOwnerPrototype
&newOwner
,
56 uint32 numEntries
, const CSSM_ACL_ENTRY_INFO
*entries
);
61 } // end namespace CssmClient
63 } // end namespace Security
65 #endif // _H_CDSA_CLIENT_ACLCLIENT