On Die, 2012-02-07 at 13:43 +0100, Matteo Settenvini wrote:
> 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.
I guess you're right. There might be a better fix anyway, this is
basically pointing out the problem and a possible fix.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]