source: npl/system/klibc/patches/mount-implement-o-defaults.patch @ 439f083

Last change on this file since 439f083 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
RevLine 
[c5c522c]1From: Ben Hutchings <ben@decadent.org.uk>
2Date: Sat, 4 Oct 2014 16:32:39 +0100
3Subject: mount: Implement -o defaults
4Bug-Debian: https://bugs.debian.org/763049
5Forwarded: http://www.zytor.com/pipermail/klibc/2016-January/003887.html
6
7This is needed to support mounting non-root filesystems in
8initramfs-tools.
9
10Signed-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.