kaniko/pkg/util
Priya Wadhwa 63cecbff74 Whitelist /etc/mtab
While looking into #345, we were seeing the error:

Error: error building image: chmod /etc/mtab: operation not permitted

during extraction of `amazonlinux:1`. I looked into why kaniko couldn't
extract this file properly, and found that it already existed as a
symlink pointing to /proc/mounts, which returned an error when we tried
to run chmod on it.

Confusingly, in the image the /etc/mtab is a regular file, not a
symlink.

I can think of two ways to solve this problem:
  1. Whitelist /etc/mtab so that whatever already exists in the system
  is used
  2. Check if a regular file already exists, and hasn't been extracted yet,
  before extracting

I went with option 1 because for option 2 we'd have to keep a list of
all files that had been extracted in memory.
2018-09-10 17:06:09 -07:00
..
bucket_util.go Feature/contextsources (#195) 2018-07-06 06:24:50 -07:00
command_util.go Make sure paths are absolute before matching files to wildcard sources 2018-08-31 11:57:20 -07:00
command_util_test.go Make sure paths are absolute before matching files to wildcard sources 2018-08-31 11:57:20 -07:00
fs_util.go Whitelist /etc/mtab 2018-09-10 17:06:09 -07:00
fs_util_test.go Fixed unit tests 2018-08-29 16:11:03 -07:00
image_util.go Added a KanikoStage type for each stage of a Dockerfile 2018-08-27 14:15:04 -07:00
image_util_test.go Added a KanikoStage type for each stage of a Dockerfile 2018-08-27 14:15:04 -07:00
tar_util.go Extract filesystem in order rather than in reverse 2018-08-29 15:44:38 -07:00
tar_util_test.go Separate snapshotting of parent dirs from files 2018-08-24 16:34:59 -07:00
util.go Configure logs to show colors 2018-08-29 16:08:09 -07:00