190792Sgshapiro/* 290792Sgshapiro * Copyright (c) 2001 Sendmail, Inc. and its suppliers. 390792Sgshapiro * All rights reserved. 490792Sgshapiro * Copyright (c) 1987, 1993 590792Sgshapiro * The Regents of the University of California. All rights reserved. 690792Sgshapiro * 790792Sgshapiro * By using this file, you agree to the terms and conditions set 890792Sgshapiro * forth in the LICENSE file which can be found at the top level of 990792Sgshapiro * the sendmail distribution. 1090792Sgshapiro * 1198121Sgshapiro * $Id: sysexits.h,v 1.5 2001/03/10 17:30:01 ca Exp $ 1290792Sgshapiro * @(#)sysexits.h 8.1 (Berkeley) 6/2/93 1390792Sgshapiro */ 1490792Sgshapiro 1590792Sgshapiro#ifndef SM_SYSEXITS_H 1690792Sgshapiro# define SM_SYSEXITS_H 1790792Sgshapiro 1890792Sgshapiro# include <sm/gen.h> 1990792Sgshapiro 2090792Sgshapiro/* 2190792Sgshapiro** SYSEXITS.H -- Exit status codes for system programs. 2290792Sgshapiro** 2390792Sgshapiro** This include file attempts to categorize possible error 2490792Sgshapiro** exit statuses for system programs, notably delivermail 2590792Sgshapiro** and the Berkeley network. 2690792Sgshapiro** 2790792Sgshapiro** Error numbers begin at EX__BASE to reduce the possibility of 2890792Sgshapiro** clashing with other exit statuses that random programs may 2990792Sgshapiro** already return. The meaning of the codes is approximately 3090792Sgshapiro** as follows: 3190792Sgshapiro** 3290792Sgshapiro** EX_USAGE -- The command was used incorrectly, e.g., with 3390792Sgshapiro** the wrong number of arguments, a bad flag, a bad 3490792Sgshapiro** syntax in a parameter, or whatever. 3590792Sgshapiro** EX_DATAERR -- The input data was incorrect in some way. 3690792Sgshapiro** This should only be used for user's data & not 3790792Sgshapiro** system files. 3890792Sgshapiro** EX_NOINPUT -- An input file (not a system file) did not 3990792Sgshapiro** exist or was not readable. This could also include 4090792Sgshapiro** errors like "No message" to a mailer (if it cared 4190792Sgshapiro** to catch it). 4290792Sgshapiro** EX_NOUSER -- The user specified did not exist. This might 4390792Sgshapiro** be used for mail addresses or remote logins. 4490792Sgshapiro** EX_NOHOST -- The host specified did not exist. This is used 4590792Sgshapiro** in mail addresses or network requests. 4690792Sgshapiro** EX_UNAVAILABLE -- A service is unavailable. This can occur 4790792Sgshapiro** if a support program or file does not exist. This 4890792Sgshapiro** can also be used as a catchall message when something 4990792Sgshapiro** you wanted to do doesn't work, but you don't know 5090792Sgshapiro** why. 5190792Sgshapiro** EX_SOFTWARE -- An internal software error has been detected. 5290792Sgshapiro** This should be limited to non-operating system related 5390792Sgshapiro** errors as possible. 5490792Sgshapiro** EX_OSERR -- An operating system error has been detected. 5590792Sgshapiro** This is intended to be used for such things as "cannot 5690792Sgshapiro** fork", "cannot create pipe", or the like. It includes 5790792Sgshapiro** things like getuid returning a user that does not 5890792Sgshapiro** exist in the passwd file. 5990792Sgshapiro** EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp, 6090792Sgshapiro** etc.) does not exist, cannot be opened, or has some 6190792Sgshapiro** sort of error (e.g., syntax error). 6290792Sgshapiro** EX_CANTCREAT -- A (user specified) output file cannot be 6390792Sgshapiro** created. 6490792Sgshapiro** EX_IOERR -- An error occurred while doing I/O on some file. 6590792Sgshapiro** EX_TEMPFAIL -- temporary failure, indicating something that 6690792Sgshapiro** is not really an error. In sendmail, this means 6790792Sgshapiro** that a mailer (e.g.) could not create a connection, 6890792Sgshapiro** and the request should be reattempted later. 6990792Sgshapiro** EX_PROTOCOL -- the remote system returned something that 7090792Sgshapiro** was "not possible" during a protocol exchange. 7190792Sgshapiro** EX_NOPERM -- You did not have sufficient permission to 7290792Sgshapiro** perform the operation. This is not intended for 7390792Sgshapiro** file system problems, which should use NOINPUT or 7490792Sgshapiro** CANTCREAT, but rather for higher level permissions. 7590792Sgshapiro*/ 7690792Sgshapiro 7790792Sgshapiro# if SM_CONF_SYSEXITS_H 7890792Sgshapiro# include <sysexits.h> 7990792Sgshapiro# else /* SM_CONF_SYSEXITS_H */ 8090792Sgshapiro 8190792Sgshapiro# define EX_OK 0 /* successful termination */ 8290792Sgshapiro 8390792Sgshapiro# define EX__BASE 64 /* base value for error messages */ 8490792Sgshapiro 8590792Sgshapiro# define EX_USAGE 64 /* command line usage error */ 8690792Sgshapiro# define EX_DATAERR 65 /* data format error */ 8790792Sgshapiro# define EX_NOINPUT 66 /* cannot open input */ 8890792Sgshapiro# define EX_NOUSER 67 /* addressee unknown */ 8990792Sgshapiro# define EX_NOHOST 68 /* host name unknown */ 9090792Sgshapiro# define EX_UNAVAILABLE 69 /* service unavailable */ 9190792Sgshapiro# define EX_SOFTWARE 70 /* internal software error */ 9290792Sgshapiro# define EX_OSERR 71 /* system error (e.g., can't fork) */ 9390792Sgshapiro# define EX_OSFILE 72 /* critical OS file missing */ 9490792Sgshapiro# define EX_CANTCREAT 73 /* can't create (user) output file */ 9590792Sgshapiro# define EX_IOERR 74 /* input/output error */ 9690792Sgshapiro# define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */ 9790792Sgshapiro# define EX_PROTOCOL 76 /* remote error in protocol */ 9890792Sgshapiro# define EX_NOPERM 77 /* permission denied */ 9990792Sgshapiro# define EX_CONFIG 78 /* configuration error */ 10090792Sgshapiro 10190792Sgshapiro# define EX__MAX 78 /* maximum listed value */ 10290792Sgshapiro 10390792Sgshapiro# endif /* SM_CONF_SYSEXITS_H */ 10490792Sgshapiro 10590792Sgshapiroextern char *sm_strexit __P((int)); 10690792Sgshapiroextern char *sm_sysexitmsg __P((int)); 10790792Sgshapiroextern char *sm_sysexmsg __P((int)); 10890792Sgshapiro 10990792Sgshapiro#endif /* ! SM_SYSEXITS_H */ 110