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
11 uuid(ae274620
-dea3
-11d1
-bfb3
-00a024c0d1ef
),
13 pointer_default(unique),
14 implicit_handle
(handle_t hBindTaAfsAdminSvr
)
16 interface ITaAfsAdminSvr
18 import
"ITaAfsAdmSvrTypes.idl";
21 // ...obtains a cookie to represent the calling process. The cookie should
22 // be freed with AfsAdmSvr_Disconnect when the process disconnects.
24 int AfsAdmSvr_Connect
(
25 [in] STRING szClientAddress
,
26 [out] UINT_PTR
*pidClient
,
30 // AfsAdmSvr_Disconnect
31 // ...releases and invalidates the cookie representing the calling process.
33 int AfsAdmSvr_Disconnect
(
34 [in] UINT_PTR idClient
,
40 // ...reminds the admin server that the specified client is still around.
41 // this call should be made at least every csecAFSADMSVR_CLIENT_PING
42 // seconds, lest the admin server think you've disconnected. (The client
43 // library TaAfsAdmSvrClient.lib automatically handles this.)
46 [in] UINT_PTR idClient
,
49 const DWORD csecAFSADMSVR_CLIENT_PING
= (2L * 60L); // 2 minutes
52 // AfsAdmSvr_CrackCredentials
53 // ...obtains information about the supplied credentials token.
55 int AfsAdmSvr_CrackCredentials
(
56 [in] UINT_PTR idClient
,
60 [out] SYSTEMTIME
*pstExpiration
,
64 // AfsAdmSvr_GetCredentials
65 // ...queries the user's current AFS credentials for the specified cell.
66 // if the user already has credentials in the cell, returns a nonzero
67 // token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
69 UINT_PTR AfsAdmSvr_GetCredentials
(
70 [in] UINT_PTR idClient
,
75 // AfsAdmSvr_SetCredentials
76 // ...obtains new AFS credentials within the administrative server process
77 // on behalf of the specified user. if successful, returns a nonzero
78 // token {hCreds}, suitable for use in AfsAdmSvr_OpenCell().
80 UINT_PTR AfsAdmSvr_SetCredentials
(
81 [in] UINT_PTR idClient
,
84 [in] STRING pszPassword
,
88 // AfsAdmSvr_PushCredentials
89 // ...requests that the specified AFS credentials be used hereafter
90 // when manipulating the specified cell. You should follow this
91 // call with a Refresh request if necessary.
93 int AfsAdmSvr_PushCredentials
(
94 [in] UINT_PTR idClient
,
101 // AfsAdmSvr_GetLocalCell
102 // ...obtains the name of the primary cell used by the admin server
104 int AfsAdmSvr_GetLocalCell
(
105 [in] UINT_PTR idClient
,
106 [out] STRING pszCellName
,
111 // AfsAdmSvr_ErrorCodeTranslate
112 // ...translates an error code into a readable string
114 int AfsAdmSvr_ErrorCodeTranslate
(
115 [in] UINT_PTR idClient
,
117 [in] LANGID idLanguage
, // pass 0 for default language at server
118 [out] STRING pszErrorText
,
123 // AfsAdmSvr_GetAction
124 // ...returns information about a particular operation in progress.
126 int AfsAdmSvr_GetAction
(
127 [in] UINT_PTR idClient
,
129 [out] LPASACTION pAction
,
134 // AfsAdmSvr_GetActions
135 // ...returns a list of operations in progress. The list returned can
136 // be constrained to only including those operations initiated by
137 // a particular client and/or performed in a particular cell.
139 int AfsAdmSvr_GetActions
(
140 [in] UINT_PTR idClient
,
141 [in] UINT_PTR idClientSearch
, // 0 to return for all clients
142 [in] ASID idCellSearch
, // 0 to return for all cells
143 [out] LPASACTIONLIST
*ppList
,
148 // AfsAdmSvr_OpenCell
149 // ...opens a cell for administration.
151 int AfsAdmSvr_OpenCell
(
152 [in] UINT_PTR idClient
,
153 [in] UINT_PTR hCreds
,
154 [in] STRING pszCellName
,
155 [in] DWORD dwScopeFlags
,
159 const DWORD AFSADMSVR_SCOPE_VOLUMES
= 0x00000001;
160 const DWORD AFSADMSVR_SCOPE_USERS
= 0x00000002;
162 // AfsAdmSvr_CloseCell
163 // ...used by client to open a cell for administration.
165 int AfsAdmSvr_CloseCell
(
166 [in] UINT_PTR idClient
,
172 // AfsAdmSvr_FindObject
173 // AfsAdmSvr_FindObjects
174 // ...used to search through all objects in the cell, obtaining a list
175 // of those which match the specified criteria. For FindObjects, the
176 // {*ppList} parameter will be filled in with an allocated list of ASID
177 // objects, and should be freed using the AfsAdmSvr_FreeAsidList()
178 // routine (clients using the TaAfsAdmSvrClient.lib library should call
179 // asc_AsidListFree(), which is a wrapper for the former routine).
180 // The _FindObject routine can be used to find exactly one object--for
181 // instance, finding the ASID for a particular user or volume--while
182 // the _FindObjects routine returns a list of all objects which
183 // match the specified criteria--all volumes on a partition, or all
184 // users named "b*" within a cell.
186 int AfsAdmSvr_FindObject
(
187 [in] UINT_PTR idClient
,
188 [in] ASID idSearchScope
,
189 [in] ASOBJTYPE ObjectType
,
190 [in] AFSADMSVR_SEARCH_REFRESH SearchRefresh
,
192 [out] ASID
*pidObject
,
196 int AfsAdmSvr_FindObjects
(
197 [in] UINT_PTR idClient
,
198 [in] ASID idSearchScope
,
199 [in] ASOBJTYPE ObjectType
,
200 [in] AFSADMSVR_SEARCH_REFRESH SearchRefresh
,
201 [in] STRING szPattern
,
202 [in] LPAFSADMSVR_SEARCH_PARAMS pSearchParams
,
203 [out] LPASIDLIST
*ppList
,
208 // AfsAdmSvr_GetObject
209 // AfsAdmSvr_GetObjects
210 // ...returns server-cached information about the specified object (or
213 int AfsAdmSvr_GetObject
(
214 [in] UINT_PTR idClient
,
215 [in] AFSADMSVR_GET_TYPE GetType
,
216 [in] AFSADMSVR_GET_LEVEL GetLevel
,
218 [in] UINT_PTR verProperties
, // can be 0 if not RETURN_IF_OUT_OF_DATE
219 [out] LPASOBJPROP pProperties
,
223 int AfsAdmSvr_GetObjects
(
224 [in] UINT_PTR idClient
,
225 [in] AFSADMSVR_GET_TYPE GetType
,
226 [in] AFSADMSVR_GET_LEVEL GetLevel
,
227 [in] LPASIDLIST pListObjects
, // lParam used as verProperties
228 [out] LPASOBJPROPLIST
*ppListObjectProperties
,
233 // AfsAdmSvr_RefreshObject
234 // AfsAdmSvr_RefreshObjects
235 // ...invalidates the server's cache of information about the specified
236 // object or objects.
238 int AfsAdmSvr_RefreshObject
(
239 [in] UINT_PTR idClient
,
244 int AfsAdmSvr_RefreshObjects
(
245 [in] UINT_PTR idClient
,
246 [in] LPASIDLIST pListObjects
,
251 // AfsAdmSvr_CallbackHost
252 // ...provides a context in which the server can issue callback functions
253 // via the AfsAdmSvrCallBack_* routines, which the client must implement.
254 // This routine will only return if the server is shut down. It should
255 // be called on a dedicated thread by the client. (TaAfsAdmSvrClient.lib
256 // automatically handles this.)
258 void AfsAdmSvr_CallbackHost
(void);
260 // AfsAdmSvrCallback_Action
261 // ...called by the server in the context of the CallbackHost() routine;
262 // this routine is used to notify the client whenever an action is
263 // initiated or completed.
265 [callback] void AfsAdmSvrCallback_Action
(
266 [in] LPASACTION pAction
,
270 // AfsAdmSvr_GetRandomKey
271 // ...returns a randomly-generated 8-byte encryption key
273 int AfsAdmSvr_GetRandomKey
(
274 [in] UINT_PTR idClient
,
276 [out] BYTE keyData
[ ENCRYPTIONKEYLENGTH
],
280 // AfsAdmSvr_ChangeUser
281 // ...changes a user account's properties.
283 int AfsAdmSvr_ChangeUser
(
284 [in] UINT_PTR idClient
,
287 [in] LPAFSADMSVR_CHANGEUSER_PARAMS pChange
,
291 // AfsAdmSvr_GetGroupMembership
292 // ...retrieves the list of groups to which a user or group belongs
294 int AfsAdmSvr_GetGroupMembership
(
295 [in] UINT_PTR idClient
,
298 [out] LPASIDLIST
*ppAsidList
,
302 // AfsAdmSvr_GetGroupOwnership
303 // ...retrieves the list of groups which a user or group owns
305 int AfsAdmSvr_GetGroupOwnership
(
306 [in] UINT_PTR idClient
,
309 [out] LPASIDLIST
*ppAsidList
,
313 // AfsAdmSvr_ChangeGroup
314 // ...changes a PTS group's properties.
316 int AfsAdmSvr_ChangeGroup
(
317 [in] UINT_PTR idClient
,
320 [in] LPAFSADMSVR_CHANGEGROUP_PARAMS pChange
,
324 // AfsAdmSvr_GetGroupMembers
325 // ...retrieves the list of users which belong to a group
327 int AfsAdmSvr_GetGroupMembers
(
328 [in] UINT_PTR idClient
,
331 [out] LPASIDLIST
*ppAsidList
,
335 // AfsAdmSvr_AddGroupMember
336 // ...adds a member to the specified group
338 int AfsAdmSvr_AddGroupMember
(
339 [in] UINT_PTR idClient
,
346 // AfsAdmSvr_RemoveGroupMember
347 // ...removes a member from the specified group
349 int AfsAdmSvr_RemoveGroupMember
(
350 [in] UINT_PTR idClient
,
357 // AfsAdmSvr_RenameGroup
358 // ...changes a group's name
360 int AfsAdmSvr_RenameGroup
(
361 [in] UINT_PTR idClient
,
364 [in] STRING szNewGroupName
,
368 // AfsAdmSvr_CreateGroup
369 // ...creates a new PTS group
371 int AfsAdmSvr_CreateGroup
(
372 [in] UINT_PTR idClient
,
374 [in] LPAFSADMSVR_CREATEGROUP_PARAMS pCreate
,
375 [out] ASID
*pidGroup
,
379 // AfsAdmSvr_DeleteGroup
380 // ...deletes a PTS group
382 int AfsAdmSvr_DeleteGroup
(
383 [in] UINT_PTR idClient
,
389 // AfsAdmSvr_SetUserPassword
390 // ...changes the password for the specified user account. Pass a non-empty
391 // string in {keyString} to encrypt the specified string; otherwise,
392 // pass a valid encryption key in {keyData}.
394 int AfsAdmSvr_SetUserPassword
(
395 [in] UINT_PTR idClient
,
399 [in] STRING keyString
,
400 [in] BYTE keyData
[ ENCRYPTIONKEYLENGTH
],
404 // AfsAdmSvr_UnlockUser
405 // ...unlocks a user's account
407 int AfsAdmSvr_UnlockUser
(
408 [in] UINT_PTR idClient
,
414 // AfsAdmSvr_CreateUser
415 // ...creates a new user account
417 int AfsAdmSvr_CreateUser
(
418 [in] UINT_PTR idClient
,
420 [in] LPAFSADMSVR_CREATEUSER_PARAMS pCreate
,
425 // AfsAdmSvr_DeleteUser
426 // ...deletes a user account
428 int AfsAdmSvr_DeleteUser
(
429 [in] UINT_PTR idClient
,
432 [in] LPAFSADMSVR_DELETEUSER_PARAMS pDelete
,
436 // AfsAdmSvr_ChangeCell
437 // ...changes a cell's properties.
439 int AfsAdmSvr_ChangeCell
(
440 [in] UINT_PTR idClient
,
442 [in] LPAFSADMSVR_CHANGECELL_PARAMS pChange
,
446 // AfsAdmSvr_SetRefreshRate
447 // ...changes the refresh rate for a specific cell
449 int AfsAdmSvr_SetRefreshRate
(
450 [in] UINT_PTR idClient
,
452 [in] ULONG cminRefreshRate
,