From owner-svn-src-all@FreeBSD.ORG Tue Nov 20 10:59:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 341E7C23; Tue, 20 Nov 2012 10:59:42 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1C58FC08; Tue, 20 Nov 2012 10:59:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qAKAxfqu003227; Tue, 20 Nov 2012 10:59:41 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qAKAxfYi003226; Tue, 20 Nov 2012 10:59:41 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201211201059.qAKAxfYi003226@svn.freebsd.org> From: Baptiste Daroussin Date: Tue, 20 Nov 2012 10:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243330 - head/usr.sbin/pw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Nov 2012 10:59:42 -0000 Author: bapt Date: Tue Nov 20 10:59:41 2012 New Revision: 243330 URL: http://svnweb.freebsd.org/changeset/base/243330 Log: Correctly set the password file mode after renaming in NIS mode Modified: head/usr.sbin/pw/pw_nis.c Modified: head/usr.sbin/pw/pw_nis.c ============================================================================== --- head/usr.sbin/pw/pw_nis.c Tue Nov 20 09:27:56 2012 (r243329) +++ head/usr.sbin/pw/pw_nis.c Tue Nov 20 10:59:41 2012 (r243330) @@ -68,6 +68,8 @@ pw_nisupdate(const char * path, struct p } if (rename(pw_tempname(), path) == -1) err(1, "rename()"); + if (chmod(path, 0644) == -1) + err(1, "chmod()"); free(pw); pw_fini();