1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 20 unchanged lines hidden (view full) --- 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)nfs_subs.c 8.8 (Berkeley) 5/22/95 |
37 * $FreeBSD: head/sys/nfsserver/nfs_srvsubs.c 106264 2002-10-31 22:35:03Z jeff $ |
38 */ 39 40#include <sys/cdefs.h> |
41__FBSDID("$FreeBSD: head/sys/nfsserver/nfs_srvsubs.c 106264 2002-10-31 22:35:03Z jeff $"); |
42 43/* 44 * These functions support the macros and help fiddle mbuf chains for 45 * the nfs op functions. They do things like create the rpc header and 46 * copy data between mbuf chains and uio lists. 47 */ 48 49#include "opt_inet6.h" --- 1208 unchanged lines hidden (view full) --- 1258 return EBADRPC; 1259 *s = fxdr_unsigned(int32_t, *tl); 1260 if (*s > m || *s <= 0) 1261 return EBADRPC; 1262 return 0; 1263} 1264 1265int |
1266nfsm_srvnamesiz_xx(int *s, int m, struct mbuf **md, caddr_t *dpos) |
1267{ 1268 u_int32_t *tl; 1269 1270 tl = nfsm_dissect_xx(NFSX_UNSIGNED, md, dpos); 1271 if (tl == NULL) 1272 return EBADRPC; 1273 *s = fxdr_unsigned(int32_t, *tl); |
1274 if (*s > m) |
1275 return NFSERR_NAMETOL; 1276 if (*s <= 0) 1277 return EBADRPC; 1278 return 0; 1279} 1280 1281void 1282nfsm_clget_xx(u_int32_t **tl, struct mbuf *mb, struct mbuf **mp, --- 117 unchanged lines hidden --- |