X386MON x1.00 patch 2 (part 01/01)
Warren Tucker
wht at n4hgf.Mt-Park.GA.US
Thu Feb 21 17:02:58 AEST 1991
Submitted-by: wht at n4hgf.Mt-Park.GA.US
Archive-name: x386monx100/patch02
#-------------------------------------------------------------
# X386MON x1.00 PATCH 2 - rev stays x1.10
#
# 1. This patch makes the ps display show the username for
# the effective uid rather than the real uid.
# 2. Get rid of debug printf
#
# patch < this.article
#-------------------------------------------------------------
*** x1.10/ps.c Thu Feb 21 00:30:19 1991
--- ps.c Thu Feb 21 00:55:21 1991
***************
*** 480,486
struct user *tuser;
{
#if defined(RDUBLK) /* see sysi86.h #include above */
- printf(">>getuser p=%d ",tproc->p_pid);
/* this system call is not returning 0 on success ?!? */
int rtn = !!sysi86(RDUBLK,tproc->p_pid,(char *)tuser,sizeof(*tuser)));
printf(">> rtn=%d\n,rtn);
--- 480,485 -----
struct user *tuser;
{
#if defined(RDUBLK) /* see sysi86.h #include above */
/* this system call is not returning 0 on success ?!? */
int rtn = !!sysi86(RDUBLK,tproc->p_pid,(char *)tuser,sizeof(*tuser)));
return(rtn);
***************
*** 483,489
printf(">>getuser p=%d ",tproc->p_pid);
/* this system call is not returning 0 on success ?!? */
int rtn = !!sysi86(RDUBLK,tproc->p_pid,(char *)tuser,sizeof(*tuser)));
- printf(">> rtn=%d\n,rtn);
return(rtn);
#else /* RDUBLK */
register caddr_t uptr = (caddr_t)tuser;
--- 482,487 -----
#if defined(RDUBLK) /* see sysi86.h #include above */
/* this system call is not returning 0 on success ?!? */
int rtn = !!sysi86(RDUBLK,tproc->p_pid,(char *)tuser,sizeof(*tuser)));
return(rtn);
#else /* RDUBLK */
register caddr_t uptr = (caddr_t)tuser;
***************
*** 491,497
int ipde;
paddr_t mptr;
- printf(">>getuser p=%d ",tproc->p_pid);
#if !defined(ISC_1) && !defined(mips) && defined(SULOAD)
if(tproc->p_flag & SULOAD)
{
--- 489,494 -----
int ipde;
paddr_t mptr;
#if !defined(ISC_1) && !defined(mips) && defined(SULOAD)
if(tproc->p_flag & SULOAD)
{
***************
*** 505,511
{
if(!tproc->p_ubptbl[ipde].pgm.pg_pres) /* if not resident */
{
- printf(">> not resident\n");
return(0);
}
mptr = tproc->p_ubptbl[ipde].pgm.pg_pfn * NBPP;
--- 502,507 -----
{
if(!tproc->p_ubptbl[ipde].pgm.pg_pres) /* if not resident */
{
return(0);
}
mptr = tproc->p_ubptbl[ipde].pgm.pg_pfn * NBPP;
***************
*** 541,550
* we can get crap from swap if things change after we get
* an address to read from, so validate user as best we can
*/
- printf(">> u_ruid=%d p_uid=%d ruid=%d p_suid=%d\n",
- tuser->u_ruid,tproc->p_uid,tuser->u_ruid,tproc->p_suid,
- ((tuser->u_ruid == tproc->p_uid) || (tuser->u_ruid == tproc->p_suid)));
-
return( (tuser->u_ruid == tproc->p_uid) ||
(tuser->u_ruid == tproc->p_suid));
--- 537,542 -----
* we can get crap from swap if things change after we get
* an address to read from, so validate user as best we can
*/
return( (tuser->u_ruid == tproc->p_uid) ||
(tuser->u_ruid == tproc->p_suid));
***************
*** 752,758
if(initial)
{
! strcpy(s80,uid_to_name(tproc->p_uid));
cptr = s80 + strlen(s80);
*cptr++ = (tproc->p_uid != tproc->p_suid) ? '#' : ' ';
*cptr = 0;
--- 744,750 -----
if(initial)
{
! strcpy(s80,uid_to_name(tproc->p_suid));
cptr = s80 + strlen(s80);
*cptr++ = (tproc->p_uid != tproc->p_suid) ? '#' : ' ';
*cptr = 0;
***************
*** 935,942
int fheight = FHEIGHT;
int yl1 = y + (FASCENT / 2);
int ys = y + FASCENT;
-
- printf(">> darw_Ps i=%d b=%d\n",initial,current_display_mode);
if(ps_WorkProc_ID || (DrawAreaXYWH.height < (x + (FHEIGHT * 2))))
return;
--- 927,932 -----
int fheight = FHEIGHT;
int yl1 = y + (FASCENT / 2);
int ys = y + FASCENT;
if(ps_WorkProc_ID || (DrawAreaXYWH.height < (x + (FHEIGHT * 2))))
return;
-----------------------------------------------------------------------
Warren Tucker, TuckerWare gatech!n4hgf!wht or wht at n4hgf.Mt-Park.GA.US
Many [Nobel physics] prizes have been given to people for telling us
the universe is not as simple as we thought it was. -Stephen Hawking in
A Brief History of Time In computing, there are no such prizes. -me
More information about the Alt.sources
mailing list