Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Mar 2002 11:40:56 -0800 (PST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 8392 for review
Message-ID:  <200203251940.g2PJeuf86686@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=8392

Change 8392 by jhb@jhb_laptop on 2002/03/25 11:39:56

	Integ another round of suser() API changes.

Affected files ...

... //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#8 integrate
... //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#10 integrate
... //depot/projects/smpng/sys/dev/dgb/dgb.c#6 integrate
... //depot/projects/smpng/sys/dev/digi/digi.c#9 integrate
... //depot/projects/smpng/sys/dev/nmdm/nmdm.c#8 integrate
... //depot/projects/smpng/sys/dev/ofw/ofw_console.c#6 integrate
... //depot/projects/smpng/sys/dev/rp/rp.c#6 integrate
... //depot/projects/smpng/sys/dev/si/si.c#3 integrate
... //depot/projects/smpng/sys/dev/sio/sio.c#12 integrate
... //depot/projects/smpng/sys/dev/syscons/syscons.c#14 integrate
... //depot/projects/smpng/sys/dev/syscons/sysmouse.c#3 integrate
... //depot/projects/smpng/sys/dev/usb/umodem.c#7 integrate
... //depot/projects/smpng/sys/dev/vinum/vinum.c#4 integrate
... //depot/projects/smpng/sys/dev/wl/if_wl.c#4 integrate
... //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vfsops.c#10 integrate
... //depot/projects/smpng/sys/fs/umapfs/umap_vfsops.c#6 integrate
... //depot/projects/smpng/sys/gnu/ext2fs/ext2_vfsops.c#10 integrate
... //depot/projects/smpng/sys/i386/i386/machdep.c#25 integrate
... //depot/projects/smpng/sys/i386/i386/mem.c#6 integrate
... //depot/projects/smpng/sys/i386/i386/sys_machdep.c#17 integrate
... //depot/projects/smpng/sys/i386/ibcs2/ibcs2_misc.c#4 integrate
... //depot/projects/smpng/sys/i386/ibcs2/ibcs2_socksys.c#6 integrate
... //depot/projects/smpng/sys/i386/ibcs2/ibcs2_sysi86.c#3 integrate
... //depot/projects/smpng/sys/i386/isa/cx.c#3 integrate
... //depot/projects/smpng/sys/i386/isa/cy.c#13 integrate
... //depot/projects/smpng/sys/i386/isa/istallion.c#3 integrate
... //depot/projects/smpng/sys/i386/isa/pcvt/pcvt_drv.c#3 integrate
... //depot/projects/smpng/sys/i386/isa/pcvt/pcvt_ext.c#7 integrate
... //depot/projects/smpng/sys/i386/isa/rc.c#7 integrate
... //depot/projects/smpng/sys/i386/isa/spigot.c#7 integrate
... //depot/projects/smpng/sys/i386/isa/stallion.c#3 integrate
... //depot/projects/smpng/sys/i386/linux/linux_machdep.c#11 integrate
... //depot/projects/smpng/sys/isa/fd.c#7 integrate
... //depot/projects/smpng/sys/isofs/cd9660/cd9660_vfsops.c#9 integrate
... //depot/projects/smpng/sys/kern/kern_ntptime.c#5 integrate
... //depot/projects/smpng/sys/kern/kern_shutdown.c#16 integrate
... //depot/projects/smpng/sys/kern/kern_time.c#7 integrate
... //depot/projects/smpng/sys/kern/kern_xxx.c#5 integrate
... //depot/projects/smpng/sys/kern/subr_prf.c#11 integrate
... //depot/projects/smpng/sys/kern/sysv_ipc.c#7 integrate
... //depot/projects/smpng/sys/kern/sysv_msg.c#10 integrate
... //depot/projects/smpng/sys/kern/tty_cons.c#11 integrate
... //depot/projects/smpng/sys/kern/vfs_syscalls.c#26 integrate
... //depot/projects/smpng/sys/net/if.c#16 integrate
... //depot/projects/smpng/sys/net/if_sl.c#8 integrate
... //depot/projects/smpng/sys/net/if_tap.c#9 integrate
... //depot/projects/smpng/sys/net/if_tun.c#8 integrate
... //depot/projects/smpng/sys/net/net_osdep.h#3 integrate
... //depot/projects/smpng/sys/net/ppp_tty.c#5 integrate
... //depot/projects/smpng/sys/net/raw_usrreq.c#4 integrate
... //depot/projects/smpng/sys/netatalk/at_control.c#3 integrate
... //depot/projects/smpng/sys/netatalk/ddp_usrreq.c#5 integrate
... //depot/projects/smpng/sys/netatm/atm_usrreq.c#4 integrate
... //depot/projects/smpng/sys/netgraph/ng_socket.c#8 integrate
... //depot/projects/smpng/sys/netgraph/ng_tty.c#5 integrate
... //depot/projects/smpng/sys/netinet/in.c#9 integrate
... //depot/projects/smpng/sys/netinet/ip_divert.c#9 integrate
... //depot/projects/smpng/sys/netinet/ip_output.c#19 integrate
... //depot/projects/smpng/sys/netinet/raw_ip.c#14 integrate
... //depot/projects/smpng/sys/netinet6/in6.c#7 integrate
... //depot/projects/smpng/sys/netinet6/in6_src.c#5 integrate
... //depot/projects/smpng/sys/netinet6/ip6_output.c#6 integrate
... //depot/projects/smpng/sys/netinet6/raw_ip6.c#7 integrate
... //depot/projects/smpng/sys/netinet6/udp6_output.c#5 integrate
... //depot/projects/smpng/sys/netipx/ipx.c#3 integrate
... //depot/projects/smpng/sys/netipx/ipx_pcb.c#4 integrate
... //depot/projects/smpng/sys/netipx/ipx_usrreq.c#4 integrate
... //depot/projects/smpng/sys/nfsserver/nfs_syscalls.c#7 integrate
... //depot/projects/smpng/sys/pc98/i386/machdep.c#20 integrate
... //depot/projects/smpng/sys/pc98/pc98/fd.c#6 integrate
... //depot/projects/smpng/sys/pc98/pc98/sio.c#13 integrate
... //depot/projects/smpng/sys/pc98/pc98/syscons.c#11 integrate
... //depot/projects/smpng/sys/pc98/pc98/wd_cd.c#5 integrate
... //depot/projects/smpng/sys/pccard/pccard.c#10 integrate
... //depot/projects/smpng/sys/security/lomac/kernel_util.c#6 integrate
... //depot/projects/smpng/sys/ufs/ffs/ffs_vfsops.c#15 integrate
... //depot/projects/smpng/sys/vm/vm_mmap.c#13 integrate
... //depot/projects/smpng/sys/vm/vm_swap.c#9 integrate

Differences ...

==== //depot/projects/smpng/sys/compat/svr4/svr4_fcntl.c#8 (text+ko) ====

@@ -264,7 +264,7 @@
 		goto out;
 
 	if (td->td_ucred->cr_uid != vattr.va_uid &&
-	    (error = suser_td(td)) != 0)
+	    (error = suser(td, 0)) != 0)
 		goto out;
 
 	if ((error = vn_start_write(vp, &mp, V_WAIT | PCATCH)) != 0)

==== //depot/projects/smpng/sys/compat/svr4/svr4_misc.c#10 (text+ko) ====

@@ -607,7 +607,7 @@
 	struct file	*fp;
 	int		 error;
 
-	if ((error = suser_td(td)) != 0)
+	if ((error = suser(td, 0)) != 0)
 		return error;
 	if ((error = getvnode(fdp, SCARG(uap, fd), &fp)) != 0)
 		return error;

==== //depot/projects/smpng/sys/dev/dgb/dgb.c#6 (text+ko) ====

@@ -1050,7 +1050,7 @@
 			}
 		}
 		if (tp->t_state & TS_XCLUDE &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto out;
 		}
@@ -1548,7 +1548,7 @@
 		}
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error != 0)
 				return (error);
 			*ct = *(struct termios *)data;
@@ -1770,7 +1770,7 @@
 		break;
 	case TIOCMSDTRWAIT:
 		/* must be root since the wait applies to following logins */
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0) {
 			splx(s);
 			return (error);

==== //depot/projects/smpng/sys/dev/digi/digi.c#9 (text+ko) ====

@@ -783,7 +783,7 @@
 			}
 			goto open_top;
 		}
-		if (tp->t_state & TS_XCLUDE && td->td_proc->p_ucred->cr_uid != 0) {
+		if (tp->t_state & TS_XCLUDE && suser(td, 0) != 0) {
 			error = EBUSY;
 			goto out;
 		}
@@ -1146,7 +1146,7 @@
 
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error != 0)
 				return (error);
 			*ct = *(struct termios *)data;
@@ -1317,7 +1317,7 @@
 		*(int *)data = digimctl(port, 0, DMGET);
 		break;
 	case TIOCMSDTRWAIT:
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0) {
 			splx(s);
 			return (error);

==== //depot/projects/smpng/sys/dev/nmdm/nmdm.c#8 (text+ko) ====

@@ -209,7 +209,7 @@
 		tp->t_lflag = TTYDEF_LFLAG;
 		tp->t_cflag = TTYDEF_CFLAG;
 		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
-	} else if (tp->t_state & TS_XCLUDE && suser_td(td)) {
+	} else if (tp->t_state & TS_XCLUDE && suser(td, 0)) {
 		return (EBUSY);
 	} else if (pti->pt_prison != td->td_ucred->cr_prison) {
 		return (EBUSY);

==== //depot/projects/smpng/sys/dev/ofw/ofw_console.c#6 (text+ko) ====

@@ -123,7 +123,7 @@
 		ttsetwater(tp);
 
 		setuptimeout = 1;
-	} else if ((tp->t_state & TS_XCLUDE) && suser_td(td)) {
+	} else if ((tp->t_state & TS_XCLUDE) && suser(td, 0)) {
 		return (EBUSY);
 	}
 

==== //depot/projects/smpng/sys/dev/rp/rp.c#6 (text+ko) ====

@@ -1010,7 +1010,7 @@
 				goto open_top;
 			}
 		}
-		if(tp->t_state & TS_XCLUDE && suser_td(td) != 0) {
+		if(tp->t_state & TS_XCLUDE && suser(td, 0) != 0) {
 			splx(oldspl);
 			error = EBUSY;
 			goto out2;
@@ -1271,7 +1271,7 @@
 		}
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if(error != 0)
 				return(error);
 			*ct = *(struct termios *)data;
@@ -1416,7 +1416,7 @@
 		*(int *)data = result;
 		break;
 	case TIOCMSDTRWAIT:
-		error = suser_td(td);
+		error = suser(td, 0);
 		if(error != 0) {
 			splx(oldspl);
 			return(error);

==== //depot/projects/smpng/sys/dev/si/si.c#3 (text+ko) ====

@@ -607,7 +607,7 @@
 
 	/* quickly let in /dev/si_control */
 	if (IS_CONTROLDEV(mynor)) {
-		if ((error = suser_td(td)))
+		if ((error = suser(td, 0)))
 			return(error);
 		return(0);
 	}
@@ -686,7 +686,7 @@
 			}
 		}
 		if (tp->t_state & TS_XCLUDE &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			DPRINT((pp, DBG_OPEN|DBG_FAIL,
 				"already open and EXCLUSIVE set\n"));
 			error = EBUSY;
@@ -951,7 +951,7 @@
 		}
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error != 0)
 				return (error);
 			*ct = *(struct termios *)data;
@@ -1064,7 +1064,7 @@
 		break;
 	case TIOCMSDTRWAIT:
 		/* must be root since the wait applies to following logins */
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error == 0)
 			pp->sp_dtr_wait = *(int *)data * hz / 100;
 		break;
@@ -1117,7 +1117,7 @@
 
 	ip = (int *)data;
 
-#define SUCHECK if ((error = suser_td(td))) goto out
+#define SUCHECK if ((error = suser(td, 0))) goto out
 
 	switch (cmd) {
 	case TCSIPORTS:

==== //depot/projects/smpng/sys/dev/sio/sio.c#12 (text+ko) ====

@@ -1201,7 +1201,7 @@
 			}
 		}
 		if (tp->t_state & TS_XCLUDE &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto out;
 		}
@@ -1937,7 +1937,7 @@
 		}
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error != 0)
 				return (error);
 			*ct = *(struct termios *)data;
@@ -2028,7 +2028,7 @@
 		break;
 	case TIOCMSDTRWAIT:
 		/* must be root since the wait applies to following logins */
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0) {
 			splx(s);
 			return (error);

==== //depot/projects/smpng/sys/dev/syscons/syscons.c#14 (text+ko) ====

@@ -479,7 +479,7 @@
 	(*linesw[tp->t_line].l_modem)(tp, 1);
     }
     else
-	if (tp->t_state & TS_XCLUDE && suser_td(td))
+	if (tp->t_state & TS_XCLUDE && suser(td, 0))
 	    return(EBUSY);
 
     error = (*linesw[tp->t_line].l_open)(dev, tp);
@@ -976,7 +976,7 @@
 	return 0;
 
     case KDENABIO:      	/* allow io operations */
-	error = suser_td(td);
+	error = suser(td, 0);
 	if (error != 0)
 	    return error;
 	error = securelevel_gt(td->td_ucred, 0);

==== //depot/projects/smpng/sys/dev/syscons/sysmouse.c#3 (text+ko) ====

@@ -99,7 +99,7 @@
 		tp->t_ispeed = tp->t_ospeed = TTYDEF_SPEED;
 		smparam(tp, &tp->t_termios);
 		(*linesw[tp->t_line].l_modem)(tp, 1);
-	} else if (tp->t_state & TS_XCLUDE && suser_td(td)) {
+	} else if (tp->t_state & TS_XCLUDE && suser(td, 0)) {
 		return EBUSY;
 	}
 

==== //depot/projects/smpng/sys/dev/usb/umodem.c#7 (text+ko) ====

@@ -602,7 +602,7 @@
 
 	if (ISSET(tp->t_state, TS_ISOPEN) &&
 	    ISSET(tp->t_state, TS_XCLUDE) &&
-	    suser_td(p))
+	    suser(p, 0))
 		return (EBUSY);
 
 	/*

==== //depot/projects/smpng/sys/dev/vinum/vinum.c#4 (text+ko) ====

@@ -375,7 +375,7 @@
 	}
 
     case VINUM_SUPERDEV_TYPE:
-	error = suser_td(td);				    /* are we root? */
+	error = suser(td, 0);				    /* are we root? */
 	if (error == 0) {				    /* yes, can do */
 	    if (devminor == VINUM_DAEMON_DEV)		    /* daemon device */
 		vinum_conf.flags |= VF_DAEMONOPEN;	    /* we're open */

==== //depot/projects/smpng/sys/dev/wl/if_wl.c#4 (text+ko) ====

@@ -1214,7 +1214,7 @@
 	/* pointer to buffer in user space */
 	up = (void *)ifr->ifr_data;
 	/* work out if they're root */
-	isroot = (suser_td(td) == 0);
+	isroot = (suser(td, 0) == 0);
 	
 	for (i = 0; i < 0x40; i++) {
 	    /* don't hand the DES key out to non-root users */
@@ -1229,7 +1229,7 @@
 	/* copy the PSA in from the caller; we only copy _some_ values */
     case SIOCSWLPSA:
 	/* root only */
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 	    break;
 	error = EINVAL;	/* assume the worst */
 	/* pointer to buffer in user space containing data */
@@ -1283,7 +1283,7 @@
 	 */
     case SIOCSWLCNWID:
 	/* root only */
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 	    break;
 	if (!(ifp->if_flags & IFF_UP)) {
 	    error = EIO;	/* only allowed while up */
@@ -1301,7 +1301,7 @@
 	/* copy the EEPROM in 2.4 Gz WaveMODEM  out to the caller */
     case SIOCGWLEEPROM:
 	/* root only */
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 	    break;
 	/* pointer to buffer in user space */
 	up = (void *)ifr->ifr_data;
@@ -1324,7 +1324,7 @@
 	/* zero (Delete) the wl cache */
     case SIOCDWLCACHE:
 	/* root only */
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 	    break;
 	wl_cache_zero(unit);
 	break;

==== //depot/projects/smpng/sys/fs/msdosfs/msdosfs_vfsops.c#10 (text+ko) ====

@@ -194,7 +194,7 @@
 			 * If upgrade to read-write by non-root, then verify
 			 * that user has necessary permissions on the device.
 			 */
-			if (suser_td(td)) {
+			if (suser(td, 0)) {
 				devvp = pmp->pm_devvp;
 				vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
 				error = VOP_ACCESS(devvp, VREAD | VWRITE,
@@ -241,7 +241,7 @@
 	 * If mount by non-root, then verify that user has necessary
 	 * permissions on the device.
 	 */
-	if (suser_td(td)) {
+	if (suser(td, 0)) {
 		accessmode = VREAD;
 		if ((mp->mnt_flag & MNT_RDONLY) == 0)
 			accessmode |= VWRITE;

==== //depot/projects/smpng/sys/fs/umapfs/umap_vfsops.c#6 (text+ko) ====

@@ -105,7 +105,7 @@
 	/*
 	 * Only for root
 	 */
-	if ((error = suser_td(td)) != 0)
+	if ((error = suser(td, 0)) != 0)
 		return (error);
 
 #ifdef DEBUG

==== //depot/projects/smpng/sys/gnu/ext2fs/ext2_vfsops.c#10 (text+ko) ====

@@ -233,7 +233,7 @@
 			 * If upgrade to read-write by non-root, then verify
 			 * that user has necessary permissions on the device.
 			 */
-			if (suser_td(td)) {
+			if (suser(td, 0)) {
 				vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
 				if ((error = VOP_ACCESS(devvp, VREAD | VWRITE,
 				    td->td_ucred, td)) != 0) {
@@ -286,7 +286,7 @@
 	 * If mount by non-root, then verify that user has necessary
 	 * permissions on the device.
 	 */
-	if (suser_td(td)) {
+	if (suser(td, 0)) {
 		accessmode = VREAD;
 		if ((mp->mnt_flag & MNT_RDONLY) == 0)
 			accessmode |= VWRITE;

==== //depot/projects/smpng/sys/i386/i386/machdep.c#25 (text+ko) ====

@@ -2127,7 +2127,7 @@
 		 * from within kernel mode?
 		 */
 
-		if (suser_td(td) != 0) {
+		if (suser(td, 0) != 0) {
 			if (dbregs->dr7 & 0x3) {
 				/* dr0 is enabled */
 				if (dbregs->dr0 >= VM_MAXUSER_ADDRESS)

==== //depot/projects/smpng/sys/i386/i386/mem.c#6 (text+ko) ====

@@ -122,7 +122,7 @@
 		}
 		break;
 	case 14:
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0)
 			return (error);
 		error = securelevel_gt(td->td_ucred, 0);

==== //depot/projects/smpng/sys/i386/i386/sys_machdep.c#17 (text+ko) ====

@@ -183,7 +183,7 @@
 	if ((error = copyin(args, &ua, sizeof(struct i386_ioperm_args))) != 0)
 		return (error);
 
-	if ((error = suser_td(td)) != 0)
+	if ((error = suser(td, 0)) != 0)
 		return (error);
 	if ((error = securelevel_gt(td->td_ucred, 0)) != 0)
 		return (error);

==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_misc.c#4 (text+ko) ====

@@ -1013,7 +1013,7 @@
 #define IBCS2_DATALOCK	4
 
 	
-        if ((error = suser_td(td)) != 0)
+        if ((error = suser(td, 0)) != 0)
                 return EPERM;
 	switch(SCARG(uap, cmd)) {
 	case IBCS2_UNLOCK:
@@ -1048,7 +1048,7 @@
 #define SCO_AD_GETBMAJ      0
 #define SCO_AD_GETCMAJ      1
 
-        if (suser_td(td))
+        if (suser(td, 0))
                 return EPERM;
 
 	switch(SCARG(uap, cmd)) {

==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_socksys.c#6 (text+ko) ====

@@ -173,7 +173,7 @@
 	char hname[MAXHOSTNAMELEN], *ptr;
 	int error, sctl[2], hlen;
 
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 		return (error);
 
 	/* W/out a hostname a domain-name is nonsense */

==== //depot/projects/smpng/sys/i386/ibcs2/ibcs2_sysi86.c#3 (text+ko) ====

@@ -73,7 +73,7 @@
 	        int name[2];
 	        int error;
 
-		if ((error = suser_td(td)))
+		if ((error = suser(td, 0)))
 		  return (error);
 		name[0] = CTL_KERN;
 		name[1] = KERN_HOSTNAME;

==== //depot/projects/smpng/sys/i386/isa/cx.c#3 (text+ko) ====

@@ -162,7 +162,7 @@
 	tp = c->ttyp;
 	tp->t_dev = dev;
 	if ((tp->t_state & TS_ISOPEN) && (tp->t_state & TS_XCLUDE) &&
-	    suser_td(td))
+	    suser(td, 0))
 		return (EBUSY);
 	if (! (tp->t_state & TS_ISOPEN)) {
 		ttychars (tp);

==== //depot/projects/smpng/sys/i386/isa/cy.c#13 (text+ko) ====

@@ -718,7 +718,7 @@
 			}
 		}
 		if (tp->t_state & TS_XCLUDE &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto out;
 		}
@@ -1637,7 +1637,7 @@
 		}
 		switch (cmd) {
 		case TIOCSETA:
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error != 0)
 				return (error);
 			*ct = *(struct termios *)data;
@@ -1736,7 +1736,7 @@
 		break;
 	case TIOCMSDTRWAIT:
 		/* must be root since the wait applies to following logins */
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0) {
 			splx(s);
 			return (error);

==== //depot/projects/smpng/sys/i386/isa/istallion.c#3 (text+ko) ====

@@ -1010,7 +1010,7 @@
 			}
 		}
 		if ((tp->t_state & TS_XCLUDE) &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto stliopen_end;
 		}
@@ -1182,7 +1182,7 @@
 
 		switch (cmd) {
 		case TIOCSETA:
-			if ((error = suser_td(td)) == 0)
+			if ((error = suser(td, 0)) == 0)
 				*localtios = *((struct termios *) data);
 			break;
 		case TIOCGETA:
@@ -1318,7 +1318,7 @@
 		*((int *) data) = (portp->sigs | TIOCM_LE);
 		break;
 	case TIOCMSDTRWAIT:
-		if ((error = suser_td(td)) == 0)
+		if ((error = suser(td, 0)) == 0)
 			portp->dtrwait = *((int *) data) * hz / 100;
 		break;
 	case TIOCMGDTRWAIT:

==== //depot/projects/smpng/sys/i386/isa/pcvt/pcvt_drv.c#3 (text+ko) ====

@@ -316,7 +316,7 @@
 		(*linesw[tp->t_line].l_modem)(tp, 1);	/* fake connection */
 		winsz = 1;			/* set winsize later */
 	}
-	else if (tp->t_state & TS_XCLUDE && suser_td(td))
+	else if (tp->t_state & TS_XCLUDE && suser(td, 0))
 	{
 		return (EBUSY);
 	}

==== //depot/projects/smpng/sys/i386/isa/pcvt/pcvt_ext.c#7 (text+ko) ====

@@ -2619,7 +2619,7 @@
 	{
 		struct trapframe *fp = td->td_frame;
 
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0)
 			return (error);
 		error = securelevel_gt(td->td_ucred, 0);

==== //depot/projects/smpng/sys/i386/isa/rc.c#7 (text+ko) ====

@@ -764,7 +764,7 @@
 			}
 		}
 		if (tp->t_state & TS_XCLUDE &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto out;
 		}
@@ -1118,7 +1118,7 @@
 		break;
 
 	    case TIOCMSDTRWAIT:
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0) {
 			splx(s);
 			return (error);

==== //depot/projects/smpng/sys/i386/isa/spigot.c#7 (text+ko) ====

@@ -175,7 +175,7 @@
 	 * require sufficient privilege soon and nothing much can be done
 	 * without them.
 	 */
-	error = suser_td(td);
+	error = suser(td, 0);
 	if (error != 0)
 		return error;
 	error = securelevel_gt(td->td_ucred, 0);
@@ -232,7 +232,7 @@
 		break;
 	case	SPIGOT_IOPL_ON:	/* allow access to the IO PAGE */
 #if !defined(SPIGOT_UNSECURE)
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error != 0)
 			return error;
 		error = securelevel_gt(td->td_ucred, 0);

==== //depot/projects/smpng/sys/i386/isa/stallion.c#3 (text+ko) ====

@@ -832,7 +832,7 @@
 			}
 		}
 		if ((tp->t_state & TS_XCLUDE) &&
-		    suser_td(td)) {
+		    suser(td, 0)) {
 			error = EBUSY;
 			goto stlopen_end;
 		}
@@ -970,7 +970,7 @@
 
 		switch (cmd) {
 		case TIOCSETA:
-			if ((error = suser_td(td)) == 0)
+			if ((error = suser(td, 0)) == 0)
 				*localtios = *((struct termios *) data);
 			break;
 		case TIOCGETA:
@@ -1088,7 +1088,7 @@
 		*((int *) data) = (stl_getsignals(portp) | TIOCM_LE);
 		break;
 	case TIOCMSDTRWAIT:
-		if ((error = suser_td(td)) == 0)
+		if ((error = suser(td, 0)) == 0)
 			portp->dtrwait = *((int *) data) * hz / 100;
 		break;
 	case TIOCMGDTRWAIT:

==== //depot/projects/smpng/sys/i386/linux/linux_machdep.c#11 (text+ko) ====

@@ -559,7 +559,7 @@
 
 	if (args->level < 0 || args->level > 3)
 		return (EINVAL);
-	if ((error = suser_td(td)) != 0)
+	if ((error = suser(td, 0)) != 0)
 		return (error);
 	if ((error = securelevel_gt(td->td_ucred, 0)) != 0)
 		return (error);

==== //depot/projects/smpng/sys/isa/fd.c#7 (text+ko) ====

@@ -2642,7 +2642,7 @@
 			 * Set density definition permanently.  Only
 			 * allow for superuser.
 			 */
-			if (suser_td(td) != 0)
+			if (suser(td, 0) != 0)
 				return (EPERM);
 			fd->fts[type] = *(struct fd_type *)addr;
 		}
@@ -2667,7 +2667,7 @@
 #endif
 
 	case FD_CLRERR:
-		if (suser_td(td) != 0)
+		if (suser(td, 0) != 0)
 			return (EPERM);
 		fd->fdc->fdc_errs = 0;
 		return (0);
@@ -2749,7 +2749,7 @@
 
 	case FD_STYPE:                  /* set drive type */
 		/* this is considered harmful; only allow for superuser */
-		if (suser_td(td) != 0)
+		if (suser(td, 0) != 0)
 			return (EPERM);
 		*fd->ft = *(struct fd_type *)addr;
 		break;
@@ -2773,7 +2773,7 @@
 #endif
 
 	case FD_CLRERR:
-		if (suser_td(td) != 0)
+		if (suser(td, 0) != 0)
 			return (EPERM);
 		fd->fdc->fdc_errs = 0;
 		break;

==== //depot/projects/smpng/sys/isofs/cd9660/cd9660_vfsops.c#9 (text+ko) ====

@@ -238,7 +238,7 @@
 	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
 	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
 	if (error) 
-		error = suser_td(td);
+		error = suser(td, 0);
 	if (error) {
 		vput(devvp);
 		return (error);

==== //depot/projects/smpng/sys/kern/kern_ntptime.c#5 (text+ko) ====

@@ -300,7 +300,7 @@
 	mtx_lock(&Giant);
 	modes = ntv.modes;
 	if (modes)
-		error = suser_td(td);
+		error = suser(td, 0);
 	if (error)
 		goto done2;
 	s = splclock();

==== //depot/projects/smpng/sys/kern/kern_shutdown.c#16 (text+ko) ====

@@ -149,7 +149,7 @@
 	int error;
 
 	mtx_lock(&Giant);
-	if ((error = suser_td(td)) == 0)
+	if ((error = suser(td, 0)) == 0)
 		boot(uap->opt);
 	mtx_unlock(&Giant);
 	return (error);

==== //depot/projects/smpng/sys/kern/kern_time.c#7 (text+ko) ====

@@ -187,7 +187,7 @@
 	int error;
 
 	mtx_lock(&Giant);
-	if ((error = suser_td(td)) != 0)
+	if ((error = suser(td, 0)) != 0)
 		goto done2;
 	if (SCARG(uap, clock_id) != CLOCK_REALTIME) {
 		error = EINVAL;
@@ -370,7 +370,7 @@
 
 	mtx_lock(&Giant);
 
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 		goto done2;
 	/* Verify all parameters before changing time. */
 	if (uap->tv) {
@@ -421,7 +421,7 @@
 
 	mtx_lock(&Giant);
 
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 		goto done2;
 	error = copyin((caddr_t)uap->delta, (caddr_t)&atv,
 		    sizeof(struct timeval));

==== //depot/projects/smpng/sys/kern/kern_xxx.c#5 (text+ko) ====

@@ -143,7 +143,7 @@
 	int error;
 
 	mtx_lock(&Giant);
-	if ((error = suser_td(td)))
+	if ((error = suser(td, 0)))
 		hostid = uap->hostid;
 	mtx_unlock(&Giant);
 	return (error);
@@ -298,7 +298,7 @@
         int error, domainnamelen;
 
 	mtx_lock(&Giant);
-        if ((error = suser_td(td)))
+        if ((error = suser(td, 0)))
 		goto done2;
         if ((u_int)uap->len > sizeof (domainname) - 1) {
 		error = EINVAL;

==== //depot/projects/smpng/sys/kern/subr_prf.c#11 (text+ko) ====

@@ -861,7 +861,7 @@
 	int error;
 
 	if (!unprivileged_read_msgbuf) {
-		error = suser_td(req->td);
+		error = suser(req->td, 0);
 		if (error)
 			return (error);
 	}

==== //depot/projects/smpng/sys/kern/sysv_ipc.c#7 (text+ko) ====

@@ -81,7 +81,7 @@
 	/* Check for user match. */
 	if (cred->cr_uid != perm->cuid && cred->cr_uid != perm->uid) {
 		if (mode & IPC_M)
-			return (suser_td(td) == 0 ? 0 : EPERM);
+			return (suser(td, 0) == 0 ? 0 : EPERM);
 		/* Check for group match. */
 		mode >>= 3;
 		if (!groupmember(perm->gid, cred) &&
@@ -93,5 +93,5 @@
 	if (mode & IPC_M)
 		return (0);
 	return ((mode & perm->mode) == mode ||
-	    suser_td(td) == 0 ? 0 : EACCES);
+	    suser(td, 0) == 0 ? 0 : EACCES);
 }

==== //depot/projects/smpng/sys/kern/sysv_msg.c#10 (text+ko) ====

@@ -421,7 +421,7 @@
 		if ((error = copyin(user_msqptr, &msqbuf, sizeof(msqbuf))) != 0)
 			goto done2;
 		if (msqbuf.msg_qbytes > msqptr->msg_qbytes) {
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error)
 				goto done2;
 		}

==== //depot/projects/smpng/sys/kern/tty_cons.c#11 (text+ko) ====

@@ -456,7 +456,7 @@
 	 * output from the "virtual" console.
 	 */
 	if (cmd == TIOCCONS && constty) {
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error)
 			return (error);
 		constty = NULL;

==== //depot/projects/smpng/sys/kern/vfs_syscalls.c#26 (text+ko) ====

@@ -198,7 +198,7 @@
 		return (ENAMETOOLONG);
 
 	if (usermount == 0) {
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error)
 			return (error);
 	}
@@ -206,7 +206,7 @@
 	 * Do not allow NFS export by non-root users.
 	 */
 	if (fsflags & MNT_EXPORTED) {
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error)
 			return (error);
 	}
@@ -245,7 +245,7 @@
 		 * permitted to update it.
 		 */
 		if (mp->mnt_stat.f_owner != td->td_ucred->cr_uid) {
-			error = suser_td(td);
+			error = suser(td, 0);
 			if (error) {
 				vput(vp);
 				return (error);
@@ -280,7 +280,7 @@
 		return (error);
 	}
 	if (va.va_uid != td->td_ucred->cr_uid) {
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error) {
 			vput(vp);
 			return (error);
@@ -302,7 +302,7 @@
 		linker_file_t lf;
 
 		/* Only load modules for root (very important!) */
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error) {
 			vput(vp);
 			return error;
@@ -522,7 +522,7 @@
 	 * permitted to unmount this filesystem.
 	 */
 	if (mp->mnt_stat.f_owner != td->td_ucred->cr_uid) {
-		error = suser_td(td);
+		error = suser(td, 0);
 		if (error) {
 			vput(vp);
 			return (error);
@@ -1332,7 +1332,7 @@
 	switch (SCARG(uap, mode) & S_IFMT) {
 	case S_IFCHR:
 	case S_IFBLK:
-		error = suser_td(td);
+		error = suser(td, 0);
 		break;
 	default:
 		error = suser(td, PRISON_ROOT);
@@ -3622,7 +3622,7 @@
 	/*
 	 * Must be super user
 	 */
-	error = suser_td(td);
+	error = suser(td, 0);
 	if (error)
 		return (error);
 	NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, uap->fname, td);
@@ -3678,7 +3678,7 @@
 	/*
 	 * Must be super user
 	 */
-	error = suser_td(td);
+	error = suser(td, 0);
 	if (error)
 		return (error);
 
@@ -3854,7 +3854,7 @@
 	/*
 	 * Must be super user
 	 */
-	error = suser_td(td);
+	error = suser(td, 0);
 	if (error)
 		return (error);
 	
@@ -3901,7 +3901,7 @@
 	/*
 	 * Must be super user
 	 */

>>> TRUNCATED FOR MAIL (1000 lines) <<<

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203251940.g2PJeuf86686>