1 /* SPDX-License-Identifier: LGPL-2.1 */ 2 /* 3 * 4 * Copyright (c) International Business Machines Corp., 2002,2004 5 * Author(s): Steve French (sfrench@us.ibm.com) 6 * 7 * See Error Codes section of the SNIA CIFS Specification 8 * for more information 9 * 10 */ 11 12 #define SUCCESS 0x00 /* The request was successful. */ 13 #define ERRDOS 0x01 /* Error is from the core DOS operating system set */ 14 #define ERRSRV 0x02 /* Error is generated by the file server daemon */ 15 #define ERRHRD 0x03 /* Error is a hardware error. */ 16 #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ 17 18 /* The following error codes may be generated with the SUCCESS error class.*/ 19 20 /*#define SUCCESS 0 The request was successful. */ 21 22 /* The following error codes may be generated with the ERRDOS error class.*/ 23 24 #define ERRbadfunc 1 /* Invalid function. The server did not 25 recognize or could not perform a 26 system call generated by the server, 27 e.g., set the DIRECTORY attribute on 28 a data file, invalid seek mode. */ 29 #define ERRbadfile 2 /* File not found. The last component 30 of a file's pathname could not be 31 found. */ 32 #define ERRbadpath 3 /* Directory invalid. A directory 33 component in a pathname could not be 34 found. */ 35 #define ERRnofids 4 /* Too many open files. The server has 36 no file handles available. */ 37 #define ERRnoaccess 5 /* Access denied, the client's context 38 does not permit the requested 39 function. This includes the 40 following conditions: invalid rename 41 command, write to Fid open for read 42 only, read on Fid open for write 43 only, attempt to delete a non-empty 44 directory */ 45 #define ERRbadfid 6 /* Invalid file handle. The file handle 46 specified was not recognized by the 47 server. */ 48 #define ERRbadmcb 7 /* Memory control blocks destroyed. */ 49 #define ERRnomem 8 /* Insufficient server memory to 50 perform the requested function. */ 51 #define ERRbadmem 9 /* Invalid memory block address. */ 52 #define ERRbadenv 10 /* Invalid environment. */ 53 #define ERRbadformat 11 /* Invalid format. */ 54 #define ERRbadaccess 12 /* Invalid open mode. */ 55 #define ERRbaddata 13 /* Invalid data (generated only by 56 IOCTL calls within the server). */ 57 #define ERRbaddrive 15 /* Invalid drive specified. */ 58 #define ERRremcd 16 /* A Delete Directory request attempted 59 to remove the server's current 60 directory. */ 61 #define ERRdiffdevice 17 /* Not same device (e.g., a cross 62 volume rename was attempted */ 63 #define ERRnofiles 18 /* A File Search command can find no 64 more files matching the specified 65 criteria. */ 66 #define ERRwriteprot 19 /* media is write protected */ 67 #define ERRgeneral 31 68 #define ERRbadshare 32 /* The sharing mode specified for an 69 Open conflicts with existing FIDs on 70 the file. */ 71 #define ERRlock 33 /* A Lock request conflicted with an 72 existing lock or specified an 73 invalid mode, or an Unlock requested 74 attempted to remove a lock held by 75 another process. */ 76 #define ERRunsup 50 77 #define ERRnosuchshare 67 78 #define ERRfilexists 80 /* The file named in the request 79 already exists. */ 80 #define ERRinvparm 87 81 #define ERRdiskfull 112 82 #define ERRinvname 123 83 #define ERRinvlevel 124 84 #define ERRdirnotempty 145 85 #define ERRnotlocked 158 86 #define ERRcancelviolation 173 87 #define ERRalreadyexists 183 88 #define ERRbadpipe 230 89 #define ERRpipebusy 231 90 #define ERRpipeclosing 232 91 #define ERRnotconnected 233 92 #define ERRmoredata 234 93 #define ERReasnotsupported 282 94 #define ErrQuota 0x200 /* The operation would cause a quota 95 limit to be exceeded. */ 96 #define ErrNotALink 0x201 /* A link operation was performed on a 97 pathname that was not a link. */ 98 99 /* Below errors are used internally (do not come over the wire) for passthrough 100 from STATUS codes to POSIX only */ 101 #define ERRsymlink 0xFFFD 102 #define ErrTooManyLinks 0xFFFE 103 104 /* Following error codes may be generated with the ERRSRV error class.*/ 105 106 #define ERRerror 1 /* Non-specific error code. It is 107 returned under the following 108 conditions: resource other than disk 109 space exhausted (e.g. TIDs), first 110 SMB command was not negotiate, 111 multiple negotiates attempted, and 112 internal server error. */ 113 #define ERRbadpw 2 /* Bad password - name/password pair in 114 a TreeConnect or Session Setup are 115 invalid. */ 116 #define ERRbadtype 3 /* used for indicating DFS referral 117 needed */ 118 #define ERRaccess 4 /* The client does not have the 119 necessary access rights within the 120 specified context for requested 121 function. */ 122 #define ERRinvtid 5 /* The Tid specified in a command was 123 invalid. */ 124 #define ERRinvnetname 6 /* Invalid network name in tree 125 connect. */ 126 #define ERRinvdevice 7 /* Invalid device - printer request 127 made to non-printer connection or 128 non-printer request made to printer 129 connection. */ 130 #define ERRqfull 49 /* Print queue full (files) -- returned 131 by open print file. */ 132 #define ERRqtoobig 50 /* Print queue full -- no space. */ 133 #define ERRqeof 51 /* EOF on print queue dump */ 134 #define ERRinvpfid 52 /* Invalid print file FID. */ 135 #define ERRsmbcmd 64 /* The server did not recognize the 136 command received. */ 137 #define ERRsrverror 65 /* The server encountered an internal 138 error, e.g., system file 139 unavailable. */ 140 #define ERRbadBID 66 /* (obsolete) */ 141 #define ERRfilespecs 67 /* The Fid and pathname parameters 142 contained an invalid combination of 143 values. */ 144 #define ERRbadLink 68 /* (obsolete) */ 145 #define ERRbadpermits 69 /* The access permissions specified for 146 a file or directory are not a valid 147 combination. */ 148 #define ERRbadPID 70 149 #define ERRsetattrmode 71 /* attribute (mode) is invalid */ 150 #define ERRpaused 81 /* Server is paused */ 151 #define ERRmsgoff 82 /* reserved - messaging off */ 152 #define ERRnoroom 83 /* reserved - no room for message */ 153 #define ERRrmuns 87 /* reserved - too many remote names */ 154 #define ERRtimeout 88 /* operation timed out */ 155 #define ERRnoresource 89 /* No resources available for request 156 */ 157 #define ERRtoomanyuids 90 /* Too many UIDs active on this session 158 */ 159 #define ERRbaduid 91 /* The UID is not known as a valid user 160 */ 161 #define ERRusempx 250 /* temporarily unable to use raw */ 162 #define ERRusestd 251 /* temporarily unable to use either raw 163 or mpx */ 164 #define ERR_NOTIFY_ENUM_DIR 1024 165 #define ERRnoSuchUser 2238 /* user account does not exist */ 166 #define ERRaccountexpired 2239 167 #define ERRbadclient 2240 /* can not logon from this client */ 168 #define ERRbadLogonTime 2241 /* logon hours do not allow this */ 169 #define ERRpasswordExpired 2242 170 #define ERRnetlogonNotStarted 2455 171 #define ERRnosupport 0xFFFF 172