This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about D-Bus and cygrunsrv


Just as a quick follow-up, I've put the two code samples up on github:

https://github.com/mikebrady/dbus-example <https://github.com/mikebrady/dbus-example> -- this uses the regular dbus1 library and works on Linux and Cygwin.
https://github.com/mikebrady/gdbus-example <https://github.com/mikebrady/gdbus-example> -- this uses the GDbus library from GIO and works in Linux but not in Cygwin.


Best wishes
Mike


> On 22 Oct 2019, at 15:07, Mike Brady <mikebrady@eircom.net> wrote:
> 
> Hello again.
> 
> I've returned to this continuing problem and come up with a short piece of code which seems to exemplify this problem. It works in Linux and doesn't work in Cygwin.
> 
> Basically, the code is an attempt to get a "name" on the D-Bus "system bus" which could be used to provide a system-wide service using the D-Bus IPC protocol.
> 
> The attempt to get a name succeeds on Linux (Ubuntu 19.04) and fails on Cygwin (3.0.7). The code uses the high-level GDbus interface that is part of GIO (https://developer.gnome.org/gio/stable/ch01.html <https://developer.gnome.org/gio/stable/ch01.html>).
> 
> Another piece of sample code that uses the regular D-Bus library (libdbus1-devel in Cygwin) seems to work perfectly, which seems to me to suggest that whatever this probelm is, it is not a security issue.
> 
> Both of these samples are set up as automake projects and include config and policy files. I'd be happy to share or publish them wherever convenient...
> 
> Regards
> Mike
> 
> 
>> On 22 Feb 2019, at 09:55, Corinna Vinschen <corinna-cygwin@cygwin.com <mailto:corinna-cygwin@cygwin.com>> wrote:
>> 
>> Hey Mike,
>> 
>> On Feb 21 16:56, Mike Brady wrote:
>>> Hello again. Further to the rather vague email below, here is a link to what I did to install Shairport Sync on a fresh Cygwin installation: 
>>> 
>>> https://github.com/mikebrady/shairport-sync/blob/development/CYGWIN.md <https://github.com/mikebrady/shairport-sync/blob/development/CYGWIN.md> <https://github.com/mikebrady/shairport-sync/blob/development/CYGWIN.md <https://github.com/mikebrady/shairport-sync/blob/development/CYGWIN.md>>
>>> 
>>> Regards
>>> Mike
>>> 
>>> 
>>>> On 20 Feb 2019, at 21:50, Mike Brady <mikebrady@eircom.net <mailto:mikebrady@eircom.net>> wrote:
>>>> 
>>>> Hi there. I'm trying to set up Shairport Sync as a CYGWIN service, and I'm trying to use cygrunsrv.
>>>> 
>>>> Briefly, I can get everything to work properly except the D-Bus interface -- when shairport-sync is installed as a service, it can't "own" a well-known name on the "system" D-Bus.
>>>> 
>>>> I built a configuration and installer for shairport sync essentially by copying the avahi-daemon-config file.
>>>> 
>>>> The Avahi deamon uses the system D-Bus successfully under the username "SYSTEM" and without (AFAICS) changing IDs. But for the life of me, I can't get Shairport Sync to work the same way.
>>>> 
>>>> Incidentally, if I change the D Bus policy file for Shairport Sync to be allowed to own its well-known name on D Bus when running under the logged in account, everything is peachy.
>>>> 
>>>> Any suggestions gratefully received. Incidentally, I'm the main developer of Shairport Sync -- https://github.com/mikebrady/shairport-sync <https://github.com/mikebrady/shairport-sync>.
>>>> 
>>>> Best wishes
>>>> Mike Brady
>>>> 
>> 
>> You have been heard, but I have not the faintest clue what d-bus or,
>> FWIW, avahi are doing.  Ideally, if you could break down the problem
>> to a simple, self-contained testcase which shows what exactly is not
>> working on a plain libc level, help may be possible :}
>> 
>> 
>> Corinna
>> 
>> -- 
>> Corinna Vinschen
>> Cygwin Maintainer
> 


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]