~ubuntu-branches/ubuntu/hoary/mailman/hoary-security

« back to all changes in this revision

Viewing changes to src/common.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2004-10-11 02:02:43 UTC
  • Revision ID: james.westby@ubuntu.com-20041011020243-ukiishnhlkmsoh21
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* common.h --- Prototypes for common routines
 
2
 *
 
3
 * Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU General Public License
 
7
 * as published by the Free Software Foundation; either version 2
 
8
 * of the License, or (at your option) any later version.
 
9
 *
 
10
 * This program is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 * GNU General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU General Public License
 
16
 * along with this program; if not, write to the Free Software
 
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 */
 
19
 
 
20
#include <stdlib.h>
 
21
#include <stdarg.h>
 
22
#ifdef HAVE_SYSLOG_H
 
23
#include <syslog.h>
 
24
#endif /* HAVE_SYSLOG_H */
 
25
#include <stdio.h>
 
26
#include <string.h>
 
27
#include <errno.h>
 
28
#include <sys/types.h>
 
29
#include <grp.h>
 
30
#include <unistd.h>
 
31
 
 
32
/* GETGROUPS_T gets set in the makefile by configure */
 
33
#define GID_T GETGROUPS_T
 
34
 
 
35
extern void fatal(const char*, int, char*, ...);
 
36
extern void check_caller(const char*, const char*);
 
37
extern int run_script(const char*, int, char**, char**);
 
38
 
 
39
/* Global variable used as a flag. */
 
40
extern int running_as_cgi;
 
41
 
 
42
/* Extern to reference this global from one of the wrapper mains */
 
43
extern const char* logident;
 
44
 
 
45
/* Exit codes, so it's easier to distinguish what caused fatal errors when
 
46
 * looking at syslogs.
 
47
 */
 
48
#define GROUP_MISMATCH 2
 
49
#define SETREGID_FAILURE 3
 
50
#define EXECVE_FAILURE 4
 
51
#define MAIL_USAGE_ERROR 5
 
52
#define MAIL_ILLEGAL_COMMAND 6
 
53
#define ADDALIAS_USAGE_ERROR 7
 
54
#define GROUP_NAME_NOT_FOUND 8
 
55
 
 
56
 
 
57
/*
 
58
 * Local Variables:
 
59
 * c-file-style: "python"
 
60
 * End:
 
61
 */