uipc_socket.c (122775) | uipc_socket.c (122807) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 34 */ 35 36#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 20 unchanged lines hidden (view full) --- 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94 34 */ 35 36#include <sys/cdefs.h> |
37__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 122775 2003-11-16 03:53:36Z rwatson $"); | 37__FBSDID("$FreeBSD: head/sys/kern/uipc_socket.c 122807 2003-11-16 18:25:20Z rwatson $"); |
38 39#include "opt_inet.h" 40#include "opt_mac.h" 41#include "opt_zero.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/fcntl.h> --- 1401 unchanged lines hidden (view full) --- 1447 } 1448 break; 1449 case SO_LABEL: 1450#ifdef MAC 1451 error = sooptcopyin(sopt, &extmac, sizeof extmac, 1452 sizeof extmac); 1453 if (error) 1454 goto bad; | 38 39#include "opt_inet.h" 40#include "opt_mac.h" 41#include "opt_zero.h" 42 43#include <sys/param.h> 44#include <sys/systm.h> 45#include <sys/fcntl.h> --- 1401 unchanged lines hidden (view full) --- 1447 } 1448 break; 1449 case SO_LABEL: 1450#ifdef MAC 1451 error = sooptcopyin(sopt, &extmac, sizeof extmac, 1452 sizeof extmac); 1453 if (error) 1454 goto bad; |
1455 1456 error = mac_setsockopt_label_set( 1457 sopt->sopt_td->td_ucred, so, &extmac); 1458 | 1455 error = mac_setsockopt_label(sopt->sopt_td->td_ucred, 1456 so, &extmac); |
1459#else 1460 error = EOPNOTSUPP; 1461#endif 1462 break; 1463 default: 1464 error = ENOPROTOOPT; 1465 break; 1466 } --- 131 unchanged lines hidden (view full) --- 1598 error = sooptcopyout(sopt, &tv, sizeof tv); 1599 break; 1600 case SO_LABEL: 1601#ifdef MAC 1602 error = sooptcopyin(sopt, &extmac, sizeof(extmac), 1603 sizeof(extmac)); 1604 if (error) 1605 return (error); | 1457#else 1458 error = EOPNOTSUPP; 1459#endif 1460 break; 1461 default: 1462 error = ENOPROTOOPT; 1463 break; 1464 } --- 131 unchanged lines hidden (view full) --- 1596 error = sooptcopyout(sopt, &tv, sizeof tv); 1597 break; 1598 case SO_LABEL: 1599#ifdef MAC 1600 error = sooptcopyin(sopt, &extmac, sizeof(extmac), 1601 sizeof(extmac)); 1602 if (error) 1603 return (error); |
1606 error = mac_getsockopt_label_get( 1607 sopt->sopt_td->td_ucred, so, &extmac); | 1604 error = mac_getsockopt_label(sopt->sopt_td->td_ucred, 1605 so, &extmac); |
1608 if (error) 1609 return (error); 1610 error = sooptcopyout(sopt, &extmac, sizeof extmac); 1611#else 1612 error = EOPNOTSUPP; 1613#endif 1614 break; 1615 case SO_PEERLABEL: 1616#ifdef MAC 1617 error = sooptcopyin(sopt, &extmac, sizeof(extmac), 1618 sizeof(extmac)); 1619 if (error) 1620 return (error); | 1606 if (error) 1607 return (error); 1608 error = sooptcopyout(sopt, &extmac, sizeof extmac); 1609#else 1610 error = EOPNOTSUPP; 1611#endif 1612 break; 1613 case SO_PEERLABEL: 1614#ifdef MAC 1615 error = sooptcopyin(sopt, &extmac, sizeof(extmac), 1616 sizeof(extmac)); 1617 if (error) 1618 return (error); |
1621 error = mac_getsockopt_peerlabel_get( | 1619 error = mac_getsockopt_peerlabel( |
1622 sopt->sopt_td->td_ucred, so, &extmac); 1623 if (error) 1624 return (error); 1625 error = sooptcopyout(sopt, &extmac, sizeof extmac); 1626#else 1627 error = EOPNOTSUPP; 1628#endif 1629 break; --- 285 unchanged lines hidden --- | 1620 sopt->sopt_td->td_ucred, so, &extmac); 1621 if (error) 1622 return (error); 1623 error = sooptcopyout(sopt, &extmac, sizeof extmac); 1624#else 1625 error = EOPNOTSUPP; 1626#endif 1627 break; --- 285 unchanged lines hidden --- |