summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Golle2021-08-04 14:04:59 +0000
committerDaniel Golle2021-08-04 14:50:11 +0000
commit220b7160dbabe39a562b5e6cbd43acc1bc9f8e06 (patch)
treebb40f3b9923ad5486a33921abf374367b0bc92ed
parent548d057b5fe23d1401791a497be84e2299684262 (diff)
downloadprocd-220b7160dbabe39a562b5e6cbd43acc1bc9f8e06.tar.gz
jail: ignore return value when creating default /dev symlinks
Just to silence compiler warning, as failure to create these symlinks doesn't indicate an error in all cases, e.g. in case mount is already defined in place of the symlink. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
-rw-r--r--jail/jail.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/jail/jail.c b/jail/jail.c
index beb46f5..2fa3b2a 100644
--- a/jail/jail.c
+++ b/jail/jail.c
@@ -607,11 +607,11 @@ only_default_devices:
}
/* Dev symbolic links as defined in OCI spec */
- symlink("/dev/pts/ptmx", "/dev/ptmx");
- symlink("/proc/self/fd", "/dev/fd");
- symlink("/proc/self/fd/0", "/dev/stdin");
- symlink("/proc/self/fd/1", "/dev/stdout");
- symlink("/proc/self/fd/2", "/dev/stderr");
+ (void) symlink("/dev/pts/ptmx", "/dev/ptmx");
+ (void) symlink("/proc/self/fd", "/dev/fd");
+ (void) symlink("/proc/self/fd/0", "/dev/stdin");
+ (void) symlink("/proc/self/fd/1", "/dev/stdout");
+ (void) symlink("/proc/self/fd/2", "/dev/stderr");
return 0;
}
@@ -704,7 +704,7 @@ static int build_jail_fs(void)
if (overlaydir)
unlink(jaillink);
- symlink("../dev/resolv.conf.d/resolv.conf.auto", jaillink);
+ (void) symlink("../dev/resolv.conf.d/resolv.conf.auto", jaillink);
}
run_hooks(opts.hooks.createContainer, enter_jail_fs);