Linux Kernel Architecture

(Jacob Rumans) #1

Chapter 11: Extended Attributes and Access Control Lists


ext3_check_acl

ext3_get_acl

posix_acl_permission

Figure 11-12: Code flow diagram for
ext3_check_acl.

The code flow diagram in Figure 11-12 shows that there is little to do forext3_check_acl.AftertheACL
data have been read in byext3_get_acl, all policy work is delegated toposix_acl_permission,which
was introduced in Section 11.2.1.

11.2.3 Implementation in Ext2


The implementation of ACLs for Ext2 is nearly completely identical with the implementation for Ext3.
The differences are even less than for extended attributes because for ACLs, the handle-related parts are
not split into separate functions. Thus, by replacingext3_withext2_in all functions and data structures,
the comments about ACLs in this chapter apply equally well for Ext2 as for Ext3.

11.3 Summary


Traditionally, the discretionary access control model is used byUnixand Linux to decide which user
may access a given resource as represented by a file in a filesystem. Although these methods work quite
well for average installations, it is a very coarse-grained approach to security, and can be inappropriate
in certain circumstances.

In this chapter, you have seen how ACLs provide more fine-grained means to access control for filesystem
objects by attaching an explicit list of access control rules to each object.

You have also seen that ACLs are implemented on top of extended attributes, which allow augment-
ing filesystem objects with additional and more complex attributes than in the traditionalUnixmodel
inherited by Linux.
Free download pdf