Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Aug 2002 02:15:53 -0400
From:      Phil C <flah@hell.com>
To:        freebsd-ports@freebsd.org
Subject:   Screen-3.9.11 patch (:password)
Message-ID:  <20020802061552.GC43045@adsl195.cofs.net>

next in thread | raw e-mail | index | archive | help

--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

(i received a vacation message from Cy which stated I should post here)

Hello,

I recently upgraded my system from FreeBSD-4.2->4.6.1 and also installed
screen-3.9.11. I found that with this new version of screen, using the
command mode to set my password (^a:, password) would return a hashed password
with a garbled salt. In digging around I found that the salt string in
process.c was not null terminated. This problem made it impossible for me
to use screen to generate a permanent password for my screenrc... anyway,
I did what I thought was sensible, since I am new to C, and attached is my
simple patch.

-- 
'.QBkU.V3jOk''''''''''wv5b9iRxcVq.Plr.dJ yLMKtStIn'D2ygl,''''''''
''e..4dTRe4c.''''''''cP6M3nu,''NSrP57.fw 2.yF9O7F".gD0DeQ.4`'''''
'''''''."W.`WI ,.'Jz4QS3Y7,'''' 'fbPg83R LS.Z4JV,      7SWS9Tz'''
'''''''''L.z GrTn....wQu.'''''' KY1"Jcp. BXDlu.cqjX13Y4kThm.0''''
''''''''''bZw.bu5h7'VYjl''''''' PSuYqqh. y0Ec2DWfcW..RD'Chbk,''''
''''''''''pfvvnDhpTxG1kR''''''' cxLI.TS8 91zf.V"H0p.1Ph..B'''''''
'''''''''NYhsdkGw''.h 5,m'''''' EC.,SO4y DWj.3.. ..a4e.e'''''''''
''''''1x5C.Nfkmu''''NeydM0O'''' c5rc4uRR Y1nzNQO ''''''''''''''''
''''' INx...LfE''''''LqHpx3Gn'' 0ox.L8v2 WaOODeo`'''''''''''''xip
'''o0mo"TMRek7''''''''i5FExlpCo 0fJ9Uu5k QJ5y.QO0o'''''''''''''''


--Dxnq1zWXvFF0Q93v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="process-salt.patch"

--- process.c~	Mon Feb 11 07:30:08 2002
+++ process.c	Fri Aug  2 01:23:41 2002
@@ -5092,7 +5092,7 @@
 char *data;
 {
   int st;
-  char salt[2];
+  char salt[3];
   struct acluser *u = (struct acluser *)data;
 
   ASSERT(u);
@@ -5117,6 +5117,7 @@
     {
       for (st = 0; st < 2; st++)
 	salt[st] = 'A' + (int)((time(0) >> 6 * st) % 26);
+      salt[2] = '\0';
       buf = crypt(u->u_password, salt);
       bzero(u->u_password, strlen(u->u_password));
       free((char *)u->u_password);

--Dxnq1zWXvFF0Q93v--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020802061552.GC43045>