Merge pull request #14747 from yuwata/core-dynamic-user-14733

core: call dynamic_user_acquire() only when 'group' is non-null
This commit is contained in:
Anita Zhang 2020-02-03 10:38:27 -08:00 committed by GitHub
commit d383613872
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -770,7 +770,7 @@ int dynamic_creds_acquire(DynamicCreds *creds, Manager *m, const char *user, con
if (creds->user && (!group || streq_ptr(user, group)))
creds->group = dynamic_user_ref(creds->user);
else {
else if (group) {
r = dynamic_user_acquire(m, group, &creds->group);
if (r < 0) {
if (acquired)