Il giorno mar, 07/02/2012 alle 10.16 +0100, Michel Dänzer ha scritto: > Investigating this today, I noticed these messages > in /var/log/daemon.log: > > Feb 7 08:11:27 thor accounts-daemon[2299]: ** (accounts-daemon:2299): > CRITICAL **: Duplicate object at path /org/freedesktop/Accounts/User276585368. > Feb 7 08:11:27 thor accounts-daemon[2299]: ** (accounts-daemon:2299): > CRITICAL **: Duplicate object at path /org/freedesktop/Accounts/User276585368. > > This led me to the problem and fix relatively quickly: > > > diff -up -ru accountsservice-0.6.15.orig/src/user.c > accountsservice-0.6.15/src/user.c > --- accountsservice-0.6.15.orig/src/user.c 2012-02-07 10:09:11.000000000 > +0100 > +++ accountsservice-0.6.15/src/user.c 2012-02-07 09:04:53.000000000 +0100 > @@ -731,7 +731,7 @@ compute_object_path (User *user) > { > gchar *object_path; > > - object_path = g_strdup_printf ("/org/freedesktop/Accounts/User%ld", > + object_path = g_strdup_printf ("/org/freedesktop/Accounts/User%lld", > (gint64) user->uid); > > return object_path; > >
Wow, thanks! You're my hero of the day! Although, shouldn't that be: object_path = g_strdup_printf ("/org/freedesktop/Accounts/User%lld", (long long int) user->uid); ? The reason is that g_*printf() behaves like C's printf() [1], thus "%lld" is machine-specific, and guaranteed to work only with a (long long int) cast, not with a gint64 which is machine-independent. [1] in gprintfint.h: #define _g_vprintf vprintf Anyway, thanks! -- Matteo Settenvini FSF Associated Member Email : mat...@member.fsf.org -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS/E d--(-) s+: a- C+++ UL+++ P+ L++++>$ E++>+++ W+++ N+ o? w--- O M- V- PS++ PE- Y+>++ PGP+++ t++ 5 X- R+ !tv b+++ DI++ D++ G++ e++ h+ r++ y+ ------END GEEK CODE BLOCK------
signature.asc
Description: This is a digitally signed message part