New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeMachine volumes don't get a service announcement if they contain "$u" #90

Open
faceless2 opened this Issue Apr 25, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@faceless2

faceless2 commented Apr 25, 2017

If a TimeMachine volume is set up with "$u" in the path, it is not being added to the volume list: at the end of "readvolfile" (libatalk/util/netatalk_conf.c, around line 1226) we call realpath_safe, but as we're not doing any special handling of the "$u" variable in the path, this method invariably returns null and the path is not added to the volume linked list.

Later we traverse that list in etc/avahi/afp_avahi.c to look for time machine volumes, and we don't find any so we never announce the _adisk._tcp service, which means the clients can't see the folder.

I don't have a solution except to artificially create a folder that literally matches the path specified in the afp.conf - in my case, mkdir '/home/timemachine/$u'

This applies to 3.1.11 and head.

(aside: posted this on the netatalk sourceforge list before I saw this had moved to github. Would perhaps be useful to use one or the other issue lists, not both. I suspect I am not the first to suggest this)

@SuperShinyEyes

This comment has been minimized.

Show comment
Hide comment
@SuperShinyEyes

SuperShinyEyes Mar 4, 2018

In my case, I tried $u so that the config would be generic and
as I add new users to the system I wouldn't need to neither update
the config file nor reload Netatalk service.

However, I found that the variable/regex is not smart and I shouldn't
try to be smart. So now I just put username explicitly and restart the
service.

SuperShinyEyes commented Mar 4, 2018

In my case, I tried $u so that the config would be generic and
as I add new users to the system I wouldn't need to neither update
the config file nor reload Netatalk service.

However, I found that the variable/regex is not smart and I shouldn't
try to be smart. So now I just put username explicitly and restart the
service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment