Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jul 2025 21:54:45 +0000
From:      Shawn Webb <shawn.webb@hardenedbsd.org>
To:        Rick Macklem <rick.macklem@gmail.com>
Cc:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: RFC: checking file systems support UF_HIDDEN, UF_SYSTEM
Message-ID:  <rzhddesedhkibeq2mzcpgqaw2y3guallutuq7a4uzpxa6fgqh4@4yyon25myif7>
In-Reply-To: <CAM5tNy5Cm=YhUkhXsA=O5ha-om7h5MQk3_SuLFjgZX_EA5ShkA@mail.gmail.com>
References:  <CAM5tNy5eoY5f-fo9BKc4v34XKXF6%2B6Ae7Zpq=FH7owaSRYSHmw@mail.gmail.com> <5emcw3uocuaenm2lwdrqqvxgiqpo7uazon6y2hzelhi5qjxxj4@trymutqekdiy> <CAM5tNy5Cm=YhUkhXsA=O5ha-om7h5MQk3_SuLFjgZX_EA5ShkA@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Jul 02, 2025 at 02:45:58PM -0700, Rick Macklem wrote:
> On Wed, Jul 2, 2025 at 2:05 PM Shawn Webb <shawn.webb@hardenedbsd.org> wrote:
> >
> > On Wed, Jul 02, 2025 at 02:02:14PM -0700, Rick Macklem wrote:
> > > Hi,
> > >
> > > I am implementing the "hidden" and "system" attributes for
> > > NFSv4 using UF_HIDDEN and UF_SYSTEM.
> > >
> > > In a couple of places in the code, I need to know if a file
> > > system supports these flags.
> > > I can think of two ways to do this.
> > > #1 - Create a new VFCF_HIDSYS flag that is set via VFS_SET()
> > >        for file systems that support the UF_HIDDEN and UF_SYSTEM
> > >        flags and test for that flag being set.
> > > or
> > > #2 - Write it this way...
> > >       if (strcmp(vp->v_mount->mnt_vfc->vfc_name, "zfs") != 0 ||
> > >           strcmp(vp->v_mount->mnt_vfc->vfc_name, "ufs") != 0 ||
> > >           strcmp(vp->v_mount->mnt_vfc->vfc_name, "msdosfs") != 0 ||
> > >           strcmp(vp->v_mount->mnt_vfc->vfc_name, "tmpfs") != 0)
> > >
> > > Which do you think is preferable (or do you have another idea)?
> >
> > I have no skin in the game, but I'm curious if you could tell me more
> > about UF_HIDDEN. Can you explain what that is or perhaps link me to
> > some documentation for me to read?
> I don't know why or when these were added to FreeBSD, but I believe
> their origin is in MSDOS long ago. The fat file system had these two flags
> that MSDOS used, called "hiiden" and "system".
> I believe "hidden" is somewhat similar to POSIX file
> names that start with "." and "system" made the file harder to delete.
> (But, I hate to admit I even recall anything about MSDOS;-)
> 
> If you google "windows system and hidden" you'll get something that
> might answer your question, thanks to their AI.
> 
> W.r.t. NFSv4, the current interest is from the group that is working
> on the Windows NFSv4.1 client.

That explains a lot. Thanks for the explanation!

-- 
Shawn Webb
Cofounder / Security Engineer
HardenedBSD

Signal Username:  shawn_webb.74
Tor-ified Signal: +1 303-901-1600 / shawn_webb_opsec.50
https://git.hardenedbsd.org/hardenedbsd/pubkeys/-/raw/master/Shawn_Webb/03A4CBEBB82EA5A67D9F3853FF2E67A277F8E1FA.pub.asc

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEA6TL67gupaZ9nzhT/y5nonf44foFAmhlqp4ACgkQ/y5nonf4
4foo5g/9FrXyHQTjkmr6KFw8y6vj8mQzjzsh6bcfLVBSf5FNOlhVB40Pgb/Upy6C
qTMYXIUPRE5i0mHGG+zJ4OtEkT06XCvC9ozA1mU+yd0ireMf1UM+scjmYRJt6S/j
CmnZL4Vn76ZJaQXSVvIK4E7de3bMdOEgBPjyhBRH72bIHIqkyBq27uDh05HNLev2
7T3NlEbpAWeViiKRP6PnVO5IBwgh0KCbvA/Izwhlem1E+lfP8jajsSEuQv7CyllF
gktI9sPBgQAmtPTp/Pa9/80/P9A0yn9TWX3eq3CvWQLIVmHRISVEo0zKsWCYpGdv
HJbyvJSjpYzncL8xq5eBr3N9i3onPK+cUyelPk14kq3p/GHG+LlelJjtBwUHSXbT
4/UoWOh/nxUQnqWsa6B+hY6zshHpzvAlHx65GmztHu7dUaManfa0xAmUDsqdMX73
jHtAGEYXh+BL0AqEbM0+js/mjyYqtwQCEAzEiytsDDwF/suKN3Ol3r/upr9u6pLl
RzUFE32Yvp5qdQJESQGYbPlTb0Svu8kxWRLewYzJJ4BS7bqtzBLnZ58py90J4PM3
ByYUILL3fK/ryQgJI2IYuAS9OlqlwQKMBwwV1/S8DV7ung4Nl/LXuYiw8qiGhd2l
XS/w+q2n47UOqWTizn09TSQm/qTz/DbE/S/ofqw4u8OlFmtGx4M=
=LxQw
-----END PGP SIGNATURE-----
home | help

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