diff options
author | Jamie Liu <jamieliu@google.com> | 2019-02-19 11:20:48 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-02-19 11:21:46 -0800 |
commit | 22d8b6eba1487d3f0d87a578e414e451d9aeb26d (patch) | |
tree | 458bec2b96a9f0f4219c261708ba4a019ae232be /test/syscalls/linux/BUILD | |
parent | c611dbc5a7399922588e3fd99b22bda19f684afe (diff) |
Break /proc/[pid]/{uid,gid}_map's dependence on seqfile.
In addition to simplifying the implementation, this fixes two bugs:
- seqfile.NewSeqFile unconditionally creates an inode with mode 0444,
but {uid,gid}_map have mode 0644.
- idMapSeqFile.Write implements fs.FileOperations.Write ... but it
doesn't implement any other fs.FileOperations methods and is never
used as fs.FileOperations. idMapSeqFile.GetFile() =>
seqfile.SeqFile.GetFile() uses seqfile.seqFileOperations instead,
which rejects all writes.
PiperOrigin-RevId: 234638212
Change-Id: I4568f741ab07929273a009d7e468c8205a8541bc
Diffstat (limited to 'test/syscalls/linux/BUILD')
-rw-r--r-- | test/syscalls/linux/BUILD | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/syscalls/linux/BUILD b/test/syscalls/linux/BUILD index 75fa52a57..3c61c48ef 100644 --- a/test/syscalls/linux/BUILD +++ b/test/syscalls/linux/BUILD @@ -1445,6 +1445,25 @@ cc_binary( ) cc_binary( + name = "proc_pid_uid_gid_map_test", + testonly = 1, + srcs = ["proc_pid_uid_gid_map.cc"], + linkstatic = 1, + deps = [ + "//test/util:capability_util", + "//test/util:fs_util", + "//test/util:logging", + "//test/util:multiprocess_util", + "//test/util:posix_error", + "//test/util:save_util", + "//test/util:test_main", + "//test/util:test_util", + "@com_google_absl//absl/strings", + "@com_google_googletest//:gtest", + ], +) + +cc_binary( name = "pselect_test", testonly = 1, srcs = ["pselect.cc"], |