提交 0e38c358 编写于 作者: J James Morris

Merge branch 'smack-for-4.3' of https://github.com/cschaufler/smack-next into next

...@@ -57,15 +57,7 @@ LIST_HEAD(smk_ipv6_port_list); ...@@ -57,15 +57,7 @@ LIST_HEAD(smk_ipv6_port_list);
static struct kmem_cache *smack_inode_cache; static struct kmem_cache *smack_inode_cache;
int smack_enabled; int smack_enabled;
#ifdef CONFIG_SECURITY_SMACK_BRINGUP static const match_table_t smk_mount_tokens = {
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_fsdefault, SMK_FSDEFAULT "%s"},
{Opt_fsfloor, SMK_FSFLOOR "%s"}, {Opt_fsfloor, SMK_FSFLOOR "%s"},
{Opt_fshat, SMK_FSHAT "%s"}, {Opt_fshat, SMK_FSHAT "%s"},
...@@ -74,6 +66,14 @@ static const match_table_t tokens = { ...@@ -74,6 +66,14 @@ static const match_table_t tokens = {
{Opt_error, NULL}, {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) static void smk_bu_mode(int mode, char *s)
{ {
int i = 0; int i = 0;
...@@ -599,9 +599,14 @@ static int smack_parse_opts_str(char *options, ...@@ -599,9 +599,14 @@ static int smack_parse_opts_str(char *options,
struct security_mnt_opts *opts) struct security_mnt_opts *opts)
{ {
char *p; char *p;
char *fsdefault = NULL, *fsfloor = NULL; char *fsdefault = NULL;
char *fshat = NULL, *fsroot = NULL, *fstransmute = NULL; char *fsfloor = NULL;
int rc = -ENOMEM, num_mnt_opts = 0; char *fshat = NULL;
char *fsroot = NULL;
char *fstransmute = NULL;
int rc = -ENOMEM;
int num_mnt_opts = 0;
int token;
opts->num_mnt_opts = 0; opts->num_mnt_opts = 0;
...@@ -609,13 +614,12 @@ static int smack_parse_opts_str(char *options, ...@@ -609,13 +614,12 @@ static int smack_parse_opts_str(char *options,
return 0; return 0;
while ((p = strsep(&options, ",")) != NULL) { while ((p = strsep(&options, ",")) != NULL) {
int token;
substring_t args[MAX_OPT_ARGS]; substring_t args[MAX_OPT_ARGS];
if (!*p) if (!*p)
continue; continue;
token = match_token(p, tokens, args); token = match_token(p, smk_mount_tokens, args);
switch (token) { switch (token) {
case Opt_fsdefault: case Opt_fsdefault:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册