Deleted Added
full compact
smb_subr.c (91406) smb_subr.c (94914)
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
1/*
2 * Copyright (c) 2000-2001 Boris Popov
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 15 unchanged lines hidden (view full) ---

24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * $FreeBSD: head/sys/netsmb/smb_subr.c 91406 2002-02-27 18:32:23Z jhb $
32 * $FreeBSD: head/sys/netsmb/smb_subr.c 94914 2002-04-17 03:14:28Z bp $
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 208 unchanged lines hidden (view full) ---

249 case ERRfilexists:
250 return EEXIST;
251 case 123: /* dunno what is it, but samba maps as noent */
252 return ENOENT;
253 case 145: /* samba */
254 return ENOTEMPTY;
255 case 183:
256 return EEXIST;
33 */
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/kernel.h>
37#include <sys/malloc.h>
38#include <sys/proc.h>
39#include <sys/lock.h>
40#include <sys/sysctl.h>

--- 208 unchanged lines hidden (view full) ---

249 case ERRfilexists:
250 return EEXIST;
251 case 123: /* dunno what is it, but samba maps as noent */
252 return ENOENT;
253 case 145: /* samba */
254 return ENOTEMPTY;
255 case 183:
256 return EEXIST;
257 case ERRquota:
258 return EDQUOT;
257 }
258 break;
259 case ERRSRV:
260 switch (eno) {
261 case ERRerror:
262 return EINVAL;
263 case ERRbadpw:
259 }
260 break;
261 case ERRSRV:
262 switch (eno) {
263 case ERRerror:
264 return EINVAL;
265 case ERRbadpw:
266 case ERRpasswordExpired:
264 return EAUTH;
265 case ERRaccess:
266 return EACCES;
267 case ERRinvnid:
268 return ENETRESET;
269 case ERRinvnetname:
270 SMBERROR("NetBIOS name is invalid\n");
271 return EAUTH;
272 case 3: /* reserved and returned */
273 return EIO;
267 return EAUTH;
268 case ERRaccess:
269 return EACCES;
270 case ERRinvnid:
271 return ENETRESET;
272 case ERRinvnetname:
273 SMBERROR("NetBIOS name is invalid\n");
274 return EAUTH;
275 case 3: /* reserved and returned */
276 return EIO;
274 case 2239: /* NT: account exists but disabled */
277 case ERRaccountExpired:
278 case ERRbadClient:
279 case ERRbadLogonTime:
275 return EPERM;
280 return EPERM;
281 case ERRnosupport:
282 return EBADRPC;
276 }
277 break;
278 case ERRHRD:
279 switch (eno) {
280 case ERRnowrite:
281 return EROFS;
282 case ERRbadunit:
283 return ENODEV;

--- 69 unchanged lines hidden ---
283 }
284 break;
285 case ERRHRD:
286 switch (eno) {
287 case ERRnowrite:
288 return EROFS;
289 case ERRbadunit:
290 return ENODEV;

--- 69 unchanged lines hidden ---