Skip to content

fstab improperly escaped when spaces are used in options #51195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
littleski opened this issue Jan 16, 2019 · 1 comment
Closed

fstab improperly escaped when spaces are used in options #51195

littleski opened this issue Jan 16, 2019 · 1 comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@littleski
Copy link

Description of Issue/Question

This is similar to issue #27160 but in the options

Setup

Basically, mounting a CIFS drive with a linux who joined an active directory. I am assuming that it should work with local group name with spaces inside too.

/mnt/share:
  mount.mounted:
    - fstype: cifs
    - persist: True
    - mkmnt: True
    - mount: True
    - device: //share.local/share
    - dump: 0
    - pass_num: 0
    - opts: credentials=/root/.smbpasswd,uid=jenkins,gid=utilisateurs\ du\ domaine

Steps to Reproduce Issue

Running the state will properly mount the drive

          ID: /mnt/share
    Function: mount.mounted
      Result: True
     Comment: Target was successfully mounted. Added new entry to the fstab.
     Started: 12:13:07.855852
    Duration: 533.336 ms
     Changes:
              ----------
              mount:
                  True
              persist:
                  new

But will not write a correct config to fstab ('\ ' instead of '\040')
Current behaviour

//share.local/share  /mnt/share  cifs  credentials=/root/.smbpasswd,uid=jenkins,gid=utilisateurs\ du\ domaine  0 0

Expected behaviour

//share.local/share /mnt/share  cifs 
 credentials=/root/.smbpasswd,uid=jenkins,gid=utilisateurs\040du\040domaine  0 0

This prevent the drive to be mounted at boot

Versions Report

Salt Version:
           Salt: 2018.3.3

Dependency Versions:
           cffi: 1.11.2
       cherrypy: Not Installed
       dateutil: 2.6.1
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.10
        libgit2: 0.26.3
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: 0.8.1
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: 1.2.5
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.26.4
         Python: 2.7.5 (default, Oct 30 2018, 23:45:53)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 14.7.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.4.2
            ZMQ: 4.0.5

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-957.1.3.el7.x86_64
         system: Linux
        version: CentOS Linux 7.6.1810 Core
@garethgreenaway garethgreenaway added this to the Approved milestone Jan 16, 2019
@garethgreenaway garethgreenaway added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around P2 Priority 2 Bug broken, incorrect, or confusing behavior labels Jan 16, 2019
@garethgreenaway
Copy link
Contributor

@littleski Thanks for the report. We'll get this one fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

3 participants