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