utmpx (was: Re: 9-CURRENT: ports/net/kdenetwork3 does not compile)
Hello, I found another port lacking utmpx support: # cd /usr/ports/security/chkrootkit # make === chkrootkit-0.49 is marked as broken: fails to build with new utmpx. *** Error code 1 matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e g...@unixarea.de - w http://www.unixarea.de/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
KDE 3.5.10_6 compiled (was Re: 9-CURRENT: ports/net/kdenetwork3 does not compile)
Just for the records: After applying the patch for net/kdenetwork3 from Ed (thanks again for this), the port x11/kde3 (3.5.10_6) compiled fine on -CURRENT without further tweakings; and it comes up fine too :-) I've two smaller problems to investigate 1) I can't zapp the Xorg server with CTRL-ALT-BS (I've checked with xev(1) that the keys are working) 2) after KDE shutdown, the X server restarts again in background and I must kill the X proc manually... Any ideas about this? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e g...@unixarea.de - w http://www.unixarea.de/ ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: 9-CURRENT: ports/net/kdenetwork3 does not compile
On Mon, Nov 1, 2010 at 23:14, Matthias Apitz g...@unixarea.de wrote: Something wrong with 'struct utmp ubuf' in HEAD? It has been removed: http://lists.freebsd.org/pipermail/freebsd-current/2010-January/014893.html -- Rob Farmer ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: 9-CURRENT: ports/net/kdenetwork3 does not compile
On Tue, Nov 2, 2010 at 11:38, David DEMELIER demelier.da...@gmail.com wrote: A lot of ports will need some patches then, isn't it ? Most were taken care of back when it happened - many either included utmp.h and never used it or only used it trivially, so it was easy to fix (I submitted patches for some and I'm definitely not a great programmer). So the fact that it wasn't fixed either means nobody cares about that port (somewhat true here - most of the KDE people moved on to 4) or that the fix will be more involved (probably the case for this one). -- Rob Farmer ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: 9-CURRENT: ports/net/kdenetwork3 does not compile
2010/11/2 Rob Farmer rfar...@predatorlabs.net: On Mon, Nov 1, 2010 at 23:14, Matthias Apitz g...@unixarea.de wrote: Something wrong with 'struct utmp ubuf' in HEAD? It has been removed: http://lists.freebsd.org/pipermail/freebsd-current/2010-January/014893.html -- Rob Farmer ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org A lot of ports will need some patches then, isn't it ? -- Demelier David ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org
Re: 9-CURRENT: ports/net/kdenetwork3 does not compile
Hello all, Just to notify everyone what's going on; Matthias tested a patch for me, which should make it work on HEAD again. The attached patch should be applied to the sources conditionally (so only when running HEAD). I am in the process of getting it fixed in ports/upstreamed. Greetings, -- Ed Schouten e...@80386.nl WWW: http://80386.nl/ --- ktalkd/ktalkd/find_user.cpp +++ ktalkd/ktalkd/find_user.cpp @@ -339,34 +339,33 @@ #else /*not PROC_FIND_USER*/ +#include utmpx.h + int find_user(char *name, char *tty, char *disp) { -struct utmp ubuf; +struct utmpx *ubuf; int status; -FILE *fd; struct stat statb; -char ftty[20+UT_LINESIZE]; -char ttyFound[UT_LINESIZE] = ; -char dispFound[UT_HOSTSIZE+1] = ; - -if (!(fd = fopen(_PATH_UTMP, r))) { -fprintf(stderr, talkd: can't read %s.\n, _PATH_UTMP); -return (FAILED); -} +char ftty[20 + sizeof ubuf-ut_line]; +char ttyFound[sizeof ubuf-ut_line] = ; +char dispFound[sizeof ubuf-ut_line + 1] = ; + +setutxent(); #define SCMPN(a, b)strncmp(a, b, sizeof (a)) status = NOT_HERE; (void) strcpy(ftty, _PATH_DEV); -while (fread((char *) ubuf, sizeof ubuf, 1, fd) == 1) { -if (!SCMPN(ubuf.ut_name, name)) { +while ((ubuf = getutxent())) { +if ((ubuf-ut_type == USER_PROCESS) +(!SCMPN(ubuf-ut_user, name))) { if (*tty == '\0') { /* no particular tty was requested */ -(void) strcpy(ftty+5, ubuf.ut_line); +(void) strcpy(ftty+5, ubuf-ut_line); if (stat(ftty,statb) == 0) { if (!(statb.st_mode 020)) /* ?character device? */ continue; -(void) strcpy(ttyFound, ubuf.ut_line); +(void) strcpy(ttyFound, ubuf-ut_line); #ifdef USE_UT_HOST -(void) strcpy(dispFound, ubuf.ut_host); +(void) strcpy(dispFound, ubuf-ut_host); strcat(dispFound, ); #endif status = SUCCESS; @@ -384,13 +383,13 @@ } } } - else if (!strcmp(ubuf.ut_line, tty)) { + else if (!strcmp(ubuf-ut_line, tty)) { status = SUCCESS; break; } } } -fclose(fd); +endutxent(); if (status == SUCCESS) { (void) strcpy(tty, ttyFound); (void) strcpy(disp, dispFound); pgpHdoKZt6XfX.pgp Description: PGP signature