core: intialize user aux groups and SupplementaryGroups= when DynamicUser= is set#4543
Merged
tixxdz merged 3 commits intosystemd:masterfrom Nov 3, 2016
Conversation
Member
|
lgtm! thanks for fixing! |
Contributor
For the record: |
Member
|
hmm @tixxdz any chance you can look into this? last thing remaining before v232... |
Contributor
|
Fix: index 505af41..6029853 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -262,7 +262,7 @@ static void test_exec_supplementary_groups(Manager *m) {
static void test_exec_dynamic_user(Manager *m) {
test(m, "exec-dynamicuser-fixeduser.service", 0, CLD_EXITED);
test(m, "exec-dynamicuser-fixeduser-one-supplementarygroup.service", 0, CLD_EXITED);
- test(m, "exec-dynamicuser-supplementarygroup.service", 0, CLD_EXITED);
+ test(m, "exec-dynamicuser-supplementarygroups.service", 0, CLD_EXITED);
}
static void test_exec_environment(Manager *m) {
diff --git a/test/test-execute/exec-dynamicuser-supplementarygroups.service b/test/test-execute/exec-dynamicuser-supplementarygroups.service
index 477c953..d5433f2 100644
--- a/test/test-execute/exec-dynamicuser-supplementarygroups.service
+++ b/test/test-execute/exec-dynamicuser-supplementarygroups.service
@@ -2,7 +2,7 @@
Description=Test DynamicUser with SupplementaryGroups=
[Service]
-ExecStart=/bin/sh -x -c 'test "$$(id -G | cut -d' ' -f2,4)" = "1 2 3"'
+ExecStart=/bin/sh -x -c 'test "$$(id -G | cut -d " " --complement -f 1)" = "1 2 3"'
Type=oneshot
DynamicUser=yes
SupplementaryGroups=1 2 3 |
…User= is set Make sure that when DynamicUser= is set that we intialize the user supplementary groups and that we also support SupplementaryGroups= Fixes: systemd#4539 Thanks Evgeny Vereshchagin (@evverx)
4b23d3c to
5c67067
Compare
Member
Author
|
@evverx thank you for the fix, pushed. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make sure that when DynamicUser= is set that we initialize the user supplementary groups and that we also support SupplementaryGroups=
Fixes: #4539
Thanks Evgeny Vereshchagin (@evverx)