]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/gfs2/eattr.c
[GFS2] selinux support
[karo-tx-linux.git] / fs / gfs2 / eattr.c
index f5169a42a9198961a05c2e5c832df8ccaad60134..187fba1c4678f61adb54476ef372be58f0213f9a 100644 (file)
@@ -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,