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