]> andersk Git - moira.git/blame - dbck/dbck.h
Check list memacls.
[moira.git] / dbck / dbck.h
CommitLineData
d2543f8c 1/* $Header$
2 *
2ce085d2 3 * Declarations for Moira database consistancy checker
d2543f8c 4 *
5 * (c) Copyright 1988 by the Massachusetts Institute of Technology.
6 * For copying and distribution information, please see the file
7 * <mit-copyright.h>.
8 */
9
d2543f8c 10#include <mit-copyright.h>
7ac48069 11#include <moira_site.h>
cfc4f91e 12#include <moira_schema.h>
d2543f8c 13
14#define MODE_ASK 1
15#define MODE_NO 2
16#define MODE_PREEN 3
17#define MODE_YES 4
18
6f4e78e6 19extern int debug, mode, fast, dcmenable, warn;
fe0a844a 20extern struct hash *users, *machines, *clusters, *lists, *printservers;
ab05f33a 21extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
d2543f8c 22
23#define MAX_ID_VALUE 32765
24#define MIN_ID_VALUE 100
25
5eaef520 26#define dprintf if (debug) printf
d2543f8c 27
28struct user {
cfc4f91e 29 char login[USERS_LOGIN_SIZE];
ab05f33a 30 char potype;
31 char *fullname;
32 int status;
33 int users_id;
34 int pobox_id;
35 int comment;
36 int modby;
37 int fmodby;
38 int pmodby;
39 int sigwho;
d2543f8c 40};
41
42struct machine {
cfc4f91e 43 char name[MACHINE_NAME_SIZE];
ab05f33a 44 char owner_type;
45 int owner_id;
46 int snet_id;
47 int mach_id;
48 int clucount;
49 int acomment;
50 int ocomment;
51 int creator;
52 int modby;
53};
54
55struct subnet {
cfc4f91e 56 char name[SUBNET_NAME_SIZE];
ab05f33a 57 char owner_type;
58 int owner_id;
59 int snet_id;
60 int modby;
d2543f8c 61};
62
63struct cluster {
cfc4f91e 64 char name[CLUSTERS_NAME_SIZE];
5eaef520 65 int clu_id;
66 int modby;
d2543f8c 67};
68
69struct list {
cfc4f91e 70 char name[LIST_NAME_SIZE];
5eaef520 71 char acl_type;
ad47bcbe 72 char memacl_type;
5eaef520 73 int list_id;
cfc4f91e 74 int acl_id;
ad47bcbe 75 int memacl_id;
cfc4f91e 76 int modby;
5eaef520 77 int members;
d2543f8c 78};
79
80struct string {
5eaef520 81 char *name;
82 int string_id;
83 int refc;
d2543f8c 84};
85
86struct filesys {
cfc4f91e 87 char name[FILESYS_LABEL_SIZE];
88 char dir[FILESYS_NAME_SIZE];
5eaef520 89 char type;
90 int filsys_id;
91 int mach_id;
92 int owner;
93 int owners;
94 int phys_id;
d2543f8c 95};
96
97struct nfsphys {
cfc4f91e 98 char dir[NFSPHYS_DIR_SIZE];
5eaef520 99 int mach_id;
100 int nfsphys_id;
101 int allocated;
cfc4f91e 102 int modby;
5eaef520 103 int count;
d2543f8c 104};
7ac48069 105
fe0a844a 106struct printserver {
107 int mach_id;
108 int printer_types;
109 char owner_type;
110 int owner_id;
111 int lpc_acl;
112 int modby;
113};
114
7ac48069 115void dbmserr(void);
116void out_of_mem(char *msg);
117void cleanup(void);
118
119void modified(char *table);
120
121void phase1(void);
122void phase2(void);
123void phase3(void);
124void phase4(void);
125void count_only_setup(void);
126
127/* prototypes from fix.pc */
128void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
129 char *idfield, int preen);
130void single_delete(char *table, char *idfield, int id);
131void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
132int single_fix(char *msg, int preen);
133void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
134 void (*ffunc)(void *), int preen);
135int prompt(char *msg);
136int set_next_object_id(char *object, char *tablename);
137int generic_fix_id(char *tbl, char *idfield, char *txtfield,
138 int oldid, char *name);
139
140/* prototypes from phase3.pc */
141struct string *string_check(int id);
This page took 0.104114 seconds and 5 git commands to generate.