[Bugs] [Bug 1527063] New: missing quotes (filenames with spaces) get-gfid.sh generate-gfid-file.sh

bugzilla at redhat.com bugzilla at redhat.com
Mon Dec 18 13:02:15 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1527063

            Bug ID: 1527063
           Summary: missing quotes (filenames with spaces) get-gfid.sh
                    generate-gfid-file.sh
           Product: GlusterFS
           Version: 3.13
         Component: scripts
          Assignee: bugs at gluster.org
          Reporter: stephen.remde at gaist.co.uk
                CC: bugs at gluster.org



Description of problem:

Scripts dont quote filenames so filenames with spaces fail.

Version-Release number of selected component (if applicable):

ALL


How reproducible:

Easily

Steps to Reproduce:
1. Create a mount with a filename containing a space "./path/file name.txt"
2. Run generate-gfid-file.sh on it

Actual results:

getfattr: ./path/file: No such file or directory
getfattr: name.txt: No such file or directory

Expected results:

Script runs as normal

Additional info:

https://github.com/gluster/glusterfs/blob/master/extras/geo-rep/generate-gfid-file.sh#L9

Reads 

    find "$DIR_PATH" -exec $GET_GFID_CMD {} \; >> $OUTPUT_FILE

Should be

    find "$DIR_PATH" -exec $GET_GFID_CMD "{}" \; >> $OUTPUT_FILE


https://github.com/gluster/glusterfs/blob/master/extras/geo-rep/get-gfid.sh#L3

Reads

ATTR_STR=`getfattr -h $1 -n glusterfs.gfid.string`

Should be

ATTR_STR=`getfattr -h "$1" -n glusterfs.gfid.string`

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list