summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* core: improve log messages when we cannot process a mount pointLennart Poettering2020-05-263-3/+60
| | | | | | | | | | | | Whenever we pick up a new line in /proc/self/mountinfo and want to synthesize a new mount unit from it, let's say which one it is. Moreover, downgrade the log message when we encounter a mount point with an overly long name to LOG_WARNING, since it's generally fine to ignore such mount points. Also, attach a catalog entry to explain the situation further. Prompted-By: #15221
* unit-name: use TAKE_PTR() where appropriateLennart Poettering2020-05-261-5/+4
|
* unit-name: tighten checks for building valid unit namesLennart Poettering2020-05-261-19/+44
| | | | | | | | | | | | Let's be more thorough that whenever we build a unit name based on parameters, that the result is actually a valid user name. If it isn't fail early. This should allows us to catch various issues earlier, in particular when we synthesize mount units from /proc/self/mountinfo: instead of actually attempting to allocate a mount unit we will fail much earlier when we build the name to synthesize the unit under. Failing early is a good thing generally.
* Merge pull request #15167 from ssahani/address-gen-modeLennart Poettering2020-05-258-8/+55
|\ | | | | networkctl: Add a range to address genmode
| * network: Allow to configure addr_gen_modeSusant Sahani2020-05-217-7/+50
| | | | | | | | | | | | | | | | | | | | | | Defines how link-local and autoconf addresses are generated. 0: generate address based on EUI64 (default) 1: do no generate a link-local address, use EUI64 for addresses generated from autoconf 2: generate stable privacy addresses, using the secret from stable_secret (RFC7217) 3: generate stable privacy addresses, using a random secret if unset
| * networkctl: Add a range to address genmodeSusant Sahani2020-05-211-1/+5
| |
* | Merge pull request #15872 from keszybz/networkd-typesLennart Poettering2020-05-254-31/+19
|\ \ | | | | | | Type and parsing fixes for networkd
| * | network: allow empty assignment to PreferredLifetime=Zbigniew Jędrzejewski-Szmek2020-05-251-2/+2
| | | | | | | | | | | | | | | | | | Users might want to use that to unset a previous setting. The docs seem OK as they are: we don't need to explictly mention the empty value, since it is almost always allowed.
| * | network: use consistent type when parsing lifetimesZbigniew Jędrzejewski-Szmek2020-05-252-3/+3
| | | | | | | | | | | | | | | Those fields are both uint32_t, so we should use the same type when parsing. Having a different type didn't change the result, but let's be consistent.
| * | sd-path: fix systemd-system-generator-path lookupZbigniew Jędrzejewski-Szmek2020-05-211-1/+1
| | | | | | | | | | | | CID#1422164.
| * | network: reduce scope of variables, etc.Zbigniew Jędrzejewski-Szmek2020-05-211-23/+11
| | |
| * | network: fix signed/unsigned confusionZbigniew Jędrzejewski-Szmek2020-05-211-2/+2
| | | | | | | | | | | | | | | | | | | | | sd_dhcp_lease_get_servers() returns int, which would never be negative when cast to size_t, so we condition check was wrong. CID#1425417.
* | | tree-wide: codespell fixesFrantisek Sumsal2020-05-256-8/+8
| | | | | | | | | | | | Another batch of codespell fixes as reported by Fossies.org
* | | ACCEL_MOUNT_MATRIX for additional Acer Spin modelDana Olson2020-05-241-0/+3
| | | | | | | | | | | | This fixes the broken rotation on the Acer Spin 1 I recently bought (exact model is SP111-34N-P4BZ). It is possible that all of the SP111 models would use the same matrix, but to be on the safe side, I added a new entry.
* | | login: limit nr_inodes for /run/user/$UIDTopi Miettinen2020-05-249-10/+40
| | | | | | | | | | | | | | | Limit number of inodes for tmpfs mounts on /run/user/$UID. Default is RuntimeDirectorySize= divided by 4096.
* | | home: respect user record mount flagsTudor Roman2020-05-244-12/+12
| | |
* | | hwdb: remove support for MOUSE_WHEEL_TILT_*Peter Hutterer2020-05-242-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has now been deprecated in libinput, the only known user of this property. It was never set for any device and weston and mutter, maybe other compositors, never added the code required to parse it. The benefit we could get in the UI from handling tilt differently to wheel is tiny and the lack of support shows that it isn't of interest to anyone. Let's remove this. See also https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/444
* | | Merge pull request #15886 from mrc0mmand/travis-enable-fuzz-testsEvgeny Vereshchagin2020-05-232-2/+6
|\ \ \ | | | | | | | | travis: enable fuzzer regression tests under sanitizers
| * | | meson: pass the optimization level to the fuzzer buildFrantisek Sumsal2020-05-231-1/+2
| | | |
| * | | travis: enable fuzzer regression tests under sanitizersFrantisek Sumsal2020-05-221-1/+4
| | | |
* | | | Merge pull request #15889 from evverx/15885Evgeny Vereshchagin2020-05-222-1/+10
|\ \ \ \ | |/ / / |/| | | network: Fix crash when SendOption= is invalid
| * | | tests: add a testcase for https://github.com/systemd/systemd/issues/15885Evgeny Vereshchagin2020-05-221-0/+9
| | | |
| * | | network: Fix crash when SendOption= is invalidSusant Sahani2020-05-221-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` p11-kit-0.23.20-1.fc32.x86_64 pam-1.3.1-26.fc33.x86_64 xz-libs-5.2.5-1.fc33.x86_64 zlib-1.2.11-21.fc32.x86_64 (gdb) bt lvalue=0x560e10 "SendOption", ltype=2, rvalue=0x560e1b "11:string", data=0x561e20, userdata=0x561cd0) at ../src/network/networkd-dhcp-common.c:580 table=0x4392e0 <network_network_gperf_lookup>, section=0x560ef0 "DHCPv4", section_line=14, lvalue=0x560e10 "SendOption", rvalue=0x560e1b "11:string", flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:132 lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, section=0x7fffffffc9f8, section_line=0x7fffffffc9a0, section_ignored=0x7fffffffc99d, l=0x560e10 "SendOption", userdata=0x561cd0) at ../src/shared/conf-parser.c:270 lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:395 lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:452 dropin_dirname=0x7fffffffcbd0 "veth99.network.d", sections=0x4f3a18 "Match", lookup=0x7ffff7d2f76d <config_item_perf_lookup>, table=0x4392e0 <network_network_gperf_lookup>, flags=CONFIG_PARSE_WARN, userdata=0x561cd0) at ../src/shared/conf-parser.c:511 (gdb) q A debugging session is active. Inferior 1 [process 118718] will be killed. ``` ``` $ printf '[DHCPv4]\nSendOption=1:uint8' >crash $ ./out/fuzz-network-parser ./crash INFO: Seed: 1158717610 INFO: Loaded 2 modules (199728 inline 8-bit counters): 136668 [0x7faf3e91a930, 0x7faf3e93bf0c), 63060 [0xadf190, 0xaee7e4), INFO: Loaded 2 PC tables (199728 PCs): 136668 [0x7faf3e93bf10,0x7faf3eb51cd0), 63060 [0xaee7e8,0xbe4d28), ./out/fuzz-network-parser: Running 1 inputs 1 time(s) each. Running: ./crash Assertion 's' failed at src/basic/parse-util.c:458, function int safe_atou8(const char *, uint8_t *)(). Aborting. ==5588== ERROR: libFuzzer: deadly signal #0 0x51811e in __sanitizer_print_stack_trace (/home/vagrant/systemd/out/fuzz-network-parser+0x51811e) #1 0x46b921 in fuzzer::PrintStackTrace() (/home/vagrant/systemd/out/fuzz-network-parser+0x46b921) #2 0x44ded6 in fuzzer::Fuzzer::CrashCallback() (.part.0) (/home/vagrant/systemd/out/fuzz-network-parser+0x44ded6) #3 0x44df9d in fuzzer::Fuzzer::StaticCrashSignalCallback() (/home/vagrant/systemd/out/fuzz-network-parser+0x44df9d) #4 0x7faf3d6d7b1f (/lib64/libpthread.so.0+0x14b1f) #5 0x7faf3d3c2624 in raise (/lib64/libc.so.6+0x3c624) #6 0x7faf3d3ab8d8 in abort (/lib64/libc.so.6+0x258d8) #7 0x7faf3e12593a in log_assert_failed_realm /home/vagrant/systemd/build/../src/basic/log.c:819:9 #8 0x7faf3e140ce1 in safe_atou8 /home/vagrant/systemd/build/../src/basic/parse-util.c:458:9 #9 0x68089c in config_parse_dhcp_send_option /home/vagrant/systemd/build/../src/network/networkd-dhcp-common.c:517:21 #10 0x7faf3debed4e in next_assignment /home/vagrant/systemd/build/../src/shared/conf-parser.c:132:32 #11 0x7faf3deb7783 in parse_line /home/vagrant/systemd/build/../src/shared/conf-parser.c:270:16 #12 0x7faf3deb606c in config_parse /home/vagrant/systemd/build/../src/shared/conf-parser.c:395:21 #13 0x7faf3deb85ee in config_parse_many_files /home/vagrant/systemd/build/../src/shared/conf-parser.c:452:21 #14 0x7faf3deb8c57 in config_parse_many /home/vagrant/systemd/build/../src/shared/conf-parser.c:511:16 #15 0x57c2eb in network_load_one /home/vagrant/systemd/build/../src/network/networkd-network.c:470:13 #16 0x543490 in LLVMFuzzerTestOneInput /home/vagrant/systemd/build/../src/network/fuzz-network-parser.c:26:16 #17 0x44e3e8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/vagrant/systemd/out/fuzz-network-parser+0x44e3e8) #18 0x433505 in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned long) (/home/vagrant/systemd/out/fuzz-network-parser+0x433505) #19 0x43c449 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/vagrant/systemd/out/fuzz-network-parser+0x43c449) #20 0x42c4a6 in main (/home/vagrant/systemd/out/fuzz-network-parser+0x42c4a6) #21 0x7faf3d3ad1a2 in __libc_start_main (/lib64/libc.so.6+0x271a2) #22 0x42c4fd in _start (/home/vagrant/systemd/out/fuzz-network-parser+0x42c4fd) NOTE: libFuzzer has rudimentary signal handlers. Combine libFuzzer with AddressSanitizer or similar for better crash reports. SUMMARY: libFuzzer: deadly signal ```
* | | Merge pull request #15869 from poettering/cant-authZbigniew Jędrzejewski-Szmek2020-05-229-19/+85
|\ \ \ | | | | | | | | homed: fix logging into unfixated home directories
| * | | homed: don't insist on authentication against host-copy user recordLennart Poettering2020-05-213-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | homed maintains two or three copies of the user's identity record per home directory: one on the host, one inside the LUKS header, and one embedded in the home directory. Previously we'd insist that if a user logs in they have to authenticate against all three, as a safety feature. This broke logging into unfixated records however, since in that case the host version is synthetic and thus does not carry any authentication data. Let's hence losen the strictness here: accept authentication against host records that carry no auth data. This should be safe as we know after all that the second/third record will catch invalid accesses. Fixes: #15178
| * | | homed: include error string when in log message if quota doesn't workLennart Poettering2020-05-211-1/+1
| | | |
| * | | bus-util: actually register the object managerLennart Poettering2020-05-211-0/+6
| | | |
| * | | homed: also fsync private/public key pair when storing itLennart Poettering2020-05-211-2/+6
| | | |
| * | | homed: fix typoLennart Poettering2020-05-211-1/+1
| | | |
| * | | homed: make sure we log about invalid user records we loadLennart Poettering2020-05-211-1/+1
| | | |
| * | | homed: automatically clean up empty user record filesLennart Poettering2020-05-211-0/+28
| | | | | | | | | | | | | | | | See: #15178
| * | | homed: when updating local copy of user record, sync to diskLennart Poettering2020-05-211-1/+1
| | | | | | | | | | | | | | | | Apparently xfs needs us to sync explicitly, see #15178.
| * | | fileio: sync directory after rename, tooLennart Poettering2020-05-211-0/+7
| | | |
| * | | homed: return a better error when a home has no authentication information ↵Lennart Poettering2020-05-214-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined We can't log into home entries that have no password or PKCS#11 token. Return a proper, useful error in that case. See: #15178
* | | | Merge pull request #15877 from mrc0mmand/meson-fuzz-testEvgeny Vereshchagin2020-05-222-3/+6
|\ \ \ \ | |/ / / |/| | | meson: add fuzz-tests= option
| * | | meson: add fuzz-tests= optionFrantisek Sumsal2020-05-212-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The slow-tests= option already enables fuzzers as well, however, this option can't be used in the "fully sanitized" runs, as certain slow tests are affected by the performance quite significantly. This option allows us to enable only fuzzers without the slow tests to meet the needs of such runs.
* | | | Merge pull request #15433 from mrc0mmand/test-reintroduce-parallelizationZbigniew Jędrzejewski-Szmek2020-05-215-22/+27
|\ \ \ \ | |/ / / |/| | | test: copy the test image instead of symlinking it
| * | | test: introduce TEST_PARALLELIZE to support running tests in parallelFrantisek Sumsal2020-05-171-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support running tests in parallel by switching to copying of the base image instead of symlinking it.. This still requires some setup steps, like running `make setup` on tests which have unique $IMAGE_NAME beforehand (and sequentially), otherwise they'll all try to create the same base image when started in parallel, leading to nasty issues. However, as running the integration tests in parallel is such an unusual use case it should be good enough, for now.
| * | | test: fix public/private image detection and prefer the latter oneFrantisek Sumsal2020-05-171-19/+18
| | | |
| * | | test: unify quotation around image namesFrantisek Sumsal2020-05-174-3/+4
| | | |
* | | | Merge pull request #15873 from evverx/pointer-overflow-oss-fuzzZbigniew Jędrzejewski-Szmek2020-05-212-1/+10
|\ \ \ \ | | | | | | | | | | oss-fuzz: turn on the pointer-overflow check
| * | | | docs: add a link to the Fossies codespell reportEvgeny Vereshchagin2020-05-211-0/+3
| | | | |
| * | | | oss-fuzz: turn on the pointer-overflow checkEvgeny Vereshchagin2020-05-211-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's off by default on OSS-Fuzz but it should be safe to turn it on manually: https://github.com/google/oss-fuzz/issues/659#issuecomment-631897889 Just a follow-up to https://github.com/systemd/systemd/pull/15865.
* | | | | Update resolvectl zsh completioncodicodi2020-05-211-5/+2
| | | | |
* | | | | shared: treat generator units as vendor unitsJeremy Cline2020-05-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Units created with "systemctl edit --full" from generator units aren't removed with "systemctl revert" because units in the generator, generator_early, and generator_late paths aren't considered vendor units. Alter path_is_vendor() to return true if the given path is a generator unit, which in turn causes "systemctl revert" to remove units created with "systemctl edit --full" as they now have vendor versions. Fixes #10053
* | | | | udev: rename the persistent link for ATA devicesLidong Zhong2020-05-212-6/+52
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ATA devices should use the ATA ids like port number and (possibly) master/slave or multiplier id, not the generic SCSI ID. Currently only port number is included in the link. With this patch the link would be able to support more cases, which are a) when the device is behind a port multiplexer b) the distinction between master and slave (distinguished by target id). I tried to verify scenario a) with this patch, but I failed to find a machine with PMP SATA devices attached. But the link below https://github.com/systemd/systemd/issues/3943 could show what's the difference. Here is my test for scenario b) Current version: linux-ql21:~ # ll /sys/class/block/sd[ab] lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sda -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda lrwxrwxrwx 1 root root 0 May 8 20:46 /sys/class/block/sdb -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-1 lrwxrwxrwx 1 root root 9 May 8 20:44 /dev/disk/by-path/pci-0000:00:01.1-ata-1 -> ../../sdb linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1 E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-path/pci-0000:00:01.1-ata-1 /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1 E: DEVLINKS=/dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-path/pci-0000:00:01.1-ata-1 After patch applied: linux-ql21:~ # ll /sys/class/block/sd[ab] lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sda -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:0/3:0:0:0/block/sda lrwxrwxrwx 1 root root 0 May 8 21:07 /sys/class/block/sdb -> ../../devices/pci0000:00/0000:00:01.1/ata4/host3/target3:0:1/3:0:1:0/block/sdb linux-ql21:~ # ll /dev/disk/by-path/pci-0000\:00\:01.1-ata-* lrwxrwxrwx 1 root root 9 May 8 21:07 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 -> ../../sda lrwxrwxrwx 1 root root 9 May 8 21:07 /dev/disk/by-path/pci-0000:00:01.1-ata-1.1 -> ../../sdb linux-ql21:~ # udevadm info /sys/class/block/sda |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1.0 E: DEVLINKS=/dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-id/ata-VBOX_HARDDISK_VB3649e885-3e0cdd64 /dev/disk/by-path/pci-0000:00:01.1-ata-1.0 /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VB3649e885-3e0cdd64 linux-ql21:~ # udevadm info /sys/class/block/sdb |grep by-path S: disk/by-path/pci-0000:00:01.1-ata-1.1 E: DEVLINKS=/dev/disk/by-id/scsi-0ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/ata-VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-1ATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-id/scsi-SATA_VBOX_HARDDISK_VBc53b2498-d84ae8de /dev/disk/by-path/pci-0000:00:01.1-ata-1.1 Changelog: v5: add another parameter compat_link in handle_scsi() v4: comment for ID_PATH_ATA_COMPAT get string length with pointer difference (suggested by Franck Bui<fbui@suse.com>) v3: creating compatible link from env variables type change v2: remove udev rules modification for compatible link setup a test scenario of master/slave ATA devices v1: initial patch
* | | | rules: automatically pull in smartcard.target from all CCID devicesLennart Poettering2020-05-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | We apparently never matched the USB interface class. Let's fix that. Prompted by: #15676
* | | | Merge pull request #15870 from poettering/proc-cmdline-efi-fixZbigniew Jędrzejewski-Szmek2020-05-213-19/+53
|\ \ \ \ | |_|_|/ |/| | | udev /proc/cmdline handling fixes
| * | | proc-cmdline: make checking of EFI options variable optionalLennart Poettering2020-05-203-14/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And do not use it in the IMPORT{cmdline} udev code. Wherever we expose direct interfaces to check the kernel cmdline, let's not consult our systemd-specific EFI variable, but strictly use the actual kernel variable, because that's what we claim we do. i.e. it's fine to use the EFI variable for our own settings, but for the generic APIs to the kernel cmdline we should not use it. Specifically, this applies to IMPORT{cmdline} and ConditionKernelCommandLine=. In the latter case we weren#t checking the EFI variable anyway, hence let's do the same for the udev case, too. Fixes: #15739
| * | | proc-cmdline: add checking of EFI options variable in ↵Lennart Poettering2020-05-201-4/+19
| | | | | | | | | | | | | | | | proc_cmdline_get_key_many() too