diff options
author | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2016-03-20 02:01:50 +0100 |
---|---|---|
committer | Duncan Mac-Vicar P <dmacvicar@suse.de> | 2016-03-20 02:01:50 +0100 |
commit | 38a1146de055d346831f6f2214db9503a692c8fc (patch) | |
tree | 80c7e99749409882926e5717e1357a77e5fab3bb | |
parent | 5f42cff84c8fc05c9e6707a01933e2a6997e958e (diff) | |
download | terraform-provider-libvirt-38a1146de055d346831f6f2214db9503a692c8fc.tar terraform-provider-libvirt-38a1146de055d346831f6f2214db9503a692c8fc.tar.gz |
if libvirt will not set permissions correctly, at least allow others read base images
-rw-r--r-- | libvirt/volume_def.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libvirt/volume_def.go b/libvirt/volume_def.go index f234c685..cbc889c6 100644 --- a/libvirt/volume_def.go +++ b/libvirt/volume_def.go @@ -18,6 +18,10 @@ type defVolume struct { Format struct { Type string `xml:"type,attr"` } `xml:"format"` + Permissions struct { + Mode int `xml:"mode,omitempty"` + } `xml:"permissions,omitempty"` + } `xml:"target"` Allocation int `xml:"allocation"` Capacity struct { @@ -30,6 +34,7 @@ type defVolume struct { func newDefVolume() defVolume { volumeDef := defVolume{} volumeDef.Target.Format.Type = "qcow2" + volumeDef.Target.Permissions.Mode = 644 volumeDef.Capacity.Unit = "bytes" volumeDef.Capacity.Amount = 1 return volumeDef |