diff options
author | delphij <delphij@FreeBSD.org> | 2009-11-12 19:02:10 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2009-11-12 19:02:10 +0000 |
commit | 8fed657163fb373990aaa15c79b58a7c963373b2 (patch) | |
tree | 16ac7b8e4875faf8659392bffa9753b287fa7398 /sys | |
parent | 2f448a4a2a88e26012aba2a9ddf375e1a9f2eed1 (diff) | |
download | FreeBSD-src-8fed657163fb373990aaa15c79b58a7c963373b2.zip FreeBSD-src-8fed657163fb373990aaa15c79b58a7c963373b2.tar.gz |
Revert revision 199201 for now as it has introduced a kernel vulnerability
and requires more polishing.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/kern_jail.c | 1 | ||||
-rw-r--r-- | sys/net/if.c | 41 | ||||
-rw-r--r-- | sys/net/if.h | 2 | ||||
-rw-r--r-- | sys/net/if_var.h | 3 | ||||
-rw-r--r-- | sys/sys/param.h | 2 | ||||
-rw-r--r-- | sys/sys/priv.h | 1 | ||||
-rw-r--r-- | sys/sys/sockio.h | 2 |
7 files changed, 2 insertions, 50 deletions
diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index e98c712..0cc330c 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3467,7 +3467,6 @@ prison_priv_check(struct ucred *cred, int priv) case PRIV_NET_SETIFMTU: case PRIV_NET_SETIFFLAGS: case PRIV_NET_SETIFCAP: - case PRIV_NET_SETIFDESCR: case PRIV_NET_SETIFNAME : case PRIV_NET_SETIFMETRIC: case PRIV_NET_SETIFPHYS: diff --git a/sys/net/if.c b/sys/net/if.c index 4ba453a..55de666 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -463,8 +463,6 @@ if_free_internal(struct ifnet *ifp) #ifdef MAC mac_ifnet_destroy(ifp); #endif /* MAC */ - if (ifp->if_description != NULL) - sbuf_delete(ifp->if_description); IF_AFDATA_DESTROY(ifp); IF_ADDR_LOCK_DESTROY(ifp); ifq_delete(&ifp->if_snd); @@ -2092,45 +2090,6 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, caddr_t data, struct thread *td) ifr->ifr_phys = ifp->if_physical; break; - case SIOCGIFDESCR: - IF_AFDATA_RLOCK(ifp); - if (ifp->if_description == NULL) - error = ENOMSG; - else - error = copystr(sbuf_data(ifp->if_description), - ifr->ifr_buffer.buffer, - ifr->ifr_buffer.length, NULL); - IF_AFDATA_RUNLOCK(ifp); - break; - - case SIOCSIFDESCR: - error = priv_check(td, PRIV_NET_SETIFDESCR); - if (error) - return (error); - - IF_AFDATA_WLOCK(ifp); - if (ifp->if_description == NULL) { - ifp->if_description = sbuf_new_auto(); - if (ifp->if_description == NULL) { - error = ENOMEM; - IF_AFDATA_WUNLOCK(ifp); - break; - } - } else - sbuf_clear(ifp->if_description); - - if (sbuf_copyin(ifp->if_description, ifr->ifr_buffer.buffer, - ifr->ifr_buffer.length) == -1) - error = EFAULT; - - if (error == 0) { - sbuf_finish(ifp->if_description); - getmicrotime(&ifp->if_lastchange); - } - IF_AFDATA_WUNLOCK(ifp); - - break; - case SIOCSIFFLAGS: error = priv_check(td, PRIV_NET_SETIFFLAGS); if (error) diff --git a/sys/net/if.h b/sys/net/if.h index 89f172b..857ab7f 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -294,7 +294,6 @@ struct ifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; - struct { size_t length; caddr_t buffer; } ifru_buffer; short ifru_flags[2]; short ifru_index; int ifru_jid; @@ -308,7 +307,6 @@ struct ifreq { #define ifr_addr ifr_ifru.ifru_addr /* address */ #define ifr_dstaddr ifr_ifru.ifru_dstaddr /* other end of p-to-p link */ #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ -#define ifr_buffer ifr_ifru.ifru_buffer /* user supplied buffer with its length */ #define ifr_flags ifr_ifru.ifru_flags[0] /* flags (low 16 bits) */ #define ifr_flagshigh ifr_ifru.ifru_flags[1] /* flags (high 16 bits) */ #define ifr_jid ifr_ifru.ifru_jid /* jail/vnet */ diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 82e7aab..523b9e8 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -198,7 +198,6 @@ struct ifnet { void *if_pf_kif; void *if_lagg; /* lagg glue */ u_char if_alloctype; /* if_type at time of allocation */ - struct sbuf *if_description; /* interface description */ /* * Spare fields are added so that we can modify sensitive data @@ -206,7 +205,7 @@ struct ifnet { * be used with care where binary compatibility is required. */ char if_cspare[3]; - void *if_pspare[7]; + void *if_pspare[8]; int if_ispare[4]; }; diff --git a/sys/sys/param.h b/sys/sys/param.h index a17151c..7bfab29 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 900003 /* Master, propagated to newvers */ +#define __FreeBSD_version 900002 /* Master, propagated to newvers */ #ifndef LOCORE #include <sys/types.h> diff --git a/sys/sys/priv.h b/sys/sys/priv.h index 5738fca..c8ccfa6 100644 --- a/sys/sys/priv.h +++ b/sys/sys/priv.h @@ -335,7 +335,6 @@ #define PRIV_NET_LAGG 415 /* Administer lagg interface. */ #define PRIV_NET_GIF 416 /* Administer gif interface. */ #define PRIV_NET_SETIFVNET 417 /* Move interface to vnet. */ -#define PRIV_NET_SETIFDESCR 418 /* Set interface description. */ /* * 802.11-related privileges. diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index 2af2467..a5911b7 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -82,8 +82,6 @@ #define SIOCGIFMAC _IOWR('i', 38, struct ifreq) /* get IF MAC label */ #define SIOCSIFMAC _IOW('i', 39, struct ifreq) /* set IF MAC label */ #define SIOCSIFNAME _IOW('i', 40, struct ifreq) /* set IF name */ -#define SIOCSIFDESCR _IOW('i', 41, struct ifreq) /* set ifnet descr */ -#define SIOCGIFDESCR _IOWR('i', 42, struct ifreq) /* get ifnet descr */ #define SIOCADDMULTI _IOW('i', 49, struct ifreq) /* add m'cast addr */ #define SIOCDELMULTI _IOW('i', 50, struct ifreq) /* del m'cast addr */ |