summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorDenys Vlasenko2012-03-08 00:28:24 +0100
committerDenys Vlasenko2012-03-08 00:28:24 +0100
commit0687a5b496a05cbc06f3bcdc517a2e6cabc535df (patch)
tree55aedfacfddad2faafb75c4bee0d98122325df5c /procps
parent39c2cb2e93e2acc75a5eb6dd91d81f79c787acd5 (diff)
downloadbusybox-0687a5b496a05cbc06f3bcdc517a2e6cabc535df.zip
busybox-0687a5b496a05cbc06f3bcdc517a2e6cabc535df.tar.gz
libbb: make xchroot do a chdir("/") after chroot
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r--procps/sysctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/sysctl.c b/procps/sysctl.c
index cb3b6a2..5296d0f 100644
--- a/procps/sysctl.c
+++ b/procps/sysctl.c
@@ -224,7 +224,7 @@ static int sysctl_handle_preload_file(const char *filename)
parser = config_open(filename);
/* Must do it _after_ config_open(): */
xchdir("/proc/sys");
- /* xchroot(".") - if you are paranoid */
+ /* xchroot("/proc/sys") - if you are paranoid */
//TODO: ';' is comment char too
//TODO: comment may be only at line start. "var=1 #abc" - "1 #abc" is the value
@@ -260,7 +260,7 @@ int sysctl_main(int argc UNUSED_PARAM, char **argv)
return sysctl_handle_preload_file(*argv ? *argv : "/etc/sysctl.conf");
}
xchdir("/proc/sys");
- /* xchroot(".") - if you are paranoid */
+ /* xchroot("/proc/sys") - if you are paranoid */
if (opt & (FLAG_TABLE_FORMAT | FLAG_SHOW_ALL)) {
return sysctl_act_recursive(".");
}