Skip to content

Commit e4cfa05

Browse files
Richard Hainespcmoore
authored andcommitted
selinux: Add xfs quota command types
Add Q_XQUOTAOFF, Q_XQUOTAON and Q_XSETQLIM to trigger filesystem quotamod permission check. Add Q_XGETQUOTA, Q_XGETQSTAT, Q_XGETQSTATV and Q_XGETNEXTQUOTA to trigger filesystem quotaget permission check. Signed-off-by: Richard Haines <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Paul Moore <[email protected]>
1 parent c3a2761 commit e4cfa05

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

security/selinux/hooks.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,11 +2145,18 @@ static int selinux_quotactl(int cmds, int type, int id, struct super_block *sb)
21452145
case Q_QUOTAOFF:
21462146
case Q_SETINFO:
21472147
case Q_SETQUOTA:
2148+
case Q_XQUOTAOFF:
2149+
case Q_XQUOTAON:
2150+
case Q_XSETQLIM:
21482151
rc = superblock_has_perm(cred, sb, FILESYSTEM__QUOTAMOD, NULL);
21492152
break;
21502153
case Q_GETFMT:
21512154
case Q_GETINFO:
21522155
case Q_GETQUOTA:
2156+
case Q_XGETQUOTA:
2157+
case Q_XGETQSTAT:
2158+
case Q_XGETQSTATV:
2159+
case Q_XGETNEXTQUOTA:
21532160
rc = superblock_has_perm(cred, sb, FILESYSTEM__QUOTAGET, NULL);
21542161
break;
21552162
default:

0 commit comments

Comments
 (0)