]> sourceware.org Git - lvm2.git/commit
Fix create_temp_name to replace any '/' found in the hostname with '?'.
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 8 Jun 2011 08:49:53 +0000 (08:49 +0000)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 8 Jun 2011 08:49:53 +0000 (08:49 +0000)
commitfab0de8998793046711ac98058b28ea7362f1b0f
tree224d6da03b3e3ffb434dbb579c222afdb9969355
parent42a13432d0d437de8a3e9c31bed7a4b724b93785
Fix create_temp_name to replace any '/' found in the hostname with '?'.

There's a possibility someone will use the '/' in the hostname. Since we
generate a temporary file name (path) including the hostname, any '/' would
be ambiguous.

We can always set such hostname using 'sethostname' from unistd.h. But the
'hostname' command already includes the check and removes the '/' char.
However, some old versions still allow that.
See: https://bugzilla.redhat.com/show_bug.cgi?id=711445.

Since this is only a temporary name and the possibility of this error is
quite negligible, we don't need any complex escape sequence here, just a
simple char replace.
WHATS_NEW
lib/misc/lvm-file.c
This page took 0.038612 seconds and 5 git commands to generate.