Commit Graph

11 Commits

Author SHA1 Message Date
Tamir Duberstein 9d0d82088a Remove __fuchsia__ defines
These mostly guard linux-only headers; check for linux instead.

PiperOrigin-RevId: 329362762
2020-08-31 13:10:56 -07:00
Nicolas Lacasse 83a8b309e9 tmpfs: Allow xattrs in the trusted namespace if creds has CAP_SYS_ADMIN.
This is needed to support the overlay opaque attribute.

PiperOrigin-RevId: 328552985
2020-08-26 10:05:34 -07:00
Jamie Liu 5e05950c1c Deflake exec test.
- Only use MAXSYMLINKS/2+1 symlinks for each of the interpreter and script
  paths in SymlinkLimitRefreshedForInterpreter to tolerate cases where the
  original paths (/tmp, /bin, or /bin/echo) themselves contain symlinks.

- Ensure that UnshareFiles performs execve immediately after clone(CLONE_VFORK)
  (no heap allocation for ExecveArray/RunfilesPath).

- Use lstat() rather than stat() for the existence check in fs_util's Exists;
  the latter will fail if the symlink target does not exist, even if the
  symlink does.

PiperOrigin-RevId: 320110156
2020-07-07 19:45:16 -07:00
Adin Scannell 5776a7b6f6 Fix header ordering and format all C++ code.
PiperOrigin-RevId: 291844200
2020-01-27 18:27:20 -08:00
Dean Deng f47eaffd5c Do not consider symlinks as directories in fs utils.
IsDirectory() is used in RecursivelyDelete(), which should not follow symlinks.
The only other use (syscalls/linux/rename.cc) is not affected by this change.

Updates #1366.

PiperOrigin-RevId: 284803968
2019-12-10 11:09:44 -08:00
Andrei Vagin 8ae70f864d test/perf: optimize the getdents test
* Use mknod instead of open&close to create an empty file.
* Limit a number of files to (1<<16) instead of 100K.

In this case, a test set is (1, 8, 64, 512, 4K, 32K, 64K) instead of (1, 8, 64,
512, 4K, 32K, 98K). I think it is easier to compare results for 32K and 64K
than 32K and 98K. And results for 98K doesn't give us more information than for
54K.

PiperOrigin-RevId: 275552507
2019-10-18 15:01:40 -07:00
Rahat Mahmood 863e11ac4d Implement /proc/net/udp.
PiperOrigin-RevId: 266229756
2019-08-29 14:30:41 -07:00
Nicolas Lacasse cf51e77d6d Fix suggestions from clang.
PiperOrigin-RevId: 255679603
2019-06-28 15:32:29 -07:00
Michael Pratt 4d52a55201 Change copyright notice to "The gVisor Authors"
Based on the guidelines at
https://opensource.google.com/docs/releasing/authors/.

1. $ rg -l "Google LLC" | xargs sed -i 's/Google LLC.*/The gVisor Authors./'
2. Manual fixup of "Google Inc" references.
3. Add AUTHORS file. Authors may request to be added to this file.
4. Point netstack AUTHORS to gVisor AUTHORS. Drop CONTRIBUTORS.

Fixes #209

PiperOrigin-RevId: 245823212
Change-Id: I64530b24ad021a7d683137459cafc510f5ee1de9
2019-04-29 14:26:23 -07:00
Michael Pratt 74f5100a92 Fix cases of missing braces on if
PiperOrigin-RevId: 230641540
Change-Id: Icccc3cdeec191138940f0ecea0a29798359d2b1f
2019-01-23 18:24:48 -08:00
Brian Geffon d3bc79bc84 Open source system call tests.
PiperOrigin-RevId: 224886231
Change-Id: I0fccb4d994601739d8b16b1d4e6b31f40297fb22
2018-12-10 14:42:34 -08:00