- 16 10月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
Correctly mark the places where we need to remember and recall file ownership. We don't want to mislead any potential developer. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 07 10月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
So imagine you want to crate new security manager: if (!(mgr = virSecurityManagerNew("selinux", "QEMU", false, true, false, true))); Hard to parse, right? What about this: if (!(mgr = virSecurityManagerNew("selinux", "QEMU", VIR_SECURITY_MANAGER_DEFAULT_CONFINED | VIR_SECURITY_MANAGER_PRIVILEGED))); Now that's better! This is what the commit does. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 06 10月, 2015 1 次提交
-
-
由 Cédric Bosdonnat 提交于
profile_status function was not making any difference between error cases and unconfined profiles. The problem with this approach is that dominfo was throwing an error on unconfined domains.
-
- 15 9月, 2015 4 次提交
-
-
由 Michal Privoznik 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1124841 If running in session mode it may happen that we fail to set correct SELinux label, but the image may still be readable to the qemu process. Take this into account. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
We may want to do some decisions in drivers based on fact if we are running as privileged user or not. Propagate this info there. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
We have plenty of callbacks in the driver. Some of these callbacks require more than one argument to be passed. For that we currently have a data type (struct) per each callback. Well, so far for only one - SELinuxSCSICallbackData. But lets turn it into more general name so it can be reused in other callbacks too instead of each one introducing a new, duplicate data type. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
由 Michal Privoznik 提交于
The check is done in virSecuritySELinuxSetFilecon itself. There's no need to check it again. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 30 8月, 2015 1 次提交
-
-
由 Guido Günther 提交于
f1f68ca3 moved the monitor socket to a per domain directory. Adjust the path accordingly.
-
- 27 8月, 2015 1 次提交
-
-
由 Michal Privoznik 提交于
So, after some movement in virt-aa-helper, I've noticed the virt-aa-helper-test failing. I've ran gdb (it took me a while to realize how to do that) and this showed up immediately: Program received signal SIGSEGV, Segmentation fault. strlen () at ../sysdeps/x86_64/strlen.S:106 106 ../sysdeps/x86_64/strlen.S: No such file or directory. (gdb) bt #0 strlen () at ../sysdeps/x86_64/strlen.S:106 #1 0x0000555555561a13 in array_starts_with (str=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", arr=0x7fffffffd160, size=-1540438016) at security/virt-aa-helper.c:525 #2 0x0000555555561d49 in valid_path (path=0x5555557ce910 "/tmp/tmp.6nI2Fkv0KL/1.img", readonly=false) at security/virt-aa-helper.c:617 #3 0x0000555555562506 in vah_add_path (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw", recursive=false) at security/virt-aa-helper.c:823 #4 0x0000555555562693 in vah_add_file (buf=0x7fffffffd3e0, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", perms=0x555555581585 "rw") at security/virt-aa-helper.c:854 #5 0x0000555555562918 in add_file_path (disk=0x5555557d4440, path=0x5555557cb910 "/tmp/tmp.6nI2Fkv0KL/1.img", depth=0, opaque=0x7fffffffd3e0) at security/virt-aa-helper.c:931 #6 0x00007ffff78f18b1 in virDomainDiskDefForeachPath (disk=0x5555557d4440, ignoreOpenFailure=true, iter=0x5555555628a6 <add_file_path>, opaque=0x7fffffffd3e0) at conf/domain_conf.c:23286 #7 0x0000555555562b5f in get_files (ctl=0x7fffffffd670) at security/virt-aa-helper.c:982 #8 0x0000555555564100 in vahParseArgv (ctl=0x7fffffffd670, argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1277 #9 0x00005555555643d6 in main (argc=5, argv=0x7fffffffd7e8) at security/virt-aa-helper.c:1332 So I've taken look at valid_path() because it is obviously calling array_starts_with() with malformed @size. And here's the result: there are two variables to hold the size of three arrays and their value is recalculated before each call of array_starts_with(). What if we just use three variables, initialize them and do not touch them afterwards? Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
-
- 26 8月, 2015 1 次提交
-
-
由 Peter Kieser 提交于
This is a cryptographically signed message in MIME format. Some UEFI firmwares may want to use a non-volatile memory to store some variables. If AppArmor is enabled, and NVRAM store file is set currently virt-aa-helper does not add the NVRAM store file to the template. Add this file for read/write when this functionality is defined in domain XML. Signed-off-by: NPeter Kieser <peter@kieser.ca>
-
- 24 8月, 2015 10 次提交
-
-
由 Guido Günther 提交于
Remove unused variable, tag unused parameter and adjust return type. introduced by 3f48345f CC security/libvirt_security_manager_la-security_selinux.lo security/security_selinux.c: In function 'virSecuritySELinuxDomainSetDirLabel': security/security_selinux.c:2520:5: error: return makes pointer from integer without a cast [-Werror] security/security_selinux.c:2514:9: error: unused variable 'ret' [-Werror=unused-variable] security/security_selinux.c:2509:59: error: unused parameter 'mgr' [-Werror=unused-parameter]
-
由 intrigeri 提交于
We forbid access to /usr/share/, but (at least on Debian-based systems) the Open Virtual Machine Firmware files needed for booting UEFI virtual machines in QEMU live in /usr/share/ovmf/. Therefore, we need to add that directory to the list of read only paths. A similar patch was suggested by Jamie Strandboge <jamie@canonical.com> on https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1483071.
-
由 Guido Günther 提交于
First check overrides, then read only files then restricted access itself. This allows us to mark files for read only access whose parents were already restricted for read write. Based on a proposal by Martin Kletzander
-
由 Guido Günther 提交于
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
That function can be used for setting security labels on arbitrary directories. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
SELinux security driver already does that, but DAC driver somehow missed the memo. Let's fix it so it works the same way. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
由 Martin Kletzander 提交于
In virSecuritySELinuxSetSecurityChardevLabel() we are labelling unix socket path, but accessing another structure of the union. This does not pose a problem currently as both paths are at the same offset, but this should be fixed for the future. Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-
- 10 7月, 2015 4 次提交
-
-
由 Cédric Bosdonnat 提交于
With commit 3f9868a5 virt-aa-helper stopped working due to missing DomainGuest in the caps. The test with -c without arch also needs to be removed since the new capabilities code uses the host arch when none is provided.
-
由 Cédric Bosdonnat 提交于
ctl->hvm contains os.type string value, change the name to reflect it.
-
由 Cédric Bosdonnat 提交于
Initializing libvirt log in virt-aa-helper and getting it to output libvirt log to stderr. This will help debugging problems happening in libvirt functions called from within virt-aa-helper
-
由 Cédric Bosdonnat 提交于
Rules generated for a path like '/' were having '//' which isn't correct for apparmor. Make virt-aa-helper smarter to avoid these.
-
- 08 7月, 2015 1 次提交
-
-
由 Serge Hallyn 提交于
Commit 03d7462d added it for channels, but it is also needed for serials. Add it for serials, parallels, and consoles as well. This solves https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1015154Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com>
-
- 02 7月, 2015 1 次提交
-
-
由 Michal Dubiel 提交于
QEMU working in vhost-user mode communicates with the other end (i.e. some virtual router application) via unix domain sockets. This requires that permissions for the socket files are correctly written into /etc/apparmor.d/libvirt/libvirt-UUID.files. Signed-off-by: NMichal Dubiel <md@semihalf.com>
-
- 21 4月, 2015 2 次提交
-
-
由 Cole Robinson 提交于
This needs to specified in way too many places for a simple validation check. The ostype/arch/virttype validation checks later in DomainDefParseXML should catch most of the cases that this was covering.
-
由 Cole Robinson 提交于
Rather than an opencoded string. This should be a no-op
-
- 14 4月, 2015 1 次提交
-
-
由 Serge Hallyn 提交于
The original bug report was at https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1393842 Also skip abstract unix sockets. Signed-off-by: NSerge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 14 2月, 2015 1 次提交
-
-
由 John Ferlan 提交于
Introduced by commit id 'c3d9d3bb' - return from virSecurityManagerCheckModel wasn't VIR_FREE()'ing the virSecurityManagerGetNested allocated memory.
-
- 13 2月, 2015 2 次提交
-
-
由 Erik Skultety 提交于
if (mgr == NULL || mgr->drv == NULL) return ret; This check isn't really necessary, security manager cannot be a NULL pointer as it is either selinux (by default) or 'none', if no other driver is set in the config. Even with no config file driver name yields 'none'. The other hunk checks for domain's security model validity, but we should also check devices' security model as well, therefore this hunk is moved into a separate function which is called by virSecurityManagerCheckAllLabel that checks both the domain's security model and devices' security model. https://bugzilla.redhat.com/show_bug.cgi?id=1165485Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
由 Erik Skultety 提交于
We do have a check for valid per-domain security model, however we still do permit an invalid security model for a domain's device (those which are specified with <source> element). This patch introduces a new function virSecurityManagerCheckAllLabel which compares user specified security model against currently registered security drivers. That being said, it also permits 'none' being specified as a device security model. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1165485Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 14 1月, 2015 1 次提交
-
-
由 Daniel P. Berrange 提交于
The virDomainDefParse* and virDomainDefFormat* methods both accept the VIR_DOMAIN_XML_* flags defined in the public API, along with a set of other VIR_DOMAIN_XML_INTERNAL_* flags defined in domain_conf.c. This is seriously confusing & error prone for a number of reasons: - VIR_DOMAIN_XML_SECURE, VIR_DOMAIN_XML_MIGRATABLE and VIR_DOMAIN_XML_UPDATE_CPU are only relevant for the formatting operation - Some of the VIR_DOMAIN_XML_INTERNAL_* flags only apply to parse or to format, but not both. This patch cleanly separates out the flags. There are two distint VIR_DOMAIN_DEF_PARSE_* and VIR_DOMAIN_DEF_FORMAT_* flags that are used by the corresponding methods. The VIR_DOMAIN_XML_* flags received via public API calls must be converted to the VIR_DOMAIN_DEF_FORMAT_* flags where needed. The various calls to virDomainDefParse which hardcoded the use of the VIR_DOMAIN_XML_INACTIVE flag change to use the VIR_DOMAIN_DEF_PARSE_INACTIVE flag.
-
- 11 12月, 2014 2 次提交
-
-
由 Ján Tomko 提交于
Add missing ATTRIBUTE_UNUSED markers.
-
由 Luyao Huang 提交于
When using qemuProcessAttach to attach a qemu process, the DAC label is not filled correctly. Introduce a new function to get the uid:gid from the system and fill the label. This fixes the daemon crash when 'virsh screenshot' is called: https://bugzilla.redhat.com/show_bug.cgi?id=1161831 It also fixes qemu-attach after the prerequisite of this patch (commit f8c1fb3d) was pushed out of order. Signed-off-by: NLuyao Huang <lhuang@redhat.com> Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 09 12月, 2014 1 次提交
-
-
由 John Ferlan 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=1082521 Support for shared hostdev's was added in a number of commits, initially starting with 'f2c1d9a8' and most recently commit id 'fd243fc4' to fix issues with the initial implementation. Missed in all those changes was the need to mimic the virSELinux{Set|Restore}SecurityDiskLabel code to handle the "shared" (or shareable) and readonly options when Setting or Restoring the SELinux labels. This patch will adjust the virSecuritySELinuxSetSecuritySCSILabel to not use the virSecuritySELinuxSetSecurityHostdevLabelHelper in order to set the label. Rather follow what the Disk code does by setting the label differently based on whether shareable/readonly is set. This patch will also modify the virSecuritySELinuxRestoreSecuritySCSILabel to follow the same logic as virSecuritySELinuxRestoreSecurityImageLabelInt and not restore the label if shared/readonly
-
- 25 11月, 2014 3 次提交
-
-
由 John Ferlan 提交于
Commit 'c264eeaa' didn't do the prerequisite 'make syntax-check' before pushing. There was a <tab> in the whitespace for the comment. Replaced with spaces and aligned. pushed as build breaker since Jenkins complained loudly
-
由 Cédric Bosdonnat 提交于
To get virt-sandbox-service working with AppArmor, virt-aa-helper needs not to choke on path in /etc/libvirt-sandbox/services.
-
由 Cédric Bosdonnat 提交于
This turns out to be working by magic but needs to be fixed.
-
- 15 11月, 2014 1 次提交
-
-
由 Martin Kletzander 提交于
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
-