-
Notifications
You must be signed in to change notification settings - Fork 734
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
Add support for setting the group on a unix domain socket #901
Conversation
Hi, @madolson can you please take a look? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #901 +/- ##
============================================
- Coverage 70.40% 70.33% -0.07%
============================================
Files 112 112
Lines 61465 61518 +53
============================================
- Hits 43275 43271 -4
- Misses 18190 18247 +57
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would also be nice to write a test to validate this, probably in other or misc. We can validate both the permissions and group.
895c1ad
to
9bfd70e
Compare
Addressed reviews and added UT to test that permissions are set correctly. |
33e2274
to
f0839bd
Compare
f0839bd
to
aa7526e
Compare
aa7526e
to
e5a9ae3
Compare
e5a9ae3
to
30b0685
Compare
@valkey-io/core-team Please vote on this small feature, we can optionally include it in Valkey 8.0 if it's ready for rc2, but not after. |
Add new optional, immutable string config called unixsocketgroup. Change the group of the unix socket to unixsocketgroup after bind() if specified. Signed-off-by: Ayush Sharma <[email protected]>
30b0685
to
c8aeaae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just waiting on majority approval
Since the new test is a bit odd, running the daily against a bunch of different platforms. https://github.com/valkey-io/valkey/actions/runs/10530596918 |
Add new optional, immutable string config called `unixsocketgroup`. Change the group of the unix socket to `unixsocketgroup` after `bind()` if specified. Adds tests to validate the behavior. Fixes #873. Signed-off-by: Ayush Sharma <[email protected]>
Add new optional, immutable string config called `unixsocketgroup`. Change the group of the unix socket to `unixsocketgroup` after `bind()` if specified. Adds tests to validate the behavior. Fixes #873. Signed-off-by: Ayush Sharma <[email protected]>
Hide 'unixsocketgroup' and 'unixsocketperm' into a Unix socket specific data structure. A single opaque pointer 'void *priv' is enough for a listener. Once any new config is added, we don't need 'void *priv2', 'void *priv3' and so on. Fixes: b48596a ('Add support for setting the group on a unix domain socket (valkey-io#901)') Cc: Ayush Sharma <[email protected]> Signed-off-by: zhenwei pi <[email protected]>
Hide 'unixsocketgroup' and 'unixsocketperm' into a Unix socket specific data structure. A single opaque pointer 'void *priv' is enough for a listener. Once any new config is added, we don't need 'void *priv2', 'void *priv3' and so on. Fixes: b48596a ('Add support for setting the group on a unix domain socket (valkey-io#901)') Cc: Ayush Sharma <[email protected]> Signed-off-by: zhenwei pi <[email protected]>
Hide 'unixsocketgroup' and 'unixsocketperm' into a Unix socket specific data structure. A single opaque pointer 'void *priv' is enough for a listener. Once any new config is added, we don't need 'void *priv2', 'void *priv3' and so on. Fixes: b48596a ('Add support for setting the group on a unix domain socket (valkey-io#901)') Cc: Ayush Sharma <[email protected]> Signed-off-by: zhenwei pi <[email protected]>
Hide 'unixsocketgroup' and 'unixsocketperm' into a Unix socket specific data structure. A single opaque pointer 'void *priv' is enough for a listener. Once any new config is added, we don't need 'void *priv2', 'void *priv3' and so on. Fixes: b48596a ('Add support for setting the group on a unix domain socket (valkey-io#901)') Cc: Ayush Sharma <[email protected]> Signed-off-by: zhenwei pi <[email protected]>
Hide 'unixsocketgroup' and 'unixsocketperm' into a Unix socket specific data structure. A single opaque pointer 'void *priv' is enough for a listener. Once any new config is added, we don't need 'void *priv2', 'void *priv3' and so on. Fixes: b48596a ('Add support for setting the group on a unix domain socket (valkey-io#901)') Cc: Ayush Sharma <[email protected]> Signed-off-by: zhenwei pi <[email protected]>
Add new optional, immutable string config called
unixsocketgroup
.Change the group of the unix socket to
unixsocketgroup
afterbind()
if specified.Manually verified that group is modified as expected and fails on illegal arguments (like non existent group name).
Fixes #873.