[systemd-commits] src/fstab-generator

Kay Sievers kay at kemper.freedesktop.org
Mon Jun 4 06:24:50 PDT 2012


 src/fstab-generator/fstab-generator.c |    5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ec6ceb18663940efb1963704923430be0e83f1f7
Author: Kay Sievers <kay at vrfy.org>
Date:   Mon Jun 4 15:21:05 2012 +0200

    fstab-generator: avoid mangling of mount source string
    
    This is a valid source entry in /etc/fstab:
      //192.168.6.10/data /data cifs noperm,auto
    
    On Mon, Jun 4, 2012 at 2:04 PM, Dave Reisner <d at falconindy.com> wrote:
    > On Mon, Jun 04, 2012 at 12:57:47PM +0200, Kay Sievers wrote:
    >>
    >> Changed it to use:
    >>   path_is_absolute()
    >> instead of:
    >>   is_path(),
    >> so that we still sanitize the input we might match against.
    >>
    >> Let me know, if you think that could still cause any problems?
    
    > Yes, this will still break CIFS shares.

diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 0746724..d9ba3e3 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -470,10 +470,7 @@ static int parse_fstab(void) {
                         goto finish;
                 }
 
-                if (path_is_absolute(what))
-                        path_kill_slashes(what);
-
-                if (path_is_absolute(where))
+                if (is_path(where))
                         path_kill_slashes(where);
 
                 log_debug("Found entry what=%s where=%s type=%s", what, where, me->mnt_type);



More information about the systemd-commits mailing list