Skip to content

ACL.applyto ignores type if file descriptor passed rather than path? #28

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
salk31 opened this issue Mar 19, 2025 · 0 comments
Open

Comments

@salk31
Copy link

salk31 commented Mar 19, 2025

Hi,

My code was failing to set the default ACL when I was passing a file descriptor to applyto.

I saw a stackoverflow post showing somebody had it working with a path. That works for me too.

Looking at the code is it just that the type is not being passed to the libacl method when it is an fd?
https://github.com/iustin/pylibacl/blob/main/acl.c#L450C20-L450C30

I'm probably wrong but seems like it might be faster using the fd (for the same file I'm setting the normal ACLs and uid/gid) so it would be nice if it could done with the fd too.

I'm up for trying to tweak that bit of code and testing it but I'm not sure I'd be able to write a decent unit test for it.

Cheers

Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant