From owner-freebsd-stable Fri Nov 2 19:14:52 2001 Delivered-To: freebsd-stable@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 5FA3E37B408; Fri, 2 Nov 2001 19:14:48 -0800 (PST) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id fA33EkV27451; Fri, 2 Nov 2001 20:14:47 -0700 (MST) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost [127.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id fA33Ei794774; Fri, 2 Nov 2001 20:14:45 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200111030314.fA33Ei794774@harmony.village.org> To: Matthew Seaman Subject: Re: NIS/YP problems using pw(8) Cc: "Hartmann, O." , AMAKAWA Shuhei , freebsd-stable@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG In-reply-to: Your message of "Fri, 26 Oct 2001 12:01:41 BST." <3BD94295.24C7A9C@tornadogroup.com> References: <3BD94295.24C7A9C@tornadogroup.com> <20011025205259.W1888-100000@klima.physik.uni-mainz.de> Date: Fri, 02 Nov 2001 20:14:44 -0700 From: Warner Losh Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <3BD94295.24C7A9C@tornadogroup.com> Matthew Seaman writes: : +static int : +issecure(const char *etcpath) : +{ : + struct stat stat_buf; : + int ret; : + int rc = 0; : + : + ret = lstat(etcpath, &stat_buf); : + if (ret == 0 && \ : + stat_buf.st_uid == 0 && \ : + S_ISDIR(stat_buf.st_mode) && \ : + (stat_buf.st_mode & (S_IWGRP|S_IWOTH)) == 0) { : + rc = 1; : + } : + return rc; : } First, you don't need \ at the end of the line. Second, this is racible. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message