> When nc(1) tries to connect through an HTTP proxy that requires
> authentication, nc calls readpassphrase(3) and aborts. Pledging "tty"
> fixes this problem, but you'll notice that the diff has a lot of nasty
> branches. My failure to check Pflag when connecting over unix sockets
> is not an oversight; nc does not support that configuration.
> 
> To reproduce the failure without setting up a real HTTP proxy, open
> two terminals and run nc as a coprocess in the first. The following
> session causes a core dump:
>   (tty1)$ nc -lk 8080 |&
>   (tty2)$ nc -Xconnect -xlocalhost:8080 -Puser localhost 8081
>   (tty1)$ print -np "HTTP/1.0 407 Authentication Required\r\n\r\n"
>   (tty2) Abort trap (core dumped)

The diff looks right to me.

Reply via email to