mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
Fix bde'isms in acl/extattr syscall interface, renaming syscalls to
prettier (?) names, adding some const's around here, et al. This is commit 4 out of 3, updating the userland library to reflect kernel interface changes. Reviewed by: bde
This commit is contained in:
parent
c50a9e8f2d
commit
d335231606
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=56274
@ -37,7 +37,7 @@ int
|
||||
acl_delete_def_fd(int filedes)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_fd(filedes, ACL_TYPE_DEFAULT));
|
||||
return (__acl_delete_fd(filedes, ACL_TYPE_DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ int
|
||||
acl_delete_def_file(const char *path_p)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_file(path_p, ACL_TYPE_DEFAULT));
|
||||
return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ int
|
||||
acl_delete_file(const char *path_p, acl_type_t type)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_file(path_p, type));
|
||||
return (__acl_delete_file(path_p, type));
|
||||
}
|
||||
|
||||
|
||||
@ -61,5 +61,5 @@ int
|
||||
acl_delete_fd(int filedes, acl_type_t type)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_fd(filedes, type));
|
||||
return (__acl_delete_fd(filedes, type));
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ acl_get_file(const char *path_p, acl_type_t type)
|
||||
struct acl *aclp;
|
||||
int error;
|
||||
|
||||
aclp = acl_init(MAX_ACL_ENTRIES);
|
||||
aclp = acl_init(ACL_MAX_ENTRIES);
|
||||
if (!aclp) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
error = acl_syscall_get_file(path_p, type, aclp);
|
||||
error = __acl_get_file(path_p, type, aclp);
|
||||
if (error) {
|
||||
acl_free(aclp);
|
||||
return (0);
|
||||
@ -61,12 +61,12 @@ acl_get_fd(int fd, acl_type_t type)
|
||||
struct acl *aclp;
|
||||
int error;
|
||||
|
||||
aclp = acl_init(MAX_ACL_ENTRIES);
|
||||
aclp = acl_init(ACL_MAX_ENTRIES);
|
||||
if (!aclp) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
error = acl_syscall_get_fd(fd, type, aclp);
|
||||
error = __acl_get_fd(fd, type, aclp);
|
||||
if (error) {
|
||||
acl_free(aclp);
|
||||
return (0);
|
||||
|
@ -40,7 +40,7 @@ acl_init(int count)
|
||||
{
|
||||
struct acl *acl;
|
||||
|
||||
if (count > MAX_ACL_ENTRIES) {
|
||||
if (count > ACL_MAX_ENTRIES) {
|
||||
errno = ENOMEM;
|
||||
return (0);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_set_file(path_p, type, acl));
|
||||
return (__acl_set_file(path_p, type, acl));
|
||||
}
|
||||
|
||||
|
||||
@ -71,5 +71,5 @@ acl_set_fd(int fd, acl_t acl, acl_type_t type)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_set_fd(fd, type, acl));
|
||||
return (__acl_set_fd(fd, type, acl));
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id, acl_perm_t perm)
|
||||
{
|
||||
struct acl_entry *e;
|
||||
|
||||
if (acl->acl_cnt >= MAX_ACL_ENTRIES) {
|
||||
if (acl->acl_cnt >= ACL_MAX_ENTRIES) {
|
||||
errno = ENOMEM;
|
||||
return (-1);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ acl_valid_file(const char *pathp, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_aclcheck_file(pathp, type, acl));
|
||||
return (__acl_aclcheck_file(pathp, type, acl));
|
||||
}
|
||||
|
||||
|
||||
@ -94,5 +94,5 @@ acl_valid_fd(int fd, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_aclcheck_fd(fd, type, acl));
|
||||
return (__acl_aclcheck_fd(fd, type, acl));
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ int
|
||||
acl_delete_def_fd(int filedes)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_fd(filedes, ACL_TYPE_DEFAULT));
|
||||
return (__acl_delete_fd(filedes, ACL_TYPE_DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
@ -45,7 +45,7 @@ int
|
||||
acl_delete_def_file(const char *path_p)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_file(path_p, ACL_TYPE_DEFAULT));
|
||||
return (__acl_delete_file(path_p, ACL_TYPE_DEFAULT));
|
||||
}
|
||||
|
||||
|
||||
@ -53,7 +53,7 @@ int
|
||||
acl_delete_file(const char *path_p, acl_type_t type)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_file(path_p, type));
|
||||
return (__acl_delete_file(path_p, type));
|
||||
}
|
||||
|
||||
|
||||
@ -61,5 +61,5 @@ int
|
||||
acl_delete_fd(int filedes, acl_type_t type)
|
||||
{
|
||||
|
||||
return (acl_syscall_delete_fd(filedes, type));
|
||||
return (__acl_delete_fd(filedes, type));
|
||||
}
|
||||
|
@ -40,12 +40,12 @@ acl_get_file(const char *path_p, acl_type_t type)
|
||||
struct acl *aclp;
|
||||
int error;
|
||||
|
||||
aclp = acl_init(MAX_ACL_ENTRIES);
|
||||
aclp = acl_init(ACL_MAX_ENTRIES);
|
||||
if (!aclp) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
error = acl_syscall_get_file(path_p, type, aclp);
|
||||
error = __acl_get_file(path_p, type, aclp);
|
||||
if (error) {
|
||||
acl_free(aclp);
|
||||
return (0);
|
||||
@ -61,12 +61,12 @@ acl_get_fd(int fd, acl_type_t type)
|
||||
struct acl *aclp;
|
||||
int error;
|
||||
|
||||
aclp = acl_init(MAX_ACL_ENTRIES);
|
||||
aclp = acl_init(ACL_MAX_ENTRIES);
|
||||
if (!aclp) {
|
||||
return (0);
|
||||
}
|
||||
|
||||
error = acl_syscall_get_fd(fd, type, aclp);
|
||||
error = __acl_get_fd(fd, type, aclp);
|
||||
if (error) {
|
||||
acl_free(aclp);
|
||||
return (0);
|
||||
|
@ -40,7 +40,7 @@ acl_init(int count)
|
||||
{
|
||||
struct acl *acl;
|
||||
|
||||
if (count > MAX_ACL_ENTRIES) {
|
||||
if (count > ACL_MAX_ENTRIES) {
|
||||
errno = ENOMEM;
|
||||
return (0);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ acl_set_file(const char *path_p, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_set_file(path_p, type, acl));
|
||||
return (__acl_set_file(path_p, type, acl));
|
||||
}
|
||||
|
||||
|
||||
@ -71,5 +71,5 @@ acl_set_fd(int fd, acl_t acl, acl_type_t type)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_set_fd(fd, type, acl));
|
||||
return (__acl_set_fd(fd, type, acl));
|
||||
}
|
||||
|
@ -429,7 +429,7 @@ acl_add_entry(acl_t acl, acl_tag_t tag, uid_t id, acl_perm_t perm)
|
||||
{
|
||||
struct acl_entry *e;
|
||||
|
||||
if (acl->acl_cnt >= MAX_ACL_ENTRIES) {
|
||||
if (acl->acl_cnt >= ACL_MAX_ENTRIES) {
|
||||
errno = ENOMEM;
|
||||
return (-1);
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ acl_valid_file(const char *pathp, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_aclcheck_file(pathp, type, acl));
|
||||
return (__acl_aclcheck_file(pathp, type, acl));
|
||||
}
|
||||
|
||||
|
||||
@ -94,5 +94,5 @@ acl_valid_fd(int fd, acl_type_t type, acl_t acl)
|
||||
}
|
||||
}
|
||||
|
||||
return (acl_syscall_aclcheck_fd(fd, type, acl));
|
||||
return (__acl_aclcheck_fd(fd, type, acl));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user