Skip to content
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

error handling in ACL code #4049

Closed
ThomasWaldmann opened this issue Aug 15, 2018 · 2 comments · Fixed by #8178
Closed

error handling in ACL code #4049

ThomasWaldmann opened this issue Aug 15, 2018 · 2 comments · Fixed by #8178
Assignees
Milestone

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Aug 15, 2018

currently, the acl get/set functions are called, but their return code is not evaluated.

this should be reviewed, considering:

  • is it good? like "doing as much as possible". we also have some other places that try stuff and silently fail (e.g. if a file owned by another user is restored and we are not root: we can not chown to the other user then. we try it and silently fail, so the file is just owned by current user.)
  • is it bad? like "hiding severe issues".

Error handling could be added like this (linux):

+                rc = acl_set_file(path, ...)
+                if rc < 0:
+                    error_number = errno.errno
+                    raise OSError(error_number, strerror(error_number).decode(), path)

As this is platform code, all platforms have to be considered.

@ThomasWaldmann ThomasWaldmann added this to the hydrogen milestone Aug 15, 2018
@ThomasWaldmann
Copy link
Member Author

guess best is: raise OSError there and deal with it at a higher layer.

@ThomasWaldmann ThomasWaldmann modified the milestones: 1.2.x, 1.4.0a1, 1.4.0x Dec 26, 2023
@ThomasWaldmann ThomasWaldmann modified the milestones: 1.4.0b1, 1.4.0b2 Jan 20, 2024
@ThomasWaldmann ThomasWaldmann self-assigned this Feb 25, 2024
@ThomasWaldmann
Copy link
Member Author

http://wiki.linux-nfs.org/wiki/index.php/ACLs about nfs v4 ACLs (and others)

ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Mar 16, 2024
ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Mar 16, 2024
@ThomasWaldmann ThomasWaldmann modified the milestones: 1.4.0b2, 2.0.0rc1 Mar 30, 2024
ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Apr 1, 2024
ThomasWaldmann added a commit to ThomasWaldmann/borg that referenced this issue Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant