Re: moving /bin/ip to /sbin/ip?

2007-09-15 Thread Mike Frysinger
On Saturday 15 September 2007, Cristian Ionescu-Idbohrn wrote:
 On Fri, 14 Sep 2007, Mike Frysinger wrote:
  generally yes ... however, i dont know of any distro who puts `ip` in
  /bin and considering its purpose in life (configuring the interfaces),
  putting it in /sbin makes sense to me

 Debian sid (unstable):

 # which ip
 /bin/ip
 # ls -l /bin/ip
 -rwxr-xr-x 1 root root 164568 Jun 10 21:39 /bin/ip*
 # ip -V
 ip utility, iproute2-ss070313

blah, they changed the defaults ... iproute2 upstream defaults to /sbin for ip

considering ip/ifconfig do the same thing, i think they should be in the same 
dir in busybox

or we can just drop the whole path charade from busybox completely ... then 
there isnt a problem of /bin vs /sbin vs /usr/bin vs /usr/sbin ...
-mike


signature.asc
Description: This is a digitally signed message part.
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Re: moving /bin/ip to /sbin/ip?

2007-09-14 Thread Mike Frysinger
On Tuesday 11 September 2007, Denys Vlasenko wrote:
 On Tuesday 11 September 2007 05:01, Paul Fox wrote:
On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
 It would be a lot easier for me to have the ip application in the
 same place as the original iproute2. In fact it makes things alot
 more easy to have the busybox applications in the same place as the
 original apps. (not first time i meet this kind of problems)
   
$PATH?
 
  no, his problem is that other apps refer to ip via its full path.
  $PATH isn't always the answer.

 Which is kind of negates the reason why we have PATH in the first place.

 Other apps should be fixed to not use full paths.

generally yes ... however, i dont know of any distro who puts `ip` in /bin and 
considering its purpose in life (configuring the interfaces), putting it 
in /sbin makes sense to me
-mike


signature.asc
Description: This is a digitally signed message part.
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Re: moving /bin/ip to /sbin/ip?

2007-09-11 Thread Denys Vlasenko
On Monday 10 September 2007 21:40, Natanael Copa wrote:
 Hi,
 
 Is it big deal to move /bin/ip to /sbin/ip?
 
 My problem is this:
 I use busybox for my distro with vserver support. The vserver package is
 built on a standard gentoo uclibc. I suspect the util-vserver build
 scripts check what is the location for various programs, inclusive
 iproute2. The location is stored in
 a /usr/lib/util-vserver/util-vserver-vars file.
 
 So why do I just not change this file in my util-vserver package? Well,
 in some installations the busybox ip will be enough, in others the user
 will install the original iproute2. Here comes the problems, specially
 since everything is unapcked from a package to a tmpfs during boot. The
 tools only make sure /etc survive reboots. the rest is extracted from
 cdrom.
 
 It would be a lot easier for me to have the ip application in the same
 place as the original iproute2. In fact it makes things alot more easy
 to have the busybox applications in the same place as the original apps.
 (not first time i meet this kind of problems)

Sure, feel free to submit a patch.
But note the following:

It makes things even more easy when you do

mv /sbin/* /bin
rm -fr /sbin
ln -s /bin /sbin

I did exactly that (and similarly symlinked /usr/sbin to /usr/bin)
and am happy ever since.

Ask yourself: what is so secret in /sbin that we don't allow users
to even see? Lemme see... for example, sfdisk is there.

Does anybody seriously think that unprivileged user cannot build
his own sfdisk binary from publicly accessible source? and then run it?
And then happily receive EPERM when it tries to read raw /dev/hda?

Making users see these secret binaries is not dangerous,
allowing users to read them isn't dangerous either.

*Only* running them under root is dangerous, and your users
cannot do that. Unless you have stray suid bit on one
of those apps, that is. Tht is easy to fix.

IOW: having separate, hidden from users /sbin is an excellent
Unix way of feeling additional PITA for no apparent gain.
--
vda
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-11 Thread Denys Vlasenko
On Tuesday 11 September 2007 05:01, Paul Fox wrote:
   On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
It would be a lot easier for me to have the ip application in the same
place as the original iproute2. In fact it makes things alot more easy
to have the busybox applications in the same place as the original apps.
(not first time i meet this kind of problems)
   
   $PATH?
 
 no, his problem is that other apps refer to ip via its full path.
 $PATH isn't always the answer.

Which is kind of negates the reason why we have PATH in the first place.

Other apps should be fixed to not use full paths.
--
vda
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-11 Thread Paul Fox
  On Tuesday 11 September 2007 05:01, Paul Fox wrote:
 On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
  It would be a lot easier for me to have the ip application in the same
  place as the original iproute2. In fact it makes things alot more easy
  to have the busybox applications in the same place as the original 
   apps.
  (not first time i meet this kind of problems)
 
 $PATH?
   
   no, his problem is that other apps refer to ip via its full path.
   $PATH isn't always the answer.
  
  Which is kind of negates the reason why we have PATH in the first place.
  
  Other apps should be fixed to not use full paths.

sorry.  when i said $PATH isn't always the answer, i meant,
sometimes just using $PATH won't solve your problem.  if you
don't control the app, and it contains a hard-coded path, then
$PATH won't help.

paul
=-
 paul fox, [EMAIL PROTECTED]
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-11 Thread Bernd Petrovitsch
On Tue, 2007-09-11 at 00:01 -0400, Paul Fox wrote:
   On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
It would be a lot easier for me to have the ip application in the same
place as the original iproute2. In fact it makes things alot more easy
to have the busybox applications in the same place as the original apps.
(not first time i meet this kind of problems)
   
   $PATH?
 
 no, his problem is that other apps refer to ip via its full path.
 $PATH isn't always the answer.

The source of the problem is IMHO that the original application is
next to
everywhere somewhere else so having ip in /bin might be considered
bug.

Bernd
-- 
Firmix Software GmbH   http://www.firmix.at/
mobil: +43 664 4416156 fax: +43 1 7890849-55
  Embedded Linux Development and Services


___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-11 Thread Natanael Copa
On Tue, 2007-09-11 at 15:51 +0200, Bernd Petrovitsch wrote:
 On Tue, 2007-09-11 at 09:11 -0400, Paul Fox wrote:
 [...]
  sorry.  when i said $PATH isn't always the answer, i meant,
  sometimes just using $PATH won't solve your problem.  if you
  don't control the app, and it contains a hard-coded path, then
  $PATH won't help.
 
 No, then you put a (so-called compatibility) sym-link in place (and
 not move a binary just because of one broken app which hardcodes paths
 and doesn't make it configurable).

Thats how i solved it in this specific case.

Thanks for all comments.

-nc

 
   Bernd

___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


moving /bin/ip to /sbin/ip?

2007-09-10 Thread Natanael Copa
Hi,

Is it big deal to move /bin/ip to /sbin/ip?

My problem is this:
I use busybox for my distro with vserver support. The vserver package is
built on a standard gentoo uclibc. I suspect the util-vserver build
scripts check what is the location for various programs, inclusive
iproute2. The location is stored in
a /usr/lib/util-vserver/util-vserver-vars file.

So why do I just not change this file in my util-vserver package? Well,
in some installations the busybox ip will be enough, in others the user
will install the original iproute2. Here comes the problems, specially
since everything is unapcked from a package to a tmpfs during boot. The
tools only make sure /etc survive reboots. the rest is extracted from
cdrom.

It would be a lot easier for me to have the ip application in the same
place as the original iproute2. In fact it makes things alot more easy
to have the busybox applications in the same place as the original apps.
(not first time i meet this kind of problems)

-nc

___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-10 Thread Hamish Moffatt
On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
 It would be a lot easier for me to have the ip application in the same
 place as the original iproute2. In fact it makes things alot more easy
 to have the busybox applications in the same place as the original apps.
 (not first time i meet this kind of problems)

$PATH?

-- 
Hamish Moffatt VK3SB [EMAIL PROTECTED] [EMAIL PROTECTED]
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox


Re: moving /bin/ip to /sbin/ip?

2007-09-10 Thread Paul Fox
  On Mon, Sep 10, 2007 at 10:40:11PM +0200, Natanael Copa wrote:
   It would be a lot easier for me to have the ip application in the same
   place as the original iproute2. In fact it makes things alot more easy
   to have the busybox applications in the same place as the original apps.
   (not first time i meet this kind of problems)
  
  $PATH?

no, his problem is that other apps refer to ip via its full path.
$PATH isn't always the answer.

while i have no objection to having busybox put things in their
standard places, i'd also point out that it's easy to fix this
problem, via an early init.d script -- just move the ip app,
or create a new link to it.

paul
=-
 paul fox, [EMAIL PROTECTED]
___
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox