Skip to content

Commit

Permalink
Merge branch 'next' of git://github.com/cschaufler/smack-next
Browse files Browse the repository at this point in the history
  • Loading branch information
sfrothwell committed Jun 21, 2022
2 parents c7f7d4a + b505039 commit 014f643
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 2 additions & 5 deletions security/smack/smack_access.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,9 @@ char *smk_parse_smack(const char *string, int len)
if (i == 0 || i >= SMK_LONGLABEL)
return ERR_PTR(-EINVAL);

smack = kzalloc(i + 1, GFP_NOFS);
if (smack == NULL)
smack = kstrndup(string, i, GFP_NOFS);
if (!smack)
return ERR_PTR(-ENOMEM);

strncpy(smack, string, i);

return smack;
}

Expand Down
7 changes: 0 additions & 7 deletions security/smack/smack_lsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,13 +766,6 @@ static int smack_set_mnt_opts(struct super_block *sb,
if (sp->smk_flags & SMK_SB_INITIALIZED)
return 0;

if (inode->i_security == NULL) {
int rc = lsm_inode_alloc(inode);

if (rc)
return rc;
}

if (!smack_privileged(CAP_MAC_ADMIN)) {
/*
* Unprivileged mounts don't get to specify Smack values.
Expand Down

0 comments on commit 014f643

Please sign in to comment.