procfs_mem.c (46112) | procfs_mem.c (46116) |
---|---|
1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 39 * | 1/* 2 * Copyright (c) 1993 Jan-Simon Pendry 3 * Copyright (c) 1993 Sean Eric Fagan 4 * Copyright (c) 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This code is derived from software contributed to Berkeley by 8 * Jan-Simon Pendry and Sean Eric Fagan. --- 23 unchanged lines hidden (view full) --- 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)procfs_mem.c 8.5 (Berkeley) 6/15/94 39 * |
40 * $Id: procfs_mem.c,v 1.35 1998/10/28 13:37:00 dg Exp $ | 40 * $Id: procfs_mem.c,v 1.36 1999/04/27 11:16:37 phk Exp $ |
41 */ 42 43/* 44 * This is a lightly hacked and merged version 45 * of sef's pread/pwrite functions 46 */ 47 48#include <sys/param.h> --- 277 unchanged lines hidden (view full) --- 326 327int procfs_kmemaccess(curp) 328 struct proc *curp; 329{ 330 int i; 331 struct ucred *cred; 332 333 cred = curp->p_cred->pc_ucred; | 41 */ 42 43/* 44 * This is a lightly hacked and merged version 45 * of sef's pread/pwrite functions 46 */ 47 48#include <sys/param.h> --- 277 unchanged lines hidden (view full) --- 326 327int procfs_kmemaccess(curp) 328 struct proc *curp; 329{ 330 int i; 331 struct ucred *cred; 332 333 cred = curp->p_cred->pc_ucred; |
334 if (suser_xxx(cred, &curp->p_acflag)) | 334 if (suser(curp)) |
335 return 1; | 335 return 1; |
336 | 336 337 /* XXX: Why isn't this done with file-perms ??? */ |
337 for (i = 0; i < cred->cr_ngroups; i++) | 338 for (i = 0; i < cred->cr_ngroups; i++) |
338 if (cred->cr_groups[i] == KMEM_GROUP) | 339 if (cred->cr_groups[i] == KMEM_GROUP) |
339 return 1; 340 341 return 0; 342} | 340 return 1; 341 342 return 0; 343} |