mirror of
https://github.com/minio/minio.git
synced 2025-05-22 01:53:55 -04:00
Allow su-exec to fail when users explicity use --user (#7776)
This allows MinIO containers to run properly without expecting higher privileges in situations where following restrictions on containers are used - docker run --user uid:gid - docker-compose up (with docker-compose.yml with user) ```yml ... user: "1001:1001" command: minio server /data ... ``` - All openshift containers Fixes #7773
This commit is contained in:
parent
0394a8f013
commit
22f6756ce6
@ -60,7 +60,12 @@ docker_switch_user() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# check if su-exec is allowed, if yes proceed proceed.
|
||||||
|
if su-exec "${owner}" "/bin/ls" >/dev/null 2>&1; then
|
||||||
exec su-exec "${owner}" "$@"
|
exec su-exec "${owner}" "$@"
|
||||||
|
fi
|
||||||
|
# fallback
|
||||||
|
exec "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
## Set access env from secrets if necessary.
|
## Set access env from secrets if necessary.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user