Commit Graph

45330 Commits

Author SHA1 Message Date
Hans de Goede a7a8dcffc2 hwdb: Add accel orientation quirk for Trekstor Surftab Twin 10.1 ST10432-8
The Trekstor Surftab Twin 10.1 ST10432-8 accelerometer has its x-axis
inverted, add a quirk for this.
2020-05-31 16:21:36 +02:00
Hans de Goede b5f829a2da hwdb: Add accel orientation quirk for Toshiba Encore WT10A tablet
Add a quirk to correct the accelerometer orientation on
Toshiba Encore WT10A tablets.
2020-05-31 10:27:00 +02:00
Zbigniew Jędrzejewski-Szmek d1109e12c0 udevd: update snippet string
Repeating the unit name in the description is not useful, and "manages devices"
is too cryptic.
2020-05-30 17:15:20 +02:00
Luca Boccassi d904afc730 core: reload cache if it's dirty when starting a UNIT_NOT_FOUND unit
The time-based cache allows starting a new unit without an expensive
daemon-reload, unless there was already a reference to it because of
a dependency or ordering from another unit.
If the cache is out of date, check again if we can load the
fragment.
2020-05-30 16:50:05 +02:00
Zbigniew Jędrzejewski-Szmek 8f0a346a29 shell-completions: update bootctl
Entries in the completion lists are reordered to follow --help output:
this makes it much easier to see what is missing.
2020-05-30 16:04:43 +02:00
Zbigniew Jędrzejewski-Szmek 956508cb5d
Merge pull request #15935 from poettering/cache-more-efi-vars
logind + efi-loader: cache more efi vars
2020-05-30 15:44:26 +02:00
Rafael Fontenelle d308cd4bfa po: update Brazilian Portuguese translation 2020-05-30 15:21:48 +02:00
Zbigniew Jędrzejewski-Szmek 3a02643a40
Merge pull request #15915 from poettering/journal-external-link
journal: show external links in log output
2020-05-30 15:04:40 +02:00
Daan De Meyer 366d077235 update NEWS 2020-05-30 14:31:24 +02:00
Lennart Poettering ddb82ec2a2 sd-dhcp: clean-up of DHCP lease server code
This is an attempt to clean-up the DHCP lease server type code a bit. We
now strictly use the same enum everywhere, and store server info in an
array. Moreover, we use the same nomenclature everywhere.

This only makes the changes in the sd-dhcp code. The networkd code is
untouched so far (but should be fixed up like this too. But it's more
complicated since this would then touch actual settings in .network
files).

Note that this also changes some field names in serialized lease files.
But given that these field names have not been part of a released
version of systemd yet, such a change should be ok.

This is pure renaming/refactoring, shouldn't actually change any
behaviour.
2020-05-30 14:18:43 +02:00
Jay Burger eed44b715d fix_test_function_timeout 2020-05-30 12:01:29 +02:00
Christian Oder 5e0676c2ca hwdb: Add accel orientation quirk for Chuwi Hi10 X
Add a quirk to fix the accelerometer orientation on the Chuwi Hi10 X
so that the display is not rotated 90 degree counter clockwise anymore.
2020-05-30 11:59:47 +02:00
Susant Sahani a1422af564 network: L2TP fix crash
```
=220358== Invalid read of size 8
==220358==    at 0x452F05: l2tp_session_free (l2tp-tunnel.c:46)
==220358==    by 0x456926: l2tp_tunnel_done (l2tp-tunnel.c:725)
==220358==    by 0x43CF4D: netdev_free (netdev.c:205)
==220358==    by 0x43D045: netdev_unref (netdev.c:210)
==220358==    by 0x4198B7: manager_free (networkd-manager.c:1877)
==220358==    by 0x40D0B3: manager_freep (networkd-manager.h:105)
==220358==    by 0x40DE1C: run (networkd.c:21)
==220358==    by 0x40DE75: main (networkd.c:130)
==220358==  Address 0x5c035d0 is 0 bytes inside a block of size 40 free'd
==220358==    at 0x483A9F5: free (vg_replace_malloc.c:538)
==220358==    by 0x452F87: l2tp_session_free (l2tp-tunnel.c:57)
==220358==    by 0x456857: netdev_l2tp_tunnel_verify (l2tp-tunnel.c:710)
==220358==    by 0x440947: netdev_load_one (netdev.c:738)
==220358==    by 0x441222: netdev_load (netdev.c:851)
==220358==    by 0x419C50: manager_load_config (networkd-manager.c:1934)
==220358==    by 0x40D7BE: run (networkd.c:87)
==220358==    by 0x40DE75: main (networkd.c:130)
==220358==  Block was alloc'd at
==220358==    at 0x4839809: malloc (vg_replace_malloc.c:307)
==220358==    by 0x452A76: malloc_multiply (alloc-util.h:96)
==220358==    by 0x4531E6: l2tp_session_new_static (l2tp-tunnel.c:82)
==220358==    by 0x455C01: config_parse_l2tp_session_id (l2tp-tunnel.c:535)
==220358==    by 0x48E6D72: next_assignment (conf-parser.c:133)
==220358==    by 0x48E77A3: parse_line (conf-parser.c:271)
==220358==    by 0x48E7E4F: config_parse (conf-parser.c:396)
==220358==    by 0x48E80E5: config_parse_many_files (conf-parser.c:453)
==220358==    by 0x48E8490: config_parse_many (conf-parser.c:512)
==220358==    by 0x44089C: netdev_load_one (netdev.c:729)
==220358==    by 0x441222: netdev_load (netdev.c:851)
==220358==    by 0x419C50: manager_load_config (networkd-manager.c:1934)

```
2020-05-30 11:59:27 +02:00
Zbigniew Jędrzejewski-Szmek 856e51957a strv: propagate location info from the call site too 2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 138f49e452 basic/hashmap,set: change "internal_" to "_" as the prefix
"internal" is a lot of characters. Let's take a leaf out of the Python's book
and simply use _ to mean private. Much less verbose, but the meaning is just as
clear, or even more.
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek ea806175cd gdb: make output a bit nicer
Now: set, 0x7f19be8f7c20 <string_hash_ops>, False, 1, 1, 4, unit_new, src/core/unit.c:96
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 68b0ab5891 gitignore: ignore mypy cache
mypy is occasionally useful for checking python scripts.
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 55825de59b basic/hashmap: drop unneeded macro 2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 3aff6c7917 gdb: update accessors for bucket counts and entry sizes
Afaict, this code never worked, since even when this code was added in
2ea8c08306, neither all_entry_sizes nor
all_direct_buckets were defined.
2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 31ca609f8a gdb: drop python2 support 2020-05-30 11:40:53 +02:00
Zbigniew Jędrzejewski-Szmek 43874aa7bb hashmap: don't allow hashmap_type_info table to be optimized away
This makes debugging hashmaps harder, because we can't query the size.  Make
sure that table is always present.
2020-05-30 11:40:37 +02:00
Zbigniew Jędrzejewski-Szmek c544fc319c tools/gdb: decrese indentation to 4 spaces
This follows PEP 8 and matces other python code in systemd.
2020-05-30 11:24:58 +02:00
Zbigniew Jędrzejewski-Szmek 06134457d2 basic/hashmap: update comment 2020-05-30 11:24:57 +02:00
Daan De Meyer 269412ef44
Merge pull request #15958 from layderv/master
#15773 add --reboot-arg to systemctl reboot
2020-05-30 11:04:14 +02:00
Daan De Meyer 02591c95bb
Merge pull request #15975 from mgub/patch-1
Fix typo.
2020-05-30 11:00:13 +02:00
Michael Gubbels bf1abf1a2c
Fix typo. 2020-05-29 16:40:39 -07:00
laydervus dae710bef1 #15773 add --reboot-argument to systemctl reboot 2020-05-29 21:22:29 +01:00
Lennart Poettering 29da419305 stat-util: trivial empty_or_null() tweaks
To small tweaks: /dev/null is definitely a char device. And if we have
the path, to a string base comparison first.
2020-05-29 21:23:43 +02:00
sterlinghughes 8acb11a6a3 Check ambient set against bounding set prior to applying ambient set
Fixes #15020
2020-05-29 21:23:26 +02:00
Lennart Poettering 42ba8d25ad update TODO 2020-05-29 18:32:38 +02:00
Lennart Poettering 5fc20ede0f
Merge pull request #15954 from keszybz/unit-file-leak
Fix leak in unit path cache and another small optimization
2020-05-29 16:02:53 +02:00
Lennart Poettering 84190644ff efi: add more logging for all EFI variable reads 2020-05-29 15:42:09 +02:00
Lennart Poettering 002914e688 bootctl: add simple, low-level reboot-to-firmware verb for controlling the flag 2020-05-29 15:41:50 +02:00
Lennart Poettering 8a96369e0b bootctl: show reboot-to-firmware info, too 2020-05-29 15:41:46 +02:00
Lennart Poettering c37070c85a efi: cache OsIndications too 2020-05-29 15:41:43 +02:00
Lennart Poettering d197c403b2 efi: explicitly update mtime of EFI variables when changing them 2020-05-29 15:41:31 +02:00
Lennart Poettering c75e7da0b5 efi: as extra paranoia NUL terminate UTF-16 strings with three NUL bytes
This is a safey net anyway, let's make it fully safe: if the data ends
on an uneven byte, then we need to complete the UTF-16 codepoint first,
before adding the final NUL byte pair. Hence let's suffix with three
NULs, instead of just two.
2020-05-29 15:41:18 +02:00
Lennart Poettering 9e5230aad9 efi: cache OsIndicationsSupported
As suggested by:

https://github.com/systemd/systemd/issues/14828#issuecomment-634202054
2020-05-29 15:41:06 +02:00
Lennart Poettering 5c25f42322 efi: avoid weirdly double }} by indenting differently 2020-05-29 15:41:03 +02:00
Lennart Poettering d4bd786d69 efi: cache LoaderEntries EFI variable
Based-on:

https://github.com/systemd/systemd/issues/14828#issuecomment-634202054
2020-05-29 15:40:01 +02:00
Evgeny Vereshchagin ceae629564 README: add a Fossies codespell badge
I keep forgetting where the report is. Hopefully the badge will
make it easier to find it. I also fixed several typos codespell
found along the way.
2020-05-29 15:06:16 +02:00
Yu Watanabe 433e14fda7 network: fix memleaks
Fixes #15951.
2020-05-29 14:49:40 +02:00
Yu Watanabe 7c5f97f5e3 network: clean up doubled white space 2020-05-29 14:49:18 +02:00
Susant Sahani 1c3ec1cd45 network: dhcp6 - fix memory leak 2020-05-29 13:37:58 +02:00
Susant Sahani b4ccc5de7d network: Inroduce DHCP6- send vendor options
network: Inroduce DHCP6- send vendor options

```
 0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      OPTION_VENDOR_OPTS       |           option-len          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       enterprise-number                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                       vendor-option-data                      .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
```

```
  0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          sub-opt-code         |         sub-option-len        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                        sub-option-data                        .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Figure 31: Vendor-specific Options Format

      sub-opt-code         The code for the sub-option.  A 2-octet
                           field.

      sub-option-len       An unsigned integer giving the length of the
                           sub-option-data field in this sub-option in
                           octets.  A 2-octet field.

      sub-option-data      The data area for the sub-option.  The
                           length, in octets, is specified by
                           sub-option-len.

```
2020-05-29 13:37:57 +02:00
Susant Sahani 99ccb8ff89 sd-dhcp6: Introduce vendor specific information
RFC: 8415
21.17.  Vendor-specific Information Option

   This option is used by clients and servers to exchange vendor-
   specific information.

   The format of the Vendor-specific Information option is:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      OPTION_VENDOR_OPTS       |           option-len          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                       enterprise-number                       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                       vendor-option-data                      .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

           Figure 30: Vendor-specific Information Option Format

      option-code          OPTION_VENDOR_OPTS (17).

      option-len           4 + length of vendor-option-data field.

      enterprise-number    The vendor's registered Enterprise Number as
                           maintained by IANA [IANA-PEN].  A 4-octet
                           field containing an unsigned integer.

      vendor-option-data   Vendor options, interpreted by
                           vendor-specific code on the clients and
                           servers.  A variable-length field (4 octets
                           less than the value in the option-len field).

 The definition of the information carried in this option is vendor
   specific.  The vendor is indicated in the enterprise-number field.
   Use of vendor-specific information allows enhanced operation,
   utilizing additional features in a vendor's DHCP implementation.  A
   DHCP client that does not receive requested vendor-specific
   information will still configure the node's IPv6 stack to be
   functional.

   The vendor-option-data field MUST be encoded as a sequence of
   code/length/value fields of format identical to the DHCP options (see
   Section 21.1).  The sub-option codes are defined by the vendor
   identified in the enterprise-number field and are not managed by
   IANA.  Each of the sub-options is formatted as follows:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |          sub-opt-code         |         sub-option-len        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                        sub-option-data                        .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Figure 31: Vendor-specific Options Format

      sub-opt-code         The code for the sub-option.  A 2-octet
                           field.

      sub-option-len       An unsigned integer giving the length of the
                           sub-option-data field in this sub-option in
                           octets.  A 2-octet field.

      sub-option-data      The data area for the sub-option.  The
                           length, in octets, is specified by
                           sub-option-len.

   Multiple instances of the Vendor-specific Information option may
   appear in a DHCP message.  Each instance of the option is interpreted
   according to the option codes defined by the vendor identified by the
   Enterprise Number in that option.  Servers and clients MUST NOT send
   more than one instance of the Vendor-specific Information option with
   the same Enterprise Number.  Each instance of the Vendor-specific
   Information option MAY contain multiple sub-options.

A client that is interested in receiving a Vendor-specific
   Information option:

   -  MUST specify the Vendor-specific Information option in an Option
      Request option.

   -  MAY specify an associated Vendor Class option (see Section 21.16).

   -  MAY specify the Vendor-specific Information option with
      appropriate data.

   Servers only return the Vendor-specific Information options if
   specified in Option Request options from clients and:

   -  MAY use the Enterprise Numbers in the associated Vendor Class
      options to restrict the set of Enterprise Numbers in the
      Vendor-specific Information options returned.

   -  MAY return all configured Vendor-specific Information options.

   -  MAY use other information in the packet or in its configuration to
      determine which set of Enterprise Numbers in the Vendor-specific
      Information options to return.
2020-05-29 13:36:42 +02:00
Lennart Poettering 4737345173 update NEWS 2020-05-29 10:48:58 +02:00
Lennart Poettering dd587c3a88 man: briefly document the DOCUMENTATION= structure log field 2020-05-29 10:41:30 +02:00
Lennart Poettering 2fac514fa9 logs: strndupa() cannot fail 2020-05-29 10:41:30 +02:00
Lennart Poettering 2108b56749 journal: show documentation hyperlink if known in log output 2020-05-29 10:41:30 +02:00