delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/10/22/10:33:56

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:mime-version:subject:date:references:to
:in-reply-to:message-id:content-type:content-transfer-encoding;
q=dns; s=default; b=Ta5IDwdfUjqBGMxB4HBFjDVxL2jKX6nuJka2UVbSwj6
DOFe+aQRZBk11UBmPfi5DICNyYQP10Zt6aa2YeXlGLNCEzz9qS3OeM2HgaVKf5R1
YB2lamTHIGcP75hCJydb86HjKt9Vien/TsldCjVB+tD2zTUmM4aKf/NtlK+i83To
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:mime-version:subject:date:references:to
:in-reply-to:message-id:content-type:content-transfer-encoding;
s=default; bh=7ihxRLpWZQJhni2aN1KqsYaotkw=; b=p4Fq2kPMT7YW3rjZE
xlqW6/WXr1mXXn69Jm17jOjVtjKSPBSs91iHEx55TqaUAuLNHZNPB8Z1mT4Umf1t
GJrLYaIAjaEv2fAcs9qkdhHHlRW9S9wikG6clAP7H7X40l8oRbr/s4TdZqb1lz0i
edjH+xqpPxn3H8eEmk3sg0i7qE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=H*c:alternative
X-HELO: vie01a-dmta-pe03-2.mx.upcmail.net
X-Env-Mailfrom: mikebrady AT eircom DOT net
X-Env-Rcptto: cygwin AT cygwin DOT com
X-SourceIP: 37.228.204.209
From: Mike Brady <mikebrady AT eircom DOT net>
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\))
Subject: Re: Question about D-Bus and cygrunsrv
Date: Tue, 22 Oct 2019 15:32:56 +0100
References: <287EA5C9-AEDB-417D-8E1D-29405AB24325 AT eircom DOT net> <23766B16-3812-4D94-AA7C-C61C167A05C9 AT eircom DOT net> <20190222095525 DOT GN4256 AT calimero DOT vinschen DOT de> <EBBAD7F4-80D5-4AB4-A059-5DD975CD229B AT eircom DOT net>
To: cygwin AT cygwin DOT com
In-Reply-To: <EBBAD7F4-80D5-4AB4-A059-5DD975CD229B@eircom.net>
Message-Id: <595C371D-E23A-47E5-976E-A11881A1EF0D@eircom.net>
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x9MEXb5Z007647

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 AT eircom DOT 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 AT cygwin DOT com <mailto:corinna-cygwin AT cygwin DOT 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 AT eircom DOT net <mailto:mikebrady AT eircom DOT 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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019