From deuva at rapid.ocn.ne.jp Mon Jun 9 10:12:02 2003 From: deuva at rapid.ocn.ne.jp (Hiroshi Hayakawa) Date: 09 Jun 2003 17:12:02 +0900 Subject: [Help-gnutls] gnutls-srpcrypt creates an empty tpasswd. Message-ID: <1055146320.3090.11.camel@localhost.localdomain> Hi all, I just tried using gnutls-0.8.7 on RedHat 9.0. That has been compiled successfully with libtasn1-0.1.2, libgcrypt-1.1.12 and opencdk-0.4.5. After installing all stuffs under /usr/local as the default, I used gnutls-srpcrypt to generate tpasswd.conf and tpasswd. Here below are what I did: >gnutls-srpcrypt --create-conf ./tpasswd.conf >gnutls-srpcrypt --passwd ./tpasswd --passwd-conf ./tpasswd.conf -u test Enter passwd: (I entered a string here.) Segmentation fault This created an empty ./tpasswd and ./tpasswd.tmp. Then I tried it again. >gnutls-srpcrypt --passwd ./tpasswd --passwd-conf ./tpasswd.conf -u test Enter passwd: (I entered a string here.) file './tpasswd' is locked This time, I did not get "Segmentation fault". But ./tpasswd was same, empty. (No change on the timestamp) Does anybody have this kind of problems before? Any information and suggestion on this problem will be appreciated. Thanks, Hiro From nmav at gnutls.org Mon Jun 9 11:07:37 2003 From: nmav at gnutls.org (Nikos Mavroyanopoulos) Date: Mon, 9 Jun 2003 12:07:37 +0300 Subject: [Help-gnutls] gnutls-srpcrypt creates an empty tpasswd. In-Reply-To: <1055146320.3090.11.camel@localhost.localdomain> References: <1055146320.3090.11.camel@localhost.localdomain> Message-ID: <20030609090737.GA923@gnutls.org> On Mon, Jun 09, 2003 at 05:12:02PM +0900, Hiroshi Hayakawa wrote: > Hi all, > I just tried using gnutls-0.8.7 on RedHat 9.0. > That has been compiled successfully with libtasn1-0.1.2, > libgcrypt-1.1.12 and opencdk-0.4.5. > After installing all stuffs under /usr/local as the default, > I used gnutls-srpcrypt to generate tpasswd.conf and tpasswd. > Here below are what I did: > >gnutls-srpcrypt --create-conf ./tpasswd.conf > >gnutls-srpcrypt --passwd ./tpasswd --passwd-conf ./tpasswd.conf -u test > Enter passwd: (I entered a string here.) > Segmentation fault > This created an empty ./tpasswd and ./tpasswd.tmp. > Then I tried it again. Could you catch the segmentation fault with the debugger? Try $ gdb gnutls-srpcrypt () run --passwd ./tpasswd --passwd-conf ./tpasswd.conf -u test and type "bt" to print a backtrace. This may provide some information about the segmentation fault. > Thanks, > Hiro > > > > > _______________________________________________ > Help-gnutls mailing list > Help-gnutls at gnu.org > http://mail.gnu.org/mailman/listinfo/help-gnutls > -- Nikos Mavroyanopoulos From nmav at gnutls.org Mon Jun 9 11:18:30 2003 From: nmav at gnutls.org (Nikos Mavroyanopoulos) Date: Mon, 9 Jun 2003 12:18:30 +0300 Subject: [Help-gnutls] gnutls-srpcrypt creates an empty tpasswd. In-Reply-To: <1055146320.3090.11.camel@localhost.localdomain> References: <1055146320.3090.11.camel@localhost.localdomain> Message-ID: <20030609091830.GA2654@gnutls.org> On Mon, Jun 09, 2003 at 05:12:02PM +0900, Hiroshi Hayakawa wrote: > Hi all, > After installing all stuffs under /usr/local as the default, > I used gnutls-srpcrypt to generate tpasswd.conf and tpasswd. > >gnutls-srpcrypt --passwd ./tpasswd --passwd-conf ./tpasswd.conf -u test > Enter passwd: (I entered a string here.) > Segmentation fault I've just identified the problem. A patch is below: Index: gnutls/src/crypt.c diff -u gnutls/src/crypt.c:2.21 gnutls/src/crypt.c:2.21.2.1 --- gnutls/src/crypt.c:2.21 Sun Dec 1 20:50:10 2002 +++ gnutls/src/crypt.c Mon Jun 9 11:10:11 2003 @@ -494,7 +494,6 @@ if (put==0) { fprintf(fd, "%s:%s:%u\n", username, cr, iindex); } - free(cr); fclose(fd); fclose(fd2); > Thanks, > Hiro -- Nikos Mavroyanopoulos