1LFC_GETACL(3)                LFC Library Functions               LFC_GETACL(3)
2
3
4

NAME

6       lfc_getacl - get LFC directory/file access control lists
7

SYNOPSIS

9       #include <sys/types.h>
10       #include "lfc_api.h"
11
12       int lfc_getacl (const char *path, int nentries, struct lfc_acl *acl)
13

DESCRIPTION

15       lfc_getacl  gets  the  Access Control List associated with a LFC direc‐
16       tory/file.
17
18       path   specifies the logical  pathname  relative  to  the  current  LFC
19              directory or the full LFC pathname.
20
21       nentries
22              specifies  the  number of entries that can fit in the buffer. If
23              nentries is zero, the acl pointer can be NULL  and  the  routine
24              just returns the actual number of entries.
25
26       acl    is  a pointer to an array of lfc_acl structures allocated by the
27              application to receive the reply.
28
29       struct lfc_acl {
30               unsigned char   a_type;
31               int             a_id;
32               unsigned char   a_perm;
33       };
34
35       a_type is    the    ACL    type:    CNS_ACL_USER_OBJ,     CNS_ACL_USER,
36              CNS_ACL_GROUP_OBJ, CNS_ACL_GROUP, CNS_ACL_MASK or CNS_ACL_OTHER.
37              Types for default  entries  are  obtained  by  OR'ing  the  flag
38              CNS_ACL_DEFAULT with one of the above types.
39
40       a_id   is the user or group numeric id.
41
42       a_perm is the access permission in numeric form obtained by OR'ing some
43              of the bits S_IROTH, S_IWOTH, S_IXOTH.
44

RETURN VALUE

46       This routine returns the actual number of entries if the operation  was
47       successful or -1 if the operation failed. In the latter case, serrno is
48       set appropriately.
49

ERRORS

51       ENOENT       The named file/directory does not exist or is a null path‐
52                    name.
53
54       EACCES       Search  permission  is  denied  on a component of the path
55                    prefix.
56
57       EFAULT       path is a NULL pointer or acl is a NULL pointer  and  nen‐
58                    tries is greater than zero.
59
60       ENOTDIR      A component of path prefix is not a directory.
61
62       EINVAL       nentries is negative.
63
64       ENOSPC       nentries  is  less  than the number of entries returned by
65                    the server.
66
67       ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length  of
68                    a path component exceeds CA_MAXNAMELEN.
69
70       SENOSHOST    Host unknown.
71
72       SENOSSERV    Service unknown.
73
74       SECOMERR     Communication error.
75
76       ENSNACT      Name server is not running or is being shutdown.
77

SEE ALSO

79       Castor_limits(4), lfc_chdir(3), lfc_chmod(3), lfc-getacl(1)
80

AUTHOR

82       LCG Grid Deployment Team
83
84
85
86LFC                      $Date: 2003/04/08 05:37:53 $            LFC_GETACL(3)
Impressum