From owner-freebsd-current Sat Aug 10 7: 7:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 79D1337B400 for ; Sat, 10 Aug 2002 07:07:11 -0700 (PDT) Received: from tesla.distributel.net (nat.MTL.distributel.NET [66.38.181.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id DE5FA43E6E for ; Sat, 10 Aug 2002 07:07:10 -0700 (PDT) (envelope-from bmilekic@unixdaemons.com) Received: (from bmilekic@localhost) by tesla.distributel.net (8.11.6/8.11.6) id g7AE6wq92740; Sat, 10 Aug 2002 10:06:58 -0400 (EDT) (envelope-from bmilekic@unixdaemons.com) Date: Sat, 10 Aug 2002 10:06:58 -0400 From: Bosko Milekic To: Morten Rodal Cc: Eirik Nygaard , current@FreeBSD.ORG Subject: Re: Rewrite of the perl script rmuser to C Message-ID: <20020810100658.A92716@unixdaemons.com> References: <20020810120239.GB1064@test.eirikn.net> <20020810135941.GF6050@slurp.rodal.no> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020810135941.GF6050@slurp.rodal.no>; from morten@rodal.no on Sat, Aug 10, 2002 at 03:59:42PM +0200 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sat, Aug 10, 2002 at 03:59:42PM +0200, Morten Rodal wrote: > On Sat, Aug 10, 2002 at 02:02:39PM +0200, Eirik Nygaard wrote: > > I have just rewritten the rmuser perl script to C, it would be > > great if you could take a look at it and check if everything is ok. > > You should probably replace the strcpy() and strcat() with strlcpy(3) and > strlcat(3), or at least use the strncpy(3) and strncat(3). Also, sprintf() > should be replaced with snprintf(3). > > Maybe close the file descriptors in the signal handlers? Also, please clean it up, style-wise. I couldn't even read it due to mis-aligned braces ( { and } ). Thanks. -- Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message