diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 18:01:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-07 18:01:06 +0000 |
commit | 1b7e045cbfcffa87d97ebc89d7c4a29a5befd460 (patch) | |
tree | f3ade963f00f3a3a6238ffb924cb0facd46f4641 /lib | |
parent | 1abf0ceeae707dc11623dd9c7ba71dd51859666b (diff) |
seed rresvport() for aux channel with a known taken port; do not ask for
next lower port because we might get it (and be predictable!)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/net/rcmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libc/net/rcmd.c b/lib/libc/net/rcmd.c index 86f35664e47..727a26e1732 100644 --- a/lib/libc/net/rcmd.c +++ b/lib/libc/net/rcmd.c @@ -133,7 +133,13 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) sigsetmask(oldmask); return (-1); } +#if 0 + /* + * try to rresvport() to the same port. This will make rresvport() + * fail it's first bind, resulting in it choosing a random port. + */ lport--; +#endif if (fd2p == 0) { write(s, "", 1); lport = 0; |