sysv_msg.c (116182) | sysv_msg.c (118615) |
---|---|
1/* 2 * Implementation of SVID messages 3 * 4 * Author: Daniel Boulet 5 * 6 * Copyright 1993 Daniel Boulet and RTMX Inc. 7 * 8 * This system call was implemented by Daniel Boulet under contract from RTMX. --- 4 unchanged lines hidden (view full) --- 13 * Redistribution in binary form may occur without any restrictions. 14 * Obviously, it would be nice if you gave credit where credit is due 15 * but requiring it would be too onerous. 16 * 17 * This software is provided ``AS IS'' without any warranties of any kind. 18 */ 19 20#include <sys/cdefs.h> | 1/* 2 * Implementation of SVID messages 3 * 4 * Author: Daniel Boulet 5 * 6 * Copyright 1993 Daniel Boulet and RTMX Inc. 7 * 8 * This system call was implemented by Daniel Boulet under contract from RTMX. --- 4 unchanged lines hidden (view full) --- 13 * Redistribution in binary form may occur without any restrictions. 14 * Obviously, it would be nice if you gave credit where credit is due 15 * but requiring it would be too onerous. 16 * 17 * This software is provided ``AS IS'' without any warranties of any kind. 18 */ 19 20#include <sys/cdefs.h> |
21__FBSDID("$FreeBSD: head/sys/kern/sysv_msg.c 116182 2003-06-11 00:56:59Z obrien $"); | 21__FBSDID("$FreeBSD: head/sys/kern/sysv_msg.c 118615 2003-08-07 16:42:27Z nectar $"); |
22 23#include "opt_sysvipc.h" 24 25#include <sys/param.h> 26#include <sys/systm.h> 27#include <sys/sysproto.h> 28#include <sys/kernel.h> 29#include <sys/proc.h> --- 250 unchanged lines hidden (view full) --- 280 * 281 * MPSAFE 282 */ 283int 284msgsys(td, uap) 285 struct thread *td; 286 /* XXX actually varargs. */ 287 struct msgsys_args /* { | 22 23#include "opt_sysvipc.h" 24 25#include <sys/param.h> 26#include <sys/systm.h> 27#include <sys/sysproto.h> 28#include <sys/kernel.h> 29#include <sys/proc.h> --- 250 unchanged lines hidden (view full) --- 280 * 281 * MPSAFE 282 */ 283int 284msgsys(td, uap) 285 struct thread *td; 286 /* XXX actually varargs. */ 287 struct msgsys_args /* { |
288 u_int which; | 288 int which; |
289 int a2; 290 int a3; 291 int a4; 292 int a5; 293 int a6; 294 } */ *uap; 295{ 296 int error; 297 298 if (!jail_sysvipc_allowed && jailed(td->td_ucred)) 299 return (ENOSYS); | 289 int a2; 290 int a3; 291 int a4; 292 int a5; 293 int a6; 294 } */ *uap; 295{ 296 int error; 297 298 if (!jail_sysvipc_allowed && jailed(td->td_ucred)) 299 return (ENOSYS); |
300 if (uap->which >= sizeof(msgcalls)/sizeof(msgcalls[0])) | 300 if (uap->which < 0 || 301 uap->which >= sizeof(msgcalls)/sizeof(msgcalls[0])) |
301 return (EINVAL); 302 error = (*msgcalls[uap->which])(td, &uap->a2); 303 return (error); 304} 305 306static void 307msg_freehdr(msghdr) 308 struct msg *msghdr; --- 842 unchanged lines hidden --- | 302 return (EINVAL); 303 error = (*msgcalls[uap->which])(td, &uap->a2); 304 return (error); 305} 306 307static void 308msg_freehdr(msghdr) 309 struct msg *msghdr; --- 842 unchanged lines hidden --- |