projects
/
project
/
procd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
upgraded: Check chroot() return value
[project/procd.git]
/
upgraded
/
upgraded.c
diff --git
a/upgraded/upgraded.c
b/upgraded/upgraded.c
index
09c623c
..
220da79
100644
(file)
--- a/
upgraded/upgraded.c
+++ b/
upgraded/upgraded.c
@@
-78,7
+78,10
@@
int main(int argc, char **argv)
return 1;
}
- chroot(".");
+ if (chroot(".") < 0) {
+ fprintf(stderr, "failed to chroot: %s\n", strerror(errno));
+ return 1;
+ }
if (fchdir(fd) == -1) {
fprintf(stderr, "failed to chdir to prefix directory: %s\n", strerror(errno));