audit_arg.c (247602) | audit_arg.c (247667) |
---|---|
1/*- 2 * Copyright (c) 1999-2005 Apple Inc. 3 * 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999-2005 Apple Inc. 3 * 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 --- 14 unchanged lines hidden (view full) --- 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 26 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 * POSSIBILITY OF SUCH DAMAGE. 28 */ 29 30#include <sys/cdefs.h> |
31__FBSDID("$FreeBSD: head/sys/security/audit/audit_arg.c 247602 2013-03-02 00:53:12Z pjd $"); | 31__FBSDID("$FreeBSD: head/sys/security/audit/audit_arg.c 247667 2013-03-02 21:11:30Z pjd $"); |
32 33#include <sys/param.h> 34#include <sys/filedesc.h> 35#include <sys/ipc.h> 36#include <sys/mount.h> 37#include <sys/proc.h> 38#include <sys/socket.h> 39#include <sys/socketvar.h> --- 396 unchanged lines hidden (view full) --- 436 437 ar->k_ar.ar_arg_sockinfo.so_domain = sodomain; 438 ar->k_ar.ar_arg_sockinfo.so_type = sotype; 439 ar->k_ar.ar_arg_sockinfo.so_protocol = soprotocol; 440 ARG_SET_VALID(ar, ARG_SOCKINFO); 441} 442 443void | 32 33#include <sys/param.h> 34#include <sys/filedesc.h> 35#include <sys/ipc.h> 36#include <sys/mount.h> 37#include <sys/proc.h> 38#include <sys/socket.h> 39#include <sys/socketvar.h> --- 396 unchanged lines hidden (view full) --- 436 437 ar->k_ar.ar_arg_sockinfo.so_domain = sodomain; 438 ar->k_ar.ar_arg_sockinfo.so_type = sotype; 439 ar->k_ar.ar_arg_sockinfo.so_protocol = soprotocol; 440 ARG_SET_VALID(ar, ARG_SOCKINFO); 441} 442 443void |
444audit_arg_sockaddr(struct thread *td, struct sockaddr *sa) | 444audit_arg_sockaddr(struct thread *td, int dirfd, struct sockaddr *sa) |
445{ 446 struct kaudit_record *ar; 447 448 KASSERT(td != NULL, ("audit_arg_sockaddr: td == NULL")); 449 KASSERT(sa != NULL, ("audit_arg_sockaddr: sa == NULL")); 450 451 ar = currecord(); 452 if (ar == NULL) --- 5 unchanged lines hidden (view full) --- 458 ARG_SET_VALID(ar, ARG_SADDRINET); 459 break; 460 461 case AF_INET6: 462 ARG_SET_VALID(ar, ARG_SADDRINET6); 463 break; 464 465 case AF_UNIX: | 445{ 446 struct kaudit_record *ar; 447 448 KASSERT(td != NULL, ("audit_arg_sockaddr: td == NULL")); 449 KASSERT(sa != NULL, ("audit_arg_sockaddr: sa == NULL")); 450 451 ar = currecord(); 452 if (ar == NULL) --- 5 unchanged lines hidden (view full) --- 458 ARG_SET_VALID(ar, ARG_SADDRINET); 459 break; 460 461 case AF_INET6: 462 ARG_SET_VALID(ar, ARG_SADDRINET6); 463 break; 464 465 case AF_UNIX: |
466 audit_arg_upath1(td, AT_FDCWD, | 466 if (dirfd != AT_FDCWD) 467 audit_arg_atfd1(dirfd); 468 audit_arg_upath1(td, dirfd, |
467 ((struct sockaddr_un *)sa)->sun_path); 468 ARG_SET_VALID(ar, ARG_SADDRUNIX); 469 break; 470 /* XXXAUDIT: default:? */ 471 } 472} 473 474void --- 441 unchanged lines hidden --- | 469 ((struct sockaddr_un *)sa)->sun_path); 470 ARG_SET_VALID(ar, ARG_SADDRUNIX); 471 break; 472 /* XXXAUDIT: default:? */ 473 } 474} 475 476void --- 441 unchanged lines hidden --- |