Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. Re: [PATCH 1/1] service: Sanitize hostname and domainname
      (Daniel Wagner)
   2. Re: [PATCH v2 1/1] service: Sanitize input for hostname and
      domainname (Daniel Wagner)
   3. Re: [[PATCH v3] 1/1] service: retry online check permanently
      until success (Daniel Wagner)
   4. Re: [PATCH v3 0/4] Timeserver fixes (Daniel Wagner)
   5. [PATCH] main: Fix typo in config option (Daniel Wagner)
   6. Re: [PATCH] main: Fix typo in config option (Daniel Wagner)
   7. [PATCH] service: Handle NULL pointer in
      __connman_service_set_{domain|host}name (Daniel Wagner)
   8. Re: [PATCH] service: Handle NULL pointer in
      __connman_service_set_{domain|host}name (Daniel Wagner)
   9. Missing wifi service (JH)
  10. Re: Missing wifi service (JH)


----------------------------------------------------------------------

Message: 1
Date: Mon, 18 Mar 2019 20:05:45 +0100
From: Daniel Wagner <[email protected]>
To: Henrik Persson <[email protected]>
Cc: "[email protected]" <[email protected]>, Konrad Beckmann
        <[email protected]>
Subject: Re: [PATCH 1/1] service: Sanitize hostname and domainname
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

HI Henrik,

On Mon, Mar 18, 2019 at 11:18:10AM +0000, Henrik Persson wrote:
> >> +  if (g_str_is_ascii(hostname))
> > 
> > I am fine with the patch. In order to use g_str_is_ascii() glib 2.40
> > is needed. ConnMan requests only 2.28 at this point which was released
> > around 2011. I think it's save to assume no one still uses this really
> > old version of glib.
> > 
> > Glib 2.40 is not too young either (released in March 2014), so we
> > don't force everyone to update to a very recent version.
> > 
> > Please add this update to this patch as well. So we have documented
> > why we update the dependency.
> 
> Ah, right. Forgot to check that.. I'll update the dependency and note 
> why in the commit and post v2.

No worries. I was about updating it myself, but though it might be a
good idea to have it discussed on the mailing list. We had some users
in the past which asked us not to update our dependencies if
possible. The main reason was that glib is getting bigger over time.

Thanks,
Daniel


------------------------------

Message: 2
Date: Mon, 18 Mar 2019 20:16:24 +0100
From: Daniel Wagner <[email protected]>
To: Henrik Persson <[email protected]>
Cc: "[email protected]" <[email protected]>, Konrad Beckmann
        <[email protected]>
Subject: Re: [PATCH v2 1/1] service: Sanitize input for hostname and
        domainname
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hi Henrik,

On Mon, Mar 18, 2019 at 11:58:24AM +0000, Henrik Persson wrote:
>  From f9980195edb7ffab18315b880cf0ff1fb026f3b7 Mon Sep 17 00:00:00 2001
> From: Henrik Persson <[email protected]>
> Date: Mon, 18 Mar 2019 12:20:34 +0100
> Subject: [PATCH v2 1/1] service: Sanitize input for hostname and domainname
> 
> If a DHCP ACK is received with non-UTF-8 data set as hostname or
> domain-name option connman will crash on a D-Bus assert. This patch
> sanitizes data in service.c and only allows ASCII characters (since
> they shouldn't be anything else) for __connman_service_set_hostname()
> and __connman_service_set_domainname().
> 
> Since the fix involves using g_str_is_ascii() we also need to bump
> Glib dependency to 2.40 (which was released in March 2014).
> ---

The commit message contains a few SMTP headers which don't belong
there. Also the patch didn't apply cleanly. I guess it is against an
older version. Anyway, I fixed all up and applied the patch.

Anyway, thanks for the patch!

Now I expect someone starting the security CVE dance...

Thanks,
Daniel


------------------------------

Message: 3
Date: Mon, 18 Mar 2019 20:27:35 +0100
From: Daniel Wagner <[email protected]>
To: Julien Massot <[email protected]>
Cc: [email protected]
Subject: Re: [[PATCH v3] 1/1] service: retry online check permanently
        until success
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

Hi Julien,

On Mon, Mar 18, 2019 at 02:41:42PM +0100, Julien Massot wrote:
> From: Julien Massot <[email protected]>
> 
> This make online check happen right after ready state, and
> then after ONLINE_CHECK_INITIAL_INTERVAL (1 second) like before,
> and then happen after + ONLINE_CHECK_INCREMENT_INTERVAL until
> reaching the maximum interval ONLINE_CHECK_MAX_INTERVAL.
> 
> Once we reached the ready state we stop online check.

I've updated the commit message. I hope you are okay with.

Anyway, patch applied!

Thanks,
Daniel


------------------------------

Message: 4
Date: Mon, 18 Mar 2019 20:28:55 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Subject: Re: [PATCH v3 0/4] Timeserver fixes
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Sat, Mar 16, 2019 at 04:11:32PM +0100, Daniel Wagner wrote:
> v2 revealed some more issues with the retry logic. This version is now
> getting closer to a working time server selection code.
> 
> Happy testing!

I've applied the patches. It should improve the situation in case the
time servers are hard to reach. It wont make any difference in well
behaving networks.


------------------------------

Message: 5
Date: Mon, 18 Mar 2019 20:32:17 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH] main: Fix typo in config option
Message-ID: <[email protected]>

The option is defined and documented as UseGatewaysAsTimeservers.

Reported-by chewitt.
---
 src/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c
index 2e2cc4bdb057..2371771f76a3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -135,7 +135,7 @@ static struct {
 #define CONF_ENABLE_ONLINE_CHECK        "EnableOnlineCheck"
 #define CONF_AUTO_CONNECT_ROAMING_SERVICES "AutoConnectRoamingServices"
 #define CONF_ACD                        "AddressConflictDetection"
-#define CONF_USE_GATEWAYS_AS_TIMESERVERS "UseGatewayAsTimeservers"
+#define CONF_USE_GATEWAYS_AS_TIMESERVERS "UseGatewaysAsTimeservers"
 
 static const char *supported_options[] = {
        CONF_BG_SCAN,
-- 
2.20.1


------------------------------

Message: 6
Date: Mon, 18 Mar 2019 20:33:00 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Subject: Re: [PATCH] main: Fix typo in config option
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Mon, Mar 18, 2019 at 08:32:17PM +0100, Daniel Wagner wrote:
> The option is defined and documented as UseGatewaysAsTimeservers.
> 
> Reported-by chewitt.

Patch applied. Thanks!


------------------------------

Message: 7
Date: Mon, 18 Mar 2019 20:40:30 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Cc: Daniel Wagner <[email protected]>
Subject: [PATCH] service: Handle NULL pointer in
        __connman_service_set_{domain|host}name
Message-ID: <[email protected]>

516af0fd1586 ("service: Sanitize input for hostname and domainname")
address the shutdown path:

connmand[12534]: ++++++++ backtrace ++++++++
connmand[12534]: #0  0x7fefba7195c0 in /lib64/libc.so.6
connmand[12534]: #1  0x7fefbab8caa4 in /lib64/libglib-2.0.so.0
connmand[12534]: #2  0x44c600 in __connman_service_set_domainname() at 
src/service.c:2664
connmand[12534]: #3  0x462d16 in apply_dhcp_invalidate_on_network() at 
src/dhcp.c:110
connmand[12534]: #4  0x463c87 in dhcp_free() at src/dhcp.c:70
connmand[12534]: #5  0x442bd8 in set_disconnected() at src/network.c:1009
connmand[12534]: #6  0x442e10 in network_remove() at src/network.c:1120
connmand[12534]: #7  0x442e77 in connman_network_driver_unregister() at 
src/network.c:1211
connmand[12534]: #8  0x41cf88 in ethernet_exit() at plugins/ethernet.c:462
connmand[12534]: #9  0x43f1d9 in __connman_plugin_cleanup() at src/plugin.c:202
connmand[12534]: #10 0x4113f4 in main() at src/main.c:874
connmand[12534]: #11 0x7fefba705413 in /lib64/libc.so.6
---
 src/service.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/service.c b/src/service.c
index adc5deb4c82b..3202f26cc1cc 100644
--- a/src/service.c
+++ b/src/service.c
@@ -2638,11 +2638,10 @@ void __connman_service_set_hostname(struct 
connman_service *service,
                return;
 
        g_free(service->hostname);
+       service->hostname = NULL;
 
-       if (g_str_is_ascii(hostname))
+       if (hostname && g_str_is_ascii(hostname))
                service->hostname = g_strdup(hostname);
-       else
-               service->hostname = NULL;
 }
 
 const char *__connman_service_get_hostname(struct connman_service *service)
@@ -2660,11 +2659,10 @@ void __connman_service_set_domainname(struct 
connman_service *service,
                return;
 
        g_free(service->domainname);
+       service->domainname = NULL;
 
-       if (g_str_is_ascii(domainname))
+       if (domainname && g_str_is_ascii(domainname))
                service->domainname = g_strdup(domainname);
-       else
-               service->domainname = NULL;
 
        domain_changed(service);
 }
-- 
2.20.1


------------------------------

Message: 8
Date: Mon, 18 Mar 2019 20:41:41 +0100
From: Daniel Wagner <[email protected]>
To: [email protected]
Subject: Re: [PATCH] service: Handle NULL pointer in
        __connman_service_set_{domain|host}name
Message-ID: <20190318194141.4zwdf7y6epfzknpw@beryllium>
Content-Type: text/plain; charset=us-ascii

On Mon, Mar 18, 2019 at 08:40:30PM +0100, Daniel Wagner wrote:
> 516af0fd1586 ("service: Sanitize input for hostname and domainname")
> address the shutdown path:
> 
> connmand[12534]: ++++++++ backtrace ++++++++
> connmand[12534]: #0  0x7fefba7195c0 in /lib64/libc.so.6
> connmand[12534]: #1  0x7fefbab8caa4 in /lib64/libglib-2.0.so.0
> connmand[12534]: #2  0x44c600 in __connman_service_set_domainname() at 
> src/service.c:2664
> connmand[12534]: #3  0x462d16 in apply_dhcp_invalidate_on_network() at 
> src/dhcp.c:110
> connmand[12534]: #4  0x463c87 in dhcp_free() at src/dhcp.c:70
> connmand[12534]: #5  0x442bd8 in set_disconnected() at src/network.c:1009
> connmand[12534]: #6  0x442e10 in network_remove() at src/network.c:1120
> connmand[12534]: #7  0x442e77 in connman_network_driver_unregister() at 
> src/network.c:1211
> connmand[12534]: #8  0x41cf88 in ethernet_exit() at plugins/ethernet.c:462
> connmand[12534]: #9  0x43f1d9 in __connman_plugin_cleanup() at 
> src/plugin.c:202
> connmand[12534]: #10 0x4113f4 in main() at src/main.c:874
> connmand[12534]: #11 0x7fefba705413 in /lib64/libc.so.6

Patch applied.


------------------------------

Message: 9
Date: Tue, 19 Mar 2019 16:23:38 +1100
From: JH <[email protected]>
To: connman <[email protected]>
Subject: Missing wifi service
Message-ID:
        <CAA=hcWRG0L0uD0i4sRkZYTx6GLy9=bgajwofue0qmzwhflr...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

Hi,

I am running connman in my Ubunut 18 laptop, the etnernet is under
control, the ethernet_c47d461dc1f1_cable is in /var/lib/connman. The
wifi is enabled, but there is no wifi service, only ethernet service.
How can I bring the wifi service running? I don't think I should
manually change things in /var/lib/connman. The only configure file I
can see is the /etc/connman/main.conf which does not have configure
for wifi or enthernet, where is the connman configuration?

$ connmanctl services
*AO Wired                ethernet_c47d461dc1f1_cable

$ connmanctl technologies
/net/connman/technology/ethernet
  Name = Wired
  Type = ethernet
  Powered = True
  Connected = True
  Tethering = False
/net/connman/technology/bluetooth
  Name = Bluetooth
  Type = bluetooth
  Powered = False
  Connected = False
  Tethering = False
/net/connman/technology/wifi
  Name = WiFi
  Type = wifi
  Powered = True
  Connected = False
  Tethering = False

Thank you.

 - jh


------------------------------

Message: 10
Date: Tue, 19 Mar 2019 17:25:07 +1100
From: JH <[email protected]>
To: connman <[email protected]>
Subject: Re: Missing wifi service
Message-ID:
        <CAA=hcwsswv6nke5rcvvyvxgpfld105bebadqgfopmhvshef...@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

$ connmanctl scan wifi
Error /net/connman/technology/wifi: No carrier

connmanctl> scan wifi
Error /net/connman/technology/wifi: No carrier
connmanctl>  agent on
Agent already registered
connmanctl> scan wifi
Error /net/connman/technology/wifi: No carrier

There is a bug report at https://01.org/jira/browse/CM-670 which has
exactly the problems I have, could that bug not be resolved? It was
updated in 2016, my connman version is 1.35 for Ubuntu 18.04, I'll be
astonished if the bug has not been resolved.

I don't think /var/lib/connman is for manual setting, but the
/etc/connman/main.conf does not have wifi setting, where should the
setting goes? Any setting for wifi SSID and Password rather than run
the command to set them up?

Thank you.

Kind regards,

- jh

On 3/19/19, JH <[email protected]> wrote:
> Hi,
>
> I am running connman in my Ubunut 18 laptop, the etnernet is under
> control, the ethernet_c47d461dc1f1_cable is in /var/lib/connman. The
> wifi is enabled, but there is no wifi service, only ethernet service.
> How can I bring the wifi service running? I don't think I should
> manually change things in /var/lib/connman. The only configure file I
> can see is the /etc/connman/main.conf which does not have configure
> for wifi or enthernet, where is the connman configuration?
>
> $ connmanctl services
> *AO Wired                ethernet_c47d461dc1f1_cable
>
> $ connmanctl technologies
> /net/connman/technology/ethernet
>   Name = Wired
>   Type = ethernet
>   Powered = True
>   Connected = True
>   Tethering = False
> /net/connman/technology/bluetooth
>   Name = Bluetooth
>   Type = bluetooth
>   Powered = False
>   Connected = False
>   Tethering = False
> /net/connman/technology/wifi
>   Name = WiFi
>   Type = wifi
>   Powered = True
>   Connected = False
>   Tethering = False
>
> Thank you.
>
>  - jh
>


------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 41, Issue 21
***************************************

Reply via email to