On Thursday 13 February 2014 13:33:16 Richard W.M. Jones wrote:
> On Thu, Feb 13, 2014 at 02:15:31PM +0100, Pino Toscano wrote:
> > +let expr = "/files/etc/hosts/*[label() != '#comment']/*[label()
> > != 'ipaddr'][. = '" ^ oldhost ^ "']" in
> Quoting? If oldhost contains a ' character + some A
On Thu, Feb 13, 2014 at 02:15:31PM +0100, Pino Toscano wrote:
> +let expr = "/files/etc/hosts/*[label() != '#comment']/*[label() !=
> 'ipaddr'][. = '" ^ oldhost ^ "']" in
Quoting? If oldhost contains a ' character + some Augeas code, this
might be exploitable.
I thought it might be possible
In Debian/Ubuntu systems, read the previous hostname from /etc/hostname
before replacing it, and replace it in /etc/hosts with the new hostname.
---
mllib/hostname.ml | 27 +++
1 file changed, 27 insertions(+)
diff --git a/mllib/hostname.ml b/mllib/hostname.ml
index fce16f