diff options
author | Ryan O'Hara <rohara@redhat.com> | 2006-05-22 10:08:35 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-05-22 10:08:35 -0400 |
commit | 639b6d79b8c20cce4079fb035640c65456324d1c (patch) | |
tree | ef3cf33f8b7f3d943ced0e461e1987cd34fc8c42 /fs/gfs2/eattr.c | |
parent | d2f222e6310b073ae3d91b8d3d676621fae1314e (diff) | |
download | linux-639b6d79b8c20cce4079fb035640c65456324d1c.tar.bz2 |
[GFS2] selinux support
This adds support to GFS2 for selinux extended attributes. There is a
known bug in gfs2_ea_get() which is believed to be independant of this
patch. Further patches will follow once that bug is fixed in order to
make GFS2 use as much of the generic eattr infrastructure as possible.
Signed-off-by: Ryan O'Hara <rohara@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/eattr.c')
-rw-r--r-- | fs/gfs2/eattr.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fs/gfs2/eattr.c b/fs/gfs2/eattr.c index f5169a42a919..187fba1c4678 100644 --- a/fs/gfs2/eattr.c +++ b/fs/gfs2/eattr.c @@ -368,7 +368,7 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh, { struct ea_list *ei = private; struct gfs2_ea_request *er = ei->ei_er; - unsigned int ea_size = GFS2_EA_STRLEN(ea); + unsigned int ea_size = gfs2_ea_strlen(ea); if (ea->ea_type == GFS2_EATYPE_UNUSED) return 0; @@ -381,12 +381,21 @@ static int ea_list_i(struct gfs2_inode *ip, struct buffer_head *bh, if (ei->ei_size + ea_size > er->er_data_len) return -ERANGE; - if (ea->ea_type == GFS2_EATYPE_USR) { + switch (ea->ea_type) { + case GFS2_EATYPE_USR: prefix = "user."; l = 5; - } else { + break; + case GFS2_EATYPE_SYS: prefix = "system."; l = 7; + break; + case GFS2_EATYPE_SECURITY: + prefix = "security."; + l = 9; + break; + default: + break; } memcpy(er->er_data + ei->ei_size, |