[virt-tools-list] [virt-bootstrap] [PATCH v4 18/26] Simplify setting permissins of shadow file
Cedric Bosdonnat
cbosdonnat at suse.com
Thu Aug 3 16:10:05 UTC 2017
On Thu, 2017-08-03 at 14:13 +0100, Radostin Stoyanov wrote:
> ---
> src/virtBootstrap/utils.py | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py
> index 99a66e2..f83b567 100644
> --- a/src/virtBootstrap/utils.py
> +++ b/src/virtBootstrap/utils.py
> @@ -440,8 +440,7 @@ def set_root_password_in_rootfs(rootfs, password):
>
> shadow_file_permissions = os.stat(shadow_file)[0]
> # Set read-write permissions to shadow file
> - # 438 = 0110110110 = -rw-rw-rw-
> - os.chmod(shadow_file, 438)
> + os.chmod(shadow_file, 0o666)
> try:
> with open(shadow_file) as orig_file:
> shadow_content = orig_file.read().split('\n')
ACK
--
Cedric
More information about the virt-tools-list
mailing list