]> granicus.if.org Git - strace/commitdiff
mount: update parser to match kernel behaviour
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 16 Jun 2015 10:53:25 +0000 (10:53 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 16 Jun 2015 10:55:19 +0000 (10:55 +0000)
* mount.c (sys_mount): Do not decode type and data strings for
MS_SHARED, MS_PRIVATE, MS_SLAVE, and MS_UNBINDABLE mount flags
that do not imply valid strings.

mount.c

diff --git a/mount.c b/mount.c
index 2f7f0caec0bfb0042b8d500c7cb63c58b6277278..d980d75c5f85ece0a5bbf4990dc8948fe292a224 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -48,7 +48,8 @@ SYS_FUNC(mount)
 
                if (flags & MS_REMOUNT)
                        ignore_type = true;
-               else if (flags & (MS_BIND | MS_MOVE))
+               else if (flags & (MS_BIND | MS_MOVE | MS_SHARED
+                                 | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
                        ignore_type = ignore_data = true;
 
                printpath(tcp, tcp->u_arg[0]);