diff options
author | avg <avg@FreeBSD.org> | 2011-03-31 08:14:51 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2011-03-31 08:14:51 +0000 |
commit | 94ec7d298848badbf8397b4223feb987bc9a8d38 (patch) | |
tree | 4afc5ac2f750fe75afdbb0f08215ca8ed357c742 | |
parent | 6f4c1d61a6931faa198ead443a8df2a9b2e70982 (diff) | |
download | FreeBSD-src-94ec7d298848badbf8397b4223feb987bc9a8d38.zip FreeBSD-src-94ec7d298848badbf8397b4223feb987bc9a8d38.tar.gz |
Revert r220032:linux compat: add SO_PASSCRED option with basic handling
I have not properly thought through the commit. After r220031 (linux
compat: improve and fix sendmsg/recvmsg compatibility) the basic
handling for SO_PASSCRED is not sufficient as it breaks recvmsg
functionality for SCM_CREDS messages because now we would need to handle
sockcred data in addition to cmsgcred. And that is not implemented yet.
Pointyhat to: avg
-rw-r--r-- | sys/amd64/linux32/linux.h | 1 | ||||
-rw-r--r-- | sys/compat/linux/linux_socket.c | 14 | ||||
-rw-r--r-- | sys/i386/linux/linux.h | 1 |
3 files changed, 0 insertions, 16 deletions
diff --git a/sys/amd64/linux32/linux.h b/sys/amd64/linux32/linux.h index 4ed8522..4a5ec01 100644 --- a/sys/amd64/linux32/linux.h +++ b/sys/amd64/linux32/linux.h @@ -695,7 +695,6 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 -#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 0fe0dc6..6940e45 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -300,8 +300,6 @@ linux_to_bsd_so_sockopt(int opt) return (SO_OOBINLINE); case LINUX_SO_LINGER: return (SO_LINGER); - case LINUX_SO_PASSCRED: - return (LOCAL_CREDS); case LINUX_SO_PEERCRED: return (LOCAL_PEERCRED); case LINUX_SO_RCVLOWAT: @@ -1469,12 +1467,6 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); - switch (args->optname) { - case LINUX_SO_PASSCRED: - /* FreeBSD bug? socket level opts at non socket level */ - bsd_args.level = 0; - break; - } switch (name) { case SO_RCVTIMEO: /* FALLTHROUGH */ @@ -1552,12 +1544,6 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args) switch (bsd_args.level) { case SOL_SOCKET: name = linux_to_bsd_so_sockopt(args->optname); - switch (args->optname) { - case LINUX_SO_PASSCRED: - /* FreeBSD bug? socket level opts at non socket level */ - bsd_args.level = 0; - break; - } switch (name) { case SO_RCVTIMEO: /* FALLTHROUGH */ diff --git a/sys/i386/linux/linux.h b/sys/i386/linux/linux.h index 03da736..d02614b 100644 --- a/sys/i386/linux/linux.h +++ b/sys/i386/linux/linux.h @@ -671,7 +671,6 @@ union l_semun { #define LINUX_SO_NO_CHECK 11 #define LINUX_SO_PRIORITY 12 #define LINUX_SO_LINGER 13 -#define LINUX_SO_PASSCRED 16 #define LINUX_SO_PEERCRED 17 #define LINUX_SO_RCVLOWAT 18 #define LINUX_SO_SNDLOWAT 19 |