[systemd-devel] [PATCH] perl-Net-DBus + new interactive authorization

Colin Guthrie colin at mageia.org
Mon Jan 12 04:04:42 PST 2015

Daniel P. Berrange wrote on 12/01/15 11:40:
> On Mon, Jan 12, 2015 at 11:37:12AM +0000, Colin Guthrie wrote:
>> Angelo Naselli wrote on 12/01/15 10:30:
>>> Il 12/01/2015 10:16, Colin Guthrie ha scritto:
>>>> Angelo Naselli wrote on 11/01/15 17:15:
>>>>> FWIW i rebuilt it in mageia 4 and libdbus1_3-1.6.18-1.8.mga4
>>>>> I haven't any issues of course. Using it as user
>>>>> for StartUnit/StopUnit for instance i got a  only a different exception
>>>>> org.freedesktop.DBus.Error.AccessDenied: Rejected send message
>>>>> while using as root worked as before even if i used new api.
>>>> This is expected unless you have also backported cauldron systemd to
>>>> MGA4. I think we discussed before that the interactive authorisation
>>>> stuff was only added in more recent versions of systemd, so this is
>>>> entirely what I'd expect here.
>>> eh eh eh, mine was only to say that even if i haven't disabled anything
>>> and compiled all against the old library i didn't see any crash or
>>> regression, just a different exception for the same -not working- thing.
>>> But i haven't test anything of course :)
>> Oh, right! Gotcha, so this is just about the comment regarding the
>> conditional compilation against older libdbus. Sorry for misinterpreting
>> and thanks for testing that.
>> OK, I'll have a further look at it to see if anything special is needed,
>> perhaps the perl binding stuff just works without too much faff here for
>> non-present APIs (I'm certainly not an expert with this stuff!).
> I think you'll just need some #ifdef magic in the DBus.xs file to deal
> with the new APIs being missing. Perhaps just write a stub function
> in the DBus.xs that just raises a suitable perl error (see _croak_error
> source in DBus.xs for example on raising errors)

Perhaps, but I think in this case it would be better to simply silently
ignore the error as this is more of a nice additional feature rather
than a core part. I think if someone wrote some perl code that took
advantage of this, they would prefer it would "just work" as expected
rather than have any need to push up conditional checks into the calling
perl code.



Colin Guthrie

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

More information about the systemd-devel mailing list