2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #ifndef OPENAFS_PTS_ADMIN_H
11 #define OPENAFS_PTS_ADMIN_H
13 #include <afs/param.h>
14 #include <afs/afs_Admin.h>
16 #define PTS_MAX_NAME_LEN 64 /* must equal PR_MAXNAMELEN */
17 #define PTS_MAX_GROUPS 5000 /* must equal PR_MAXGROUPS */
20 PTS_USER_OWNER_ACCESS
,
21 PTS_USER_ANYUSER_ACCESS
22 } pts_userAccess_t
, *pts_userAccess_p
;
25 PTS_GROUP_OWNER_ACCESS
= 10,
27 PTS_GROUP_ANYUSER_ACCESS
28 } pts_groupAccess_t
, *pts_groupAccess_p
;
30 typedef struct pts_UserEntry
{
31 int groupCreationQuota
;
32 int groupMembershipCount
;
36 pts_userAccess_t listStatus
;
37 pts_userAccess_t listGroupsOwned
;
38 pts_userAccess_t listMembership
;
39 char name
[PTS_MAX_NAME_LEN
];
40 char owner
[PTS_MAX_NAME_LEN
];
41 char creator
[PTS_MAX_NAME_LEN
];
42 } pts_UserEntry_t
, *pts_UserEntry_p
;
45 PTS_USER_UPDATE_GROUP_CREATE_QUOTA
= 0x1,
46 PTS_USER_UPDATE_PERMISSIONS
= 0x2
47 } pts_UserUpdateFlag_t
, *pts_UserUpdateFlag_p
;
49 typedef struct pts_UserUpdateEntry
{
50 pts_UserUpdateFlag_t flag
;
51 int groupCreationQuota
;
52 pts_userAccess_t listStatus
;
53 pts_userAccess_t listGroupsOwned
;
54 pts_userAccess_t listMembership
;
55 } pts_UserUpdateEntry_t
, *pts_UserUpdateEntry_p
;
57 typedef struct pts_GroupEntry
{
62 pts_groupAccess_t listStatus
;
63 pts_groupAccess_t listGroupsOwned
;
64 pts_groupAccess_t listMembership
;
65 pts_groupAccess_t listAdd
;
66 pts_groupAccess_t listDelete
;
67 char name
[PTS_MAX_NAME_LEN
];
68 char owner
[PTS_MAX_NAME_LEN
];
69 char creator
[PTS_MAX_NAME_LEN
];
70 } pts_GroupEntry_t
, *pts_GroupEntry_p
;
72 typedef struct pts_GroupUpdateEntry
{
73 pts_groupAccess_t listStatus
;
74 pts_groupAccess_t listGroupsOwned
;
75 pts_groupAccess_t listMembership
;
76 pts_groupAccess_t listAdd
;
77 pts_groupAccess_t listDelete
;
78 } pts_GroupUpdateEntry_t
, *pts_GroupUpdateEntry_p
;
80 extern int ADMINAPI
pts_GroupMemberAdd(const void *cellHandle
,
82 const char *groupName
,
85 extern int ADMINAPI
pts_GroupOwnerChange(const void *cellHandle
,
86 const char *targetGroup
,
90 extern int ADMINAPI
pts_GroupCreate(const void *cellHandle
,
92 char *newOwner
, int *newGroupId
,
95 extern int ADMINAPI
pts_GroupGet(const void *cellHandle
,
96 const char *groupName
,
97 pts_GroupEntry_p groupP
, afs_status_p st
);
99 extern int ADMINAPI
pts_GroupDelete(const void *cellHandle
,
100 const char *groupName
, afs_status_p st
);
102 extern int ADMINAPI
pts_GroupMaxGet(const void *cellHandle
, int *maxGroupId
,
105 extern int ADMINAPI
pts_GroupMaxSet(const void *cellHandle
, int maxGroupId
,
108 extern int ADMINAPI
pts_GroupMemberListBegin(const void *cellHandle
,
109 const char *groupName
,
113 extern int ADMINAPI
pts_GroupMemberListNext(const void *iterationId
,
117 extern int ADMINAPI
pts_GroupMemberListDone(const void *iterationId
,
120 extern int ADMINAPI
pts_GroupMemberRemove(const void *cellHandle
,
121 const char *userName
,
122 const char *groupName
,
125 extern int ADMINAPI
pts_GroupRename(const void *cellHandle
,
126 const char *oldName
, char *newName
,
129 extern int ADMINAPI
pts_GroupModify(const void *cellHandle
,
130 const char *groupName
,
131 const pts_GroupUpdateEntry_p newEntryP
,
134 extern int ADMINAPI
pts_UserCreate(const void *cellHandle
,
135 char *userName
, int *newUserId
,
138 extern int ADMINAPI
pts_UserDelete(const void *cellHandle
,
139 const char *userName
, afs_status_p st
);
141 extern int ADMINAPI
pts_UserGet(const void *cellHandle
, const char *userName
,
142 pts_UserEntry_p userP
, afs_status_p st
);
144 extern int ADMINAPI
pts_UserRename(const void *cellHandle
,
145 const char *oldName
, char *newName
,
148 extern int ADMINAPI
pts_UserModify(const void *cellHandle
,
149 const char *userName
,
150 const pts_UserUpdateEntry_p newEntryP
,
153 extern int ADMINAPI
pts_UserMaxGet(const void *cellHandle
, int *maxUserId
,
156 extern int ADMINAPI
pts_UserMaxSet(const void *cellHandle
, int maxUserId
,
159 extern int ADMINAPI
pts_UserMemberListBegin(const void *cellHandle
,
160 const char *userName
,
164 extern int ADMINAPI
pts_UserMemberListNext(const void *iterationId
,
165 char *userName
, afs_status_p st
);
167 extern int ADMINAPI
pts_UserMemberListDone(const void *iterationId
,
170 extern int ADMINAPI
pts_OwnedGroupListBegin(const void *cellHandle
,
171 const char *userName
,
175 extern int ADMINAPI
pts_OwnedGroupListNext(const void *iterationId
,
176 char *groupName
, afs_status_p st
);
178 extern int ADMINAPI
pts_OwnedGroupListDone(const void *iterationId
,
181 extern int ADMINAPI
pts_UserListBegin(const void *cellHandle
,
182 void **iterationIdP
, afs_status_p st
);
184 extern int ADMINAPI
pts_UserListNext(const void *iterationId
, char *userName
,
187 extern int ADMINAPI
pts_UserListDone(const void *iterationId
,
190 extern int ADMINAPI
pts_GroupListBegin(const void *cellHandle
,
191 void **iterationIdP
, afs_status_p st
);
193 extern int ADMINAPI
pts_GroupListNext(const void *iterationId
,
194 char *groupName
, afs_status_p st
);
196 extern int ADMINAPI
pts_GroupListDone(const void *iterationId
,
199 #endif /* OPENAFS_PTS_ADMIN_H */