Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

ACLs

Brew MP provides ACLs that specify the privileges required to access files and directories. ACLs can also be used to control access to FIFOs and application settings that are managed using the ISettings interface. Brew MP ACLs are similar in some ways to ACLs in other operating systems and very different in others.

A big difference from other operating systems is that Brew MP ACLs are not directly associated with the file or directory itself. Brew MP often runs on devices with file systems that do not have a protection model, such as Windows/DOS FAT, and cannot store the protection attributes with each file or directory. Instead the ACLs are specified in CIF files. The protection attributes in the CIF specify the path name to which the attributes apply.

The CIF primitives for ACLs are:

  • FIFO_ACL_Grant for FIFO permissions
  • FS_ACL_Grant for file or directory permissions

Settings ACLs are specified in a similar manner in the RegisterIniFile primitive that registers an INI file settings store. For more information, see the Settings Technology Guide in http://developer.brewmp.com/resources on the Brew MP website.

The privileges (or privs) specified in the ACLs are standard BMP privileges that are granted to an application by having them listed in the CIF of an application and having the application digitally signed or otherwise authorized by one of the Code Authorization Options.

FIFO ACLs are specified as follows:

FIFO_ACL_Grant {
   {groups = {priv_x,priv_y}, perms = "r/w"},
   {groups = {priv_a,priv_b}, perms = "rw/rw"},
   path = "/" ,
}

The path is relative to the module directory. For more information, see the Resource File and Markup Reference in http://developer.brewmp.com/resources on the Brew MP website.

File system ACLs are specified as follows:

FS_ACL_Grant {
   {groups = {priv_x,priv_y}, perms = "r/w"},
   {groups = {priv_a,priv_b}, perms = "rw/rw"},
   path = "/" ,
}

The path is relative to the module directory. For more information, see the Resource File and Markup Reference and the File System Technology Guide in http://developer.brewmp.com/resources on the Brew MP website.

For example code for ACLs, see Example - ACLs.