[patch] konsole sessions not recorded in utmp

Andriy Gapon avg at icyb.net.ua
Mon Nov 20 03:26:22 PST 2006


I noticed that konsole sessions are not reflected in utmp and that was a
minor annoyance to me because in my opinion all terminal sessions should
be recorded in utmp for a variety of reasons.
I looked through various searches and archives, but couldn't find
anything useful enough (I even found suggestions that konsole should not
make utmp records by design).

Anyway, I looked into the code and as a result I have the attached
half-baked patch. The patch fixes support for using libutempter
(sysutils/libutempter). It seems that the current code depended on some
older incarnation of utempter utility. I think that this is a better
method than making konsole suid (in this case login(3) method, which is
also included in kpty, would work).

I think that this patch should also be sent to main KDE developers for
inclusion, if they haven't yet migrated from older utempter to newer
libutempter.

The patch is half-baked for the following reasons:

1. I am not sure how portable is usage of slaveFd in
utempter_add_record. Using masterFd does not definitely work on FreeBSD
6.1, but I am not sure about other version and other OS that have
libutempter, like Linux :-) And I am also slightly confused which is
which and which should go to utmp.

2. if this patch is accepted then Makefile of x11/kdelibs3 should be
modified to have sysutils/libutempter as a library dependency (maybe
optional/auto-detected)

Should I also create a PR ?

-- 
Andriy Gapon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-kpty.patch
Type: text/x-patch
Size: 2052 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20061120/9d82087c/patch-kpty.bin


More information about the freebsd-ports mailing list