On Monday 19 May 2008, Szabolcs Szakacsits wrote:
> Hi Alon,
>
> I really would like to but /sbin is also hard coded (security reason) in
> the mount utlities to make mounts work.
>
> This is from mount.c (util-linux, util-linux-ng, etc):
>
> sprintf(mountprog, "/sbin/mount.%s", type);
> if (stat(mountprog, &statbuf) == 0) {
> ...
> execv(mountprog, mountargs);
>
I am aware of this.
But it is the packager job to place files in the correct distribution location.
Placing ntfs-3g at root is not always required, as many users don't actually
boot
from this filesystem.
Also distributions may patch the mount program to look in both root and usr.
> ntfs-3g is just like smbfs, ncpfs, cifs, etc. If /sbin/mount.ntfs-3g
> doesn't exist then 'mount -t ntfs-3g ...' and mount via /etc/fstab is
> guaranteed to fail on Linux. Mount(8) doesn't use the PATH variable
> (security reason), it only looks for the mount helpers in /sbin,
> nowhere else.
The default of cifs in my Gentoo machine is:
/sbin
/sbin/mount.cifs -> /usr/bin/mount.cifs
/usr
/usr/bin
/usr/bin/mount.cifs
/usr/bin/umount.cifs
Notice that the binaries are located in /usr...
And the distribution is taking care of the /sbin link.
> > It also makes "make distcheck" not work.
>
> That would be nice to fix. And as I see you almost did it :)
The convention is to place all files under $prefix and if user want
to override it can do this using --with-something.
Just like --sysconfdir which defaults to /usr/local/etc which mean nothing on
most systems.
>
> > The user should specify the location.
>
> We could have an option to disable the creation of /sbin/mount.ntfs-3g.
> Creating it anywhere else is no use for anything and always makes mount(8)
> to fail. If user disables it then he acknowledges that mount(8) and
> /etc/fstab will not work with ntfs-3g.
There is a minor issue of chroot installation, and cross compile...
> > Anyway, please review attached misc fixups to build.
>
> Happily :-)
>
> I've noticed only a typo: $(hedaers) => $(headers), otherwise they look
> good.
Thanks!
> Would you please explain the problems a bit in more detail, and which
> chunk solves which one? It would be nice to commit them separately.
Sent.
Regards,
Alon.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel