LOCAL_APPS_EXTRAMOUNTS fails in X01-localapps

Bug #521147 reported by Adam J. Lincoln
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Fix Released
Undecided
Adam J. Lincoln

Bug Description

In the X01-localapps script, there's a subtle bug that combines variable expansion and bash's IFS variable.

On line 182, If true (or unset), the variable SSH_FOLLOW_SYMLINKS is re-set to the value "follow_symlinks,". This works fine for line 187 where the user's /home is mounted. But inside the loop for LOCAL_APP_EXTRAMOUNTS, bash's internal field separator variable IFS is set to ',' to deal with the comma separated entry in lts.conf. This means that *unquoted* references to $SSH_FOLLOW_SYMLINKS treat the comma as a special character, and it is stripped from the expansion. This makes the sshfs command on line 195 fail each time the loop, as the -o parameter looks like follow_symlinksallow_other,ControlPath=... instead of follow_symlinks,allow_other,ControlPath=...

A patch is attached that fixes this.

If ${SSH_FOLLOW_SYMLINKS} is quoted instead in line 195, it behaves as expected. The attached patch quotes the set of parameters that go with -o. Line 187 doesn't need to be quoted because IFS isn't set to comma at that point, but if there's a readability reason to quote them both, that seems reasonable.

This looks like it's been broken upstream since around October.

Related branches

Revision history for this message
Adam J. Lincoln (adamjlincoln) wrote :
Revision history for this message
Adam J. Lincoln (adamjlincoln) wrote :

Committed upstream by vagrantc (rev 1655).

Changed in ltsp:
status: New → Fix Committed
assignee: nobody → Adam J. Lincoln (adamjlincoln)
Wim Muskee (wimmuskee)
Changed in ltsp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.