summaryrefslogtreecommitdiff
path: root/sbin/dump/dumprmt.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-09-02 22:15:03 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-09-02 22:15:03 +0000
commit3d4a6faa2f83a7240e01d94d20e717cda96a7a40 (patch)
tree52d5b80bdccef2cce0f6960bae2a6d17a93d8e07 /sbin/dump/dumprmt.c
parentf4888595b8c9e58bf803560df2fee57369f05d12 (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.c4
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");