mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
3e2c3d8f6d
No thanks to 64-bit windows, with 64-bit pid_t, we have to avoid constructs like 'int pid'. Our API in libvirt-qemu cannot be changed without breaking ABI; but then again, libvirt-qemu can only be used on systems that support UNIX sockets, which rules out Windows (even if qemu could be compiled there) - so for all points on the call chain that interact with this API decision, we require a different variable name to make it clear that we audited the use for safety. Adding a syntax-check rule only solves half the battle; anywhere that uses printf on a pid_t still needs to be converted, but that will be a separate patch. * cfg.mk (sc_correct_id_types): New syntax check. * src/libvirt-qemu.c (virDomainQemuAttach): Document why we didn't use pid_t for pid, and validate for overflow. * include/libvirt/libvirt-qemu.h (virDomainQemuAttach): Tweak name for syntax check. * src/vmware/vmware_conf.c (vmwareExtractPid): Likewise. * src/driver.h (virDrvDomainQemuAttach): Likewise. * tools/virsh.c (cmdQemuAttach): Likewise. * src/remote/qemu_protocol.x (qemu_domain_attach_args): Likewise. * src/qemu_protocol-structs (qemu_domain_attach_args): Likewise. * src/util/cgroup.c (virCgroupPidCode, virCgroupKillInternal): Likewise. * src/qemu/qemu_command.c(qemuParseProcFileStrings): Likewise. (qemuParseCommandLinePid): Use pid_t for pid. * daemon/libvirtd.c (daemonForkIntoBackground): Likewise. * src/conf/domain_conf.h (_virDomainObj): Likewise. * src/probes.d (rpc_socket_new): Likewise. * src/qemu/qemu_command.h (qemuParseCommandLinePid): Likewise. * src/qemu/qemu_driver.c (qemudGetProcessInfo, qemuDomainAttach): Likewise. * src/qemu/qemu_process.c (qemuProcessAttach): Likewise. * src/qemu/qemu_process.h (qemuProcessAttach): Likewise. * src/uml/uml_driver.c (umlGetProcessInfo): Likewise. * src/util/virnetdev.h (virNetDevSetNamespace): Likewise. * src/util/virnetdev.c (virNetDevSetNamespace): Likewise. * tests/testutils.c (virtTestCaptureProgramOutput): Likewise. * src/conf/storage_conf.h (_virStoragePerms): Use mode_t, uid_t, and gid_t rather than int. * src/security/security_dac.c (virSecurityDACSetOwnership): Likewise. * src/conf/storage_conf.c (virStorageDefParsePerms): Avoid compiler warning. |
||
---|---|---|
.. | ||
capabilityschemadata | ||
commanddata | ||
confdata | ||
cputestdata | ||
domainschemadata | ||
domainsnapshotxml2xmlin | ||
domainsnapshotxml2xmlout | ||
interfaceschemadata | ||
networkxml2argvdata | ||
networkxml2xmlin | ||
networkxml2xmlout | ||
nodedevschemadata | ||
nodeinfodata | ||
nwfilterxml2xmlin | ||
nwfilterxml2xmlout | ||
qemuhelpdata | ||
qemuxml2argvdata | ||
qemuxml2xmloutdata | ||
qemuxmlnsdata | ||
sexpr2xmldata | ||
storagepoolxml2xmlin | ||
storagepoolxml2xmlout | ||
storagevolxml2xmlin | ||
storagevolxml2xmlout | ||
vmx2xmldata | ||
xencapsdata | ||
xmconfigdata | ||
xml2sexprdata | ||
xml2vmxdata | ||
.valgrind.supp | ||
capabilityschematest | ||
commandhelper.c | ||
commandtest.c | ||
conftest.c | ||
cpuset | ||
cputest.c | ||
daemon-conf | ||
define-dev-segfault | ||
domainschematest | ||
domainsnapshotschematest | ||
domainsnapshotxml2xmltest.c | ||
esxutilstest.c | ||
eventtest.c | ||
int-overflow | ||
interfaceschematest | ||
interfacexml2xmltest.c | ||
jsontest.c | ||
libvirtd-fail | ||
libvirtd-pool | ||
Makefile.am | ||
networkschematest | ||
networkxml2argvtest.c | ||
networkxml2xmltest.c | ||
nodedevschematest | ||
nodedevxml2xmltest.c | ||
nodeinfotest.c | ||
nwfilterschematest | ||
nwfilterxml2xmltest.c | ||
object-locking.ml | ||
oomtrace.pl | ||
openvzutilstest.c | ||
openvzutilstest.conf | ||
pkix_asn1_tab.c | ||
qemuargv2xmltest.c | ||
qemuhelptest.c | ||
qemumonitortest.c | ||
qemuxml2argvtest.c | ||
qemuxml2xmltest.c | ||
qemuxmlnstest.c | ||
qparamtest.c | ||
read-bufsiz | ||
read-non-seekable | ||
reconnect.c | ||
schematestutils.sh | ||
seclabeltest.c | ||
sexpr2xmltest.c | ||
shunloadhelper.c | ||
shunloadtest.c | ||
sockettest.c | ||
ssh.c | ||
start | ||
statstest.c | ||
storagepoolschematest | ||
storagepoolxml2xmltest.c | ||
storagevolschematest | ||
storagevolxml2xmltest.c | ||
test_conf.sh | ||
test-lib.sh | ||
testutils.c | ||
testutils.h | ||
testutilsqemu.c | ||
testutilsqemu.h | ||
testutilsxen.c | ||
testutilsxen.h | ||
undefine | ||
utiltest.c | ||
vcpupin | ||
virbuftest.c | ||
virhashdata.h | ||
virhashtest.c | ||
virnetmessagetest.c | ||
virnetsockettest.c | ||
virnettlscontexttest.c | ||
virsh-all | ||
virsh-optparse | ||
virsh-schedinfo | ||
virsh-synopsis | ||
virshtest.c | ||
virt-aa-helper-test | ||
virtimetest.c | ||
vmx2xmltest.c | ||
xencapstest.c | ||
xmconfigtest.c | ||
xml2sexprtest.c | ||
xml2vmxtest.c |