This file is indexed.

/usr/include/afs/afs_cfgAdmin.h is in libopenafs-dev 1.6.7-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
/*
 * Copyright 2000, International Business Machines Corporation and others.
 * All Rights Reserved.
 *
 * This software has been released under the terms of the IBM Public
 * License.  For details, see the LICENSE file in the top-level source
 * directory or online at http://www.openafs.org/dl/license10.html
 */

#ifndef OPENAFS_CFG_ADMIN_H
#define OPENAFS_CFG_ADMIN_H

#include <afs/param.h>
#include <afs/afs_Admin.h>


/* INTRODUCTION:
 *
 * This API provides a mechanism for configuring AFS server processes.
 * The API is designed to support both local and remote configuration,
 * though remote configuration may not be supported in the library
 * implementation.
 *
 * Functions in the API are partitioned into logical categories:
 *   cfg_Host*()         - manipulate static server configuration information.
 *   cfg_Client*()       - perform minimally necessary client configuration.
 *   cfg_CellServDb*()   - manage the cell-wide server CellServDb database.
 *   cfg_BosServer*()    - configure the BOS server.
 *   cfg_DbServers*()    - configure the database servers.
 *   cfg_FileServer*()   - configure the fileserver.
 *   cfg_UpdateServer*() - configure the update server.
 *   cfg_UpdateClient*() - configure update clients.
 *
 * Within a given function category, there may exist convenience wrappers
 * that do not begin with the common function prefix for that category.
 * Also provided are utility functions that complement the above; most
 * of these are deallocator functions.
 *
 * USAGE:
 *
 * General usage proceeds as follows:
 *     - static server configuration is set via the cfg_Host*() functions.
 *     - static client configuration is set via the cfg_Client*() functions.
 *     - server processes are dynamically configured via the functions
 *       in each server category; for configuring database servers, the
 *       server CellServDb is manipulated via the cfg_CellServDb*() functions.
 *
 * Detailed usage information is provided elsewhere.
 *
 * NOTES:
 *
 * 1) The intent is to implement all functions to be idempotent (i.e., so
 *    that they can be called more than once w/o adverse side effects).
 * 2) As functions are implemented, specific error codes of interest
 *    to users (e.g., GUI tools) will be documented so that appropriate
 *    action can be taken on failure.
 */



/* ----------- Type and constant declarations --------- */


/* AFS partition table entry */
typedef struct {
    char *partitionName;	/* vice partition name */
    char *deviceName;		/* device path */
} cfg_partitionEntry_t;

/* Status callback invoked by functions that update the CellServDB. */
typedef struct {
    char *fsDbHost;		/* host on which CellServDB update was attempted */
    afs_status_t status;	/* update completion status */
} cfg_cellServDbStatus_t;

typedef void

  (ADMINAPI * cfg_cellServDbUpdateCallBack_t) (void *callBackId,
					       cfg_cellServDbStatus_t *
					       statusItemP,
					       afs_status_t status);

/* BOS instance names used to configure database servers */
ADMINEXPORT extern const char *cfg_kaserverBosName;
ADMINEXPORT extern const char *cfg_ptserverBosName;
ADMINEXPORT extern const char *cfg_vlserverBosName;
ADMINEXPORT extern const char *cfg_buserverBosName;


/* Database server status information */
typedef struct {
    short inCellServDb;		/* host in its own server CellServDB */
    short isKaserver;		/* authentication server configured */
    short isPtserver;		/* protection server configured */
    short isVlserver;		/* volume location server configured */
    short isBuserver;		/* backup server configured */

    /*  isStdDb = (inCellServDb && isKaserver && isPtserver && isVlserver)
     *  isBkDbP = (inCellServDb && isBuserver)
     */
} cfg_dbServersStatus_t;


/* BOS instance name used to configure file server */
ADMINEXPORT extern const char *cfg_fileserverBosName;

/* BOS instance name used to configure update server */
ADMINEXPORT extern const char *cfg_upserverBosName;

/* BOS instance prefix used to configure all update clients;  full instance
 * name is the concatenation of this prefix and a specified suffix.
 */
ADMINEXPORT extern const char *cfg_upclientBosNamePrefix;

/* Default BOS instance suffix used to configure System Control client */
ADMINEXPORT extern const char *cfg_upclientSysBosSuffix;

/* Default BOS instance suffix used to configure Binary Distribution client */
ADMINEXPORT extern const char *cfg_upclientBinBosSuffix;



/* ---------------- Server Host ------------------ */


extern int ADMINAPI cfg_HostQueryStatus(const char *hostName,
					afs_status_p configStP,
					char **cellNameP, afs_status_p st);

extern int ADMINAPI cfg_HostOpen(void *cellHandle, const char *hostName,
				 void **hostHandleP, afs_status_p st);

extern int ADMINAPI cfg_HostClose(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_HostSetCell(void *hostHandle, const char *cellName,
				    const char *cellDbHosts, afs_status_p st);

extern int ADMINAPI cfg_HostSetAfsPrincipal(void *hostHandle, short isFirst,
					    const char *passwd,
					    afs_status_p st);

extern int ADMINAPI cfg_HostSetAdminPrincipal(void *hostHandle, short isFirst,
					      char *admin,
					      const char *passwd,
					      unsigned int afsUid,
					      afs_status_p st);

extern int ADMINAPI cfg_HostInvalidate(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_HostPartitionTableEnumerate(void *hostHandle,
						    cfg_partitionEntry_t **
						    tablePP, int *nEntriesP,
						    afs_status_p st);

extern int ADMINAPI cfg_HostPartitionTableAddEntry(void *hostHandle,
						   const char *partName,
						   const char *devName,
						   afs_status_p st);

extern int ADMINAPI cfg_HostPartitionTableRemoveEntry(void *hostHandle,
						      const char *partName,
						      afs_status_p st);

extern int ADMINAPI cfg_HostPartitionNameValid(const char *partName,
					       short *isValidP,
					       afs_status_p st);

extern int ADMINAPI cfg_HostDeviceNameValid(const char *devName,
					    short *isValidP, afs_status_p st);




/* ---------------- AFS Client ------------------ */


extern int ADMINAPI cfg_ClientQueryStatus(const char *hostName,
					  short *isInstalledP,
					  unsigned *versionP,
					  afs_status_p configStP,
					  char **cellNameP, afs_status_p st);

extern int ADMINAPI cfg_ClientSetCell(void *hostHandle, const char *cellName,
				      const char *cellDbHosts,
				      afs_status_p st);

extern int ADMINAPI cfg_ClientCellServDbAdd(void *hostHandle,
					    const char *cellName,
					    const char *dbentry,
					    afs_status_p st);

extern int ADMINAPI cfg_ClientCellServDbRemove(void *hostHandle,
					       const char *cellName,
					       const char *dbentry,
					       afs_status_p st);

extern int ADMINAPI cfg_ClientStop(void *hostHandle, unsigned int timeout,
				   afs_status_p st);

extern int ADMINAPI cfg_ClientStart(void *hostHandle, unsigned int timeout,
				    afs_status_p st);



/* ---------------- CellServDB ------------------ */


extern int ADMINAPI cfg_CellServDbAddHost(void *hostHandle,
					  const char *sysControlHost,
					  cfg_cellServDbUpdateCallBack_t
					  callBack, void *callBackId,
					  int *maxUpdates, afs_status_p st);

extern int ADMINAPI cfg_CellServDbRemoveHost(void *hostHandle,
					     const char *sysControlHost,
					     cfg_cellServDbUpdateCallBack_t
					     callBack, void *callBackId,
					     int *maxUpdates,
					     afs_status_p st);

extern int ADMINAPI cfg_CellServDbEnumerate(const char *fsDbHost,
					    char **cellName,
					    char **cellDbHosts,
					    afs_status_p st);



/* ---------------- BOS Server  ------------------ */


extern int ADMINAPI cfg_BosServerStart(void *hostHandle, short noAuth,
				       unsigned int timeout, afs_status_p st);

extern int ADMINAPI cfg_BosServerStop(void *hostHandle, unsigned int timeout,
				      afs_status_p st);

extern int ADMINAPI cfg_BosServerQueryStatus(void *hostHandle,
					     short *isStartedP,
					     short *isBosProcP,
					     afs_status_p st);



/* ---------------- Database Servers ------------------ */


extern int ADMINAPI cfg_AuthServerStart(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_DbServersStart(void *hostHandle, short startBkDb,
				       afs_status_p st);

extern int ADMINAPI cfg_DbServersStop(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_DbServersQueryStatus(void *hostHandle,
					     short *isStdDbP, short *isBkDbP,
					     cfg_dbServersStatus_t * detailsP,
					     afs_status_p st);

extern int ADMINAPI cfg_DbServersRestartAll(void *hostHandle,
					    afs_status_p st);

extern int ADMINAPI cfg_DbServersWaitForQuorum(void *hostHandle,
					       unsigned int timeout,
					       afs_status_p st);

extern int ADMINAPI cfg_DbServersStopAllBackup(void *hostHandle,
					       afs_status_p st);



/* ---------------- File Server ------------------ */


extern int ADMINAPI cfg_FileServerStart(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_FileServerStop(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_FileServerQueryStatus(void *hostHandle, short *isFsP,
					      afs_status_p st);



/* ---------------- Update Server ------------------ */


extern int ADMINAPI cfg_UpdateServerStart(void *hostHandle,
					  const char *exportClear,
					  const char *exportCrypt,
					  afs_status_p st);

extern int ADMINAPI cfg_UpdateServerStop(void *hostHandle, afs_status_p st);

extern int ADMINAPI cfg_UpdateServerQueryStatus(void *hostHandle,
						short *isUpserverP,
						short *isSysCtrlP,
						short *isBinDistP,
						afs_status_p st);

extern int ADMINAPI cfg_SysBinServerStart(void *hostHandle, short makeSysCtrl,
					  short makeBinDist, afs_status_p st);



/* ---------------- Update Client ------------------ */


extern int ADMINAPI cfg_UpdateClientStart(void *hostHandle,
					  const char *bosSuffix,
					  const char *upserver, short crypt,
					  const char *import,
					  unsigned int frequency,
					  afs_status_p st);

extern int ADMINAPI cfg_UpdateClientStop(void *hostHandle,
					 const char *bosSuffix,
					 afs_status_p st);

extern int ADMINAPI cfg_UpdateClientStopAll(void *hostHandle,
					    afs_status_p st);

extern int ADMINAPI cfg_UpdateClientQueryStatus(void *hostHandle,
						short *isUpclientP,
						short *isSysP, short *isBinP,
						afs_status_p st);

extern int ADMINAPI cfg_SysControlClientStart(void *hostHandle,
					      const char *upserver,
					      afs_status_p st);

extern int ADMINAPI cfg_BinDistClientStart(void *hostHandle,
					   const char *upserver,
					   afs_status_p st);



/* ---------------- Utilities ------------------ */


extern int ADMINAPI cfg_StringDeallocate(char *stringDataP, afs_status_p st);

extern int ADMINAPI cfg_PartitionListDeallocate(cfg_partitionEntry_t *
						partitionListDataP,
						afs_status_p st);

extern int ADMINAPI cfg_CellServDbStatusDeallocate(cfg_cellServDbStatus_t *
						   statusItempP,
						   afs_status_p st);

#endif /* OPENAFS_CFG_ADMIN_H */