]> arthur.barton.de Git - netatalk.git/log
netatalk.git
9 years agoautoconf: Indentation fixes v3.1-cleanup
Alexander Barton [Sun, 6 Jan 2013 16:40:25 +0000 (17:40 +0100)]
autoconf: Indentation fixes

9 years agoSpelling fixes
Alexander Barton [Sun, 6 Jan 2013 16:15:34 +0000 (17:15 +0100)]
Spelling fixes

9 years agoWhitespace and exclamation mark fixes
Alexander Barton [Sun, 6 Jan 2013 16:15:23 +0000 (17:15 +0100)]
Whitespace and exclamation mark fixes

9 years agoRelease: 3.1.7
Ralph Boehme [Fri, 28 Nov 2014 12:20:38 +0000 (13:20 +0100)]
Release: 3.1.7

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoCNID/mysql: fix volume table name generation from UUID, bug #566
Ralph Boehme [Wed, 19 Nov 2014 15:28:51 +0000 (16:28 +0100)]
CNID/mysql: fix volume table name generation from UUID, bug #566

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agocnid_metad: fix tsockfd_create() return value on error
Justin Maggard [Mon, 10 Nov 2014 23:28:17 +0000 (15:28 -0800)]
cnid_metad: fix tsockfd_create() return value on error

We ran into a case where the netatalk log grew at an extremely rapid
pace.  There was one message that kept repeating:

cnid_metad[2528] {usockfd.c:169} (E:CNID): error in accept: Socket
operation on non-socket

An strace showed pselect() getting called on stdin, rather than an
actual socket.  Looking at the code, I see that tsockfd_create() will
return 0 instead of -1 if the call to getaddrinfo() fails, which is
obviously wrong.

Reviewed-by: Ralph Boehme <slow@samba.org>
9 years agoafpd: several ACL error messages now logged with loglevel debug
Ralph Boehme [Wed, 5 Nov 2014 03:23:01 +0000 (04:23 +0100)]
afpd: several ACL error messages now logged with loglevel debug

Signed-off-by: Ralph Boehme <slow@samba.org>
9 years agoafpd: fix unbecome_root()
Ralph Boehme [Tue, 4 Nov 2014 21:33:33 +0000 (22:33 +0100)]
afpd: fix unbecome_root()

Reloading logging config may result in privilege escalation in afpd
processes.

Signed-off-by: Ralph Boehme <slow@samba.org>
9 years agolibatalk: ABI: add abi-clean target
Ralph Boehme [Tue, 4 Nov 2014 21:29:34 +0000 (22:29 +0100)]
libatalk: ABI: add abi-clean target

Signed-off-by: Ralph Boehme <slow@samba.org>
9 years agoSpotlight: Limiting searches to subfolders, bug #581
Ralph Boehme [Mon, 6 Oct 2014 14:05:22 +0000 (16:05 +0200)]
Spotlight: Limiting searches to subfolders, bug #581

Netatalk didn't use the kMDScopeArray Spotlight query
attribute. Instead the volume path was passed to the SPARQL query
mapper.

Simple fix: pass the kMDScopeArray value instead of the volume path.

Signed-off-by: Ralph Boehme <slow@samba.org>
9 years agoafpd: umask handling, bug #576
Ralph Boehme [Wed, 24 Sep 2014 13:25:09 +0000 (15:25 +0200)]
afpd: umask handling, bug #576

Authored-by: Rasmus Borup Hansen <rbh@intomics.com>
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agodbd: add missing return value
Ralph Boehme [Wed, 24 Sep 2014 13:04:53 +0000 (15:04 +0200)]
dbd: add missing return value

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agonetatalk: ad missing event_del() for SIGHUP
Ralph Boehme [Wed, 24 Sep 2014 12:59:25 +0000 (14:59 +0200)]
netatalk: ad missing event_del() for SIGHUP

This was missing in commit 47de27c3b1bec126c2343709a884f9882fab97a6,
fix for bug #579.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agotypo
HAT [Tue, 23 Sep 2014 13:33:52 +0000 (22:33 +0900)]
typo

9 years agoHandling of malformed UTF8 strings, bug #524
HAT [Tue, 23 Sep 2014 13:00:32 +0000 (22:00 +0900)]
Handling of malformed UTF8 strings, bug #524

Authored-by: HAT <hat@fa2.so-net.ne.jp>
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: Solaris locking problem, bug #559
Ralph Boehme [Fri, 15 Aug 2014 08:46:48 +0000 (10:46 +0200)]
afpd: Solaris locking problem, bug #559

Authored-by: Peter Baranski
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agonetatalk: fix SIGHUP handling, bug #579
Ralph Boehme [Wed, 17 Sep 2014 22:19:43 +0000 (00:19 +0200)]
netatalk: fix SIGHUP handling, bug #579

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: Return the correct error for non-existent volume
Ross Lagerwall [Sun, 31 Aug 2014 07:14:24 +0000 (08:14 +0100)]
afpd: Return the correct error for non-existent volume

Return kFPObjectNotFound rather than kFPParamErr when openvol() is
called with a non-existent volume.  This follows the specification and
Apple's implementation.

Signed-off-by: Ross Lagerwall <rosslagerwall@gmail.com>
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agonetatalk: fix a crash on Solaris when registering with mDNS branch-netatalk-3-1
Ralph Boehme [Fri, 29 Aug 2014 12:52:43 +0000 (14:52 +0200)]
netatalk: fix a crash on Solaris when registering with mDNS

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: enhance behaviour for long running queries
Ralph Boehme [Fri, 29 Aug 2014 08:58:51 +0000 (10:58 +0200)]
Spotlight: enhance behaviour for long running queries

Status code 35 is taken from an AFP packet capture.

Clients will now show a "progress wheel" while waiting for initial
results.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoVersion: 3.1.7dev
Ralph Boehme [Wed, 27 Aug 2014 06:43:39 +0000 (08:43 +0200)]
Version: 3.1.7dev

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoRelease: 3.1.6
Ralph Boehme [Wed, 27 Aug 2014 06:37:26 +0000 (08:37 +0200)]
Release: 3.1.6

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoNEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later
HAT [Fri, 22 Aug 2014 17:40:07 +0000 (02:40 +0900)]
NEW: configure option "--with-init-style=debian-systemd" for Debian 8 jessieand later

"--with-init-style=debian" is renamed "--with-init-style=debian-sysv".
NOTE: service dir is /lib/systemd/system, not /usr/lib/systemd/system.

9 years agolibatalk:config: deleting volumes
Ralph Boehme [Thu, 21 Aug 2014 09:48:03 +0000 (11:48 +0200)]
libatalk:config: deleting volumes

Removing a volume from config which happened to be the first in the
list of loaded volumes would result in the global volume handle be set
to NULL.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agonetatalk: refresh Zeroconf registration when receiving SIGHUP
Ralph Boehme [Thu, 14 Aug 2014 12:37:04 +0000 (14:37 +0200)]
netatalk: refresh Zeroconf registration when receiving SIGHUP

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: distribute SIGHUP from parent afpd to children and force share reload
Ralph Boehme [Thu, 14 Aug 2014 11:45:06 +0000 (13:45 +0200)]
afpd: distribute SIGHUP from parent afpd to children and force share reload

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agodoc: expand afp.conf 'chmod request' description
Ralph Boehme [Wed, 20 Aug 2014 20:07:02 +0000 (22:07 +0200)]
doc: expand afp.conf 'chmod request' description

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: fix for long running queries
Ralph Boehme [Thu, 14 Aug 2014 15:29:00 +0000 (17:29 +0200)]
Spotlight: fix for long running queries

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: autoconf check: remove tracker-miner remnants
Ralph Boehme [Tue, 12 Aug 2014 11:23:42 +0000 (13:23 +0200)]
Spotlight: autoconf check: remove tracker-miner remnants

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoBump version to 3.1.6dev
Ralph Boehme [Tue, 12 Aug 2014 09:33:37 +0000 (11:33 +0200)]
Bump version to 3.1.6dev

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoRelease: 3.1.5
Ralph Boehme [Tue, 12 Aug 2014 09:28:16 +0000 (11:28 +0200)]
Release: 3.1.5

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: call g_type_init() if glib is older then 2.36
Ralph Boehme [Mon, 11 Aug 2014 14:29:17 +0000 (16:29 +0200)]
Spotlight: call g_type_init() if glib is older then 2.36

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: remove now unused file slmod_sparql.c
Ralph Boehme [Mon, 11 Aug 2014 14:10:47 +0000 (16:10 +0200)]
Spotlight: remove now unused file slmod_sparql.c

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: support for OS X 10.6 clients
Ralph Boehme [Mon, 11 Aug 2014 05:23:31 +0000 (07:23 +0200)]
Spotlight: support for OS X 10.6 clients

10.6 clients seem to use simple "=" instead of "==" in equality tests
in queries.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: move mDNS service registration to netatalk process
Ralph Boehme [Fri, 8 Aug 2014 13:25:37 +0000 (15:25 +0200)]
afpd: move mDNS service registration to netatalk process

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: when to call tracker_sparql_cursor_next_async()
Ralph Boehme [Sat, 9 Aug 2014 06:26:15 +0000 (08:26 +0200)]
Spotlight: when to call tracker_sparql_cursor_next_async()

No need to call tracker_sparql_cursor_next_async() if the queue is in
SLQ_STATE_RESULTS state, as then the cursor callback will already have
called it in order to request more results.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: more logging
Ralph Boehme [Fri, 8 Aug 2014 15:13:10 +0000 (17:13 +0200)]
Spotlight: more logging

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: change 'bad function' log message to maxdebug level
Ralph Boehme [Fri, 8 Aug 2014 13:20:50 +0000 (15:20 +0200)]
afpd: change 'bad function' log message to maxdebug level

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: fix async query close
Ralph Boehme [Fri, 8 Aug 2014 12:14:47 +0000 (14:14 +0200)]
Spotlight: fix async query close

* use state flags for marking closed queries
* don't use GCancellables

Additionally add lots of debugging.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: move init to the right place
Ralph Boehme [Fri, 8 Aug 2014 11:58:08 +0000 (13:58 +0200)]
Spotlight: move init to the right place

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSpotlight: only destroy queries that have beed marked
Ralph Boehme [Thu, 7 Aug 2014 14:59:56 +0000 (16:59 +0200)]
Spotlight: only destroy queries that have beed marked

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoafpd: SIGCHLD, not SIGCLD
Ralph Boehme [Thu, 7 Aug 2014 11:17:40 +0000 (13:17 +0200)]
afpd: SIGCHLD, not SIGCLD

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoBump version to 3.1.5dev
Ralph Boehme [Thu, 7 Aug 2014 09:08:39 +0000 (11:08 +0200)]
Bump version to 3.1.5dev

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoAdd ABI file for 3.1.4
Ralph Boehme [Thu, 7 Aug 2014 08:57:38 +0000 (10:57 +0200)]
Add ABI file for 3.1.4

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoUpdate manpages
Ralph Boehme [Thu, 7 Aug 2014 08:57:18 +0000 (10:57 +0200)]
Update manpages

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoFixes for make distcheck
Ralph Boehme [Thu, 7 Aug 2014 08:56:14 +0000 (10:56 +0200)]
Fixes for make distcheck

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoBump version to 3.1.4
Ralph Boehme [Thu, 7 Aug 2014 08:26:09 +0000 (10:26 +0200)]
Bump version to 3.1.4

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoPrepare 3.1.4 release notes
Ralph Boehme [Thu, 7 Aug 2014 08:21:08 +0000 (10:21 +0200)]
Prepare 3.1.4 release notes

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoadd two missing volume attribute bits from AFP spec
HAT [Wed, 6 Aug 2014 13:59:30 +0000 (22:59 +0900)]
add two missing volume attribute bits from AFP spec

9 years agonew option "case sensitive = yes|no", FR #62.
HAT [Wed, 6 Aug 2014 13:23:08 +0000 (22:23 +0900)]
new option "case sensitive = yes|no", FR #62.

In spite of being case sensitive as a matter of fact, netatalk
3.1.3 and earlier did not notify kCaseSensitive flag to the client.
Now, it is notified correctly by default.

9 years agoSpotlight: use async Tracker SPARQL API master
Ralph Boehme [Tue, 5 Aug 2014 11:14:21 +0000 (13:14 +0200)]
Spotlight: use async Tracker SPARQL API

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agologger: remove flood protection and allocate messages
Ralph Boehme [Tue, 5 Aug 2014 13:30:20 +0000 (15:30 +0200)]
logger: remove flood protection and allocate messages

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoMerge remote-tracking branch 'origin/branch-netatalk-3-1'
Ralph Boehme [Fri, 1 Aug 2014 16:19:10 +0000 (18:19 +0200)]
Merge remote-tracking branch 'origin/branch-netatalk-3-1'

9 years agoafpd: check for modified included config file, FR #95
Ralph Boehme [Fri, 1 Aug 2014 14:09:03 +0000 (16:09 +0200)]
afpd: check for modified  included config file, FR #95

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoMerge remote-tracking branch 'origin/branch-netatalk-3-1'
Ralph Boehme [Fri, 1 Aug 2014 14:19:01 +0000 (16:19 +0200)]
Merge remote-tracking branch 'origin/branch-netatalk-3-1'

9 years agofce: afpd: fix event names array
Ralph Boehme [Mon, 21 Jul 2014 15:31:00 +0000 (17:31 +0200)]
fce: afpd: fix event names array

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agofce: fix event id increment
Ralph Boehme [Mon, 21 Jul 2014 15:30:07 +0000 (17:30 +0200)]
fce: fix event id increment

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agofce: afpd: missing includes and fix SIGCLD handler argument list
Ralph Boehme [Mon, 21 Jul 2014 15:28:10 +0000 (17:28 +0200)]
fce: afpd: missing includes and fix SIGCLD handler argument list

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoman: afp.conf: "fce version" option
Ralph Boehme [Mon, 21 Jul 2014 15:16:45 +0000 (17:16 +0200)]
man: afp.conf: "fce version" option

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agodist: add missing file abigen.sh
Ralph Boehme [Fri, 18 Jul 2014 07:57:14 +0000 (09:57 +0200)]
dist: add missing file abigen.sh

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agofce: FCE version 2 with new event types and new config options
Ralph Boehme [Tue, 15 Jul 2014 23:16:33 +0000 (01:16 +0200)]
fce: FCE version 2 with new event types and new config options

* new events: fmov,dmov,login and logout
* removed event: tmsz
* new options: "fce ignore names" and "fce notify script"

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoWriting metadata xattr on directories with sticky bit set, FR#94
Ralph Boehme [Wed, 25 Jun 2014 09:46:03 +0000 (11:46 +0200)]
Writing metadata xattr on directories with sticky bit set, FR#94

Even though we may have write access to a directory, if the sticky bit
is set only the owner is allowed to write xattrs.

Add an option that enables behaviour to set the xattr as root, using
the fact that we can distinguish between a failing xattr set request
due to insufficient permissions (EACCES) or the sticky bit (EPERM):

  force xattr with sticky bit = yes|no (default: no)

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoconfig: add utility function vdgoption_bool()
Ralph Boehme [Thu, 10 Jul 2014 15:59:53 +0000 (17:59 +0200)]
config: add utility function vdgoption_bool()

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agolibrary versioning: update to 16:0:0
Ralph Boehme [Sat, 5 Jul 2014 06:43:12 +0000 (08:43 +0200)]
library versioning: update to 16:0:0

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoHangs in Netatalk which causes it to stop responding to connections
Ralph Boehme [Sat, 5 Jul 2014 06:14:41 +0000 (08:14 +0200)]
Hangs in Netatalk which causes it to stop responding to connections

Hangs in Netatalk which causes it to stop responding to
connections. The master afpd process gets stuck in a poll loop, being
repeatedly notified that there are connections on its socket, but
never actually doesn anything with them.

Analysis with gdb revealed that the dat astructure dealing with the
main AFP socket and the IPC client sockets was smashed. This could
happen because the function fdset_add_fd() doesn't do bound checking
itself but relied on other parts of the code that enforce a connection
limit. Unfortunately, for low-level AFP connections that don't result
in a full AFP login these checks come too late resulting in a buffer
overflow.

Add a bound check. While we're at it, rewrite the fdset code to use a
full blown data structure 'struct asev' encapsultating the
implementation details.

Fixes bug #572.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoversion: 3.1.4dev
Ralph Boehme [Thu, 3 Jul 2014 11:00:20 +0000 (13:00 +0200)]
version: 3.1.4dev

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoRelease: version 3.1.3
Ralph Boehme [Thu, 3 Jul 2014 07:59:12 +0000 (09:59 +0200)]
Release: version 3.1.3

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoabigen: fix for gdb syms error
Ralph Boehme [Thu, 3 Jul 2014 07:57:42 +0000 (09:57 +0200)]
abigen: fix for gdb syms error

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agogitignore: test-driver
Ralph Boehme [Thu, 3 Jul 2014 05:54:20 +0000 (07:54 +0200)]
gitignore: test-driver

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agomanpages: generate from XML
Ralph Boehme [Thu, 3 Jul 2014 05:46:47 +0000 (07:46 +0200)]
manpages: generate from XML

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoAdd advanced option "chmod request" controlling ACLs
Ralph Boehme [Tue, 24 Jun 2014 16:25:15 +0000 (18:25 +0200)]
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>
9 years agoUse realpath_safe() for getting the absolute path
Ralph Boehme [Tue, 24 Jun 2014 08:44:47 +0000 (10:44 +0200)]
Use realpath_safe() for getting the absolute path

Authored-by: gaaronk
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agoad: path detection in getvolbypath(), bug #570
Ralph Boehme [Fri, 20 Jun 2014 09:54:34 +0000 (11:54 +0200)]
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>
9 years agoResource fork conversion from AppleDouble v2 broken, bug #568
Ralph Boehme [Sun, 15 Jun 2014 04:07:10 +0000 (06:07 +0200)]
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>
9 years agoMerge branch 'branch-netatalk-3-1' of netafp.com:git/netatalk into branch-netatalk-3-1
Ralph Boehme [Wed, 18 Jun 2014 15:00:36 +0000 (17:00 +0200)]
Merge branch 'branch-netatalk-3-1' of netafp.com:git/netatalk into branch-netatalk-3-1

Conflicts:
NEWS

9 years agoFix a crash when accessing ._ files, bug #564
Ralph Boehme [Wed, 18 Jun 2014 14:54:24 +0000 (16:54 +0200)]
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>
9 years agoNEWS: Fix FR number
Ralph Boehme [Wed, 18 Jun 2014 14:26:51 +0000 (16:26 +0200)]
NEWS: Fix FR number

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoDelete 0 byte size resource fork ._ files
Ralph Boehme [Thu, 12 Jun 2014 20:40:23 +0000 (22:40 +0200)]
Delete 0 byte size resource fork ._ files

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

9 years agoRefactoring: move forkpath computation to function scope
Ralph Boehme [Thu, 12 Jun 2014 20:24:42 +0000 (22:24 +0200)]
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

9 years agoRefactoring: move struct dir and dirlookup() to function scope
Ralph Boehme [Thu, 12 Jun 2014 19:53:17 +0000 (21:53 +0200)]
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

9 years agoMemory overflow caused by 'basedir regex', bug #567
Ralph Boehme [Tue, 17 Jun 2014 17:25:45 +0000 (19:25 +0200)]
Memory overflow caused by 'basedir regex', bug #567

Authored-by: Takao Shimayoshi
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agoUpdate Unicode support to version 7.0.0
Ralph Boehme [Tue, 17 Jun 2014 16:55:02 +0000 (18:55 +0200)]
Update Unicode support to version 7.0.0

Authored-by: HAT <hat@fa2.so-net.ne.jp>
Reviewed-by: Ralph Boehme <rb@sernet.de>
9 years agoUnarchiving certain ZIP archives fails, bug #569
Ralph Boehme [Tue, 17 Jun 2014 15:02:20 +0000 (17:02 +0200)]
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>
9 years agofix typo
HAT [Thu, 5 Jun 2014 15:40:45 +0000 (00:40 +0900)]
fix typo

9 years agoSpotlight: "spotlight expr = false" broke the default Spotlight query
Ralph Boehme [Wed, 4 Jun 2014 20:42:37 +0000 (22:42 +0200)]
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>
9 years agoSpotlight: new options for controlling query behaviour
Ralph Boehme [Wed, 4 Jun 2014 14:36:58 +0000 (16:36 +0200)]
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>
9 years agoSpotlight: SPARQL query optimisations
Ralph Boehme [Wed, 4 Jun 2014 10:11:40 +0000 (12:11 +0200)]
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>
9 years agoBump version to 3.1.3dev
Ralph Boehme [Wed, 4 Jun 2014 08:28:19 +0000 (10:28 +0200)]
Bump version to 3.1.3dev

9 years agoRemove uniconv
Ralph Boehme [Tue, 3 Jun 2014 11:56:54 +0000 (13:56 +0200)]
Remove uniconv

9 years agoPrepare 3.1.2 releas
Ralph Boehme [Tue, 3 Jun 2014 11:50:39 +0000 (13:50 +0200)]
Prepare 3.1.2 releas

9 years agoAdd generated files from yacc and flex
Ralph Boehme [Tue, 3 Jun 2014 07:45:26 +0000 (09:45 +0200)]
Add generated files from yacc and flex

9 years agoSpotlight: SPARQL query optimisation
Ralph Boehme [Tue, 3 Jun 2014 07:41:25 +0000 (09:41 +0200)]
Spotlight: SPARQL query optimisation

Avoid DISTINCT in SPARQL queries and add a LIMIT which is arbitrarily
set to 100 for now.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoNew options that control whether dbus and Tracker are started
Ralph Boehme [Thu, 22 May 2014 11:16:02 +0000 (13:16 +0200)]
New options that control whether dbus and Tracker are started

'start dbus' and 'start tracker', both default to yes, FR#91

Signed-off-by: Ralph Boehme <sloowfranklin@gmail.com>
9 years agofd leak when using appledouble = v2, bug #554
Ralph Boehme [Wed, 21 May 2014 14:59:38 +0000 (16:59 +0200)]
fd leak when using appledouble = v2, bug #554

With appledouble = v2 in afp.conf there is an fd leak in certain
circumstances while using the Finder, from Daniel Hazelbaker.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agogetvolbypath returns incorrect volume, bug #563
Ralph Boehme [Wed, 21 May 2014 14:42:58 +0000 (16:42 +0200)]
getvolbypath returns incorrect volume, bug #563

getvolbypath() would match a given path "/foo/barbaz" with an existing
volume path of "/foo/bar" because the strings where compared with
strnlen() where n is the length of "/foo/bar", ie we did a substring
match.

I faintly remember there was a reason for this, but I couldn't come up
with any sensible configuration of usage of dbd that would not also
work by simply using strcmp() instead of strmcmp().

Of course, in order for dbd to work with paths that included a
trailing slash, there's a need to adding some slash stripping code,
because our code (somehow) ensures (hopefully!) that in struct
vol.v_path is always stored with trailinsh slashes stripped.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agodbd: two fixes for new user option
Ralph Boehme [Wed, 30 Apr 2014 12:47:20 +0000 (14:47 +0200)]
dbd: two fixes for new user option

* initialize user variable with NULL
* add -u to option summary line

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoSupport for using $u username variable in AFP volume definitions
Ralph Boehme [Wed, 19 Feb 2014 15:19:42 +0000 (16:19 +0100)]
Support for using $u username variable in AFP volume definitions

* Prepare CNID backend dbd for user variable expansion
* Store a struct vol pointer in the CNID db handles.
* Pass three arguments to the CNID daemon:
  - the afp.conf volume section name
  - the volume path
  - an optional username

* Rename several struct elements by prefixing them with a struct tag,
  helps catching bad or missing assignments.

* Disable uniconv, doesn't use laod_volumes() and thus wont work with
  the new CNID dbd backend.

From FR#90.

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoxattrs on BSD, bug #562
Ralph Boehme [Tue, 20 May 2014 16:27:55 +0000 (18:27 +0200)]
xattrs on BSD, bug #562

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoquotas: improve Linux quota behaviour
Ralph Boehme [Wed, 30 Apr 2014 12:33:58 +0000 (14:33 +0200)]
quotas: improve Linux quota behaviour

Signed-off-by: Ralph Boehme <rb@sernet.de>
9 years agoMerge branch 'sharemodes-bug560' into branch-netatalk-3-1
Ralph Boehme [Tue, 20 May 2014 15:50:11 +0000 (17:50 +0200)]
Merge branch 'sharemodes-bug560' into branch-netatalk-3-1