svn commit: r318234 - user/pho/stress2/lib
Peter Holm
pho at FreeBSD.org
Fri May 12 08:35:48 UTC 2017
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)
More information about the svn-src-user
mailing list