This file is indexed.

/usr/src/openafs-1.8.0pre5/include/afs/cellconfig.h is in openafs-modules-dkms 1.8.0~pre5-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
/*
 * cellconfig.h:
 * This file is automatically generated; please do not edit it.
 */
/* Including ./cellconfig.p.h at beginning of cellconfig.h file. */

/*
 * 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
 */

/*
cellconfig.h:

    Interface to the routines used by the FileServer to manipulate the cell/server database
    for the Cellular Andrew system, along with an operation to determine the name of the
    local cell.  Included are a string variable used to hold the local cell name, definitions for
    the database file format and routines for:
        1) Acquiring the local cell name.
        2) Reading in the cell/server database from disk.
        3) Reporting the set of servers associated with a given cell name.
        4) Printing out the contents of the cell/server database.
        5) Reclaiming the space used by an in-memory database.

Creation date:
    17 August 1987

--------------------------------------------------------------------------------------------------------------*/

#ifndef __CELLCONFIG_AFS_INCL_
#define	__CELLCONFIG_AFS_INCL_	1

#ifndef IPPROTO_MAX
	/* get sockaddr_in */
#ifdef AFS_NT40_ENV
#include <winsock2.h>
#else
#include <sys/types.h>
#include <netinet/in.h>
#endif
#endif
#include <rx/rx_opaque.h>
#include <opr/queue.h>

#define	MAXCELLCHARS	64
#define	MAXHOSTCHARS	64
#define MAXHOSTSPERCELL  8

/*
 * Return codes.
 */
#define	AFSCONF_SUCCESS	  0	/* worked */

/*
 * Complete server info for one cell.
 */
struct afsconf_cell {
    char name[MAXCELLCHARS];	/*Cell name */
    short numServers;		/*Num active servers for the cell */
    short flags;		/* useful flags */
    struct sockaddr_in hostAddr[MAXHOSTSPERCELL];	/*IP addresses for cell's servers */
    char hostName[MAXHOSTSPERCELL][MAXHOSTCHARS];	/*Names for cell's servers */
    char *linkedCell;		/* Linked cell name, if any */
    int timeout;		/* Data timeout, if non-zero */
};

#define AFSCONF_CELL_FLAG_DNS_QUERIED   1

struct afsconf_cellalias {
    char aliasName[MAXCELLCHARS];
    char realName[MAXCELLCHARS];
};

struct afsconf_entry {
    struct afsconf_entry *next;	/* next guy in afsconf_dir */
    struct afsconf_cell cellInfo;	/* info for this cell */
};

struct afsconf_aliasentry {
    struct afsconf_aliasentry *next;
    struct afsconf_cellalias aliasInfo;
};

/*!
 * A set of bit flags to control the selection of a security object
 */
#define AFSCONF_SECOPTS_NOAUTH        0x1
#define AFSCONF_SECOPTS_LOCALAUTH     0x2
#define AFSCONF_SECOPTS_ALWAYSENCRYPT 0x4
#define AFSCONF_SECOPTS_FALLBACK_NULL 0x8
typedef afs_uint32 afsconf_secflags;

struct afsconf_dir {
    char *name;			/* pointer to dir prefix */
    char *cellName;		/* cell name, if any, we're in */
    struct afsconf_entry *entries;	/* list of cell entries */
    struct opr_queue keyList;		/* list of keys */
    afs_int32 timeRead;		/* time stamp of file last read */
    afs_int32 timeCheck;	/* time of last check for update */
    struct afsconf_aliasentry *alias_entries;	/* cell aliases */
    afsconf_secflags securityFlags;
    struct afsconf_realms *local_realms;        /* local realms */
    struct afsconf_realms *exclusions;          /* excluded principals */
};

extern afs_int32 afsconf_FindService(const char *aname);
extern const char *afsconf_FindIANAName(const char *aname);
extern struct afsconf_dir *afsconf_Open(const char *adir);
extern int afsconf_CellApply(struct afsconf_dir *adir,
			     int (*aproc) (struct afsconf_cell * cell,
					   void *arock,
					   struct afsconf_dir * dir),
			     void *arock);
extern int afsconf_CellAliasApply(struct afsconf_dir *adir,
				  int (*aproc) (struct afsconf_cellalias *
						alias, void *arock,
						struct afsconf_dir * dir),
				  void *arock);
extern int afsconf_GetExtendedCellInfo(struct afsconf_dir *adir,
				       char *acellName, char *aservice,
				       struct afsconf_cell *acellInfo,
				       char clones[]);
extern int afsconf_GetAfsdbInfo(char *acellName, char *aservice,
				struct afsconf_cell *acellInfo);
extern int afsconf_GetCellInfo(struct afsconf_dir *adir, char *acellName,
			       char *aservice,
			       struct afsconf_cell *acellInfo);
extern int afsconf_GetLocalCell(struct afsconf_dir *adir,
				char *aname, afs_int32 alen);
extern int afsconf_Close(struct afsconf_dir *adir);
extern int afsconf_UpToDate(void *rock);

struct afsconf_keys;
extern int afsconf_GetKeys(struct afsconf_dir *adir,
			   struct afsconf_keys *astr);

struct ktc_encryptionKey;
extern afs_int32 afsconf_GetLatestKey(struct afsconf_dir *adir,
				      afs_int32 * avno,
				      struct ktc_encryptionKey *akey);
extern int afsconf_GetKey(void *rock, int avno,
			  struct ktc_encryptionKey *akey);
extern int afsconf_AddKey(struct afsconf_dir *adir, afs_int32 akvno,
			  char akey[8], afs_int32 overwrite);
extern int afsconf_DeleteKey(struct afsconf_dir *adir, afs_int32 akvno);

struct afsconf_typedKey;
struct afsconf_typedKeyList {
    int nkeys;
    struct afsconf_typedKey **keys;
};

typedef enum {
    afsconf_rxkad = 0,
    afsconf_rxgk  =1,
    afsconf_rxkad_krb5  =2
} afsconf_keyType;

extern struct afsconf_typedKey *
	afsconf_typedKey_get(struct afsconf_typedKey *);
extern void afsconf_typedKey_put(struct afsconf_typedKey **);
extern struct afsconf_typedKey *
	afsconf_typedKey_new(afsconf_keyType type, int kvno,
			     int subType, struct rx_opaque *key);
extern void afsconf_typedKey_free(struct afsconf_typedKey **);

extern void afsconf_typedKey_values(struct afsconf_typedKey *key,
				  afsconf_keyType *type,
				  int *kvno,
				  int *minorType,
				  struct rx_opaque **keyMaterial);

extern int afsconf_GetAllKeys(struct afsconf_dir *,
			      struct afsconf_typedKeyList **);
extern int afsconf_GetKeysByType(struct afsconf_dir *dir,
				 afsconf_keyType type, int kvno,
				 struct afsconf_typedKeyList **);
extern int afsconf_GetKeyByTypes(struct afsconf_dir *dir,
				 afsconf_keyType type, int kvno, int subType,
				 struct afsconf_typedKey **);
extern int afsconf_GetLatestKeysByType(struct afsconf_dir *dir,
				       afsconf_keyType type,
				       struct afsconf_typedKeyList **);
extern int afsconf_GetLatestKeyByTypes(struct afsconf_dir *dir,
				       afsconf_keyType type, int subType,
				       struct afsconf_typedKey **);
extern void afsconf_PutTypedKeyList(struct afsconf_typedKeyList **keys);
extern int afsconf_AddTypedKey(struct afsconf_dir *dir,
			       struct afsconf_typedKey *key,
			       int overwrite);
extern int afsconf_DeleteKeyByType(struct afsconf_dir *dir,
				   afsconf_keyType type, int kvno);
extern int afsconf_DeleteKeyBySubType(struct afsconf_dir *dir,
				      afsconf_keyType type, int kvno,
				      int subType);

/* authcon.c */
struct rx_securityClass;
extern afs_int32 afsconf_ServerAuth(void *arock,
				    struct rx_securityClass **,
				    afs_int32 *);
extern afs_int32 afsconf_ClientAuth(void *arock,
				    struct rx_securityClass **astr,
				    afs_int32 * aindex);
extern afs_int32 afsconf_ClientAuthSecure(void *arock,
				          struct rx_securityClass **astr,
				          afs_int32 * aindex);


extern afs_int32 afsconf_ClientAuthToken(struct afsconf_cell *info,
					 afsconf_secflags flags,
					 struct rx_securityClass **sc,
					 afs_int32 *scIndex,
					 time_t *expires);


extern afs_int32 afsconf_PickClientSecObj(struct afsconf_dir *dir,
					  afsconf_secflags flags,
					  struct afsconf_cell *info,
					  char *cellName,
					  struct rx_securityClass **sc,
					  afs_int32 *scIndex,
					  time_t *expires);

extern void afsconf_SetSecurityFlags(struct afsconf_dir *dir,
				     afsconf_secflags flags);

extern void afsconf_BuildServerSecurityObjects(void *,
					       struct rx_securityClass ***,
					       afs_int32 *);

/* writeconfig.c */
int afsconf_SetExtendedCellInfo(struct afsconf_dir *adir, const char *apath,
				struct afsconf_cell *acellInfo, char clones[]);
int afsconf_SetCellInfo(struct afsconf_dir *adir, const char *apath,
		        struct afsconf_cell *acellInfo);


/* userok.c */

struct rx_call;
struct rx_identity;
extern int afsconf_CheckAuth(void *arock, struct rx_call *acall);
extern int afsconf_GetNoAuthFlag(struct afsconf_dir *adir);
extern void afsconf_SetNoAuthFlag(struct afsconf_dir *adir, int aflag);
extern int afsconf_DeleteUser(struct afsconf_dir *adir, char *auser);
extern int afsconf_DeleteIdentity(struct afsconf_dir *, struct rx_identity *);
extern int afsconf_GetNthUser(struct afsconf_dir *adir, afs_int32 an,
			      char *abuffer, afs_int32 abufferLen);
extern int afsconf_GetNthIdentity(struct afsconf_dir *, int,
				  struct rx_identity **);
extern int afsconf_AddUser(struct afsconf_dir *adir, char *aname);
extern int afsconf_AddIdentity(struct afsconf_dir *adir, struct rx_identity *);
extern int afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall,
                             char *namep);
extern int afsconf_SuperIdentity(struct afsconf_dir *, struct rx_call *,
				 struct rx_identity **);
extern int afsconf_IsSuperIdentity(struct afsconf_dir *, struct rx_identity *);
extern int afsconf_CheckRestrictedQuery(struct afsconf_dir *adir,
					struct rx_call *acall,
					int needed_level);

/*
 * Level constants for the -restricted_query option used by vlserver
 * and volser.  Once we have vlserver and volserver to ptserver
 * connection, we can add more access levels, like AUTHUSER or
 * AUTHANDFOREIGNUSER.
 */
#define RESTRICTED_QUERY_ANYUSER  0
#define RESTRICTED_QUERY_ADMIN    1

/* realms.c */
extern int afsconf_SetLocalRealm(const char *realm);
extern int afsconf_IsLocalRealmMatch(struct afsconf_dir *dir, afs_int32 * local,
				const char *name, const char *instance,
				const char *cell);

/* netrestrict.c */

extern int afsconf_ParseNetRestrictFile(afs_uint32 outAddrs[],
					afs_uint32 * mask, afs_uint32 * mtu,
					afs_uint32 maxAddrs, afs_uint32 * nAddrs,
					char reason[], const char *fileName);

extern int afsconf_ParseNetFiles(afs_uint32 addrbuf[], afs_uint32 maskbuf[],
				 afs_uint32 mtubuf[], afs_uint32 max,
				 char reason[], const char *niFileName,
				 const char *nrFileName);

/* some well-known ports and their names; new additions to table in cellconfig.c, too */
#define	AFSCONF_FILESERVICE		"afs"
#define	AFSCONF_FILEPORT		7000
#define	AFSCONF_CALLBACKSERVICE		"afscb"
#define	AFSCONF_CALLBACKPORT		7001
#define	AFSCONF_PROTSERVICE		"afsprot"
#define	AFSCONF_PROTPORT		7002
#define	AFSCONF_VLDBSERVICE		"afsvldb"
#define	AFSCONF_VLDBPORT		7003
#define	AFSCONF_KAUTHSERVICE		"afskauth"
#define	AFSCONF_KAUTHPORT		7004
#define	AFSCONF_VOLUMESERVICE		"afsvol"
#define	AFSCONF_VOLUMEPORT		7005
#define	AFSCONF_ERRORSERVICE		"afserror"
#define	AFSCONF_ERRORPORT		7006
#define	AFSCONF_NANNYSERVICE		"afsnanny"
#define	AFSCONF_NANNYPORT		7007
#define	AFSCONF_UPDATESERVICE		"afsupdate"
#define	AFSCONF_UPDATEPORT		7008
#define	AFSCONF_RMTSYSSERVICE		"afsrmtsys"
#define	AFSCONF_RMTSYSPORT		7009
#define AFSCONF_RSDBSERVICE             "afsres"
#define AFSCONF_RESPORT                 7010
#define AFSCONF_REMIODBSERVICE          "afsremio"
#define AFSCONF_REMIOPORT               7011

#endif /* __CELLCONFIG_AFS_INCL_ */

/* End of prolog file ./cellconfig.p.h. */

#define AFSCONF_FAILURE                          (70354688L)
#define AFSCONF_NOTFOUND                         (70354689L)
#define AFSCONF_UNKNOWN                          (70354690L)
#define AFSCONF_NOCELL                           (70354691L)
#define AFSCONF_SYNTAX                           (70354692L)
#define AFSCONF_NODB                             (70354693L)
#define AFSCONF_FULL                             (70354694L)
#define AFSCONF_NOCELLDB                         (70354695L)
#define AFSCONF_NO_SECURITY_CLASS                (70354696L)
#define AFSCONF_BADKEY                           (70354697L)
#define AFSCONF_NOCELLNAME                       (70354698L)
extern void initialize_ACFG_error_table(void);
#define ERROR_TABLE_BASE_ACFG (70354688L)

/* for compatibility with older versions... */
#define init_ACFG_err_tbl initialize_ACFG_error_table
#define ACFG_err_base ERROR_TABLE_BASE_ACFG

/* for compatibility with other users... */
#define ERROR_TABLE_BASE_acfg (70354688L)
#define init_acfg_err_tbl initialize_ACFG_error_table
#define initialize_acfg_error_table initialize_ACFG_error_table
#define acfg_err_base ERROR_TABLE_BASE_acfg