diff options
| author | deraadt <> | 1996-08-07 18:01:05 +0000 |
|---|---|---|
| committer | deraadt <> | 1996-08-07 18:01:05 +0000 |
| commit | 4057f528769010da9112e87d719102cb0aa75dbc (patch) | |
| tree | c173844f16b66d316b940712e6ec040c0edd8239 /src/lib/libc/net | |
| parent | 5a58fd166c74849bfb2cf8de982fe15a3d064852 (diff) | |
| download | openbsd-4057f528769010da9112e87d719102cb0aa75dbc.tar.gz openbsd-4057f528769010da9112e87d719102cb0aa75dbc.tar.bz2 openbsd-4057f528769010da9112e87d719102cb0aa75dbc.zip | |
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 'src/lib/libc/net')
| -rw-r--r-- | src/lib/libc/net/rcmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/libc/net/rcmd.c b/src/lib/libc/net/rcmd.c index 86f35664e4..727a26e173 100644 --- a/src/lib/libc/net/rcmd.c +++ b/src/lib/libc/net/rcmd.c | |||
| @@ -133,7 +133,13 @@ rcmd(ahost, rport, locuser, remuser, cmd, fd2p) | |||
| 133 | sigsetmask(oldmask); | 133 | sigsetmask(oldmask); |
| 134 | return (-1); | 134 | return (-1); |
| 135 | } | 135 | } |
| 136 | #if 0 | ||
| 137 | /* | ||
| 138 | * try to rresvport() to the same port. This will make rresvport() | ||
| 139 | * fail it's first bind, resulting in it choosing a random port. | ||
| 140 | */ | ||
| 136 | lport--; | 141 | lport--; |
| 142 | #endif | ||
| 137 | if (fd2p == 0) { | 143 | if (fd2p == 0) { |
| 138 | write(s, "", 1); | 144 | write(s, "", 1); |
| 139 | lport = 0; | 145 | lport = 0; |
