sys_socket.c (b864b67a0d197f59ecf6698940600956ceee2cae) sys_socket.c (2b68eb8e1dbbdaf6a0df1c83b26f5403ca52d4c3)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1982, 1986, 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 287 unchanged lines hidden (view full) ---

296 error = mac_socket_check_poll(active_cred, so);
297 if (error)
298 return (error);
299#endif
300 return (sopoll(so, events, fp->f_cred, td));
301}
302
303static int
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1982, 1986, 1990, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 287 unchanged lines hidden (view full) ---

296 error = mac_socket_check_poll(active_cred, so);
297 if (error)
298 return (error);
299#endif
300 return (sopoll(so, events, fp->f_cred, td));
301}
302
303static int
304soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred,
305 struct thread *td)
304soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred)
306{
307 struct socket *so = fp->f_data;
308 int error;
309
310 bzero((caddr_t)ub, sizeof (*ub));
311 ub->st_mode = S_IFSOCK;
312#ifdef MAC
313 error = mac_socket_check_stat(active_cred, so);

--- 532 unchanged lines hidden ---
305{
306 struct socket *so = fp->f_data;
307 int error;
308
309 bzero((caddr_t)ub, sizeof (*ub));
310 ub->st_mode = S_IFSOCK;
311#ifdef MAC
312 error = mac_socket_check_stat(active_cred, so);

--- 532 unchanged lines hidden ---