]> git.k1024.org Git - pylibacl.git/blob - PORTING
Add test for refcount leak
[pylibacl.git] / PORTING
1 Porting to other platforms
2 --------------------------
3
4 First, determine if your OS supports the full 28 functions of the
5 POSIX.1e draft (if so, define HAVE_LEVEL2) or only the first 11
6 functions (most common case, meaning only HAVE_LEVEL1).
7
8 If your OS supports only LEVEL1, modift setup.py as appropriately;
9 unfortunately, the functionality of the module is quite low.
10
11 If your OS supports LEVEL2, there is a function which you must define:
12 testing if an acl_permset_t contains a given permission. For example,
13 under Linux, the acl library defines:
14
15     int acl_get_perm(acl_permset_t permset_d, acl_perm_t perm);
16
17 under FreeBSD, the library defines ``acl_get_perm_np`` with a similar
18 syntax. So just see how this is implemented in your platform and either
19 define a simple macro or a full function with the syntax:
20
21     static int get_perm(acl_permset_t permset_d, acl_perm_t perm);
22
23 which must return 1 if the permset contains perm and 0 otherwise.