Thread View: comp.sys.ibm.pc.rt
4 messages
4 total messages
Started by brunner
Mon, 24 Jul 1989 21:55
Patch for /sys/sys/subr_mcount.c IBM/4.3
Author: brunner
Date: Mon, 24 Jul 1989 21:55
Date: Mon, 24 Jul 1989 21:55
45 lines
1502 bytes
1502 bytes
Subject: Fix for profiling
Index: /sys/sys/subr_mcount.c IBM/4.3
Description:
Call counting does not reflect the new hc compiler
Fix:
Apply the attached patch.
*** subr_mcount.c Thu Jul 13 10:56:15 1989
--- subr_mcount.c.fix Thu Jul 13 10:55:30 1989
***************
*** 127,132 ****
--- 127,144 ----
asm(".data");
#endif
#if defined(vax) || defined(ibm032)
+
+ #ifdef ibm032
+ mcount(frompcindex,selfpc)
+ unsigned short *frompcindex;
+ char *selfpc;
+ {
+ register struct tostruct *top; /* r9 => r3 */
+ register struct tostruct *prevtop; /* r8 => r2 */
+ register long toindex; /* r7 => r1 */
+ #endif
+
+ #ifdef vax
mcount()
{
register char *selfpc; /* r11 => r5 */
***************
*** 134,140 ****
register struct tostruct *top; /* r9 => r3 */
register struct tostruct *prevtop; /* r8 => r2 */
register long toindex; /* r7 => r1 */
- #ifdef vax
static int s;
#endif
--- 146,151 ----
Eric Brunner
uunet!ibmsupt!brunner
Patch for /sys/ca/fpglue.s
Author: brunner
Date: Mon, 24 Jul 1989 21:57
Date: Mon, 24 Jul 1989 21:57
99 lines
2886 bytes
2886 bytes
Subject: Fix for kernel profiling Index: /sys/ca/fpglue.s Description: Kernel profiling gives incorrect times for fpglue. Fix: Apply the attached patch. *** fpglue.s Fri Jul 7 10:15:11 1989 --- fpglue.s.fix Thu Jul 13 14:48:53 1989 *************** *** 28,34 **** .globl FPGLUE .globl fpglue ! #if defined(KERNEL) || defined(PROFILE) .globl _.fpgen # necessary to call fpgen() directly .globl _fpgen # necessary to call fpgen() directly #endif KERNEL --- 28,34 ---- .globl FPGLUE .globl fpglue ! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF) .globl _.fpgen # necessary to call fpgen() directly .globl _fpgen # necessary to call fpgen() directly #endif KERNEL *************** *** 35,41 **** .globl .oVncs .set .oVncs,0 ! #ifdef PROFILE .data .align 2 .fpglue: --- 35,41 ---- .globl .oVncs .set .oVncs,0 ! #if defined(PROFILE) || defined(GPROF) .data .align 2 .fpglue: *************** *** 61,67 **** st r0,-40(sp) # change return address by # override the stored r15 cal sp,-100(sp) # move stack pointer ! #ifdef PROFILE mr r12,r15 # remember where RTFL block starts get r14,$.fpglue bali r15,mcount --- 61,67 ---- st r0,-40(sp) # change return address by # override the stored r15 cal sp,-100(sp) # move stack pointer ! #if defined(PROFILE) || defined(GPROF) mr r12,r15 # remember where RTFL block starts get r14,$.fpglue bali r15,mcount *************** *** 110,116 **** ti 4,r6,6 # tlti r6,6 #endif ! #if defined(KERNEL) || defined(PROFILE) get r6,$fp_genaddr # calling fpgen() directly #else get r6,$fp_CodeGen # addr of ptr to fpgen() --- 110,116 ---- ti 4,r6,6 # tlti r6,6 #endif ! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF) get r6,$fp_genaddr # calling fpgen() directly #else get r6,$fp_CodeGen # addr of ptr to fpgen() *************** *** 182,188 **** .data .align 2 ! #if defined(KERNEL) || defined(PROFILE) fp_genaddr: .long _fpgen # for calling fpgen() directly #endif KERNEL --- 182,188 ---- .data .align 2 ! #if defined(KERNEL) || defined(PROFILE) || defined(GPROF) fp_genaddr: .long _fpgen # for calling fpgen() directly #endif KERNEL Eric Brunner uunet!ibmsupt!brunner
Patch for /sys/kern_exec.c
Author: brunner
Date: Mon, 24 Jul 1989 22:00
Date: Mon, 24 Jul 1989 22:00
34 lines
1492 bytes
1492 bytes
Subject: setuid/setgid shell scripts are a security risk Index: sys/kern_exec.c IBM/4.3 Description: Setuid/setgid shell scripts have inherent problems that may be used to violate security. These problems cannot be fixed without completely revising the semantics of executable shell scripts. This patch is consistent with the patch made by Berkeley. Fix: Panel your office in asbestos, and apply the following patch to sys/kern_exec.c. *** kern_exec.c.orig Mon Jul 10 14:47:20 1989 --- kern_exec.c Mon Jul 10 14:55:16 1989 *************** *** 349,354 **** --- 349,359 ---- bcopy((caddr_t)ndp->ni_dent.d_name, (caddr_t)cfname, MAXCOMLEN); cfname[MAXCOMLEN] = '\0'; + #ifdef UCBFIX + /* This is UCBFIX 1.59, there are no other UCBFIX ifdef's in this file. */ + uid = u.u_uid; /* shell scripts can't be setuid */ + gid = u.u_gid; + #endif UCBFIX #else !VFS VN_RELE(vp); vp = (struct vnode *)0; Eric Brunner uunet!ibmsupt!brunner
Patch for /sys/sys/ufs_syscalls.c
Author: brunner
Date: Mon, 24 Jul 1989 22:02
Date: Mon, 24 Jul 1989 22:02
73 lines
2780 bytes
2780 bytes
Subject: fix for chown security problem Index: sys/ufs_syscalls.c IBM4.3-AOS Description: There's a security problem associated with 4.3BSD and 4.3BSD-tahoe systems involving the chown(2) system call. It exists in IBM's 4.3BSD derived system. This patch is consistent with the patch to sccsid version 7.3 made by Berkeley. Fix: Apply the attached patch to rcsid version 12.0 of ufs_syscalls.c. *** ufs_syscalls.c Mon Jul 10 15:05:08 1989 --- ufs_syscalls.c.orig Mon Jul 10 15:03:52 1989 *************** *** 865,880 **** if ((ip = owner(uap->fname, NOFOLLOW, rmt_simple_path, RT_chown, uap->uid, uap->gid)) == NULL) #else ! #ifdef UCBFIX ! /* This is UCBFIX 1.77, there are no other UCBFIX ifdef's in this file. */ ! register struct nameidata *ndp = &u.u_nd; ! ! ndp->ni_nameiop = LOOKUP | NOFOLLOW; ! ndp->ni_segflg = UIO_USERSPACE; ! ndp->ni_dirp = uap->fname; ! ip = namei(ndp); ! if (ip == NULL) ! #endif UCBFIX #endif return; u.u_error = chown1(ip, uap->uid, uap->gid); --- 865,871 ---- if ((ip = owner(uap->fname, NOFOLLOW, rmt_simple_path, RT_chown, uap->uid, uap->gid)) == NULL) #else ! if ((ip = owner(uap->fname, NOFOLLOW)) == NULL) #endif return; u.u_error = chown1(ip, uap->uid, uap->gid); *************** *** 940,955 **** uid = ip->i_uid; if (gid == -1) gid = ip->i_gid; ! #ifdef UCBFIX ! /* This is UCBFIX 1.77, there are no other UCBFIX ifdef's in this file. */ ! /* ! * If we don't own the file, are trying to change the owner ! * of the file, or are not a member of the target group, ! * the caller must be superuser or the call fails. ! */ ! if ((u.u_uid != ip->i_uid || uid != ip->i_uid || ! !groupmember((gid_t)gid)) && !suser()) ! #endif UCBFIX return (u.u_error); #ifdef QUOTA if (ip->i_uid == uid) /* this just speeds things a little */ --- 931,939 ---- uid = ip->i_uid; if (gid == -1) gid = ip->i_gid; ! if (uid != ip->i_uid && !suser()) ! return (u.u_error); ! if (gid != ip->i_gid && !groupmember((gid_t)gid) && !suser()) return (u.u_error); #ifdef QUOTA if (ip->i_uid == uid) /* this just speeds things a little */ Eric Brunner uunet!ibmsupt!brunner
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads