2011-02-28
2011-02-28 13:58:33 by Henrik Grubbström (Grubba) <grubba@grubba.org>
-
3f4dbb41bf3035c2ecc99606158ec639a54c71c6
(12 lines)
(+10/-2)
[
Show
| Annotate
]
Branch: 5.1
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.305
1:
// This is a roxen pike module. Copyright © 1999 - 2009, Roxen IS.
//
- // $Id: Roxen.pmod,v 1.304 2011/01/20 14:01:01 grubba Exp $
+ // $Id: Roxen.pmod,v 1.305 2011/02/28 13:58:33 grubba Exp $
#include <roxen.h>
#include <config.h>
4928: 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: