<x-flowed> Hello,
>... > > in the Solaris code to > > > > putenv(strdup(varname)); > > > > If I'm right this should do the magic. > > > > Regards > > > > Wolfgang Zekoll > >I don't know if the this code solves the problem, but I would like to just >remind you both that such code causes a memory leak (the string malloc'ed by >strdup needs to be free'ed), and therefore should neither be integrated in >ftp.proxy mainstream code nor used on a production server as is. basically I do agree that malloc'ed memory should be free'ed. But in this particular case the memory allocation in question is done after ftp.proxy fork'ed it's child process before it is exec'ed, and only the child malloc's (I hope my quick code investigation is right). So even if we would decide to free the memory it's not possible since it's required for the exec process which terminates automatically the ftp.proxy child which could free the memory. But it's also not required to free the memory because if the exec'ed process terminates it's resources (including memory) are automatically freed by the operation system. So strdup) without free() shouldn't be a problem as long as my assumption, that it's only the ftp.proxy child that does the allocation, is correct. Regards Wolfgang Zekoll -- http://quietsche-entchen.de/ - schwimmt und quietscht. --general-l------------------------------------ To unsubscribe please visit: http://www.ftpproxy.org/html/maillinglists.html </x-flowed> From [EMAIL PROTECTED] Wed Jun 30 11:38:31 2004 Return-Path: <[EMAIL PROTECTED]> Received: from mail.compucation.de (mail.compucation.de [213.185.64.44]) by um1.pce.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id i5U9dEi29716 (using TLSv1/SSLv3 with cipher RC4-MD5 (128 bits) verified NO) for <[EMAIL PROTECTED]>; Wed, 30 Jun 2004 11:39:14 +0200 Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by compucation.de (mail.compucation.de [213.185.64.44]) (MDaemon.PRO.v7.1.2.R) with ESMTP id md50000013666.msg for <[EMAIL PROTECTED]>; Wed, 30 Jun 2004 11:38:31 +0200 Message-ID: <[EMAIL PROTECTED]> Date: Wed, 30 Jun 2004 11:38:25 +0200 From: Gregoire Barbier <[EMAIL PROTECTED]> To: "general-l List Member" <[EMAIL PROTECTED]> Subject: [general-l] External Authenticator {04} References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> In-Reply-To: <[EMAIL PROTECTED]> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.1 X-Lookup-Warning: MAIL lookup on [EMAIL PROTECTED] does not match 213.228.0.44 X-MDRemoteIP: 213.228.0.44 Sender: [EMAIL PROTECTED] X-Return-Path: [EMAIL PROTECTED] Precedence: bulk List-Unsubscribe: <mailto:[EMAIL PROTECTED]> X-MDMailing-List: [EMAIL PROTECTED] X-MDSend-Notifications-To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] X-MDaemon-Deliver-To: [EMAIL PROTECTED] X-MDAV-Processed: mail.compucation.de, Wed, 30 Jun 2004 11:38:34 +0200 X-UIDL: '7I"!+:5"!mi*"!e0`"! X-Eudora2Unix: 3905-11-05T08:39:36Z converted Sorry, I didn't see that the strdup was after the fork. Selon Wolfgang Zekoll <[EMAIL PROTECTED]>: > Hello, > >... > > > in the Solaris code to > > > > > > putenv(strdup(varname)); > > > > > > If I'm right this should do the magic. > > > > > > Regards > > > > > > Wolfgang Zekoll > > > >I don't know if the this code solves the problem, but I would like to just > >remind you both that such code causes a memory leak (the string malloc'ed > by > >strdup needs to be free'ed), and therefore should neither be integrated in > >ftp.proxy mainstream code nor used on a production server as is. > > basically I do agree that malloc'ed memory should be free'ed. But in this > particular case the memory allocation in question is done after ftp.proxy > fork'ed it's child process before it is exec'ed, and only the child > malloc's (I hope my quick code investigation is right). So even if we > would decide to free the memory it's not possible since it's required for > the exec process which terminates automatically the ftp.proxy child which > could free the memory. But it's also not required to free the memory > because if the exec'ed process terminates it's resources (including memory) > are automatically freed by the operation system. So strdup) without free() > shouldn't be a problem as long as my assumption, that it's only the > ftp.proxy child that does the allocation, is correct. > > Regards > > Wolfgang Zekoll > > -- > http://quietsche-entchen.de/ - schwimmt und quietscht. > > > > --general-l------------------------------------ > To unsubscribe please visit: > http://www.ftpproxy.org/html/maillinglists.html > > -- -- Gregoire Barbier - gregoire.barbier(at)free.fr - +33 6 21 35 73 49 --general-l------------------------------------ To unsubscribe please visit: http://www.ftpproxy.org/html/maillinglists.html

