On Tue, Aug 23, 2022 at 12:01:14AM +0200, Florian Viehweger wrote:
> Hi,
> 
> this is a diff mentioning double quotes for using passphrases
> containing whitespaces.
> 
> Additionally adding a comma to a sentence for better clarity.
> 
> Comments?
> 
> Thanks!
> 
> Index: ifconfig.8
> ===================================================================
> RCS file: /daten/openbsdmirror/cvs/mirror/src/sbin/ifconfig/ifconfig.8,v
> retrieving revision 1.384
> diff -u -p -u -p -r1.384 ifconfig.8
> --- ifconfig.8        27 Jun 2022 16:27:03 -0000      1.384
> +++ ifconfig.8        22 Aug 2022 21:50:59 -0000
> @@ -1302,13 +1302,15 @@ A station will always use the group ciph
>  Set the WPA key and enable WPA.
>  The key can be given using either a passphrase or a full length hex key,
>  starting with 0x.
> -If a passphrase is used the
> +If a passphrase is used, the
>  .Cm nwid
>  or
>  .Cm join
>  option must first be specified, since
>  .Nm
>  will hash the nwid along with the passphrase to create the key.
> +If a passphrase contains one or more whitespaces, it can be surrounded
> +by double quotes.

"can" means "you don't have to", which is not helpful in itself.

A shell may need quotes to pass one string instead of many, not ifconfig.
These are all identical when it comes to arguments ifconfig is going to
be executed with:

        # ifconfig athn0 nwid='my password'
        # ifconfig athn0 nwid="my password"
        # ifconfig athn0 nwid=my\ password
        # ifconfig athn0 'nwid=my password'
        # ifconfig athn0 'nwid=my password"

Quotes MUST NOT be used if you execve(2) this directly.

>  .It Cm -wpakey
>  Delete the pre-shared WPA key and disable WPA.
>  .It Cm wpaprotos Ar proto,proto,...
> 
> 
> 
> -- 
> greetings,
> 
> Florian Viehweger
> 

Reply via email to