linux/net/core/scm.c

// SPDX-License-Identifier: GPL-2.0-or-later
/* scm.c - Socket level control messages processing.
 *
 * Author:	Alexey Kuznetsov, <[email protected]>
 *              Alignment and value checking mods by Craig Metz
 */

#include <linux/module.h>
#include <linux/signal.h>
#include <linux/capability.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/sched/user.h>
#include <linux/mm.h>
#include <linux/kernel.h>
#include <linux/stat.h>
#include <linux/socket.h>
#include <linux/file.h>
#include <linux/fcntl.h>
#include <linux/net.h>
#include <linux/interrupt.h>
#include <linux/netdevice.h>
#include <linux/security.h>
#include <linux/pid_namespace.h>
#include <linux/pid.h>
#include <linux/nsproxy.h>
#include <linux/slab.h>
#include <linux/errqueue.h>
#include <linux/io_uring.h>

#include <linux/uaccess.h>

#include <net/protocol.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/compat.h>
#include <net/scm.h>
#include <net/cls_cgroup.h>
#include <net/af_unix.h>


/*
 *	Only allow a user to send credentials, that they could set with
 *	setu(g)id.
 */

static __inline__ int scm_check_creds(struct ucred *creds)
{}

static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
{}

void __scm_destroy(struct scm_cookie *scm)
{}
EXPORT_SYMBOL();

int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p)
{}
EXPORT_SYMBOL();

int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
{}
EXPORT_SYMBOL();

void put_cmsg_scm_timestamping64(struct msghdr *msg, struct scm_timestamping_internal *tss_internal)
{}
EXPORT_SYMBOL();

void put_cmsg_scm_timestamping(struct msghdr *msg, struct scm_timestamping_internal *tss_internal)
{}
EXPORT_SYMBOL();

static int scm_max_fds(struct msghdr *msg)
{}

void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm)
{}
EXPORT_SYMBOL();

struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
{}
EXPORT_SYMBOL();