X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2Flibadacl.h;h=be72ac3d149aa7c96bdd06748ef9df5182bc74c4;hb=be9a84cd69e7d24b4f82f4ff57ca6987295f17b6;hp=d2c97859dfab395b083d737effd6959d8199621c;hpb=7ce092ba47607098bb57695396357b8eab90e81b;p=apply-default-acl.git diff --git a/src/libadacl.h b/src/libadacl.h index d2c9785..be72ac3 100644 --- a/src/libadacl.h +++ b/src/libadacl.h @@ -5,21 +5,18 @@ * */ +#include /* the "bool" type */ +#include /* the "struct stat" type */ + /* Most of the libacl functions return 1 for success, 0 for failure, - and -1 on error */ + * and -1 on error. We follow suit. +*/ #define ACL_ERROR -1 #define ACL_FAILURE 0 #define ACL_SUCCESS 1 -/* Even though most other library functions reliably return -1 for - * error, it feels a little wrong to re-use the ACL_ERROR constant. - */ -#define CLOSE_ERROR -1 -#define NFTW_ERROR -1 -#define OPEN_ERROR -1 -#define SNPRINTF_ERROR -1 -#define STAT_ERROR -1 +int apply_default_acl_ex(const char* path, + const struct stat* sp, + bool no_exec_mask); -int apply_default_acl(const char* path, - const struct stat* sp, - bool no_exec_mask); +int apply_default_acl(const char* path, bool no_exec_mask);