]> andersk Git - moira.git/blobdiff - dbck/dbck.h
Deal with tracking creation times for users.
[moira.git] / dbck / dbck.h
index aacebee2ab9623ffb630723e05fb4be91de588f4..51eb68aced4e0d4807cc2023ede2680b0d43fa4a 100644 (file)
@@ -7,8 +7,9 @@
  *  <mit-copyright.h>.
  */
 
-#include <moira_site.h>
 #include <mit-copyright.h>
+#include <moira_site.h>
+#include <moira_schema.h>
 
 #define MODE_ASK 1
 #define MODE_NO 2
@@ -16,7 +17,7 @@
 #define MODE_YES 4
 
 extern int debug, mode, fast, dcmenable, warn;
-extern struct hash *users, *machines, *clusters, *lists;
+extern struct hash *users, *machines, *clusters, *lists, *printservers;
 extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
 
 #define MAX_ID_VALUE 32765
@@ -25,7 +26,7 @@ extern struct hash *filesys, *nfsphys, *strings, *subnets, *string_dups;
 #define dprintf if (debug) printf
 
 struct user {
-  char login[9];
+  char login[USERS_LOGIN_SIZE];
   char potype;
   char *fullname;
   int status;
@@ -39,7 +40,7 @@ struct user {
 };
 
 struct machine {
-  char name[33];
+  char name[MACHINE_NAME_SIZE];
   char owner_type;
   int owner_id;
   int snet_id;
@@ -52,7 +53,7 @@ struct machine {
 };
 
 struct subnet {
-  char name[33];
+  char name[SUBNET_NAME_SIZE];
   char owner_type;
   int owner_id;
   int snet_id;
@@ -60,16 +61,19 @@ struct subnet {
 };
 
 struct cluster {
-  char name[33];
+  char name[CLUSTERS_NAME_SIZE];
   int clu_id;
   int modby;
 };
 
 struct list {
-  char name[33];
+  char name[LIST_NAME_SIZE];
   char acl_type;
+  char memacl_type;
   int list_id;
-  int  acl_id;
+  int acl_id;
+  int memacl_id;
+  int modby;
   int members;
 };
 
@@ -80,8 +84,8 @@ struct string {
 };
 
 struct filesys {
-  char name[33];
-  char dir[81];
+  char name[FILESYS_LABEL_SIZE];
+  char dir[FILESYS_NAME_SIZE];
   char type;
   int filsys_id;
   int mach_id;
@@ -91,9 +95,47 @@ struct filesys {
 };
 
 struct nfsphys {
-  char dir[33];
+  char dir[NFSPHYS_DIR_SIZE];
   int mach_id;
   int nfsphys_id;
   int allocated;
+  int modby;
   int count;
 };
+
+struct printserver {
+  int mach_id;
+  int printer_types;
+  char owner_type;
+  int owner_id;
+  int lpc_acl;
+  int modby;
+};
+
+void dbmserr(void);
+void out_of_mem(char *msg);
+void cleanup(void);
+
+void modified(char *table);
+
+void phase1(void);
+void phase2(void);
+void phase3(void);
+void phase4(void);
+void count_only_setup(void);
+
+/* prototypes from fix.pc */
+void generic_delete(struct save_queue *sq, int (*pfunc)(void *), char *table,
+                   char *idfield, int preen);
+void single_delete(char *table, char *idfield, int id);
+void zero_fix(char *tbl, char *zrfield, char *idfield, int id);
+int single_fix(char *msg, int preen);
+void generic_fix(struct save_queue *sq, int (*pfunc)(void *), char *msg,
+                void (*ffunc)(void *), int preen);
+int prompt(char *msg);
+int set_next_object_id(char *object, char *tablename);
+int generic_fix_id(char *tbl, char *idfield, char *txtfield,
+                  int oldid, char *name);
+
+/* prototypes from phase3.pc */
+struct string *string_check(int id);
This page took 0.036228 seconds and 4 git commands to generate.