This file is indexed.

/usr/include/afs/afs_bosAdmin.h is in libopenafs-dev 1.6.20-2+deb9u2.

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
/*
 * 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_BOS_ADMIN_H
#define OPENAFS_BOS_ADMIN_H

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

#define BOS_MAX_NAME_LEN 256
#define BOS_MAX_PROCESS_PARAMETERS 6
#define BOS_ENCRYPTION_KEY_LEN 8

typedef enum {
    BOS_PROCESS_SIMPLE,
    BOS_PROCESS_FS,
    BOS_PROCESS_CRON
} bos_ProcessType_t, *bos_ProcessType_p;

/*
 * ASSUMPTION
 * These execution state flags are defined to be == the BOZO BSTAT_
 * values.  This allows us to directly map from one to the other.
 * If the BOZO BSTAT_ flags are ever modified, these guys need to
 * be changed as well.
 */

typedef enum {
    BOS_PROCESS_STOPPED,
    BOS_PROCESS_RUNNING,
    BOS_PROCESS_STOPPING,
    BOS_PROCESS_STARTING
} bos_ProcessExecutionState_t, *bos_ProcessExecutionState_p;

typedef enum {
    BOS_PROCESS_OK = 0x0,
    BOS_PROCESS_CORE_DUMPED = 0x1,
    BOS_PROCESS_TOO_MANY_ERRORS = 0x2,
    BOS_PROCESS_BAD_FILE_ACCESS = 0x4
} bos_ProcessState_t, *bos_ProcessState_p;

typedef enum {
    BOS_AUTH_REQUIRED,
    BOS_NO_AUTH
} bos_Auth_t, *bos_Auth_p;

typedef enum {
    BOS_PRUNE,
    BOS_DONT_PRUNE
} bos_Prune_t, *bos_Prune_p;

typedef enum {
    BOS_RESTART_WEEKLY,
    BOS_RESTART_DAILY
} bos_Restart_t, *bos_Restart_p;

typedef struct bos_ProcessInfo {
    bos_ProcessExecutionState_t processGoal;
    unsigned long processStartTime;
    unsigned long numberProcessStarts;
    unsigned long processExitTime;
    unsigned long processExitErrorTime;
    unsigned long processErrorCode;
    unsigned long processErrorSignal;
    bos_ProcessState_t state;
} bos_ProcessInfo_t, *bos_ProcessInfo_p;

typedef struct bos_encryptionKeyStatus {
    int lastModificationDate;
    int lastModificationMicroSeconds;
    unsigned int checkSum;
} bos_encryptionKeyStatus_t, *bos_encryptionKeyStatus_p;

typedef struct bos_KeyInfo {
    int keyVersionNumber;
    kas_encryptionKey_t key;
    bos_encryptionKeyStatus_t keyStatus;
} bos_KeyInfo_t, *bos_KeyInfo_p;

typedef enum {
    BOS_RESTART_TIME_HOUR = 0x1,
    BOS_RESTART_TIME_MINUTE = 0x2,
    BOS_RESTART_TIME_SECOND = 0x4,
    BOS_RESTART_TIME_DAY = 0x8,
    BOS_RESTART_TIME_NEVER = 0x10,
    BOS_RESTART_TIME_NOW = 0x20
} bos_RestartTimeFields_t, *bos_RestartTimeFields_p;

typedef struct bos_RestartTime {
    bos_RestartTimeFields_t mask;
    short hour;
    short min;
    short sec;
    short day;
} bos_RestartTime_t, *bos_RestartTime_p;

typedef enum {
    BOS_RESTART_BOS_SERVER,
    BOS_DONT_RESTART_BOS_SERVER
} bos_RestartBosServer_t, *bos_RestartBosServer_p;

typedef enum {
    BOS_SALVAGE_DAMAGED_VOLUMES,
    BOS_DONT_SALVAGE_DAMAGED_VOLUMES
} bos_SalvageDamagedVolumes_t, *bos_SalvageDamagedVolumes_p;

typedef enum {
    BOS_SALVAGE_WRITE_INODES,
    BOS_SALVAGE_DONT_WRITE_INODES
} bos_WriteInodes_t, *bos_WriteInodes_p;

typedef enum {
    BOS_SALVAGE_WRITE_ROOT_INODES,
    BOS_SALVAGE_DONT_WRITE_ROOT_INODES
} bos_WriteRootInodes_t, *bos_WriteRootInodes_p;

typedef enum {
    BOS_SALVAGE_FORCE_DIRECTORIES,
    BOS_SALVAGE_DONT_FORCE_DIRECTORIES
} bos_ForceDirectory_t, *bos_ForceDirectory_p;

typedef enum {
    BOS_SALVAGE_FORCE_BLOCK_READS,
    BOS_SALVAGE_DONT_FORCE_BLOCK_READS
} bos_ForceBlockRead_t, *bos_ForceBlockRead_p;

extern int ADMINAPI bos_ServerOpen(const void *cellHandle,
				   const char *serverName,
				   void **serverHandleP, afs_status_p st);

extern int ADMINAPI bos_ServerClose(const void *serverHandle,
				    afs_status_p st);

extern int ADMINAPI bos_ProcessCreate(const void *serverHandle,
				      char *processName,
				      bos_ProcessType_t processType,
				      char *process,
				      char *cronTime,
				      char *notifier, afs_status_p st);

extern int ADMINAPI bos_FSProcessCreate(const void *serverHandle,
					char *processName,
					char *fileserverPath,
					char *volserverPath,
					char *salvagerPath,
					char *notifier,
					afs_status_p st);

extern int ADMINAPI bos_ProcessDelete(const void *serverHandle,
				      char *processName,
				      afs_status_p st);

extern int ADMINAPI bos_ProcessExecutionStateGet(const void *serverHandle,
						 char *processName,
						 bos_ProcessExecutionState_p
						 processStatusP,
						 char *auxiliaryProcessStatus,
						 afs_status_p st);

extern int ADMINAPI bos_ProcessExecutionStateSet(const void *serverHandle,
						 const char *processName,
						 const bos_ProcessExecutionState_t
						 processStatus,
						 afs_status_p st);

extern int ADMINAPI bos_ProcessExecutionStateSetTemporary(const void
							  *serverHandle, char
							  *processName,
							  bos_ProcessExecutionState_t
							  processStatus,
							  afs_status_p st);

extern int ADMINAPI bos_ProcessNameGetBegin(const void *serverHandle,
					    void **iterationIdP,
					    afs_status_p st);

extern int ADMINAPI bos_ProcessNameGetNext(const void *iterationId,
					   char *processName,
					   afs_status_p st);

extern int ADMINAPI bos_ProcessNameGetDone(const void *iterationId,
					   afs_status_p st);

extern int ADMINAPI bos_ProcessInfoGet(const void *serverHandle,
				       char *processName,
				       bos_ProcessType_p processTypeP,
				       bos_ProcessInfo_p processInfoP,
				       afs_status_p st);

extern int ADMINAPI bos_ProcessParameterGetBegin(const void *serverHandle,
						 const char *processName,
						 void **iterationIdP,
						 afs_status_p st);

extern int ADMINAPI bos_ProcessParameterGetNext(const void *iterationId,
						char *parameter,
						afs_status_p st);

extern int ADMINAPI bos_ProcessParameterGetDone(const void *iterationId,
						afs_status_p st);

extern int ADMINAPI bos_ProcessNotifierGet(const void *serverHandle,
					   const char *processName,
					   char *notifier, afs_status_p st);

extern int ADMINAPI bos_ProcessRestart(const void *serverHandle,
				       const char *processName,
				       afs_status_p st);

extern int ADMINAPI bos_ProcessAllStop(const void *serverHandle,
				       afs_status_p st);

extern int ADMINAPI bos_ProcessAllStart(const void *serverHandle,
					afs_status_p st);

extern int ADMINAPI bos_ProcessAllWaitStop(const void *serverHandle,
					   afs_status_p st);

extern int ADMINAPI bos_ProcessAllWaitTransition(const void *serverHandle,
						 afs_status_p st);

extern int ADMINAPI bos_ProcessAllStopAndRestart(const void *serverHandle,
						 bos_RestartBosServer_t
						 restartBosServer,
						 afs_status_p st);

extern int ADMINAPI bos_AdminCreate(const void *serverHandle,
				    const char *adminName, afs_status_p st);

extern int ADMINAPI bos_AdminDelete(const void *serverHandle,
				    const char *adminName, afs_status_p st);

extern int ADMINAPI bos_AdminGetBegin(const void *serverHandle,
				      void **iterationIdP, afs_status_p st);

extern int ADMINAPI bos_AdminGetNext(const void *iterationId, char *adminName,
				     afs_status_p st);

extern int ADMINAPI bos_AdminGetDone(const void *iterationId,
				     afs_status_p st);

extern int ADMINAPI bos_KeyCreate(const void *serverHandle,
				  int keyVersionNumber,
				  const kas_encryptionKey_p key,
				  afs_status_p st);

extern int ADMINAPI bos_KeyDelete(const void *serverHandle,
				  int keyVersionNumber, afs_status_p st);

extern int ADMINAPI bos_KeyGetBegin(const void *serverHandle,
				    void **iterationIdP, afs_status_p st);

extern int ADMINAPI bos_KeyGetNext(const void *iterationId,
				   bos_KeyInfo_p keyP, afs_status_p st);

extern int ADMINAPI bos_KeyGetDone(const void *iterationId, afs_status_p st);

extern int ADMINAPI bos_CellSet(const void *serverHandle,
				const char *cellName, afs_status_p st);

extern int ADMINAPI bos_CellGet(const void *serverHandle, char *cellName,
				afs_status_p st);

extern int ADMINAPI bos_HostCreate(const void *serverHandle,
				   const char *hostName, afs_status_p st);

extern int ADMINAPI bos_HostDelete(const void *serverHandle,
				   const char *hostName, afs_status_p st);

extern int ADMINAPI bos_HostGetBegin(const void *serverHandle,
				     void **iterationIdP, afs_status_p st);

extern int ADMINAPI bos_HostGetNext(const void *iterationId, char *hostName,
				    afs_status_p st);

extern int ADMINAPI bos_HostGetDone(const void *iterationId, afs_status_p st);

extern int ADMINAPI bos_ExecutableCreate(const void *serverHandle,
					 const char *sourceFile,
					 const char *destFile,
					 afs_status_p st);

extern int ADMINAPI bos_ExecutableRevert(const void *serverHandle,
					 const char *execFile,
					 afs_status_p st);

extern int ADMINAPI bos_ExecutableTimestampGet(const void *serverHandle,
					       const char *execFile,
					       afs_int32 *newTime,
					       afs_int32 *oldTime,
					       afs_int32 *bakTime,
					       afs_status_p st);

extern int ADMINAPI bos_ExecutablePrune(const void *serverHandle,
					bos_Prune_t oldFiles,
					bos_Prune_t bakFiles,
					bos_Prune_t coreFiles,
					afs_status_p st);

extern int ADMINAPI bos_ExecutableRestartTimeSet(const void *serverHandle,
						 bos_Restart_t type,
						 bos_RestartTime_t time,
						 afs_status_p st);

extern int ADMINAPI bos_ExecutableRestartTimeGet(const void *serverHandle,
						 bos_Restart_t type,
						 bos_RestartTime_p timeP,
						 afs_status_p st);

extern int ADMINAPI bos_LogGet(const void *serverHandle, const char *log,
			       unsigned long *logBufferSizeP, char *logData,
			       afs_status_p st);

extern int ADMINAPI bos_AuthSet(const void *serverHandle, bos_Auth_t auth,
				afs_status_p st);

extern int ADMINAPI bos_CommandExecute(const void *serverHandle,
				       const char *command, afs_status_p st);

extern int ADMINAPI bos_Salvage(const void *cellHandle,
				const void *serverHandle,
				const char *partitionName,
				const char *volumeName, int numSalvagers,
				const char *tmpDir, const char *logFile,
				vos_force_t force,
				bos_SalvageDamagedVolumes_t
				salvageDamagedVolumes,
				bos_WriteInodes_t writeInodes,
				bos_WriteRootInodes_t writeRootInodes,
				bos_ForceDirectory_t forceDirectory,
				bos_ForceBlockRead_t forceBlockRead,
				afs_status_p st);

static_inline struct bozo_key *
kas_to_bozoptr(kas_encryptionKey_p key)
{
    return (struct bozo_key *)key;
}
#endif /* OPENAFS_BOS_ADMIN_H */