diff options
author | Mark Johnston <markj@FreeBSD.org> | 2020-07-09 17:26:49 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2020-07-09 17:26:49 +0000 |
commit | f4f16af1d38367e68bee456af2d7e284f6aad87d (patch) | |
tree | a5530222954ca32be8387cd853ddb19496039b48 /lib/libc/sys | |
parent | 201a1f34da99120214f49ac573ddec97c363c1a5 (diff) | |
download | src-f4f16af1d38367e68bee456af2d7e284f6aad87d.tar.gz src-f4f16af1d38367e68bee456af2d7e284f6aad87d.zip |
Avoid copying out kernel pointers from msgctl(IPC_STAT).
While this behaviour is harmless, it is really just an artifact of the
fact that the msgctl(2) implementation uses a user-visible structure as
part of the internal implementation, so it is not deliberate and these
pointers are not useful to userspace. Thus, NULL them out before
copying out, and remove references to them from the manual page.
Reported by: Jeffball <jeffball@grimm-co.com>
Reviewed by: emaste, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D25600
Notes
Notes:
svn path=/head/; revision=363051
Diffstat (limited to 'lib/libc/sys')
-rw-r--r-- | lib/libc/sys/msgctl.2 | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libc/sys/msgctl.2 b/lib/libc/sys/msgctl.2 index 1ca61ed77b2a..745b365c4d93 100644 --- a/lib/libc/sys/msgctl.2 +++ b/lib/libc/sys/msgctl.2 @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd July 9, 2009 +.Dd July 9, 2020 .Dt MSGCTL 2 .Os .Sh NAME @@ -63,8 +63,6 @@ and contains (amongst others) the following members: .Bd -literal struct msqid_ds { struct ipc_perm msg_perm; /* msg queue permission bits */ - struct msg *__msg_first; /* kernel data, don't use */ - struct msg *__msg_last; /* kernel data, don't use */ msglen_t msg_cbytes; /* number of bytes in use on the queue */ msgqnum_t msg_qnum; /* number of msgs in the queue */ msglen_t msg_qbytes; /* max # of bytes on the queue */ |