diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-02 22:15:03 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1996-09-02 22:15:03 +0000 |
commit | 3d4a6faa2f83a7240e01d94d20e717cda96a7a40 (patch) | |
tree | 52d5b80bdccef2cce0f6960bae2a6d17a93d8e07 /sbin/dump/dumprmt.c | |
parent | f4888595b8c9e58bf803560df2fee57369f05d12 (diff) |
don't try to do setsockopt(TCP_MAXSEG) unless we are root.
Diffstat (limited to 'sbin/dump/dumprmt.c')
-rw-r--r-- | sbin/dump/dumprmt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index 3bce33489ed..0fa596fdd2a 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dumprmt.c,v 1.4 1996/09/01 15:31:02 deraadt Exp $ */ +/* $OpenBSD: dumprmt.c,v 1.5 1996/09/02 22:15:02 millert Exp $ */ /* $NetBSD: dumprmt.c,v 1.10 1996/03/15 22:39:26 scottr Exp $ */ /*- @@ -159,7 +159,7 @@ rmtgetconn() size -= TP_BSIZE; (void)setsockopt(rmtape, SOL_SOCKET, SO_RCVBUF, &size, sizeof (size)); maxseg = 1024; - if (setsockopt(rmtape, IPPROTO_TCP, TCP_MAXSEG, + if (getuid() == 0 && setsockopt(rmtape, IPPROTO_TCP, TCP_MAXSEG, &maxseg, sizeof (maxseg)) < 0) perror("TCP_MAXSEG setsockopt"); |