machine.c (224205) | machine.c (228992) |
---|---|
1/* 2 * top - a top users display for Unix 3 * 4 * SYNOPSIS: For FreeBSD-2.x and later 5 * 6 * DESCRIPTION: 7 * Originally written for BSD4.4 system by Christos Zoulas. 8 * Ported to FreeBSD 2.x by Steven Wallace && Wolfram Schneider --- 6 unchanged lines hidden (view full) --- 15 * 16 * LIBS: -lkvm 17 * 18 * AUTHOR: Christos Zoulas <christos@ee.cornell.edu> 19 * Steven Wallace <swallace@freebsd.org> 20 * Wolfram Schneider <wosch@FreeBSD.org> 21 * Thomas Moestl <tmoestl@gmx.net> 22 * | 1/* 2 * top - a top users display for Unix 3 * 4 * SYNOPSIS: For FreeBSD-2.x and later 5 * 6 * DESCRIPTION: 7 * Originally written for BSD4.4 system by Christos Zoulas. 8 * Ported to FreeBSD 2.x by Steven Wallace && Wolfram Schneider --- 6 unchanged lines hidden (view full) --- 15 * 16 * LIBS: -lkvm 17 * 18 * AUTHOR: Christos Zoulas <christos@ee.cornell.edu> 19 * Steven Wallace <swallace@freebsd.org> 20 * Wolfram Schneider <wosch@FreeBSD.org> 21 * Thomas Moestl <tmoestl@gmx.net> 22 * |
23 * $FreeBSD: head/usr.bin/top/machine.c 224205 2011-07-18 21:15:47Z jhb $ | 23 * $FreeBSD: head/usr.bin/top/machine.c 228992 2011-12-30 11:02:40Z uqs $ |
24 */ 25 26#include <sys/param.h> 27#include <sys/errno.h> 28#include <sys/file.h> 29#include <sys/proc.h> 30#include <sys/resource.h> 31#include <sys/rtprio.h> --- 1367 unchanged lines hidden (view full) --- 1399 1400 return (flp2 - flp1); 1401} 1402#endif /* ORDER */ 1403 1404/* 1405 * proc_owner(pid) - returns the uid that owns process "pid", or -1 if 1406 * the process does not exist. | 24 */ 25 26#include <sys/param.h> 27#include <sys/errno.h> 28#include <sys/file.h> 29#include <sys/proc.h> 30#include <sys/resource.h> 31#include <sys/rtprio.h> --- 1367 unchanged lines hidden (view full) --- 1399 1400 return (flp2 - flp1); 1401} 1402#endif /* ORDER */ 1403 1404/* 1405 * proc_owner(pid) - returns the uid that owns process "pid", or -1 if 1406 * the process does not exist. |
1407 * It is EXTREMLY IMPORTANT that this function work correctly. | 1407 * It is EXTREMELY IMPORTANT that this function work correctly. |
1408 * If top runs setuid root (as in SVR4), then this function 1409 * is the only thing that stands in the way of a serious 1410 * security problem. It validates requests for the "kill" 1411 * and "renice" commands. 1412 */ 1413 1414int 1415proc_owner(int pid) --- 37 unchanged lines hidden --- | 1408 * If top runs setuid root (as in SVR4), then this function 1409 * is the only thing that stands in the way of a serious 1410 * security problem. It validates requests for the "kill" 1411 * and "renice" commands. 1412 */ 1413 1414int 1415proc_owner(int pid) --- 37 unchanged lines hidden --- |