From owner-freebsd-current@FreeBSD.ORG Thu Nov 27 14:26:38 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8375B1065670 for ; Thu, 27 Nov 2008 14:26:38 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7C98FC1C for ; Thu, 27 Nov 2008 14:26:38 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 9B622730A1; Thu, 27 Nov 2008 15:31:19 +0100 (CET) Date: Thu, 27 Nov 2008 15:31:19 +0100 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20081127143119.GB33716@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: any reason why linker.hints has mode -rw------- ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 14:26:38 -0000 As the subject says... kldxref creates linker.hints files with mode 600, and I cannot see any good reason for that except for a bug (or probably two bugs). Looking at the source code src/usr.sbin/kldxref/kldxref.c, it seems that the file is originally created by mkstemp (in a weird way -- the file descriptor returned by mkstemp is ignored, then the file is reopened) and here is where it gets the 600 permission. Then the file is rename()'d, but forgetting to restore the permission to something more useful ? cheers luigi