From owner-svn-src-user@freebsd.org Fri May 12 08:35:48 2017 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19379D6710C for ; Fri, 12 May 2017 08:35:48 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DD57D1E58; Fri, 12 May 2017 08:35:47 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4C8ZkMs022383; Fri, 12 May 2017 08:35:46 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4C8ZkKX022382; Fri, 12 May 2017 08:35:46 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201705120835.v4C8ZkKX022382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Fri, 12 May 2017 08:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r318234 - user/pho/stress2/lib X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 May 2017 08:35:48 -0000 Author: pho Date: Fri May 12 08:35:46 2017 New Revision: 318234 URL: https://svnweb.freebsd.org/changeset/base/318234 Log: Added access check to work directory. Sponsored by: Dell EMC Isilon Modified: user/pho/stress2/lib/main.c Modified: user/pho/stress2/lib/main.c ============================================================================== --- user/pho/stress2/lib/main.c Fri May 12 08:32:26 2017 (r318233) +++ user/pho/stress2/lib/main.c Fri May 12 08:35:46 2017 (r318234) @@ -199,7 +199,8 @@ main(int argc, char **argv) if (mkdir(op->wd, 0770) == -1) if (errno != EEXIST) err(1, "mkdir(%s) %s:%d", op->wd, __FILE__, __LINE__); - } + } else if ((sb.st_mode & S_IRWXU) == 0) + errx(1, "No RWX access to %s", op->wd); if (stat(op->cd, &sb) == -1) { if (mkdir(op->cd, 0770) == -1) if (errno != EEXIST)