From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 9 02:32:00 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B1E7BE for ; Wed, 9 Apr 2014 02:32:00 +0000 (UTC) Received: from dmz-mailsec-scanner-4.mit.edu (dmz-mailsec-scanner-4.mit.edu [18.9.25.15]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD07C1938 for ; Wed, 9 Apr 2014 02:31:59 +0000 (UTC) X-AuditID: 1209190f-f790b6d000000c3a-ed-5344b11deb79 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) (using TLS with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id 17.8F.03130.D11B4435; Tue, 8 Apr 2014 22:31:57 -0400 (EDT) Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id s392VuaY021226; Tue, 8 Apr 2014 22:31:56 -0400 Received: from multics.mit.edu (system-low-sipb.mit.edu [18.187.2.37]) (authenticated bits=56) (User authenticated as kaduk@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.8/8.12.4) with ESMTP id s392VrNf017967 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 8 Apr 2014 22:31:55 -0400 Received: (from kaduk@localhost) by multics.mit.edu (8.12.9.20060308) id s392VroE029607; Tue, 8 Apr 2014 22:31:53 -0400 (EDT) Date: Tue, 8 Apr 2014 22:31:53 -0400 (EDT) From: Benjamin Kaduk To: "A.J. 'Fonz' van Werven" Subject: Re: Letting "ls -l" display file permissions in octal In-Reply-To: <20140408203913.GA2340@spectrum.skysmurf.nl> Message-ID: References: <20140408184533.GA974@spectrum.skysmurf.nl> <4e735f74795e7212dd3269ec6b0aaaf0.authenticated@ultimatedns.net> <20140408203913.GA2340@spectrum.skysmurf.nl> User-Agent: Alpine 1.10 (GSO 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBIsWRmVeSWpSXmKPExsUixCmqrSu70SXYoOEkn8X2zf8YLZ5em87k wOQx49N8Fo+Hs+IDmKK4bFJSczLLUov07RK4MqbNvcZccIy1ouvXWqYGxnUsXYycHBICJhJX LxxnhbDFJC7cW88GYgsJzGaSOLwpDMLewChx6AF/FyMXkH2QSeJrxxTGLkYOIKdeov9IEUgN i4CWxLs5B5lBbDYBFYmZbzaCzRERMJLYNvcwWJxZQF7iwuZDjCC2sICdxLEljSwgYzgFLCWO HPcCMXkFHCWmbuWA2LSUUeLIkxlgZ4oK6Eis3j8FzOYVEJQ4OfMJC8RIS4lzf66zTWAUnIUk NQtJagEj0ypG2ZTcKt3cxMyc4tRk3eLkxLy81CJdE73czBK91JTSTYzgAJXk38H47aDSIUYB DkYlHt4TZi7BQqyJZcWVuYcYJTmYlER5368BCvEl5adUZiQWZ8QXleakFh9ilOBgVhLhfZ4N lONNSaysSi3Kh0lJc7AoifO+tbYKFhJITyxJzU5NLUgtgsnKcHAoSfBO3ADUKFiUmp5akZaZ U4KQZuLgBBnOAzR8x3qQ4cUFibnFmekQ+VOMilLivDYgzQIgiYzSPLheWAJ5xSgO9Iow73SQ Kh5g8oHrfgU0mAlocKod2OCSRISUVANjddoVyd+VTxRSeqOn/xH29JplNS+jIEY3aqO2/UaZ F8lXj7wwlLlpUcIz7/6Xzv/ip/S92s7f5biaaNEy0eeH+TmdH/ee+PmkGu9eMD0uWWCtvb62 qOKSuwt3id7onHFmNue+9HduX45sODvh/+urNx4dYb5gFNli1sGckdcak5GxRLn05pYQJZbi jERDLeai4kQAaOvqmPsCAAA= Cc: freebsd-hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2014 02:32:00 -0000 On Tue, 8 Apr 2014, A.J. 'Fonz' van Werven wrote: > Please note: someone else on the forums spotted a bug in my code: the > snprintf() call in octalmode() in print.c uses sizeof, which actually > refers to the size of the pointer rather than the size of the buffer > itself. I've updated the patch to just use the literal value 6 instead > (four octal digits, a space reserved for aclmode() and a terminating \0). > Since the length of said buffer has been hardcoded to 20 in the calling > function (I didn't do that, BTW), I think that should be ok. If you have a version of the patch that you're happy with, it's probably worth submitting it in a PR so that it doesn't get lost. -Ben Kaduk