Bump version to 3.1.3dev
Spotlight: SPARQL query optimisations

Use tracker:uri-is-descendant FILTER instead of regex for filtering
results on the base path of the volume.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Spotlight: new options for controlling query behaviour

Add three options that allow fine grainted control over the resulting
SPARQL queries:

"sparql results limit = NUMBER", default is unlimited
Useful for limiting the result set for very large systems

"spotlight attributes = STRING", useful for limiting queries to
attributes that are indexed, many are not.

"spotlight expr = BOOLEAN", default: yes, useful for disabling the use
of complex queries that will take too long to complete and hang Tracker.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Spotlight: "spotlight expr = false" broke the default Spotlight query

The default Spotlight query a Mac uses is

  *=="test*"cwd || kMDItemTextContent=="test*"cwd

which is of course using a logic expression. The parser has an extra
rule for catching this (MATCH or MATCH) for the purpose of munging
both expression into a single fts:match SPARQL query. Which means
we shouldn't check whether logic expressions are enabled or not.

Signed-off-by: Ralph Boehme <rb@sernet.de>
fix typo
Unarchiving certain ZIP archives fails, bug #569

The current code that checks whether the client is allowed to use
pathnames starting with ._ checks whether the file is an AppleDouble
file, and if it is and the filler does not contain the magic string
"Mac OS X", access to the file is denied. This results in the
following sequence of steps:

* client created empty file "._NAME"
* client wants to stat the newly created file "._NAME"
* server checks whether access to the file is allowed
* check fails

Modify check in ad_valid_header_osx() to allow access to all .-
AppleDouble files where the filler string is not "Netatalk", which is
the magic string Netatalk puts there.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Update Unicode support to version 7.0.0

Authored-by: HAT <hat@fa2.so-net.ne.jp>
Reviewed-by: Ralph Boehme <rb@sernet.de>
Memory overflow caused by 'basedir regex', bug #567

Authored-by: Takao Shimayoshi
Reviewed-by: Ralph Boehme <rb@sernet.de>
Refactoring: move struct dir and dirlookup() to function scope

Preperation for new feature to delete zero byte sized resource forks.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Change-Id: ef5f88f5f2cefa75cf20d0ee447b4e20579a2f12
Refactoring: move forkpath computation to function scope

Preperation for new feature to delete zero byte sized resource forks.

Signed-off-by: Ralph Boehme <rb@sernet.de>
Change-Id: ef5f88f5f2cefa75cf20d0ee447b4e20579a2f12
Delete 0 byte size resource fork ._ files

Signed-off-by: Ralph Boehme <rb@sernet.de>
Change-Id: ef5f88f5f2cefa75cf20d0ee447b4e20579a2f12
NEWS: Fix FR number

Signed-off-by: Ralph Boehme <rb@sernet.de>
Fix a crash when accessing ._ files, bug #564

At least FreeBSD is picky in that it requires PROT_READ if we're going
to read a mmap()ed memory region mapped, only specifying PROT_WRITE
doesn't imply PROT_READ. Other OSen seem to handle this differently.

Also add a missing pointer reinitialisation to the buf pointer.

Reported-by: Sean Eric Fagan
Signed-off-by: Ralph Boehme <rb@sernet.de>
Merge branch 'branch-netatalk-3-1' of netafp.com:git/netatalk into branch-netatalk-3-1

Conflicts:
	NEWS
Resource fork conversion from AppleDouble v2 broken, bug #568

Converting from AppleDouble v2 to ea may corrupt the resource fork. In
some circumstances an offset calculation is wrong resulting in corrupt
resource forks after the conversion.

Ensure the resource fork AppleDouble entry offset is always set up and
we don't rely on the manual offset calculation.

Skip ADEID_RFORK in ad_copy_header() and allow copying of AppleDouble
entry that have an initial zero size in the destination adouble.

Signed-off-by: Ralph Boehme <rb@sernet.de>
ad: path detection in getvolbypath(), bug #570

The fix for bug #563 broke ad file utilities, bug #570.

Authored-by: gaaronk
Reviewed-by: Ralph Boehme <rb@sernet.de>
Use realpath_safe() for getting the absolute path

Authored-by: gaaronk
Reviewed-by: Ralph Boehme <rb@sernet.de>
Add advanced option "chmod request" controlling ACLs

chmod request = ignore | preserve (default) | simple

* ignore = UNIX chmod() requests are completely ignored
* preserve = preserve ZFS ACEs for named users and groups or POSIX ACL
  group mask
* simple = just to a chmod() as requested without any extra steps

Signed-off-by: Ralph Boehme <rb@sernet.de>
manpages: generate from XML

Signed-off-by: Ralph Boehme <rb@sernet.de>
gitignore: test-driver

Signed-off-by: Ralph Boehme <rb@sernet.de>