summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin/sendmail/include/sm/errstring.h
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-09-11 18:55:53 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-09-11 18:55:53 +0000
commit4643c616c81fb1198b29c3eaff4d697392c8dc4b (patch)
tree4afa26a5f1a2ef0e47061eb08b6d339bc7e8dad1 /gnu/usr.sbin/sendmail/include/sm/errstring.h
parent8afe339a41c898cc4a2d42d03d115b16f2053bad (diff)
sendmail 8.12.0 with $Id tags converted to $Sendmail
Diffstat (limited to 'gnu/usr.sbin/sendmail/include/sm/errstring.h')
-rw-r--r--gnu/usr.sbin/sendmail/include/sm/errstring.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/gnu/usr.sbin/sendmail/include/sm/errstring.h b/gnu/usr.sbin/sendmail/include/sm/errstring.h
new file mode 100644
index 00000000000..2dde92ec987
--- /dev/null
+++ b/gnu/usr.sbin/sendmail/include/sm/errstring.h
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers.
+ * All rights reserved.
+ *
+ * By using this file, you agree to the terms and conditions set
+ * forth in the LICENSE file which can be found at the top level of
+ * the sendmail distribution.
+ *
+ *
+ * $Sendmail: errstring.h,v 1.4 2001/06/07 20:04:53 ca Exp $
+ */
+
+/*
+** Error codes.
+*/
+
+#ifndef SM_ERRSTRING_H
+# define SM_ERRSTRING_H
+
+#include <errno.h>
+extern int errno;
+
+/*
+** These are used in a few cases where we need some special
+** error codes, but where the system doesn't provide something
+** reasonable. They are printed in sm_errstring.
+*/
+
+#ifndef E_PSEUDOBASE
+# define E_PSEUDOBASE 256
+#endif /* ! E_PSEUDOBASE */
+
+#define E_SM_OPENTIMEOUT (E_PSEUDOBASE + 0) /* Timeout on file open */
+#define E_SM_NOSLINK (E_PSEUDOBASE + 1) /* Symbolic links not allowed */
+#define E_SM_NOHLINK (E_PSEUDOBASE + 2) /* Hard links not allowed */
+#define E_SM_REGONLY (E_PSEUDOBASE + 3) /* Regular files only */
+#define E_SM_ISEXEC (E_PSEUDOBASE + 4) /* Executable files not allowed */
+#define E_SM_WWDIR (E_PSEUDOBASE + 5) /* World writable directory */
+#define E_SM_GWDIR (E_PSEUDOBASE + 6) /* Group writable directory */
+#define E_SM_FILECHANGE (E_PSEUDOBASE + 7) /* File changed after open */
+#define E_SM_WWFILE (E_PSEUDOBASE + 8) /* World writable file */
+#define E_SM_GWFILE (E_PSEUDOBASE + 9) /* Group writable file */
+#define E_SM_GRFILE (E_PSEUDOBASE + 10) /* g readable file */
+#define E_SM_WRFILE (E_PSEUDOBASE + 11) /* o readable file */
+#define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */
+#define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */
+#define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */
+
+/* libsmdb */
+#define SMDBE_OK 0
+#define SMDBE_MALLOC (E_SMDBBASE + 1)
+#define SMDBE_GDBM_IS_BAD (E_SMDBBASE + 2)
+#define SMDBE_UNSUPPORTED (E_SMDBBASE + 3)
+#define SMDBE_DUPLICATE (E_SMDBBASE + 4)
+#define SMDBE_BAD_OPEN (E_SMDBBASE + 5)
+#define SMDBE_NOT_FOUND (E_SMDBBASE + 6)
+#define SMDBE_UNKNOWN_DB_TYPE (E_SMDBBASE + 7)
+#define SMDBE_UNSUPPORTED_DB_TYPE (E_SMDBBASE + 8)
+#define SMDBE_INCOMPLETE (E_SMDBBASE + 9)
+#define SMDBE_KEY_EMPTY (E_SMDBBASE + 10)
+#define SMDBE_KEY_EXIST (E_SMDBBASE + 11)
+#define SMDBE_LOCK_DEADLOCK (E_SMDBBASE + 12)
+#define SMDBE_LOCK_NOT_GRANTED (E_SMDBBASE + 13)
+#define SMDBE_LOCK_NOT_HELD (E_SMDBBASE + 14)
+#define SMDBE_RUN_RECOVERY (E_SMDBBASE + 15)
+#define SMDBE_IO_ERROR (E_SMDBBASE + 16)
+#define SMDBE_READ_ONLY (E_SMDBBASE + 17)
+#define SMDBE_DB_NAME_TOO_LONG (E_SMDBBASE + 18)
+#define SMDBE_INVALID_PARAMETER (E_SMDBBASE + 19)
+#define SMDBE_ONLY_SUPPORTS_ONE_CURSOR (E_SMDBBASE + 20)
+#define SMDBE_NOT_A_VALID_CURSOR (E_SMDBBASE + 21)
+#define SMDBE_LAST_ENTRY (E_SMDBBASE + 22)
+#define SMDBE_OLD_VERSION (E_SMDBBASE + 23)
+
+extern const char *
+sm_errstring __P((
+ int _errno));
+
+#endif /* SM_ERRSTRING_H */