fstab-generator interprets backslashes in CIFS mounts
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd |
Won't Fix
|
Medium
|
|||
systemd (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Hello. I'm using systemd 219 on Ubuntu 15.04.
I have the following line in /etc/fstab:
\\192.168.
"sudo mount /mnt/nas/" works properly in this case. Hovewer, fstab-generator creates an incorrect mount unit:
# Automatically generated by systemd-
[Unit]
SourcePath=
Documentation=
[Mount]
What=\192.
Where=/mnt/nas
Type=cifs
Options=
Note a missing backslash before the IP address. "systemctl status mnt-nas.mount" obviously tells that unit wasn't able to start:
марта 31 20:23:32 artyom-H97-D3H mount[7360]: mount.cifs: bad UNC (\192.168.
Let's add more backslashes to the CIFS path:
\\\\192.
In this case, generated mount unit is correct:
# Automatically generated by systemd-
[Unit]
SourcePath=
Documentation=
[Mount]
What=\\
Where=/mnt/nas
Type=cifs
Options=
However, mount commands refuses to work:
$ sudo mount /mnt/nas
mount.cifs: bad UNC (\\\\192.
I don't precisely know if fstab entries should contain escape characters (extra backslashes). Nonetheless, fstab-generator and mount command should have the same behaviour anyway.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: systemd 219-6ubuntu1
ProcVersionSign
Uname: Linux 3.19.0-9-generic x86_64
NonfreeKernelMo
ApportVersion: 2.17-0ubuntu1
Architecture: amd64
CurrentDesktop: XFCE
Date: Sat Apr 4 21:38:52 2015
InstallationDate: Installed on 2015-02-05 (58 days ago)
InstallationMedia: Xubuntu 14.04.1 LTS "Trusty Tahr" - Release amd64 (20140723)
MachineType: Gigabyte Technology Co., Ltd. H97-D3H
ProcKernelCmdLine: \vmlinuz-
SourcePackage: systemd
UpgradeStatus: Upgraded to vivid on 2015-03-02 (33 days ago)
dmi.bios.date: 06/26/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F5
dmi.board.
dmi.board.name: H97-D3H-CF
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.board.version: x.x
dmi.chassis.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.
dmi.modalias: dmi:bvnAmerican
dmi.product.name: H97-D3H
dmi.product.
dmi.sys.vendor: Gigabyte Technology Co., Ltd.
Changed in systemd: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in systemd (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Martin Pitt (pitti) |
importance: | High → Medium |
summary: |
- fstab-generator creates incorrect mount units for CIFS + fstab-generator interprets backslashes in CIFS mounts |
Changed in systemd: | |
status: | Confirmed → Won't Fix |
Hello. I'm using systemd 219 on Ubuntu 15.04.
I have the following line in /etc/fstab:
\\192.168. 1.110\ExtHDD /mnt/nas cifs vers=3. 0,nofail, credentials= /etc/net_ pass,uid= 1000,gid= 1000 0 0
"sudo mount /mnt/nas/" works properly in this case. Hovewer, fstab-generator creates an incorrect mount unit:
# Automatically generated by systemd- fstab-generator
[Unit] /etc/fstab man:fstab( 5) man:systemd- fstab-generator (8)
SourcePath=
Documentation=
[Mount] 168.1.110\ ExtHDD vers=3. 0,nofail, credentials= /etc/net_ pass,uid= 1000,gid= 1000
What=\192.
Where=/mnt/nas
Type=cifs
Options=
Note a missing backslash before the IP address. "systemctl status mnt-nas.mount" obviously tells that unit wasn't able to start:
марта 31 20:23:32 artyom-H97-D3H mount[7360]: mount.cifs: bad UNC (\192.168. 1.110\ExtHDD)
Let's add more backslashes to the CIFS path:
\\\\192. 168.1.110\ \ExtHDD /mnt/nas cifs vers=3. 0,nofail, credentials= /etc/net_ pass,uid= 1000,gid= 1000 0 0
In this case, generated mount unit is correct:
# Automatically generated by systemd- fstab-generator
[Unit] /etc/fstab man:fstab( 5) man:systemd- fstab-generator (8)
SourcePath=
Documentation=
[Mount] 192.168. 1.110\ExtHDD vers=3. 0,nofail, x-gvfs- show,credential s=/etc/ nas_passwd, uid=1000, gid=1000, cache=loose
What=\\
Where=/mnt/nas
Type=cifs
Options=
However, mount commands refuses to work:
$ sudo mount /mnt/nas 168.1.110\ \ExtHDD)
mount.cifs: bad UNC (\\\\192.
I don't precisely know if fstab entries should contain escape characters (extra backslashes). Nonetheless, fstab-generator and mount command should have the same behaviour anyway.