libvirt/src/locking
Andrea Bolognani 583bdfa65c src: Don't rely on strncpy()-like behavior
The strncpy() function has this quirk where it will copy
*up* to the requested number of bytes, that is, it will
stop early if it encounters a NULL byte in the source
string.

This makes it legal to pass the size of the destination
buffer (minus one byte needed for the string terminator)
as the number of bytes to copy and still get something
somewhat reasonable out of the operation; unfortunately,
it also makes the function difficult to reason about
and way too easy to misuse.

We want to move away from the way strncpy() behaves and
towards better defined semantics, where virStrncpy()
will always copy *exactly* the number of bytes it's
been asked to copy; before we can do that, though, we
have to change a few of the callers.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-07-23 14:27:27 +02:00
..
domain_lock.c
domain_lock.h
libvirt_lockd.aug Check for tabs in augeas files 2018-01-31 15:19:26 +00:00
libvirt_sanlock.aug locking: Add io_timeout to sanlock 2015-11-18 10:56:56 +01:00
lock_daemon_config.c lockd: add support for admin protocol in virtlockd 2018-01-31 15:18:36 +00:00
lock_daemon_config.h lockd: add support for admin protocol in virtlockd 2018-01-31 15:18:36 +00:00
lock_daemon_dispatch.c
lock_daemon_dispatch.h
lock_daemon.c src: Drop most of #ifdef WITH_GNUTLS 2018-06-05 14:32:36 +02:00
lock_daemon.h
lock_driver_lockd.c all: Replace virGetLastError with virGetLastErrorCode where we can 2018-06-05 18:44:05 +02:00
lock_driver_lockd.h locking: Use bit shift for flag values not constant values. 2016-03-07 15:48:19 -05:00
lock_driver_nop.c Print hex values with '0x' prefix and octal with '0' in debug messages 2017-09-25 13:34:53 +01:00
lock_driver_nop.h
lock_driver_sanlock.c src: Don't rely on strncpy()-like behavior 2018-07-23 14:27:27 +02:00
lock_driver.h Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
lock_manager.c Remove backslash alignment attempts 2017-11-03 13:24:12 +01:00
lock_manager.h
lock_protocol.x Fix make check with gcc version 5 2016-01-18 15:19:21 +01:00
lockd.conf
Makefile.inc.am locking: don't create qemu-sanlock.conf file when QEMU isn't enabled 2018-07-18 18:46:32 +01:00
sanlock_helper.c util: Add virGettextInitialize, convert the code 2016-04-14 13:22:40 -04:00
sanlock.conf locking: Fix documentation on how automatic sanlock leases are stored 2016-12-19 17:28:41 +01:00
test_libvirt_lockd.aug.in
test_libvirt_sanlock.aug.in locking: Add io_timeout to sanlock 2015-11-18 10:56:56 +01:00
test_virtlockd.aug.in log: update docs for daemons to improve user understanding 2018-05-11 17:11:46 +01:00
virtlockd-admin.socket.in lockd: fix typo in virtlockd-admin.socket 2018-03-15 09:06:28 -06:00
virtlockd.aug rpc: remove remains of obsolete log_buffer_size config parameter 2018-03-23 10:44:35 +00:00
virtlockd.conf log: update docs for daemons to improve user understanding 2018-05-11 17:11:46 +01:00
virtlockd.init.in Fix LSB requirements in service script and sync them 2016-01-11 15:49:13 +01:00
virtlockd.pod Use https:// links for most sites 2017-10-16 10:22:34 +01:00
virtlockd.service.in lockd: add support for admin protocol in virtlockd 2018-01-31 15:18:36 +00:00
virtlockd.socket.in virtlockd: fix systemd unit file dependancies 2017-02-03 16:40:08 +00:00
virtlockd.sysconf