astian: > 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.
Issue is that this still leaves '-s' as a no-op if '-l' is also given. Upstream always disallows combining those two, but here an added !lflag is needed, for example: - } else if (argc == 1 && !pflag && !sflag) { + } else if (argc == 1 && !pflag && (!sflag || (family == AF_UNIX && uflag && !lflag))) { Cheers.