[PATCH RFC 10/11] Smack: sendmsg compile error fix

Casey Schaufler casey at schaufler-ca.com
Wed Apr 5 21:54:24 UTC 2017


Subject: [PATCH RFC 10/11] Smack: sendmsg compile error fix

Move the declaration of ssp out of ifdefs as it's now
always required.

Signed-off-by: Casey Schaufler <casey at schaufler-ca.com>

---
 security/smack/smack_lsm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index e1264b9..2ac6d33 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -3637,11 +3637,11 @@ static int smack_socket_sendmsg(struct socket *sock, struct msghdr *msg,
 				int size, struct netlbl_lsm_secattr **attrs)
 {
 	struct sockaddr_in *sip = (struct sockaddr_in *) msg->msg_name;
+	struct socket_smack *ssp = smack_sock(sock->sk);
 #if IS_ENABLED(CONFIG_IPV6)
 	struct sockaddr_in6 *sap = (struct sockaddr_in6 *) msg->msg_name;
 #endif
 #ifdef SMACK_IPV6_SECMARK_LABELING
-	struct socket_smack *ssp = smack_sock(sock->sk);
 	struct smack_known *rsp;
 #endif
 	int rc = 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



More information about the Linux-security-module-archive mailing list