fullpath in mac_create_devfs_xxx entrypoints?

Robert Watson rwatson at FreeBSD.org
Thu Nov 24 16:14:48 GMT 2005


On Thu, 17 Nov 2005, Yanjun Wu wrote:

> When intiallize genfs, TrustedBSD adds additional parameter fullpath to the
> following entry points:
> mac_create_devfs_device
> mac_create_devfs_directory
> mac_create_devfs_symlink
> 
> while FreeBSD 6.0 Release uses dev->si_name as the fullpath directly. 
> Which is corret or better?

Yanjun,

In the MAC branch there are a set of local changes to the devfs support 
that are aimed at improving path support for MAC modules.  Some of the 
changes there are no longer relevant due to changes in devfs in the base 
tree.  Others still make sense.  I need to review what's there and decide 
what needs to be merged.  I've written a small test module, mac_devfs, now 
in the trustedbsd_mac branch, to print out the paths passed into each 
field, which generally appear to be the same.  My one concern right now is 
that things may not be quite right for multi-directory subtrees in /dev -- 
i.e., /dev/this/that/device.  One of the particular detriments of the old 
API was that it passed a string and string length to the MAC modules for 
directories when creating directories, in order to handle intermediate 
directories without constructing new strings.  I'll try to take a look at 
this in detail tomorrow.

> And also, comparing to FreeBSD 6.0, TrustedBSD has additional parameter
> mount_arg_label in the following entrypoints:
> mac_create_mount
> mac_check_remount
> What does mount_arg_label mean?

The intent here is to support explicit selection of a label in user space 
at the time of mount for a removable device.  I.e., that you can do 
something like:

   mount -t msdos -o label=biba/low /dev/fd0 /mnt

Previously, this relied on a new system call, lmount(), which accepted a 
label argument.  It's in the process of being migrated to using an 
optional argument to the nmount() system call.  Changes to work to 
complete support for nmount across file systems are currently being made 
in the main FreeBSD CVS repository.  Once that's complete, we'll integrate 
those changes into the MAC branch to finish this up.  The main sticking 
point in the SEBSD branch for the mount changes is that UFS in 6.0 and 
earlier is mounted using mount(), not nmount(), so the nmount() label 
support isn't used for UFS in that code.  Hopefully this will all be fixed 
up in the next month or two.

Thanks,

Robert N M Watson
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-discuss" in the body of the message



More information about the trustedbsd-discuss mailing list