2011-02-28
2011-02-28 13:58:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
8141947d05ee46e17a17c8989abb2862de16b357
(12 lines)
(+10/-2)
[
Show
| Annotate
]
Branch: 5.2
Make sure the locale is safe before calling ifconfig. Fixes [bug 5898 (#5898)].
Thanks to Eiichiro ITANI <emu@ceres.dti.ne.jp> for the report.
Rev: server/etc/modules/Roxen.pmod:1.308
1:
// This is a roxen pike module. Copyright © 1999 - 2009, Roxen IS.
//
- // $Id: Roxen.pmod,v 1.307 2011/02/15 13:36:57 grubba Exp $
+ // $Id: Roxen.pmod,v 1.308 2011/02/28 13:58:33 grubba Exp $
#include <roxen.h>
#include <config.h>
5007: Inside #if undefined(NO_DNS)
"/etc" }), "ifconfig");
local_addrs = dns[1];
if (ifconfig) {
- foreach(Process.run(({ ifconfig, "-a" }))->stdout/"\n", string line) {
+ foreach(Process.run(({ ifconfig, "-a" }),
+ ([ "env":getenv() +
+ ([
+ // Make sure the output is not affected
+ // by the locale. cf [bug 5898].
+ "LC_ALL":"C",
+ "LANG":"C",
+ ])]))->stdout/"\n", string line) {
int i;
// We need to parse lines with the following formats: