Re: [PATCH] connman : Handle empty passphrase setting in wifi/tethering
Denis Kenzior <[email protected]> Wed, 4 Jun 2025 16:21:27 -0500
| Newsgroups | dev.linux.lists.connman |
|---|---|
| Message-ID | <[email protected]> |
Hi Shailesh, On 6/2/25 1:47 AM, Shailesh Rathod/LGSI GPOS Dev wrote: > From: Shailesh Rathod<[email protected]> > Date: Mon, 21 Apr 2025 18:38:01 +0900 > > Handle empty passphrase setting in wifi/tethering/setState > > While setting WiFi tethering only cases for PSK enabled > network was handled. Add case to allow empty password for Open SSID too > For certain application enabling softap without PSK is required. This patch (at least the whitespace) looks like it is being mangled by your mail server? I can't apply it: [denkenz@archdev connman]$ git am ~/Downloads/connman-Handle-empty-passphrase-setting-in-wifi-tethering.patch Applying: connman : Handle empty passphrase setting in wifi/tethering error: corrupt patch at line 10 See for yourself here: https://patchwork.kernel.org/project/connman/patch/SE1P216MB2647E4A28FE116C4D93FF7B5F062A@SE1P216MB2647.KORP216.PROD.OUTLOOK.COM/ > > Signed-off-by: Shailesh Rathod<[email protected]> ConnMan doesn't use Signed-off-by tags, so please leave these out in the future. > --- > src/technology.c | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > > diff --git a/src/technology.c b/src/technology.c > index 719c680..1bcd184 100644 > --- a/src/technology.c > +++ b/src/technology.c > @@ -1045,8 +1045,16 @@ static DBusMessage *set_property(DBusConnection *conn, > if (technology->type != CONNMAN_SERVICE_TYPE_WIFI) > return __connman_error_not_supported(msg); > > - err = __connman_service_check_passphrase(CONNMAN_SERVICE_SECURITY_PSK, > - str); > + /* Allow empty passphrases for setting up an AP with open > + * security type */ > + if (strlen(str) == 0) { > + g_free(technology->tethering_passphrase); > + technology->tethering_passphrase = NULL; > + } > + else Please refer to the Linux Coding Style guidelines. Should be '} else' > + err = __connman_service_check_passphrase(CONNMAN_SERVICE_SECURITY_PSK, > + str); > + > if (err < 0) The compiler should complain here since err might not be initialized in all cases (in the strlen(str) == 0 case). > return __connman_error_passphrase_required(msg); > Regards, -Denis