patch-2.1.20 linux/net/core/scm.c
Next file: linux/net/core/skbuff.c
Previous file: linux/net/core/net_alias.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Thu Jan 2 15:13:28 1997
- Orig file:
v2.1.19/linux/net/core/scm.c
- Orig date:
Thu Dec 12 19:37:24 1996
diff -u --recursive --new-file v2.1.19/linux/net/core/scm.c linux/net/core/scm.c
@@ -37,7 +37,8 @@
/*
- * Allow to send credentials, that user could set with setu(g)id.
+ * Only allow a user to send credentials, that they could set with
+ * setu(g)id.
*/
static __inline__ int scm_check_creds(struct ucred *creds)
@@ -54,8 +55,7 @@
}
-static int
-scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
+static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp)
{
int num;
struct scm_fp_list *fpl = *fplp;
@@ -124,7 +124,7 @@
-static __inline__ int not_one_bit(unsigned val)
+extern __inline__ int not_one_bit(unsigned val)
{
return (val-1) & val;
}
@@ -138,16 +138,18 @@
int acc_fd;
unsigned scm_flags=0;
- for (cmsg = KCMSG_FIRSTHDR(msg); cmsg; cmsg = KCMSG_NXTHDR(msg, cmsg)) {
+ for (cmsg = KCMSG_FIRSTHDR(msg); cmsg; cmsg = KCMSG_NXTHDR(msg, cmsg))
+ {
if (kcm.cmsg_level != SOL_SOCKET)
continue;
err = -EINVAL;
/*
- * Temporary hack: no protocols except for AF_UNIX
- * undestand scm now.
+ * Temporary hack: no protocols except for AF_UNIX
+ * undestand scm now.
*/
+
if (sock->ops->family != AF_UNIX)
goto error;
@@ -285,7 +287,7 @@
scm->fp = NULL;
}
-struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl)
+struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
{
int i;
struct scm_fp_list *new_fpl;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov