Systemd/src
Zbigniew Jędrzejewski-Szmek d15d0333be Add new function to filter fstab options
This fixes parsing of options in shared/generator.c. Existing code
had some issues:

- it would treate whitespace and semicolons as seperators. fstab(5)
  is pretty clear that only commas matter. And the syntax does
  not allow for spaces to be inserted in the field in fstab.
  Whitespace might be escaped, but then it should not seperate
  options. Treat whitespace and semicolons as any other character.
- it assumed that x-systemd.device-timeout would always be followed
  by "=". But this is not guaranteed, hasmntopt will return this
  option even if there's no value. Uninitialized memory could be read.
- some error paths would log, and inconsistently, some would just
  return an error code.

Filtering is split out to a separate function and tests are added.

Similar code paths in other places are adjusted to use the new function.
2015-01-11 23:41:41 -05:00
..
ac-power treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
activate treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
analyze sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine() 2014-12-24 16:53:04 +01:00
ask-password ask-password: Add --echo to enable echoing the user input 2014-10-05 15:29:41 -04:00
backlight treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
binfmt treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
boot Unify parse_argv style 2014-08-03 21:46:07 -04:00
bootchart bootchart: escape non printable process name 2014-12-04 02:10:41 +01:00
bus-proxyd bus-proxy: implement 'at_console' 2015-01-11 17:23:24 +01:00
cgls treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
cgroups-agent treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
cgtop treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
compat-libs build-sys: build compat libs from sources, avoiding the not generally available ifunc wrapping 2014-02-22 21:28:55 +01:00
console treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
core Add new function to filter fstab options 2015-01-11 23:41:41 -05:00
cryptsetup cryptsetup: support header= option 2015-01-08 16:33:59 -05:00
dbus1-generator dbus1-generator: fix array sentinal 2015-01-08 16:13:39 +01:00
debug-generator treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
delta delta: fix output alignment of [REDIRECTED] entries 2014-12-14 12:54:17 -05:00
detect-virt treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
efi-boot-generator treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
escape Unify parse_argv style 2014-08-03 21:46:07 -04:00
firstboot machined: when cloning a raw disk image, also set the NOCOW flag 2015-01-08 23:13:45 +01:00
fsck sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h 2014-12-10 19:07:48 +01:00
fstab-generator Add new function to filter fstab options 2015-01-11 23:41:41 -05:00
getty-generator treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
gpt-auto-generator gpt-auto-generator: make use of new btrfs-util.h APIs 2014-12-12 13:35:32 +01:00
gudev gudev: replace regex with sym file 2014-06-21 16:25:15 +02:00
hibernate-resume treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
hostname tmpfiles: add new line type 'v' for creating btrfs subvolumes 2014-12-28 02:08:40 +01:00
hwdb systemd-hwdb: port to new verbs helper 2014-12-19 03:02:55 +01:00
import import: also set NOCOW for gpt disk images 2015-01-08 01:25:40 +01:00
initctl treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
journal journal: do not check for number of files 2015-01-09 09:31:26 -05:00
journal-remote journal-upload: enable curl debug output conditionally 2015-01-06 00:26:26 -05:00
kernel-install kernel-install/90-loaderentry.install: fix cmdline parsing 2014-11-01 14:39:48 -04:00
libsystemd kdbus.h: update 2015-01-10 04:16:18 +01:00
libsystemd-network libsystemd-network: fix typo in lldp 2015-01-05 12:34:11 +01:00
libsystemd-terminal Revert commit f131770b "tree-wide: spelling fixes" 2014-12-31 13:34:21 +01:00
libudev libudev: fix strict aliasing violation 2014-12-25 10:55:41 -05:00
locale tmpfiles: add new line type 'v' for creating btrfs subvolumes 2014-12-28 02:08:40 +01:00
login loginctl: make session/user arguments optional for a number commands, and imply calling session/user instead 2015-01-09 21:30:39 +01:00
machine loginctl: port to generic verbs.h API 2015-01-08 23:13:45 +01:00
machine-id-commit machine-id-commit: Introduce machine-id-commit binary 2014-12-03 03:41:19 +01:00
machine-id-setup Unify parse_argv style 2014-08-03 21:46:07 -04:00
modules-load treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
network network: apply static addresses in specified order 2015-01-11 18:17:33 -05:00
notify treewide: no need to negate errno for log_*_errno() 2014-11-28 13:29:21 +01:00
nspawn machined: when cloning a raw disk image, also set the NOCOW flag 2015-01-08 23:13:45 +01:00
nss-myhostname nss-myhostname: always will in canonical hostname field when resolving addresses to hostnames 2015-01-05 16:24:41 +01:00
nss-mymachines nss: remove dead code 2014-09-19 00:15:39 +02:00
nss-resolve sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h 2014-12-10 19:07:48 +01:00
path treewide: yet more log_*_errno + return simplifications 2014-11-28 18:56:16 +01:00
python-systemd python-systemd: avoid hitting assert in __exit__ 2014-10-14 08:35:16 -04:00
quotacheck delta: diff returns 1 when files differ, ignore this 2014-11-29 11:10:51 -05:00
random-seed treewide: sanitize loop_write 2014-12-09 21:36:08 -05:00
rc-local-generator treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
remount-fs treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
reply-password treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
resolve tree-wide: spelling fixes 2014-12-30 20:07:04 -05:00
resolve-host sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h 2014-12-10 19:07:48 +01:00
rfkill rfkill: rework how we generate file names from rfkill devices 2014-12-03 02:04:55 +01:00
run machinectl: make sure that "machinectl login" exits immediately when the machine it is connected to dies 2015-01-07 03:08:00 +01:00
shared Add new function to filter fstab options 2015-01-11 23:41:41 -05:00
shutdownd treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
sleep Implement masking and overriding of generators 2015-01-11 18:17:33 -05:00
socket-proxy treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
sysctl treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
system-update-generator treewide: another round of simplifications 2014-11-28 19:57:32 +01:00
systemctl systemctl: add missing output modes to help message 2015-01-09 13:54:19 +01:00
systemd core: add new logic for services to store file descriptors in PID 1 2015-01-06 03:16:39 +01:00
sysusers logind: unify how we cast between uid_t and pointers for hashmap keys 2015-01-09 18:35:36 +01:00
sysv-generator sysv-generator: initialize units before use to ensure correct ordering 2015-01-07 19:08:58 +01:00
test Add new function to filter fstab options 2015-01-11 23:41:41 -05:00
timedate tmpfiles: add new line type 'v' for creating btrfs subvolumes 2014-12-28 02:08:40 +01:00
timesync timesync: remove square(), use pow instead 2014-12-25 10:55:41 -05:00
tmpfiles tmpfiles: make gcc shut up 2015-01-06 20:33:46 +01:00
tty-ask-password-agent util: rename ignore_file() to hidden_file() 2014-12-19 20:03:36 +01:00
udev udevadm: don't hit an assert when obsolete parameters are passed 2015-01-08 01:59:58 +01:00
update-done tmpfiles: add new line type 'v' for creating btrfs subvolumes 2014-12-28 02:08:40 +01:00
update-utmp treewide: use log_*_errno whenever %m is in the format string 2014-11-28 19:49:27 +01:00
vconsole treewide: sanitize loop_write 2014-12-09 21:36:08 -05:00
.gitignore
Makefile