Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 574302 - autofs cannot mount the folder name including "&".
Summary: autofs cannot mount the folder name including "&".
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: autofs
Version: 13
Hardware: All
OS: Linux
high
medium
Target Milestone: ---
Assignee: Ian Kent
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F13Beta, F13BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2010-03-17 05:20 UTC by Ian Kent
Modified: 2010-03-18 03:32 UTC (History)
4 users (show)

Fixed In Version: autofs-5.0.5-22.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of: 559796
Environment:
Last Closed: 2010-03-18 03:23:27 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch - fix ampersand escape in auto.smb (deleted)
2010-03-17 05:22 UTC, Ian Kent
no flags Details | Diff

Description Ian Kent 2010-03-17 05:20:19 UTC
+++ This bug was initially created as a clone of Bug #559796 +++

Created an attachment (id=387477)
outputed with "logging=debug" in /etc/sysconfig/autofs

Description of problem:

autofs cannot mount the folder name including "&".

Version-Release number of selected component (if applicable):
autofs-5.0.1-0.rc2.131.el5_4.1

How reproducible:
Always

Steps to Reproduce:
1. The hidden share on windows server is //10.66.0.191/best & testing$.
2. Create /etc/auto.master, /etc/auto.misc and /etc/auto.cifs.10.66.0.191 

The content of auto.master:
--------------------------------
/misc   /etc/auto.misc
+auto.master
--------------------------------

The content of auto.misc is based on auto.smb, just include a little
modification:
--------------------------------
#!/bin/bash

# This file must be executable to work! chmod 755!

key="$1"
opts="-fstype=cifs"

if [ -e /etc/auto.cifs.$key ]; then
        opts=$opts,credentials=/etc/auto.cifs.$key
fi


for P in /bin /sbin /usr/bin /usr/sbin
do
        if [ -x $P/smbclient ]
        then
                SMBCLIENT=$P/smbclient
                break
        fi
done

[ -x $SMBCLIENT ] || exit 1

$SMBCLIENT -gNL $key 2>/dev/null| awk -v key="$key" -v opts="$opts" -F'|' -- '
        BEGIN   { ORS=""; first=1 }
        /Disk/  {
                  if (first)
                        print opts; first=0
                  dir = $2
                  loc = $2
                  # Enclose mount dir and location in quotes
                  # Double quote "$" in location as it is special
                  gsub(/\$$/, "\\$", loc);
                  print " \\\n\t \"/" dir "\"", "\"://" key "/" loc "\""
                }
        END     { if (!first) print "\n"; else exit 1 }
--------------------------------

The content of auto.cifs.10.66.0.191:
--------------------------------
username=administrator
password=redhat
--------------------------------

3. /etc/init.d/autofs restart
4. ls -la /opt/testing/10.2.68.13/best\ \&\ testing\$/

  
Actual results:
There is no output and the machine seems to be halted.

Expected results:
It can be mounted and accessed.

Comment 1 Ian Kent 2010-03-17 05:22:32 UTC
Created attachment 400634 [details]
Patch - fix ampersand escape in auto.smb

Comment 2 Fedora Update System 2010-03-17 05:41:29 UTC
autofs-5.0.5-22.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/autofs-5.0.5-22.fc13

Comment 3 Fedora Update System 2010-03-17 05:59:08 UTC
autofs-5.0.5-22.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/autofs-5.0.5-22.fc12

Comment 4 Fedora Update System 2010-03-18 03:22:58 UTC
autofs-5.0.5-22.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2010-03-18 03:32:31 UTC
autofs-5.0.5-22.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.