Replace a suser() check with an explicit check for PRIV_NET_SETIFMTU.

This commit is contained in:
Robert Watson 2007-02-20 15:20:36 +00:00
parent b8c4cc421e
commit bd146f1302

View File

@ -719,7 +719,8 @@ pppsioctl(ifp, cmd, data)
* XXXRW: Isn't this suser() check redundant to the one at the ifnet
* layer?
*/
if ((error = suser(td)) != 0)
error = priv_check(td, PRIV_NET_SETIFMTU);
if (error)
break;
if (ifr->ifr_mtu > PPP_MAXMTU)
error = EINVAL;