Skip to content

Commit

Permalink
update the conditional in validateImageUser
Browse files Browse the repository at this point in the history
  • Loading branch information
pkazmierczak committed Jun 27, 2024
1 parent 65f6872 commit f32473e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/docker/driver_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (d *Driver) validateImageUser(user, taskUser string, driverConfig *TaskConf
return nil
}

if (user == "ContainerAdmin" || taskUser == "ContainerAdmin") && !driverConfig.Privileged {
if user == "ContainerAdmin" && (taskUser == "ContainerAdmin" || taskUser == "") && !driverConfig.Privileged {
return errors.New(containerAdminErrMsg)
}
return nil
Expand Down

0 comments on commit f32473e

Please sign in to comment.