140266059SGregory Neil Shapiro /* 25dd76dd0SGregory Neil Shapiro * Copyright (c) 2001 Proofpoint, Inc. and its suppliers. 340266059SGregory Neil Shapiro * All rights reserved. 440266059SGregory Neil Shapiro * Copyright (c) 1987, 1993 540266059SGregory Neil Shapiro * The Regents of the University of California. All rights reserved. 640266059SGregory Neil Shapiro * 740266059SGregory Neil Shapiro * By using this file, you agree to the terms and conditions set 840266059SGregory Neil Shapiro * forth in the LICENSE file which can be found at the top level of 940266059SGregory Neil Shapiro * the sendmail distribution. 1040266059SGregory Neil Shapiro * 114313cc83SGregory Neil Shapiro * $Id: sysexits.h,v 1.6 2013-11-22 20:51:31 ca Exp $ 1240266059SGregory Neil Shapiro * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 1340266059SGregory Neil Shapiro */ 1440266059SGregory Neil Shapiro 1540266059SGregory Neil Shapiro #ifndef SM_SYSEXITS_H 1640266059SGregory Neil Shapiro # define SM_SYSEXITS_H 1740266059SGregory Neil Shapiro 1840266059SGregory Neil Shapiro # include <sm/gen.h> 1940266059SGregory Neil Shapiro 2040266059SGregory Neil Shapiro /* 2140266059SGregory Neil Shapiro ** SYSEXITS.H -- Exit status codes for system programs. 2240266059SGregory Neil Shapiro ** 2340266059SGregory Neil Shapiro ** This include file attempts to categorize possible error 2440266059SGregory Neil Shapiro ** exit statuses for system programs, notably delivermail 2540266059SGregory Neil Shapiro ** and the Berkeley network. 2640266059SGregory Neil Shapiro ** 2740266059SGregory Neil Shapiro ** Error numbers begin at EX__BASE to reduce the possibility of 2840266059SGregory Neil Shapiro ** clashing with other exit statuses that random programs may 2940266059SGregory Neil Shapiro ** already return. The meaning of the codes is approximately 3040266059SGregory Neil Shapiro ** as follows: 3140266059SGregory Neil Shapiro ** 3240266059SGregory Neil Shapiro ** EX_USAGE -- The command was used incorrectly, e.g., with 3340266059SGregory Neil Shapiro ** the wrong number of arguments, a bad flag, a bad 3440266059SGregory Neil Shapiro ** syntax in a parameter, or whatever. 3540266059SGregory Neil Shapiro ** EX_DATAERR -- The input data was incorrect in some way. 3640266059SGregory Neil Shapiro ** This should only be used for user's data & not 3740266059SGregory Neil Shapiro ** system files. 3840266059SGregory Neil Shapiro ** EX_NOINPUT -- An input file (not a system file) did not 3940266059SGregory Neil Shapiro ** exist or was not readable. This could also include 4040266059SGregory Neil Shapiro ** errors like "No message" to a mailer (if it cared 4140266059SGregory Neil Shapiro ** to catch it). 4240266059SGregory Neil Shapiro ** EX_NOUSER -- The user specified did not exist. This might 4340266059SGregory Neil Shapiro ** be used for mail addresses or remote logins. 4440266059SGregory Neil Shapiro ** EX_NOHOST -- The host specified did not exist. This is used 4540266059SGregory Neil Shapiro ** in mail addresses or network requests. 4640266059SGregory Neil Shapiro ** EX_UNAVAILABLE -- A service is unavailable. This can occur 4740266059SGregory Neil Shapiro ** if a support program or file does not exist. This 4840266059SGregory Neil Shapiro ** can also be used as a catchall message when something 4940266059SGregory Neil Shapiro ** you wanted to do doesn't work, but you don't know 5040266059SGregory Neil Shapiro ** why. 5140266059SGregory Neil Shapiro ** EX_SOFTWARE -- An internal software error has been detected. 5240266059SGregory Neil Shapiro ** This should be limited to non-operating system related 5340266059SGregory Neil Shapiro ** errors as possible. 5440266059SGregory Neil Shapiro ** EX_OSERR -- An operating system error has been detected. 5540266059SGregory Neil Shapiro ** This is intended to be used for such things as "cannot 5640266059SGregory Neil Shapiro ** fork", "cannot create pipe", or the like. It includes 5740266059SGregory Neil Shapiro ** things like getuid returning a user that does not 5840266059SGregory Neil Shapiro ** exist in the passwd file. 5940266059SGregory Neil Shapiro ** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, 6040266059SGregory Neil Shapiro ** etc.) does not exist, cannot be opened, or has some 6140266059SGregory Neil Shapiro ** sort of error (e.g., syntax error). 6240266059SGregory Neil Shapiro ** EX_CANTCREAT -- A (user specified) output file cannot be 6340266059SGregory Neil Shapiro ** created. 6440266059SGregory Neil Shapiro ** EX_IOERR -- An error occurred while doing I/O on some file. 6540266059SGregory Neil Shapiro ** EX_TEMPFAIL -- temporary failure, indicating something that 6640266059SGregory Neil Shapiro ** is not really an error. In sendmail, this means 6740266059SGregory Neil Shapiro ** that a mailer (e.g.) could not create a connection, 6840266059SGregory Neil Shapiro ** and the request should be reattempted later. 6940266059SGregory Neil Shapiro ** EX_PROTOCOL -- the remote system returned something that 7040266059SGregory Neil Shapiro ** was "not possible" during a protocol exchange. 7140266059SGregory Neil Shapiro ** EX_NOPERM -- You did not have sufficient permission to 7240266059SGregory Neil Shapiro ** perform the operation. This is not intended for 7340266059SGregory Neil Shapiro ** file system problems, which should use NOINPUT or 7440266059SGregory Neil Shapiro ** CANTCREAT, but rather for higher level permissions. 7540266059SGregory Neil Shapiro */ 7640266059SGregory Neil Shapiro 77*2fb4f839SGregory Neil Shapiro # ifdef EX_OK 78*2fb4f839SGregory Neil Shapiro # undef EX_OK /* for SVr4.2 SMP */ 79*2fb4f839SGregory Neil Shapiro # endif 80*2fb4f839SGregory Neil Shapiro 8140266059SGregory Neil Shapiro # if SM_CONF_SYSEXITS_H 8240266059SGregory Neil Shapiro # include <sysexits.h> 8340266059SGregory Neil Shapiro # else /* SM_CONF_SYSEXITS_H */ 8440266059SGregory Neil Shapiro 8540266059SGregory Neil Shapiro # define EX_OK 0 /* successful termination */ 8640266059SGregory Neil Shapiro 8740266059SGregory Neil Shapiro # define EX__BASE 64 /* base value for error messages */ 8840266059SGregory Neil Shapiro 8940266059SGregory Neil Shapiro # define EX_USAGE 64 /* command line usage error */ 9040266059SGregory Neil Shapiro # define EX_DATAERR 65 /* data format error */ 9140266059SGregory Neil Shapiro # define EX_NOINPUT 66 /* cannot open input */ 9240266059SGregory Neil Shapiro # define EX_NOUSER 67 /* addressee unknown */ 9340266059SGregory Neil Shapiro # define EX_NOHOST 68 /* host name unknown */ 9440266059SGregory Neil Shapiro # define EX_UNAVAILABLE 69 /* service unavailable */ 9540266059SGregory Neil Shapiro # define EX_SOFTWARE 70 /* internal software error */ 9640266059SGregory Neil Shapiro # define EX_OSERR 71 /* system error (e.g., can't fork) */ 9740266059SGregory Neil Shapiro # define EX_OSFILE 72 /* critical OS file missing */ 9840266059SGregory Neil Shapiro # define EX_CANTCREAT 73 /* can't create (user) output file */ 9940266059SGregory Neil Shapiro # define EX_IOERR 74 /* input/output error */ 10040266059SGregory Neil Shapiro # define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ 10140266059SGregory Neil Shapiro # define EX_PROTOCOL 76 /* remote error in protocol */ 10240266059SGregory Neil Shapiro # define EX_NOPERM 77 /* permission denied */ 10340266059SGregory Neil Shapiro # define EX_CONFIG 78 /* configuration error */ 10440266059SGregory Neil Shapiro 10540266059SGregory Neil Shapiro # define EX__MAX 78 /* maximum listed value */ 10640266059SGregory Neil Shapiro 10740266059SGregory Neil Shapiro # endif /* SM_CONF_SYSEXITS_H */ 10840266059SGregory Neil Shapiro 10940266059SGregory Neil Shapiro extern char *sm_strexit __P((int)); 11040266059SGregory Neil Shapiro extern char *sm_sysexitmsg __P((int)); 11140266059SGregory Neil Shapiro extern char *sm_sysexmsg __P((int)); 11240266059SGregory Neil Shapiro 11340266059SGregory Neil Shapiro #endif /* ! SM_SYSEXITS_H */ 114