kaniko/pkg/util
Lukas aad03dc285
fix: getUIDandGID is able to resolve non-existing users and groups (#2106)
* fix: getUIDandGID is able to resolve non-existing users and groups

A common pattern in dockerfiles is to provide a plain uid and gid number, which doesn't neccesarily exist inside the os.

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test: add chown dockerfile

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: format

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: add comment

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* tests: fix chown dockerfile

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* refactor: split up getIdsFromUsernameAndGroup func

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix: implement raw uid logic for LookupUser

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test: add dockerfiles for integration test

* fix: lookup user error message

* test: add dockerfiles for non-existing user testcase

* fix: forgot error check

* tests: fix syscall credentials test

* chore: add debug output for copy command

* tests: set specific gid for integration dockerfile

* tests: fix syscall credentials test

github runner had the exact uid that i was testing on, so the groups were not empty

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* tests: fix test script

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: apply golangci lint checks

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* fix: reset file ownership in createFile if not root owned

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore: logrus.Debugf missed format variable

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* chore(test-script): remove go html coverage

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>

* test(k8s): increase wait timeout

Signed-off-by: Höhl, Lukas <lukas.hoehl@accso.de>
2022-07-12 10:21:37 -04:00
..
bucket refactor: simpler local integration tests (#2110) 2022-06-14 13:38:01 -04:00
proc proc: detect kubernetes runtime by mounts (#2054) 2022-04-18 10:20:42 -04:00
.editorconfig revert back to old 0.17.1 behavior 2020-03-06 23:48:31 -08:00
azureblob_util.go Apply suggestions from code review 2019-10-21 10:19:32 +08:00
azureblob_util_test.go Add more test case for azureblob_util.go 2019-10-14 13:55:03 +08:00
command_util.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
command_util_test.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
fs_util.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
fs_util_test.go test: use `T.TempDir` to create temporary test directory (#1918) 2022-02-07 13:27:34 -05:00
gcr_util.go Fix implicit GCR auth (#1856) 2021-12-28 20:34:32 -05:00
gcr_util_test.go test: use `T.TempDir` to create temporary test directory (#1918) 2022-02-07 13:27:34 -05:00
groupids_cgo.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
groupids_fallback.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
syscall_credentials.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
syscall_credentials_test.go fix: getUIDandGID is able to resolve non-existing users and groups (#2106) 2022-07-12 10:21:37 -04:00
tar_util.go refactor: simpler local integration tests (#2110) 2022-06-14 13:38:01 -04:00
tar_util_test.go refactor: simpler local integration tests (#2110) 2022-06-14 13:38:01 -04:00
transport_util.go feat(warmer): Warmer now supports all registry-related flags (#1499) 2020-12-10 22:55:43 -08:00
transport_util_test.go feat(warmer): Warmer now supports all registry-related flags (#1499) 2020-12-10 22:55:43 -08:00
util.go fix: Refactor `LayersMap` to correct old strange code behavior (#2066) 2022-05-17 20:30:58 -04:00
util_test.go Improve retry behavior for push operation (#1578) 2021-02-22 21:25:58 -08:00