Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
9b0271d8
Commit
9b0271d8
authored
Apr 02, 2013
by
James Morris
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'stage-for-3.10' of
git://git.gitorious.org/smack-next/kernel
into ra-next
parents
d1327479
cdb56b60
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
187 additions
and
89 deletions
+187
-89
Documentation/security/Smack.txt
Documentation/security/Smack.txt
+11
-0
include/uapi/linux/magic.h
include/uapi/linux/magic.h
+1
-0
security/smack/smack.h
security/smack/smack.h
+0
-5
security/smack/smack_access.c
security/smack/smack_access.c
+2
-0
security/smack/smack_lsm.c
security/smack/smack_lsm.c
+2
-2
security/smack/smackfs.c
security/smack/smackfs.c
+171
-82
No files found.
Documentation/security/Smack.txt
View file @
9b0271d8
...
...
@@ -117,6 +117,17 @@ access2
ambient
This contains the Smack label applied to unlabeled network
packets.
change-rule
This interface allows modification of existing access control rules.
The format accepted on write is:
"%s %s %s %s"
where the first string is the subject label, the second the
object label, the third the access to allow and the fourth the
access to deny. The access strings may contain only the characters
"rwxat-". If a rule for a given subject and object exists it will be
modified by enabling the permissions in the third string and disabling
those in the fourth string. If there is no such rule it will be
created using the access specified in the third and the fourth strings.
cipso
This interface allows a specific CIPSO header to be assigned
to a Smack label. The format accepted on write is:
...
...
include/uapi/linux/magic.h
View file @
9b0271d8
...
...
@@ -11,6 +11,7 @@
#define DEBUGFS_MAGIC 0x64626720
#define SECURITYFS_MAGIC 0x73636673
#define SELINUX_MAGIC 0xf97cff8c
#define SMACK_MAGIC 0x43415d53
/* "SMAC" */
#define RAMFS_MAGIC 0x858458f6
/* some random number */
#define TMPFS_MAGIC 0x01021994
#define HUGETLBFS_MAGIC 0x958458f6
/* some random number */
...
...
security/smack/smack.h
View file @
9b0271d8
...
...
@@ -148,11 +148,6 @@ struct smack_known {
#define SMACK_UNLABELED_SOCKET 0
#define SMACK_CIPSO_SOCKET 1
/*
* smackfs magic number
*/
#define SMACK_MAGIC 0x43415d53
/* "SMAC" */
/*
* CIPSO defaults.
*/
...
...
security/smack/smack_access.c
View file @
9b0271d8
...
...
@@ -252,6 +252,8 @@ static inline void smack_str_from_perm(char *string, int access)
string
[
i
++
]
=
'x'
;
if
(
access
&
MAY_APPEND
)
string
[
i
++
]
=
'a'
;
if
(
access
&
MAY_TRANSMUTE
)
string
[
i
++
]
=
't'
;
string
[
i
]
=
'\0'
;
}
/**
...
...
security/smack/smack_lsm.c
View file @
9b0271d8
...
...
@@ -654,7 +654,7 @@ static int smack_inode_unlink(struct inode *dir, struct dentry *dentry)
/*
* You also need write access to the containing directory
*/
smk_ad_
setfield_u_fs_path_dentry
(
&
ad
,
NULL
);
smk_ad_
init
(
&
ad
,
__func__
,
LSM_AUDIT_DATA_INODE
);
smk_ad_setfield_u_fs_inode
(
&
ad
,
dir
);
rc
=
smk_curacc
(
smk_of_inode
(
dir
),
MAY_WRITE
,
&
ad
);
}
...
...
@@ -685,7 +685,7 @@ static int smack_inode_rmdir(struct inode *dir, struct dentry *dentry)
/*
* You also need write access to the containing directory
*/
smk_ad_
setfield_u_fs_path_dentry
(
&
ad
,
NULL
);
smk_ad_
init
(
&
ad
,
__func__
,
LSM_AUDIT_DATA_INODE
);
smk_ad_setfield_u_fs_inode
(
&
ad
,
dir
);
rc
=
smk_curacc
(
smk_of_inode
(
dir
),
MAY_WRITE
,
&
ad
);
}
...
...
security/smack/smackfs.c
View file @
9b0271d8
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment