Reply
Thread Tools Search this Thread
Posts: 21 | Thanked: 12 times | Joined on Jun 2010 @ Sweden
#371
Originally Posted by reinob View Post
4) export PAGER=less

You can put that in /etc/profile (or put a script on /etc/profile.d, etc.)
Otherwise man will use more. Basically man does:

zcat page.gz | gtbl | nroff -Tlatin1 -mandoc 2>&1 | $PAGER

where PAGER is "more" if undefined. However busybox's "more" behaves weird (or perhaps it's libvte's fault, I use the one from CSSU). less works much better, and is more comfortable to use.
Yep, or if you would like to disable wordwrap: export MANPAGER='less -S'

For me the page width is too wide (by approx. 5 characters) for the current font size, and have to disable wordwrap to not get just a couple of characters on a single line. Optimally man should format the pages according to terminal width, but haven't mananged to do this for this version of man. I've looked into this a bit and I assume you could "fix" it if you could get man to read a custom config file. For the regular man (for instance the one in Easy Debian), you can pass along a config file using "man -C <config file>" or put a config file "man.conf" in the default location /etc/.

Does anyone know if BusyBox Power's (limited) version of man attempts to read from a config file by default since you can't specify it?
 

The Following 2 Users Say Thank You to sowwhatyoureap For This Useful Post:
Posts: 248 | Thanked: 910 times | Joined on May 2010 @ The Netherlands
#372
Originally Posted by reinob View Post
Perhaps the best would be to keep busybox as-is but, to avoid any confusion, without including *any* applets which require being setuid. Then the user will be free to install su and/or ping.

For ping we already have a package (ping and iputils-ping, I think) -- I just installed "ping" which installs /usr/bin/ping. Busybox's /bin/ping still there. Just need to chmod +s and it works fine).

For su we are missing a package (or I can't find it). Since most people probably don't need su (I don't *need* it, I just *want* it I guess you don't have to include it in busybox-power. But it would be nice if you could compile and package it and put it in extras-devel (otherwise I'll add it to my to-do list so that when I retire in about 30 years I will do it myself .

Let me know what you think. And thanks a lot for your support!
I prefer to package up su separately as well; will look into that next week. I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.
The proper solution would be to make the new su package divert /bin/su.

I'm surprised su hasn't been packaged up before though, I hope I won't be in for some unpleasant surprise.

Originally Posted by sowwhatyoureap View Post
Does anyone know if BusyBox Power's (limited) version of man attempts to read from a config file by default since you can't specify it?
Yes, BusyBox' man checks for /etc/man.config, /etc/man.conf, and /etc/man_db.conf.
 

The Following 3 Users Say Thank You to iDont For This Useful Post:
Posts: 1,263 | Thanked: 2,050 times | Joined on Feb 2011 @ Germany
#373
Originally Posted by iDont View Post
I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.
Just for reference (not necessarily on-topic..) here's a list with all the setuid binaries (at least on *my* N900). Obviously, none is linked to busybox.

/bin
devlocktool (package: libdevlock-bin)

/sbin
(nothing)

/usr/sbin
(nothing)

/usr/bin
gpg (package: gnupg)
ssh-agent (setgid, package: openssh-client)
chfn (package: passwd)
chsh (package: passwd)
eapd (package: osso-wlan-security)
ping (package: ping)
sudo (package: sudo)
rclockd (package: clockd)
mission-control (package: osso-mission-control)
passwd (package: passwd)
gpasswd (package: passwd)
chage (setgid, package: passwd)
sudoedit (package: sudo)
hildon-sv-notification-daemon (package: hildon-home)
fusermount (package: fuse-utils)
expiry (setgid, package: passwd)

used:
Code:
find /usr/bin -perm +6000 -type f -exec dpkg -S {} \;
Add.: not in PATH, but also setuid/setgid:

/usr/lib/dbus-1.0/dbus-daemon-launch-helper (pkg: dbus)
/usr/lib/maemo-launcher/defender (pkg: maemo-launcher)
/usr/lib/pt_chown (pkg: libc6)
/usr/lib/telepathy/telepathy-stream-engine (pkg: telepathy-stream-engine)
/usr/lib/telepathy/telepathy-ring (pkg: telepathy-ring)
/usr/libexec/gnome-pty-helper (pkg: libvte4)

Last edited by reinob; 03-25-2013 at 04:35 AM. Reason: added setuid/setgid binaries not in PATH
 

The Following 3 Users Say Thank You to reinob For This Useful Post:
Posts: 248 | Thanked: 910 times | Joined on May 2010 @ The Netherlands
#374
Originally Posted by iDont View Post
I prefer to package up su separately as well; will look into that next week. I don't think it's wise though to leave out the setuid applets from busybox, as leaving out applets vs. Maemo's stock busybox (such as su) might break some (3rd party) applications.
The proper solution would be to make the new su package divert /bin/su.

I'm surprised su hasn't been packaged up before though, I hope I won't be in for some unpleasant surprise.
I've ported Debian's login package to Maemo (which includes su), but even though the resulting binary works and it's arguments match those of BusyBox', Maemo will get stuck at the four dots during boot with this su installed. If anyone wants to pick up work on this package, let me know and I'll send over the sources.
It is possible to install this su binary as e.g. /bin/su.real and alias it to su for interactive logins.

However, I took a different approach: compile just the su applet from upstream BusyBox' source and package it up as "busybox-su". This su binary can be installed setuid as /bin/su without breaking Maemo. At least I haven't noticed any breakage yet; running it since April 10th.
Busybox-su diverts /bin/su during installation, so the same warning applies as with busybox-power ("it touches an essential system binary...").

The accompanying source for busybox-su is also attached. Note that this tarball only includes the Debian packaging. It is to be used with upstream's BusyBox sources.

Feedback welcome . I'll let the package stage here for a day or two before I push it to Maemo's extras-devel repository.

--
And regarding busybox-power & proper man setup: this is still on my TODO list, but I haven't gotten around to it yet.
Attached Files
File Type: deb busybox-su_1.21.0su1_armel.deb (11.7 KB, 7 views)
File Type: gz packaging_source.tar.gz (20.0 KB, 4 views)

Last edited by iDont; 04-15-2013 at 04:01 PM.
 

The Following 2 Users Say Thank You to iDont For This Useful Post:
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

 
Forum Jump


All times are GMT -4. The time now is 03:43 PM.