Bug 574056 - akonadi socket not network-fs friendly
Summary: akonadi socket not network-fs friendly
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: akonadi
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Kevin Kofler
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-16 13:53 UTC by Rex Dieter
Modified: 2011-10-13 13:58 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-10-13 13:58:51 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
KDE Software Compilation 179006 0 None None None Never
KDE Software Compilation 182292 0 None None None Never

Description Rex Dieter 2010-03-16 13:53:24 UTC
akonadi seems to make a socket by default at
~/.local/share/akonadi/akonadiserver.socket

which is not cool for network (e.g. nfs) $HOME

Comment 1 Rex Dieter 2010-03-16 13:56:17 UTC
https://bugs.kde.org/show_bug.cgi?id=179006#c5

contains a suggestion to customize socket location with by adding to akonadiserverrc:
[Connection]
SocketDirectory=/tmp/akonadi-myuser/

Comment 2 Kevin Kofler 2010-03-16 13:59:23 UTC
Yet upstream claims Akonadi works fine with NFS home. It seems they overlooked this particular detail.

Comment 3 Rex Dieter 2010-03-16 16:14:05 UTC
See also fedora-devel thread,
http://lists.fedoraproject.org/pipermail/devel/2010-March/133634.html

and another related upstream related bug/comment,
https://bugs.kde.org/show_bug.cgi?id=182292#c6

Comment 4 Kevin Kofler 2010-03-16 23:52:55 UTC
The problem with /tmp/akonadi-`whoami` is that it's a predictable name in what's usually a world-writable directory and so can be used for symlink attacks, or at least DoS attacks.

Using some unique name (e.g. from mkdtemp) and symlinking it to some fixed name below the home directory is probably the safest solution.

Comment 5 Juha Tuomala 2010-03-17 11:05:53 UTC
(In reply to comment #4)
> The problem with /tmp/akonadi-`whoami` is that it's a predictable name in
> what's usually a world-writable directory and so can be used for symlink
> attacks, or at least DoS attacks.

[Connection]                                                                                                                SocketDirectory=$(echo -c "echo /tmp/akonadi-$USER-$RANDOM-$RANDOM-$RANDOM/" )

> Using some unique name (e.g. from mkdtemp) and symlinking it 
> to some fixed name below the home directory is probably 
> the safest solution.    

How many chained symlinks do you recommend for added security? Three like in triple DES?

Comment 6 Kevin Kofler 2010-03-20 06:26:53 UTC
> How many chained symlinks do you recommend for added security? Three like in
> triple DES?

Nonsense. Further levels of symlinks don't add any security. You don't understand the issue at all! You just need 2 items:
* the directory in /tmp, which is a local directory, so it can contain Unix sockets, but which MUST NOT have a predictable file name because /tmp is world-writable.
* the symlink in ~, which is writable only by you (if your system setup is not screwed up), so it can safely use a predictable name, which can then be referenced in config files.

If my explanation is to terse for you, maybe you'll understand Lennart Poettering's better:
http://lists.fedoraproject.org/pipermail/devel/2010-March/133880.html

Comment 7 Kevin Kofler 2010-03-20 06:28:30 UTC
Oh, and:
SocketDirectory=$(echo -c "echo /tmp/akonadi-$USER-$RANDOM-$RANDOM-$RANDOM/" )
is extremely unreliable as the value of that config entry will be different each time it is evaluated. Please don't even THINK of such a broken setup.

Comment 9 Rex Dieter 2011-10-13 13:58:51 UTC
This seems resolved satisfactorily in akonadi-1.6.x, uses a scheme similar to kde symlinks put into ~/.kde/


Note You need to log in before you can comment on or make changes to this bug.