From db4050bcb126a6921bc16ae71bfd073e0ed8c72f Mon Sep 17 00:00:00 2001 From: Oliver Lehmann Date: Wed, 21 May 2008 22:23:13 +0000 Subject: [PATCH] STATUS: 97% done 0000 T _gtime compatible 000e T _ftime compatible 00a4 T _stime compatible 00d2 T _setuid compatible 012e T _getuid compatible 0148 T _setgid compatible 019a T _getgid compatible 01b4 T _getpid compatible 01d0 T _setpgrp compatible 0206 T _sync compatible 020e T _nice compatible 027c T _unlink compatible 038e T _chdir compatible 0398 T _chroot compatible 03ac T _chdirec compatible 042a T _chmod compatible 04a0 T _chown compatible 04fa T _ssig compatible 0612 T _kill compatible 0722 T _times compatible 077a T _profil compatible 07ac T _sprofil not existent 0872 T _alarm compatible 08aa T _pause compatible 08bc T _umask compatible 08e0 T _utime compatible 09ee T _nosys compatible 09f8 T _nullsys compatible 09fa T _bpt compatible 0a0a T _utssys compatible 0b0a T _ulimit compatible --- WEGA/src/uts/sys/sys4.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/WEGA/src/uts/sys/sys4.c b/WEGA/src/uts/sys/sys4.c index 3351905..54f240e 100644 --- a/WEGA/src/uts/sys/sys4.c +++ b/WEGA/src/uts/sys/sys4.c @@ -33,7 +33,6 @@ char sys4wstr[] = "@[$]sys4.c Rev : 4.2 09/26/83 22:15:02"; #include #include - /* * Everything in this file is a routine implementing a system call. */ @@ -86,6 +85,7 @@ stime() if(suser()) time = uap->time; } + setuid() { register uid; @@ -348,7 +348,6 @@ ssig() } u.u_signal[a-1] = uap->fun; u.u_procp->p_sig &= ~(1L<<(a-1)); - if (a == SIGCLD) { a = u.u_procp->p_pid; for (p = &proc[1]; p < &proc[Nproc] ; p++) { @@ -549,22 +548,23 @@ bpt() utssys() { - register i; + register int c; + register struct mount *mp; register struct a { char *cbuf; int mv; int type; } *uap; - register struct mount *mp; - register struct filsys *fp; + struct filsys *fp; + daddr_t tfree; + ino_t tinode; + char fname[6]; + char fpack[6]; extern int Nmount; -/* variable declarations missing probably used for case 2 */ - uap = (struct a *)u.u_ap; switch(uap->type) { -/* case 0 should work - case 2 is not compatible */ case 0: /* uname */ if (copyout(&utsname, uap->cbuf, sizeof(struct utsname))) u.u_error = EFAULT; @@ -573,13 +573,18 @@ case 0: /* uname */ /* case 1 was umask */ case 2: /* ustat */ - for(i=0; im_flags == MINUSE && mp->m_dev==uap->mv) { fp = mp->m_bufp->b_un.b_filsys; - if(copyout(&fp->s_tfree, uap->cbuf, 18)) + tfree = fp->s_tfree; + tinode = fp->s_tinode; + for(c=0; c < 6; c++) { + fname[c] = fp->s_fname[c]; + fpack[c] = fp->s_fpack[c]; + } + if(copyout(&tfree, uap->cbuf, 18)) u.u_error = EFAULT; return; }