Date: Fri, 02 Nov 2001 20:14:44 -0700 From: Warner Losh <imp@harmony.village.org> To: Matthew Seaman <matthew.seaman@tornadogroup.com> Cc: "Hartmann, O." <ohartman@klima.physik.uni-mainz.de>, AMAKAWA Shuhei <sa264@cam.ac.uk>, freebsd-stable@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: NIS/YP problems using pw(8) Message-ID: <200111030314.fA33Ei794774@harmony.village.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>
next in thread | previous in thread | raw e-mail | index | archive | help
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-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111030314.fA33Ei794774>