[SSSD] [PATCH] sudo: work with correct D-Bus iterator
Jakub Hrozek
jhrozek at redhat.com
Tue Aug 19 10:03:20 UTC 2014
On Tue, Aug 12, 2014 at 10:14:48AM -0400, Pavel Brezina wrote:
>
>
> ----- Original Message -----
> > From: "Jakub Hrozek" <jhrozek at redhat.com>
> > To: sssd-devel at lists.fedorahosted.org
> > Sent: Tuesday, August 12, 2014 3:58:03 PM
> > Subject: Re: [SSSD] [PATCH] sudo: work with correct D-Bus iterator
> >
> > On Tue, Aug 12, 2014 at 09:55:40AM -0400, Pavel Brezina wrote:
> > >
> > >
> > > ----- Original Message -----
> > > > From: "Jakub Hrozek" <jhrozek at redhat.com>
> > > > To: sssd-devel at lists.fedorahosted.org
> > > > Sent: Tuesday, August 12, 2014 2:45:44 PM
> > > > Subject: Re: [SSSD] [PATCH] sudo: work with correct D-Bus iterator
> > > >
> > > > On Mon, Aug 11, 2014 at 12:19:27PM +0200, Pavel Březina wrote:
> > > > > Hi,
> > > > > mmsrubar reported on IRC that recent D-Bus sudo patch broke rules
> > > > > refresh.
> > > > > We were working with invalid iterator there. I apparently sent an old
> > > > > patch
> > > > > to the list, here's the diff that fixes the issue.
> > > >
> > > > In an IRC conversation, we concluded with Pavel that this is not the
> > > > right fix.
> > >
> > > Why it is not the right fix?
> >
> > Didn't you say on IRC this was the wrong patch and this version would
> > result in "Bad format" error? Note I haven't yet tested the patch, just
> > read the diff.
>
> Ah, you misunderstood me. The previous patch [1] that created this issue was was not the final patch I wrote and it unfortunately got through the review process.
>
> The "Bad Format" error will show up without this patch.
ACK. Without the patch, a rules refresh caused the following error, as
seen in a GDB session:
1580 for (i = 0; i < rules_num; i++) {
(gdb)
1581 if (dbus_message_iter_get_arg_type(&iter) != DBUS_TYPE_STRING) {
(gdb)
1582 DEBUG(SSSDBG_CRIT_FAILURE, "Failed, to parse the message!\n");
(gdb)
1583 ret = EIO;
(gdb)
1584 err_msg = "Invalid D-Bus message format";
The error is gone after applying the patch.
More information about the sssd-devel
mailing list