Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67887 - x11-terms/mrxvt-0.3.5 utemp-lib support request
Summary: x11-terms/mrxvt-0.3.5 utemp-lib support request
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-17 08:41 UTC by Daniel Webert
Modified: 2006-11-02 10:50 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
mrxvt-utmp_write.patch (mrxvt-utmp_write.patch,537 bytes, patch)
2005-04-15 21:23 UTC, James Rowe
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Webert 2004-10-17 08:41:40 UTC
x11-terms/mrxvt-0.3.5 utemp-lib support request

maybe w/ a flag

<snip>
From 0.3.5, mrxvt supports utempter library, which means if you have installed the utempter library, you can remove the setuid root permission from mrxvt binary without losing the logging feature. But doing so may cause trouble to chown the tty on some systems.
</snip>
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-10-17 09:43:25 UTC
Yes, I was about to add utempter USE flag (If you open
mrxvt-0.3.5.ebuild you will see what I was doing),
but mrxvt doesn't seem to link utempter. Also,
ppc-macos doesn't support utempter (it's dependencies
need to be marked at least ~ppc-macos, but several
deps are broken at the moment), so I left it so.

If you are interested in testing, try 
EXTRA_ECONF="--enable-utempter" emerge mrxvt
and see what `ldd /usr/bin/mrxvt` says. We need to
turn off --disable-utmp and --disable-wtmp?
(haven't tried yet)

If you succeed to enable utempter on x86,
i'm pleased to add utempter support for mrxvt.
(i'll mask utempter for ppc-macos then)
Comment 2 Jimmy Zhou 2004-11-09 20:02:27 UTC
mrxvt configure script will try to link utempter library if --enable-everything or --enable-utempter is specified. but if it fails to link utempter library, it will fall back to its own utmp/wtmp implementations. I do not know why mrxvt cannot link utempter on gentoo. maybe someone can check the config.log, see what's the error message?
Comment 3 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-11-09 20:29:23 UTC
configure:5839: checking for utempter_add_record in -lutempter
configure:5869: gcc -o conftest  -O2 -Wall -fPIC  -I/usr/X11R6/include     -lSM 
-lICE conftest.c -lutempter  -lX11   -L/usr/X11R6/lib >&5
/tmp/ccYrdpPc.o(.text+0x18): In function `main':
: undefined reference to `utempter_add_record'
collect2: ld returned 1 exit status

utempter version is 0.5.5.5.
Comment 4 Jimmy Zhou 2004-11-10 16:57:36 UTC
I see. I use utempter 1.1.1 on my slackware -current. The utempter API has been changed from 0.5.x to 1.x. Mrxvt chooses to use the new API. Probably it is time to upgrade utempter library? ;-)
Comment 5 Daniel Webert 2004-12-12 13:04:45 UTC
From 0.3.10, mrxvt binary will be installed without setuid root due to security concerns. Thus, if mrxvt is not compiled with utempter library support, you will lose the logging features.
Comment 6 James Rowe 2005-04-15 21:21:04 UTC
  Grr, utempter...

  Still it is nice to have utmp writing, and the ebuild is enabling support for
it already.  Personally I'm willing to take the setgid risk, and it appears
at least x11-terms/aterm is willing too.  The attached patch changes the 
behaviour to match x11-terms/aterm, so logging works.

  Notice setgid utmp, not setuid root.
Comment 7 James Rowe 2005-04-15 21:23:41 UTC
Created attachment 56408 [details, diff]
mrxvt-utmp_write.patch

 Obviously this is against 0.4.0, but the same applies to the older versions.
Comment 8 Mamoru KOMACHI (RETIRED) gentoo-dev 2006-11-02 10:50:10 UTC
Sorry for the delay. We finally got libutempter in Portage tree,
so I added utempter local USE flag to enable/disable utempter.
Thanks for the patch and comments.