/*-1* SPDX-License-Identifier: BSD-3-Clause2*3* Copyright (c) 2008 Apple Inc.4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14* 3. Neither the name of Apple Inc. ("Apple") nor the names of15* its contributors may be used to endorse or promote products derived16* from this software without specific prior written permission.17*18* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND19* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE20* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE21* ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR22* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL23* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS24* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)25* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,26* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING27* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE28* POSSIBILITY OF SUCH DAMAGE.29*/3031#ifndef _BSM_AUDIT_ERRNO_H_32#define _BSM_AUDIT_ERRNO_H_3334/*35* For the purposes of portable encoding, we convert between local error36* numbers and Solaris error numbers (as well as some extensions for error37* numbers that don't exist in Solaris). Although the first 35 or so38* constants are the same across all OS's, we don't handle that in any39* special way.40*41* When adding constants here, also add them to bsm_errno.c.42*/43#define BSM_ERRNO_ESUCCESS 044#define BSM_ERRNO_EPERM 145#define BSM_ERRNO_ENOENT 246#define BSM_ERRNO_ESRCH 347#define BSM_ERRNO_EINTR 448#define BSM_ERRNO_EIO 549#define BSM_ERRNO_ENXIO 650#define BSM_ERRNO_E2BIG 751#define BSM_ERRNO_ENOEXEC 852#define BSM_ERRNO_EBADF 953#define BSM_ERRNO_ECHILD 1054#define BSM_ERRNO_EAGAIN 1155#define BSM_ERRNO_ENOMEM 1256#define BSM_ERRNO_EACCES 1357#define BSM_ERRNO_EFAULT 1458#define BSM_ERRNO_ENOTBLK 1559#define BSM_ERRNO_EBUSY 1660#define BSM_ERRNO_EEXIST 1761#define BSM_ERRNO_EXDEV 1862#define BSM_ERRNO_ENODEV 1963#define BSM_ERRNO_ENOTDIR 2064#define BSM_ERRNO_EISDIR 2165#define BSM_ERRNO_EINVAL 2266#define BSM_ERRNO_ENFILE 2367#define BSM_ERRNO_EMFILE 2468#define BSM_ERRNO_ENOTTY 2569#define BSM_ERRNO_ETXTBSY 2670#define BSM_ERRNO_EFBIG 2771#define BSM_ERRNO_ENOSPC 2872#define BSM_ERRNO_ESPIPE 2973#define BSM_ERRNO_EROFS 3074#define BSM_ERRNO_EMLINK 3175#define BSM_ERRNO_EPIPE 3276#define BSM_ERRNO_EDOM 3377#define BSM_ERRNO_ERANGE 3478#define BSM_ERRNO_ENOMSG 3579#define BSM_ERRNO_EIDRM 3680#define BSM_ERRNO_ECHRNG 37 /* Solaris/Linux-specific. */81#define BSM_ERRNO_EL2NSYNC 38 /* Solaris/Linux-specific. */82#define BSM_ERRNO_EL3HLT 39 /* Solaris/Linux-specific. */83#define BSM_ERRNO_EL3RST 40 /* Solaris/Linux-specific. */84#define BSM_ERRNO_ELNRNG 41 /* Solaris/Linux-specific. */85#define BSM_ERRNO_EUNATCH 42 /* Solaris/Linux-specific. */86#define BSM_ERRNO_ENOCSI 43 /* Solaris/Linux-specific. */87#define BSM_ERRNO_EL2HLT 44 /* Solaris/Linux-specific. */88#define BSM_ERRNO_EDEADLK 4589#define BSM_ERRNO_ENOLCK 4690#define BSM_ERRNO_ECANCELED 4791#define BSM_ERRNO_ENOTSUP 4892#define BSM_ERRNO_EDQUOT 4993#define BSM_ERRNO_EBADE 50 /* Solaris/Linux-specific. */94#define BSM_ERRNO_EBADR 51 /* Solaris/Linux-specific. */95#define BSM_ERRNO_EXFULL 52 /* Solaris/Linux-specific. */96#define BSM_ERRNO_ENOANO 53 /* Solaris/Linux-specific. */97#define BSM_ERRNO_EBADRQC 54 /* Solaris/Linux-specific. */98#define BSM_ERRNO_EBADSLT 55 /* Solaris/Linux-specific. */99#define BSM_ERRNO_EDEADLOCK 56 /* Solaris-specific. */100#define BSM_ERRNO_EBFONT 57 /* Solaris/Linux-specific. */101#define BSM_ERRNO_EOWNERDEAD 58 /* Solaris/Linux-specific. */102#define BSM_ERRNO_ENOTRECOVERABLE 59 /* Solaris/Linux-specific. */103#define BSM_ERRNO_ENOSTR 60 /* Solaris/Darwin/Linux-specific. */104#define BSM_ERRNO_ENODATA 61 /* Solaris/Darwin/Linux-specific. */105#define BSM_ERRNO_ETIME 62 /* Solaris/Darwin/Linux-specific. */106#define BSM_ERRNO_ENOSR 63 /* Solaris/Darwin/Linux-specific. */107#define BSM_ERRNO_ENONET 64 /* Solaris/Linux-specific. */108#define BSM_ERRNO_ENOPKG 65 /* Solaris/Linux-specific. */109#define BSM_ERRNO_EREMOTE 66110#define BSM_ERRNO_ENOLINK 67111#define BSM_ERRNO_EADV 68 /* Solaris/Linux-specific. */112#define BSM_ERRNO_ESRMNT 69 /* Solaris/Linux-specific. */113#define BSM_ERRNO_ECOMM 70 /* Solaris/Linux-specific. */114#define BSM_ERRNO_EPROTO 71115#define BSM_ERRNO_ELOCKUNMAPPED 72 /* Solaris-specific. */116#define BSM_ERRNO_ENOTACTIVE 73 /* Solaris-specific. */117#define BSM_ERRNO_EMULTIHOP 74118#define BSM_ERRNO_EBADMSG 77119#define BSM_ERRNO_ENAMETOOLONG 78120#define BSM_ERRNO_EOVERFLOW 79121#define BSM_ERRNO_ENOTUNIQ 80 /* Solaris/Linux-specific. */122#define BSM_ERRNO_EBADFD 81 /* Solaris/Linux-specific. */123#define BSM_ERRNO_EREMCHG 82 /* Solaris/Linux-specific. */124#define BSM_ERRNO_ELIBACC 83 /* Solaris/Linux-specific. */125#define BSM_ERRNO_ELIBBAD 84 /* Solaris/Linux-specific. */126#define BSM_ERRNO_ELIBSCN 85 /* Solaris/Linux-specific. */127#define BSM_ERRNO_ELIBMAX 86 /* Solaris/Linux-specific. */128#define BSM_ERRNO_ELIBEXEC 87 /* Solaris/Linux-specific. */129#define BSM_ERRNO_EILSEQ 88130#define BSM_ERRNO_ENOSYS 89131#define BSM_ERRNO_ELOOP 90132#define BSM_ERRNO_ERESTART 91133#define BSM_ERRNO_ESTRPIPE 92 /* Solaris/Linux-specific. */134#define BSM_ERRNO_ENOTEMPTY 93135#define BSM_ERRNO_EUSERS 94136#define BSM_ERRNO_ENOTSOCK 95137#define BSM_ERRNO_EDESTADDRREQ 96138#define BSM_ERRNO_EMSGSIZE 97139#define BSM_ERRNO_EPROTOTYPE 98140#define BSM_ERRNO_ENOPROTOOPT 99141#define BSM_ERRNO_EPROTONOSUPPORT 120142#define BSM_ERRNO_ESOCKTNOSUPPORT 121143#define BSM_ERRNO_EOPNOTSUPP 122144#define BSM_ERRNO_EPFNOSUPPORT 123145#define BSM_ERRNO_EAFNOSUPPORT 124146#define BSM_ERRNO_EADDRINUSE 125147#define BSM_ERRNO_EADDRNOTAVAIL 126148#define BSM_ERRNO_ENETDOWN 127149#define BSM_ERRNO_ENETUNREACH 128150#define BSM_ERRNO_ENETRESET 129151#define BSM_ERRNO_ECONNABORTED 130152#define BSM_ERRNO_ECONNRESET 131153#define BSM_ERRNO_ENOBUFS 132154#define BSM_ERRNO_EISCONN 133155#define BSM_ERRNO_ENOTCONN 134156#define BSM_ERRNO_ESHUTDOWN 143157#define BSM_ERRNO_ETOOMANYREFS 144158#define BSM_ERRNO_ETIMEDOUT 145159#define BSM_ERRNO_ECONNREFUSED 146160#define BSM_ERRNO_EHOSTDOWN 147161#define BSM_ERRNO_EHOSTUNREACH 148162#define BSM_ERRNO_EALREADY 149163#define BSM_ERRNO_EINPROGRESS 150164#define BSM_ERRNO_ESTALE 151165166/*167* OpenBSM constants for error numbers not defined in Solaris. In the event168* that these errors are added to Solaris, we will deprecate the OpenBSM169* numbers in the same way we do for audit event constants.170*171* ELAST doesn't get a constant in the BSM space.172*/173#define BSM_ERRNO_EPROCLIM 190 /* FreeBSD/Darwin-specific. */174#define BSM_ERRNO_EBADRPC 191 /* FreeBSD/Darwin-specific. */175#define BSM_ERRNO_ERPCMISMATCH 192 /* FreeBSD/Darwin-specific. */176#define BSM_ERRNO_EPROGUNAVAIL 193 /* FreeBSD/Darwin-specific. */177#define BSM_ERRNO_EPROGMISMATCH 194 /* FreeBSD/Darwin-specific. */178#define BSM_ERRNO_EPROCUNAVAIL 195 /* FreeBSD/Darwin-specific. */179#define BSM_ERRNO_EFTYPE 196 /* FreeBSD/Darwin-specific. */180#define BSM_ERRNO_EAUTH 197 /* FreeBSD/Darwin-specific. */181#define BSM_ERRNO_ENEEDAUTH 198 /* FreeBSD/Darwin-specific. */182#define BSM_ERRNO_ENOATTR 199 /* FreeBSD/Darwin-specific. */183#define BSM_ERRNO_EDOOFUS 200 /* FreeBSD-specific. */184#define BSM_ERRNO_EJUSTRETURN 201 /* FreeBSD-specific. */185#define BSM_ERRNO_ENOIOCTL 202 /* FreeBSD-specific. */186#define BSM_ERRNO_EDIRIOCTL 203 /* FreeBSD-specific. */187#define BSM_ERRNO_EPWROFF 204 /* Darwin-specific. */188#define BSM_ERRNO_EDEVERR 205 /* Darwin-specific. */189#define BSM_ERRNO_EBADEXEC 206 /* Darwin-specific. */190#define BSM_ERRNO_EBADARCH 207 /* Darwin-specific. */191#define BSM_ERRNO_ESHLIBVERS 208 /* Darwin-specific. */192#define BSM_ERRNO_EBADMACHO 209 /* Darwin-specific. */193#define BSM_ERRNO_EPOLICY 210 /* Darwin-specific. */194#define BSM_ERRNO_EDOTDOT 211 /* Linux-specific. */195#define BSM_ERRNO_EUCLEAN 212 /* Linux-specific. */196#define BSM_ERRNO_ENOTNAM 213 /* Linux(Xenix?)-specific. */197#define BSM_ERRNO_ENAVAIL 214 /* Linux(Xenix?)-specific. */198#define BSM_ERRNO_EISNAM 215 /* Linux(Xenix?)-specific. */199#define BSM_ERRNO_EREMOTEIO 216 /* Linux-specific. */200#define BSM_ERRNO_ENOMEDIUM 217 /* Linux-specific. */201#define BSM_ERRNO_EMEDIUMTYPE 218 /* Linux-specific. */202#define BSM_ERRNO_ENOKEY 219 /* Linux-specific. */203#define BSM_ERRNO_EKEYEXPIRED 220 /* Linux-specific. */204#define BSM_ERRNO_EKEYREVOKED 221 /* Linux-specific. */205#define BSM_ERRNO_EKEYREJECTED 222 /* Linux-specific. */206#define BSM_ERRNO_ENOTCAPABLE 223 /* FreeBSD-specific. */207#define BSM_ERRNO_ECAPMODE 224 /* FreeBSD-specific. */208#define BSM_ERRNO_EINTEGRITY 225 /* FreeBSD-specific. */209210/*211* In the event that OpenBSM doesn't have a file representation of a local212* error number, use this.213*/214#define BSM_ERRNO_UNKNOWN 250 /* OpenBSM-specific. */215216#endif /* !_BSM_AUDIT_ERRNO_H_ */217218219