-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support FreeBSD xattr naming There is a slight compatibilty issue due to FreeBSD disallowing usage of the `user.` prefix when it comes to xattr names. Just for FreeBSD this patch removes that `user.` prefix (leaving `ocis.`) which allows it to run on FreeBSD. * Cleanup the FreeBSD xattr naming * Comment for default xattr namespace as per Codacy static analysis * chore: changelog update for freebsd-xattr-support --------- Co-authored-by: Jur van den Berg <[email protected]>
- Loading branch information
1 parent
4a49209
commit ec27f5f
Showing
4 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Bugfix: FreeBSD xattr support | ||
|
||
We now properly handle FreeBSD xattr namespaces by leaving out the `user.` prefix. FreeBSD adds that automatically. | ||
|
||
https://github.com/cs3org/reva/pull/3650 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
//go:build !freebsd | ||
|
||
package xattrs | ||
|
||
// The default namespace for ocis. As non root users can only manipulate | ||
// the user. namespace, which is what is used to store ownCloud specific | ||
// metadata. To prevent name collisions with other apps, we are going to | ||
// introduce a sub namespace "user.ocis." | ||
const ( | ||
OcisPrefix string = "user.ocis." | ||
) |
10 changes: 10 additions & 0 deletions
10
pkg/storage/utils/decomposedfs/xattrs/xattrs_prefix_freebsd.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
//go:build freebsd | ||
|
||
package xattrs | ||
|
||
// On FreeBSD the `user` namespace is implied through a separate syscall argument | ||
// and will fail with invalid argument when you try to start an xattr name with user. or system. | ||
// For that reason we drop the superfluous user. prefix for FreeBSD specifically. | ||
const ( | ||
OcisPrefix string = "ocis." | ||
) |