Frank Lahm [Wed, 14 Nov 2012 15:02:41 +0000 (16:02 +0100)]
Configurable symlink behaviour
Add a new volumes option 'followsymlinks' which modifies Netatalk's
handling of symlinks. Without the option (default behaviour) symlinks
are not followed by afpd.
Setting the volume option causes afpd to follow any symlink on the
server. symlinks may then point outside of the AFP volume, currently
afpd doesn't do any checks for "wide symlinks".
In order to provide a somewhat consistent interface, add an API
of o* function wrappers for filesytem related functions.
These functions take an an additonal option arg (hence the o) which
tells the functions whether symlinks shall be followed or not.
Ralph Boehme [Thu, 6 Dec 2012 08:55:53 +0000 (09:55 +0100)]
Fix an error where catalog search gave incomplete results
The bug was immediately solved when chaning the current implementation
of using the function dirlookup_bybath() with paths form the dirstack,
to dirlook() with dids stored in the dirstack.
Presumably something dirlookup_bybath() went wrong thus ceratain
folders weren't searched.
catsearch() used dirlookup() to lookup directories, but then it didn't
use movecwd() to cd into them, only lchdir(). This resulted in curdir
not being updated.
Then, while processing entries of directory and adding them to the
dircache, in case the dircache hit its maximum size limit, dircache
eviction would take place.
The dircache eviction will remove a fixed size number of directories
from the cache, but for every entry to be freed it will ensure that
it's nor curdir.
Unfortunately as catsearch didn't update that, the directory that
catsearch was working on was freed, which of course resulted in access
of invalid ressouces and possible crashes.
The fix is to just use movecwd() instead of lchdir()ing directly.
Frank Lahm [Fri, 17 Aug 2012 13:40:56 +0000 (15:40 +0200)]
Adjust loglevel
Running dbd on an active volume resulted in a diagnostic warning to be issued that the BerkeleyDB environmnet couldn't be removed.
This message is now only shown with -v.
Frank Lahm [Fri, 3 Aug 2012 06:01:07 +0000 (08:01 +0200)]
sendfile on Solaris may return EINTR with bytes written https://issues.apache.org/bugzilla/show_bug.cgi?id=44550 http://wesunsolve.net/bugid/id/6408517
Frank Lahm [Fri, 27 Jul 2012 10:01:35 +0000 (12:01 +0200)]
Reset signal handlers and alarm timer after successfull PAM authentication
Fixes a problem with AFP disconnects caused by pam_smbpass.so messing with
our handlers and timer.
Frank Lahm [Wed, 20 Jun 2012 13:33:26 +0000 (15:33 +0200)]
Fix signal blocking, pthread_sigmask was called before mask initialisation. Also block all sigs instead of only SIGTERM (think I saw SIGHUP somewhere).
Frank Lahm [Tue, 15 May 2012 11:43:08 +0000 (13:43 +0200)]
Changed behaviour for TimeMachine volumes in case there's a problem
talking to the CNID daemons. Previously the volume was flagged read-only
and an AFP message was sent to the client. As this might result in
TimeMachine assuming the backup sparse bundle is damaged, we now just
switch the CNID database to an in-memory tdb without the additional stuff.
HAT [Mon, 2 Jan 2012 02:37:54 +0000 (11:37 +0900)]
filename should be compared using lower case.
Ref: Technical Note TN1150 - HFS Plus Volume Format
http://developer.apple.com/legacy/mac/library/#technotes/tn/tn1150.html#//apple_ref/doc/uid/DTS10002989
BUG: should be compared using NFKD for fuzzy search.
HAT [Tue, 20 Dec 2011 10:44:59 +0000 (19:44 +0900)]
NetBSD: Fix afpd startup script, from patch-bk,v 1.1
Adds command_args to startup script to write the pid file to /var/run
as intended. Apparently the lack of a pid file did not affect NetBSD's
ability to stop the daemon, but it did prevent it on DragonFly BSD.