autofs5 may fail if map contains utf8 characters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
autofs5 (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
Binary package hint: autofs5
This bug is not in autofs itself, but instead is in smbclient.
Surely a separate bug report should be fired against smbclient but this bug may be relatively easy workarounded in autofs5 auto.smb/auto.cifs maps.
Problem with smbclient may be easily demonstrated by examining the following output:
root@linuxws03:
Domain=[WG] OS=[Unix] Server=[Samba 3.4.7]
Disk|print$|Printer Drivers
IPC|IPC$|IPC Service (linuxws03 server (Samba, Ubuntu))
Disk|документы|
Disk|documents|
Domain=[WG] OS=[Unix] Server=[Samba 3.4.7]
Server|
Server|
Workgroup|
root@linuxws03:
Domain=[WG] OS=[Unix] Server=[Samba 3.4.7]
Disk|print$|Printer Drivers
IPC|IPC$|IPC Service (linuxws03 server (Samba, Ubuntu))
Disk|Disk|
Domain=[WG] OS=[Unix] Server=[Samba 3.4.7]
Server|
Server|
Workgroup|
As you can see, the share named "документы" (this is russian word meaning "documents") gets lost when smbclient is being executed with "C" locale resulting in totally incorrect output "Disk|Disk|
My approach was for to modify auto.smb/auto.cifs by adding 'export LANG="en_US.UTF-8"' to the top of the file in order to fetch correct shares list. Then some modifications should be done to the awk script parsing the output:
$SMBCLIENT $smbopts -gL $key 2>/dev/null| awk -v key="$key" -v opts="$mountopts" -F'|' -- '
BEGIN { ORS=""; first=1; }
/Disk/ {
}
END {
}
'
This would allow to mount shares with utf-8 names, including ones that contain space characters in their names.
Changed in autofs5 (Ubuntu): | |
importance: | Undecided → Low |
Can you create a patch for this?
Thanks
chuck