Lines Matching +full:protect +full:- +full:exec

122 #   define UMOUNT "do-not-use-this-value"
136 /// \return -1 to indicate error, although this should never happen.
142 return -1; in unmount()
154 /// Executes 'mount -t tmpfs' (or a similar variant).
170 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
172 size_arg = F("-osize=%s") % size; in run_mount_tmpfs()
181 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
183 size_arg = F("-osize=%s") % size; in run_mount_tmpfs()
192 mount_args[last++] = "-ttmpfs"; in run_mount_tmpfs()
194 size_arg = F("-o-s%s") % size; in run_mount_tmpfs()
203 mount_args[last++] = "-Ftmpfs"; in run_mount_tmpfs()
205 size_arg = F("-o-s%s") % size; in run_mount_tmpfs()
227 INV(ret == -1); in run_mount_tmpfs()
228 std::cerr << "Failed to exec " << mount_args[0] << "\n"; in run_mount_tmpfs()
245 if (::unmount(mount_point.c_str(), 0) == -1) { in unmount_with_unmount2()
266 if (pid == -1) { in unmount_with_umount8()
272 INV(ret == -1); in unmount_with_umount8()
273 std::cerr << "Failed to exec " UMOUNT "\n"; in unmount_with_umount8()
279 if (::waitpid(pid, &status, 0) == -1) { in unmount_with_umount8()
310 if (::lstat(path.c_str(), &sb) == -1) { in safe_stat()
430 /// \return The amount of free space usable by a non-root user.
438 if (::statvfs(path.c_str(), &buf) == -1) { in free_disk_space()
446 if (::statfs(path.c_str(), &buf) == -1) { in free_disk_space()
478 if (::mkdir(dir.c_str(), static_cast< mode_t >(mode)) == -1) { in mkdir()
517 /// and thus should not be used to protect data that may be subject to snooping.
523 /// - Allow the unprivileged code to write to files in the work directory by
528 /// - Allow the test cases themselves to call getcwd(3) at any point. At least
536 /// bookkeeping for no real gain, because we are not really trying to protect
564 if (::chmod(path.c_str(), 0755) == -1) { in mkdtemp_public()
573 LW(F("Failed to delete just-created temporary directory %s") in mkdtemp_public()
608 if (::mkstemp(buf.get()) == -1) { in mkstemp()
648 if (pid == -1) { in mount_tmpfs()
658 if (::waitpid(pid, &status, 0) == -1) { in mount_tmpfs()
684 /// This operation simulates a "rm -r". No effort is made to forcibly delete
698 if (iter->name == "." || iter->name == "..") in rm_r()
701 const fs::path entry = directory / iter->name; in rm_r()
726 if (::rmdir(file.c_str()) == -1) { in rmdir()
764 if (::unlink(file.c_str()) == -1) { in unlink()
799 retries--; in unmount()