[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Acl-devel] [PATCH] acl_{set,get}_file nofollow variants
From: |
Andreas Grünbacher |
Subject: |
Re: [Acl-devel] [PATCH] acl_{set,get}_file nofollow variants |
Date: |
Wed, 7 Mar 2018 00:08:44 +0100 |
2018-03-06 23:00 GMT+01:00 Aaron S. Knister <address@hidden>:
> Add act_set_file and acl_get_file nofollow variants to allow one to
> relatively safely operate on paths without inadvertently following a
> symbolic link.
There is precedent for nofollow variants because we have
acl_extended_file_nofollow. A related problem is that acl_get_fd
doesn't take a type argument, so I'm wondering if it would make sense
to support an openat-like interface instead, e.g.,
acl_t acl_get_at(int dirfd, const char *path, acl_type_t type, int flags);
int acl_set_at(int dirfd, const char *path, acl_type_t type, acl_t
acl, int flags);
With AT_FDCWD as a possible value for dirfd, and AT_EMPTY_PATH and
AT_SYMLINK_NOFOLLOW as possible values for flags. The xattr syscalls
don't follow this pattern either, so a little bit of trickery would be
required, though. New *xattrat syscalls would help of course.
Andreas