astian:
>> AFAICT it's a no-op for stream sockets; might make sense to error
>> out unless ā€˜-uā€™ is set.
> 
> Right, so it could be something like:
> 
> -     } else if (argc == 1 && !pflag && !sflag) {
> +     } else if (argc == 1 && !pflag && (!sflag || (family == AF_UNIX && 
> uflag))) {
> 
> Or using the previously suggested diff and adding a dedicated check in
> the if group below:
> 
>       if (family == AF_UNIX) {
>  ...
> +             if (sflag && !uflag)
> +                     errx(1, "for unix sockets -s is only valid together "
> +                         "with -u");

Actually there are still issues here.  I'll write tomorrow.

Cheers.

Reply via email to