xdr encode decode acl and dacl attributes

acls are lists of arbitrary length, so xdr_array() is used to allocate the array
 during decode.  because this memory is allocated by the tirpc library, it needs
 to be freed there as well; added function nfsacl41_free() to do this with XDR_F
REE

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Olga Kornievskaia 2011-04-12 14:07:24 -04:00
parent b9e369fac6
commit b6d81b3419
3 changed files with 73 additions and 22 deletions

View file

@ -123,9 +123,15 @@ typedef struct __nfsace4 {
uint32_t acetype;
uint32_t aceflag;
uint32_t acemask;
unsigned char who[NFS4_OPAQUE_LIMIT];
char who[NFS4_OPAQUE_LIMIT];
} nfsace4;
typedef struct __nfsacl41 {
uint32_t flag;
nfsace4 *aces;
uint32_t count;
} nfsacl41;
typedef struct __stateid4 {
uint32_t seqid;
unsigned char other[NFS4_STATEID_OTHER];
@ -186,6 +192,7 @@ typedef struct __nfs41_file_info {
nfstime4 time_access;
nfstime4 time_create;
nfstime4 time_modify;
nfsacl41 *acl;
nfstime4 *time_delta; /* XXX: per-fs */
bitmap4 attrmask;
bitmap4 *supported_attrs; /* XXX: per-fs */