Date: Sun, 02 Jan 2011 21:49:01 -0800 From: Cy Schubert <Cy.Schubert@komquats.com> To: Oliver Pinter <oliver.pntr@gmail.com> Cc: freebsd-ports-bugs@FreeBSD.org, cy@FreeBSD.org Subject: Re: ports/153548: sysutils/screen locking [with patch] Message-ID: <201101030549.p035n1lm006894@cwsys.cwsent.com>
next in thread | raw e-mail | index | archive | help
Try this patch. Index: Makefile =================================================================== RCS file: /home/pcvs/ports/sysutils/screen/Makefile,v retrieving revision 1.81 diff -u -r1.81 Makefile --- Makefile 18 Nov 2010 20:44:32 -0000 1.81 +++ Makefile 3 Jan 2011 05:48:17 -0000 @@ -7,7 +7,7 @@ PORTNAME= screen PORTVERSION= 4.0.3 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= sysutils MASTER_SITES= ftp://ftp.uni-erlangen.de/pub/utilities/screen/ \ http://komquats.com/distfiles/ \ Index: files/patch-attacher.c =================================================================== RCS file: files/patch-attacher.c diff -N files/patch-attacher.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/patch-attacher.c 3 Jan 2011 05:48:17 -0000 @@ -0,0 +1,24 @@ +--- attacher.c.orig 2003-09-08 07:24:48.000000000 -0700 ++++ attacher.c 2011-01-02 21:42:39.547897531 -0800 +@@ -662,7 +662,7 @@ + printf("\n"); + + prg = getenv("LOCKPRG"); +- if (prg && strcmp(prg, "builtin") && !access(prg, X_OK)) ++ if (prg && (strcmp(prg, "builtin") || strcmp(prg,"builtin-passwd")) && !access(prg, X_OK)) + { + signal(SIGCHLD, SIG_DFL); + debug1("lockterminal: '%s' seems executable, execl it!\n", prg); +@@ -676,7 +676,11 @@ + setuid(real_uid); /* this should be done already */ + #endif + closeallfiles(0); /* important: /etc/shadow may be open */ +- execl(prg, "SCREEN-LOCK", NULL); ++ if (strcmp(prg,"builtin-passwd")) ++ /* use system passsword for lock */ ++ execl(prg, "SCREEN-LOCK", "-p", "-n", NULL); ++ else ++ execl(prg, "SCREEN-LOCK", NULL); + exit(errno); + } + if (pid == -1) -- Cheers, Cy Schubert <Cy.Schubert@komquats.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org e**(i*pi)+1=0
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101030549.p035n1lm006894>