-1

I need to programatically get and set ACL's (access control list) for an Ubuntu 14.04 LTS desktop computer using the ext4 filesytem. I was wondering if there is C or C++ library function to this. I need this C/C++ function to initialize a supplied security descriptor with a DACL that grants the Authenticated Users group GENERIC_READ, GENERIC_WRITE and GENERIC_EXECUTE access. I googled this topic since this afternoon yesterday and found only information on the getacl and setacl Linux command line utilities. Do I have to write custom C or C++ functions and data structures to accomplish this requirement?

Frank
  • 1,406
  • 2
  • 16
  • 42

1 Answers1

1

Ubuntu's implementation of ACL's for ext4 are based on the POSIX.1e standard (a withdrawn standard but still used by many Unix and Linux variations) and you can use the acl_ POSIX functions to achieve what you want. For Ubuntu, you can view the manpage for the acl entries to see which functions are supported (and their subsequent documentation).

Hope that can help.

txtechhelp
  • 6,625
  • 1
  • 30
  • 39