1
/* common.h --- Prototypes for common routines
3
* Copyright (C) 1998,1999,2000,2001,2002 by the Free Software Foundation, Inc.
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.
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.
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.
24
#endif /* HAVE_SYSLOG_H */
28
#include <sys/types.h>
32
/* GETGROUPS_T gets set in the makefile by configure */
33
#define GID_T GETGROUPS_T
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**);
39
/* Global variable used as a flag. */
40
extern int running_as_cgi;
42
/* Extern to reference this global from one of the wrapper mains */
43
extern const char* logident;
45
/* Exit codes, so it's easier to distinguish what caused fatal errors when
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
59
* c-file-style: "python"