On 07/31/2018 02:50 PM, Michael Shell wrote:
On Mon, 30 Jul 2018 20:05:54 +0100
spiky <[email protected]> wrote:

../src/journal/journald-server.c:1134:45: error: 'SCM_SECURITY'
undeclared (first use in this function); did you mean 'PF_SECURITY'?
                            cmsg->cmsg_type == SCM_SECURITY) {
                                               ^~~~~~~~~~~~


SCM_SECURITY is defined in the Linux kernel headers in
/include/linux/socket.h

https://elixir.bootlin.com/linux/latest/source/include/linux/socket.h#L152


/* "Socket"-level control message types: */

#define SCM_RIGHTS      0x01            /* rw: access rights (array of int) */
#define SCM_CREDENTIALS 0x02            /* rw: struct ucred             */
#define SCM_SECURITY    0x03            /* rw: security label           */


However, given that we are supposed to use "sanitized" kernel headers,
it is glibc's job to export these values. I believe this is done in
/usr/include/bits/socket.h

What version of glibc are you using? Perhaps older versions don't define
SCM_SECURITY?

Can someone with a recent glibc system verify that SCM_SECURITY is indeed
defined in /usr/include/bits/socket.h ?

It is not. I do not find SCM_SECURITY anywhere in the /usr/include directory tree,


FWIW, all the header include files that have references to SCM_SECURITY
can be found using:

cd /usr/include
find . -type f -name "*.h" -print|sort|xargs grep SCM_SECURITY

or 'grep -r SCM_SECURITY *'

You can either add the SCM_ defs to your /usr/include/bits/socket.h or add
them to your systemd's journald-server.c

In systemd's src/basic/missing.h is:

#ifndef SCM_SECURITY
#define SCM_SECURITY 0x03
#endif

Shouldn't that take care of it? missing.h is included in src/journal/journald-server.c.

SCM_RIGHTS is defined in /usr/include/bits/socket.h as is SCM_CREDENTIALS

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to