Merge pull request #7059 from yuwata/dynamic-user-7013

dynamic-user: permit the case static uid and gid are different
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2017-10-18 08:37:12 +02:00
committed by GitHub
4 changed files with 38 additions and 31 deletions
+4
View File
@@ -2795,6 +2795,10 @@ static int exec_child(
r = dynamic_creds_realize(dcreds, suggested_paths, &uid, &gid);
if (r < 0) {
*exit_status = EXIT_USER;
if (r == -EILSEQ) {
log_unit_error(unit, "Failed to update dynamic user credentials: User or group with specified name already exists.");
return -EOPNOTSUPP;
}
return log_unit_error_errno(unit, r, "Failed to update dynamic user credentials: %m");
}