[CRIU] [PATCH 1/3] Issue #360: Anonymize image files

Radostin Stoyanov rstoyanov1 at gmail.com
Mon Jun 24 18:06:21 MSK 2019


Hi Harshavardhan,

Thank you for working on this project idea. I have added inline some 
suggestions that might be helpful.

On 22/06/2019 10:37, Harshavardhan Unnibhavi wrote:
> This commit adds the anonymize action to the CRIT tool to generate anonymised images from real ones
>
> Signed-off-by: Harshavardhan Unnibhavi <hvubfoss at gmail.com>
Could you please change the commit message to indicate the component 
that is being modified (e.g. "crit: Add anonymize option"), wrap the 
body at 72 characters, and add a brief explanation of why this option is 
needed (e.g. Image files may contain sensitive data which is not 
acceptable to be included when reporting a BUG.).

There is an excellent article about writing good commit messages:

https://chris.beams.io/posts/git-commit

> ---
>   lib/py/cli.py | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
>
> diff --git a/lib/py/cli.py b/lib/py/cli.py
> index abaf0720..d3242f08 100755
> --- a/lib/py/cli.py
> +++ b/lib/py/cli.py
> @@ -272,6 +272,9 @@ def explore_rss(opts):
>   			print('%-24s%s' % (pstr, vstr))
>   
>   
> +def anonymize(opts):
> +	pass
> +
>   
>   explorers = { 'ps': explore_ps, 'fds': explore_fds, 'mems': explore_mems, 'rss': explore_rss }
>   
> @@ -329,6 +332,17 @@ def main():
>   	show_parser.add_argument('--nopl', help = 'do not show entry payload (if exists)', action = 'store_true')
>   	show_parser.set_defaults(func=decode, pretty=True, out=None)
>   
> +	# Anonymize
> +	anon_parser = subparsers.add_parser('anonymize',
> +			help = "anonymize binary images to remove certain information")
> +	anon_parser.add_argument('-i',
> +				'--in',
> +				help = 'path to directory containing images that are not anonymized')
> +	anon_parser.add_argument('-o',
> +				'--out',
> +				help = 'path to directory where the anonymized images must be stored')
> +	anon_parser.set_defaults(func=anonymize)
> +
>   	opts = vars(parser.parse_args())
>   
>   	if not opts:


More information about the CRIU mailing list