We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0adafb commit 1980fddCopy full SHA for 1980fdd
libcontainer/init_linux.go
@@ -314,7 +314,7 @@ func finalizeNamespace(config *initConfig) error {
314
switch {
315
case err == nil:
316
doChdir = false
317
- case os.IsPermission(err):
+ case errors.Is(err, os.ErrPermission):
318
// If we hit an EPERM, we should attempt again after setting up user.
319
// This will allow us to successfully chdir if the container user has access
320
// to the directory, but the user running runc does not.
@@ -480,7 +480,7 @@ func setupUser(config *initConfig) error {
480
setgroups, err = io.ReadAll(setgroupsFile)
481
_ = setgroupsFile.Close()
482
}
483
- if err != nil && !os.IsNotExist(err) {
+ if err != nil && !errors.Is(err, os.ErrNotExist) {
484
return err
485
486
0 commit comments