libvirt/src/util
Laine Stump 1c9a8746ef util: use AF_UNIX family (not AF_PACKET) for ioctl sockets
The exact family of the socket created for the fd used by ioctl(7)
doesn't matter, it just needs to be a socket and not a file. But for
some reason when macvtap support was added, it used
AF_PACKET/SOCK_DGRAM sockets for its ioctls; we later used the same
AF_PACKET/SOCK_DGRAM socket for new ioctls we added, and eventually
modified the other pre-existing ioctl sockets (for creating/deleting
bridges) to also use AF_PACKET/SOCK_DGRAM (that code originally used
AF_UNIX/SOCK_STREAM).

The problem with using AF_PACKET (intended for sending/receiving "raw"
packets, i.e. packets that can be some protocol other than TCP or UDP)
is that it requires root privileges. This meant that none of the
ioctls in virnetdev.c or virnetdevip.c would work when running
libvirtd unprivileged.

This packet solves that problem by changing the family to AF_UNIX when
creating the socket used for any ioctl().
2017-03-22 12:07:13 -04:00
..
iohelper.c More usage of virGetLastErrorMessage 2016-05-19 15:17:03 -04:00
keymaps.csv
viralloc.c Use explicit boolean comparison in OOM check 2017-02-23 10:11:16 +00:00
viralloc.h util: Remove need for STATIC_ANALYSIS check 2016-05-19 16:30:04 -04:00
virarch.c
virarch.h util: Add space before comment end marker 2015-09-14 11:32:44 +02:00
viratomic.c
viratomic.h
viraudit.c
viraudit.h
virauth.c
virauth.h
virauthconfig.c util: Fix broken syntax-check 2016-06-16 06:17:58 -04:00
virauthconfig.h
virbitmap.c util: fix off-by-one when expanding a bitmap 2017-02-14 13:30:48 +01:00
virbitmap.h util: bitmap: Make bitmaps const in virBitmapNewData and virBitmapDataToString 2016-10-12 17:29:07 +02:00
virbuffer.c util: virbuffer: introduce virBufferEscapeN 2017-02-24 12:58:23 +01:00
virbuffer.h util: virbuffer: introduce virBufferEscapeN 2017-02-24 12:58:23 +01:00
vircgroup.c cgroup: add virCgroupAddMachineTask stub for win32 2017-01-09 14:27:34 +00:00
vircgroup.h lxc: ensure libvirt_lxc and qemu-nbd move into systemd machine slice 2017-01-09 12:46:52 +00:00
vircgrouppriv.h
virclosecallbacks.c util: Fix domain object leaks on closecallbacks 2017-02-03 19:38:39 -05:00
virclosecallbacks.h Disallow inclusion of files from src/conf into src/utils 2017-02-20 15:12:07 +01:00
vircommand.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
vircommand.h qemu: add a max_core setting to qemu.conf for core dump size 2016-09-06 13:08:30 +01:00
vircommandpriv.h
virconf.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
virconf.h util: conf: Rename VIR_CONF_{U,}LONG -> VIR_CONF_{U,}LLONG 2016-07-18 15:49:57 +02:00
vircrypto.c Fix typos and grammar 2016-11-23 12:08:15 -05:00
vircrypto.h util: Introduce virCryptoGenerateRandom 2016-05-20 11:09:05 -04:00
virdbus.c Fix typos and grammar 2016-11-23 12:08:15 -05:00
virdbus.h dbus: Don't unref NULL messages 2016-02-11 11:35:02 +01:00
virdbuspriv.h
virdnsmasq.c dnsmasq: disable IPv6 default gateway in RA for isolated networks 2016-07-13 13:49:03 +03:00
virdnsmasq.h dnsmasq: disable IPv6 default gateway in RA for isolated networks 2016-07-13 13:49:03 +03:00
virebtables.c
virebtables.h
virendian.h util: Introduce virReadBufInt16LE and virReadBufInt16BE 2016-06-24 13:23:02 -04:00
virerror.c virerror: add error for libssh transport 2016-11-15 15:50:51 +01:00
virerror.h Introduce virErrorCopyNew 2015-07-10 11:47:13 +02:00
virevent.c docs: event impl. registration before hypervisor connection 2015-10-15 19:50:58 -04:00
virevent.h
vireventpoll.c util: remove redundant comments 2016-06-16 13:09:19 -04:00
vireventpoll.h THREADS.txt: fix typos 2017-01-25 09:18:49 +01:00
virfile.c virfile: Fix virFileExists commentary 2017-02-24 14:46:50 +01:00
virfile.h util: Rename virFileWaitForDevices 2017-03-15 21:17:47 -04:00
virfirewall.c util: Turn virFirewallAddRule() into a macro 2017-01-04 11:14:56 +01:00
virfirewall.h util: Fix syntax-check 2017-01-04 12:47:01 +01:00
virfirewallpriv.h
virfirmware.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
virfirmware.h driver config: Introduce virFirmware object 2016-06-13 14:13:16 -06:00
virgettext.c util: Add virGettextInitialize, convert the code 2016-04-14 13:22:40 -04:00
virgettext.h util: Add virGettextInitialize, convert the code 2016-04-14 13:22:40 -04:00
virgic.c gic: Introduce virGICVersion enumeration 2016-02-16 14:58:58 +01:00
virgic.h qemu: Probe GIC capabilities 2016-04-20 12:46:48 +02:00
virhash.c util: Refactor virHashForEach so it returns as soon as an iterator fails 2016-02-17 12:46:34 +01:00
virhash.h util: Refactor virHashForEach so it returns as soon as an iterator fails 2016-02-17 12:46:34 +01:00
virhashcode.c
virhashcode.h headers: Remove unnecessary keyword extern from function declaration 2016-05-11 09:06:32 +02:00
virhook.c libxl: add hooks support 2016-08-02 14:20:31 +02:00
virhook.h libxl: add hooks support 2016-08-02 14:20:31 +02:00
virhostcpu.c util: Allow to query the presence of host CPU bitmaps 2016-12-13 18:12:09 -05:00
virhostcpu.h util: Allow to query the presence of host CPU bitmaps 2016-12-13 18:12:09 -05:00
virhostcpupriv.h nodeinfo: move host CPU APIs out into virhostcpu.c file 2016-06-09 18:31:11 +01:00
virhostdev.c util: Forbid assigning a pci-bridge to a guest 2017-01-23 17:23:03 +01:00
virhostdev.h Disallow inclusion of files from src/conf into src/utils 2017-02-20 15:12:07 +01:00
virhostmem.c nodeinfo: move host memory APIs out into virhostmem file 2016-06-09 18:43:18 +01:00
virhostmem.h nodeinfo: move host memory APIs out into virhostmem file 2016-06-09 18:43:18 +01:00
viridentity.c src: Treat PID as signed 2016-10-13 17:58:56 +08:00
viridentity.h
virinitctl.c Add support for /run/initctl 2014-10-22 13:09:49 +01:00
virinitctl.h
viriptables.c Drop paths.h include 2016-03-18 09:43:45 +01:00
viriptables.h
viriscsi.c util: Introduce virISCSINodeNew 2016-07-28 08:27:13 -04:00
viriscsi.h util: Introduce virISCSINodeNew 2016-07-28 08:27:13 -04:00
virjson.c util: json: Add helper to reformat JSON strings 2017-01-18 09:57:06 +01:00
virjson.h util: json: Add helper to reformat JSON strings 2017-01-18 09:57:06 +01:00
virkeycode-mapgen.py
virkeycode.c
virkeycode.h
virkeyfile.c
virkeyfile.h
virkmod.c
virkmod.h
virlease.c Don't drop expired lease while reading custom leases file 2016-10-05 08:33:59 +02:00
virlease.h Export virLease* functions for leases file handling 2016-03-18 17:29:53 +01:00
virlockspace.c virJSONValueArraySize: return ssize_t 2015-10-09 15:25:08 +02:00
virlockspace.h
virlog.c admin: Allow passing NULL to virLogSetOutputs 2016-12-15 10:36:23 +01:00
virlog.h admin: Allow passing NULL to virLogSetOutputs 2016-12-15 10:36:23 +01:00
virmacaddr.c
virmacaddr.h
virmacmap.c virmacmap: Don't use hash table dataFree callback 2017-01-02 13:05:34 +01:00
virmacmap.h util: Introduce virMACMap module 2016-12-06 13:33:18 +01:00
virnetdev.c util: use AF_UNIX family (not AF_PACKET) for ioctl sockets 2017-03-22 12:07:13 -04:00
virnetdev.h util: add virNetDevGetName() function 2017-03-22 09:01:33 +01:00
virnetdevbandwidth.c virnetdevbandwidth: Compute quantum value 2016-02-05 16:43:19 +01:00
virnetdevbandwidth.h virNetDevBandwidthUpdateRate: turn class_id into integer 2015-08-11 16:10:32 +02:00
virnetdevbridge.c virNetDevBridgeGet: Don't require users to virNetDevSetupControl 2016-06-02 11:35:29 +02:00
virnetdevbridge.h
virnetdevip.c util: use AF_UNIX family (not AF_PACKET) for ioctl sockets 2017-03-22 12:07:13 -04:00
virnetdevip.h network: check accept_ra before enabling ipv6 forwarding 2017-03-22 09:01:33 +01:00
virnetdevmacvlan.c util: Fix indentation for virnetdevmacvlan 2017-02-10 14:13:50 -05:00
virnetdevmacvlan.h util: Fix indentation for virnetdevmacvlan 2017-02-10 14:13:50 -05:00
virnetdevmidonet.c
virnetdevmidonet.h
virnetdevopenvswitch.c network: allow to specify timeout for openvswitch calls 2017-02-09 14:34:08 +01:00
virnetdevopenvswitch.h network: allow to specify timeout for openvswitch calls 2017-02-09 14:34:08 +01:00
virnetdevtap.c util: add MTU arg to virNetDevTapCreateInBridgePort() 2017-02-07 13:45:08 -05:00
virnetdevtap.h util: add MTU arg to virNetDevTapCreateInBridgePort() 2017-02-07 13:45:08 -05:00
virnetdevveth.c
virnetdevveth.h
virnetdevvlan.c
virnetdevvlan.h
virnetdevvportprofile.c util: move virNetDevLinkDump to virnetlink.c 2016-06-26 19:33:07 -04:00
virnetdevvportprofile.h
virnetlink.c util: add virNetlinkDumpCommand() 2017-03-22 09:01:32 +01:00
virnetlink.h util: add virNetlinkDumpCommand() 2017-03-22 09:01:32 +01:00
virnodesuspend.c Mention the min duration for nodesuspend explicitly 2017-02-10 09:13:30 -05:00
virnodesuspend.h
virnuma.c numa: Rename virNumaGetHostNodeset and make it return only nodes with memory 2016-09-14 08:41:41 +02:00
virnuma.h numa: Rename virNumaGetHostNodeset and make it return only nodes with memory 2016-09-14 08:41:41 +02:00
virobject.c util: Make the virDomainListFree helper more universal 2015-05-11 08:28:53 +02:00
virobject.h util: Make the virDomainListFree helper more universal 2015-05-11 08:28:53 +02:00
virpci.c util: Forbid resetting non-endpoint devices 2017-01-23 17:23:12 +01:00
virpci.h util: new function virPCIDeviceGetConfigPath() 2016-11-30 15:24:35 -05:00
virperf.c perf: add emulation_faults software perf event support 2017-03-07 13:51:05 -05:00
virperf.h perf: add emulation_faults software perf event support 2017-03-07 13:51:05 -05:00
virpidfile.c network: escape quotes for dsmasq conf contents 2015-06-09 13:56:00 -04:00
virpidfile.h
virpolkit.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
virpolkit.h util: Introduce API's for Polkit text authentication 2016-03-01 06:50:16 -05:00
virportallocator.c
virportallocator.h
virprobe.h
virprocess.c virProcessRunInMountNamespace: Report errors from child 2017-02-07 10:40:53 +01:00
virprocess.h lxc: Move lxcContainerAvailable to virprocess 2017-01-11 18:02:35 +01:00
virqemu.c util: virqemu: introduce virQEMUBuildBufferEscape 2017-02-24 12:58:48 +01:00
virqemu.h util: virqemu: introduce virQEMUBuildBufferEscape 2017-02-24 12:58:48 +01:00
virrandom.c util: Perform proper virRandomBytes return value checking 2016-06-07 10:18:36 -04:00
virrandom.h util: Introduce virRandomBytes 2016-04-06 20:27:09 -04:00
virrotatingfile.c Fix typos and grammar 2016-11-23 12:08:15 -05:00
virrotatingfile.h util: Avoid variable named 'truncate' shadowing global declaration 2015-11-30 15:32:47 +01:00
virscsi.c util: Create a new virvhba module and move/rename API's 2017-02-19 06:45:09 -05:00
virscsi.h virscsi: Introduce virSCSIDeviceGetPath 2016-12-15 09:25:16 +01:00
virscsihost.c util: Move scsi_host specific functions from virutil 2017-02-19 06:45:09 -05:00
virscsihost.h util: Move scsi_host specific functions from virutil 2017-02-19 06:45:09 -05:00
virscsivhost.c virscsivhost: Introduce virSCSIVHostDeviceGetPath 2016-12-15 09:25:16 +01:00
virscsivhost.h virscsivhost: Introduce virSCSIVHostDeviceGetPath 2016-12-15 09:25:16 +01:00
virseclabel.c
virseclabel.h
virsecret.c util: Introduce virSecretLookupFormatSecret 2016-06-23 12:30:28 -04:00
virsecret.h util: Introduce virSecretLookupFormatSecret 2016-06-23 12:30:28 -04:00
virsexpr.c
virsexpr.h
virsocketaddr.c util: Introduce virSocketAddrPTRDomain 2016-12-19 09:03:29 +01:00
virsocketaddr.h util: Introduce virSocketAddrPTRDomain 2016-12-19 09:03:29 +01:00
virstorageencryption.c virStorageEncryptionSecretFree: Don't leak secret lookup definition 2016-07-11 14:21:01 +02:00
virstorageencryption.h encryption: Add <cipher> and <ivgen> to encryption 2016-07-01 15:46:57 -04:00
virstoragefile.c util: storage: add JSON backing volume parser 'raw' block driver 2017-02-22 10:39:57 +01:00
virstoragefile.h security_dac: Resolve virSecurityDACSetOwnershipInternal const correctness 2017-01-10 12:49:59 +01:00
virstring.c virstring: Introduce virStringListRemove 2016-12-06 13:33:18 +01:00
virstring.h virstring: Introduce virStringListRemove 2016-12-06 13:33:18 +01:00
virsysinfo.c util: Avoid possible NULL dereference in virSysinfoParsePPCProcessor 2017-03-07 13:25:03 -05:00
virsysinfo.h virSysinfo: Introduce SMBIOS type 2 support 2015-06-18 10:10:26 +02:00
virsysinfopriv.h tests: sysinfo: Export virSysinfoSetup via the private header 2017-03-07 10:44:26 +01:00
virsystemd.c Cache the presence of machine1 service 2017-03-06 15:44:33 +01:00
virsystemd.h systemd: Modernize machine naming 2016-02-05 16:11:50 +01:00
virsystemdpriv.h Cache the presence of machine1 service 2017-03-06 15:44:33 +01:00
virthread.c
virthread.h
virthreadjob.c
virthreadjob.h
virthreadpool.c admin: Introduce virAdmServerSetThreadPoolParameters 2016-04-18 17:07:46 +02:00
virthreadpool.h admin: Introduce virAdmServerSetThreadPoolParameters 2016-04-18 17:07:46 +02:00
virtime.c virTimeBackOffWait: Avoid long periods of sleep 2017-03-16 09:21:39 +01:00
virtime.h Add functions for handling exponential backoff loops. 2016-04-15 16:54:28 +01:00
virtpm.c tpm: adapt sysfs cancel path for new TPM driver 2015-11-17 20:52:13 -05:00
virtpm.h
virtypedparam.c Fix typos and grammar 2016-11-23 12:08:15 -05:00
virtypedparam.h Turn 1<<31 into 1U<<31 2016-05-28 13:49:14 +02:00
viruri.c virstring: Unify string list function names 2016-11-25 13:54:05 +01:00
viruri.h livirt: Move URI alias matching to util 2015-11-30 09:44:28 +01:00
virusb.c virusb: Introduce virUSBDeviceGetPath 2016-12-15 09:25:16 +01:00
virusb.h virusb: Introduce virUSBDeviceGetPath 2016-12-15 09:25:16 +01:00
virutil.c util: Rename virFileWaitForDevices 2017-03-15 21:17:47 -04:00
virutil.h util: Rename virFileWaitForDevices 2017-03-15 21:17:47 -04:00
viruuid.c util: factor out reading file into preallocated buffer 2016-05-03 08:58:30 -04:00
viruuid.h
virvhba.c util: virvhba: fix typo that breaks build on non-linux systems 2017-02-19 15:47:27 +01:00
virvhba.h util: Create a new virvhba module and move/rename API's 2017-02-19 06:45:09 -05:00
virxdrdefs.h Unify int types handling in protocol files 2016-01-11 19:56:06 +03:00
virxml.c util: Introduce virFileRewriteStr 2016-12-06 13:33:18 +01:00
virxml.h virxml: Add function to check if string contains some illegal chars 2016-10-20 18:49:22 +08:00