> Date: Mon, 13 Jan 2014 21:33:21 -0300 > From: Fernando de Oliveira <[email protected]> > To: BLFS Development List <[email protected]> > Subject: Re: [blfs-dev] : Add package: lsof_4.87 > . . > > In a terminal where I first used when it was installed at /usr/sbin/, > when tried using again, after installing now in /usr/bin, it complained > that there was no /usr/sbin/lsof/, weird. >
Might that be due to shell hashing & remembering paths for previously-given commands (cf e.g. bash's 'set +h'). Anyway, there seems to be very heavy weather being made of lsof. Really, the build shown at: ftp://ftp.slackware.com/pub/slackware/slackware64-14.1/source/ap/lsof/lsof.SlackBuild is the way to go; with perhaps adding in some blfs-specific library cmdline-flag stuff (re libtirpc &c?) at one of the stages per Bruce/Fernando post early in thread. Note in particular - & as noted early in thread: ---- * the 'echo n | ...' part: that adjusts 'machine.h' appropriately. (Don't let the nomenclature in the adjusted part of 'machine.h', frighten the horses: it just means that you're letting the OS handle accesses/security, rather than lsof try to do (parts of) it.) * the "# No, NOT suid." part. ---- That, as said, lets the OS handle permissions, accesses, &c: root can do all the usual root things; and non-root can do, and is restricted to, the usual range of non-root things. Period. You don't need to do anything else, e.g. to 'head off' non-root users from '/run', or bother about perfectly-normal 'permission denied' output, or stash lsof away into an 'sbin' dir rather than a 'bin' dir ('security through obscurity'?), &usw: the OS permissions &c system is handling/addressing all that kind of stuff, in the usual way. As for install-location: fwiw, am agnostic here on the matter of /bin -vs- /usr/bin; tho', also fwiw, have never 'needed' to use lsof when it wasn't avail (e.g. in single-user mode or otherwise without /usr ). As noted, though: put it in /bin or /usr/bin : don't try to 'hide' away in /sbin or /usr/sbin - not least as it's a perfectly reasonable command for non-root users to use without having to go find it in and sbin dir. Finally, yes the documentation perhaps can seem a bit vague/crufty/inconsistent/&c in parts; but the source is pretty simple and clear - it's not a complex piece of software. And especially if something says, "install me with extra privileges (e.g set*id)": default position should be 'no', unless strong, known, understood, considered reason to the contrary. rgds, akh -- -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
