home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume16 / deliver / part01 / deliver.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-11-14  |  2.6 KB  |  81 lines

  1. /* $Header: deliver.h,v 1.3 88/09/14 19:41:50 network Exp $
  2.  *
  3.  * General pull-it-together include file.
  4.  *
  5.  * $Log:    deliver.h,v $
  6.  * Revision 1.3  88/09/14  19:41:50  network
  7.  * Portability to System V and BSD.
  8.  * General fixup.
  9.  * 
  10.  * Revision 1.2  88/08/30  16:13:03  network
  11.  * Add copystr().
  12.  * 
  13.  * Revision 1.1  88/06/06  09:36:49  chip
  14.  * Initial revision
  15.  * 
  16.  */
  17.  
  18. #include <stdio.h>
  19. #include <fcntl.h>
  20. #include <ctype.h>
  21.  
  22. #include "config.h"
  23. #include "misc.h"
  24. #include "context.h"
  25. #include "dest.h"
  26.  
  27. /*----------------------------------------------------------------------
  28.  * Global data
  29.  */
  30.  
  31. extern  int     verbose;        /* Print debugging messages?            */
  32. extern  int     dryrun;         /* Are we making a dry run?             */
  33. extern  int     printaddrs;     /* Address resolution only?             */
  34. extern  int     leavetemps;     /* Leave temp files for later perusal   */
  35. extern  int     boxdelivery;    /* Args are mailboxes, not addresses    */
  36. extern  char    *sender;        /* Who is sending this message?         */
  37.  
  38. extern  char    *progname;      /* Name this program was invoked under  */
  39. extern  char    *hostname;      /* Name of this host                    */
  40.  
  41. extern  char    *sys_deliver;   /* Systemwide delivery file             */
  42. extern  char    *user_deliver;  /* User delivery file                   */
  43. extern  char    *shell;         /* Shell used to run delivery files     */
  44.  
  45. extern  int     eff_uid;        /* Returned by geteuid()                */
  46. extern  int     eff_gid;        /* Returned by getegid()                */
  47. extern  int     real_uid;       /* Returned by getuid()                 */
  48. extern  int     real_gid;       /* Returned by getgid()                 */
  49.  
  50. extern  CONTEXT *eff_ct;        /* Context of effective uid             */
  51. extern  CONTEXT *real_ct;       /* Context of real uid                  */
  52.  
  53. /* Temp file indices: */
  54. #define T_HEADER 0      /* Temp file for message header         */
  55. #define T_BODY   1      /* Temp file for message body           */
  56. #define T_MAX    2      /* Number of temp files                 */
  57.  
  58. extern  char    *ttype[T_MAX];  /* Temp file types (for messages)       */
  59. extern  char    *tfile[T_MAX];  /* Temp file names                      */
  60. extern  int     tfd[T_MAX];     /* Temp file fd's                       */
  61.  
  62. /*----------------------------------------------------------------------
  63.  * Global functions
  64.  */
  65.  
  66. char    *basename();
  67. char    *gethost();
  68. char    *copystr();
  69. char    *zalloc();
  70. char    *srealloc();
  71.  
  72. CONTEXT *name_context();
  73. CONTEXT *uid_context();
  74.  
  75. FILE    *ct_popenv();
  76. int     ct_pclose();
  77.  
  78. DEST    *dest();
  79. DEST    *first_dest();
  80. DEST    *next_dest();
  81.