auth: fix afsconf_GetExtendedCellInfo memory leak
[openafs.git] / src / auth / cellconfig.p.h
index c641fc3..c9423c0 100644 (file)
@@ -58,6 +58,7 @@ struct afsconf_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 clone[MAXHOSTSPERCELL];                       /*Indicates which ones are clones */
     char *linkedCell;          /* Linked cell name, if any */
     int timeout;               /* Data timeout, if non-zero */
 };
@@ -91,6 +92,7 @@ typedef afs_uint32 afsconf_secflags;
 struct afsconf_dir {
     char *name;                        /* pointer to dir prefix */
     char *cellName;            /* cell name, if any, we're in */
+    char *cellservDB;          /* pathname of the CellServDB file */
     struct afsconf_entry *entries;     /* list of cell entries */
     struct opr_queue keyList;          /* list of keys */
     afs_int32 timeRead;                /* time stamp of file last read */
@@ -254,6 +256,18 @@ extern int afsconf_SuperUser(struct afsconf_dir *adir, struct rx_call *acall,
 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);