Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Sep 2001 01:03:00 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        <obrien@FreeBSD.ORG>, <sobomax@FreeBSD.ORG>, <current@FreeBSD.ORG>
Subject:   Re: cvs commit: src/sys/dev/ccd ccd.c src/sys/modules/ccd Makefile src/sys/sys ccdvar.h 
Message-ID:  <20010907001318.U31566-100000@alphplex.bde.org>
In-Reply-To: <92472.999778892@critter>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 6 Sep 2001, Poul-Henning Kamp wrote:

> In message <20010906213206.P30661-100000@alphplex.bde.org>, Bruce Evans writes:
> >This was decreed but not agreed to.  I don't use devfs and don't plan
> >to use it until it works at least as well as specfs (if this is
> >possible).  I have noticed about 10 minor bugs in it despite only running
> >it to test it every 6 months or so.  Examples:
>
> Why don't you report such findings then ?

As you know, I don't believe in devfs :-).

> >- file time updates are broken in several ways.
>
> Details ?

I actually did report a few of these to you in private mail.  The main ones
are:
- updates done by getnanotime(), so they always have low resolution and are
  incoherent with time(1).  Fix: use vfs_timestamp().
- missing access checking for VA_UTIMES_NULL.  Fix: clone ufs_setattr()
  better.
- missing atime updates for readdir().

> >- stat() doesn't work right on devfs directories (st_size and st_blocks
> >  zero for all devfs files, but should be nonzero for directories).
>
> Where is this requirement from ?

POLA.  It's strange and less than useful for utilities like ls(1) to show
a zero size for directories... (st_size is unspecified for directories in
POSIX).

> >- acd devices still have insecure modes (world readable).
>
> That is not a fault in DEVFS but in the driver.

There are some more strange modes, although maybe no more security-related
ones, including some in devfs itself:

Index: devfs_devs.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/devfs/devfs_devs.c,v
retrieving revision 1.15
diff -u -2 -r1.15 devfs_devs.c
--- devfs_devs.c	26 May 2001 08:27:52 -0000	1.15
+++ devfs_devs.c	13 Aug 2001 07:43:23 -0000
@@ -222,5 +223,5 @@

 	dd->de_dirent->d_type = DT_DIR;
-	dd->de_mode = 0755;
+	dd->de_mode = 0555;
 	dd->de_links = 2;
 	dd->de_dir = dd;
@@ -338,5 +339,5 @@
 				de->de_uid = 0;
 				de->de_gid = 0;
-				de->de_mode = 0666;
+				de->de_mode = 0755;
 				de->de_dirent->d_type = DT_LNK;
 				pdev = dev->si_parent;

Bruce


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




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