google / google/gvisor

Missing support for mount --bind of nondirectory files

Open
#13,498 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

mount --bind fails unless the source and destination are directories.

In Linux, any non-directory filesystem node can be bind mounted on any non-directory target (in addition to bind mounting directories on directories).

### Steps to reproduce

```
echo foo > foo
echo bar > bar
mount --bind foo bar
```

### runsc version

```shell

```

### docker version (if using docker)

```shell

```

### uname

_No response_

### kubectl (if using Kubernetes)

```shell

```

### repo state (if built from source)

_No response_

### runsc debug logs (if available)

```shell

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.