MNT_NOEXEC on root filesystem with diskless PXE boot?
From: Tom Alsberg (alsbergt_at_zoopee.org)
Date: 03/31/05
- Previous message: Kamal R. Prasad: "Re: So, who makes this one run FreeBSD? ;-)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 31 Mar 2005 13:16:25 +0200 To: FreeBSD Hackers List <freebsd-hackers@freebsd.org>
Perhaps this should go to -STABLE, I just couldn't be sure.
We are trying out FreeBSD 5.4-PRERELEASE on diskless clients. I
noticed one problem, being that when setting the LD_LIBRARY_PATH
(or for that matter, LD_PRELOAD, and LD_LIBMAP_DISABLE) environment
variables, nothing will run, as /libexec/ld-elf.so.1 complains:
Cannot execute objects on /
According to the sources, this was added in 5.4, and will happen
if / is mounted noexec.
In this case, / is mounted by the BTX PXE loader over NFS (from a
FreeBSD 5.3 server, right now). "mount" does not show the noexec
flag. However, with the attached little C program I verified that
statfs really returns this flag (0x00000006).
Now, I see that on FreeBSD 5.3 diskless clients this flag is also
returned on / - just it happened that nobody looked at it until
the change in rtld.c of FreeBSD 5.4:
if (fs.f_flags & MNT_NOEXEC) {
_rtld_error("Cannot execute objects on %s\n", fs.f_mntonname);
close(fd);
return NULL;
}
I didn't yet understand (didn't check much) - why does statfs report
the MNT_NOEXEC flag on the / filesystem (and only the / filesystem,
when it's mounted from NFS by the bootloader - not any other
NFS filesystems)? BTW, this happens also with NetApp as the NFS
server - just to rule out any possibility of relation here.
Ideas appreciated,
-- Tom
-- Tom Alsberg - certified insane, complete illiterate. Homepage: http://www.cs.huji.ac.il/~alsbergt/ * An idea is not responsible for the people who believe in it.
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
- text/plain attachment: fstatfs.c
- Previous message: Kamal R. Prasad: "Re: So, who makes this one run FreeBSD? ;-)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|