Repository navigation
Commit a3c751a
Miklos Szeredi
vfs: allow unprivileged whiteout creation
Whiteouts, unlike real device node should not require privileges to create.
The general concern with device nodes is that opening them can have side
effects. The kernel already avoids zero major (see
Documentation/admin-guide/devices.txt). To be on the safe side the patch
explicitly forbids registering a char device with 0/0 number (see
cdev_add()).
This guarantees that a non-O_PATH open on a whiteout will fail with ENODEV;
i.e. it won't have any side effect.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>1 parent 0e698df commit a3c751a
4 files changed
Lines changed: 14 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
483 | 483 | | |
484 | 484 | | |
485 | 485 | | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
486 | 489 | | |
487 | 490 | | |
488 | 491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3505 | 3505 | | |
3506 | 3506 | | |
3507 | 3507 | | |
| 3508 | + | |
3508 | 3509 | | |
3509 | 3510 | | |
3510 | 3511 | | |
3511 | 3512 | | |
3512 | 3513 | | |
3513 | | - | |
| 3514 | + | |
| 3515 | + | |
3514 | 3516 | | |
3515 | 3517 | | |
3516 | 3518 | | |
| |||
4345 | 4347 | | |
4346 | 4348 | | |
4347 | 4349 | | |
4348 | | - | |
4349 | | - | |
4350 | | - | |
4351 | 4350 | | |
4352 | 4351 | | |
4353 | 4352 | | |
| |||
4483 | 4482 | | |
4484 | 4483 | | |
4485 | 4484 | | |
4486 | | - | |
4487 | | - | |
4488 | | - | |
4489 | | - | |
4490 | | - | |
4491 | | - | |
4492 | | - | |
4493 | | - | |
4494 | | - | |
4495 | | - | |
4496 | | - | |
4497 | | - | |
4498 | | - | |
4499 | | - | |
4500 | 4485 | | |
4501 | 4486 | | |
4502 | 4487 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1721 | 1721 | | |
1722 | 1722 | | |
1723 | 1723 | | |
1724 | | - | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
1725 | 1729 | | |
1726 | 1730 | | |
1727 | 1731 | | |
| |||
0 commit comments