aboutsummaryrefslogtreecommitdiffstats
path: root/security/smack/smackfs.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2009-09-22 19:43:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 10:39:29 -0400
commit88e9d34c727883d7d6f02cf1475b3ec98b8480c7 (patch)
tree475f544536d52739e0929e7727cab5124e855a06 /security/smack/smackfs.c
parentb7ed698cc9d556306a4088c238e2ea9311ea2cb3 (diff)
seq_file: constify seq_operations
Make all seq_operations structs const, to help mitigate against revectoring user-triggerable function pointers. This is derived from the grsecurity patch, although generated from scratch because it's simpler than extracting the changes from there. Signed-off-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Acked-by: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'security/smack/smackfs.c')
-rw-r--r--security/smack/smackfs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index f83a80980726..aeead7585093 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -187,7 +187,7 @@ static void load_seq_stop(struct seq_file *s, void *v)
187 /* No-op */ 187 /* No-op */
188} 188}
189 189
190static struct seq_operations load_seq_ops = { 190static const struct seq_operations load_seq_ops = {
191 .start = load_seq_start, 191 .start = load_seq_start,
192 .next = load_seq_next, 192 .next = load_seq_next,
193 .show = load_seq_show, 193 .show = load_seq_show,
@@ -503,7 +503,7 @@ static void cipso_seq_stop(struct seq_file *s, void *v)
503 /* No-op */ 503 /* No-op */
504} 504}
505 505
506static struct seq_operations cipso_seq_ops = { 506static const struct seq_operations cipso_seq_ops = {
507 .start = cipso_seq_start, 507 .start = cipso_seq_start,
508 .stop = cipso_seq_stop, 508 .stop = cipso_seq_stop,
509 .next = cipso_seq_next, 509 .next = cipso_seq_next,
@@ -697,7 +697,7 @@ static void netlbladdr_seq_stop(struct seq_file *s, void *v)
697 /* No-op */ 697 /* No-op */
698} 698}
699 699
700static struct seq_operations netlbladdr_seq_ops = { 700static const struct seq_operations netlbladdr_seq_ops = {
701 .start = netlbladdr_seq_start, 701 .start = netlbladdr_seq_start,
702 .stop = netlbladdr_seq_stop, 702 .stop = netlbladdr_seq_stop,
703 .next = netlbladdr_seq_next, 703 .next = netlbladdr_seq_next,