Last change
on this file since 7c410f9 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
778 bytes
|
Rev | Line | |
---|
[c5c522c] | 1 | From: Ben Hutchings <ben@decadent.org.uk> |
---|
| 2 | Date: Sat, 4 Oct 2014 16:32:39 +0100 |
---|
| 3 | Subject: mount: Implement -o defaults |
---|
| 4 | Bug-Debian: https://bugs.debian.org/763049 |
---|
| 5 | Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003887.html |
---|
| 6 | |
---|
| 7 | This is needed to support mounting non-root filesystems in |
---|
| 8 | initramfs-tools. |
---|
| 9 | |
---|
| 10 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> |
---|
| 11 | --- |
---|
| 12 | --- a/usr/utils/mount_opts.c |
---|
| 13 | +++ b/usr/utils/mount_opts.c |
---|
| 14 | @@ -89,8 +89,13 @@ parse_mount_options(char *arg, unsigned |
---|
| 15 | break; |
---|
| 16 | } |
---|
| 17 | |
---|
| 18 | - if (res != 0 && s[0]) |
---|
| 19 | - add_extra_option(extra, opt); |
---|
| 20 | + if (res != 0 && s[0]) { |
---|
| 21 | + if (!strcmp(opt, "defaults")) |
---|
| 22 | + rwflag &= ~(MS_RDONLY|MS_NOSUID|MS_NODEV| |
---|
| 23 | + MS_NOEXEC|MS_SYNCHRONOUS); |
---|
| 24 | + else |
---|
| 25 | + add_extra_option(extra, opt); |
---|
| 26 | + } |
---|
| 27 | } |
---|
| 28 | |
---|
| 29 | return rwflag; |
---|
Note: See
TracBrowser
for help on using the repository browser.