[6793] in Athena Bugs

home help back first fref pref prev next nref lref last post

Patches for lp quota stuff

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Fri Jan 4 15:22:14 1991

Date: Fri, 4 Jan 91 15:22:33 -0500
From: "Barr3y Jaspan" <bjaspan@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU


In order to build lpquota with -DDEBUG, I had to make the following
changes.  

o Had to add a defn. for gquota_debug in qmain.c
o Had to define  progname and quota_debug for "dump_db" (added to dump_db.c)
o same for restore_db, bill_db, gdump_db,  grestore_db, gbill_db
o gfoobar_db also required a defn for gquota_debug

Here's the patches.

*** /tmp/,RCSt1a05393	Fri Jan  4 15:17:22 1991
--- qmain.c	Tue Dec 11 17:03:20 1990
***************
*** 1,7 ****
  /*
!  *	$Source: /source/lpr/quota/RCS/qmain.c,v $
   *	$Author: epeisach $
!  *	$Header: /source/lpr/quota/RCS/qmain.c,v 1.10 90/11/16 15:06:49 epeisach Audited $
   */
  
  /*
--- 1,7 ----
  /*
!  *	$Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/qmain.c,v $
   *	$Author: epeisach $
!  *	$Header: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/qmain.c,v 1.10 90/11/16 15:06:49 epeisach Audited $
   */
  
  /*
***************
*** 11,17 ****
  
  
  #if (!defined(lint) && !defined(SABER))
! static char qmain_rcsid[] = "$Header: /source/lpr/quota/RCS/qmain.c,v 1.10 90/11/16 15:06:49 epeisach Audited $";
  #endif (!defined(lint) && !defined(SABER))
  
  #include "mit-copyright.h"
--- 11,17 ----
  
  
  #if (!defined(lint) && !defined(SABER))
! static char qmain_rcsid[] = "$Header: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/qmain.c,v 1.10 90/11/16 15:06:49 epeisach Audited $";
  #endif (!defined(lint) && !defined(SABER))
  
  #include "mit-copyright.h"
***************
*** 50,57 ****
  char *bp = pbuf;
  
  #ifdef DEBUG
! int quota_debug=0;
! int logger_debug=0;
  #endif
  
  char aclname[MAXPATHLEN];       /* Acl filename */
--- 50,58 ----
  char *bp = pbuf;
  
  #ifdef DEBUG
! int quota_debug=1;
! int gquota_debug=1;
! int logger_debug=1;
  #endif
  
  char aclname[MAXPATHLEN];       /* Acl filename */
***************
*** 398,403 ****
--- 399,410 ----
  	/* Frob the realms and instance properly... */
  	make_kname(princ, inst, realm, name);
  	parse_username(name, princ, inst, realm);
+ 
+ #ifdef DEBUG
+ 	syslog(LOG_DEBUG, "Reqest: %s, %s, acct # %d\n", 
+ 	       princ, service, acct);
+ #endif DEBUG
+ 
  	if (QD) {
  	    /* Quota server is marked as down */
  	    /* Allow everyone to print */
*** /tmp/,RCSt1a05399	Fri Jan  4 15:17:40 1991
--- dump_db.c	Fri Dec  7 15:20:15 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/dump_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/dump_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 8,13 ****
--- 8,20 ----
  #include <stdio.h>
  #include <signal.h>
  #include "quota_db.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ #endif
  
  FILE *fp;
  int clean;
*** /tmp/,RCSt1a05402	Fri Jan  4 15:17:48 1991
--- restore_db.c	Fri Dec  7 15:24:53 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/restore_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/restore_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 8,13 ****
--- 8,20 ----
  #include <stdio.h>
  #include <strings.h>
  #include "quota_db.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ #endif
  
  int quota_db_create(), quota_db_set_name();
  
*** /tmp/,RCSt1a05405	Fri Jan  4 15:17:56 1991
--- bill_db.c	Fri Dec  7 15:25:37 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/bill_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/bill_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 12,17 ****
--- 12,24 ----
  #include <signal.h>
  #include "quota_db.h"
  #include "quota.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ #endif
  
  /* Define all codes that that the bursar files will use. */
  #define STUFF "SU1"
*** /tmp/,RCSt1a05408	Fri Jan  4 15:18:03 1991
--- gdump_db.c	Fri Dec  7 15:26:51 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/gdump_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/gdump_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 8,13 ****
--- 8,21 ----
  #include <stdio.h>
  #include <signal.h>
  #include "gquota_db.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ int gquota_debug=1;
+ #endif
  
  FILE *fp;
  int clean;
*** /tmp/,RCSt1a05411	Fri Jan  4 15:18:22 1991
--- grestore_db.c	Fri Dec  7 15:27:23 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/grestore_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/grestore_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 8,13 ****
--- 8,21 ----
  #include <stdio.h>
  #include <strings.h>
  #include "gquota_db.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ int gquota_debug=1;
+ #endif
  
  int gquota_db_create(), gquota_db_set_name();
  
*** /tmp/,RCSt1a05414	Fri Jan  4 15:18:32 1991
--- gbill_db.c	Fri Dec  7 15:28:01 1990
***************
*** 1,4 ****
! /* $Source: /source/lpr/quota/RCS/gbill_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
--- 1,4 ----
! /* $Source: /afs/rel-eng.athena.mit.edu/project/lpr/src/quota/RCS/gbill_db.c,v $ */
  /* $Author: epeisach $ */
  
  /*
***************
*** 12,17 ****
--- 12,25 ----
  #include <signal.h>
  #include "gquota_db.h"
  #include "quota.h"
+ 
+ /* These have to be defined here because quota_dba.o declares them */
+ /* extern.   Normally, the are declared in qmain.c. */
+ #ifdef DEBUG
+ char *progname = "dump_db";
+ int quota_debug=1;
+ int gquota_debug=1;
+ #endif
  
  /* Define all codes that that the bursar files will use. */
  #define STUFF "SU1"

home help back first fref pref prev next nref lref last post