projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6be5d4f
)
bugfix: chdir(/) after chroot
author
Michael Tokarev
<mjt@corpit.ru>
Mon, 18 May 2009 12:53:08 +0000
(16:53 +0400)
committer
Guus Sliepen
<guus@tinc-vpn.org>
Mon, 18 May 2009 13:05:43 +0000
(15:05 +0200)
Fix the famous chdir(".") vs chdir("/") after chroot(something).
src/tincd.c
patch
|
blob
|
history
diff --git
a/src/tincd.c
b/src/tincd.c
index
929e9b9
..
89bda91
100644
(file)
--- a/
src/tincd.c
+++ b/
src/tincd.c
@@
-465,7
+465,7
@@
static bool drop_privs() {
}
if (do_chroot) {
tzset(); /* for proper timestamps in logs */
- if (chroot(confbase) != 0 || chdir("
.
") != 0) {
+ if (chroot(confbase) != 0 || chdir("
/
") != 0) {
logger(LOG_ERR, _("%s failed"), "chroot()");
return false;
}