1DPNS_SETACL(3) DPNS Library Functions DPNS_SETACL(3)
2
3
4
6 dpns_setacl - set DPNS directory/file access control lists
7
9 #include <sys/types.h>
10 #include "dpns_api.h"
11
12 int dpns_setacl (const char *path, int nentries, struct dpns_acl *acl)
13
15 dpns_setacl sets the Access Control List associated with a DPNS direc‐
16 tory/file.
17
18 path specifies the logical pathname relative to the current DPNS
19 directory or the full DPNS pathname.
20
21 nentries
22 specifies the number of entries present in the buffer.
23
24 acl is a pointer to an array of dpns_acl structures provided by the
25 application.
26
27 struct dpns_acl {
28 unsigned char a_type;
29 int a_id;
30 unsigned char a_perm;
31 };
32
33 a_type is the ACL type: CNS_ACL_USER_OBJ, CNS_ACL_USER,
34 CNS_ACL_GROUP_OBJ, CNS_ACL_GROUP, CNS_ACL_MASK or CNS_ACL_OTHER.
35 Types for default entries are obtained by OR'ing the flag
36 CNS_ACL_DEFAULT with one of the above types.
37
38 a_id is the user or group numeric id.
39
40 a_perm is the access permission in numeric form obtained by OR'ing some
41 of the bits S_IROTH, S_IWOTH, S_IXOTH.
42
43 The effective user ID of the process must match the owner of the file
44 or the caller must have ADMIN privilege in the Cupv database.
45
47 This routine returns 0 if the operation was successful or -1 if the
48 operation failed. In the latter case, serrno is set appropriately.
49
51 EPERM The effective user ID does not match the owner of the file
52 and the caller does not have ADMIN privilege in the Cupv
53 database.
54
55 ENOENT The named file/directory does not exist or is a null path‐
56 name.
57
58 EACCES Search permission is denied on a component of the path
59 prefix.
60
61 EFAULT path or acl is a NULL pointer.
62
63 ENOTDIR A component of path prefix is not a directory.
64
65 EINVAL nentries is not greater than zero or is greater than
66 CA_MAXACLENTRIES or the ACL entries are not valid.
67
68 ENOSPC The name server database is full.
69
70 ENAMETOOLONG The length of path exceeds CA_MAXPATHLEN or the length of
71 a path component exceeds CA_MAXNAMELEN.
72
73 SENOSHOST Host unknown.
74
75 SENOSSERV Service unknown.
76
77 SECOMERR Communication error.
78
79 ENSNACT Name server is not running or is being shutdown.
80
82 Castor_limits(4), dpns_chdir(3), dpns_chmod(3), dpns-setacl(1)
83
85 LCG Grid Deployment Team
86
87
88
89DPNS $Date: 2003/04/08 06:15:02 $ DPNS_SETACL(3)