public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
To: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: t.vivek@samsung.com, a.sahrawat@samsung.com,
	casey@schaufler-ca.com, james.l.morris@oracle.com,
	serge@hallyn.com, Murilo Opsfelder Araujo <mopsfelder@gmail.com>
Subject: [PATCH] security/smack/smack_lsm.c: Fix build error when CONFIG_SECURITY_SMACK_BRINGUP is not defined
Date: Thu, 13 Aug 2015 21:52:47 -0300	[thread overview]
Message-ID: <1439513567-5347-1-git-send-email-mopsfelder@gmail.com> (raw)

This change fixes the following build error when
CONFIG_SECURITY_SMACK_BRINGUP is not defined:

security/smack/smack_lsm.c: In function ‘smack_parse_opts_str’:
security/smack/smack_lsm.c:618:26: error: ‘tokens’ undeclared (first use in this function)
   token = match_token(p, tokens, args);
                          ^
security/smack/smack_lsm.c:618:26: note: each undeclared identifier is reported only once for each function it appears in

The above has been introduced by commit
3bf2789cad9e6573dc19a6c3d123c2c049f2d90f "smack: allow mount opts setting over filesystems with binary mount data".

Signed-off-by: Murilo Opsfelder Araujo <mopsfelder@gmail.com>
---
 security/smack/smack_lsm.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index 54fb3a1..6201907 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -57,14 +57,6 @@ LIST_HEAD(smk_ipv6_port_list);
 static struct kmem_cache *smack_inode_cache;
 int smack_enabled;
 
-#ifdef CONFIG_SECURITY_SMACK_BRINGUP
-static char *smk_bu_mess[] = {
-	"Bringup Error",	/* Unused */
-	"Bringup",		/* SMACK_BRINGUP_ALLOW */
-	"Unconfined Subject",	/* SMACK_UNCONFINED_SUBJECT */
-	"Unconfined Object",	/* SMACK_UNCONFINED_OBJECT */
-};
-
 static const match_table_t tokens = {
 	{Opt_fsdefault, SMK_FSDEFAULT "%s"},
 	{Opt_fsfloor, SMK_FSFLOOR "%s"},
@@ -74,6 +66,14 @@ static const match_table_t tokens = {
 	{Opt_error, NULL},
 };
 
+#ifdef CONFIG_SECURITY_SMACK_BRINGUP
+static char *smk_bu_mess[] = {
+	"Bringup Error",	/* Unused */
+	"Bringup",		/* SMACK_BRINGUP_ALLOW */
+	"Unconfined Subject",	/* SMACK_UNCONFINED_SUBJECT */
+	"Unconfined Object",	/* SMACK_UNCONFINED_OBJECT */
+};
+
 static void smk_bu_mode(int mode, char *s)
 {
 	int i = 0;
-- 
2.1.4


             reply	other threads:[~2015-08-14  0:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  0:52 Murilo Opsfelder Araujo [this message]
2015-08-14  4:06 ` [PATCH] security/smack/smack_lsm.c: Fix build error when CONFIG_SECURITY_SMACK_BRINGUP is not defined Casey Schaufler
2015-08-19 13:35   ` Murilo Opsfelder Araújo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1439513567-5347-1-git-send-email-mopsfelder@gmail.com \
    --to=mopsfelder@gmail.com \
    --cc=a.sahrawat@samsung.com \
    --cc=casey@schaufler-ca.com \
    --cc=james.l.morris@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=serge@hallyn.com \
    --cc=t.vivek@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox