]> arthur.barton.de Git - netatalk.git/log
netatalk.git
11 years agoafpd/volume: don't leak vol_mname in afp_openvol
Riccardo Magliocchetti [Fri, 1 Feb 2013 18:21:01 +0000 (19:21 +0100)]
afpd/volume: don't leak vol_mname in afp_openvol

Reported as Coverity by CID #201201

11 years agoMerge pull request #13 from hat001/dbdshowpath
franklahm [Thu, 31 Jan 2013 16:21:36 +0000 (08:21 -0800)]
Merge pull request #13 from hat001/dbdshowpath

dbd command show path

11 years agodbd command show path
HAT [Wed, 30 Jan 2013 16:06:57 +0000 (01:06 +0900)]
dbd command show path

dbd command show path #2 (use fullpathname)

11 years agoIncrease default DSI blocksize to 1 MB, taken from 10.8 AFP server
Ralph Boehme [Thu, 24 Jan 2013 18:00:23 +0000 (19:00 +0100)]
Increase default DSI blocksize to 1 MB, taken from 10.8 AFP server

11 years agoIgnore develop abi file
Frank Lahm [Mon, 21 Jan 2013 17:47:50 +0000 (18:47 +0100)]
Ignore develop abi file

11 years agoSet version to 3.0.3dev
Frank Lahm [Mon, 21 Jan 2013 17:43:09 +0000 (18:43 +0100)]
Set version to 3.0.3dev

11 years agoMerge 3.0.2 release branch
Frank Lahm [Mon, 21 Jan 2013 17:29:41 +0000 (18:29 +0100)]
Merge 3.0.2 release branch

11 years agoAdd 3.0.2 ABI file and set library version
Frank Lahm [Mon, 21 Jan 2013 17:16:01 +0000 (18:16 +0100)]
Add 3.0.2 ABI file and set library version

11 years agoSet version to 3.0.2
Frank Lahm [Mon, 21 Jan 2013 17:10:34 +0000 (18:10 +0100)]
Set version to 3.0.2

11 years agoUpdate NEWS
Ralph Boehme [Mon, 21 Jan 2013 16:50:04 +0000 (17:50 +0100)]
Update NEWS

11 years agodbd failed to convert appledouble files of symlinks
Ralph Boehme [Mon, 21 Jan 2013 14:06:39 +0000 (15:06 +0100)]
dbd failed to convert appledouble files of symlinks

dbd simply skipped symlinks, fix this by possibly deleting the
appledouble file but still skip the CNID checks.

Also remove left-over rebuild db stuff which isn't used anymore since
the large dbd rewrite at 4913dbbc5b69642dacbe7302fc25d25f47e9c00c.

Fixes #490.

11 years agoMultiple fixes and new manpage extmap.conf
Ralph Boehme [Sat, 19 Jan 2013 17:28:40 +0000 (18:28 +0100)]
Multiple fixes and new manpage extmap.conf

11 years agoFix extension mapping
Ralph Boehme [Wed, 16 Jan 2013 16:34:32 +0000 (17:34 +0100)]
Fix extension mapping

Extension mapping did only work for files with a valid metadata EA.
Fixed in #487.

11 years agoFix conditional
Ralph Boehme [Wed, 16 Jan 2013 10:00:58 +0000 (11:00 +0100)]
Fix conditional

Fix conditional compilation checks introduced in
4f6fbcfc5f685bfd67a69e014eb18df4d984ae36.

11 years agoAutomatic AppleDouble conversion to EAs failing for directories
Ralph Boehme [Mon, 14 Jan 2013 14:13:12 +0000 (15:13 +0100)]
Automatic AppleDouble conversion to EAs failing for directories

of_stat() need be called before calling ad_convert() in order to
have a valid struct stat of the element to be converted.
Fixes bug #486.

11 years agoautoconf: Indentation fixes v3-cleanup
Alexander Barton [Sun, 6 Jan 2013 16:40:25 +0000 (17:40 +0100)]
autoconf: Indentation fixes

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

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

11 years agoCheck for KerberosV API funcs krb5_free_keytab_entry_contents and krb5_kt_free_entry
Frank Lahm [Mon, 17 Dec 2012 09:49:51 +0000 (10:49 +0100)]
Check for KerberosV API funcs krb5_free_keytab_entry_contents and krb5_kt_free_entry

11 years agoImport from Docbook
Ralph Boehme [Sat, 12 Jan 2013 12:39:59 +0000 (13:39 +0100)]
Import from Docbook

11 years agoConsolidate all Netatalk specific conversion in pull_charset_flags()
Frank Lahm [Mon, 31 Dec 2012 13:50:50 +0000 (14:50 +0100)]
Consolidate all Netatalk specific conversion in pull_charset_flags()

Netatalk specific conversion like '/' <-> ':' and CAP de-/encoding
was performed partially in pull_charset_flags() and push_charset_flags().
The resulting code was unmaintainable and as a result it failed to
to the proper conversion of ':' to '/' for an UTF8 -> UTF8-MAC
conversion.

Moving all Netatalk specific conversion to pull_charset_flags()
we can now easily do the necessary conversion in one place.

* ":xx" CAP sequences are decoded if CONV_UNESCAPEHEX is used
* ':' and '/' are CAP encoded if CONV_ESCAPEHEX is used
* ':' is converted to '/' only for a conversion whos target charset
  is UTF8-MAC and whos source charset is NOT UTF8-MAC
* '/' is converted to ':' only for a conversion whos source charset
  is UTF8-MAC and whos target charset is NOT UTF8-MAC
* a leading '.' is CAP encoded if CONV_ESCAPEDOTS is used

This consolidation obsoletes both CONV_ALLOW_COLON and CONV_ALLOW_SLASH
conversion options.

11 years agoRemove CVS keywords
Frank Lahm [Fri, 4 Jan 2013 14:46:34 +0000 (15:46 +0100)]
Remove CVS keywords

11 years agoRemove 'duplicated volumes paths'
Ralph Boehme [Thu, 3 Jan 2013 17:34:48 +0000 (18:34 +0100)]
Remove 'duplicated volumes paths'

11 years agorights was removed in warnings cleanup
Ralph Boehme [Thu, 3 Jan 2013 12:44:59 +0000 (13:44 +0100)]
rights was removed in warnings cleanup

11 years agoRemove MAP_FILE
Ralph Boehme [Thu, 3 Jan 2013 12:42:22 +0000 (13:42 +0100)]
Remove MAP_FILE

11 years agoFix compiler diagnostics
Frank Lahm [Thu, 3 Jan 2013 12:27:20 +0000 (13:27 +0100)]
Fix compiler diagnostics

11 years agoAdd correct copyright and license
Frank Lahm [Thu, 3 Jan 2013 12:19:41 +0000 (13:19 +0100)]
Add correct copyright and license

11 years agoComparison, not assignment
Frank Lahm [Thu, 3 Jan 2013 12:17:48 +0000 (13:17 +0100)]
Comparison, not assignment

11 years agoOn the hunt for fixing all warnings
Frank Lahm [Wed, 2 Jan 2013 18:38:57 +0000 (19:38 +0100)]
On the hunt for fixing all warnings

11 years agoFix several warnings, remove const
Ralph Boehme [Wed, 2 Jan 2013 18:18:32 +0000 (19:18 +0100)]
Fix several warnings, remove const

11 years agoAdd copyright and license and config.h
Ralph Boehme [Wed, 2 Jan 2013 17:51:36 +0000 (18:51 +0100)]
Add copyright and license and config.h

11 years agoRemove const from path
Ralph Boehme [Wed, 2 Jan 2013 17:49:21 +0000 (18:49 +0100)]
Remove const from path

11 years agoInclude config.h
Ralph Boehme [Wed, 2 Jan 2013 17:46:45 +0000 (18:46 +0100)]
Include config.h

11 years agoFix function definition, return type is pid_t
Ralph Boehme [Wed, 2 Jan 2013 17:42:06 +0000 (18:42 +0100)]
Fix function definition, return type is pid_t

11 years agoUse mkstemp instead of mktemp
Ralph Boehme [Wed, 2 Jan 2013 17:39:30 +0000 (18:39 +0100)]
Use mkstemp instead of mktemp

11 years agoForward declate struct vol
Ralph Boehme [Wed, 2 Jan 2013 17:28:37 +0000 (18:28 +0100)]
Forward declate struct vol

11 years agoCheck for memcpy and don't redefine if found
Ralph Boehme [Wed, 2 Jan 2013 17:09:51 +0000 (18:09 +0100)]
Check for memcpy and don't redefine if found

Spotted by cppcheck, from Riccardo Magliocchetti.

11 years agoFix O_NETATALK_ACL define in case ACL headers are not found
Ralph Boehme [Wed, 2 Jan 2013 17:07:50 +0000 (18:07 +0100)]
Fix O_NETATALK_ACL define in case ACL headers are not found

Spotted by cppcheck, from Riccardo Magliocchetti.

11 years agoInitialize CopyRootInfo in reinit_db
Ralph Boehme [Wed, 2 Jan 2013 15:07:15 +0000 (16:07 +0100)]
Initialize CopyRootInfo in reinit_db

Spotted by cppcheck, from Riccardo Magliocchetti.

11 years agoFix for adflags
Frank Lahm [Tue, 1 Jan 2013 20:57:58 +0000 (21:57 +0100)]
Fix for adflags

11 years agoFix several VFS inconsistencies
Frank Lahm [Wed, 2 Jan 2013 12:36:16 +0000 (13:36 +0100)]
Fix several VFS inconsistencies

acb180395693ed05a4e6a1edb6796c8e6f644a72 left several for_each_adouble()
calls broken.

11 years agoSimple fix, remove doubled colon from getopt string
Frank Lahm [Wed, 2 Jan 2013 11:07:36 +0000 (12:07 +0100)]
Simple fix, remove doubled colon from getopt string

11 years agostrdup optarg and add -m option for specifying the Mac charset
Frank Lahm [Wed, 2 Jan 2013 10:53:32 +0000 (11:53 +0100)]
strdup optarg and add -m option for specifying the Mac charset

11 years agoSet charset names
Frank Lahm [Sun, 30 Dec 2012 08:56:20 +0000 (09:56 +0100)]
Set charset names

11 years agoConfigurable symlink behaviour
Frank Lahm [Wed, 14 Nov 2012 15:02:41 +0000 (16:02 +0100)]
Configurable symlink behaviour

Add a new volumes option 'follow symlinks'. The default setting is
false, symlinks are not followed on the server. This is the same
behaviour as OS X's AFP server.
Setting the option to true causes afpd to follow symlinks on the
server. symlinks may 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.

11 years agoImport manpage from XML
Ralph Boehme [Thu, 27 Dec 2012 11:55:00 +0000 (12:55 +0100)]
Import manpage from XML

11 years agoRemove dupicate variable myvol, use vol instead
Ralph Boehme [Thu, 27 Dec 2012 11:54:27 +0000 (12:54 +0100)]
Remove dupicate variable myvol, use vol instead

11 years agoSeveral fixes
Ralph Boehme [Thu, 27 Dec 2012 11:45:22 +0000 (12:45 +0100)]
Several fixes

Allow the usage of -r option.
Fix flags argument to cnid_open().
Update usage.

11 years agoAdd dev to log message and print type as string
Ralph Boehme [Thu, 27 Dec 2012 11:44:43 +0000 (12:44 +0100)]
Add dev to log message and print type as string

11 years agoFix an error parsing afp.conf in the iniparser
Ralph Boehme [Fri, 21 Dec 2012 14:14:00 +0000 (15:14 +0100)]
Fix an error parsing afp.conf in the iniparser

Netatalk didn't start when the last line of the config file
afp.conf wasn't terminated by a newline. Fixes bug #476.

11 years agoUpdate news
Ralph Boehme [Wed, 19 Dec 2012 16:15:37 +0000 (17:15 +0100)]
Update news

11 years agoGet the db stamp in cnid_get_stamp()
Ralph Boehme [Tue, 11 Dec 2012 09:39:38 +0000 (10:39 +0100)]
Get the db stamp in cnid_get_stamp()

Previously we actually intersected the IPC call to get the db
stamp in transmit() when the firt actual CNID IPC function is
executed.

Drop the check for changed db stamps.

Add a simple function for the get stamp IPC stuff.

11 years agoRestructure opening and deleting the CNID dbs and CNID wraparound support
Ralph Boehme [Mon, 10 Dec 2012 17:38:07 +0000 (18:38 +0100)]
Restructure opening and deleting the CNID dbs and CNID wraparound support

If opening the db fails, delete it and recreate a new empty one.

Add handling of CNID overflow, ie when the last used CNID reaches
its maximum (UINT32_MAX), wrap around to CNID_START. This then neccesites
a modification to get_id() where we used to just increment the last
used CNID counter and use that as next CNID.
Now we need to ensure that it isn't already used in the db and keep
searching for an used in case it is in a loop.

Move locking function back to main.c, as it's only used by cnid_dbd.

Modify dbd_add() such that it can add an entry with the CNID passed
in from the client, the CNID hint read from the adouble file.

Invalidate CNID hint in case lookup detected a problem

11 years agoUse ad_getid() instead of ad_forcegetid()
Ralph Boehme [Mon, 10 Dec 2012 14:04:24 +0000 (15:04 +0100)]
Use ad_getid() instead of ad_forcegetid()

ad_getid() now ignores the db stamp when reading the CNID, so we
can simply use it instead of using ad_forcegetid().

11 years agoIgnore db stamp when reading CNID from adouble file
Ralph Boehme [Mon, 10 Dec 2012 13:55:41 +0000 (14:55 +0100)]
Ignore db stamp when reading CNID from adouble file

The db stamp (which is the ctime of the cnid2.db file stored in  the
db at creation time) may change when running `dbd -f` or when deleting
the CNID db manually. But we don't want to reassing CNIDs in this case
(changed stamp) we really want to keep it.

11 years agoRewrite dbd to use CNID IPC instead of opening the db directly
Ralph Boehme [Fri, 7 Dec 2012 17:33:32 +0000 (18:33 +0100)]
Rewrite dbd to use CNID IPC instead of opening the db directly

In order to fix buf #447 (race condition between dbd and cnid_dbd)
dbd must be converted to work over the network IPC channel with
cnid_dbd instead of directly working on the BerkeleyDB CNID database.

Add CNID db IPC command for wiping the db

11 years agoRemove special arg used by dbd of dbd_add() and dbd_lookup()
Ralph Boehme [Fri, 7 Dec 2012 17:32:13 +0000 (18:32 +0100)]
Remove special arg used by dbd of dbd_add() and dbd_lookup()

11 years agoInstall functional PAM config file to PAM include directory
Ralph Boehme [Mon, 17 Dec 2012 14:39:00 +0000 (15:39 +0100)]
Install functional PAM config file to PAM include directory

Install a PAM config file which includes the 'other' service.
Fixes bug #481.

11 years agoFix a possible crash when searching on large volumes
Ralph Boehme [Tue, 11 Dec 2012 12:42:12 +0000 (13:42 +0100)]
Fix a possible crash when searching on large volumes

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.

11 years agoRemove dequoting of double quotes in the iniparser, conflicts with strtok_quote()
Ralph Boehme [Tue, 11 Dec 2012 14:58:17 +0000 (15:58 +0100)]
Remove dequoting of double quotes in the iniparser, conflicts with strtok_quote()

11 years agoFix make distcheck
Ralph Boehme [Fri, 7 Dec 2012 09:02:25 +0000 (10:02 +0100)]
Fix make distcheck

11 years agoAdd support for quoting in '[in]valid users' option
Ralph Boehme [Thu, 6 Dec 2012 12:06:14 +0000 (13:06 +0100)]
Add support for quoting in '[in]valid users' option

As the option should allow spaces in names, but we use comma and
space as field delimiter, add support for quoting names.
Fixes bug #472.

11 years agoFix volume loading in afpd session
Ralph Boehme [Thu, 6 Dec 2012 12:03:28 +0000 (13:03 +0100)]
Fix volume loading in afpd session

Due to the changes in 59ba70c884ca7356e28873fccab7d3611369e6cc
(SIGHUP support), volumes were not reloaded in the afpd session
child.

11 years agoAdd utility function strtok_quote()
Ralph Boehme [Thu, 6 Dec 2012 09:56:33 +0000 (10:56 +0100)]
Add utility function strtok_quote()

11 years agoAdd a missing conditional compilation ifdef
Ralph Boehme [Thu, 6 Dec 2012 09:42:47 +0000 (10:42 +0100)]
Add a missing conditional compilation ifdef

11 years agoRevert c7683d5aae3d154250df531a5d34e4a464b5ced2
Ralph Boehme [Thu, 6 Dec 2012 09:29:01 +0000 (10:29 +0100)]
Revert c7683d5aae3d154250df531a5d34e4a464b5ced2

'valid users' option, cf #472.

11 years agoFix an error where catalog search gave incomplete results
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.

Fixes bug #479.

11 years agoDon't force errno ENOATTR on Solaris
Ralph Boehme [Wed, 5 Dec 2012 11:39:08 +0000 (12:39 +0100)]
Don't force errno ENOATTR on Solaris

11 years agoEnsure CNID info is set in metadata
Ralph Boehme [Wed, 5 Dec 2012 12:06:27 +0000 (13:06 +0100)]
Ensure CNID info is set in metadata

11 years agoEnhance log message
Ralph Boehme [Wed, 5 Dec 2012 11:38:09 +0000 (12:38 +0100)]
Enhance log message

11 years agoFix a log messsage
Ralph Boehme [Wed, 5 Dec 2012 10:26:09 +0000 (11:26 +0100)]
Fix a log messsage

11 years agoDont copy our metadata EA in copyfile()
Ralph Boehme [Tue, 4 Dec 2012 15:08:27 +0000 (16:08 +0100)]
Dont copy our metadata EA in copyfile()

Apparently Apple is now relying more on the AFP copyfile function
for file copies where source and destination are on the same vol.
The copying is done by our copyfile() function. It calls into
our VFS stack where in the end _all_ extended attributes of the
file, including our metadata EA, will be copied from source to
dest.
This resulted in an incorrect metadata EA on the destination file,
eg the CNID was still the one of the source file.
Obviously the metadata EA of the destination file must be created
such that all relevant fields are properly assigned.

Fixes bug #452.

11 years agoFix adouble refcounting
Ralph Boehme [Tue, 4 Dec 2012 14:58:51 +0000 (15:58 +0100)]
Fix adouble refcounting

Opening a file that doesn't have metadata with ADFLAGS_HF | AFFLAGS_NOHF
resulted in a successfull open (the error from the failed opening
of the nonexistent metadata is suppressed by AFFLAGS_NOHF), but
then the metadata refcount was increased becasue the error condition
was already reset to 0 at the place where we checked it.
Fixing this requires pushing the refcount increment deeper down the stack
into the individual functions where the error condition is still
available.

After fixing this, another bug became apparent in the mostyl empty
function ad_open_rf_v2().

Also fix an if check where what should be a comparison clobbered
a struct field.

11 years agosystemd service: show doc URL
HAT [Mon, 26 Nov 2012 16:11:33 +0000 (01:11 +0900)]
systemd service: show doc URL

ex.
netatalk.service - Netatalk AFP fileserver for Macintosh clients
          Loaded: loaded (/usr/lib/systemd/system/netatalk.service; disabled)
          Active: active (running) since Tue, 27 Nov 2012 01:03:44 +0900; 41s ago
            Docs: man:afp.conf(5)
                  man:netatalk(8)
                  man:afpd(8)
                  man:cnid_metad(8)
                  man:cnid_dbd(8)
                  http://netatalk.sourceforge.net/
         Process: 30813 ExecStart=/usr/local/sbin/netatalk (code=exited, status=0/SUCCESS)
          CGroup: name=systemd:/system/netatalk.service
                  ├ 30815 /usr/local/sbin/netatalk
                  ├ 30816 /usr/local/sbin/afpd -d -F /usr/local/etc/afp.conf
                  ├ 30817 /usr/local/sbin/cnid_metad -d -F /usr/local/etc/afp.conf
                  └ 30823 /usr/local/sbin/cnid_dbd -F /usr/local/etc/afp.conf -p /export/test -t 7 -l 5

11 years agoAdd option 'ad domain'
Ralph Boehme [Wed, 28 Nov 2012 13:23:33 +0000 (14:23 +0100)]
Add option 'ad domain'

Add option 'ad domain' similar to 'nt domain'. Useful when
authenticating against Netatalk on Solaris in case the OS is bound
to Active Directory. Currently users have to type in their full AD
name user@domain. Adding an option 'ad domain' would allows users
to login giving just their usernames.

Implements FR #66.

11 years agoImport manpage from XML
Frank Lahm [Wed, 28 Nov 2012 08:25:28 +0000 (09:25 +0100)]
Import manpage from XML

11 years agoDon't convert AppleDouble v2 file of symlinks, delete it
Ralph Boehme [Tue, 27 Nov 2012 17:04:29 +0000 (18:04 +0100)]
Don't convert AppleDouble v2 file of symlinks, delete it

Netatalk 2.x created AppleDouble files for symlinks. Netatalk's 3
autoconversion of AppleDouble files to AppleDouble metadata
extended attributes failed to do the conversion in ad_convert()
because some filesystem may not support EAs on symlinks.

The new behaviour is to ignore symlinks in ad_convert().

Fixes bug #471.

11 years agoEnsure pthread support compiler and linker flags are correct
Frank Lahm [Tue, 20 Nov 2012 17:19:33 +0000 (18:19 +0100)]
Ensure pthread support compiler and linker flags are correct

On some platforms using AC_SEARCH_LIBS is not sufficient for
finding the linker flags for linking with a pthread library.
Add macro ax_pthread.m4 from GNU autoconf macro archive and
use the macro AX_PTHREAD.

Fix compiler and linker flags for afpd and libatalk.

Thanks to Jason Teska for pinpointing this.

11 years agoFix SIGHUP config reloading
Ralph Boehme [Thu, 22 Nov 2012 10:31:49 +0000 (11:31 +0100)]
Fix SIGHUP config reloading

Add SIGHUP handler to master 'netatalk' process and let it distribute
the signal to it's childs, eg afpd.

Add function afp_config_free() which releases ressources allocated
by afp_config_parse().
Additionally fix configinit()/configfree() which deal with ressources
only used in the afpd fileserver (eg sockets, zeroconf registration).

Fix an error in the mdns unregister code where pthread_kill() was
used but that somehow killed the whole process not just the mdns
thread. Use pthread_cancel() instead which seems to work.

Fix any ressource leak reported by libumem.

11 years agocreatvol() must return a struct vol pointer
Ralph Boehme [Tue, 27 Nov 2012 09:31:51 +0000 (10:31 +0100)]
creatvol() must return a struct vol pointer

11 years agoFix a ressource leak
Ralph Boehme [Mon, 26 Nov 2012 15:19:02 +0000 (16:19 +0100)]
Fix a ressource leak

Due to the ordering and multiplexing of data- and metadata handle
closing in ad_close(), a datafork lock handle was not released.
Releasing lock handles is now done when the logic fork counter
hits zero, not when the underlying filedescriptor referencing handle
count reaches zero.

11 years agoFix type
Ralph Boehme [Mon, 26 Nov 2012 16:18:53 +0000 (17:18 +0100)]
Fix type

11 years agoUpdate NEWS
Ralph Boehme [Mon, 26 Nov 2012 09:59:01 +0000 (10:59 +0100)]
Update NEWS

11 years agoReloading volumes from config file was broken
Ralph Boehme [Fri, 23 Nov 2012 17:23:24 +0000 (18:23 +0100)]
Reloading volumes from config file was broken

load_volumes() is supposed to be a "reenetrant" function called from
various places in different programs (afpd, cnid_metad) to reload the
config for updating the volume list.

Fix the loop freeing volumes that are deleted.

Simplify the loop checking for paths and volume names in createvol().
This is also the loop which checks if a volume is already loaded
when config has been loaded before.

Remove checks for nested paths.

Fixes bug #474.

11 years agoAdd logtype_ad
Ralph Boehme [Sat, 24 Nov 2012 15:34:14 +0000 (16:34 +0100)]
Add logtype_ad

11 years agoImport manpage from XML
Frank Lahm [Fri, 23 Nov 2012 10:33:06 +0000 (11:33 +0100)]
Import manpage from XML

11 years agoRemove lenght limitation of options like "valid users"
Ralph Boehme [Fri, 23 Nov 2012 09:23:27 +0000 (10:23 +0100)]
Remove lenght limitation of options like "valid users"

The options "valid users", "rolist" and others use the function
accessvol() for parsing the options string. accessfull uses
a static buffer limited to MAXPATHLEN which limits the maximum
length of these options.

Fix this by using a strdup()ed buffer instead.

Fixes bug #473.

11 years agoAdd error check macro EC_EXIT_STATUS
Ralph Boehme [Fri, 23 Nov 2012 09:19:13 +0000 (10:19 +0100)]
Add error check macro EC_EXIT_STATUS

11 years ago"valid users" options and friends only use ',' as field delimiter
Ralph Boehme [Fri, 23 Nov 2012 07:15:51 +0000 (08:15 +0100)]
"valid users" options and friends only use ',' as field delimiter

Netatalk 3 uses ',' and ' ' as field delimiter in the "valid users",
"invalid users", "rolist" and "rwlist" option for consistency with
other options that also allow the use of ' ' as field delimiter.
But as user and groupnames may contain spaces, we need to revert
to the Netatalk 2 behaviour where only ',' was used as delimiter.

Fixes bug #472.

11 years agoFix pathname bug for FCE modified event
Frank Lahm [Fri, 9 Nov 2012 11:48:53 +0000 (12:48 +0100)]
Fix pathname bug for FCE modified event

It's not guaranteed that cwd is the forks parent directory, thus
we can't use the fullpathname(forkname) wrapper.
Instead we use the DID stored in the ofork structure to dirlookup
the directory and use it's fullpath together with the fork's name.

11 years agoUse sigaction() instead of signal() for ignoring SIGPIPE
Frank Lahm [Thu, 22 Nov 2012 08:58:02 +0000 (09:58 +0100)]
Use sigaction() instead of signal() for ignoring SIGPIPE

Move the code to ignore SIGPIPE from the DSI sesssion setup stage
to the main signal handling code in main() and avoid the use
of deprecated signal() function and use sigaction.

11 years agoFix a bug where copying packages to a Netatalk share fails
Frank Lahm [Sat, 17 Nov 2012 11:30:18 +0000 (12:30 +0100)]
Fix a bug where copying packages to a Netatalk share fails

The bug was caused by the 10.6 client trying to set the creation
date on a symlink in the package. This caused our setmetadata
routine to require a valid adouble handle for the symlink which is
not possible as symlink may not allow creating an EA, depending
on the filesystem. At least ZFS on Solaris doesnt.
The fix is to check whether the adouble handle creation failed
on a symlink and ignore the error.

Fixes bug #469.

11 years agoAlways generate all initscripts
Frank Lahm [Sat, 17 Nov 2012 13:14:17 +0000 (14:14 +0100)]
Always generate all initscripts

initscripts are now all created with variable substitution from
the templates, but they're not installed. Installation happens
only if the configure arg for the platform is used.
This should help packagers picking up an initscript for a package.

11 years agoRevert "Enhance handling of nested volume paths"
Frank Lahm [Thu, 15 Nov 2012 16:53:31 +0000 (17:53 +0100)]
Revert "Enhance handling of nested volume paths"

This reverts commit 949ba93384843d13099dd467aefc61e3b7185997.

11 years agoEnhance handling of nested volume paths
Frank Lahm [Tue, 13 Nov 2012 09:17:36 +0000 (10:17 +0100)]
Enhance handling of nested volume paths

Force cnidscheme "last" and read-only behaviour for volumes whos
volume path is a subdirectory (nested) of another volume.

In case cnid scheme is not last, a message is logged with a logvel
of log_note.

11 years agoFCE API change and cleanup
Frank Lahm [Fri, 9 Nov 2012 10:53:24 +0000 (11:53 +0100)]
FCE API change and cleanup

Change the FCE API by using a single function (fce_register()) as
a single point for callers to register events.
Remove all individual event functions.

Add types for events and file/directoy flag.

Use standard bool type instead of special defines FCE_TRUE/FALSE.

11 years agoAdd function basename_safe
Frank Lahm [Fri, 9 Nov 2012 10:42:30 +0000 (11:42 +0100)]
Add function basename_safe

11 years ago0 terminate packet data
Frank Lahm [Thu, 8 Nov 2012 11:19:04 +0000 (12:19 +0100)]
0 terminate packet data

11 years agoRemove TimeMachine volume used size FCE event
Frank Lahm [Thu, 8 Nov 2012 10:39:13 +0000 (11:39 +0100)]
Remove TimeMachine volume used size FCE event

11 years agoAdd FCE type names and adjust logtypes to new fce facility
Frank Lahm [Thu, 8 Nov 2012 09:42:16 +0000 (10:42 +0100)]
Add FCE type names and adjust logtypes to new fce facility