summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/ramfs
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-04-02 17:27:30 -0700
committerShentubot <shentubot@google.com>2019-04-02 17:28:36 -0700
commit1776ab28f0fb934d399361e6012945c70dcd996f (patch)
tree4c4cdd0f8e9e528c852332b41b3271fb57cdab7a /pkg/sentry/fs/ramfs
parentf9431fb20f24834dd1d5c450631bdfa04fe042f4 (diff)
Add test that symlinking over a directory returns EEXIST.
Also remove comments in InodeOperations that required that implementation of some Create* operations ensure that the name does not already exist, since these checks are all centralized in the Dirent. PiperOrigin-RevId: 241637335 Change-Id: Id098dc6063ff7c38347af29d1369075ad1e89a58
Diffstat (limited to 'pkg/sentry/fs/ramfs')
-rw-r--r--pkg/sentry/fs/ramfs/dir.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/pkg/sentry/fs/ramfs/dir.go b/pkg/sentry/fs/ramfs/dir.go
index b60dab243..05d716afb 100644
--- a/pkg/sentry/fs/ramfs/dir.go
+++ b/pkg/sentry/fs/ramfs/dir.go
@@ -268,10 +268,6 @@ func (d *Dir) createInodeOperationsCommon(ctx context.Context, name string, make
d.mu.Lock()
defer d.mu.Unlock()
- if _, ok := d.children[name]; ok {
- return nil, syscall.EEXIST
- }
-
inode, err := makeInodeOperations()
if err != nil {
return nil, err