Skip to content

Commit

Permalink
do not require root privilege for getsockopt(IPV6_2292HOPOPTS or
Browse files Browse the repository at this point in the history
IPV6_2292DSTOPTS) since these operations do not retrieve the actual header
values.
  • Loading branch information
jinmei committed Jul 1, 2003
1 parent a1bf8be commit 96300ef
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions kame/sys/netinet6/ip6_output.c
@@ -1,4 +1,4 @@
/* $KAME: ip6_output.c,v 1.385 2003/07/01 04:05:07 jinmei Exp $ */
/* $KAME: ip6_output.c,v 1.386 2003/07/01 04:07:11 jinmei Exp $ */

/*
* Copyright (c) 2002 INRIA. All rights reserved.
Expand Down Expand Up @@ -2875,10 +2875,6 @@ do { \
case IPV6_2292HOPOPTS:
case IPV6_2292RTHDR:
case IPV6_2292DSTOPTS:
if (optname == IPV6_2292HOPOPTS ||
optname == IPV6_2292DSTOPTS ||
!privileged)
return (EPERM);
switch (optname) {
case IPV6_2292PKTINFO:
optval = OPTBIT(IN6P_PKTINFO);
Expand All @@ -2887,16 +2883,12 @@ do { \
optval = OPTBIT(IN6P_HOPLIMIT);
break;
case IPV6_2292HOPOPTS:
if (!privileged)
return (EPERM);
optval = OPTBIT(IN6P_HOPOPTS);
break;
case IPV6_2292RTHDR:
optval = OPTBIT(IN6P_RTHDR);
break;
case IPV6_2292DSTOPTS:
if (!privileged)
return (EPERM);
optval = OPTBIT(IN6P_DSTOPTS|IN6P_RTHDRDSTOPTS);
break;
}
Expand Down

0 comments on commit 96300ef

Please sign in to comment.