Bug 1527063 - missing quotes (filenames with spaces) get-gfid.sh generate-gfid-file.sh
Summary: missing quotes (filenames with spaces) get-gfid.sh generate-gfid-file.sh
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: 3.13
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-12-18 13:02 UTC by stephen.remde
Modified: 2018-06-20 18:28 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description stephen.remde 2017-12-18 13:02:15 UTC
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`

Comment 1 Shyamsundar 2018-06-20 18:28:11 UTC
This bug reported is against a version of Gluster that is no longer maintained (or has been EOL'd). See https://www.gluster.org/release-schedule/ for the versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline gluster repository, request that it be reopened and the Version field be marked appropriately.

Comment 2 Shyamsundar 2018-06-20 18:28:12 UTC
This bug reported is against a version of Gluster that is no longer maintained
(or has been EOL'd). See https://www.gluster.org/release-schedule/ for the
versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline
gluster repository, request that it be reopened and the Version field be marked
appropriately.


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