Skip to contentSkip to conversation

selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration

PATCH In review Arnd Bergmann 3 participants 3 messages Feb 23, 2018 – Feb 24, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 selinux: fix typo in selinux_netlbl_sctp_sk_clone declaration

A missing 'struct' keyword caused a build error when CONFIG_NETLABEL is disabled:

In file included from security/selinux/hooks.c:99:
security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock'
static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)

                                                                  ^~~~

security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-declaration]

Fixes db97c9f9d312 ("selinux: Add SCTP support")
---
 security/selinux/include/netlabel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
security/selinux/include/netlabel.h +2 -1
index 6ef4953431dc..8671de09c363 100644
@@ -132,7 +132,8 @@ static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
 {
 	return;
 }
-static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
+static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
+						struct sock *newsk)
 {
 	return;
 }
Signature · 6 lines
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw
Quoted 7 lines · Arnd Bergmann

A missing 'struct' keyword caused a build error when CONFIG_NETLABEL is disabled:

In file included from security/selinux/hooks.c:99:
security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock'
static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)

                                                                  ^~~~
Quoted 8 lines

security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function-declaration]

Fixes db97c9f9d312 ("selinux: Add SCTP support")
---
 security/selinux/include/netlabel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Thanks, merged and pushed to selinux/next.

Richard was going to submit a patch for that, but I don't think he would mind you beating him :)

Quoted 17 lines
security/selinux/include/netlabel.h +2 -2
index 6ef4953431dc..8671de09c363 100644
@@ -132,7 +132,8 @@ static inline void selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
 {
        return;
 }
-static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk, sock *newsk)
+static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
+                                               struct sock *newsk)
 {
        return;
 }
--

2.9.0

Signature · 6 lines
paul moore
www.paul-moore.com
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
Quoted 24 lines · Paul Moore
Quoted 17 lines · Arnd Bergmann

A missing 'struct' keyword caused a build error when CONFIG_NETLABEL
is disabled:

In file included from security/selinux/hooks.c:99:
security/selinux/include/netlabel.h:135:66: error: unknown type name 'sock'
static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
sock *newsk)

                                                                  ^

~~~
security/selinux/hooks.c: In function 'selinux_sctp_sk_clone':
security/selinux/hooks.c:5188:2: error: implicit declaration of function 'selinux_netlbl_sctp_sk_clone'; did you mean 'selinux_netlbl_inet_csk_clone'? [-Werror=implicit-function- declaration]

Quoted 5 lines
Fixes db97c9f9d312 ("selinux: Add SCTP support")
---
 security/selinux/include/netlabel.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Quoted 4 lines

Thanks, merged and pushed to selinux/next.

Richard was going to submit a patch for that, but I don't think he would mind you beating him :)

Don't mind at all. What I will do then is fix the problem highlighted by [1] that affects "[PATCH V7 2/4] sctp: Add ip option support", I'll issue a V8 asap.

[1] https://lists.01.org/pipermail/kbuild-all/2018-February/043695.html

Quoted 13 lines
Quoted 13 lines
security/selinux/include/netlabel.h +0 -1
index 6ef4953431dc..8671de09c363 100644
@@ -132,7 +132,8 @@ static inline void
 selinux_netlbl_inet_csk_clone(struct sock *sk, u16 family)
 {
        return;
 }
-static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
 sock *newsk)
Quoted 10 lines
Quoted 8 lines
security/selinux/include/netlabel.h +2 -0
+static inline void selinux_netlbl_sctp_sk_clone(struct sock *sk,
+                                               struct sock *newsk)
 {
        return;

}
--
2.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html