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 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; |
257 case ERRquota: 258 return EDQUOT; |
259 } 260 break; 261 case ERRSRV: 262 switch (eno) { 263 case ERRerror: 264 return EINVAL; 265 case ERRbadpw: |
266 case ERRpasswordExpired: |
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; |
277 case ERRaccountExpired: 278 case ERRbadClient: 279 case ERRbadLogonTime: |
280 return EPERM; |
281 case ERRnosupport: 282 return EBADRPC; |
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 --- |