Skip to content
Snippets Groups Projects
Commit 6f391961 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Merge branch 'hotfix-0.4.4' into develop

Conflicts:
	image_creator/os_type/unix.py
	image_creator/version.py
	version
parents c5effe03 3784c7c1
No related branches found
No related tags found
No related merge requests found
2013-07-31, v0.4.4
* Fix a bug where the system tried to use file scrubbing without
checking if it was supported
2013-07-18, v0.4.3 2013-07-18, v0.4.3
* Force TERM=linux when working on xterm. This makes dialog behave * Force TERM=linux when working on xterm. This makes dialog behave
better under OpenSUSE better under OpenSUSE
......
...@@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved' ...@@ -50,9 +50,9 @@ copyright = u'2012, 2013 GRNET S.A. All rights reserved'
# built documents. # built documents.
# #
# The short X.Y version. # The short X.Y version.
version = '0.4.3' version = '0.4.4'
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
release = '0.4.3' release = '0.4.4'
# The language for content autogenerated by Sphinx. Refer to documentation # The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages. # for a list of supported languages.
......
...@@ -138,6 +138,13 @@ class OSBase(object): ...@@ -138,6 +138,13 @@ class OSBase(object):
self.meta = {} self.meta = {}
self.mounted = False self.mounted = False
# Many guestfs compilations don't support scrub
self._scrub_support = True
try:
self.g.available(['scrub'])
except RuntimeError:
self._scrub_support = False
def collect_metadata(self): def collect_metadata(self):
"""Collect metadata about the OS""" """Collect metadata about the OS"""
try: try:
......
...@@ -121,12 +121,18 @@ class Unix(OSBase): ...@@ -121,12 +121,18 @@ class Unix(OSBase):
if self.g.is_dir('/home/'): if self.g.is_dir('/home/'):
homedirs += self._ls('/home/') homedirs += self._ls('/home/')
action = self.g.rm_rf
if self._scrub_support:
action = self.g.scrub_file
else:
self.out.warn("Sensitive data won't be scrubbed (not supported)")
for homedir in homedirs: for homedir in homedirs:
for data in self.sensitive_userdata: for data in self.sensitive_userdata:
fname = "%s/%s" % (homedir, data) fname = "%s/%s" % (homedir, data)
if self.g.is_file(fname): if self.g.is_file(fname):
self.g.scrub_file(fname) action(fname)
elif self.g.is_dir(fname): elif self.g.is_dir(fname):
self._foreach_file(fname, self.g.scrub_file, ftype='r') self._foreach_file(fname, action, ftype='r')
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai : # vim: set sta sts=4 shiftwidth=4 sw=4 et ai :
__version__ = "0.4.3next" __version__ = "0.4.4next"
__version_vcs_info__ = { __version_vcs_info__ = {
'branch': 'develop', 'branch': 'develop',
'revid': '64556e6', 'revid': 'c5effe0',
'revno': 330} 'revno': 370}
__version_user_email__ = "skalkoto@grnet.gr" __version_user_email__ = "skalkoto@grnet.gr"
__version_user_name__ = "Nikos Skalkotos" __version_user_name__ = "Nikos Skalkotos"
0.4.3next 0.4.4next
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment