errstring.h revision 90792
190792Sgshapiro/* 290792Sgshapiro * Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. 390792Sgshapiro * All rights reserved. 490792Sgshapiro * 590792Sgshapiro * By using this file, you agree to the terms and conditions set 690792Sgshapiro * forth in the LICENSE file which can be found at the top level of 790792Sgshapiro * the sendmail distribution. 890792Sgshapiro * 990792Sgshapiro * 1090792Sgshapiro * $Id: errstring.h,v 1.4 2001/06/07 20:04:53 ca Exp $ 1190792Sgshapiro */ 1290792Sgshapiro 1390792Sgshapiro/* 1490792Sgshapiro** Error codes. 1590792Sgshapiro*/ 1690792Sgshapiro 1790792Sgshapiro#ifndef SM_ERRSTRING_H 1890792Sgshapiro# define SM_ERRSTRING_H 1990792Sgshapiro 2090792Sgshapiro#include <errno.h> 2190792Sgshapiroextern int errno; 2290792Sgshapiro 2390792Sgshapiro/* 2490792Sgshapiro** These are used in a few cases where we need some special 2590792Sgshapiro** error codes, but where the system doesn't provide something 2690792Sgshapiro** reasonable. They are printed in sm_errstring. 2790792Sgshapiro*/ 2890792Sgshapiro 2990792Sgshapiro#ifndef E_PSEUDOBASE 3090792Sgshapiro# define E_PSEUDOBASE 256 3190792Sgshapiro#endif /* ! E_PSEUDOBASE */ 3290792Sgshapiro 3390792Sgshapiro#define E_SM_OPENTIMEOUT (E_PSEUDOBASE + 0) /* Timeout on file open */ 3490792Sgshapiro#define E_SM_NOSLINK (E_PSEUDOBASE + 1) /* Symbolic links not allowed */ 3590792Sgshapiro#define E_SM_NOHLINK (E_PSEUDOBASE + 2) /* Hard links not allowed */ 3690792Sgshapiro#define E_SM_REGONLY (E_PSEUDOBASE + 3) /* Regular files only */ 3790792Sgshapiro#define E_SM_ISEXEC (E_PSEUDOBASE + 4) /* Executable files not allowed */ 3890792Sgshapiro#define E_SM_WWDIR (E_PSEUDOBASE + 5) /* World writable directory */ 3990792Sgshapiro#define E_SM_GWDIR (E_PSEUDOBASE + 6) /* Group writable directory */ 4090792Sgshapiro#define E_SM_FILECHANGE (E_PSEUDOBASE + 7) /* File changed after open */ 4190792Sgshapiro#define E_SM_WWFILE (E_PSEUDOBASE + 8) /* World writable file */ 4290792Sgshapiro#define E_SM_GWFILE (E_PSEUDOBASE + 9) /* Group writable file */ 4390792Sgshapiro#define E_SM_GRFILE (E_PSEUDOBASE + 10) /* g readable file */ 4490792Sgshapiro#define E_SM_WRFILE (E_PSEUDOBASE + 11) /* o readable file */ 4590792Sgshapiro#define E_DNSBASE (E_PSEUDOBASE + 20) /* base for DNS h_errno */ 4690792Sgshapiro#define E_SMDBBASE (E_PSEUDOBASE + 40) /* base for libsmdb errors */ 4790792Sgshapiro#define E_LDAPBASE (E_PSEUDOBASE + 70) /* base for LDAP errors */ 4890792Sgshapiro 4990792Sgshapiro/* libsmdb */ 5090792Sgshapiro#define SMDBE_OK 0 5190792Sgshapiro#define SMDBE_MALLOC (E_SMDBBASE + 1) 5290792Sgshapiro#define SMDBE_GDBM_IS_BAD (E_SMDBBASE + 2) 5390792Sgshapiro#define SMDBE_UNSUPPORTED (E_SMDBBASE + 3) 5490792Sgshapiro#define SMDBE_DUPLICATE (E_SMDBBASE + 4) 5590792Sgshapiro#define SMDBE_BAD_OPEN (E_SMDBBASE + 5) 5690792Sgshapiro#define SMDBE_NOT_FOUND (E_SMDBBASE + 6) 5790792Sgshapiro#define SMDBE_UNKNOWN_DB_TYPE (E_SMDBBASE + 7) 5890792Sgshapiro#define SMDBE_UNSUPPORTED_DB_TYPE (E_SMDBBASE + 8) 5990792Sgshapiro#define SMDBE_INCOMPLETE (E_SMDBBASE + 9) 6090792Sgshapiro#define SMDBE_KEY_EMPTY (E_SMDBBASE + 10) 6190792Sgshapiro#define SMDBE_KEY_EXIST (E_SMDBBASE + 11) 6290792Sgshapiro#define SMDBE_LOCK_DEADLOCK (E_SMDBBASE + 12) 6390792Sgshapiro#define SMDBE_LOCK_NOT_GRANTED (E_SMDBBASE + 13) 6490792Sgshapiro#define SMDBE_LOCK_NOT_HELD (E_SMDBBASE + 14) 6590792Sgshapiro#define SMDBE_RUN_RECOVERY (E_SMDBBASE + 15) 6690792Sgshapiro#define SMDBE_IO_ERROR (E_SMDBBASE + 16) 6790792Sgshapiro#define SMDBE_READ_ONLY (E_SMDBBASE + 17) 6890792Sgshapiro#define SMDBE_DB_NAME_TOO_LONG (E_SMDBBASE + 18) 6990792Sgshapiro#define SMDBE_INVALID_PARAMETER (E_SMDBBASE + 19) 7090792Sgshapiro#define SMDBE_ONLY_SUPPORTS_ONE_CURSOR (E_SMDBBASE + 20) 7190792Sgshapiro#define SMDBE_NOT_A_VALID_CURSOR (E_SMDBBASE + 21) 7290792Sgshapiro#define SMDBE_LAST_ENTRY (E_SMDBBASE + 22) 7390792Sgshapiro#define SMDBE_OLD_VERSION (E_SMDBBASE + 23) 7490792Sgshapiro 7590792Sgshapiroextern const char * 7690792Sgshapirosm_errstring __P(( 7790792Sgshapiro int _errno)); 7890792Sgshapiro 7990792Sgshapiro#endif /* SM_ERRSTRING_H */ 80