1*cf1d77f7Schristos /*	$NetBSD: sysexits-compat.h,v 1.3 2021/08/14 16:14:55 christos Exp $	*/
24e6df137Slukem 
333197c6aStron /* $OpenLDAP$ */
42de962bdSlukem /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
52de962bdSlukem  *
6*cf1d77f7Schristos  * Copyright 1998-2021 The OpenLDAP Foundation.
72de962bdSlukem  * All rights reserved.
82de962bdSlukem  *
92de962bdSlukem  * Redistribution and use in source and binary forms, with or without
102de962bdSlukem  * modification, are permitted only as authorized by the OpenLDAP
112de962bdSlukem  * Public License.
122de962bdSlukem  *
132de962bdSlukem  * A copy of this license is available in file LICENSE in the
142de962bdSlukem  * top-level directory of the distribution or, alternatively, at
152de962bdSlukem  * <http://www.OpenLDAP.org/license.html>.
162de962bdSlukem  */
172de962bdSlukem /* Portions Copyright (c) 1987 Regents of the University of California.
182de962bdSlukem  * All rights reserved.
192de962bdSlukem  *
202de962bdSlukem  * Redistribution and use in source and binary forms are permitted
212de962bdSlukem  * provided that the above copyright notice and this paragraph are
222de962bdSlukem  * duplicated in all such forms and that any documentation,
232de962bdSlukem  * advertising materials, and other materials related to such
242de962bdSlukem  * distribution and use acknowledge that the software was developed
252de962bdSlukem  * by the University of California, Berkeley.  The name of the
262de962bdSlukem  * University may not be used to endorse or promote products derived
272de962bdSlukem  * from this software without specific prior written permission.
282de962bdSlukem  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
292de962bdSlukem  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
302de962bdSlukem  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
312de962bdSlukem  *
322de962bdSlukem  *	@(#)sysexits.h	4.5 (Berkeley) 7/6/88
332de962bdSlukem  */
342de962bdSlukem 
352de962bdSlukem /*
362de962bdSlukem **  SYSEXITS.H -- Exit status codes for system programs.
372de962bdSlukem **
382de962bdSlukem **	This include file attempts to categorize possible error
392de962bdSlukem **	exit statuses for system programs, notably delivermail
402de962bdSlukem **	and the Berkeley network.
412de962bdSlukem **
422de962bdSlukem **	Error numbers begin at EX__BASE to reduce the possibility of
432de962bdSlukem **	clashing with other exit statuses that random programs may
442de962bdSlukem **	already return.  The meaning of the codes is approximately
452de962bdSlukem **	as follows:
462de962bdSlukem **
472de962bdSlukem **	EX_USAGE -- The command was used incorrectly, e.g., with
482de962bdSlukem **		the wrong number of arguments, a bad flag, a bad
492de962bdSlukem **		syntax in a parameter, or whatever.
502de962bdSlukem **	EX_DATAERR -- The input data was incorrect in some way.
512de962bdSlukem **		This should only be used for user's data & not
522de962bdSlukem **		system files.
532de962bdSlukem **	EX_NOINPUT -- An input file (not a system file) did not
542de962bdSlukem **		exist or was not readable.  This could also include
552de962bdSlukem **		errors like "No message" to a mailer (if it cared
562de962bdSlukem **		to catch it).
572de962bdSlukem **	EX_NOUSER -- The user specified did not exist.  This might
582de962bdSlukem **		be used for mail addresses or remote logins.
592de962bdSlukem **	EX_NOHOST -- The host specified did not exist.  This is used
602de962bdSlukem **		in mail addresses or network requests.
612de962bdSlukem **	EX_UNAVAILABLE -- A service is unavailable.  This can occur
622de962bdSlukem **		if a support program or file does not exist.  This
632de962bdSlukem **		can also be used as a catchall message when something
642de962bdSlukem **		you wanted to do doesn't work, but you don't know
652de962bdSlukem **		why.
662de962bdSlukem **	EX_SOFTWARE -- An internal software error has been detected.
672de962bdSlukem **		This should be limited to non-operating system related
682de962bdSlukem **		errors as possible.
692de962bdSlukem **	EX_OSERR -- An operating system error has been detected.
702de962bdSlukem **		This is intended to be used for such things as "cannot
712de962bdSlukem **		fork", "cannot create pipe", or the like.  It includes
722de962bdSlukem **		things like getuid returning a user that does not
732de962bdSlukem **		exist in the passwd file.
742de962bdSlukem **	EX_OSFILE -- Some system file (e.g., /etc/passwd, /etc/utmp,
752de962bdSlukem **		etc.) does not exist, cannot be opened, or has some
762de962bdSlukem **		sort of error (e.g., syntax error).
772de962bdSlukem **	EX_CANTCREAT -- A (user specified) output file cannot be
782de962bdSlukem **		created.
792de962bdSlukem **	EX_IOERR -- An error occurred while doing I/O on some file.
802de962bdSlukem **	EX_TEMPFAIL -- temporary failure, indicating something that
812de962bdSlukem **		is not really an error.  In sendmail, this means
822de962bdSlukem **		that a mailer (e.g.) could not create a connection,
832de962bdSlukem **		and the request should be reattempted later.
842de962bdSlukem **	EX_PROTOCOL -- the remote system returned something that
852de962bdSlukem **		was "not possible" during a protocol exchange.
862de962bdSlukem **	EX_NOPERM -- You did not have sufficient permission to
872de962bdSlukem **		perform the operation.  This is not intended for
882de962bdSlukem **		file system problems, which should use NOINPUT or
892de962bdSlukem **		CANTCREAT, but rather for higher level permissions.
902de962bdSlukem **		For example, kre uses this to restrict who students
912de962bdSlukem **		can send mail to.
922de962bdSlukem **
932de962bdSlukem **	Maintained by Eric Allman (eric@berkeley, ucbvax!eric) --
942de962bdSlukem **		please mail changes to me.
952de962bdSlukem **
962de962bdSlukem **			@(#)sysexits.h	4.5		7/6/88
972de962bdSlukem */
982de962bdSlukem 
992de962bdSlukem # define EX_OK		0	/* successful termination */
1002de962bdSlukem 
1012de962bdSlukem # define EX__BASE	64	/* base value for error messages */
1022de962bdSlukem 
1032de962bdSlukem # define EX_USAGE	64	/* command line usage error */
1042de962bdSlukem # define EX_DATAERR	65	/* data format error */
1052de962bdSlukem # define EX_NOINPUT	66	/* cannot open input */
1062de962bdSlukem # define EX_NOUSER	67	/* addressee unknown */
1072de962bdSlukem # define EX_NOHOST	68	/* host name unknown */
1082de962bdSlukem # define EX_UNAVAILABLE	69	/* service unavailable */
1092de962bdSlukem # define EX_SOFTWARE	70	/* internal software error */
1102de962bdSlukem # define EX_OSERR	71	/* system error (e.g., can't fork) */
1112de962bdSlukem # define EX_OSFILE	72	/* critical OS file missing */
1122de962bdSlukem # define EX_CANTCREAT	73	/* can't create (user) output file */
1132de962bdSlukem # define EX_IOERR	74	/* input/output error */
1142de962bdSlukem # define EX_TEMPFAIL	75	/* temp failure; user is invited to retry */
1152de962bdSlukem # define EX_PROTOCOL	76	/* remote error in protocol */
1162de962bdSlukem # define EX_NOPERM	77	/* permission denied */
1172de962bdSlukem # define EX_CONFIG	78	/* configuration error */
118