cvs commit: src/sys/kern kern_xxx.c

Pawel Jakub Dawidek nick at garage.freebsd.pl
Sun Aug 24 01:42:00 PDT 2003


On Sat, Aug 23, 2003 at 08:45:58AM -0700, Tim J. Robbins wrote:
+>   Commiter:	"Tim J. Robbins" <tjr at FreeBSD.org>
+>   Branch:	HEAD
+> 
+>   Files:
+> 	1.38   src/sys/kern/kern_xxx.c  
+> 
+>   Log:
+>   Fix a logic error in osethostid() that was introduced in rev. 1.34:
+>   allow hostid to be set when suser() returns 0, not when it returns
+>   an error. This would have allowed non-root users to set the host ID.

Simlar bug is here:

--- /sys/dev/sab/sab.c.orig	Sun Aug 24 10:06:23 2003
+++ /sys/dev/sab/sab.c	Sun Aug 24 10:06:31 2003
@@ -645,7 +645,7 @@
 
 	if ((tp->t_state & TS_ISOPEN) != 0 &&
 	    (tp->t_state & TS_XCLUDE) != 0 &&
-	    !suser(td))
+	    suser(td) != 0)
 		return (EBUSY);
 
 	if ((tp->t_state & TS_ISOPEN) == 0) {

And here:

--- /sys/dev/zs/zs.c.orig	Sun Aug 24 10:11:06 2003
+++ /sys/dev/zs/zs.c	Sun Aug 24 10:11:21 2003
@@ -463,7 +463,7 @@
 
 	if ((tp->t_state & TS_ISOPEN) != 0 &&
 	    (tp->t_state & TS_XCLUDE) != 0 &&
-	    !suser(td))
+	    suser(td) != 0)
 		return (EBUSY);
 
 	if ((tp->t_state & TS_ISOPEN) == 0) {

-- 
Pawel Jakub Dawidek                       pawel at dawidek.net
UNIX Systems Programmer/Administrator     http://garage.freebsd.pl
Am I Evil? Yes, I Am!                     http://cerber.sourceforge.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 305 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20030824/ef511c2f/attachment.bin


More information about the cvs-src mailing list