Bug 4308 - customer reported issue: automounter on osx fails because we try to find absolute paths
: customer reported issue: automounter on osx fails because we try to find abso...
Status: CLOSED WONTFIX
Product: Logitech Media Server
Classification: Unclassified
Component: Platform Support
: 6.5.0
: Macintosh MacOS X 10.4
: P2 minor (vote)
: ---
Assigned To: Chris Owens
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-05 18:23 UTC by Kevin Pearsall
Modified: 2008-12-18 11:12 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Pearsall 2006-10-05 18:23:22 UTC
The fault lies in Slim::Utils::Misc::fixPathCase. My particular perversion
of symlinking to an automount path would not be fixed by the following, but
it will catch entering a path like /Network/Servers/linkstation/Music.

    535 	if ($^O eq 'darwin' && $path !~
m#^(/BOGUS/PATH|/Network/Servers)#) {
    536 		$path = Cwd::abs_path($path);
    537 	}

Line numbers are from revision 9916.

--------------------

The server replaces the path I enter with the one returned by Cwd::abs_path.
I suspect this will affect any automount implementation where the directory
that triggers a mount request is a symlink farm to the real mount point.
ISTR that HP-UX does this too.

--------------------

So Slim::Util::Misc needs to be smarter about munging the name of the
directory it gets from the user via the web interface or the config file.
Currently it uses the Cwd module to get the real path, but it needs to find
the automount root instead. The only way to figure out that this has
happened appears to me to be the following heuristic:

1. Music directory is a symlink
2. Target of the symlink is in /private (or more specifically, is listed as
an automounted filesystem by the mount command)

A real example of a mount output is:

# mount
/dev/disk0s2 on / (local, journaled)
devfs on /dev (local)
fdesc on /dev (union)
<volfs> on /.vol
automount -nsl [191] on /Network (automounted)
automount -fstab [195] on /automount/Servers (automounted)
automount -static [195] on /automount/static (automounted)
linkstation.local.:/LinkStation on /private/var/automount/Network/My
Network/LinkStation NFS (nodev, nosuid, automounted)
linkstation:/LinkStation on /private/Network/Servers/linkstation/LinkStation
(automounted)

Possibly the CPAN module Mac-Carbon provides a more robust way of
determining that a directory is an automount farm. As things stand, the
Slimserver cannot support music on an automounted directory on Mac OS X and
on any other UNIX system where the automounter uses symlinks to the real
mount points.
Comment 1 Blackketter Dean 2007-12-29 07:19:52 UTC
Doesn't appear to be a significant user issue.
Comment 2 Chris Owens 2008-03-07 09:03:56 UTC
This bug is being closed since it was resolved for a version which is now released!  Please download the new version of SqueezeCenter (formerly SlimServer) at http://www.slimdevices.com/su_downloads.html

If you are still seeing this bug, please re-open it and we will consider it for a future release.