blob: ad9f88dcf503166ac00d686f47e9f1505f7112f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
%{
#include <linux/kernel.h>
#include <linux/posix_acl.h>
%}
function acl_dump:string(_acl:long)
%{
struct posix_acl *acl = (struct posix_acl *)(long) kread(&(THIS->_acl));
struct posix_acl_entry *pa;
char buf[MAXSTRINGLEN];
int cc=0, i;
sprintf(buf+cc, "acl(%d) ", acl->a_count);
cc = strlen(buf);
pa = acl->a_entries;
for (i=0; i < acl->a_count; i++) {
sprintf(buf+cc, "[%d,%d,%d] ", pa->e_tag, pa->e_perm, pa->e_id);
cc = strlen(buf);
pa++;
}
snprintf(THIS->__retvalue, MAXSTRINGLEN, "%s", buf);
CATCH_DEREF_FAULT();
%}
|