1 /* 2 Unix SMB/CIFS implementation. 3 DOS error code constants 4 Copyright (C) Andrew Tridgell 1992-2000 5 Copyright (C) John H Terpstra 1996-2000 6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000 7 Copyright (C) Paul Ashton 1998-2000 8 9 This program is free software; you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation; either version 2 of the License, or 12 (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 */ 23 24 #ifndef _DOSERR_H 25 #define _DOSERR_H 26 27 /* Error classes */ 28 29 #define ERRDOS 0x01 /* Error is from the core DOS operating system set. */ 30 #define ERRSRV 0x02 /* Error is generated by the server network file manager.*/ 31 #define ERRHRD 0x03 /* Error is an hardware error. */ 32 #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ 33 34 /* SMB X/Open error codes for the ERRDOS error class */ 35 #define ERRsuccess 0 /* No error */ 36 #define ERRbadfunc 1 /* Invalid function (or system call) */ 37 #define ERRbadfile 2 /* File not found (pathname error) */ 38 #define ERRbadpath 3 /* Directory not found */ 39 #define ERRnofids 4 /* Too many open files */ 40 #define ERRnoaccess 5 /* Access denied */ 41 #define ERRbadfid 6 /* Invalid fid */ 42 #define ERRbadmcb 7 /* Memory control blocks destroyed. */ 43 #define ERRnomem 8 /* Out of memory */ 44 #define ERRbadmem 9 /* Invalid memory block address */ 45 #define ERRbadenv 10 /* Invalid environment */ 46 #define ERRbadaccess 12 /* Invalid open mode */ 47 #define ERRbaddata 13 /* Invalid data (only from ioctl call) */ 48 #define ERRres 14 /* reserved */ 49 #define ERRbaddrive 15 /* Invalid drive */ 50 #define ERRremcd 16 /* Attempt to delete current directory */ 51 #define ERRdiffdevice 17 /* rename/move across different filesystems */ 52 #define ERRnofiles 18 /* no more files found in file search */ 53 #define ERRgeneral 31 /* General failure */ 54 #define ERRbadshare 32 /* Share mode on file conflict with open mode */ 55 #define ERRlock 33 /* Lock request conflicts with existing lock */ 56 #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */ 57 #define ERRnetnamedel 64 /* Network name deleted or not available */ 58 #define ERRnosuchshare 67 /* You specified an invalid share name */ 59 #define ERRfilexists 80 /* File in operation already exists */ 60 #define ERRinvalidparam 87 61 #define ERRcannotopen 110 /* Cannot open the file specified */ 62 #define ERRinsufficientbuffer 122 63 #define ERRinvalidname 123 /* Invalid name */ 64 #define ERRunknownlevel 124 65 #define ERRnotlocked 158 /* This region is not locked by this locking context. */ 66 #define ERRinvalidpath 161 67 #define ERRcancelviolation 173 68 #define ERRnoatomiclocks 174 69 #define ERRrename 183 70 #define ERRbadpipe 230 /* Named pipe invalid */ 71 #define ERRpipebusy 231 /* All instances of pipe are busy */ 72 #define ERRpipeclosing 232 /* named pipe close in progress */ 73 #define ERRnotconnected 233 /* No process on other end of named pipe */ 74 #define ERRmoredata 234 /* More data to be returned */ 75 #define ERReainconsistent 255 /* from EMC */ 76 #define ERRnomoreitems 259 77 #define ERRbaddirectory 267 /* Invalid directory name in a path. */ 78 #define ERReasnotsupported 282 /* Extended attributes */ 79 #define ERRlogonfailure 1326 /* Unknown username or bad password */ 80 #define ERRbuftoosmall 2123 81 #define ERRunknownipc 2142 82 #define ERRnosuchprintjob 2151 83 #define ERRinvgroup 2455 84 85 /* here's a special one from observing NT */ 86 #define ERRnoipc 66 /* don't support ipc */ 87 88 /* These errors seem to be only returned by the NT printer driver system */ 89 #define ERRdriveralreadyinstalled 1795 /* ERROR_PRINTER_DRIVER_ALREADY_INSTALLED */ 90 #define ERRunknownprinterport 1796 /* ERROR_UNKNOWN_PORT */ 91 #define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */ 92 #define ERRunknownprintprocessor 1798 /* ERROR_UNKNOWN_PRINTPROCESSOR */ 93 #define ERRinvalidseparatorfile 1799 /* ERROR_INVALID_SEPARATOR_FILE */ 94 #define ERRinvalidjobpriority 1800 /* ERROR_INVALID_PRIORITY */ 95 #define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */ 96 #define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */ 97 #define ERRinvalidprintercommand 1803 /* ERROR_INVALID_PRINTER_COMMAND */ 98 #define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */ 99 #define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */ 100 101 #define ERRunknownprintmonitor 3000 /* ERROR_UNKNOWN_PRINT_MONITOR */ 102 #define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */ 103 #define ERRspoolfilenotfound 3002 /* ERROR_SPOOL_FILE_NOT_FOUND */ 104 #define ERRnostartdoc 3003 /* ERROR_SPL_NO_STARTDOC */ 105 #define ERRnoaddjob 3004 /* ERROR_SPL_NO_ADDJOB */ 106 #define ERRprintprocessoralreadyinstalled 3005 /* ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED */ 107 #define ERRprintmonitoralreadyinstalled 3006 /* ERROR_PRINT_MONITOR_ALREADY_INSTALLED */ 108 #define ERRinvalidprintmonitor 3007 /* ERROR_INVALID_PRINT_MONITOR */ 109 #define ERRprintmonitorinuse 3008 /* ERROR_PRINT_MONITOR_IN_USE */ 110 #define ERRprinterhasjobsqueued 3009 /* ERROR_PRINTER_HAS_JOBS_QUEUED */ 111 112 /* Error codes for the ERRSRV class */ 113 114 #define ERRerror 1 /* Non specific error code */ 115 #define ERRbadpw 2 /* Bad password */ 116 #define ERRbadtype 3 /* reserved */ 117 #define ERRaccess 4 /* No permissions to do the requested operation */ 118 #define ERRinvnid 5 /* tid invalid */ 119 #define ERRinvnetname 6 /* Invalid servername */ 120 #define ERRinvdevice 7 /* Invalid device */ 121 #define ERRqfull 49 /* Print queue full */ 122 #define ERRqtoobig 50 /* Queued item too big */ 123 #define ERRinvpfid 52 /* Invalid print file in smb_fid */ 124 #define ERRsmbcmd 64 /* Unrecognised command */ 125 #define ERRsrverror 65 /* smb server internal error */ 126 #define ERRfilespecs 67 /* fid and pathname invalid combination */ 127 #define ERRbadlink 68 /* reserved */ 128 #define ERRbadpermits 69 /* Access specified for a file is not valid */ 129 #define ERRbadpid 70 /* reserved */ 130 #define ERRsetattrmode 71 /* attribute mode invalid */ 131 #define ERRpaused 81 /* Message server paused */ 132 #define ERRmsgoff 82 /* Not receiving messages */ 133 #define ERRnoroom 83 /* No room for message */ 134 #define ERRrmuns 87 /* too many remote usernames */ 135 #define ERRtimeout 88 /* operation timed out */ 136 #define ERRnoresource 89 /* No resources currently available for request. */ 137 #define ERRtoomanyuids 90 /* too many userids */ 138 #define ERRbaduid 91 /* bad userid */ 139 #define ERRuseMPX 250 /* temporarily unable to use raw mode, use MPX mode */ 140 #define ERRuseSTD 251 /* temporarily unable to use raw mode, use standard mode */ 141 #define ERRcontMPX 252 /* resume MPX mode */ 142 #define ERRnosupport 0xFFFF 143 #define ERRunknownsmb 22 /* from NT 3.5 response */ 144 145 /* Error codes for the ERRHRD class */ 146 147 #define ERRnowrite 19 /* read only media */ 148 #define ERRbadunit 20 /* Unknown device */ 149 #define ERRnotready 21 /* Drive not ready */ 150 #define ERRbadcmd 22 /* Unknown command */ 151 #define ERRdata 23 /* Data (CRC) error */ 152 #define ERRbadreq 24 /* Bad request structure length */ 153 #define ERRseek 25 154 #define ERRbadmedia 26 155 #define ERRbadsector 27 156 #define ERRnopaper 28 157 #define ERRwrite 29 /* write fault */ 158 #define ERRread 30 /* read fault */ 159 #define ERRgeneral 31 /* General hardware failure */ 160 #define ERRwrongdisk 34 161 #define ERRFCBunavail 35 162 #define ERRsharebufexc 36 /* share buffer exceeded */ 163 #define ERRdiskfull 39 164 165 166 /* these are win32 error codes. There are only a few places where 167 these matter for Samba, primarily in the NT printing code */ 168 #define WERR_OK W_ERROR(0) 169 #define WERR_BADFUNC W_ERROR(1) 170 #define WERR_BADFILE W_ERROR(2) 171 #define WERR_ACCESS_DENIED W_ERROR(5) 172 #define WERR_BADFID W_ERROR(6) 173 #define WERR_NOMEM W_ERROR(8) 174 #define WERR_GENERAL_FAILURE W_ERROR(31) 175 #define WERR_NOT_SUPPORTED W_ERROR(50) 176 #define WERR_BAD_NETPATH W_ERROR(53) 177 #define WERR_BAD_NET_RESP W_ERROR(58) 178 #define WERR_UNEXP_NET_ERR W_ERROR(59) 179 #define WERR_PRINTQ_FULL W_ERROR(61) 180 #define WERR_NO_SPOOL_SPACE W_ERROR(62) 181 #define WERR_NO_SUCH_SHARE W_ERROR(67) 182 #define WERR_FILE_EXISTS W_ERROR(80) 183 #define WERR_BAD_PASSWORD W_ERROR(86) 184 #define WERR_INVALID_PARAM W_ERROR(87) 185 #define WERR_INSUFFICIENT_BUFFER W_ERROR(122) 186 #define WERR_INVALID_NAME W_ERROR(123) 187 #define WERR_UNKNOWN_LEVEL W_ERROR(124) 188 #define WERR_OBJECT_PATH_INVALID W_ERROR(161) 189 #define WERR_ALREADY_EXISTS W_ERROR(183) 190 #define WERR_NO_MORE_ITEMS W_ERROR(259) 191 #define WERR_MORE_DATA W_ERROR(234) 192 #define WERR_CAN_NOT_COMPLETE W_ERROR(1003) 193 #define WERR_NOT_FOUND W_ERROR(1168) 194 #define WERR_INVALID_COMPUTERNAME W_ERROR(1210) 195 #define WERR_INVALID_DOMAINNAME W_ERROR(1212) 196 #define WERR_UNKNOWN_REVISION W_ERROR(1305) 197 #define WERR_REVISION_MISMATCH W_ERROR(1306) 198 #define WERR_INVALID_OWNER W_ERROR(1307) 199 #define WERR_NO_LOGON_SERVERS W_ERROR(1311) 200 #define WERR_NO_SUCH_PRIVILEGE W_ERROR(1313) 201 #define WERR_PRIVILEGE_NOT_HELD W_ERROR(1314) 202 #define WERR_NO_SUCH_USER W_ERROR(1317) 203 #define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338) 204 #define WERR_NO_SUCH_DOMAIN W_ERROR(1355) 205 #define WERR_NO_SYSTEM_RESOURCES W_ERROR(1450) 206 #define WERR_SERVER_UNAVAILABLE W_ERROR(1722) 207 #define WERR_INVALID_FORM_NAME W_ERROR(1902) 208 #define WERR_INVALID_FORM_SIZE W_ERROR(1903) 209 #define WERR_ALREADY_SHARED W_ERROR(2118) 210 #define WERR_BUF_TOO_SMALL W_ERROR(2123) 211 #define WERR_JOB_NOT_FOUND W_ERROR(2151) 212 #define WERR_DEST_NOT_FOUND W_ERROR(2152) 213 #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320) 214 #define WERR_DEVICE_NOT_AVAILABLE W_ERROR(4319) 215 #define WERR_STATUS_MORE_ENTRIES W_ERROR(0x0105) 216 217 #define WERR_PRINTER_DRIVER_ALREADY_INSTALLED W_ERROR(ERRdriveralreadyinstalled) 218 #define WERR_UNKNOWN_PORT W_ERROR(ERRunknownprinterport) 219 #define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(ERRunknownprinterdriver) 220 #define WERR_UNKNOWN_PRINTPROCESSOR W_ERROR(ERRunknownprintprocessor) 221 #define WERR_INVALID_SEPARATOR_FILE W_ERROR(ERRinvalidseparatorfile) 222 #define WERR_INVALID_PRIORITY W_ERROR(ERRinvalidjobpriority) 223 #define WERR_INVALID_PRINTER_NAME W_ERROR(ERRinvalidprintername) 224 #define WERR_PRINTER_ALREADY_EXISTS W_ERROR(ERRprinteralreadyexists) 225 #define WERR_INVALID_PRINTER_COMMAND W_ERROR(ERRinvalidprintercommand) 226 #define WERR_INVALID_DATATYPE W_ERROR(ERRinvaliddatatype) 227 #define WERR_INVALID_ENVIRONMENT W_ERROR(ERRinvalidenvironment) 228 229 #define WERR_UNKNOWN_PRINT_MONITOR W_ERROR(ERRunknownprintmonitor) 230 #define WERR_PRINTER_DRIVER_IN_USE W_ERROR(ERRprinterdriverinuse) 231 #define WERR_SPOOL_FILE_NOT_FOUND W_ERROR(ERRspoolfilenotfound) 232 #define WERR_SPL_NO_STARTDOC W_ERROR(ERRnostartdoc) 233 #define WERR_SPL_NO_ADDJOB W_ERROR(ERRnoaddjob) 234 #define WERR_PRINT_PROCESSOR_ALREADY_INSTALLED W_ERROR(ERRprintprocessoralreadyinstalled) 235 #define WERR_PRINT_MONITOR_ALREADY_INSTALLED W_ERROR(ERRprintmonitoralreadyinstalled) 236 #define WERR_INVALID_PRINT_MONITOR W_ERROR(ERRinvalidprintmonitor) 237 #define WERR_PRINT_MONITOR_IN_USE W_ERROR(ERRprintmonitorinuse) 238 #define WERR_PRINTER_HAS_JOBS_QUEUED W_ERROR(ERRprinterhasjobsqueued) 239 240 #define WERR_CLASS_NOT_REGISTERED W_ERROR(0x40154) 241 #define WERR_NO_SHUTDOWN_IN_PROGRESS W_ERROR(0x45c) 242 #define WERR_SHUTDOWN_ALREADY_IN_PROGRESS W_ERROR(0x45b) 243 244 245 #ifndef NERR_BASE 246 #define NERR_BASE (2100) 247 #endif 248 249 #define WERR_NET_NAME_NOT_FOUND W_ERROR(NERR_BASE+210) 250 #define WERR_DEVICE_NOT_SHARED W_ERROR(NERR_BASE+211) 251 252 /* DFS errors */ 253 #define WERR_DFS_NO_SUCH_VOL W_ERROR(NERR_BASE+562) 254 #define WERR_DFS_NO_SUCH_SHARE W_ERROR(NERR_BASE+565) 255 #define WERR_DFS_NO_SUCH_SERVER W_ERROR(NERR_BASE+573) 256 #define WERR_DFS_INTERNAL_ERROR W_ERROR(NERR_BASE+590) 257 #define WERR_DFS_CANT_CREATE_JUNCT W_ERROR(NERR_BASE+569) 258 259 /* DS errors */ 260 #define WERR_DS_SERVICE_BUSY W_ERROR(0x0000200e) 261 #define WERR_DS_SERVICE_UNAVAILABLE W_ERROR(0x0000200f) 262 #define WERR_DS_NO_SUCH_OBJECT W_ERROR(0x00002030) 263 #define WERR_DS_OBJ_NOT_FOUND W_ERROR(0x0000208d) 264 #define WERR_DS_DRA_INVALID_PARAMETER W_ERROR(0x000020f5) 265 #define WERR_DS_DRA_BAD_DN W_ERROR(0x000020f7) 266 #define WERR_DS_DRA_BAD_NC W_ERROR(0x000020f8) 267 #define WERR_DS_DRA_INTERNAL_ERROR W_ERROR(0x000020fa) 268 #define WERR_DS_DRA_OUT_OF_MEM W_ERROR(0x000020fe) 269 #define WERR_DS_SINGLE_VALUE_CONSTRAINT W_ERROR(0x00002081) 270 #define WERR_DS_DRA_DB_ERROR W_ERROR(0x00002103) 271 #define WERR_DS_DRA_NO_REPLICA W_ERROR(0x00002104) 272 #define WERR_DS_DRA_ACCESS_DENIED W_ERROR(0x00002105) 273 #define WERR_DS_DNS_LOOKUP_FAILURE W_ERROR(0x0000214c) 274 #define WERR_DS_WRONG_LINKED_ATTRIBUTE_SYNTAX W_ERROR(0x00002150) 275 276 /* SEC errors */ 277 #define WERR_SEC_E_ALGORITHM_MISMATCH W_ERROR(0x80090331) 278 279 #define WERR_FOOBAR WERR_GENERAL_FAILURE 280 281 #endif /* _DOSERR_H */ 282