Received: from saint-elmos-fire.mit.edu (tlyu@SAINT-ELMOS-FIRE.MIT.EDU [18.18.0.248]) by krbdev.mit.edu (8.9.3) with ESMTP id PAA06358; Fri, 13 Sep 2002 15:58:00 -0400 (EDT) Received: (from tlyu@localhost) by saint-elmos-fire.mit.edu (8.9.3) id PAA00596; Fri, 13 Sep 2002 15:57:58 -0400 (EDT) Resent-Message-Id: <200209131957.PAA00596@saint-elmos-fire.mit.edu> Resent-To: rt-comment@krbdev.mit.edu Resent-From: Tom Yu Resent-Date: Fri, 13 Sep 2002 15:57:58 -0400 Received: from fort-point-station.mit.edu by po9.mit.edu (8.9.2/4.7) id FAA22518; Fri, 13 Sep 2002 05:20:36 -0400 (EDT) Received: from smtp3.cern.ch (smtp3.cern.ch [137.138.131.164]) by fort-point-station.mit.edu (8.9.2/8.9.2) with ESMTP id FAA23142 for ; Fri, 13 Sep 2002 05:19:48 -0400 (EDT) Received: from pcitdis18.cern.ch (pcitdis18.cern.ch [137.138.29.212]) by smtp3.cern.ch (8.12.1/8.12.1) with ESMTP id g8D9JmxV007824 for ; Fri, 13 Sep 2002 11:19:48 +0200 (MET DST) Received: by pcitdis18.cern.ch (Postfix, from userid 325) id D58CD1817; Fri, 13 Sep 2002 11:19:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by pcitdis18.cern.ch (Postfix) with ESMTP id 92D533818 for ; Fri, 13 Sep 2002 11:19:46 +0200 (CEST) Date: Fri, 13 Sep 2002 11:19:46 +0200 (CEST) From: Wolfgang FRIEBEL X-X-Sender: friebel@pcitdis18.cern.ch Reply-To: Wolfgang.Friebel@cern.ch To: Tom Yu Subject: Re: [krbdev.mit.edu #1146] string2key gets wrong salt with Heimdal KDC and converted AFS accounts In-Reply-To: Message-Id: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Lines: 34 RT-Send-Cc: X-RT-Original-Encoding: us-ascii Content-Length: 1119 On Tue, 10 Sep 2002, Tom Yu wrote: > >>>>> "WF" == Wolfgang Friebel writes: > > >> Number: 1146 > >> Category: krb5-clients > >> Synopsis: string2key gets wrong salt with Heimdal KDC and converted AFS accounts > >> Description: > > Thanks for the report and the patch; it will appear in an upcoming > release. Tom, there was a typo in the 3 lines to be included. The test on c must of course not be >= 0 but > 0 only. It would even be better to get the salt correct in the first place, i.e. at the place where salt->data is set. Below is the corrected patch: *** krb5-1.2.5/src/lib/crypto/des/string2key.c Fri Sep 24 23:17:09 1999 --- krb5-1.2.5/src/lib/crypto/des/string2key.c.new Fri Aug 9 16:48:39 2002 *************** *** 99,104 **** --- 99,107 ---- if (salt) { if (salt->length == -1) { /* cheat and do AFS string2key instead */ + char *c; + c=strchr(salt->data, '@'); + if ( c > 0 ) *c = '\0'; return mit_afs_string_to_key (keyblock, data, salt); } else length = data->length + salt->length;