1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/src
Filipe Brandenburger 3f10c66270 bus-socket: Fix line_begins() to accept word matching full string
The switch to memory_startswith() changed the logic to only look for a space or
NUL byte after the matched word, but matching the full size should also be
acceptable.

This changed the behavior of parsing of "AUTH\r\n", where m will be set to 4,
since even though the word will match, the check for it being followed by ' '
or NUL will make line_begins() return false.

Tested:

- Using netcat to connect to the private socket directly:
  $ echo -ne '\0AUTH\r\n' | sudo nc -U /run/systemd/private
  REJECTED EXTERNAL ANONYMOUS

- Running the Ignition blackbox test:
  $ sudo sh -c 'PATH=$PWD/bin/amd64:$PATH ./tests.test'
  PASS

Fixes: d27b725abf
2018-07-17 21:42:20 +02:00
..
ac-power tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
activate Drop my copyright headers 2018-06-14 13:03:20 +02:00
analyze analyze: actually select longest activated-time of services 2018-06-27 14:54:19 +09:00
ask-password tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
backlight tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
basic process-util: do not hide global variable 2018-07-17 03:06:45 +09:00
binfmt tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
boot Merge pull request #9398 from yuwata/lgtm-fixes 2018-06-25 13:12:44 +02:00
busctl busctl: make parameter const 2018-06-25 18:26:17 +02:00
cgls tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgroups-agent tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
cgtop tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
core Merge pull request #9530 from keszybz/sd-bus-doc 2018-07-16 15:01:12 +02:00
coredump tree-wide: drop MSG_NOSIGNAL flag from recvmsg() invocations 2018-06-20 16:12:55 +02:00
cryptsetup cryptsetup: Add dependency on loopback setup to generated units 2018-06-27 16:57:17 +02:00
debug-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
delta Drop my copyright headers 2018-06-14 13:03:20 +02:00
detect-virt tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
dissect tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
environment-d-generator Drop my copyright headers 2018-06-14 13:03:20 +02:00
escape escape: add --instance option 2018-06-25 11:17:55 +02:00
firstboot tree-wide: use instead of #ifdef for HAVE_* 2018-06-29 11:40:15 +02:00
fsck tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
fstab-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
fuzz tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
getty-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
gpt-auto-generator tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
hibernate-resume tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
hostname Drop my copyright headers 2018-06-14 13:03:20 +02:00
hwdb tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
import pull: initialize libgcrypt before calling any functions provided by libgcrypt 2018-07-13 19:47:49 +02:00
initctl tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
journal journald: drop copyright headers for Sebastian Thorarensen 2018-07-03 01:32:25 +02:00
journal-remote Merge pull request #9422 from yuwata/conf-files 2018-06-28 10:17:54 +02:00
kernel-install tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
libsystemd bus-socket: Fix line_begins() to accept word matching full string 2018-07-17 21:42:20 +02:00
libsystemd-network network/link: Fix logic error in matching devices by MAC 2018-07-07 13:48:59 +02:00
libudev tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
locale tree-wide: add multiple inclusion guard 2018-06-25 13:04:59 +09:00
login login: fix typo in log message 2018-07-17 03:10:32 +09:00
machine machinectl: fix verbosity of import-raw or friends 2018-07-13 19:49:19 +02:00
machine-id-setup tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
modules-load tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
mount mount: do not output (null) in option 2018-06-19 08:27:47 +02:00
network network: drop unused slots 2018-07-17 12:40:04 +02:00
notify tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nspawn summary: update nspawn description string a bit 2018-06-28 11:55:44 +09:00
nss-myhostname tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nss-mymachines tree-wide: do not assign values if not used 2018-06-19 08:44:55 +02:00
nss-resolve tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
nss-systemd tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
partition Drop my copyright headers 2018-06-14 13:03:20 +02:00
path tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
portable portable: fix error handling 2018-06-25 13:56:27 +09:00
quotacheck tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
random-seed tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
rc-local-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
remount-fs tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
reply-password tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
resolve resolvectl: Take empty string argument to clear lists in "dns", "domain" and "nta" options 2018-07-17 21:20:52 +02:00
rfkill tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
run tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
shared core: add MemoryMin 2018-07-12 08:21:43 +02:00
sleep sleep: tiny coding style updates 2018-07-17 21:41:56 +02:00
socket-proxy tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
stdio-bridge tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
sulogin-shell tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
sysctl tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
system-update-generator Correct a number of trivial typos. 2018-06-18 22:44:44 +02:00
systemctl Merge pull request #9530 from keszybz/sd-bus-doc 2018-07-16 15:01:12 +02:00
systemd sd-bus: make BUS_DEFAULT_TIMEOUT configurable 2018-07-16 15:11:50 +02:00
sysusers Merge pull request #9274 from poettering/comment-header-cleanup 2018-06-14 11:26:50 +02:00
sysv-generator tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
test Merge pull request #9550 from nosada/fix-9549 2018-07-16 23:02:32 +09:00
time-wait-sync tree-wide: drop copyright lines for more authors 2018-06-22 16:39:45 +02:00
timedate tree-wide: use localtime_r() instead of localtime() 2018-06-26 14:26:39 +09:00
timesync tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
tmpfiles tmpfiles: set only default acls to folders #9545 (#9599) 2018-07-16 16:56:01 +02:00
tty-ask-password-agent tree-wide: beautify remaining copyright statements 2018-06-14 10:20:21 +02:00
udev tree-wide: drop some leftover header for Lennart Poettering 2018-07-03 01:32:36 +02:00
update-done tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
update-utmp tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
user-sessions tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
vconsole tree-wide: drop copyright headers from frequent contributors 2018-06-20 11:58:53 +02:00
veritysetup tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00
volatile-root tree-wide: remove Lennart's copyright lines 2018-06-14 10:20:20 +02:00