From: wzt wzt <wzt.wzt@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: jmorris@namei.org
Subject: [PATCH] security/smack/smack.h: Fix smk_known length
Date: Mon, 8 Feb 2010 19:41:16 +0800 [thread overview]
Message-ID: <628d1651002080341k34331712l55797971b3546ba4@mail.gmail.com> (raw)
in security/smack/smack.h:
struct smack_known {
struct list_head list;
char smk_known[SMK_LABELLEN];
but in security/smack/smack_access.c
void smack_from_cipso(u32 level, char *cp, char *result)
{
strncpy(result, final, SMK_MAXLEN);
}
miss '\0'.
Signed-off-by: wzt <wzt.wzt@gmail.com>
Cc: Jmorris <jmorris@namei.org>
diff --git a/security/smack/smack.h b/security/smack/smack.h
index c6e9aca..600474b 100644
--- a/security/smack/smack.h
+++ b/security/smack/smack.h
@@ -109,7 +109,7 @@ struct smk_netlbladdr {
*/
struct smack_known {
struct list_head list;
- char smk_known[SMK_LABELLEN];
+ char smk_known[SMK_LABELLEN + 1]; /*
smk_known + \0 */
u32 smk_secid;
struct smack_cipso *smk_cipso;
spinlock_t smk_cipsolock; /* for changing cipso map */
next reply other threads:[~2010-02-08 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 11:41 wzt wzt [this message]
2010-02-08 21:28 ` James Morris
2010-02-09 3:14 ` Casey Schaufler
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=628d1651002080341k34331712l55797971b3546ba4@mail.gmail.com \
--to=wzt.wzt@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®