diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 6f197441c..2f266f293 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -24,8 +24,8 @@ If you discover a security vulnerability, we'd appreciate a non-public disclosur ## Posting Pull Requests * Make sure to post PRs only relative to a very recent git master. -* Follow our [Coding Style](https://raw.githubusercontent.com/systemd/systemd/master/CODING_STYLE) when contributing code. This is a requirement for all code we merge. -* Please make sure to test your change before submitting the PR. See [HACKING](https://raw.githubusercontent.com/systemd/systemd/master/HACKING) for details how to do this. +* Follow our [Coding Style](https://raw.githubusercontent.com/systemd/systemd/master/doc/CODING_STYLE) when contributing code. This is a requirement for all code we merge. +* Please make sure to test your change before submitting the PR. See [HACKING](https://raw.githubusercontent.com/systemd/systemd/master/doc/HACKING) for details how to do this. * Make sure to run the test suite locally, before posting your PR. We use a CI system, meaning we don't even look at your PR, if the build and tests don't pass. * If you need to update the code in an existing PR, force-push into the same branch, overriding old commits with new versions. * After you have pushed a new version, add a comment about the new version (no notification is sent just for the commits, so it's easy to miss the update without an explicit comment). If you are a member of the systemd project on GitHub, remove the `reviewed/needs-rework` label. diff --git a/.mailmap b/.mailmap index afd0c7361..5c825d43a 100644 --- a/.mailmap +++ b/.mailmap @@ -149,3 +149,5 @@ Zachary Winnerman <33329648+winnerman-pythian@users.noreply.github.com> Vladislav Vishnyakov Robert Kolchmeyer George Gaydarov +Bill Yodlowsky +Mao Huang diff --git a/.mkosi/mkosi.arch b/.mkosi/mkosi.arch index d7f6bc866..dac80d38f 100644 --- a/.mkosi/mkosi.arch +++ b/.mkosi/mkosi.arch @@ -41,11 +41,11 @@ BuildPackages= docbook-xsl elfutils gcc + gettext git gnu-efi-libs gnutls gperf - intltool iptables kmod libcap diff --git a/.mkosi/mkosi.debian b/.mkosi/mkosi.debian index a93eb7b53..de47df184 100644 --- a/.mkosi/mkosi.debian +++ b/.mkosi/mkosi.debian @@ -37,10 +37,10 @@ BuildPackages= docbook-xml docbook-xsl gcc + gettext git gnu-efi gperf - intltool iptables-dev libacl1-dev libaudit-dev diff --git a/.mkosi/mkosi.fedora b/.mkosi/mkosi.fedora index 4d7168c00..0aeb7751c 100644 --- a/.mkosi/mkosi.fedora +++ b/.mkosi/mkosi.fedora @@ -22,7 +22,7 @@ [Distribution] Distribution=fedora -Release=26 +Release=27 [Output] Format=raw_btrfs @@ -41,12 +41,12 @@ BuildPackages= docbook-style-xsl elfutils-devel gcc + gettext git gnu-efi gnu-efi-devel gnutls-devel gperf - intltool iptables-devel kmod-devel libacl-devel @@ -67,6 +67,7 @@ BuildPackages= m4 meson pam-devel + pcre2-devel pkgconfig python3-devel python3-lxml diff --git a/NEWS b/NEWS index 2021a2350..9ea239cc6 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,161 @@ systemd System and Service Manager +CHANGES WITH 238: + + * The MemoryAccounting= unit property now defaults to on. After + discussions with the upstream control group maintainers we learnt + that the negative impact of cgroup memory accounting on current + kernels is finally relatively minimal, so that it should be safe to + enable this by default without affecting system performance. Besides + memory accounting only task accounting is turned on by default, all + other forms of resource accounting (CPU, IO, IP) remain off for now, + because it's not clear yet that their impact is small enough to move + from opt-in to opt-out. We recommend downstreams to leave memory + accounting on by default if kernel 4.14 or higher is are primarily + used. On very resource constrained systems or when support for old + kernels is a necessity, -Dmemory-accounting-default=false can be used + to revert this change. + + * rpm scriptlets to update the udev hwdb and rules (%udev_hwdb_update, + %udev_rules_update) and the journal catalog (%journal_catalog_update) + from the upgrade scriptlets of individual packages now do nothing. + Transfiletriggers have been added which will perform those updates + once at the end of the transaction. + + Similar transfiletriggers have been added to execute any sysctl.d + and binfmt.d rules. Thus, it should be unnecessary to provide any + scriptlets to execute this configuration from package installation + scripts. + + * systemd-sysusers gained a mode where the configuration to execute is + specified on the command line, but this configuration is not executed + directly, but instead it is merged with the configuration on disk, + and the result is executed. This is useful for package installation + scripts which want to create the user before installing any files on + disk (in case some of those files are owned by that user), while + still allowing local admin overrides. + + This functionality is exposed to rpm scriplets through a new + %sysusers_create_package macro. Old %sysusers_create and + %sysusers_create_inline macros are deprecated. + + A transfiletrigger for sysusers.d configuration is now installed, + which means that it should be uncessary to call systemd-sysusers from + package installation scripts, unless the package installs any files + owned by those newly-created users, in which case + %sysusers_create_package should be used. + + * Analogous change has been done for systemd-tmpfiles: it gained a mode + where the command-line configuration is merged with the configuration + on disk. This is exposed as the new %tmpfiles_create_package macro, + and %tmpfiles_create is deprecated. A transfiletrigger is installed + for tmpfiles.d, hence it should be unnecessary to call systemd-tmpfiles + from package installation scripts. + + * sysusers.d configuration for a user may now also specify the group + number, in addition to the user number ("u username 123:456"), or + without the user number ("u username -:456"). + + * Configution items for systemd-sysusers can now be specified as + positional arguments when the new --inline switch is used. + + * The login shell of users created through sysusers.d may now be + specified (previously, it was always /bin/sh for root and + /sbin/nologin for other users). + + * systemd-analyze gained a new --global switch to look at global user + configuration. It also gained a unit-paths verb to list the unit load + paths that are compiled into systemd (which can be used with + --systemd, --user, or --global). + + * udevadm trigger gained a new --settle/-w option to wait for any + triggered events to finish (but just those, and not any other events + which are triggered meanwhile). + + * The action that systemd-logind takes when the lid is closed and the + machine is connected to external power can now be configured using + HandleLidSwitchExternalPower= in logind.conf. Previously, this action + was determined by HandleLidSwitch=, and, for backwards compatibility, + is still is, if HandleLidSwitchExternalPower= is not explicitly set. + + * journalctl will periodically call sd_journal_process() to make it + resilient against inotify queue overruns when journal files are + rotated very quickly. + + * Two new functions in libsystemd — sd_bus_get_n_queued_read and + sd_bus_get_n_queued_write — may be used to check the number of + pending bus messages. + + * systemd gained a new + org.freedesktop.systemd1.Manager.AttachProcessesToUnit dbus call + which can be used to migrate foreign processes to scope and service + units. The primary user for this new API is systemd itself: the + systemd --user instance uses this call of the systemd --system + instance to migrate processes if it itself gets the request to + migrate processes and the kernel refuses this due to access + restrictions. Thanks to this "systemd-run --scope --user …" works + again in pure cgroups v2 environments when invoked from the user + session scope. + + * A new TemporaryFileSystem= setting can be used to mask out part of + the real file system tree with tmpfs mounts. This may be combined + with BindPaths= and BindReadOnlyPaths= to hide files or directories + not relevant to the unit, while still allowing some paths lower in + the tree to be accessed. + + ProtectHome=tmpfs may now be used to hide user home and runtime + directories from units, in a way that is mostly equivalent to + "TemporaryFileSystem=/home /run/user /root". + + * Non-service units are now started with KeyringMode=shared by default. + This means that mount and swapon and other mount tools have access + to keys in the main keyring. + + * /sys/fs/bpf is now mounted automatically. + + * QNX virtualization is now detected by systemd-detect-virt and may + be used in ConditionVirtualization=. + + * IPAccounting= may now be enabled also for slice units. + + * A new -Dsplit-bin= build configuration switch may be used to specify + whether bin and sbin directories are merged, or if they should be + included separately in $PATH and various listings of executable + directories. The build configuration scripts will try to autodetect + the proper values of -Dsplit-usr= and -Dsplit-bin= based on build + system, but distributions are encouraged to configure this + explicitly. + + * A new -Dok-color= build configuration switch may be used to change + the colour of "OK" status messages. + + * UPGRADE ISSUE: serialization of units using JoinsNamespaceOf= with + PrivateNetwork=yes was buggy in previous versions of systemd. This + means that after the upgrade and daemon-reexec, any such units must + be restarted. + + * INCOMPATIBILITY: as announced in the NEWS for 237, systemd-tmpfiles + will not exclude read-only files owned by root from cleanup. + + Contributions from: Alan Jenkins, Alexander F Rødseth, Alexis Jeandet, + Andika Triwidada, Andrei Gherzan, Ansgar Burchardt, antizealot1337, + Batuhan Osman Taşkaya, Beniamino Galvani, Bill Yodlowsky, Caio Marcelo + de Oliveira Filho, CuBiC, Daniele Medri, Daniel Mouritzen, Daniel + Rusek, Davide Cavalca, Dimitri John Ledkov, Douglas Christman, Evgeny + Vereshchagin, Faalagorn, Filipe Brandenburger, Franck Bui, futpib, + Giacomo Longo, Gunnar Hjalmarsson, Hans de Goede, Hermann Gausterer, + Iago López Galeiras, Jakub Filak, Jan Synacek, Jason A. Donenfeld, + Javier Martinez Canillas, Jérémy Rosen, Lennart Poettering, Lucas + Werkmeister, Mao Huang, Marco Gulino, Michael Biebl, Michael Vogt, + MilhouseVH, Neal Gompa (ニール・ゴンパ), Oleander Reis, Olof Mogren, + Patrick Uiterwijk, Peter Hutterer, Peter Portante, Piotr Drąg, Robert + Antoni Buj Gelonch, Sergey Ptashnick, Shawn Landden, Shuang Liu, Simon + Fowler, SjonHortensius, snorreflorre, Susant Sahani, Sylvain + Plantefève, Thomas Blume, Thomas Haller, Vito Caputo, Yu Watanabe, + Zbigniew Jędrzejewski-Szmek, Марко М. Костић (Marko M. Kostić) + + — Warsaw, 2018-03-05 + CHANGES WITH 237: * Some keyboards come with a zoom see-saw or rocker which until now got @@ -357,8 +513,8 @@ CHANGES WITH 236: store again, ahead of POLLHUP or POLLERR when they are removed anyway. - * A new document UIDS-GIDS.md has been added to the source tree, that - documents the UID/GID range and assignment assumptions and + * A new document doc/UIDS-GIDS.md has been added to the source tree, + that documents the UID/GID range and assignment assumptions and requirements of systemd. * The watchdog device PID 1 will ping may now be configured through the @@ -1090,7 +1246,7 @@ CHANGES WITH 233: * Documentation has been added that lists all of systemd's low-level environment variables: - https://github.com/systemd/systemd/blob/master/ENVIRONMENT.md + https://github.com/systemd/systemd/blob/master/doc/ENVIRONMENT.md * sd-daemon gained a new API sd_is_socket_sockaddr() for determining whether a specific socket file descriptor matches a specified socket @@ -1801,7 +1957,7 @@ CHANGES WITH 231: booted up with "systemd-nspawn -b -i", qemu-kvm or on any physical UEFI PC. This functionality is particularly useful to easily test local changes made to systemd in a pristine, defined environment. See - HACKING for details. + doc/HACKING for details. * configure learned the --with-support-url= option to specify the distribution's bugtracker. diff --git a/README.md b/README.md index 06fd69142..4b017faf1 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ Information about build requirements are provided in the [README file](../master Consult our [NEWS file](../master/NEWS) for information about what's new in the most recent systemd versions. -Please see the [HACKING file](../master/HACKING) for information how to hack on systemd and test your modifications. +Please see the [HACKING file](../master/doc/HACKING) for information how to hack on systemd and test your modifications. Please see our [Contribution Guidelines](../master/.github/CONTRIBUTING.md) for more information about filing GitHub Issues and posting GitHub Pull Requests. -When preparing patches for systemd, please follow our [Coding Style Guidelines](../master/CODING_STYLE). +When preparing patches for systemd, please follow our [Coding Style Guidelines](../master/doc/CODING_STYLE). If you are looking for support, please contact our [mailing list](https://lists.freedesktop.org/mailman/listinfo/systemd-devel) or join our [IRC channel](irc://irc.freenode.org/%23systemd). diff --git a/TODO b/TODO index a77028c7b..18acb9b36 100644 --- a/TODO +++ b/TODO @@ -24,38 +24,42 @@ Janitorial Clean-ups: Features: +* add proper dbus APIs for the various sd_notify() commands, such as MAINPID=1 + and so on, which would mean we could report errors and such. + +* nss-systemd: implement enumeration, that shows all dynamic users plus the + synthesized ones if necessary, so that "getent passwd" shows useful data. + +* teach tmpfiles.d q/Q logic something sensible in the context of XFS/ext4 + project quota + +* introduce DefaultSlice= or so in system.conf that allows changing where we + place our units by default, i.e. change system.slice to something + else. Similar, ManagerSlice= should exist so that PID1's own scope unit could + be moved somewhere else too. Finally machined and logind should get similar + options so that it is possible to move user session scopes and machines to a + different slice too by default. Usecase: people who want to put resources on + the entire system, with the exception of one specific service. See: + https://lists.freedesktop.org/archives/systemd-devel/2018-February/040369.html + * maybe rework get_user_creds() to query the user database if $SHELL is used for root, but only then. -* there should be path_hash_ops and we should use it in tmpfiles' hashmap object to deal with identical but differently spelt paths - * be stricter with fds we receive for the fdstore: close them asynchronously * calenderspec: add support for week numbers and day numbers within a year. This would allow us to define "bi-weekly" triggers safely. -* add support for recursive bpf firewalling as supported by the newest kernel - -* add bpf-based implementation of devices cgroup controller logic for compat with cgroupsv2 as supported by newest kernel +* add bpf-based implementation of devices cgroup controller logic for compat + with cgroupsv2 as supported by newest kernel * introduce sd_id128_get_boot_app_specific() which is like sd_id128_get_machine_app_specific(). After all on long-running systems both IDs have similar properties. -* emulate properties of the root cgroup on controllers that don't support such - properties natively on cpu/io/memory, the way we already do it for - "pids". Also, add the same logic to cgtop. - -* set TasksAccounting=1 on the root slice if we are running on the root cgroup, - and similar for the others, as soon as we emulate them properly. After all, - Linux keeps these system-wide stats anyway, and it costs nothing to expose - them. - * sd-bus: add vtable flag, that may be used to request client creds implicitly and asynchronously before dispatching the operation -* implement transient socket unit. - * make use of ethtool veth peer info in machined, for automatically finding out host-side interface pointing to the container. @@ -65,7 +69,7 @@ Features: systemd-journald writes to /var/log/journal, which could be useful when we doing disk usage calculations and so on. -* taint systemd if there are fewer than 65536 users assigned to the system. +* taint systemd if there are fewer than 65536 users assigned (userns) to the system. * deprecate PermissionsStartOnly= and RootDirectoryStartOnly= in favour of the ExecStart= prefix chars @@ -375,8 +379,6 @@ Features: * what to do about udev db binary stability for apps? (raw access is not an option) -* maybe provide an API to allow migration of foreign PIDs into existing scopes. - * man: maybe use the word "inspect" rather than "introspect"? * systemctl: if some operation fails, show log output? diff --git a/coccinelle/close-above-stdio.cocci b/coccinelle/close-above-stdio.cocci new file mode 100644 index 000000000..44b3b1c9f --- /dev/null +++ b/coccinelle/close-above-stdio.cocci @@ -0,0 +1,36 @@ +@@ +expression fd; +@@ +- if (fd > 2) +- safe_close(fd); ++ safe_close_above_stdio(fd); +@@ +expression fd; +@@ +- if (fd > 2) +- fd = safe_close(fd); ++ fd = safe_close_above_stdio(fd); +@@ +expression fd; +@@ +- if (fd >= 3) +- safe_close(fd); ++ safe_close_above_stdio(fd); +@@ +expression fd; +@@ +- if (fd >= 3) +- fd = safe_close(fd); ++ fd = safe_close_above_stdio(fd); +@@ +expression fd; +@@ +- if (fd > STDERR_FILENO) +- safe_close(fd); ++ safe_close_above_stdio(fd); +@@ +expression fd; +@@ +- if (fd > STDERR_FILENO) +- fd = safe_close(fd); ++ fd = safe_close_above_stdio(fd); diff --git a/coccinelle/empty-if.cocci b/coccinelle/empty-if.cocci deleted file mode 100644 index 026c461ee..000000000 --- a/coccinelle/empty-if.cocci +++ /dev/null @@ -1,56 +0,0 @@ -@@ -expression e, f, g, h, i, j; -statement s, t; -@@ -( -if (e) { -( -if (h) s -| -if (h) s else t -| -while (h) s -| -for (h; i; j) s -) -} -| -while (e) { -( -if (h) s -| -if (h) s else t -| -while (h) s -| -for (h; i; j) s -) -} -| -for (e; f; g) { -( -if (h) s -| -if (h) s else t -| -while (h) s -| -for (h; i; j) s -) -} -| -- if (e) { -+ if (e) -s -- } -| -- while (e) { -+ while (e) -s -- } -| -- for (e; f; g) { -+ for (e; f; g) -s -- } -) diff --git a/coccinelle/malloc_multiply.cocci b/coccinelle/malloc_multiply.cocci new file mode 100644 index 000000000..3284edf73 --- /dev/null +++ b/coccinelle/malloc_multiply.cocci @@ -0,0 +1,20 @@ +@@ +expression q, n, m; +@@ +- q = malloc((n)*(m)) ++ q = malloc_multiply(n, m) +@@ +expression q, n, m; +@@ +- q = malloc(n*(m)) ++ q = malloc_multiply(n, m) +@@ +expression q, n, m; +@@ +- q = malloc((n)*m) ++ q = malloc_multiply(n, m) +@@ +expression q, n, m; +@@ +- q = malloc(n*m) ++ q = malloc_multiply(n, m) diff --git a/coccinelle/reallocarray.cocci b/coccinelle/reallocarray.cocci new file mode 100644 index 000000000..21fe9dfbf --- /dev/null +++ b/coccinelle/reallocarray.cocci @@ -0,0 +1,20 @@ +@@ +expression q, p, n, m; +@@ +- q = realloc(p, (n)*(m)) ++ q = reallocarray(p, n, m) +@@ +expression q, p, n, m; +@@ +- q = realloc(p, n*(m)) ++ q = reallocarray(p, n, m) +@@ +expression q, p, n, m; +@@ +- q = realloc(p, (n)*m) ++ q = reallocarray(p, n, m) +@@ +expression q, p, n, m; +@@ +- q = realloc(p, n*m) ++ q = reallocarray(p, n, m) diff --git a/coccinelle/run-coccinelle.sh b/coccinelle/run-coccinelle.sh index 1373b53c5..de23546f1 100755 --- a/coccinelle/run-coccinelle.sh +++ b/coccinelle/run-coccinelle.sh @@ -1,11 +1,10 @@ #!/bin/bash -e for SCRIPT in ${@-*.cocci} ; do - [ "$SCRIPT" = "empty-if.cocci" ] && continue - echo "--x-- Processing $SCRIPT --x--" + echo "--x-- Processing: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--" TMPFILE=`mktemp` spatch --sp-file $SCRIPT --dir $(pwd)/.. 2> "$TMPFILE" || cat "$TMPFILE" rm "$TMPFILE" - echo "--x-- Processed $SCRIPT --x--" + echo "--x-- Processed: spatch --sp-file $SCRIPT --dir $(pwd)/.. --x--" echo "" done diff --git a/CODING_STYLE b/doc/CODING_STYLE similarity index 100% rename from CODING_STYLE rename to doc/CODING_STYLE diff --git a/DISTRO_PORTING b/doc/DISTRO_PORTING similarity index 100% rename from DISTRO_PORTING rename to doc/DISTRO_PORTING diff --git a/ENVIRONMENT.md b/doc/ENVIRONMENT.md similarity index 100% rename from ENVIRONMENT.md rename to doc/ENVIRONMENT.md diff --git a/HACKING b/doc/HACKING similarity index 98% rename from HACKING rename to doc/HACKING index e9a159ba9..0682af27b 100644 --- a/HACKING +++ b/doc/HACKING @@ -7,7 +7,7 @@ Request (PR): https://github.com/systemd/systemd/pull/new Please make sure to follow our Coding Style when submitting patches. See -CODING_STYLE for details. Also have a look at our Contribution Guidelines: +doc/CODING_STYLE for details. Also have a look at our Contribution Guidelines: https://github.com/systemd/systemd/blob/master/.github/CONTRIBUTING.md diff --git a/TRANSIENT-SETTINGS.md b/doc/TRANSIENT-SETTINGS.md similarity index 99% rename from TRANSIENT-SETTINGS.md rename to doc/TRANSIENT-SETTINGS.md index 3614456ac..ca9e8387b 100644 --- a/TRANSIENT-SETTINGS.md +++ b/doc/TRANSIENT-SETTINGS.md @@ -170,6 +170,7 @@ All execution-related settings are available for transient units. ✓ InaccessiblePaths= ✓ BindPaths= ✓ BindReadOnlyPaths= +✓ TemporaryFileSystem= ✓ PrivateTmp= ✓ PrivateDevices= ✓ ProtectKernelTunables= diff --git a/doc/TRANSLATORS b/doc/TRANSLATORS new file mode 100644 index 000000000..873ec7b01 --- /dev/null +++ b/doc/TRANSLATORS @@ -0,0 +1,27 @@ +Notes for translators +===================== + +systemd depends on gettext for multilingual support. +In po/ directory you'll find the needed files. + +POT (Portable Object Template) +------------------------------ +A text file with .pot extension, with all the extracted labels from code. + +To update the template: + +$ cd systemd/ +$ ninja -C build systemd-pot + +To start a new translation: + +$ cd po/ +$ cp systemd.pot .po + +Replace with the two-letters codes of ISO 639 standard. + +PO (Portable Object) +-------------------- +A text file with .po extension, with all the available labels and some additional +metadata fields. Any editor is ok, but a good standard is 'poedit', a graphical +application specifically designed for this kind of task. diff --git a/UIDS-GIDS.md b/doc/UIDS-GIDS.md similarity index 100% rename from UIDS-GIDS.md rename to doc/UIDS-GIDS.md diff --git a/hwdb/.gitattributes b/hwdb/.gitattributes new file mode 100644 index 000000000..830cae66c --- /dev/null +++ b/hwdb/.gitattributes @@ -0,0 +1,2 @@ +/*.txt -whitespace +/pci.ids -whitespace diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb index 294101ff0..4bd1e1e07 100644 --- a/hwdb/20-OUI.hwdb +++ b/hwdb/20-OUI.hwdb @@ -1938,7 +1938,7 @@ OUI:000283* ID_OUI_FROM_DATABASE=Spectrum Controls, Inc. OUI:000284* - ID_OUI_FROM_DATABASE=AREVA T&D + ID_OUI_FROM_DATABASE=UK Grid Solutions Limited OUI:000285* ID_OUI_FROM_DATABASE=Riverstone Networks @@ -3135,7 +3135,7 @@ OUI:000412* ID_OUI_FROM_DATABASE=WaveSmith Networks, Inc. OUI:000413* - ID_OUI_FROM_DATABASE=SNOM Technology AG + ID_OUI_FROM_DATABASE=snom technology GmbH OUI:000414* ID_OUI_FROM_DATABASE=Umezawa Musen Denki Co., Ltd. @@ -7506,7 +7506,7 @@ OUI:0009DE* ID_OUI_FROM_DATABASE=Samjin Information & Communications Co., Ltd. OUI:0009DF* - ID_OUI_FROM_DATABASE=Vestel Komunikasyon Sanayi ve Ticaret A.S. + ID_OUI_FROM_DATABASE=Vestel Elektronik San ve Tic. A.Ş. OUI:0009E0* ID_OUI_FROM_DATABASE=XEMICS S.A. @@ -8259,7 +8259,7 @@ OUI:000ADA* ID_OUI_FROM_DATABASE=Vindicator Technologies OUI:000ADB* - ID_OUI_FROM_DATABASE=SkyPilot Network, Inc + ID_OUI_FROM_DATABASE=Trilliant OUI:000ADC* ID_OUI_FROM_DATABASE=RuggedCom Inc. @@ -10296,7 +10296,7 @@ OUI:000D81* ID_OUI_FROM_DATABASE=Pepperl+Fuchs GmbH OUI:000D82* - ID_OUI_FROM_DATABASE=PHS srl + ID_OUI_FROM_DATABASE=PHSNET SRLS OUI:000D83* ID_OUI_FROM_DATABASE=Sanmina-SCI Hungary Ltd. @@ -11103,7 +11103,7 @@ OUI:000E8E* ID_OUI_FROM_DATABASE=SparkLAN Communications, Inc. OUI:000E8F* - ID_OUI_FROM_DATABASE=Sercomm Corp. + ID_OUI_FROM_DATABASE=Sercomm Corporation. OUI:000E90* ID_OUI_FROM_DATABASE=PONICO CORP. @@ -13068,7 +13068,7 @@ OUI:00111D* ID_OUI_FROM_DATABASE=Hectrix Limited OUI:00111E* - ID_OUI_FROM_DATABASE=EPSG (Ethernet Powerlink Standardization Group) + ID_OUI_FROM_DATABASE=ETHERNET Powerlink Standarization Group (EPSG) OUI:00111F* ID_OUI_FROM_DATABASE=Doremi Labs, Inc. @@ -14751,7 +14751,7 @@ OUI:00134E* ID_OUI_FROM_DATABASE=Valox Systems, Inc. OUI:00134F* - ID_OUI_FROM_DATABASE=Tranzeo Wireless Technologies Inc. + ID_OUI_FROM_DATABASE=Rapidus Wireless Networks Inc. OUI:001350* ID_OUI_FROM_DATABASE=Silver Spring Networks, Inc @@ -14928,7 +14928,7 @@ OUI:001389* ID_OUI_FROM_DATABASE=Redes de Telefonía Móvil S.A. OUI:00138A* - ID_OUI_FROM_DATABASE=QINGDAO GOERTEK ELECTRONICS CO.,LTD. + ID_OUI_FROM_DATABASE=Qingdao GoerTek Technology Co., Ltd. OUI:00138B* ID_OUI_FROM_DATABASE=Phantom Technologies LLC @@ -15624,7 +15624,7 @@ OUI:001471* ID_OUI_FROM_DATABASE=Eastern Asia Technology Limited OUI:001472* - ID_OUI_FROM_DATABASE=China Broadband Wireless IP Standard Group + ID_OUI_FROM_DATABASE=China Broadband Wireless IP Standard group(ChinaBWIPS) OUI:001473* ID_OUI_FROM_DATABASE=Bookham Inc @@ -15639,7 +15639,7 @@ OUI:001476* ID_OUI_FROM_DATABASE=MultiCom Industries Limited OUI:001477* - ID_OUI_FROM_DATABASE=Nertec Inc. + ID_OUI_FROM_DATABASE=Trilliant OUI:001478* ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD. @@ -16140,7 +16140,7 @@ OUI:00151D* ID_OUI_FROM_DATABASE=M2I CORPORATION OUI:00151E* - ID_OUI_FROM_DATABASE=Ethernet Powerlink Standardization Group (EPSG) + ID_OUI_FROM_DATABASE=ETHERNET Powerlink Standarization Group (EPSG) OUI:00151F* ID_OUI_FROM_DATABASE=Multivision Intelligent Surveillance (Hong Kong) Ltd @@ -30249,7 +30249,7 @@ OUI:0026BC* ID_OUI_FROM_DATABASE=General Jack Technology Ltd. OUI:0026BD* - ID_OUI_FROM_DATABASE=JTEC Card & Communication Co., Ltd. + ID_OUI_FROM_DATABASE=JTEC Card & Communication Co., Ltd OUI:0026BE* ID_OUI_FROM_DATABASE=Schoonderbeek Elektronica Systemen B.V. @@ -31917,7 +31917,7 @@ OUI:00409C* ID_OUI_FROM_DATABASE=TRANSWARE OUI:00409D* - ID_OUI_FROM_DATABASE=DIGIBOARD, INC. + ID_OUI_FROM_DATABASE=DigiBoard OUI:00409E* ID_OUI_FROM_DATABASE=CONCURRENT TECHNOLOGIES LTD. @@ -34494,7 +34494,7 @@ OUI:0080B5* ID_OUI_FROM_DATABASE=UNITED NETWORKS INC. OUI:0080B6* - ID_OUI_FROM_DATABASE=THEMIS COMPUTER + ID_OUI_FROM_DATABASE=Mercury Systems – Trusted Mission Solutions, Inc. OUI:0080B7* ID_OUI_FROM_DATABASE=STELLAR COMPUTER @@ -35151,7 +35151,7 @@ OUI:00907E* ID_OUI_FROM_DATABASE=VETRONIX CORP. OUI:00907F* - ID_OUI_FROM_DATABASE=WatchGuard Technologies, Inc. + ID_OUI_FROM_DATABASE=Watchguard Technologies, Inc. OUI:009080* ID_OUI_FROM_DATABASE=NOT LIMITED, INC. @@ -36539,6 +36539,9 @@ OUI:00B69F* OUI:00B78D* ID_OUI_FROM_DATABASE=Nanjing Shining Electric Automation Co., Ltd +OUI:00B8C2* + ID_OUI_FROM_DATABASE=Heights Telecom T ltd + OUI:00B9F6* ID_OUI_FROM_DATABASE=Shenzhen Super Rich Electronics Co.,Ltd @@ -36549,7 +36552,7 @@ OUI:00BB01* ID_OUI_FROM_DATABASE=OCTOTHORPE CORP. OUI:00BB3A* - ID_OUI_FROM_DATABASE=Private + ID_OUI_FROM_DATABASE=Amazon Technologies Inc. OUI:00BB8E* ID_OUI_FROM_DATABASE=HME Co., Ltd. @@ -36594,7 +36597,7 @@ OUI:00C001* ID_OUI_FROM_DATABASE=DIATEK PATIENT MANAGMENT OUI:00C002* - ID_OUI_FROM_DATABASE=SERCOMM CORPORATION + ID_OUI_FROM_DATABASE=Sercomm Corporation. OUI:00C003* ID_OUI_FROM_DATABASE=GLOBALNET COMMUNICATIONS @@ -37367,6 +37370,9 @@ OUI:00C1B1* OUI:00C2C6* ID_OUI_FROM_DATABASE=Intel Corporate +OUI:00C3F4* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:00C5DB* ID_OUI_FROM_DATABASE=Datatech Sistemas Digitales Avanzados SL @@ -37388,6 +37394,9 @@ OUI:00CBB4* OUI:00CBBD* ID_OUI_FROM_DATABASE=Cambridge Broadband Networks Ltd. +OUI:00CC3F* + ID_OUI_FROM_DATABASE=Universal Electronics, Inc. + OUI:00CCFC* ID_OUI_FROM_DATABASE=Cisco Systems, Inc @@ -39116,6 +39125,9 @@ OUI:00FC8B* OUI:00FC8D* ID_OUI_FROM_DATABASE=Hitron Technologies. Inc +OUI:00FCBA* + ID_OUI_FROM_DATABASE=Cisco Systems, Inc + OUI:00FD45* ID_OUI_FROM_DATABASE=Hewlett Packard Enterprise @@ -39560,6 +39572,9 @@ OUI:04A3F3* OUI:04A82A* ID_OUI_FROM_DATABASE=Nokia Corporation +OUI:04AB18* + ID_OUI_FROM_DATABASE=ELECOM CO.,LTD. + OUI:04AC44* ID_OUI_FROM_DATABASE=Holtek Semiconductor Inc. @@ -40352,6 +40367,9 @@ OUI:0840F3* OUI:084656* ID_OUI_FROM_DATABASE=VEO-LABS +OUI:0847D0* + ID_OUI_FROM_DATABASE=Nokia Shanghai Bell Co. Ltd.) + OUI:08482C* ID_OUI_FROM_DATABASE=Raycore Taiwan Co., LTD. @@ -40580,6 +40598,9 @@ OUI:08BEAC* OUI:08C021* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:08C5E1* + ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO-MECHANICS(THAILAND) + OUI:08C6B3* ID_OUI_FROM_DATABASE=QTECH LLC @@ -40613,6 +40634,9 @@ OUI:08D40C* OUI:08D42B* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:08D46A* + ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications) + OUI:08D5C0* ID_OUI_FROM_DATABASE=Seers Technology Co., Ltd @@ -40742,6 +40766,9 @@ OUI:08FC88* OUI:08FD0E* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:0C01DB* + ID_OUI_FROM_DATABASE=Infinix mobility limited + OUI:0C0227* ID_OUI_FROM_DATABASE=Technicolor CH USA Inc. @@ -41165,6 +41192,9 @@ OUI:0CB4EF* OUI:0CB5DE* ID_OUI_FROM_DATABASE=Alcatel Lucent +OUI:0CB6D2* + ID_OUI_FROM_DATABASE=D-Link International + OUI:0CB912* ID_OUI_FROM_DATABASE=JM-DATA GmbH @@ -41276,6 +41306,9 @@ OUI:0CDDEF* OUI:0CDFA4* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:0CE0DC* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:0CE0E4* ID_OUI_FROM_DATABASE=PLANTRONICS, INC. @@ -41723,6 +41756,9 @@ OUI:107A86* OUI:107B44* ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. +OUI:107BA4* + ID_OUI_FROM_DATABASE=Olive & Dove Co.,Ltd. + OUI:107BEF* ID_OUI_FROM_DATABASE=Zyxel Communications Corporation @@ -41747,6 +41783,9 @@ OUI:108A1B* OUI:108CCF* ID_OUI_FROM_DATABASE=Cisco Systems, Inc +OUI:108EE0* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:109266* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -41834,6 +41873,9 @@ OUI:10BF48* OUI:10C07C* ID_OUI_FROM_DATABASE=Blu-ray Disc Association +OUI:10C172* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:10C25A* ID_OUI_FROM_DATABASE=Technicolor CH USA Inc. @@ -42035,6 +42077,9 @@ OUI:1414E6* OUI:14157C* ID_OUI_FROM_DATABASE=TOKYO COSMOS ELECTRIC CO.,LTD. +OUI:14169E* + ID_OUI_FROM_DATABASE=Wingtech Group (HongKong)Limited + OUI:141877* ID_OUI_FROM_DATABASE=Dell Inc. @@ -42212,6 +42257,9 @@ OUI:144D67* OUI:144E34* ID_OUI_FROM_DATABASE=Remote Solution +OUI:144F8A* + ID_OUI_FROM_DATABASE=Intel Corporate + OUI:144FD70* ID_OUI_FROM_DATABASE=annapurnalabs @@ -42266,6 +42314,9 @@ OUI:145645* OUI:14568E* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:14579F* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:1458D0* ID_OUI_FROM_DATABASE=Hewlett Packard @@ -42800,6 +42851,9 @@ OUI:186571* OUI:186590* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:1866C7* + ID_OUI_FROM_DATABASE=Shenzhen Libre Technology Co., Ltd + OUI:1866DA* ID_OUI_FROM_DATABASE=Dell Inc. @@ -42824,6 +42878,9 @@ OUI:186882* OUI:1868CB* ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd. +OUI:1869DA* + ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd. + OUI:186D99* ID_OUI_FROM_DATABASE=Adanis Inc. @@ -42968,6 +43025,9 @@ OUI:189BA5D* OUI:189BA5E* ID_OUI_FROM_DATABASE=Taiwan Name Plate Co.,LTD +OUI:189C27* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + OUI:189C5D* ID_OUI_FROM_DATABASE=Cisco Systems, Inc @@ -43425,7 +43485,7 @@ OUI:1C5FFF* ID_OUI_FROM_DATABASE=Beijing Ereneben Information Technology Co.,Ltd Shenzhen Branch OUI:1C60DE* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:1C62B8* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -43731,7 +43791,7 @@ OUI:1C959F* ID_OUI_FROM_DATABASE=Veethree Electronics And Marine LLC OUI:1C965A* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:1C973D* ID_OUI_FROM_DATABASE=PRICOM Design @@ -44159,6 +44219,9 @@ OUI:203706* OUI:2037BC* ID_OUI_FROM_DATABASE=Kuipers Electronic Engineering BV +OUI:203956* + ID_OUI_FROM_DATABASE=HMD Global Oy + OUI:203A07* ID_OUI_FROM_DATABASE=Cisco Systems, Inc @@ -44174,6 +44237,9 @@ OUI:203D66* OUI:203DB2* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:203DBD* + ID_OUI_FROM_DATABASE=LG Innotek + OUI:204005* ID_OUI_FROM_DATABASE=feno GmbH @@ -44384,6 +44450,9 @@ OUI:20A2E4* OUI:20A2E7* ID_OUI_FROM_DATABASE=Lee-Dickens Ltd +OUI:20A60C* + ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd + OUI:20A680* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -45095,6 +45164,9 @@ OUI:24EA40* OUI:24EB65* ID_OUI_FROM_DATABASE=SAET I.S. S.r.l. +OUI:24EC51* + ID_OUI_FROM_DATABASE=ADF Technologies Sdn Bhd + OUI:24EC99* ID_OUI_FROM_DATABASE=ASKEY COMPUTER CORP @@ -45137,6 +45209,9 @@ OUI:24FD52* OUI:24FD5B* ID_OUI_FROM_DATABASE=SmartThings, Inc. +OUI:280245* + ID_OUI_FROM_DATABASE=Konze System Technology Co.,Ltd. + OUI:2802D8* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -45173,6 +45248,9 @@ OUI:28101B* OUI:28107B* ID_OUI_FROM_DATABASE=D-Link International +OUI:2811A5* + ID_OUI_FROM_DATABASE=Bose Corporation + OUI:281471* ID_OUI_FROM_DATABASE=Lantis co., LTD. @@ -46178,11 +46256,59 @@ OUI:2C441B* OUI:2C44FD* ID_OUI_FROM_DATABASE=Hewlett Packard +OUI:2C4759* + ID_OUI_FROM_DATABASE=Beijing MEGA preponderance Science & Technology Co. Ltd + +OUI:2C48350* + ID_OUI_FROM_DATABASE=Progress Rail Services, Inspection and Information Systems + +OUI:2C48351* + ID_OUI_FROM_DATABASE=Advanced Electronics Company Ltd + +OUI:2C48352* + ID_OUI_FROM_DATABASE=Rheonik Messtechnik GmbH + +OUI:2C48353* + ID_OUI_FROM_DATABASE=Newtrax Technologies Inc + +OUI:2C48354* + ID_OUI_FROM_DATABASE=GEARTECH LTD + +OUI:2C48355* + ID_OUI_FROM_DATABASE=Scout Security, Inc. + +OUI:2C48356* + ID_OUI_FROM_DATABASE=Exertus Oy + +OUI:2C48357* + ID_OUI_FROM_DATABASE=FAST + +OUI:2C48358* + ID_OUI_FROM_DATABASE=DPS Electronics + +OUI:2C48359* + ID_OUI_FROM_DATABASE=SureFlap Ltd + +OUI:2C4835A* + ID_OUI_FROM_DATABASE=Collatz+Trojan GmbH + +OUI:2C4835B* + ID_OUI_FROM_DATABASE=Shanghai Visteon Automotive Electronics System CO. Ltd. + +OUI:2C4835C* + ID_OUI_FROM_DATABASE=Santec Corporation + +OUI:2C4835D* + ID_OUI_FROM_DATABASE=Phasor Solutions Ltd + +OUI:2C4835E* + ID_OUI_FROM_DATABASE=IROOTECH TECHNOLOGY CO.,LTD + OUI:2C4D54* ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. OUI:2C4D79* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:2C5089* ID_OUI_FROM_DATABASE=Shenzhen Kaixuan Visual Technology Co.,Limited @@ -46211,6 +46337,9 @@ OUI:2C56DC* OUI:2C5731* ID_OUI_FROM_DATABASE=Wingtech Group (HongKong)Limited +OUI:2C584F* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + OUI:2C598A* ID_OUI_FROM_DATABASE=LG Electronics (Mobile Communications) @@ -46388,6 +46517,9 @@ OUI:2C9662* OUI:2C9717* ID_OUI_FROM_DATABASE=I.C.Y. B.V. +OUI:2C97B1* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:2C9924* ID_OUI_FROM_DATABASE=ARRIS Group, Inc. @@ -46805,6 +46937,9 @@ OUI:3044A1* OUI:304511* ID_OUI_FROM_DATABASE=Texas Instruments +OUI:304596* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:30469A* ID_OUI_FROM_DATABASE=NETGEAR @@ -46931,6 +47066,9 @@ OUI:308730* OUI:3087D9* ID_OUI_FROM_DATABASE=Ruckus Wireless +OUI:308841* + ID_OUI_FROM_DATABASE=Sichuan AI-Link Technology Co., Ltd. + OUI:308976* ID_OUI_FROM_DATABASE=DALIAN LAMBA TECHNOLOGY CO.,LTD @@ -48173,6 +48311,9 @@ OUI:38521A* OUI:385610* ID_OUI_FROM_DATABASE=CANDY HOUSE, Inc. +OUI:3856B5* + ID_OUI_FROM_DATABASE=Peerbridge Health Inc + OUI:38580C* ID_OUI_FROM_DATABASE=Panaccess Systems GmbH @@ -48209,6 +48350,9 @@ OUI:3866F0* OUI:386793* ID_OUI_FROM_DATABASE=Asia Optical Co., Inc. +OUI:3868DD* + ID_OUI_FROM_DATABASE=INVENTEC CORPORATION + OUI:386B1C* ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. @@ -48773,18 +48917,27 @@ OUI:3C24F00* OUI:3C24F01* ID_OUI_FROM_DATABASE=Abrites Ltd. +OUI:3C24F02* + ID_OUI_FROM_DATABASE=Laipac Technology Inc. + OUI:3C24F03* ID_OUI_FROM_DATABASE=Wisycom OUI:3C24F04* ID_OUI_FROM_DATABASE=Inter-Coastal Electronics +OUI:3C24F05* + ID_OUI_FROM_DATABASE=CASKY eTech Co., Ltd. + OUI:3C24F06* ID_OUI_FROM_DATABASE=Inter Action Corporation OUI:3C24F07* ID_OUI_FROM_DATABASE=Swissdotnet SA +OUI:3C24F08* + ID_OUI_FROM_DATABASE=Sivat Technology Co.,Ltd. + OUI:3C24F09* ID_OUI_FROM_DATABASE=Siemens AG - Siemens Deutschland Mobility @@ -48800,6 +48953,9 @@ OUI:3C24F0C* OUI:3C24F0D* ID_OUI_FROM_DATABASE=Travis Holding B.V. +OUI:3C24F0E* + ID_OUI_FROM_DATABASE=GETMOBIT LLC + OUI:3C25D7* ID_OUI_FROM_DATABASE=Nokia Corporation @@ -48941,6 +49097,9 @@ OUI:3C5282* OUI:3C574F* ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd. +OUI:3C576C* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:3C57BD* ID_OUI_FROM_DATABASE=Kessler Crane Inc. @@ -48992,6 +49151,9 @@ OUI:3C6A7D* OUI:3C6A9D* ID_OUI_FROM_DATABASE=Dexatek Technology LTD. +OUI:3C6AA7* + ID_OUI_FROM_DATABASE=Intel Corporate + OUI:3C6E63* ID_OUI_FROM_DATABASE=Mitron OY @@ -49304,12 +49466,18 @@ OUI:3CEF8C* OUI:3CF392* ID_OUI_FROM_DATABASE=Virtualtek. Co. Ltd +OUI:3CF4F9* + ID_OUI_FROM_DATABASE=Moda-InnoChips + OUI:3CF52C* ID_OUI_FROM_DATABASE=DSPECIALISTS GmbH OUI:3CF591* ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD +OUI:3CF5CC* + ID_OUI_FROM_DATABASE=New H3C Technologies Co., Ltd + OUI:3CF72A* ID_OUI_FROM_DATABASE=Nokia Corporation @@ -49352,6 +49520,9 @@ OUI:4001C6* OUI:40040C* ID_OUI_FROM_DATABASE=A&T +OUI:4006A0* + ID_OUI_FROM_DATABASE=Texas Instruments + OUI:4007C0* ID_OUI_FROM_DATABASE=Railtec Systems GmbH @@ -49395,7 +49566,7 @@ OUI:4018D7* ID_OUI_FROM_DATABASE=Smartronix, Inc. OUI:401B5F* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:401D59* ID_OUI_FROM_DATABASE=Biometric Associates, LP @@ -50561,6 +50732,9 @@ OUI:44EE02* OUI:44EE30* ID_OUI_FROM_DATABASE=Budelmann Elektronik GmbH +OUI:44EFCF* + ID_OUI_FROM_DATABASE=UGENE SOLUTION inc. + OUI:44F034* ID_OUI_FROM_DATABASE=Kaonmedia CO., LTD. @@ -50693,6 +50867,9 @@ OUI:4827EA* OUI:48282F* ID_OUI_FROM_DATABASE=zte corporation +OUI:482AE3* + ID_OUI_FROM_DATABASE=Wistron InfoComm(Kunshan)Co.,Ltd. + OUI:482CEA* ID_OUI_FROM_DATABASE=Motorola Inc Business Light Radios @@ -50904,7 +51081,7 @@ OUI:4888CA* ID_OUI_FROM_DATABASE=Motorola (Wuhan) Mobility Technologies Communication Co., Ltd. OUI:488AD2* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:488D36* ID_OUI_FROM_DATABASE=Arcadyan Corporation @@ -51186,7 +51363,7 @@ OUI:4C0F6E* ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. OUI:4C0FC7* - ID_OUI_FROM_DATABASE=Earda Electronics Co.,Ltd + ID_OUI_FROM_DATABASE=Earda Technologies co Ltd OUI:4C11BF* ID_OUI_FROM_DATABASE=Zhejiang Dahua Technology Co., Ltd. @@ -51284,6 +51461,9 @@ OUI:4C3B74* OUI:4C3C16* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:4C3FD3* + ID_OUI_FROM_DATABASE=Texas Instruments + OUI:4C48DA* ID_OUI_FROM_DATABASE=Beijing Autelan Technology Co.,Ltd @@ -51692,6 +51872,9 @@ OUI:4CECEF* OUI:4CEDDE* ID_OUI_FROM_DATABASE=ASKEY COMPUTER CORP +OUI:4CEDFB* + ID_OUI_FROM_DATABASE=ASUSTek COMPUTER INC. + OUI:4CEEB0* ID_OUI_FROM_DATABASE=SHC Netzwerktechnik GmbH @@ -51989,6 +52172,9 @@ OUI:505800* OUI:50584F* ID_OUI_FROM_DATABASE=waytotec,Inc. +OUI:505967* + ID_OUI_FROM_DATABASE=Intent Solutions Inc + OUI:505AC6* ID_OUI_FROM_DATABASE=GUANGDONG SUPER TELECOM CO.,LTD. @@ -52004,6 +52190,9 @@ OUI:506028* OUI:506184* ID_OUI_FROM_DATABASE=Avaya Inc +OUI:5061BF* + ID_OUI_FROM_DATABASE=Cisco Systems, Inc + OUI:5061D6* ID_OUI_FROM_DATABASE=Indu-Sol GmbH @@ -52592,6 +52781,9 @@ OUI:544408* OUI:54466B* ID_OUI_FROM_DATABASE=Shenzhen CZTIC Electronic Technology Co., Ltd +OUI:544810* + ID_OUI_FROM_DATABASE=Dell Inc. + OUI:54489C* ID_OUI_FROM_DATABASE=CDOUBLES ELECTRONICS CO. LTD. @@ -52838,6 +53030,9 @@ OUI:54AE27* OUI:54B121* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:54B203* + ID_OUI_FROM_DATABASE=PEGATRON CORPORATION + OUI:54B56C* ID_OUI_FROM_DATABASE=Xi'an NovaStar Tech Co., Ltd @@ -52865,6 +53060,9 @@ OUI:54BE53* OUI:54BEF7* ID_OUI_FROM_DATABASE=PEGATRON CORPORATION +OUI:54BF64* + ID_OUI_FROM_DATABASE=Dell Inc. + OUI:54C415* ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd. @@ -53183,6 +53381,9 @@ OUI:5856E8* OUI:58570D* ID_OUI_FROM_DATABASE=Danfoss Solar Inverters +OUI:585FF6* + ID_OUI_FROM_DATABASE=zte corporation + OUI:58605F* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -53351,6 +53552,9 @@ OUI:58B035* OUI:58B0D4* ID_OUI_FROM_DATABASE=ZuniData Systems Inc. +OUI:58B10F* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:58B3FC* ID_OUI_FROM_DATABASE=SHENZHEN RF-LINK TECHNOLOGY CO.,LTD. @@ -53936,6 +54140,9 @@ OUI:5CB066* OUI:5CB395* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:5CB3F6* + ID_OUI_FROM_DATABASE=Human, Incorporated + OUI:5CB43E* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -53993,6 +54200,9 @@ OUI:5CCCA0* OUI:5CCCFF* ID_OUI_FROM_DATABASE=Techroutes Network Pvt Ltd +OUI:5CCD7C* + ID_OUI_FROM_DATABASE=MEIZU Technology Co.,Ltd. + OUI:5CCEAD* ID_OUI_FROM_DATABASE=CDYNE Corporation @@ -54191,6 +54401,9 @@ OUI:600347* OUI:600417* ID_OUI_FROM_DATABASE=POSBANK CO.,LTD +OUI:60058A* + ID_OUI_FROM_DATABASE=Hitachi Metals, Ltd. + OUI:600810* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -54623,12 +54836,18 @@ OUI:60CDA9* OUI:60CDC5* ID_OUI_FROM_DATABASE=Taiwan Carol Electronics., Ltd +OUI:60D02C* + ID_OUI_FROM_DATABASE=Ruckus Wireless + OUI:60D0A9* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd OUI:60D1AA* ID_OUI_FROM_DATABASE=Vishal Telecommunications Pvt Ltd +OUI:60D21C* + ID_OUI_FROM_DATABASE=Sunnovo International Limited + OUI:60D262* ID_OUI_FROM_DATABASE=Tzukuri Pty Ltd @@ -54770,6 +54989,9 @@ OUI:60F677* OUI:60F81D* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:60FA9D* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:60FACD* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -54941,6 +55163,9 @@ OUI:644BF0* OUI:644D70* ID_OUI_FROM_DATABASE=dSPACE GmbH +OUI:644F42* + ID_OUI_FROM_DATABASE=JETTER CO., Ltd. + OUI:644F74* ID_OUI_FROM_DATABASE=LENUS Co., Ltd. @@ -55145,6 +55370,9 @@ OUI:64A0E7* OUI:64A232* ID_OUI_FROM_DATABASE=OOO Samlight +OUI:64A2F9* + ID_OUI_FROM_DATABASE=OnePlus Technology (Shenzhen) Co., Ltd + OUI:64A341* ID_OUI_FROM_DATABASE=Wonderlan (Beijing) Technology Co., Ltd. @@ -55502,6 +55730,9 @@ OUI:6836B5* OUI:6837E9* ID_OUI_FROM_DATABASE=Amazon Technologies Inc. +OUI:683A1E* + ID_OUI_FROM_DATABASE=Cisco Meraki + OUI:683B1E* ID_OUI_FROM_DATABASE=Countwise LTD @@ -55886,6 +56117,9 @@ OUI:68E166* OUI:68E41F* ID_OUI_FROM_DATABASE=Unglaube Identech GmbH +OUI:68E7C2* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:68E8EB* ID_OUI_FROM_DATABASE=Linktel Technologies Co.,Ltd @@ -56121,7 +56355,7 @@ OUI:6C5779* ID_OUI_FROM_DATABASE=Aclima, Inc. OUI:6C5940* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:6C5976* ID_OUI_FROM_DATABASE=Shanghai Tricheer Technology Co.,Ltd. @@ -56474,6 +56708,9 @@ OUI:7006AC* OUI:700BC0* ID_OUI_FROM_DATABASE=Dewav Technology Company +OUI:700F6A* + ID_OUI_FROM_DATABASE=Cisco Systems, Inc + OUI:700FC7* ID_OUI_FROM_DATABASE=SHENZHEN IKINLOOP TECHNOLOGY CO.,LTD. @@ -56663,6 +56900,9 @@ OUI:7052C5* OUI:70533F* ID_OUI_FROM_DATABASE=Alfa Instrumentos Eletronicos Ltda. +OUI:7054B4* + ID_OUI_FROM_DATABASE=Vestel Elektronik San ve Tic. A.Ş. + OUI:7054D2* ID_OUI_FROM_DATABASE=PEGATRON CORPORATION @@ -56879,6 +57119,9 @@ OUI:70886BB* OUI:70886BC* ID_OUI_FROM_DATABASE=MAX4G, Inc. +OUI:7089CC* + ID_OUI_FROM_DATABASE=China Mobile Group Device Co.,Ltd. + OUI:708A09* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -56930,6 +57173,9 @@ OUI:709E86* OUI:709F2D* ID_OUI_FROM_DATABASE=zte corporation +OUI:709FA9* + ID_OUI_FROM_DATABASE=TECNO MOBILE LIMITED + OUI:70A191* ID_OUI_FROM_DATABASE=Trendsetter Medical, LLC @@ -56987,6 +57233,9 @@ OUI:70B3D5007* OUI:70B3D5009* ID_OUI_FROM_DATABASE=HolidayCoro +OUI:70B3D500A* + ID_OUI_FROM_DATABASE=FUJICOM Co.,Ltd. + OUI:70B3D500D* ID_OUI_FROM_DATABASE=Scrona AG @@ -57002,6 +57251,9 @@ OUI:70B3D5011* OUI:70B3D5012* ID_OUI_FROM_DATABASE=KST technology +OUI:70B3D5015* + ID_OUI_FROM_DATABASE=EN ElectronicNetwork Hamburg GmbH + OUI:70B3D5016* ID_OUI_FROM_DATABASE=Guardian Controls International Ltd @@ -57035,6 +57287,9 @@ OUI:70B3D5025* OUI:70B3D5026* ID_OUI_FROM_DATABASE=Telstra +OUI:70B3D5027* + ID_OUI_FROM_DATABASE=Redcap Solutions s.r.o. + OUI:70B3D5028* ID_OUI_FROM_DATABASE=AT-Automation Technology GmbH @@ -57065,6 +57320,9 @@ OUI:70B3D5033* OUI:70B3D5035* ID_OUI_FROM_DATABASE=HKW-Elektronik GmbH +OUI:70B3D5037* + ID_OUI_FROM_DATABASE=EIFFAGE ENERGIE ELECTRONIQUE + OUI:70B3D5039* ID_OUI_FROM_DATABASE=DoWoo Digitech @@ -57131,6 +57389,9 @@ OUI:70B3D505A* OUI:70B3D505D* ID_OUI_FROM_DATABASE=KOMS Co.,Ltd. +OUI:70B3D505E* + ID_OUI_FROM_DATABASE=VITEC + OUI:70B3D505F* ID_OUI_FROM_DATABASE=UNISOR MULTISYSTEMS LTD @@ -57188,6 +57449,9 @@ OUI:70B3D5081* OUI:70B3D5083* ID_OUI_FROM_DATABASE=ZAO ZEO +OUI:70B3D5085* + ID_OUI_FROM_DATABASE=Human Systems Integration + OUI:70B3D5086* ID_OUI_FROM_DATABASE=Husty M.Styczen J.Hupert Sp.J. @@ -57272,6 +57536,9 @@ OUI:70B3D50AA* OUI:70B3D50AB* ID_OUI_FROM_DATABASE=KST technology +OUI:70B3D50AC* + ID_OUI_FROM_DATABASE=RoboCore Tecnologia + OUI:70B3D50AE* ID_OUI_FROM_DATABASE=Norsat International Inc. @@ -57338,6 +57605,9 @@ OUI:70B3D50CD* OUI:70B3D50CE* ID_OUI_FROM_DATABASE=Innominds Software Inc +OUI:70B3D50D1* + ID_OUI_FROM_DATABASE=Common Sense Monitoring Solutions Ltd. + OUI:70B3D50D2* ID_OUI_FROM_DATABASE=UNMANNED SPA @@ -57438,7 +57708,7 @@ OUI:70B3D5108* ID_OUI_FROM_DATABASE=TEX COMPUTER SRL OUI:70B3D5109* - ID_OUI_FROM_DATABASE=DITEST FAHRZEUGDIAGNOSE GMBH + ID_OUI_FROM_DATABASE=DiTEST Fahrzeugdiagnose GmbH OUI:70B3D510A* ID_OUI_FROM_DATABASE=SEASON DESIGN TECHNOLOGY @@ -57659,6 +57929,9 @@ OUI:70B3D5179* OUI:70B3D517A* ID_OUI_FROM_DATABASE=Gencoa Ltd +OUI:70B3D517B* + ID_OUI_FROM_DATABASE=Vistec Electron Beam GmbH + OUI:70B3D517D* ID_OUI_FROM_DATABASE=Entech Electronics @@ -57728,6 +58001,9 @@ OUI:70B3D519C* OUI:70B3D519E* ID_OUI_FROM_DATABASE=J-Factor Embedded Technologies +OUI:70B3D519F* + ID_OUI_FROM_DATABASE=Koizumi Lighting Technology Corp. + OUI:70B3D51A0* ID_OUI_FROM_DATABASE=UFATECH LTD @@ -57779,6 +58055,9 @@ OUI:70B3D51B9* OUI:70B3D51BB* ID_OUI_FROM_DATABASE=EFENTO T P SZYDŁOWSKI K ZARĘBA SPÓŁKA JAWNA +OUI:70B3D51BE* + ID_OUI_FROM_DATABASE=Potter Electric Signal Co. LLC + OUI:70B3D51C4* ID_OUI_FROM_DATABASE=Smeg S.p.A. @@ -57800,6 +58079,12 @@ OUI:70B3D51CD* OUI:70B3D51D0* ID_OUI_FROM_DATABASE=Shenzhen INVT Electric Co.,Ltd +OUI:70B3D51D1* + ID_OUI_FROM_DATABASE=Eurotek Srl + +OUI:70B3D51D3* + ID_OUI_FROM_DATABASE=AIROBOT OÜ + OUI:70B3D51D4* ID_OUI_FROM_DATABASE=Brinkmann Audio GmbH @@ -57914,6 +58199,9 @@ OUI:70B3D5217* OUI:70B3D521B* ID_OUI_FROM_DATABASE=Lab241 Co.,Ltd. +OUI:70B3D521C* + ID_OUI_FROM_DATABASE=Enyx SA + OUI:70B3D521D* ID_OUI_FROM_DATABASE=iRF - Intelligent RF Solutions, LLC @@ -57971,6 +58259,9 @@ OUI:70B3D5238* OUI:70B3D523A* ID_OUI_FROM_DATABASE=Mesa Labs, Inc. +OUI:70B3D523B* + ID_OUI_FROM_DATABASE=Fink Telecom Services + OUI:70B3D523C* ID_OUI_FROM_DATABASE=Quasonix, LLC @@ -58124,6 +58415,9 @@ OUI:70B3D528E* OUI:70B3D528F* ID_OUI_FROM_DATABASE=Overline Systems +OUI:70B3D5292* + ID_OUI_FROM_DATABASE=Private + OUI:70B3D5295* ID_OUI_FROM_DATABASE=Cello Electronics (UK) Ltd @@ -58160,6 +58454,9 @@ OUI:70B3D52A5* OUI:70B3D52A7* ID_OUI_FROM_DATABASE=Plasmability, LLC +OUI:70B3D52A9* + ID_OUI_FROM_DATABASE=Power Electronics Espana, S.L. + OUI:70B3D52AA* ID_OUI_FROM_DATABASE=Flirtey Inc @@ -58238,6 +58535,9 @@ OUI:70B3D52CF* OUI:70B3D52D0* ID_OUI_FROM_DATABASE=ijin co.,ltd. +OUI:70B3D52D2* + ID_OUI_FROM_DATABASE=SHANGHAI IRISIAN OPTRONICS TECHNOLOGY CO.,LTD. + OUI:70B3D52D4* ID_OUI_FROM_DATABASE=CT Company @@ -58481,6 +58781,9 @@ OUI:70B3D5361* OUI:70B3D5362* ID_OUI_FROM_DATABASE=Asiga +OUI:70B3D5363* + ID_OUI_FROM_DATABASE=Contec DTx + OUI:70B3D5364* ID_OUI_FROM_DATABASE=ADAMCZEWSKI elektronische Messtechnik GmbH @@ -58514,6 +58817,9 @@ OUI:70B3D5371* OUI:70B3D5374* ID_OUI_FROM_DATABASE=OOO NPP Mars-Energo +OUI:70B3D5375* + ID_OUI_FROM_DATABASE=Adel System srl + OUI:70B3D5376* ID_OUI_FROM_DATABASE=Private @@ -58544,6 +58850,9 @@ OUI:70B3D537F* OUI:70B3D5381* ID_OUI_FROM_DATABASE=CRDE +OUI:70B3D5382* + ID_OUI_FROM_DATABASE=Naval Group + OUI:70B3D5383* ID_OUI_FROM_DATABASE=LPA Excil Electronics @@ -58655,6 +58964,9 @@ OUI:70B3D53C5* OUI:70B3D53C6* ID_OUI_FROM_DATABASE=ACD Elekronik GmbH +OUI:70B3D53C9* + ID_OUI_FROM_DATABASE=Duerkopp-Adler + OUI:70B3D53CA* ID_OUI_FROM_DATABASE=TTI Ltd @@ -58916,6 +59228,9 @@ OUI:70B3D5475* OUI:70B3D5476* ID_OUI_FROM_DATABASE=FR-Team International SA +OUI:70B3D5478* + ID_OUI_FROM_DATABASE=Touchnet/OneCard + OUI:70B3D5479* ID_OUI_FROM_DATABASE=LINEAGE POWER PVT LTD., @@ -59051,6 +59366,9 @@ OUI:70B3D54BD* OUI:70B3D54BE* ID_OUI_FROM_DATABASE=GY-FX SAS +OUI:70B3D54C0* + ID_OUI_FROM_DATABASE=Technica Engineering GmbH + OUI:70B3D54C1* ID_OUI_FROM_DATABASE=QUERCUS TECHNOLOGIES, S. L. @@ -59120,6 +59438,9 @@ OUI:70B3D54E9* OUI:70B3D54EB* ID_OUI_FROM_DATABASE=INFOSOFT DIGITAL DESIGN & SERVICES PRIVATE LIMITED +OUI:70B3D54EC* + ID_OUI_FROM_DATABASE=Hangzhou Youshi Industry Co., Ltd. + OUI:70B3D54EF* ID_OUI_FROM_DATABASE=CMI, Inc. @@ -59597,6 +59918,9 @@ OUI:70B3D5610* OUI:70B3D5611* ID_OUI_FROM_DATABASE=Avionica +OUI:70B3D5613* + ID_OUI_FROM_DATABASE=Suprock Technologies + OUI:70B3D5615* ID_OUI_FROM_DATABASE=JSC OTZVUK @@ -59684,6 +60008,9 @@ OUI:70B3D5649* OUI:70B3D564A* ID_OUI_FROM_DATABASE=Netbric Technology Co.,Ltd. +OUI:70B3D564B* + ID_OUI_FROM_DATABASE=Kalfire + OUI:70B3D564C* ID_OUI_FROM_DATABASE=ACEMIS FRANCE @@ -59759,6 +60086,9 @@ OUI:70B3D5672* OUI:70B3D5674* ID_OUI_FROM_DATABASE=Fortress Cyber Security +OUI:70B3D5676* + ID_OUI_FROM_DATABASE=samwooeleco + OUI:70B3D5677* ID_OUI_FROM_DATABASE=Fraunhofer-Institut IIS @@ -59852,6 +60182,9 @@ OUI:70B3D56B5* OUI:70B3D56B6* ID_OUI_FROM_DATABASE=INRADIOS GmbH +OUI:70B3D56B7* + ID_OUI_FROM_DATABASE=Grossenbacher Systeme AG + OUI:70B3D56BB* ID_OUI_FROM_DATABASE=LUCEO @@ -60026,6 +60359,9 @@ OUI:70B3D5720* OUI:70B3D5721* ID_OUI_FROM_DATABASE=Zoe Medical +OUI:70B3D5722* + ID_OUI_FROM_DATABASE=UMAN + OUI:70B3D5723* ID_OUI_FROM_DATABASE=LG Electronics @@ -60149,6 +60485,9 @@ OUI:70B3D575D* OUI:70B3D575E* ID_OUI_FROM_DATABASE=Cardinal Health +OUI:70B3D575F* + ID_OUI_FROM_DATABASE=Vocality international T/A Cubic + OUI:70B3D5760* ID_OUI_FROM_DATABASE=QUALITTEQ LLC @@ -60215,6 +60554,9 @@ OUI:70B3D577B* OUI:70B3D577C* ID_OUI_FROM_DATABASE=HUSTY M.Styczen J.Hupert Sp.J. +OUI:70B3D577E* + ID_OUI_FROM_DATABASE=Blue Marble Communications, Inc. + OUI:70B3D5781* ID_OUI_FROM_DATABASE=Project Service S.a.s. @@ -60242,6 +60584,9 @@ OUI:70B3D578C* OUI:70B3D578E* ID_OUI_FROM_DATABASE=effectas GmbH +OUI:70B3D5790* + ID_OUI_FROM_DATABASE=AVI Pty Ltd + OUI:70B3D5791* ID_OUI_FROM_DATABASE=Romteck Australia @@ -60377,6 +60722,9 @@ OUI:70B3D57D2* OUI:70B3D57D5* ID_OUI_FROM_DATABASE=SICS Swedish ICT +OUI:70B3D57D6* + ID_OUI_FROM_DATABASE=Yukilab + OUI:70B3D57D7* ID_OUI_FROM_DATABASE=Gedomo GmbH @@ -60866,6 +61214,9 @@ OUI:70B3D58F7* OUI:70B3D58F8* ID_OUI_FROM_DATABASE=Wi6labs +OUI:70B3D58FA* + ID_OUI_FROM_DATABASE=DEA SYSTEM SPA + OUI:70B3D58FF* ID_OUI_FROM_DATABASE=IMST GmbH @@ -60935,6 +61286,9 @@ OUI:70B3D591E* OUI:70B3D591F* ID_OUI_FROM_DATABASE=JSC InformInvestGroup +OUI:70B3D5920* + ID_OUI_FROM_DATABASE=SLAT + OUI:70B3D5923* ID_OUI_FROM_DATABASE=eumig industrie-tv GmbH @@ -60956,6 +61310,9 @@ OUI:70B3D592A* OUI:70B3D592B* ID_OUI_FROM_DATABASE=ENTEC Electric & Electronic Co., LTD. +OUI:70B3D592F* + ID_OUI_FROM_DATABASE=SiFive + OUI:70B3D5930* ID_OUI_FROM_DATABASE=The Institute of Mine Seismology @@ -61052,6 +61409,9 @@ OUI:70B3D5963* OUI:70B3D5967* ID_OUI_FROM_DATABASE=TATTILE SRL +OUI:70B3D5968* + ID_OUI_FROM_DATABASE=LGM Ingénierie + OUI:70B3D5969* ID_OUI_FROM_DATABASE=Emtel System Sp. z o.o. @@ -61085,6 +61445,9 @@ OUI:70B3D597F* OUI:70B3D5981* ID_OUI_FROM_DATABASE=Zamir Recognition Systems Ltd. +OUI:70B3D5984* + ID_OUI_FROM_DATABASE=Sanmina Israel + OUI:70B3D5986* ID_OUI_FROM_DATABASE=Aplex Technology Inc. @@ -61406,6 +61769,9 @@ OUI:70B3D5A35* OUI:70B3D5A36* ID_OUI_FROM_DATABASE=Beijing DamingWuzhou Science&Technology Co., Ltd. +OUI:70B3D5A37* + ID_OUI_FROM_DATABASE=MITSUBISHI HEAVY INDUSTRIES THERMAL SYSTEMS, LTD. + OUI:70B3D5A3A* ID_OUI_FROM_DATABASE=EPSOFT Co., Ltd @@ -61508,6 +61874,9 @@ OUI:70B3D5A72* OUI:70B3D5A73* ID_OUI_FROM_DATABASE=MobiPromo +OUI:70B3D5A76* + ID_OUI_FROM_DATABASE=Pietro Fiorentini + OUI:70B3D5A78* ID_OUI_FROM_DATABASE=Bionics co.,ltd. @@ -61523,12 +61892,18 @@ OUI:70B3D5A7E* OUI:70B3D5A81* ID_OUI_FROM_DATABASE=Sienda New Media Technologies GmbH +OUI:70B3D5A82* + ID_OUI_FROM_DATABASE=Telefrank GmbH + OUI:70B3D5A85* ID_OUI_FROM_DATABASE=exceet electronics GesmbH OUI:70B3D5A86* ID_OUI_FROM_DATABASE=Divigraph (Pty) LTD +OUI:70B3D5A87* + ID_OUI_FROM_DATABASE=Tornado Modular Systems + OUI:70B3D5A88* ID_OUI_FROM_DATABASE=Shangdong Bosure Automation Technology Ltd @@ -61952,6 +62327,9 @@ OUI:70B3D5B7D* OUI:70B3D5B7E* ID_OUI_FROM_DATABASE=Elbit Systems of America - Fort Worth Operations +OUI:70B3D5B7F* + ID_OUI_FROM_DATABASE=JSK System + OUI:70B3D5B81* ID_OUI_FROM_DATABASE=Instro Precision Limited @@ -62036,6 +62414,9 @@ OUI:70B3D5BAD* OUI:70B3D5BAE* ID_OUI_FROM_DATABASE=WARECUBE,INC +OUI:70B3D5BAF* + ID_OUI_FROM_DATABASE=SYS TEC electronic GmbH + OUI:70B3D5BB2* ID_OUI_FROM_DATABASE=Mettler Toledo Hi Speed @@ -62075,6 +62456,9 @@ OUI:70B3D5BCA* OUI:70B3D5BCC* ID_OUI_FROM_DATABASE=MB connect line GmbH Fernwartungssysteme +OUI:70B3D5BCE* + ID_OUI_FROM_DATABASE=YAWATA ELECTRIC INDUSTRIAL CO.,LTD. + OUI:70B3D5BD1* ID_OUI_FROM_DATABASE=CableLabs @@ -62327,6 +62711,9 @@ OUI:70B3D5C62* OUI:70B3D5C63* ID_OUI_FROM_DATABASE=Xentech Solutions Limited +OUI:70B3D5C65* + ID_OUI_FROM_DATABASE=PEEK TRAFFIC + OUI:70B3D5C67* ID_OUI_FROM_DATABASE=Collini Dienstleistungs GmbH @@ -62426,6 +62813,9 @@ OUI:70B3D5C9F* OUI:70B3D5CA2* ID_OUI_FROM_DATABASE=De Haardt bv +OUI:70B3D5CA3* + ID_OUI_FROM_DATABASE=Saankhya Labs Private Limited + OUI:70B3D5CA4* ID_OUI_FROM_DATABASE=Netemera Sp. z o.o. @@ -62585,6 +62975,9 @@ OUI:70B3D5D07* OUI:70B3D5D08* ID_OUI_FROM_DATABASE=Veeco Instruments +OUI:70B3D5D09* + ID_OUI_FROM_DATABASE=Rishaad Brown + OUI:70B3D5D0A* ID_OUI_FROM_DATABASE=Private @@ -62738,6 +63131,9 @@ OUI:70B3D5D60* OUI:70B3D5D61* ID_OUI_FROM_DATABASE=VITEC +OUI:70B3D5D62* + ID_OUI_FROM_DATABASE=Andasis Elektronik San. ve Tic. A.Ş. + OUI:70B3D5D63* ID_OUI_FROM_DATABASE=CRDE @@ -62753,18 +63149,27 @@ OUI:70B3D5D67* OUI:70B3D5D69* ID_OUI_FROM_DATABASE=Thermo Fisher Scientific +OUI:70B3D5D6A* + ID_OUI_FROM_DATABASE=KnowRoaming + OUI:70B3D5D6B* ID_OUI_FROM_DATABASE=Uwinloc OUI:70B3D5D6C* ID_OUI_FROM_DATABASE=GP Systems GmbH +OUI:70B3D5D6E* + ID_OUI_FROM_DATABASE=ard sa + OUI:70B3D5D6F* ID_OUI_FROM_DATABASE=X-SPEX GmbH OUI:70B3D5D70* ID_OUI_FROM_DATABASE=Rational Production srl Unipersonale +OUI:70B3D5D72* + ID_OUI_FROM_DATABASE=OnYield Inc Ltd + OUI:70B3D5D73* ID_OUI_FROM_DATABASE=ERMINE Corporation @@ -62786,6 +63191,9 @@ OUI:70B3D5D7A* OUI:70B3D5D7B* ID_OUI_FROM_DATABASE=Peter Huber Kaeltemaschinenbau AG +OUI:70B3D5D7C* + ID_OUI_FROM_DATABASE=D.T.S Illuminazione Srl + OUI:70B3D5D7E* ID_OUI_FROM_DATABASE=Triax A/S @@ -62909,6 +63317,9 @@ OUI:70B3D5DC5* OUI:70B3D5DC6* ID_OUI_FROM_DATABASE=IDEM INC. +OUI:70B3D5DC8* + ID_OUI_FROM_DATABASE=Enertex Bayern GmbH + OUI:70B3D5DC9* ID_OUI_FROM_DATABASE=Sensoterra BV @@ -63248,6 +63659,9 @@ OUI:70B3D5E9B* OUI:70B3D5E9C* ID_OUI_FROM_DATABASE=ATG UV Technology +OUI:70B3D5E9E* + ID_OUI_FROM_DATABASE=MSB Elektronik und Gerätebau GmbH + OUI:70B3D5EA0* ID_OUI_FROM_DATABASE=PARK24 @@ -63299,6 +63713,9 @@ OUI:70B3D5EB9* OUI:70B3D5EBB* ID_OUI_FROM_DATABASE=Beijing Wing ICT Technology Co., Ltd. +OUI:70B3D5EBC* + ID_OUI_FROM_DATABASE=Refine Technology, LLC + OUI:70B3D5EBD* ID_OUI_FROM_DATABASE=midBit Technologies, LLC @@ -63377,6 +63794,9 @@ OUI:70B3D5EF2* OUI:70B3D5EF3* ID_OUI_FROM_DATABASE=octoScope +OUI:70B3D5EF4* + ID_OUI_FROM_DATABASE=Orange Tree Technologies Ltd + OUI:70B3D5EF5* ID_OUI_FROM_DATABASE=DEUTA-WERKE GmbH @@ -63548,6 +63968,9 @@ OUI:70B3D5F5C* OUI:70B3D5F5E* ID_OUI_FROM_DATABASE=Selex ES Inc. +OUI:70B3D5F5F* + ID_OUI_FROM_DATABASE=RFRain LLC + OUI:70B3D5F61* ID_OUI_FROM_DATABASE=Power Diagnostic Service @@ -64319,6 +64742,9 @@ OUI:746A8F* OUI:746B82* ID_OUI_FROM_DATABASE=MOVEK +OUI:746BAB* + ID_OUI_FROM_DATABASE=GUANGDONG ENOK COMMUNICATION CO., LTD + OUI:746EE4* ID_OUI_FROM_DATABASE=Asia Vital Components Co.,Ltd. @@ -64499,6 +64925,9 @@ OUI:74B472* OUI:74B57E* ID_OUI_FROM_DATABASE=zte corporation +OUI:74B91E* + ID_OUI_FROM_DATABASE=Nanjing Bestway Automation System Co., Ltd + OUI:74B9EB* ID_OUI_FROM_DATABASE=JinQianMao Technology Co.,Ltd. @@ -64517,6 +64946,9 @@ OUI:74BFA1* OUI:74BFB7* ID_OUI_FROM_DATABASE=Nusoft Corporation +OUI:74C14F* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:74C246* ID_OUI_FROM_DATABASE=Amazon Technologies Inc. @@ -64694,6 +65126,12 @@ OUI:74EACB* OUI:74EAE8* ID_OUI_FROM_DATABASE=ARRIS Group, Inc. +OUI:74EB80* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + +OUI:74EC42* + ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD + OUI:74ECF1* ID_OUI_FROM_DATABASE=Acumen @@ -64755,7 +65193,7 @@ OUI:74F8DB9* ID_OUI_FROM_DATABASE=Avantree Corporation OUI:74F8DBA* - ID_OUI_FROM_DATABASE=Ballard Technology Inc. + ID_OUI_FROM_DATABASE=Ballard Technology, Inc, OUI:74F8DBB* ID_OUI_FROM_DATABASE=Capwave Technologies Inc @@ -64802,6 +65240,9 @@ OUI:7802B7* OUI:7802F8* ID_OUI_FROM_DATABASE=Xiaomi Communications Co Ltd +OUI:780473* + ID_OUI_FROM_DATABASE=Texas Instruments + OUI:780541* ID_OUI_FROM_DATABASE=Queclink Wireless Solutions Co., Ltd @@ -64874,6 +65315,9 @@ OUI:7825AD* OUI:7828CA* ID_OUI_FROM_DATABASE=Sonos, Inc. +OUI:7829ED* + ID_OUI_FROM_DATABASE=ASKEY COMPUTER CORP + OUI:782BCB* ID_OUI_FROM_DATABASE=Dell Inc. @@ -65045,6 +65489,9 @@ OUI:786D94* OUI:78719C* ID_OUI_FROM_DATABASE=ARRIS Group, Inc. +OUI:78725D* + ID_OUI_FROM_DATABASE=Cisco Systems, Inc + OUI:787B8A* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -65204,6 +65651,9 @@ OUI:78AE0C* OUI:78AF58* ID_OUI_FROM_DATABASE=GIMASI SA +OUI:78AFE4* + ID_OUI_FROM_DATABASE=Comau S.p.A + OUI:78B28D* ID_OUI_FROM_DATABASE=Beijing Tengling Technology CO.Ltd @@ -65381,6 +65831,9 @@ OUI:78D004* OUI:78D129* ID_OUI_FROM_DATABASE=Vicos +OUI:78D294* + ID_OUI_FROM_DATABASE=NETGEAR + OUI:78D34F* ID_OUI_FROM_DATABASE=Pace-O-Matic, Inc. @@ -65675,6 +66128,9 @@ OUI:7C2CF3* OUI:7C2E0D* ID_OUI_FROM_DATABASE=Blackmagic Design +OUI:7C2EBD* + ID_OUI_FROM_DATABASE=Google, Inc. + OUI:7C2EDD* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -65708,6 +66164,9 @@ OUI:7C3CB6* OUI:7C3E9D* ID_OUI_FROM_DATABASE=PATECH +OUI:7C41A2* + ID_OUI_FROM_DATABASE=Nokia + OUI:7C438F* ID_OUI_FROM_DATABASE=E-Band Communications Corp. @@ -65990,6 +66449,9 @@ OUI:7C95B1* OUI:7C95F3* ID_OUI_FROM_DATABASE=Cisco Systems, Inc +OUI:7C96D2* + ID_OUI_FROM_DATABASE=Fihonest communication co.,Ltd + OUI:7C9763* ID_OUI_FROM_DATABASE=Openmatics s.r.o. @@ -66338,6 +66800,9 @@ OUI:80006E* OUI:800184* ID_OUI_FROM_DATABASE=HTC Corporation +OUI:80029C* + ID_OUI_FROM_DATABASE=Gemtek Technology Co., Ltd. + OUI:8002DF* ID_OUI_FROM_DATABASE=ORA Inc. @@ -66539,6 +67004,9 @@ OUI:80501B* OUI:805067* ID_OUI_FROM_DATABASE=W & D TECHNOLOGY CORPORATION +OUI:8050F6* + ID_OUI_FROM_DATABASE=ITEL MOBILE LIMITED + OUI:8056F2* ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. @@ -66771,7 +67239,10 @@ OUI:80B289* ID_OUI_FROM_DATABASE=Forworld Electronics Ltd. OUI:80B32A* - ID_OUI_FROM_DATABASE=Alstom Grid + ID_OUI_FROM_DATABASE=UK Grid Solutions Ltd + +OUI:80B575* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD OUI:80B686* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -66999,7 +67470,7 @@ OUI:841715* ID_OUI_FROM_DATABASE=GP Electronics (HK) Ltd. OUI:841766* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:841826* ID_OUI_FROM_DATABASE=Osram GmbH @@ -67682,6 +68153,9 @@ OUI:882950* OUI:882BD7* ID_OUI_FROM_DATABASE=ADDÉNERGIE TECHNOLOGIES +OUI:882D53* + ID_OUI_FROM_DATABASE=Baidu Online Network Technology (Beijing) Co., Ltd. + OUI:882E5A* ID_OUI_FROM_DATABASE=storONE @@ -68384,6 +68858,9 @@ OUI:8C147DD* OUI:8C147DE* ID_OUI_FROM_DATABASE=Electrical & Automation Larsen & Toubro Limited +OUI:8C15C7* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:8C1645* ID_OUI_FROM_DATABASE=LCFC(HeFei) Electronics Technology co., ltd @@ -68438,6 +68915,48 @@ OUI:8C192DE* OUI:8C1ABF* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:8C1CDA0* + ID_OUI_FROM_DATABASE=CEOS Pty Ltd + +OUI:8C1CDA1* + ID_OUI_FROM_DATABASE=GESAS GmbH + +OUI:8C1CDA2* + ID_OUI_FROM_DATABASE=GEOMC + +OUI:8C1CDA3* + ID_OUI_FROM_DATABASE=Structura Technology & Innovation + +OUI:8C1CDA4* + ID_OUI_FROM_DATABASE=Anntec (Beijing) Technology Co.,Ltd. + +OUI:8C1CDA5* + ID_OUI_FROM_DATABASE=Septentrio NV + +OUI:8C1CDA6* + ID_OUI_FROM_DATABASE=LocoLabs LLC + +OUI:8C1CDA7* + ID_OUI_FROM_DATABASE=K Technology Corporation + +OUI:8C1CDA8* + ID_OUI_FROM_DATABASE=ATOL LLC + +OUI:8C1CDA9* + ID_OUI_FROM_DATABASE=Raychem RPG PVT. LTD. + +OUI:8C1CDAA* + ID_OUI_FROM_DATABASE=China Potevio Co., Ltd + +OUI:8C1CDAB* + ID_OUI_FROM_DATABASE=T+A elektroakustik GmbH & Co.KG + +OUI:8C1CDAC* + ID_OUI_FROM_DATABASE=Alcidae Inc + +OUI:8C1CDAE* + ID_OUI_FROM_DATABASE=Electronic Controlled Systems, Inc. + OUI:8C1F94* ID_OUI_FROM_DATABASE=RF Surgical System Inc. @@ -68886,7 +69405,7 @@ OUI:8CEEC6* ID_OUI_FROM_DATABASE=Precepscion Pty. Ltd. OUI:8CF228* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:8CF5A3* ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO-MECHANICS(THAILAND) @@ -69353,6 +69872,9 @@ OUI:909F33* OUI:909F43* ID_OUI_FROM_DATABASE=Accutron Instruments Inc. +OUI:90A137* + ID_OUI_FROM_DATABASE=Beijing Splendidtel Communication Technology Co,. Ltd + OUI:90A210* ID_OUI_FROM_DATABASE=United Telecoms Ltd @@ -69647,6 +70169,9 @@ OUI:941673* OUI:941882* ID_OUI_FROM_DATABASE=Hewlett Packard Enterprise +OUI:94193A* + ID_OUI_FROM_DATABASE=Elvaco AB + OUI:941D1C* ID_OUI_FROM_DATABASE=TLab West Systems AB @@ -69726,7 +70251,7 @@ OUI:944A09* ID_OUI_FROM_DATABASE=BitWise Controls OUI:944A0C* - ID_OUI_FROM_DATABASE=Sercomm Corporation + ID_OUI_FROM_DATABASE=Sercomm Corporation. OUI:945047* ID_OUI_FROM_DATABASE=Rechnerbetriebsgruppe @@ -70541,6 +71066,9 @@ OUI:989C57* OUI:989E63* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:98A404* + ID_OUI_FROM_DATABASE=Ericsson AB + OUI:98A40E* ID_OUI_FROM_DATABASE=Snap, Inc. @@ -71051,6 +71579,9 @@ OUI:9C6C15* OUI:9C6F52* ID_OUI_FROM_DATABASE=zte corporation +OUI:9C713A* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:9C741A* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -71444,6 +71975,15 @@ OUI:A01859* OUI:A01917* ID_OUI_FROM_DATABASE=Bertel S.p.a. +OUI:A019B21* + ID_OUI_FROM_DATABASE=El Sewedy Electrometer Egypt S.A.E. + +OUI:A019B22* + ID_OUI_FROM_DATABASE=Beijing Deephi Intelligent Technology Co., Ltd + +OUI:A019B28* + ID_OUI_FROM_DATABASE=MIS Industrie Systeme GmbH & Co. KG + OUI:A01B29* ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS @@ -72219,7 +72759,7 @@ OUI:A41437* ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd. OUI:A41566* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:A41588* ID_OUI_FROM_DATABASE=ARRIS Group, Inc. @@ -72444,7 +72984,7 @@ OUI:A4526F* ID_OUI_FROM_DATABASE=ADB Broadband Italia OUI:A45385* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:A45602* ID_OUI_FROM_DATABASE=fenglian Technology Co.,Ltd. @@ -72620,6 +73160,9 @@ OUI:A49005* OUI:A491B1* ID_OUI_FROM_DATABASE=Technicolor +OUI:A492CB* + ID_OUI_FROM_DATABASE=Nokia + OUI:A4933F* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -72722,6 +73265,9 @@ OUI:A4BADB* OUI:A4BBAF* ID_OUI_FROM_DATABASE=Lime Instruments +OUI:A4BE2B* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:A4BE61* ID_OUI_FROM_DATABASE=EutroVision System, Inc. @@ -72836,6 +73382,9 @@ OUI:A4DA22D* OUI:A4DA22E* ID_OUI_FROM_DATABASE=Quuppa Oy +OUI:A4DA32* + ID_OUI_FROM_DATABASE=Texas Instruments + OUI:A4DA3F* ID_OUI_FROM_DATABASE=Bionics Corp. @@ -73001,11 +73550,14 @@ OUI:A8294C* OUI:A82BB5* ID_OUI_FROM_DATABASE=Edgecore Networks Corporation +OUI:A82BB9* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:A82BD6* ID_OUI_FROM_DATABASE=Shina System Co., Ltd OUI:A830AD* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:A8329A* ID_OUI_FROM_DATABASE=Digicom Futuristic Technologies Ltd. @@ -73016,6 +73568,9 @@ OUI:A8367A* OUI:A83944* ID_OUI_FROM_DATABASE=Actiontec Electronics, Inc +OUI:A83E0E* + ID_OUI_FROM_DATABASE=HMD Global Oy + OUI:A84041* ID_OUI_FROM_DATABASE=Dragino Technology Co., Limited @@ -73052,6 +73607,9 @@ OUI:A8574E* OUI:A85840* ID_OUI_FROM_DATABASE=Cambridge Industries(Group) Co.,Ltd. +OUI:A85B6C* + ID_OUI_FROM_DATABASE=Robert Bosch Gmbh, CM-CI2 + OUI:A85B78* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -73130,6 +73688,9 @@ OUI:A87B39* OUI:A87C01* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:A87D12* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:A87E33* ID_OUI_FROM_DATABASE=Nokia Danmark A/S @@ -73280,6 +73841,9 @@ OUI:A8C87F* OUI:A8CA7B* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:A8CAB9* + ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO MECHANICS CO., LTD. + OUI:A8CB95* ID_OUI_FROM_DATABASE=EAST BEST CO., LTD. @@ -73307,6 +73871,9 @@ OUI:A8D3F7* OUI:A8D409* ID_OUI_FROM_DATABASE=USA 111 Inc +OUI:A8D498* + ID_OUI_FROM_DATABASE=Avira Operations GmbH & Co. KG + OUI:A8D579* ID_OUI_FROM_DATABASE=Beijing Chushang Science and Technology Co.,Ltd @@ -73328,6 +73895,9 @@ OUI:A8E3EE* OUI:A8E539* ID_OUI_FROM_DATABASE=Moimstone Co.,Ltd +OUI:A8E552* + ID_OUI_FROM_DATABASE=JUWEL Aquarium AG & Co. KG + OUI:A8E705* ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD @@ -73550,6 +74120,9 @@ OUI:AC3870* OUI:AC3A7A* ID_OUI_FROM_DATABASE=Roku, Inc. +OUI:AC3B77* + ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS + OUI:AC3C0B* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -74040,7 +74613,7 @@ OUI:ACF97E* ID_OUI_FROM_DATABASE=ELESYS INC. OUI:ACFD93* - ID_OUI_FROM_DATABASE=Weifang GoerTek Technology Co.,Ltd. + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD OUI:ACFDCE* ID_OUI_FROM_DATABASE=Intel Corporate @@ -74234,6 +74807,9 @@ OUI:B0518E* OUI:B05216* ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd. +OUI:B05365* + ID_OUI_FROM_DATABASE=China Mobile IOT Company Limited + OUI:B05508* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -74627,6 +75203,9 @@ OUI:B0E97E* OUI:B0EABC* ID_OUI_FROM_DATABASE=ASKEY COMPUTER CORP +OUI:B0EB57* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:B0EC71* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -74660,6 +75239,9 @@ OUI:B0F963* OUI:B0FAEB* ID_OUI_FROM_DATABASE=Cisco Systems, Inc +OUI:B0FC0D* + ID_OUI_FROM_DATABASE=Amazon Technologies Inc. + OUI:B0FC36* ID_OUI_FROM_DATABASE=CyberTAN Technology Inc. @@ -74855,6 +75437,9 @@ OUI:B4417A* OUI:B4430D* ID_OUI_FROM_DATABASE=Broadlink Pty Ltd +OUI:B44326* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:B4475E* ID_OUI_FROM_DATABASE=Avaya Inc @@ -74912,6 +75497,9 @@ OUI:B46698* OUI:B467E9* ID_OUI_FROM_DATABASE=Qingdao GoerTek Technology Co., Ltd. +OUI:B46BFC* + ID_OUI_FROM_DATABASE=Intel Corporate + OUI:B46D35* ID_OUI_FROM_DATABASE=Dalian Seasky Automation Co;Ltd @@ -74963,6 +75551,9 @@ OUI:B482FE* OUI:B48547* ID_OUI_FROM_DATABASE=Amptown System Company GmbH +OUI:B48655* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:B48910* ID_OUI_FROM_DATABASE=Coster T.E. S.P.A. @@ -75071,6 +75662,9 @@ OUI:B4B5AF* OUI:B4B676* ID_OUI_FROM_DATABASE=Intel Corporate +OUI:B4B686* + ID_OUI_FROM_DATABASE=Hewlett Packard + OUI:B4B859* ID_OUI_FROM_DATABASE=Texa Spa @@ -75170,6 +75764,9 @@ OUI:B4E9A3* OUI:B4E9B0* ID_OUI_FROM_DATABASE=Cisco Systems, Inc +OUI:B4EC02* + ID_OUI_FROM_DATABASE=ALPS ELECTRIC CO.,LTD. + OUI:B4ED19* ID_OUI_FROM_DATABASE=Pie Digital, Inc. @@ -75461,6 +76058,9 @@ OUI:B87CF2* OUI:B88198* ID_OUI_FROM_DATABASE=Intel Corporate +OUI:B88303* + ID_OUI_FROM_DATABASE=Hewlett Packard Enterprise + OUI:B88687* ID_OUI_FROM_DATABASE=Liteon Technology Corporation @@ -75482,6 +76082,9 @@ OUI:B889CA* OUI:B88A60* ID_OUI_FROM_DATABASE=Intel Corporate +OUI:B88AEC* + ID_OUI_FROM_DATABASE=Nintendo Co.,Ltd + OUI:B88D12* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -75581,6 +76184,9 @@ OUI:B8B42E* OUI:B8B7D7* ID_OUI_FROM_DATABASE=2GIG Technologies +OUI:B8B7F1* + ID_OUI_FROM_DATABASE=Wistron Neweb Corporation + OUI:B8B81E* ID_OUI_FROM_DATABASE=Intel Corporate @@ -75875,6 +76481,9 @@ OUI:BC20A4* OUI:BC20BA* ID_OUI_FROM_DATABASE=Inspur (Shandong) Electronic Information Co., Ltd +OUI:BC22FB* + ID_OUI_FROM_DATABASE=RF Industries + OUI:BC25E0* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD @@ -76071,7 +76680,7 @@ OUI:BC5FF4* ID_OUI_FROM_DATABASE=ASRock Incorporation OUI:BC5FF6* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:BC6010* ID_OUI_FROM_DATABASE=Qingdao Hisense Communications Co.,Ltd. @@ -76262,6 +76871,9 @@ OUI:BC9680* OUI:BC9889* ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD +OUI:BC9911* + ID_OUI_FROM_DATABASE=Zyxel Communications Corporation + OUI:BC99BC* ID_OUI_FROM_DATABASE=FonSee Technology Inc. @@ -76652,6 +77264,9 @@ OUI:C07CD1* OUI:C07E40* ID_OUI_FROM_DATABASE=SHENZHEN XDK COMMUNICATION EQUIPMENT CO.,LTD +OUI:C08135* + ID_OUI_FROM_DATABASE=Ningbo Forfan technology Co., LTD + OUI:C08170* ID_OUI_FROM_DATABASE=Effigis GeoSolutions @@ -76832,6 +77447,9 @@ OUI:C0D012* OUI:C0D044* ID_OUI_FROM_DATABASE=Sagemcom Broadband SAS +OUI:C0D2F3* + ID_OUI_FROM_DATABASE=Hui Zhou Gaoshengda Technology Co.,LTD + OUI:C0D3910* ID_OUI_FROM_DATABASE=Fuzhou Jinshi Technology Co.,Ltd. @@ -76922,6 +77540,9 @@ OUI:C0F1C4* OUI:C0F2FB* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:C0F4E6* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:C0F636* ID_OUI_FROM_DATABASE=Hangzhou Kuaiyue Technologies, Ltd. @@ -77036,6 +77657,9 @@ OUI:C4237A* OUI:C4242E* ID_OUI_FROM_DATABASE=Galvanic Applied Sciences Inc +OUI:C42456* + ID_OUI_FROM_DATABASE=Palo Alto Networks + OUI:C42628* ID_OUI_FROM_DATABASE=Airo Wireless @@ -77348,6 +77972,9 @@ OUI:C49313* OUI:C49380* ID_OUI_FROM_DATABASE=Speedytel technology +OUI:C493D9* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:C495A2* ID_OUI_FROM_DATABASE=SHENZHEN WEIJIU INDUSTRY AND TRADE DEVELOPMENT CO., LTD @@ -77805,7 +78432,7 @@ OUI:C87765* ID_OUI_FROM_DATABASE=Tiesse SpA OUI:C8778B* - ID_OUI_FROM_DATABASE=Themis Computer + ID_OUI_FROM_DATABASE=Mercury Systems – Trusted Mission Solutions, Inc. OUI:C87B5B* ID_OUI_FROM_DATABASE=zte corporation @@ -77975,6 +78602,9 @@ OUI:C8AF40* OUI:C8AFE3* ID_OUI_FROM_DATABASE=Hefei Radio Communication Technology Co., Ltd +OUI:C8B1EE* + ID_OUI_FROM_DATABASE=Qorvo + OUI:C8B21E* ID_OUI_FROM_DATABASE=CHIPSEA TECHNOLOGIES (SHENZHEN) CORP. @@ -78099,7 +78729,7 @@ OUI:C8E776* ID_OUI_FROM_DATABASE=PTCOM Technology OUI:C8E7D8* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:C8E7F0* ID_OUI_FROM_DATABASE=Juniper Networks @@ -78393,7 +79023,7 @@ OUI:CC3A61* ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO MECHANICS CO., LTD. OUI:CC3ADF* - ID_OUI_FROM_DATABASE=Neptune Technology Group Inc. + ID_OUI_FROM_DATABASE=Private OUI:CC3B3E* ID_OUI_FROM_DATABASE=Lester Electrical @@ -78458,6 +79088,12 @@ OUI:CC501C* OUI:CC5076* ID_OUI_FROM_DATABASE=Ocom Communications, Inc. +OUI:CC50E3* + ID_OUI_FROM_DATABASE=Espressif Inc. + +OUI:CC51B4* + ID_OUI_FROM_DATABASE=Integrated Device Technology (Malaysia) Sdn. Bhd. + OUI:CC52AF* ID_OUI_FROM_DATABASE=Universal Global Scientific Industrial Co., Ltd. @@ -78548,6 +79184,9 @@ OUI:CC7A30* OUI:CC7B35* ID_OUI_FROM_DATABASE=zte corporation +OUI:CC7B61* + ID_OUI_FROM_DATABASE=NIKKISO CO., LTD. + OUI:CC7D37* ID_OUI_FROM_DATABASE=ARRIS Group, Inc. @@ -78713,6 +79352,9 @@ OUI:CCC760* OUI:CCC8D7* ID_OUI_FROM_DATABASE=CIAS Elettronica srl +OUI:CCC92C* + ID_OUI_FROM_DATABASE=Schindler - PORT Technology + OUI:CCCC4E* ID_OUI_FROM_DATABASE=Sun Fountainhead USA. Corp @@ -78969,7 +79611,7 @@ OUI:D023DB* ID_OUI_FROM_DATABASE=Apple, Inc. OUI:D02516* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:D02544* ID_OUI_FROM_DATABASE=SAMSUNG ELECTRO-MECHANICS(THAILAND) @@ -79073,6 +79715,9 @@ OUI:D05875* OUI:D058A8* ID_OUI_FROM_DATABASE=zte corporation +OUI:D058FC* + ID_OUI_FROM_DATABASE=BSkyB Ltd + OUI:D05995* ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD @@ -79253,6 +79898,9 @@ OUI:D08999* OUI:D08A55* ID_OUI_FROM_DATABASE=Skullcandy +OUI:D08A91* + ID_OUI_FROM_DATABASE=Technicolor CH USA Inc. + OUI:D08B7E* ID_OUI_FROM_DATABASE=Passif Semiconductor @@ -79322,6 +79970,9 @@ OUI:D0B0CD* OUI:D0B128* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd +OUI:D0B214* + ID_OUI_FROM_DATABASE=PoeWit Inc + OUI:D0B2C4* ID_OUI_FROM_DATABASE=Technicolor CH USA Inc. @@ -79370,6 +80021,12 @@ OUI:D0C282* OUI:D0C42F* ID_OUI_FROM_DATABASE=Tamagawa Seiki Co.,Ltd. +OUI:D0C5D3* + ID_OUI_FROM_DATABASE=AzureWave Technology Inc. + +OUI:D0C5D8* + ID_OUI_FROM_DATABASE=LATECOERE + OUI:D0C5F3* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -79412,6 +80069,9 @@ OUI:D0D471* OUI:D0D6CC* ID_OUI_FROM_DATABASE=Wintop +OUI:D0D783* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:D0D94F0* ID_OUI_FROM_DATABASE=Perfant Technology Co., Ltd @@ -79590,7 +80250,7 @@ OUI:D4206D* ID_OUI_FROM_DATABASE=HTC Corporation OUI:D42122* - ID_OUI_FROM_DATABASE=Sercomm Corporation + ID_OUI_FROM_DATABASE=Sercomm Corporation. OUI:D4223F* ID_OUI_FROM_DATABASE=Lenovo Mobile Communication Technology Ltd. @@ -79910,6 +80570,9 @@ OUI:D49C8E* OUI:D49CF4* ID_OUI_FROM_DATABASE=Palo Alto Networks +OUI:D49E05* + ID_OUI_FROM_DATABASE=zte corporation + OUI:D49E6D* ID_OUI_FROM_DATABASE=Wuhan Zhongyuan Huadian Science & Technology Co., @@ -80099,6 +80762,9 @@ OUI:D4F786* OUI:D4F9A1* ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD +OUI:D4FC13* + ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD + OUI:D8004D* ID_OUI_FROM_DATABASE=Apple, Inc. @@ -80171,6 +80837,9 @@ OUI:D8209F* OUI:D822F4* ID_OUI_FROM_DATABASE=Avnet Silica +OUI:D82477* + ID_OUI_FROM_DATABASE=Universal Electric Corporation + OUI:D824BD* ID_OUI_FROM_DATABASE=Cisco Systems, Inc @@ -80342,6 +81011,9 @@ OUI:D866EE* OUI:D867D9* ID_OUI_FROM_DATABASE=Cisco Systems, Inc +OUI:D868C3* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:D86960* ID_OUI_FROM_DATABASE=Steinsvik @@ -80654,6 +81326,9 @@ OUI:D8F0F2* OUI:D8F1F0* ID_OUI_FROM_DATABASE=Pepxim International Limited +OUI:D8F3DB* + ID_OUI_FROM_DATABASE=Post CH AG + OUI:D8F710* ID_OUI_FROM_DATABASE=Libre Wireless Technologies Inc. @@ -81002,6 +81677,9 @@ OUI:DC85DE* OUI:DC86D8* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:DC9914* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:DC9A8E* ID_OUI_FROM_DATABASE=Nanjing Cocomm electronics co., LTD @@ -81062,12 +81740,18 @@ OUI:DCAD9E* OUI:DCAE04* ID_OUI_FROM_DATABASE=CELOXICA Ltd +OUI:DCAF68* + ID_OUI_FROM_DATABASE=WEIFANG GOERTEK ELECTRONICS CO.,LTD + OUI:DCB058* ID_OUI_FROM_DATABASE=Bürkert Werke GmbH OUI:DCB3B4* ID_OUI_FROM_DATABASE=Honeywell Environmental & Combustion Controls (Tianjin) Co., Ltd. +OUI:DCB4AC* + ID_OUI_FROM_DATABASE=FLEXTRONICS MANUFACTURING(ZHUHAI)CO.,LTD. + OUI:DCB4C4* ID_OUI_FROM_DATABASE=Microsoft XCG @@ -81170,12 +81854,18 @@ OUI:DCDECA* OUI:DCE026* ID_OUI_FROM_DATABASE=Patrol Tag, Inc +OUI:DCE0EB* + ID_OUI_FROM_DATABASE=Nanjing Aozheng Information Technology Co.Ltd + OUI:DCE1AD* ID_OUI_FROM_DATABASE=Shenzhen Wintop Photoelectric Technology Co., Ltd OUI:DCE2AC* ID_OUI_FROM_DATABASE=Lumens Digital Optics Inc. +OUI:DCE305* + ID_OUI_FROM_DATABASE=ZAO NPK Rotek + OUI:DCE5330* ID_OUI_FROM_DATABASE=FLYHT Aerospace @@ -81477,7 +82167,7 @@ OUI:E05FB9* ID_OUI_FROM_DATABASE=Cisco Systems, Inc OUI:E06066* - ID_OUI_FROM_DATABASE=Sercomm Corporation + ID_OUI_FROM_DATABASE=Sercomm Corporation. OUI:E06089* ID_OUI_FROM_DATABASE=Cloudleaf, Inc. @@ -81710,6 +82400,9 @@ OUI:E0B9BA* OUI:E0B9E5* ID_OUI_FROM_DATABASE=Technicolor +OUI:E0BAB4* + ID_OUI_FROM_DATABASE=Arrcus, Inc + OUI:E0BC43* ID_OUI_FROM_DATABASE=C2 Microsystems, Inc. @@ -82319,6 +83012,9 @@ OUI:E4C801* OUI:E4C806* ID_OUI_FROM_DATABASE=Ceiec Electric Technology Inc. +OUI:E4CA12* + ID_OUI_FROM_DATABASE=zte corporation + OUI:E4CB59* ID_OUI_FROM_DATABASE=Beijing Loveair Science and Technology Co. Ltd. @@ -82361,6 +83057,9 @@ OUI:E4E409* OUI:E4E4AB* ID_OUI_FROM_DATABASE=Apple, Inc. +OUI:E4EA83* + ID_OUI_FROM_DATABASE=SHENZHEN GONGJIN ELECTRONICS CO.,LT + OUI:E4EC10* ID_OUI_FROM_DATABASE=Nokia Corporation @@ -82874,6 +83573,9 @@ OUI:E8CD2D* OUI:E8CE06* ID_OUI_FROM_DATABASE=SkyHawke Technologies, LLC. +OUI:E8D099* + ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD + OUI:E8D0FA* ID_OUI_FROM_DATABASE=MKS Instruments Deutschland GmbH @@ -83270,6 +83972,9 @@ OUI:EC8A4C* OUI:EC8AC7* ID_OUI_FROM_DATABASE=Fiberhome Telecommunication Technologies Co.,LTD +OUI:EC8C9A* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:EC8CA2* ID_OUI_FROM_DATABASE=Ruckus Wireless @@ -83792,6 +84497,9 @@ OUI:F045DA* OUI:F04A2B* ID_OUI_FROM_DATABASE=PYRAMID Computer GmbH +OUI:F04B3A* + ID_OUI_FROM_DATABASE=Juniper Networks + OUI:F04B6A* ID_OUI_FROM_DATABASE=Scientific Production Association Siberian Arsenal, Ltd. @@ -84686,6 +85394,9 @@ OUI:F4BC97* OUI:F4BD7C* ID_OUI_FROM_DATABASE=Chengdu jinshi communication Co., LTD +OUI:F4BF80* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:F4C248* ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd @@ -84801,7 +85512,7 @@ OUI:F4ED5F* ID_OUI_FROM_DATABASE=SHENZHEN KTC TECHNOLOGY GROUP OUI:F4EE14* - ID_OUI_FROM_DATABASE=SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + ID_OUI_FROM_DATABASE=MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. OUI:F4EF9E* ID_OUI_FROM_DATABASE=SGSG SCIENCE & TECHNOLOGY CO. LTD @@ -85037,6 +85748,9 @@ OUI:F82BC8* OUI:F82C18* ID_OUI_FROM_DATABASE=2Wire Inc +OUI:F82DC0* + ID_OUI_FROM_DATABASE=ARRIS Group, Inc. + OUI:F82EDB* ID_OUI_FROM_DATABASE=RTW GmbH & Co. KG @@ -85143,7 +85857,7 @@ OUI:F85C45* ID_OUI_FROM_DATABASE=IC Nexus Co. Ltd. OUI:F85C4D* - ID_OUI_FROM_DATABASE=NOKIA + ID_OUI_FROM_DATABASE=Nokia OUI:F85F2A* ID_OUI_FROM_DATABASE=Nokia Corporation @@ -85466,6 +86180,9 @@ OUI:F8C372* OUI:F8C397* ID_OUI_FROM_DATABASE=NZXT Corp. Ltd. +OUI:F8C39E* + ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD + OUI:F8C678* ID_OUI_FROM_DATABASE=Carefusion @@ -85859,6 +86576,9 @@ OUI:FC683E* OUI:FC6947* ID_OUI_FROM_DATABASE=Texas Instruments +OUI:FC6BF0* + ID_OUI_FROM_DATABASE=TOPWELL INTERNATIONAL HOLDINDS LIMITED + OUI:FC6C31* ID_OUI_FROM_DATABASE=LXinstruments GmbH @@ -85952,6 +86672,9 @@ OUI:FCA22A* OUI:FCA386* ID_OUI_FROM_DATABASE=SHENZHEN CHUANGWEI-RGB ELECTRONICS CO.,LTD +OUI:FCA621* + ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd + OUI:FCA667* ID_OUI_FROM_DATABASE=Amazon Technologies Inc. diff --git a/hwdb/20-acpi-vendor.hwdb.patch b/hwdb/20-acpi-vendor.hwdb.patch index e91e9eca1..f344b4824 100644 --- a/hwdb/20-acpi-vendor.hwdb.patch +++ b/hwdb/20-acpi-vendor.hwdb.patch @@ -1,5 +1,5 @@ ---- 20-acpi-vendor.hwdb.base 2018-01-25 13:07:40.178983802 +0100 -+++ 20-acpi-vendor.hwdb 2018-01-25 13:07:40.183983802 +0100 +--- 20-acpi-vendor.hwdb.base 2018-03-02 11:56:07.871144120 +0100 ++++ 20-acpi-vendor.hwdb 2018-03-02 11:56:07.886144208 +0100 @@ -3,6 +3,8 @@ # Data imported from: # http://www.uefi.org/uefi-pnp-export diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb index 3d8ddf1f3..5b2a494e2 100644 --- a/hwdb/20-pci-vendor-model.hwdb +++ b/hwdb/20-pci-vendor-model.hwdb @@ -665,6 +665,9 @@ pci:v00001000d00000014sv00001D49sd00000602* pci:v00001000d00000014sv00001D49sd00000604* ID_MODEL_FROM_DATABASE=MegaRAID Tri-Mode SAS3516 (ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter) +pci:v00001000d00000014sv00001D49sd00000607* + ID_MODEL_FROM_DATABASE=MegaRAID Tri-Mode SAS3516 (ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter) + pci:v00001000d00000014sv00008086sd0000352D* ID_MODEL_FROM_DATABASE=MegaRAID Tri-Mode SAS3516 (Integrated RAID Module RMSP3AD160F) @@ -2163,7 +2166,13 @@ pci:v00001002d0000131D* ID_MODEL_FROM_DATABASE=Kaveri [Radeon R6 Graphics] pci:v00001002d000015DD* - ID_MODEL_FROM_DATABASE=Vega [Radeon Vega 8 Mobile] + ID_MODEL_FROM_DATABASE=Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] + +pci:v00001002d000015DDsv0000103Csd000083C6* + ID_MODEL_FROM_DATABASE=Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] (Radeon Vega 8 Mobile) + +pci:v00001002d000015DDsv00001458sd0000D000* + ID_MODEL_FROM_DATABASE=Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] (Radeon RX Vega 11) pci:v00001002d000015FF* ID_MODEL_FROM_DATABASE=Vega [Radeon Vega 28 Mobile] @@ -2262,7 +2271,7 @@ pci:v00001002d00004151sv00001043sd0000C004* ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600 Series] (A9600SE) pci:v00001002d00004151sv0000174Bsd00007C37* - ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600 Series] (Radeon 9600 SE) + ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600 Series] (Radeon 9600SE 128M DDR V/D/VO) pci:v00001002d00004152* ID_MODEL_FROM_DATABASE=RV360 [Radeon 9600/X1050 Series] @@ -2352,7 +2361,7 @@ pci:v00001002d00004171sv00001043sd0000C005* ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600] (Secondary) (A9600SE (Secondary)) pci:v00001002d00004171sv0000174Bsd00007C36* - ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600] (Secondary) (Radeon 9600 SE (secondary)) + ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600] (Secondary) (Radeon 9600SE 128M DDR V/D/VO (secondary)) pci:v00001002d00004172* ID_MODEL_FROM_DATABASE=RV350 [Radeon 9600/X1050 Series] (Secondary) @@ -2672,6 +2681,9 @@ pci:v00001002d00004383sv00001043sd00008410* pci:v00001002d00004383sv00001043sd0000841B* ID_MODEL_FROM_DATABASE=SBx00 Azalia (Intel HDA) (M5A88-V EVO) +pci:v00001002d00004383sv00001043sd00008445* + ID_MODEL_FROM_DATABASE=SBx00 Azalia (Intel HDA) (M5A78L LE) + pci:v00001002d00004383sv0000105Bsd00000E13* ID_MODEL_FROM_DATABASE=SBx00 Azalia (Intel HDA) (N15235/A74MX mainboard / AMD SB700) @@ -4698,19 +4710,25 @@ pci:v00001002d00006603* ID_MODEL_FROM_DATABASE=Mars pci:v00001002d00006604* - ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265] + ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265/M365X/M465] pci:v00001002d00006604sv0000103Csd00008006* - ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265] (FirePro M4170) + ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265/M365X/M465] (FirePro M4170) + +pci:v00001002d00006604sv0000103Csd0000814F* + ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265/M365X/M465] (Litho XT [Radeon R7 M365X]) + +pci:v00001002d00006604sv0000103Csd000082AA* + ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265/M365X/M465] (Litho XT [Radeon R7 M465]) pci:v00001002d00006604sv000017AAsd00003643* - ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265] (Radeon R7 A360) + ID_MODEL_FROM_DATABASE=Opal XT [Radeon R7 M265/M365X/M465] (Radeon R7 A360) pci:v00001002d00006605* - ID_MODEL_FROM_DATABASE=Opal PRO [Radeon R7 M260] + ID_MODEL_FROM_DATABASE=Opal PRO [Radeon R7 M260X] pci:v00001002d00006605sv0000103Csd00002259* - ID_MODEL_FROM_DATABASE=Opal PRO [Radeon R7 M260] (FirePro M4150) + ID_MODEL_FROM_DATABASE=Opal PRO [Radeon R7 M260X] (FirePro M4150) pci:v00001002d00006606* ID_MODEL_FROM_DATABASE=Mars XTX [Radeon HD 8790M] @@ -4724,6 +4742,9 @@ pci:v00001002d00006607* pci:v00001002d00006608* ID_MODEL_FROM_DATABASE=Oland GL [FirePro W2100] +pci:v00001002d00006608sv000013CCsd00003D28* + ID_MODEL_FROM_DATABASE=Oland GL [FirePro W2100] (MXRT-2600) + pci:v00001002d00006610* ID_MODEL_FROM_DATABASE=Oland XT [Radeon HD 8670 / R7 250/350] @@ -4820,6 +4841,9 @@ pci:v00001002d00006649sv0000103Csd00000B0C* pci:v00001002d00006649sv0000103Csd0000230C* ID_MODEL_FROM_DATABASE=Bonaire [FirePro W5100] (FirePro W5100) +pci:v00001002d00006649sv000013CCsd00003D2A* + ID_MODEL_FROM_DATABASE=Bonaire [FirePro W5100] (MXRT-5600) + pci:v00001002d00006650* ID_MODEL_FROM_DATABASE=Bonaire @@ -4916,6 +4940,9 @@ pci:v00001002d00006660sv0000103Csd00008136* pci:v00001002d00006660sv0000103Csd00008329* ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (Radeon R7 M520) +pci:v00001002d00006660sv000017AAsd00003633* + ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (Radeon R5 A330) + pci:v00001002d00006660sv000017AAsd00003804* ID_MODEL_FROM_DATABASE=Sun XT [Radeon HD 8670A/8670M/8690M / R5 M330 / M430 / R7 M520] (Radeon R5 M330) @@ -5522,9 +5549,18 @@ pci:v00001002d00006743* pci:v00001002d00006749* ID_MODEL_FROM_DATABASE=Turks GL [FirePro V4900] +pci:v00001002d00006749sv000015C3sd00002B06* + ID_MODEL_FROM_DATABASE=Turks GL [FirePro V4900] (MED-X4900) + pci:v00001002d0000674A* ID_MODEL_FROM_DATABASE=Turks GL [FirePro V3900] +pci:v00001002d0000674Asv000013CCsd00003D22* + ID_MODEL_FROM_DATABASE=Turks GL [FirePro V3900] (MXRT-2500) + +pci:v00001002d0000674Asv000015C3sd00000106* + ID_MODEL_FROM_DATABASE=Turks GL [FirePro V3900] (MED-X3900) + pci:v00001002d00006750* ID_MODEL_FROM_DATABASE=Onega [Radeon HD 6650A/7650A] @@ -6461,6 +6497,12 @@ pci:v00001002d00006798sv00001043sd00003006* pci:v00001002d00006798sv00001043sd00009999* ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (ARES II) +pci:v00001002d00006798sv0000106Bsd00000127* + ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (FirePro D700) + +pci:v00001002d00006798sv0000106Bsd00000128* + ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (FirePro D700) + pci:v00001002d00006798sv00001092sd00003000* ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XT2 [Radeon HD 7970 GHz Edition]) @@ -6471,7 +6513,7 @@ pci:v00001002d00006798sv00001458sd00003001* ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XTL [Radeon R9 280X OC]) pci:v00001002d00006798sv00001462sd00002774* - ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (MSI R7970 TF 3GD5/OC BE) + ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (HD 7970 TwinFrozr III Boost Edition OC) pci:v00001002d00006798sv00001682sd00003001* ID_MODEL_FROM_DATABASE=Tahiti XT [Radeon HD 7970/8970 OEM / R9 280X] (Tahiti XTL [Radeon R9 280X]) @@ -6527,6 +6569,12 @@ pci:v00001002d0000679Bsv0000148Csd00008990* pci:v00001002d0000679E* ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT] +pci:v00001002d0000679Esv0000106Bsd00000125* + ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT] (FirePro D500) + +pci:v00001002d0000679Esv0000106Bsd00000126* + ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT] (FirePro D500) + pci:v00001002d0000679Esv00001787sd00002328* ID_MODEL_FROM_DATABASE=Tahiti LE [Radeon HD 7870 XT] (Radeon HD 7870 Black Edition 2 GB GDDR5 [2GBD5-2DHV3E]) @@ -6690,7 +6738,7 @@ pci:v00001002d000067BE* ID_MODEL_FROM_DATABASE=Hawaii LE pci:v00001002d000067C0* - ID_MODEL_FROM_DATABASE=Ellesmere [Radeon Pro WX 7100] + ID_MODEL_FROM_DATABASE=Ellesmere [Radeon Pro WX 7100 Mobile] pci:v00001002d000067C2* ID_MODEL_FROM_DATABASE=Ellesmere [Radeon Pro V7300X / V7350x2] @@ -6780,7 +6828,13 @@ pci:v00001002d000067DFsv00001DA2sd0000E366* ID_MODEL_FROM_DATABASE=Ellesmere [Radeon RX 470/480/570/580] (Nitro+ Radeon RX 580 4GB) pci:v00001002d000067E0* - ID_MODEL_FROM_DATABASE=Baffin [Polaris11] + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4170] + +pci:v00001002d000067E0sv0000103Csd00008270* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4170] (Radeon Pro WX 4170) + +pci:v00001002d000067E0sv0000103Csd00008272* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4170] (Radeon Pro WX 4170) pci:v00001002d000067E1* ID_MODEL_FROM_DATABASE=Baffin [Polaris11] @@ -6789,7 +6843,31 @@ pci:v00001002d000067E3* ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4100] pci:v00001002d000067E8* - ID_MODEL_FROM_DATABASE=Baffin [Polaris11] + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] + +pci:v00001002d000067E8sv00001028sd0000075D* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4150) + +pci:v00001002d000067E8sv00001028sd000007B0* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4130/4150) + +pci:v00001002d000067E8sv00001028sd000007B1* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4130) + +pci:v00001002d000067E8sv00001028sd0000175D* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4150) + +pci:v00001002d000067E8sv00001028sd000017B0* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4130/4150) + +pci:v00001002d000067E8sv00001028sd000017B1* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4130) + +pci:v00001002d000067E8sv0000103Csd00008275* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4150) + +pci:v00001002d000067E8sv0000103Csd00008277* + ID_MODEL_FROM_DATABASE=Baffin [Radeon Pro WX 4130/4150] (Radeon Pro WX 4150) pci:v00001002d000067E9* ID_MODEL_FROM_DATABASE=Baffin [Polaris11] @@ -6819,7 +6897,28 @@ pci:v00001002d000067EFsv00001682sd0000956D* ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 460/560D / Pro 450/455/460/560] (Polaris 21 XL [Radeon RX 560D]) pci:v00001002d000067FF* - ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 560] + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] + +pci:v00001002d000067FFsv00001002sd00000B04* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv00001043sd000004BC* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv00001458sd000022ED* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv0000148Csd00002381* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv00001682sd00009560* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv00001DA2sd0000E348* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 560) + +pci:v00001002d000067FFsv00001DA2sd0000E367* + ID_MODEL_FROM_DATABASE=Baffin [Radeon RX 550 640SP / RX 560] (Radeon RX 550 640SP) pci:v00001002d00006800* ID_MODEL_FROM_DATABASE=Wimbledon XT [Radeon HD 7970M] @@ -6863,12 +6962,36 @@ pci:v00001002d00006808sv00001002sd00000310* pci:v00001002d00006808sv00001002sd00000420* ID_MODEL_FROM_DATABASE=Pitcairn XT GL [FirePro W7000] (Radeon Sky 500) +pci:v00001002d00006808sv0000103Csd0000030C* + ID_MODEL_FROM_DATABASE=Pitcairn XT GL [FirePro W7000] (MED-X7000) + +pci:v00001002d00006808sv000013CCsd00003D25* + ID_MODEL_FROM_DATABASE=Pitcairn XT GL [FirePro W7000] (MXRT-7500) + +pci:v00001002d00006808sv000015C3sd0000030C* + ID_MODEL_FROM_DATABASE=Pitcairn XT GL [FirePro W7000] (MED-X7000) + pci:v00001002d00006809* ID_MODEL_FROM_DATABASE=Pitcairn LE GL [FirePro W5000] +pci:v00001002d00006809sv000013CCsd00003D23* + ID_MODEL_FROM_DATABASE=Pitcairn LE GL [FirePro W5000] (MXRT-5500) + +pci:v00001002d00006809sv000013CCsd00003D24* + ID_MODEL_FROM_DATABASE=Pitcairn LE GL [FirePro W5000] (MXRT-5550) + +pci:v00001002d00006809sv000015C3sd00000B06* + ID_MODEL_FROM_DATABASE=Pitcairn LE GL [FirePro W5000] (MED-X5000) + pci:v00001002d00006810* ID_MODEL_FROM_DATABASE=Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] +pci:v00001002d00006810sv0000106Bsd0000012A* + ID_MODEL_FROM_DATABASE=Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] (FirePro D300) + +pci:v00001002d00006810sv0000106Bsd0000012B* + ID_MODEL_FROM_DATABASE=Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] (FirePro D300) + pci:v00001002d00006810sv0000148Csd00000908* ID_MODEL_FROM_DATABASE=Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] (Radeon R9 370 OEM) @@ -7004,6 +7127,9 @@ pci:v00001002d00006827* pci:v00001002d00006828* ID_MODEL_FROM_DATABASE=Cape Verde PRO [FirePro W600] +pci:v00001002d00006828sv000015C3sd00002B1E* + ID_MODEL_FROM_DATABASE=Cape Verde PRO [FirePro W600] (MED-X6000) + pci:v00001002d00006829* ID_MODEL_FROM_DATABASE=Cape Verde @@ -7028,12 +7154,6 @@ pci:v00001002d0000682F* pci:v00001002d0000682Fsv0000103Csd00001851* ID_MODEL_FROM_DATABASE=Chelsea LP [Radeon HD 7730M] (Radeon HD 7750M) -pci:v00001002d00006830* - ID_MODEL_FROM_DATABASE=Cape Verde [Radeon HD 7800M Series] - -pci:v00001002d00006831* - ID_MODEL_FROM_DATABASE=Cape Verde [AMD Radeon HD 7700M Series] - pci:v00001002d00006835* ID_MODEL_FROM_DATABASE=Cape Verde PRX [Radeon R9 255 OEM] @@ -7418,6 +7538,9 @@ pci:v00001002d00006843* pci:v00001002d00006860* ID_MODEL_FROM_DATABASE=Vega 10 [Radeon Instinct MI25] +pci:v00001002d00006860sv0000106Bsd0000017C* + ID_MODEL_FROM_DATABASE=Vega 10 [Radeon Instinct MI25] (Radeon Pro Vega 64) + pci:v00001002d00006861* ID_MODEL_FROM_DATABASE=Vega 10 XT [Radeon PRO WX 9100] @@ -7431,7 +7554,7 @@ pci:v00001002d00006864* ID_MODEL_FROM_DATABASE=Vega pci:v00001002d00006867* - ID_MODEL_FROM_DATABASE=Vega + ID_MODEL_FROM_DATABASE=Vega 10 XL [Radeon Pro Vega 56] pci:v00001002d00006868* ID_MODEL_FROM_DATABASE=Vega @@ -7451,6 +7574,9 @@ pci:v00001002d00006889* pci:v00001002d00006889sv00001002sd00000301* ID_MODEL_FROM_DATABASE=Cypress PRO [FirePro V7800] (FirePro V7800P) +pci:v00001002d00006889sv000013CCsd00003D1F* + ID_MODEL_FROM_DATABASE=Cypress PRO [FirePro V7800] (MXRT-7400) + pci:v00001002d0000688A* ID_MODEL_FROM_DATABASE=Cypress XT [FirePro V9800] @@ -7586,6 +7712,12 @@ pci:v00001002d000068A8sv0000144Dsd0000C0AD* pci:v00001002d000068A9* ID_MODEL_FROM_DATABASE=Juniper XT [FirePro V5800] +pci:v00001002d000068A9sv000013CCsd00003D1E* + ID_MODEL_FROM_DATABASE=Juniper XT [FirePro V5800] (MXRT-5400) + +pci:v00001002d000068A9sv000013CCsd00003D20* + ID_MODEL_FROM_DATABASE=Juniper XT [FirePro V5800] (MXRT-5450) + pci:v00001002d000068B8* ID_MODEL_FROM_DATABASE=Juniper XT [Radeon HD 5770] @@ -8069,6 +8201,9 @@ pci:v00001002d000068C8* pci:v00001002d000068C9* ID_MODEL_FROM_DATABASE=Redwood PRO GL [FirePro V3800] +pci:v00001002d000068C9sv000013CCsd00003D1D* + ID_MODEL_FROM_DATABASE=Redwood PRO GL [FirePro V3800] (MXRT-2400) + pci:v00001002d000068D8* ID_MODEL_FROM_DATABASE=Redwood XT [Radeon HD 5670/5690/5730] @@ -8852,6 +8987,9 @@ pci:v00001002d00006900sv0000103Csd000022C6* pci:v00001002d00006900sv0000103Csd000022C8* ID_MODEL_FROM_DATABASE=Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] (Radeon R7 M260) +pci:v00001002d00006900sv0000103Csd00002B45* + ID_MODEL_FROM_DATABASE=Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] (Radeon R7 A360) + pci:v00001002d00006900sv0000103Csd0000808C* ID_MODEL_FROM_DATABASE=Topaz XT [Radeon R7 M260/M265 / M340/M360 / M440/M445] (Radeon R7 M260) @@ -8915,6 +9053,9 @@ pci:v00001002d00006929* pci:v00001002d0000692B* ID_MODEL_FROM_DATABASE=Tonga PRO GL [FirePro W7100] +pci:v00001002d0000692Bsv000013CCsd00003D2B* + ID_MODEL_FROM_DATABASE=Tonga PRO GL [FirePro W7100] (MXRT-7600) + pci:v00001002d0000692F* ID_MODEL_FROM_DATABASE=Tonga XTV GL [FirePro S7150V] @@ -8955,7 +9096,10 @@ pci:v00001002d00006939sv0000174Bsd0000E308* ID_MODEL_FROM_DATABASE=Tonga PRO [Radeon R9 285/380] (Radeon R9 380 Nitro 4G D5) pci:v00001002d0000694C* - ID_MODEL_FROM_DATABASE=Vega [Radeon RX Vega M] + ID_MODEL_FROM_DATABASE=Polaris 22 [Radeon RX Vega M GH] + +pci:v00001002d0000694E* + ID_MODEL_FROM_DATABASE=Polaris 22 [Radeon RX Vega M GL] pci:v00001002d00006980* ID_MODEL_FROM_DATABASE=Polaris12 @@ -9002,6 +9146,9 @@ pci:v00001002d00007102* pci:v00001002d00007104* ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7200] +pci:v00001002d00007104sv000013CCsd00003D0A* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7200] (MXRT-5100) + pci:v00001002d00007109* ID_MODEL_FROM_DATABASE=R520 [Radeon X1800 XL] @@ -9020,12 +9167,27 @@ pci:v00001002d0000710Asv00001002sd00000B12* pci:v00001002d0000710B* ID_MODEL_FROM_DATABASE=R520 [Radeon X1800 GTO] +pci:v00001002d0000710E* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7300] + +pci:v00001002d0000710Esv000013CCsd00003D0C* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7300] (MXRT-5150) + +pci:v00001002d0000710F* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7350] + +pci:v00001002d0000710Fsv000013CCsd00003D0E* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7350] (MXRT-7100) + pci:v00001002d00007120* ID_MODEL_FROM_DATABASE=R520 [Radeon X1800] (Secondary) pci:v00001002d00007124* ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7200] (Secondary) +pci:v00001002d00007124sv000013CCsd00003D0B* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7200] (Secondary) (MXRT-5100 (Secondary)) + pci:v00001002d00007129* ID_MODEL_FROM_DATABASE=R520 [Radeon X1800] (Secondary) @@ -9035,6 +9197,18 @@ pci:v00001002d00007129sv00001002sd00000323* pci:v00001002d00007129sv00001002sd00000D03* ID_MODEL_FROM_DATABASE=R520 [Radeon X1800] (Secondary) (Radeon X1800 CrossFire Edition (Secondary)) +pci:v00001002d0000712E* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7300] (Secondary) + +pci:v00001002d0000712Esv000013CCsd00003D0D* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7300] (Secondary) (MXRT-5150 (Secondary)) + +pci:v00001002d0000712F* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7350] (Secondary) + +pci:v00001002d0000712Fsv000013CCsd00003D0F* + ID_MODEL_FROM_DATABASE=R520 GL [FireGL V7350] (Secondary) (MXRT-7100 (Secondary)) + pci:v00001002d00007140* ID_MODEL_FROM_DATABASE=RV515 [Radeon X1300/X1550/X1600 Series] @@ -9152,6 +9326,12 @@ pci:v00001002d00007196* pci:v00001002d0000719B* ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] +pci:v00001002d0000719Bsv000013CCsd00003D12* + ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] (MXRT-1150) + +pci:v00001002d0000719Bsv000013CCsd00003D14* + ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] (MXRT-2150) + pci:v00001002d0000719F* ID_MODEL_FROM_DATABASE=RV516 [Radeon X1550 Series] @@ -9170,6 +9350,12 @@ pci:v00001002d000071A7* pci:v00001002d000071BB* ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] (Secondary) +pci:v00001002d000071BBsv000013CCsd00003D13* + ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] (Secondary) (MXRT-1150 (Secondary)) + +pci:v00001002d000071BBsv000013CCsd00003D15* + ID_MODEL_FROM_DATABASE=RV516 GL [FireMV 2250] (Secondary) (MXRT-2150 (Secondary)) + pci:v00001002d000071C0* ID_MODEL_FROM_DATABASE=RV530 [Radeon X1600 XT/X1650 GTO] @@ -9224,6 +9410,9 @@ pci:v00001002d000071CE* pci:v00001002d000071D2* ID_MODEL_FROM_DATABASE=RV530 GL [FireGL V3400] +pci:v00001002d000071D2sv000013CCsd00003D08* + ID_MODEL_FROM_DATABASE=RV530 GL [FireGL V3400] (MXRT-2100) + pci:v00001002d000071D4* ID_MODEL_FROM_DATABASE=RV530/M66 GL [Mobility FireGL V5250] @@ -9263,6 +9452,9 @@ pci:v00001002d000071E7sv00001787sd00003001* pci:v00001002d000071F2* ID_MODEL_FROM_DATABASE=RV530 GL [FireGL V3400] (Secondary) +pci:v00001002d000071F2sv000013CCsd00003D09* + ID_MODEL_FROM_DATABASE=RV530 GL [FireGL V3400] (Secondary) (MXRT-2100 (Secondary)) + pci:v00001002d00007210* ID_MODEL_FROM_DATABASE=RV550/M71 [Mobility Radeon HD 2300] @@ -9491,6 +9683,9 @@ pci:v00001002d00009405* pci:v00001002d0000940A* ID_MODEL_FROM_DATABASE=R600 GL [FireGL V8650] +pci:v00001002d0000940Asv000013CCsd00003D16* + ID_MODEL_FROM_DATABASE=R600 GL [FireGL V8650] (MXRT-7200) + pci:v00001002d0000940B* ID_MODEL_FROM_DATABASE=R600 GL [FireGL V8600] @@ -9602,6 +9797,9 @@ pci:v00001002d00009498* pci:v00001002d0000949C* ID_MODEL_FROM_DATABASE=RV730 GL [FirePro V7750] +pci:v00001002d0000949Csv000013CCsd00003D1B* + ID_MODEL_FROM_DATABASE=RV730 GL [FirePro V7750] (MXRT-7300) + pci:v00001002d0000949E* ID_MODEL_FROM_DATABASE=RV730 GL [FirePro V5700] @@ -9845,6 +10043,9 @@ pci:v00001002d0000958B* pci:v00001002d0000958C* ID_MODEL_FROM_DATABASE=RV630 GL [FireGL V5600] +pci:v00001002d0000958Csv000013CCsd00003D18* + ID_MODEL_FROM_DATABASE=RV630 GL [FireGL V5600] (MXRT-5200) + pci:v00001002d0000958D* ID_MODEL_FROM_DATABASE=RV630 GL [FireGL V3600] @@ -9887,6 +10088,9 @@ pci:v00001002d00009598sv0000174Bsd00003001* pci:v00001002d00009598sv0000174Bsd00004580* ID_MODEL_FROM_DATABASE=RV635 [Radeon HD 3650/3750/4570/4580] (RV635 PRO [Radeon HD 4580]) +pci:v00001002d00009598sv000017AFsd00003011* + ID_MODEL_FROM_DATABASE=RV635 [Radeon HD 3650/3750/4570/4580] (RV635 PRO [Radeon HD 4580]) + pci:v00001002d00009599* ID_MODEL_FROM_DATABASE=RV635 PRO [Radeon HD 3650 AGP] @@ -9921,7 +10125,7 @@ pci:v00001002d000095CC* ID_MODEL_FROM_DATABASE=RV620 GL [FirePro V3700] pci:v00001002d000095CD* - ID_MODEL_FROM_DATABASE=RV620 [FirePro 2450] + ID_MODEL_FROM_DATABASE=RV620 GL [FirePro 2450] pci:v00001002d000095CF* ID_MODEL_FROM_DATABASE=RV620 GL [FirePro 2260] @@ -10146,7 +10350,43 @@ pci:v00001002d0000985F* ID_MODEL_FROM_DATABASE=Mullins pci:v00001002d00009874* - ID_MODEL_FROM_DATABASE=Carrizo + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] + +pci:v00001002d00009874sv00001002sd00001871* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R5 Graphics) + +pci:v00001002d00009874sv00001002sd00001E20* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R7 Graphics) + +pci:v00001002d00009874sv00001028sd000006BD* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R6 Graphics) + +pci:v00001002d00009874sv0000103Csd00002B44* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R6 Graphics) + +pci:v00001002d00009874sv0000103Csd00008221* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R5 Graphics) + +pci:v00001002d00009874sv0000103Csd00008223* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R5 Graphics) + +pci:v00001002d00009874sv0000103Csd00008238* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R7 Graphics) + +pci:v00001002d00009874sv0000103Csd00008353* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R7 Graphics) + +pci:v00001002d00009874sv00001458sd0000D000* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R7 Graphics) + +pci:v00001002d00009874sv000017AAsd00005113* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R6 Graphics) + +pci:v00001002d00009874sv000017AAsd00005116* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R6 Graphics) + +pci:v00001002d00009874sv000017AAsd00005118* + ID_MODEL_FROM_DATABASE=Wani [Radeon R5/R6/R7 Graphics] (Radeon R5 Graphics) pci:v00001002d00009900* ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7660G] @@ -10179,10 +10419,10 @@ pci:v00001002d00009904* ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7560D] pci:v00001002d00009905* - ID_MODEL_FROM_DATABASE=Trinity [FirePro A300 Series Graphics] + ID_MODEL_FROM_DATABASE=Trinity GL [FirePro A300] pci:v00001002d00009906* - ID_MODEL_FROM_DATABASE=Trinity [FirePro A300 Series Graphics] + ID_MODEL_FROM_DATABASE=Trinity GL [FirePro A320] pci:v00001002d00009907* ID_MODEL_FROM_DATABASE=Trinity [Radeon HD 7620G] @@ -12072,7 +12312,7 @@ pci:v00001022d00001465* ID_MODEL_FROM_DATABASE=Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 pci:v00001022d00001466* - ID_MODEL_FROM_DATABASE=Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 + ID_MODEL_FROM_DATABASE=Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 pci:v00001022d00001467* ID_MODEL_FROM_DATABASE=Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 @@ -12122,6 +12362,39 @@ pci:v00001022d00001536* pci:v00001022d00001538* ID_MODEL_FROM_DATABASE=Family 16h Processor Function 0 +pci:v00001022d00001570* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 0 + +pci:v00001022d00001571* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 1 + +pci:v00001022d00001572* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 2 + +pci:v00001022d00001573* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 3 + +pci:v00001022d00001574* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 4 + +pci:v00001022d00001575* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Function 5 + +pci:v00001022d00001576* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Root Complex + +pci:v00001022d00001577* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) I/O Memory Management Unit + +pci:v00001022d0000157A* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Audio Controller + +pci:v00001022d0000157B* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Host Bridge + +pci:v00001022d0000157C* + ID_MODEL_FROM_DATABASE=Family 15h (Models 60h-6fh) Processor Root Port + pci:v00001022d00001600* ID_MODEL_FROM_DATABASE=Family 15h Processor Function 0 @@ -12329,12 +12602,21 @@ pci:v00001022d000043A2* pci:v00001022d000043A3* ID_MODEL_FROM_DATABASE=Hudson PCI to PCI bridge (PCIE port 3) +pci:v00001022d000043B1* + ID_MODEL_FROM_DATABASE=X399 Series Chipset PCIe Bridge + pci:v00001022d000043B4* ID_MODEL_FROM_DATABASE=300 Series Chipset PCIe Port +pci:v00001022d000043B6* + ID_MODEL_FROM_DATABASE=X399 Series Chipset SATA Controller + pci:v00001022d000043B7* ID_MODEL_FROM_DATABASE=300 Series Chipset SATA Controller +pci:v00001022d000043BA* + ID_MODEL_FROM_DATABASE=X399 Series Chipset USB 3.1 xHCI Controller + pci:v00001022d000043BB* ID_MODEL_FROM_DATABASE=300 Series Chipset USB 3.1 xHCI Controller @@ -13692,10 +13974,10 @@ pci:v0000102Bd00000536* ID_MODEL_FROM_DATABASE=Integrated Matrox G200eW3 Graphics Controller pci:v0000102Bd00000538* - ID_MODEL_FROM_DATABASE=G200eH + ID_MODEL_FROM_DATABASE=MGA G200eH3 pci:v0000102Bd00000538sv00001590sd000000E4* - ID_MODEL_FROM_DATABASE=G200eH (iLO5 VGA) + ID_MODEL_FROM_DATABASE=MGA G200eH3 (iLO5 VGA) pci:v0000102Bd00000540* ID_MODEL_FROM_DATABASE=M91XX @@ -15735,7 +16017,7 @@ pci:v00001045d0000C832* ID_MODEL_FROM_DATABASE=82C832 pci:v00001045d0000C861* - ID_MODEL_FROM_DATABASE=82C861 + ID_MODEL_FROM_DATABASE=82C861 OHCI USB Host pci:v00001045d0000C881* ID_MODEL_FROM_DATABASE=82C881 [FireLink] 1394 OHCI Link Controller @@ -27575,6 +27857,9 @@ pci:v000010DEd00000425* pci:v000010DEd00000425sv00001025sd00000121* ID_MODEL_FROM_DATABASE=G86M [GeForce 8600M GS] (Aspire 5920G) +pci:v000010DEd00000425sv00001043sd00001514* + ID_MODEL_FROM_DATABASE=G86M [GeForce 8600M GS] (F3SV) + pci:v000010DEd00000426* ID_MODEL_FROM_DATABASE=G86M [GeForce 8400M GT] @@ -28088,6 +28373,9 @@ pci:v000010DEd00000611* pci:v000010DEd00000611sv0000107Dsd00002AB0* ID_MODEL_FROM_DATABASE=G92 [GeForce 8800 GT] (Winfast PX8800 GT PCI-E) +pci:v000010DEd00000611sv00001462sd00001170* + ID_MODEL_FROM_DATABASE=G92 [GeForce 8800 GT] (NX8800GT series model V117 2xDVI+TV) + pci:v000010DEd00000611sv000019DAsd00001040* ID_MODEL_FROM_DATABASE=G92 [GeForce 8800 GT] (ZT-88TES2P-FSP) @@ -30404,12 +30692,18 @@ pci:v000010DEd0000102D* pci:v000010DEd0000102E* ID_MODEL_FROM_DATABASE=GK110BGL [Tesla K40d] +pci:v000010DEd0000102F* + ID_MODEL_FROM_DATABASE=GK110BGL [Tesla Stella Solo] + pci:v000010DEd0000103A* ID_MODEL_FROM_DATABASE=GK110GL [Quadro K6000] pci:v000010DEd0000103C* ID_MODEL_FROM_DATABASE=GK110GL [Quadro K5200] +pci:v000010DEd0000103F* + ID_MODEL_FROM_DATABASE=GK110BGL [Tesla Stella SXM] + pci:v000010DEd00001040* ID_MODEL_FROM_DATABASE=GF119 [GeForce GT 520] @@ -31763,6 +32057,9 @@ pci:v000010DEd000011A3sv0000106Bsd0000010D* pci:v000010DEd000011A7* ID_MODEL_FROM_DATABASE=GK104M [GeForce GTX 675MX] +pci:v000010DEd000011AF* + ID_MODEL_FROM_DATABASE=GK104GLM [GRID IceCube] + pci:v000010DEd000011B0* ID_MODEL_FROM_DATABASE=GK104GL [GRID K240Q\K260Q vGPU] @@ -32297,6 +32594,9 @@ pci:v000010DEd000013BDsv000010DEsd0000110A* pci:v000010DEd000013BDsv000010DEsd00001160* ID_MODEL_FROM_DATABASE=GM107GL [Tesla M10] (Tesla M10) +pci:v000010DEd000013BDsv000010DEsd000011D2* + ID_MODEL_FROM_DATABASE=GM107GL [Tesla M10] (GRID M10-8Q) + pci:v000010DEd000013C0* ID_MODEL_FROM_DATABASE=GM204 [GeForce GTX 980] @@ -32336,6 +32636,18 @@ pci:v000010DEd000013F1* pci:v000010DEd000013F2* ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60] +pci:v000010DEd000013F2sv000010DEsd0000114D* + ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60] (GRID M60-1Q) + +pci:v000010DEd000013F2sv000010DEsd0000114E* + ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60] (GRID M60-2Q) + +pci:v000010DEd000013F2sv000010DEsd00001150* + ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60] (GRID M60-8Q) + +pci:v000010DEd000013F2sv000010DEsd000011B0* + ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60] (GRID M60-4A) + pci:v000010DEd000013F3* ID_MODEL_FROM_DATABASE=GM204GL [Tesla M6] @@ -32426,6 +32738,9 @@ pci:v000010DEd0000174D* pci:v000010DEd0000174E* ID_MODEL_FROM_DATABASE=GM108M [GeForce MX110] +pci:v000010DEd00001789* + ID_MODEL_FROM_DATABASE=GM107GL [GRID M3-3020] + pci:v000010DEd000017C2* ID_MODEL_FROM_DATABASE=GM200 [GeForce GTX TITAN X] @@ -32639,6 +32954,9 @@ pci:v000010DEd00001CB2* pci:v000010DEd00001CB3* ID_MODEL_FROM_DATABASE=GP107GL [Quadro P400] +pci:v000010DEd00001CB6* + ID_MODEL_FROM_DATABASE=GP107GL [Quadro P620] + pci:v000010DEd00001D01* ID_MODEL_FROM_DATABASE=GP108 [GeForce GT 1030] @@ -32652,10 +32970,10 @@ pci:v000010DEd00001D81* ID_MODEL_FROM_DATABASE=GV100 [TITAN V] pci:v000010DEd00001DB1* - ID_MODEL_FROM_DATABASE=GV100 [Tesla V100 SXM2] + ID_MODEL_FROM_DATABASE=GV100GL [Tesla V100 SXM2] pci:v000010DEd00001DB4* - ID_MODEL_FROM_DATABASE=GV100 [Tesla V100 PCIe] + ID_MODEL_FROM_DATABASE=GV100GL [Tesla V100 PCIe] pci:v000010DF* ID_VENDOR_FROM_DATABASE=Emulex Corporation @@ -33486,7 +33804,7 @@ pci:v000010ECd00008168sv00001043sd000082C6* ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (M3A78 Series Motherboard) pci:v000010ECd00008168sv00001043sd000083A3* - ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (M4A785TD Motherboard) + ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (M4A785/P7P55 Motherboard) pci:v000010ECd00008168sv00001043sd00008432* ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (P8P67 and other motherboards) @@ -33509,6 +33827,9 @@ pci:v000010ECd00008168sv00001458sd0000E000* pci:v000010ECd00008168sv00001462sd0000238C* ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (Onboard RTL8111b on MSI P965 Platinum Mainboard) +pci:v000010ECd00008168sv00001462sd0000345C* + ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (RTL8111B on MS-7345 Motherboard) + pci:v000010ECd00008168sv00001462sd0000368C* ID_MODEL_FROM_DATABASE=RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (K9AG Neo2) @@ -33671,6 +33992,9 @@ pci:v000010ECd0000B723* pci:v000010ECd0000B723sv000010ECsd00008739* ID_MODEL_FROM_DATABASE=RTL8723BE PCIe Wireless Network Adapter (Dell Wireless 1801) +pci:v000010ECd0000B822* + ID_MODEL_FROM_DATABASE=RTL8822BE 802.11a/b/g/n/ac WiFi adapter + pci:v000010ECd0000C821* ID_MODEL_FROM_DATABASE=RTL8821CE 802.11ac PCIe Wireless Network Adapter @@ -39377,6 +39701,9 @@ pci:v00001179d00000103* pci:v00001179d0000010F* ID_MODEL_FROM_DATABASE=NVMe Controller +pci:v00001179d00000115* + ID_MODEL_FROM_DATABASE=XG4 NVMe SSD Controller + pci:v00001179d00000404* ID_MODEL_FROM_DATABASE=DVD Decoder card @@ -39473,6 +39800,96 @@ pci:v0000117Cd00000033* pci:v0000117Cd00000041* ID_MODEL_FROM_DATABASE=ExpressSAS R30F +pci:v0000117Cd00000042* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA + +pci:v0000117Cd00000042sv0000117Csd00000042* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS H680) + +pci:v0000117Cd00000042sv0000117Csd00000043* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS H608) + +pci:v0000117Cd00000042sv0000117Csd00000044* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS H60F) + +pci:v0000117Cd00000042sv0000117Csd00000045* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS H6F0) + +pci:v0000117Cd00000042sv0000117Csd00000046* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS H644) + +pci:v0000117Cd00000042sv0000117Csd0000004F* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS M608) + +pci:v0000117Cd00000042sv0000117Csd00000057* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS M680) + +pci:v0000117Cd00000042sv0000117Csd00000058* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS M644) + +pci:v0000117Cd00000042sv0000117Csd00000059* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS W608) + +pci:v0000117Cd00000042sv0000117Csd0000005A* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS W680) + +pci:v0000117Cd00000042sv0000117Csd0000005B* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb/s SAS/SATA HBA (ExpressSAS W644) + +pci:v0000117Cd00000049* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter + +pci:v0000117Cd00000049sv0000117Csd00000049* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R680) + +pci:v0000117Cd00000049sv0000117Csd0000004A* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R608) + +pci:v0000117Cd00000049sv0000117Csd0000004B* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R60F) + +pci:v0000117Cd00000049sv0000117Csd0000004C* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R6F0) + +pci:v0000117Cd00000049sv0000117Csd0000004D* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R644) + +pci:v0000117Cd00000049sv0000117Csd0000004E* + ID_MODEL_FROM_DATABASE=ExpressSAS 6Gb SAS/SATA RAID Adapter (ExpressSAS R648) + +pci:v0000117Cd00000064* + ID_MODEL_FROM_DATABASE=Celerity FC 16Gb/s Gen 5 Fibre Channel HBA + +pci:v0000117Cd00000064sv0000117Csd00000063* + ID_MODEL_FROM_DATABASE=Celerity FC 16Gb/s Gen 5 Fibre Channel HBA (Celerity FC-161E) + +pci:v0000117Cd00000064sv0000117Csd00000064* + ID_MODEL_FROM_DATABASE=Celerity FC 16Gb/s Gen 5 Fibre Channel HBA (Celerity FC-162E) + +pci:v0000117Cd00000064sv0000117Csd00000065* + ID_MODEL_FROM_DATABASE=Celerity FC 16Gb/s Gen 5 Fibre Channel HBA (Celerity FC-164E) + +pci:v0000117Cd00000094* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA + +pci:v0000117Cd00000094sv0000117Csd00000094* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-162P) + +pci:v0000117Cd00000094sv0000117Csd000000A0* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-161P) + +pci:v0000117Cd00000094sv0000117Csd000000A1* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-164P) + +pci:v0000117Cd00000094sv0000117Csd000000A2* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-321E) + +pci:v0000117Cd00000094sv0000117Csd000000A3* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-322E) + +pci:v0000117Cd00000094sv0000117Csd000000AC* + ID_MODEL_FROM_DATABASE=Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA (Celerity FC-324E) + pci:v0000117Cd00008013* ID_MODEL_FROM_DATABASE=ExpressPCI UL4D @@ -39482,6 +39899,30 @@ pci:v0000117Cd00008014* pci:v0000117Cd00008027* ID_MODEL_FROM_DATABASE=ExpressPCI UL5D +pci:v0000117Cd00008070* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA + +pci:v0000117Cd00008070sv0000117Csd00000070* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H1280) + +pci:v0000117Cd00008070sv0000117Csd00000071* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H1208) + +pci:v0000117Cd00008070sv0000117Csd00000080* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H1244) + +pci:v0000117Cd00008072* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA + +pci:v0000117Cd00008072sv0000117Csd00000072* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H12F0) + +pci:v0000117Cd00008072sv0000117Csd00000073* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H120F) + +pci:v0000117Cd00008072sv0000117Csd00000082* + ID_MODEL_FROM_DATABASE=ExpressSAS 12Gb/s SAS/SATA HBA (ExpressSAS H1288) + pci:v0000117D* ID_VENDOR_FROM_DATABASE=Becton & Dickinson @@ -39644,6 +40085,9 @@ pci:v00001180d00000592sv00001028sd000001D7* pci:v00001180d00000592sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=R5C592 Memory Stick Bus Host Adapter (Inspiron 1420) +pci:v00001180d00000592sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=R5C592 Memory Stick Bus Host Adapter (Inspiron 1525) + pci:v00001180d00000592sv0000103Csd000030B5* ID_MODEL_FROM_DATABASE=R5C592 Memory Stick Bus Host Adapter (Presario V3242AU) @@ -39695,6 +40139,9 @@ pci:v00001180d00000822sv00001028sd000001D7* pci:v00001180d00000822sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (Inspiron 1420) +pci:v00001180d00000822sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (Inspiron 1525) + pci:v00001180d00000822sv0000103Csd000003B5* ID_MODEL_FROM_DATABASE=R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter (Presario V3242AU) @@ -39743,6 +40190,9 @@ pci:v00001180d00000832sv00001028sd000001D7* pci:v00001180d00000832sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=R5C832 IEEE 1394 Controller (Inspiron 1420) +pci:v00001180d00000832sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=R5C832 IEEE 1394 Controller (Inspiron 1525) + pci:v00001180d00000832sv00001028sd0000024D* ID_MODEL_FROM_DATABASE=R5C832 IEEE 1394 Controller (Latitude E4300) @@ -39809,6 +40259,9 @@ pci:v00001180d00000852sv00001025sd00000121* pci:v00001180d00000852sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=xD-Picture Card Controller (Inspiron 1420) +pci:v00001180d00000852sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=xD-Picture Card Controller (Inspiron 1525) + pci:v00001180d00000852sv0000103Csd000030B5* ID_MODEL_FROM_DATABASE=xD-Picture Card Controller (Presario V3242AU) @@ -40556,6 +41009,9 @@ pci:v000011ABd00004353sv0000104Dsd0000902D* pci:v000011ABd00004354* ID_MODEL_FROM_DATABASE=88E8040 PCI-E Fast Ethernet Controller +pci:v000011ABd00004354sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=88E8040 PCI-E Fast Ethernet Controller (Inspiron 1525) + pci:v000011ABd00004354sv0000144Dsd0000C06A* ID_MODEL_FROM_DATABASE=88E8040 PCI-E Fast Ethernet Controller (R730 Laptop) @@ -40838,11 +41294,11 @@ pci:v000011ABd00006101* pci:v000011ABd00006101sv00001043sd000082E0* ID_MODEL_FROM_DATABASE=88SE6101/6102 single-port PATA133 interface (P5K PRO Motherboard) -pci:v000011ABd00006111* - ID_MODEL_FROM_DATABASE=88SE6111 1-port PATA133(IDE) and 1-port SATA II Controllers - pci:v000011ABd00006121* - ID_MODEL_FROM_DATABASE=88SE6121 SATA II / PATA Controller + ID_MODEL_FROM_DATABASE=88SE6111/6121 SATA II / PATA Controller + +pci:v000011ABd00006121sv000011ABsd00006121* + ID_MODEL_FROM_DATABASE=88SE6111/6121 SATA II / PATA Controller (88SE6111/6121 1/2 port SATA II + 1 port PATA Controller) pci:v000011ABd00006141* ID_MODEL_FROM_DATABASE=88SE614x SATA II PCI-E controller @@ -41807,6 +42263,9 @@ pci:v000011F8d00008009* pci:v000011F8d00008032* ID_MODEL_FROM_DATABASE=ATTO Celerity FC8xEN +pci:v000011F8d00008032sv0000117Csd0000003A* + ID_MODEL_FROM_DATABASE=ATTO Celerity FC8xEN (Celerity FC-81EN Fibre Channel Adapter) + pci:v000011F8d00008032sv0000117Csd0000003B* ID_MODEL_FROM_DATABASE=ATTO Celerity FC8xEN (Celerity FC-82EN Fibre Channel Adapter) @@ -41868,73 +42327,73 @@ pci:v000011FE* ID_VENDOR_FROM_DATABASE=Comtrol Corporation pci:v000011FEd00000001* - ID_MODEL_FROM_DATABASE=RocketPort 32 port w/external I/F + ID_MODEL_FROM_DATABASE=RocketPort PCI 32-port w/external I/F pci:v000011FEd00000002* - ID_MODEL_FROM_DATABASE=RocketPort 8 port w/external I/F + ID_MODEL_FROM_DATABASE=RocketPort PCI 8-port w/external I/F pci:v000011FEd00000003* - ID_MODEL_FROM_DATABASE=RocketPort 16 port w/external I/F + ID_MODEL_FROM_DATABASE=RocketPort PCI 16-port w/external I/F pci:v000011FEd00000004* - ID_MODEL_FROM_DATABASE=RocketPort 4 port w/quad cable + ID_MODEL_FROM_DATABASE=RocketPort PCI 4-port w/Quad Cable pci:v000011FEd00000005* - ID_MODEL_FROM_DATABASE=RocketPort 8 port w/octa cable + ID_MODEL_FROM_DATABASE=RocketPort PCI 8-port w/Octa Cable pci:v000011FEd00000006* - ID_MODEL_FROM_DATABASE=RocketPort 8 port w/RJ11 connectors + ID_MODEL_FROM_DATABASE=RocketPort PCI 8-port w/RJ11 connectors pci:v000011FEd00000007* - ID_MODEL_FROM_DATABASE=RocketPort 4 port w/RJ11 connectors + ID_MODEL_FROM_DATABASE=RocketPort PCI 4-port w/RJ45 connectors pci:v000011FEd00000008* - ID_MODEL_FROM_DATABASE=RocketPort 8 port w/ DB78 SNI (Siemens) connector + ID_MODEL_FROM_DATABASE=RocketPort PCI 8-port w/DB78 SNI connector (Siemens) pci:v000011FEd00000009* - ID_MODEL_FROM_DATABASE=RocketPort 16 port w/ DB78 SNI (Siemens) connector + ID_MODEL_FROM_DATABASE=RocketPort PCI 16-port w/DB78 SNI connector (Siemens) pci:v000011FEd0000000A* - ID_MODEL_FROM_DATABASE=RocketPort Plus 4 port + ID_MODEL_FROM_DATABASE=RocketPort PCI Plus 4-port w/Quad Cable pci:v000011FEd0000000B* - ID_MODEL_FROM_DATABASE=RocketPort Plus 8 port + ID_MODEL_FROM_DATABASE=RocketPort PCI Plus 8-port w/Octa Cable pci:v000011FEd0000000C* - ID_MODEL_FROM_DATABASE=RocketModem 6 port + ID_MODEL_FROM_DATABASE=RocketModem II 6-port pci:v000011FEd0000000D* ID_MODEL_FROM_DATABASE=RocketModem 4-port pci:v000011FEd0000000E* - ID_MODEL_FROM_DATABASE=RocketPort Plus 2 port RS232 + ID_MODEL_FROM_DATABASE=RocketPort PCI Plus 2-port RS-232 w/DB9 connectors pci:v000011FEd0000000F* - ID_MODEL_FROM_DATABASE=RocketPort Plus 2 port RS422 + ID_MODEL_FROM_DATABASE=RocketPort PCI Plus 2-port SMPTE w/DB9 connectors pci:v000011FEd00000040* - ID_MODEL_FROM_DATABASE=RocketPort Infinity Octa, 8port, RJ45 + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 8-port w/Octa Cable RJ45 pci:v000011FEd00000041* - ID_MODEL_FROM_DATABASE=RocketPort Infinity 32port, External Interface + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 32-port w/external I/F pci:v000011FEd00000042* - ID_MODEL_FROM_DATABASE=RocketPort Infinity 8port, External Interface + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 8-port w/external I/F pci:v000011FEd00000043* - ID_MODEL_FROM_DATABASE=RocketPort Infinity 16port, External Interface + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 16-port w/external I/F pci:v000011FEd00000044* - ID_MODEL_FROM_DATABASE=RocketPort Infinity Quad, 4port, DB + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 4-port w/Quad Cable DB pci:v000011FEd00000045* - ID_MODEL_FROM_DATABASE=RocketPort Infinity Octa, 8port, DB + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 8-port w/Octa Cable DB pci:v000011FEd00000046* ID_MODEL_FROM_DATABASE=RocketPort INFINITY 4-port w/external I/F pci:v000011FEd00000047* - ID_MODEL_FROM_DATABASE=RocketPort Infinity 4port, RJ45 + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 4J (4-port) w/RJ45 connectors pci:v000011FEd00000048* ID_MODEL_FROM_DATABASE=RocketPort INFINITY 4J (4-port) w/RJ45 connectors @@ -41955,7 +42414,7 @@ pci:v000011FEd0000004E* ID_MODEL_FROM_DATABASE=RocketPort INFINITY Plus 2-port pci:v000011FEd0000004F* - ID_MODEL_FROM_DATABASE=RocketPort Infinity 2port, SMPTE + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 2-port SMPTE w/DB9 connectors pci:v000011FEd00000050* ID_MODEL_FROM_DATABASE=RocketPort INFINITY Plus 4-port RJ45 @@ -41964,7 +42423,7 @@ pci:v000011FEd00000051* ID_MODEL_FROM_DATABASE=RocketPort INFINITY Plus 8-port RJ11 pci:v000011FEd00000052* - ID_MODEL_FROM_DATABASE=RocketPort Infinity Octa, 8port, SMPTE + ID_MODEL_FROM_DATABASE=RocketPort INFINITY 8-port SMPTE w/DB9 Connectors pci:v000011FEd00000060* ID_MODEL_FROM_DATABASE=RocketPort EXPRESS 8-port w/Octa Cable @@ -42018,7 +42477,7 @@ pci:v000011FEd0000080C* ID_MODEL_FROM_DATABASE=RocketModem III 8-port pci:v000011FEd0000080D* - ID_MODEL_FROM_DATABASE=RcoketModem III 4-port + ID_MODEL_FROM_DATABASE=RocketModem III 4-port pci:v000011FEd0000080E* ID_MODEL_FROM_DATABASE=RocketPort uPCI 2-port RS232 w/DB9 connectors @@ -48464,6 +48923,9 @@ pci:v00001425d00004888* pci:v00001425d00005001* ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller +pci:v00001425d00005001sv0000193Dsd00001001* + ID_MODEL_FROM_DATABASE=T520-CR Unified Wire Ethernet Controller (510F-B) + pci:v00001425d00005002* ID_MODEL_FROM_DATABASE=T522-CR Unified Wire Ethernet Controller @@ -50612,6 +51074,9 @@ pci:v000014BF* pci:v000014C0* ID_VENDOR_FROM_DATABASE=COMPAL Electronics Inc +pci:v000014C0d00001201* + ID_MODEL_FROM_DATABASE=X550 10Gb 2P RJ45 OCP Mezz + pci:v000014C1* ID_VENDOR_FROM_DATABASE=MYRICOM Inc. @@ -50924,9 +51389,24 @@ pci:v000014E4d00001600sv00001259sd00002705* pci:v000014E4d00001601* ID_MODEL_FROM_DATABASE=NetXtreme BCM5752M Gigabit Ethernet PCI Express +pci:v000014E4d00001604* + ID_MODEL_FROM_DATABASE=BCM5745X NetXtreme-E Ethernet Partition + +pci:v000014E4d00001605* + ID_MODEL_FROM_DATABASE=BCM5745X NetXtreme-E RDMA Partition + +pci:v000014E4d00001606* + ID_MODEL_FROM_DATABASE=BCM5745X NetXtreme-E RDMA Virtual Function + +pci:v000014E4d00001609* + ID_MODEL_FROM_DATABASE=BCM5745X NetXtreme-E Ethernet Virtual Function + pci:v000014E4d00001612* ID_MODEL_FROM_DATABASE=BCM70012 Video Decoder [Crystal HD] +pci:v000014E4d00001614* + ID_MODEL_FROM_DATABASE=BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet + pci:v000014E4d00001615* ID_MODEL_FROM_DATABASE=BCM70015 Video Decoder [Crystal HD] @@ -51647,6 +52127,12 @@ pci:v000014E4d0000168Esv0000103Csd00003382* pci:v000014E4d0000168Esv0000103Csd0000339D* ID_MODEL_FROM_DATABASE=NetXtreme II BCM57810 10 Gigabit Ethernet (Ethernet 10Gb 2-port 530SFP+ Adapter) +pci:v000014E4d0000168Esv0000193Dsd00001003* + ID_MODEL_FROM_DATABASE=NetXtreme II BCM57810 10 Gigabit Ethernet (530F-B) + +pci:v000014E4d0000168Esv0000193Dsd00001006* + ID_MODEL_FROM_DATABASE=NetXtreme II BCM57810 10 Gigabit Ethernet (530F-L) + pci:v000014E4d00001690* ID_MODEL_FROM_DATABASE=NetXtreme BCM57760 Gigabit Ethernet PCIe @@ -52157,6 +52643,9 @@ pci:v000014E4d000016EE* pci:v000014E4d000016EF* ID_MODEL_FROM_DATABASE=BCM57416 NetXtreme-E RDMA Partition +pci:v000014E4d000016F1* + ID_MODEL_FROM_DATABASE=BCM57452 NetXtreme-E 10Gb/25Gb/40Gb/50Gb Ethernet + pci:v000014E4d000016F3* ID_MODEL_FROM_DATABASE=NetXtreme BCM5727 Gigabit Ethernet PCIe @@ -52985,6 +53474,27 @@ pci:v000014E4d0000B302* pci:v000014E4d0000B334* ID_MODEL_FROM_DATABASE=BCM56334 StrataXGS 24x1GE 4x10GE Switch Controller +pci:v000014E4d0000B370* + ID_MODEL_FROM_DATABASE=BCM56370 Switch ASIC + +pci:v000014E4d0000B371* + ID_MODEL_FROM_DATABASE=BCM56371 Switch ASIC + +pci:v000014E4d0000B372* + ID_MODEL_FROM_DATABASE=BCM56372 Switch ASIC + +pci:v000014E4d0000B375* + ID_MODEL_FROM_DATABASE=BCM56375 Switch ASIC + +pci:v000014E4d0000B376* + ID_MODEL_FROM_DATABASE=BCM56376 Switch ASIC + +pci:v000014E4d0000B377* + ID_MODEL_FROM_DATABASE=BCM56377 Switch ASIC + +pci:v000014E4d0000B379* + ID_MODEL_FROM_DATABASE=Broadcom BCM56379 Switch ASIC + pci:v000014E4d0000B800* ID_MODEL_FROM_DATABASE=BCM56800 StrataXGS 10GE Switch Controller @@ -55070,6 +55580,9 @@ pci:v000015B3d00001007sv000015B3sd00000079* pci:v000015B3d00001007sv000015B3sd00000080* ID_MODEL_FROM_DATABASE=MT27520 Family [ConnectX-3 Pro] (ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter) +pci:v000015B3d00001007sv0000193Dsd00001002* + ID_MODEL_FROM_DATABASE=MT27520 Family [ConnectX-3 Pro] (520F-B) + pci:v000015B3d00001009* ID_MODEL_FROM_DATABASE=MT27530 Family @@ -55133,6 +55646,12 @@ pci:v000015B3d00001014* pci:v000015B3d00001015* ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] +pci:v000015B3d00001015sv000015B3sd00000001* + ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] (ConnectX-4 Lx EN network interface card, 25GbE single-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6) + +pci:v000015B3d00001015sv000015B3sd00000003* + ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] (ConnectX-4 Lx EN network interface card, 25GbE dual-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6) + pci:v000015B3d00001015sv000015B3sd00000004* ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] (ConnectX-4 Lx Stand-up dual-port 10GbE MCX4121A-XCAT) @@ -55151,6 +55670,9 @@ pci:v000015B3d00001015sv000015B3sd00000021* pci:v000015B3d00001015sv000015B3sd00000025* ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] (ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC) +pci:v000015B3d00001015sv0000193Dsd0000100A* + ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx] (620F-B) + pci:v000015B3d00001016* ID_MODEL_FROM_DATABASE=MT27710 Family [ConnectX-4 Lx Virtual Function] @@ -55344,7 +55866,7 @@ pci:v000015B3d0000CF08* ID_MODEL_FROM_DATABASE=MT53236 pci:v000015B3d0000CF6C* - ID_MODEL_FROM_DATABASE=MT53100 [Spectrum-2, 64 x 100GbE switch] + ID_MODEL_FROM_DATABASE=MT53100 [Spectrum-2] pci:v000015B3d0000D2F0* ID_MODEL_FROM_DATABASE=Switch-IB 3 HDR (200Gbps) switch @@ -55838,6 +56360,30 @@ pci:v00001619d00006620* pci:v0000161F* ID_VENDOR_FROM_DATABASE=Rioworks +pci:v00001621* + ID_VENDOR_FROM_DATABASE=Lynx Studio Technology, Inc. + +pci:v00001621d00000020* + ID_MODEL_FROM_DATABASE=LynxTWO-A + +pci:v00001621d00000021* + ID_MODEL_FROM_DATABASE=LynxTWO-B + +pci:v00001621d00000022* + ID_MODEL_FROM_DATABASE=LynxTWO-C + +pci:v00001621d00000023* + ID_MODEL_FROM_DATABASE=Lynx L22 + +pci:v00001621d00000024* + ID_MODEL_FROM_DATABASE=Lynx AES16 + +pci:v00001621d00000025* + ID_MODEL_FROM_DATABASE=Lynx AES16-SRC + +pci:v00001621d00000028* + ID_MODEL_FROM_DATABASE=Lynx AES16e + pci:v00001626* ID_VENDOR_FROM_DATABASE=TDK Semiconductor Corp. @@ -57359,6 +57905,15 @@ pci:v000016D5d0000702A* pci:v000016D5d0000702B* ID_MODEL_FROM_DATABASE=AP236 16-Bit, 8-Channel Isolated Analog Output Module +pci:v000016D5d00007031* + ID_MODEL_FROM_DATABASE=AP441-1: 32-Channel Isolated Digital Input Module + +pci:v000016D5d00007032* + ID_MODEL_FROM_DATABASE=AP441-2: 32-Channel Isolated Digital Input Module + +pci:v000016D5d00007033* + ID_MODEL_FROM_DATABASE=AP441-3: 32-Channel Isolated Digital Input Module + pci:v000016D5d00007042* ID_MODEL_FROM_DATABASE=AP482 Counter Timer Module with TTL Level Input/Output @@ -57569,6 +58124,9 @@ pci:v00001760d00000102* pci:v00001760d00000303* ID_MODEL_FROM_DATABASE=PCD-7006C Digital Input & Output PCI Card +pci:v00001761* + ID_VENDOR_FROM_DATABASE=Pickering Interfaces Ltd + pci:v00001771* ID_VENDOR_FROM_DATABASE=InnoVISION Multimedia Ltd. @@ -60887,6 +61445,9 @@ pci:v00001A4Ad00002001* pci:v00001A4Ad00002010* ID_MODEL_FROM_DATABASE=PCI-Express EVR +pci:v00001A4Ad00002020* + ID_MODEL_FROM_DATABASE=PGP-GEN3 PCIe + pci:v00001A51* ID_VENDOR_FROM_DATABASE=Hectronic AB @@ -61046,6 +61607,9 @@ pci:v00001AA8d0000000A* pci:v00001AAE* ID_VENDOR_FROM_DATABASE=Global Velocity, Inc. +pci:v00001AB4* + ID_VENDOR_FROM_DATABASE=FFEI Ltd + pci:v00001AB6* ID_VENDOR_FROM_DATABASE=CalDigit, Inc. @@ -61526,6 +62090,15 @@ pci:v00001B4Bd00009220* pci:v00001B4Bd00009230* ID_MODEL_FROM_DATABASE=88SE9230 PCIe SATA 6Gb/s Controller +pci:v00001B4Bd00009230sv00001028sd00001FD6* + ID_MODEL_FROM_DATABASE=88SE9230 PCIe SATA 6Gb/s Controller (BOSS-S1 Adapter) + +pci:v00001B4Bd00009230sv00001028sd00001FDF* + ID_MODEL_FROM_DATABASE=88SE9230 PCIe SATA 6Gb/s Controller (BOSS-S1 Modular) + +pci:v00001B4Bd00009230sv00001028sd00001FE2* + ID_MODEL_FROM_DATABASE=88SE9230 PCIe SATA 6Gb/s Controller (BOSS-S1 Adapter) + pci:v00001B4Bd00009230sv00001D49sd00000300* ID_MODEL_FROM_DATABASE=88SE9230 PCIe SATA 6Gb/s Controller (ThinkSystem M.2 with Mirroring Enablement Kit) @@ -61919,6 +62492,12 @@ pci:v00001C58d00000003sv00001014sd000004F6* pci:v00001C58d00000023* ID_MODEL_FROM_DATABASE=Ultrastar SN200 Series NVMe SSD +pci:v00001C5C* + ID_VENDOR_FROM_DATABASE=SK hynix + +pci:v00001C5Cd00001283* + ID_MODEL_FROM_DATABASE=PC300 NVMe Solid State Drive + pci:v00001C5F* ID_VENDOR_FROM_DATABASE=Beijing Memblaze Technology Co. Ltd. @@ -62519,6 +63098,15 @@ pci:v00001DEFd0000E00C* pci:v00001DF7* ID_VENDOR_FROM_DATABASE=opencpi.org +pci:v00001DF7d00000001* + ID_MODEL_FROM_DATABASE=ml605 + +pci:v00001DF7d00000002* + ID_MODEL_FROM_DATABASE=alst4 + +pci:v00001DF7d00000003* + ID_MODEL_FROM_DATABASE=alst4x + pci:v00001FC0* ID_VENDOR_FROM_DATABASE=Ascom (Finland) Oy @@ -62663,6 +63251,9 @@ pci:v00001FC9d00004027sv00001154sd00000368* pci:v00001FC9d00004027sv00001432sd00008104* ID_MODEL_FROM_DATABASE=TN9710P 10GBase-T/NBASE-T Ethernet Adapter (10 Gigabit Ethernet PCI Express Adapter) +pci:v00001FC9d00004027sv00001546sd00004027* + ID_MODEL_FROM_DATABASE=TN9710P 10GBase-T/NBASE-T Ethernet Adapter (IOI9710P 10Gbase-T/NBASE-T Ethernet Adapter) + pci:v00001FC9d00004027sv00001FC9sd00003015* ID_MODEL_FROM_DATABASE=TN9710P 10GBase-T/NBASE-T Ethernet Adapter (Ethernet Adapter) @@ -68414,6 +69005,9 @@ pci:v00008086d000010FBsv000017AAsd0000402F* pci:v00008086d000010FBsv000018D4sd00000C09* ID_MODEL_FROM_DATABASE=82599ES 10-Gigabit SFI/SFP+ Network Connection (82599ES 10Gb 2-port SFP+ OCP Mezz Card MOP81-I-10GS2) +pci:v00008086d000010FBsv0000193Dsd00001004* + ID_MODEL_FROM_DATABASE=82599ES 10-Gigabit SFI/SFP+ Network Connection (560F-B) + pci:v00008086d000010FBsv00001BD4sd0000001B* ID_MODEL_FROM_DATABASE=82599ES 10-Gigabit SFI/SFP+ Network Connection (10G SFP+ DP ER102Fi4 Rack Adapter) @@ -69368,6 +69962,12 @@ pci:v00008086d00001521sv000017AAsd00004005* pci:v00008086d00001521sv000018D4sd00000C07* ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (I350 1Gb 2-port RJ45 OCP Mezz Card MOP41-I-1GT2) +pci:v00008086d00001521sv0000193Dsd00001005* + ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (360T-B) + +pci:v00008086d00001521sv0000193Dsd00001007* + ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (360T-L) + pci:v00008086d00001521sv00001BD4sd0000001D* ID_MODEL_FROM_DATABASE=I350 Gigabit Network Connection (1G base-T QP EP014Ti1 Adapter) @@ -69707,6 +70307,9 @@ pci:v00008086d00001563sv00001028sd00001FA8* pci:v00008086d00001563sv00001028sd00001FA9* ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (Ethernet 10G 4P X550 rNDC) +pci:v00008086d00001563sv000014C0sd00001201* + ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (X550 10Gb 2P RJ45 OCP Mezz) + pci:v00008086d00001563sv00001590sd000000D1* ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (Ethernet 10Gb 2-port 562T Adapter) @@ -69716,6 +70319,12 @@ pci:v00008086d00001563sv00001590sd000000D2* pci:v00008086d00001563sv000018D4sd00000C08* ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (X550 10Gb 2-port RJ45 OCP Mezz Card MOP81-I-10GT2) +pci:v00008086d00001563sv0000193Dsd00001008* + ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (560T-B) + +pci:v00008086d00001563sv0000193Dsd00001009* + ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (560T-L) + pci:v00008086d00001563sv00008086sd00000001* ID_MODEL_FROM_DATABASE=Ethernet Controller 10G X550T (Ethernet Converged Network Adapter X550-T2) @@ -72740,6 +73349,9 @@ pci:v00008086d0000244Esv00001043sd0000844D* pci:v00008086d0000244Esv00001458sd00005000* ID_MODEL_FROM_DATABASE=82801 PCI Bridge (Motherboard) +pci:v00008086d0000244Esv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801 PCI Bridge (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000244Esv00001462sd00007418* ID_MODEL_FROM_DATABASE=82801 PCI Bridge (Wind PC MS-7418) @@ -74195,6 +74807,9 @@ pci:v00008086d000024F4* pci:v00008086d000024F4sv00008086sd00000030* ID_MODEL_FROM_DATABASE=Wireless 8260 (Dual Band Wireless-AC 8260) +pci:v00008086d000024FB* + ID_MODEL_FROM_DATABASE=Dual Band Wireless-AC 3168NGW [Stone Peak] + pci:v00008086d000024FD* ID_MODEL_FROM_DATABASE=Wireless 8265 / 8275 @@ -74231,6 +74846,9 @@ pci:v00008086d00002520* pci:v00008086d00002521* ID_MODEL_FROM_DATABASE=82804AA MRH-S Memory Repeater Hub for SDRAM +pci:v00008086d00002526* + ID_MODEL_FROM_DATABASE=Wireless-AC 9260 + pci:v00008086d00002530* ID_MODEL_FROM_DATABASE=82850 850 (Tehama) Chipset Host Bridge (MCH) @@ -76847,6 +77465,9 @@ pci:v00008086d00002815sv00001025sd00000121* pci:v00008086d00002815sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801HM (ICH8M) LPC Interface Controller (Inspiron 1420) +pci:v00008086d00002815sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801HM (ICH8M) LPC Interface Controller (Inspiron 1525) + pci:v00008086d00002815sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801HM (ICH8M) LPC Interface Controller (Compaq 6710b) @@ -76892,6 +77513,9 @@ pci:v00008086d00002822sv0000103Csd00002A6F* pci:v00008086d00002822sv00001043sd00008277* ID_MODEL_FROM_DATABASE=SATA Controller [RAID mode] (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002822sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=SATA Controller [RAID mode] (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002823* ID_MODEL_FROM_DATABASE=C610/X99 series chipset sSATA Controller [RAID mode] @@ -76955,6 +77579,9 @@ pci:v00008086d00002829* pci:v00008086d00002829sv00001025sd00000121* ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (Aspire 5920G) +pci:v00008086d00002829sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (Inspiron 1525) + pci:v00008086d00002829sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] (Compaq 6710b) @@ -77003,6 +77630,9 @@ pci:v00008086d00002830sv00001028sd000001DA* pci:v00008086d00002830sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #1 (Inspiron 1420) +pci:v00008086d00002830sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #1 (Inspiron 1525) + pci:v00008086d00002830sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #1 (Compaq 6710b) @@ -77048,6 +77678,9 @@ pci:v00008086d00002831sv00001028sd000001DA* pci:v00008086d00002831sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #2 (Inspiron 1420) +pci:v00008086d00002831sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #2 (Inspiron 1525) + pci:v00008086d00002831sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #2 (Compaq 6710b) @@ -77093,6 +77726,9 @@ pci:v00008086d00002832sv00001028sd000001DA* pci:v00008086d00002832sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #3 (Inspiron 1420) +pci:v00008086d00002832sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #3 (Inspiron 1525) + pci:v00008086d00002832sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #3 (Compaq 6710b) @@ -77141,6 +77777,9 @@ pci:v00008086d00002834sv00001028sd000001DA* pci:v00008086d00002834sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #4 (Inspiron 1420) +pci:v00008086d00002834sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #4 (Inspiron 1525) + pci:v00008086d00002834sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #4 (Compaq 6710b) @@ -77183,6 +77822,9 @@ pci:v00008086d00002835sv00001028sd000001DA* pci:v00008086d00002835sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #5 (Inspiron 1420) +pci:v00008086d00002835sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #5 (Inspiron 1525) + pci:v00008086d00002835sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB UHCI Controller #5 (Compaq 6710b) @@ -77222,6 +77864,9 @@ pci:v00008086d00002836sv00001028sd000001DA* pci:v00008086d00002836sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #1 (Inspiron 1420) +pci:v00008086d00002836sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #1 (Inspiron 1525) + pci:v00008086d00002836sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #1 (Compaq 6710b) @@ -77267,6 +77912,9 @@ pci:v00008086d0000283Asv00001028sd000001DA* pci:v00008086d0000283Asv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #2 (Inspiron 1420) +pci:v00008086d0000283Asv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #2 (Inspiron 1525) + pci:v00008086d0000283Asv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) USB2 EHCI Controller #2 (Compaq 6710b) @@ -77306,6 +77954,9 @@ pci:v00008086d0000283Esv00001028sd000001DA* pci:v00008086d0000283Esv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) SMBus Controller (Inspiron 1420) +pci:v00008086d0000283Esv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) SMBus Controller (Inspiron 1525) + pci:v00008086d0000283Esv0000103Csd000030D9* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) SMBus Controller (Presario C700) @@ -77429,6 +78080,9 @@ pci:v00008086d0000284Bsv00001028sd000001F9* pci:v00008086d0000284Bsv00001028sd000001FF* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) HD Audio Controller (Precision M4300) +pci:v00008086d0000284Bsv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) HD Audio Controller (Inspiron 1525) + pci:v00008086d0000284Bsv00001028sd00000256* ID_MODEL_FROM_DATABASE=82801H (ICH8 Family) HD Audio Controller (Studio 1735) @@ -77489,6 +78143,9 @@ pci:v00008086d00002850sv00001025sd00000121* pci:v00008086d00002850sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (Inspiron 1420) +pci:v00008086d00002850sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (Inspiron 1525) + pci:v00008086d00002850sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=82801HM/HEM (ICH8M/ICH8M-E) IDE Controller (Compaq 6710b) @@ -77537,6 +78194,9 @@ pci:v00008086d00002916sv0000103Csd00002A6F* pci:v00008086d00002916sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801IR (ICH9R) LPC Interface Controller (P5K PRO Motherboard) +pci:v00008086d00002916sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801IR (ICH9R) LPC Interface Controller (MS-7345 Motherboard) + pci:v00008086d00002916sv00008086sd00005044* ID_MODEL_FROM_DATABASE=82801IR (ICH9R) LPC Interface Controller (Desktop Board DP35DP) @@ -77582,6 +78242,9 @@ pci:v00008086d00002920sv00001028sd0000023C* pci:v00008086d00002920sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002920sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801IR/IO/IH (ICH9R/DO/DH) 4 port SATA Controller [IDE mode] (MS-7345 Motherboard: Intel 82801IR [ICH9R]) + pci:v00008086d00002921* ID_MODEL_FROM_DATABASE=82801IB (ICH9) 2 port SATA Controller [IDE mode] @@ -77603,6 +78266,9 @@ pci:v00008086d00002922* pci:v00008086d00002922sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002922sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (MS-7345 Motherboard: Intel 82801IR [ICH9R]) + pci:v00008086d00002922sv00001AF4sd00001100* ID_MODEL_FROM_DATABASE=82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] (QEMU Virtual Machine) @@ -77639,6 +78305,9 @@ pci:v00008086d00002926sv00001028sd00000211* pci:v00008086d00002926sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) 2 port SATA Controller [IDE mode] (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002926sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) 2 port SATA Controller [IDE mode] (MS-7345 Motherboard: Intel 82801IR [ICH9R]) + pci:v00008086d00002926sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) 2 port SATA Controller [IDE mode] (G33/P35 Neo) @@ -77681,6 +78350,9 @@ pci:v00008086d00002930sv0000103Csd00003628* pci:v00008086d00002930sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) SMBus Controller (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002930sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) SMBus Controller (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002930sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) SMBus Controller (G33/P35 Neo) @@ -77741,6 +78413,9 @@ pci:v00008086d00002934sv0000103Csd00002A6F* pci:v00008086d00002934sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #1 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002934sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #1 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002934sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #1 (G33/P35 Neo) @@ -77792,6 +78467,9 @@ pci:v00008086d00002935sv0000103Csd00002A6F* pci:v00008086d00002935sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #2 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002935sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #2 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002935sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #2 (G33/P35 Neo) @@ -77837,6 +78515,9 @@ pci:v00008086d00002936sv0000103Csd00002A6F* pci:v00008086d00002936sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #3 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002936sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #3 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002936sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #3 (G33/P35 Neo) @@ -77882,6 +78563,9 @@ pci:v00008086d00002937sv0000103Csd00002A6F* pci:v00008086d00002937sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #4 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002937sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #4 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002937sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #4 (G33/P35 Neo) @@ -77930,6 +78614,9 @@ pci:v00008086d00002938sv0000103Csd00002A6F* pci:v00008086d00002938sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #5 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002938sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #5 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002938sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #5 (G33/P35 Neo) @@ -77963,6 +78650,9 @@ pci:v00008086d00002939sv0000103Csd00002A6F* pci:v00008086d00002939sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #6 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002939sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #6 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002939sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB UHCI Controller #6 (G33/P35 Neo) @@ -78014,6 +78704,9 @@ pci:v00008086d0000293Asv0000103Csd00002A6F* pci:v00008086d0000293Asv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #1 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d0000293Asv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #1 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000293Asv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #1 (G33/P35 Neo) @@ -78056,6 +78749,9 @@ pci:v00008086d0000293Csv0000103Csd00002A6F* pci:v00008086d0000293Csv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #2 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d0000293Csv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #2 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000293Csv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) USB2 EHCI Controller #2 (G33/P35 Neo) @@ -78089,6 +78785,9 @@ pci:v00008086d0000293Esv0000103Csd00003628* pci:v00008086d0000293Esv00001043sd0000829F* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) HD Audio Controller (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d0000293Esv00001462sd0000735A* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) HD Audio Controller (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000293Esv00001462sd00007360* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) HD Audio Controller (G33/P35 Neo) @@ -78119,6 +78818,9 @@ pci:v00008086d00002940sv0000103Csd00002A6F* pci:v00008086d00002940sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 1 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002940sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 1 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d00002940sv00008086sd00002940* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 1 (Optiplex 755) @@ -78152,6 +78854,9 @@ pci:v00008086d00002948sv00001028sd0000020D* pci:v00008086d00002948sv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 5 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d00002948sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 5 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000294A* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 6 @@ -78161,6 +78866,9 @@ pci:v00008086d0000294Asv00001028sd0000020D* pci:v00008086d0000294Asv00001043sd00008277* ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 6 (P5K PRO Motherboard: 82801IR [ICH9R]) +pci:v00008086d0000294Asv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82801I (ICH9 Family) PCI Express Port 6 (MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R]) + pci:v00008086d0000294C* ID_MODEL_FROM_DATABASE=82566DC-2 Gigabit Network Connection @@ -78326,6 +79034,9 @@ pci:v00008086d000029C0sv00001043sd00008276* pci:v00008086d000029C0sv00001043sd000082B0* ID_MODEL_FROM_DATABASE=82G33/G31/P35/P31 Express DRAM Controller (P5KPL-VM Motherboard) +pci:v00008086d000029C0sv00001462sd00007345* + ID_MODEL_FROM_DATABASE=82G33/G31/P35/P31 Express DRAM Controller (MS-7345 Motherboard: Intel 82G33/P35 Northbridge) + pci:v00008086d000029C0sv00001462sd00007360* ID_MODEL_FROM_DATABASE=82G33/G31/P35/P31 Express DRAM Controller (G33/P35 Neo) @@ -78455,6 +79166,9 @@ pci:v00008086d00002A00sv00001025sd00000121* pci:v00008086d00002A00sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=Mobile PM965/GM965/GL960 Memory Controller Hub (Inspiron 1420) +pci:v00008086d00002A00sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=Mobile PM965/GM965/GL960 Memory Controller Hub (Inspiron 1525) + pci:v00008086d00002A00sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=Mobile PM965/GM965/GL960 Memory Controller Hub (Compaq 6710b) @@ -78497,6 +79211,9 @@ pci:v00008086d00002A02sv00001028sd000001F3* pci:v00008086d00002A02sv00001028sd000001F9* ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (primary) (Latitude D630) +pci:v00008086d00002A02sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (primary) (Inspiron 1525) + pci:v00008086d00002A02sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (primary) (Compaq 6710b) @@ -78521,6 +79238,9 @@ pci:v00008086d00002A03* pci:v00008086d00002A03sv00001028sd000001F3* ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (secondary) (Inspiron 1420) +pci:v00008086d00002A03sv00001028sd0000022F* + ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (secondary) (Inspiron 1525) + pci:v00008086d00002A03sv0000103Csd000030C0* ID_MODEL_FROM_DATABASE=Mobile GM965/GL960 Integrated Graphics Controller (secondary) (Compaq 6710b) @@ -80660,6 +81380,18 @@ pci:v00008086d000037D0sv000017AAsd00004021* pci:v00008086d000037D0sv000017AAsd00004022* ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 10GbE SFP+ +pci:v00008086d000037D0sv00008086sd00000001* + ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 10GbE SFP+ (Ethernet Network Adapter X722-2) + +pci:v00008086d000037D0sv00008086sd00000002* + ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 10GbE SFP+ (Ethernet Network Adapter X722-2) + +pci:v00008086d000037D0sv00008086sd00000003* + ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 10GbE SFP+ (Ethernet Network Adapter X722-4) + +pci:v00008086d000037D0sv00008086sd00000004* + ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 10GbE SFP+ (Ethernet Network Adapter X722-4) + pci:v00008086d000037D1* ID_MODEL_FROM_DATABASE=Ethernet Connection X722 for 1GbE @@ -81314,6 +82046,12 @@ pci:v00008086d00003B30sv00001028sd0000040A* pci:v00008086d00003B30sv00001028sd0000040B* ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SMBus Controller (Latitude E6510) +pci:v00008086d00003B30sv00001043sd00003838* + ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SMBus Controller (P7P55-M Motherboard) + +pci:v00008086d00003B30sv00001043sd00008383* + ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SMBus Controller (P7P55-M Motherboard) + pci:v00008086d00003B30sv0000144Dsd0000C06A* ID_MODEL_FROM_DATABASE=5 Series/3400 Series Chipset SMBus Controller (R730 Laptop) @@ -87300,10 +88038,10 @@ pci:v0000DEDA* ID_VENDOR_FROM_DATABASE=XIMEA pci:v0000DEDAd00004001* - ID_MODEL_FROM_DATABASE=Camera CB + ID_MODEL_FROM_DATABASE=CB or MX camera pci:v0000DEDAd00004021* - ID_MODEL_FROM_DATABASE=Camera MT + ID_MODEL_FROM_DATABASE=MT camera pci:v0000E000* ID_VENDOR_FROM_DATABASE=Winbond @@ -87572,6 +88310,12 @@ pci:v0000EACEd00009200* pci:v0000EACEd0000920E* ID_MODEL_FROM_DATABASE=DAG 9.2X2 10G Ethernet +pci:v0000EACEd00009540* + ID_MODEL_FROM_DATABASE=DAG 9.5G4 Gig Ethernet + +pci:v0000EACEd0000954F* + ID_MODEL_FROM_DATABASE=DAG 9.5G4F Gig Ethernet + pci:v0000EACEd0000A120* ID_MODEL_FROM_DATABASE=DAG 10X2-P 10G Ethernet @@ -87579,7 +88323,13 @@ pci:v0000EACEd0000A12E* ID_MODEL_FROM_DATABASE=DAG 10X2-S 10G Ethernet pci:v0000EACEd0000A140* - ID_MODEL_FROM_DATABASE=DAG 10X4-P 10G Ethernet + ID_MODEL_FROM_DATABASE=DAG 10X4-P 10/40G Ethernet + +pci:v0000EACEd0000A14E* + ID_MODEL_FROM_DATABASE=DAG 10X4-S 10/40G Ethernet + +pci:v0000EACEd0000EACE* + ID_MODEL_FROM_DATABASE=vDAG virtual device pci:v0000EC80* ID_VENDOR_FROM_DATABASE=Belkin Corporation diff --git a/hwdb/60-evdev.hwdb b/hwdb/60-evdev.hwdb index ff28b7e03..2c6fdb1b6 100644 --- a/hwdb/60-evdev.hwdb +++ b/hwdb/60-evdev.hwdb @@ -151,6 +151,11 @@ evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnInsp EVDEV_ABS_35=25:2000:22 EVDEV_ABS_36=0:1351:28 +# Dell Inspiron MM061 +evdev:name:SynPS/2 Synaptics TouchPad:dmi:*bvn*:bvr*:bd*:svnDellInc.:pnMM061:* + EVDEV_ABS_00=1008:5793:66 + EVDEV_ABS_01=687:5176:107 + # Dell Latitude E6220 evdev:name:AlpsPS/2 ALPS DualPoint TouchPad:dmi:bvn*:bvr*:bd*:svnDellInc.:pnLatitudeE6220* EVDEV_ABS_00=76:1815:22 @@ -377,6 +382,13 @@ evdev:name:AlpsPS/2 ALPS GlidePoint*:dmi:bvn*:bvr*:bd*:svnLENOVO*:pvrFlex3-15* EVDEV_ABS_35=::38 EVDEV_ABS_36=::28 +# Lenovo ThinkPad Edge 13 (02173BG) +evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pn*02173BG*:*pvrThinkPadEdge* + EVDEV_ABS_00=916:6077:55 + EVDEV_ABS_01=653:5395:116 + EVDEV_ABS_35=916:6077:55 + EVDEV_ABS_36=653:5395:116 + ######################################### # Samsung ######################################### diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb index a265f1223..6406a7dbf 100644 --- a/hwdb/60-keyboard.hwdb +++ b/hwdb/60-keyboard.hwdb @@ -162,8 +162,9 @@ evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*C3[01]0*:pvr* KEYBOARD_KEY_6b=fn KEYBOARD_KEY_6c=screenlock # FIXME: lock tablet device/buttons -# Travelmate P648-G2-MG +# Travelmate P648-G2-MG and P645-S evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P648-G2-MG*:pvr* +evdev:atkbd:dmi:bvn*:bvr*:bd*:svnAcer*:pnTravelMate*P645-S*:pvr* KEYBOARD_KEY_8a=f20 # Microphone mute button; should be micmute # on some models this isn't brightnessup @@ -807,7 +808,7 @@ evdev:input:b0003v046DpC517* KEYBOARD_KEY_c104c=ejectclosecd # Cordless Wave Pro -evdev:input:b0003v046DpC52[9B]* +evdev:input:b0003v046DpC529* KEYBOARD_KEY_0c01b6=camera KEYBOARD_KEY_0c0183=media KEYBOARD_KEY_0c0184=wordprocessor @@ -1202,6 +1203,13 @@ evdev:name:Sony Vaio Keys:dmi:bvn*:bvr*:bd*:svnSony*:pnVPC*:pvr* KEYBOARD_KEY_0d=down # Fn+F9 zoomout KEYBOARD_KEY_0e=up # Fn+F10 zoomin +########################################################### +# T-bao +########################################################### + +evdev:atkbd:dmi:bvn*:bvr*:bd*:svnT-bao:pnTbookair:pvr* + KEYBOARD_KEY_76=f21 # Touchpad toggle + ########################################################### # Toshiba ########################################################### @@ -1262,6 +1270,13 @@ evdev:name:Toshiba*input*device:dmi:bvn*:bvr*:bd*:svnTOSHIBA*:pnSatellite*P75-A: evdev:atkbd:dmi:bvn*:bvr*:bd*:svnVIA:pnK8N800:pvr* KEYBOARD_KEY_81=prog1 +########################################################### +# VIOS +########################################################### + +evdev:name:SIPODEV USB Composite Device:dmi:bvn*:bvr*:bd*:svnVIOS:pnLTH17:pvr* + KEYBOARD_KEY_70073=f21 # Touchpad toggle + ########################################################### # Zepto ########################################################### diff --git a/hwdb/60-sensor.hwdb b/hwdb/60-sensor.hwdb index 2e67741c3..77de5d21b 100644 --- a/hwdb/60-sensor.hwdb +++ b/hwdb/60-sensor.hwdb @@ -81,6 +81,9 @@ sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LJ* sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP500LB* ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 +sensor:modalias:acpi:SMO8500*:dmi:*svn*ASUSTeK*:*pn*TP300LD* + ACCEL_MOUNT_MATRIX=0, 1, 0; 1, 0, 0; 0, 0, 1 + ######################################### # Axxo ######################################### @@ -107,6 +110,10 @@ sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnX1D3_C806N:* sensor:modalias:acpi:BOSC0200*:dmi:*:svn*CHUWIINNOVATIONANDTECHNOLOGY*:pnHi10protablet:* ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 +# Chuwi Hi12 +sensor:modalias:acpi:BOSC0200*:dmi:*:svnHampoo:pnP02BD6_HI-122LP:* + ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 + # Chuwi Hi13 sensor:modalias:acpi:KIOX000A*:dmi:svnChuwi*:pnHi13 ACCEL_MOUNT_MATRIX=1, 0, 0; 0, -1, 0; 0, 0, 1 @@ -130,6 +137,10 @@ sensor:modalias:acpi:KIOX000A*:dmi:*:svncube:pni1-TF:* sensor:modalias:acpi:KIOX000A*:dmi:*:svnCube:pni7Stylus:* ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 +# Cube i7 Book (i16) +sensor:modalias:acpi:KIOX000A*:dmi:*:svnCube:pni16:* + ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 + ######################################### # Endless ######################################### @@ -250,3 +261,10 @@ sensor:modalias:acpi:BMA250*:dmi:*:bvrTREK.G.WI71C.JGBMRBA*:*:svnTrekStor:pnSurf ######################################### sensor:modalias:acpi:*KIOX000A*:dmi:*svn*CytrixTechnology:*pn*Complex11t* ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1 + +######################################### +# iOTA 360 +######################################### +sensor:modalias:acpi:KIOX000A*:dmi:*svn*iOTA*:*pn*IOTA2210* + ACCEL_MOUNT_MATRIX=0, -1, 0; -1, 0, 0; 0, 0, 1 + diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb index 48fb1eb4d..33d01f158 100644 --- a/hwdb/70-mouse.hwdb +++ b/hwdb/70-mouse.hwdb @@ -438,6 +438,10 @@ mouse:usb:v046dp402d:name:Logitech M560: mouse:usb:v046dpc52b:name:Logitech Unifying Device. Wireless PID:402d: MOUSE_DPI=1000@125 +# Logitech M305 Wireless Optical Mouse +mouse:usb:v046dpc52f:name:Logitech USB Receiver: + MOUSE_DPI=1000@170 + # Logitech Performance MX mouse:usb:v046dp101a:name:Logitech Performance MX: MOUSE_DPI=1000@166 diff --git a/hwdb/ma-large.txt b/hwdb/ma-large.txt index 04dc45a4a..7d22e6f60 100644 --- a/hwdb/ma-large.txt +++ b/hwdb/ma-large.txt @@ -1274,12 +1274,6 @@ C4ADF1 (base 16) GOPEACE Inc. San Jose California 95110 US -1C-60-DE (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -1C60DE (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 74-18-65 (hex) Shanghai DareGlobal Technologies Co.,Ltd 741865 (base 16) Shanghai DareGlobal Technologies Co.,Ltd 22F NO.1555 Kongjiang RD @@ -1706,12 +1700,6 @@ B0495F (base 16) OMRON HEALTHCARE Co., Ltd. Muko Kyoto 6170002 JP -BC-6E-64 (hex) Sony Mobile Communications AB -BC6E64 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - F4-47-13 (hex) Leading Public Performance Co., Ltd. F44713 (base 16) Leading Public Performance Co., Ltd. 137/77-78 Moo 1 Nanthanagarden Soi 12 Pathum-Rangsit Road Banklang Muang Pathumthani 12000 Thailand @@ -1739,12 +1727,6 @@ BC5C4C (base 16) ELECOM CO.,LTD. Chiyoda-ku Tokyo 102-0081 JP -6C-59-40 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -6C5940 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 6C-A7-5F (hex) zte corporation 6CA75F (base 16) zte corporation 12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China @@ -1985,12 +1967,6 @@ A8D0E3 (base 16) Systech Electronics Ltd. shanghai shanghai 201203 CN -F4-EE-14 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -F4EE14 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 18-65-71 (hex) Top Victory Electronics (Taiwan) Co., Ltd. 186571 (base 16) Top Victory Electronics (Taiwan) Co., Ltd. 14F,No.166,Jian 1st Rd @@ -2507,12 +2483,6 @@ A481EE (base 16) Nokia Corporation Shenzhen Guangdong 518057 CN -D4-21-22 (hex) Sercomm Corporation -D42122 (base 16) Sercomm Corporation - 8F, 3-1, YuanQu St., NanKang, - Taipei Taiwan 115 - TW - EC-17-66 (hex) Research Centre Module EC1766 (base 16) Research Centre Module 3 Eight March 4Th Street @@ -2762,12 +2732,6 @@ B4827B (base 16) AKG Acoustics GmbH Hsin-chu Taiwan 300 TW -4C-5E-0C (hex) Routerboard.com -4C5E0C (base 16) Routerboard.com - Mikrotikls SIA - Riga LV1009 - LV - 9C-F8-DB (hex) shenzhen eyunmei technology co,.ltd 9CF8DB (base 16) shenzhen eyunmei technology co,.ltd 8/F Yiben Building,No.1063 ChaGuang Road,XiLi Town, @@ -2984,12 +2948,6 @@ F0321A (base 16) Mita-Teknik A/S New Taipei City 231 TW -A0-E4-53 (hex) Sony Mobile Communications AB -A0E453 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 40-4A-18 (hex) Addrek Smart Solutions 404A18 (base 16) Addrek Smart Solutions Al Gharrafa Thani Bin Jassim St @@ -3161,12 +3119,6 @@ F42896 (base 16) SPECTO PAINEIS ELETRONICOS LTDA SAO JOSE SANTA CATARINA 88122-035 BR -1C-7B-21 (hex) Sony Mobile Communications AB -1C7B21 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 9C-28-40 (hex) Discovery Technology,LTD.. 9C2840 (base 16) Discovery Technology,LTD.. 5th floor Building 2,Block A,Internet industrial park, @@ -4424,12 +4376,6 @@ DCB058 (base 16) Bürkert Werke GmbH Ingelfingen Baden-Württemberg 74653 DE -64-1C-67 (hex) DIGIBRAS INDUSTRIA DO BRASILS/A -641C67 (base 16) DIGIBRAS INDUSTRIA DO BRASILS/A - Rua Tambaqui, 180-B - MANAUS - AM ¨C BRAZIL - MANAUS 69075-210 - BR - C8-E1-A7 (hex) Vertu Corporation Limited C8E1A7 (base 16) Vertu Corporation Limited Beacon Hill Road @@ -7946,12 +7892,6 @@ A8CE90 (base 16) CVC Boylston MA 01505 US -00-26-BD (hex) JTEC Card & Communication Co., Ltd. -0026BD (base 16) JTEC Card & Communication Co., Ltd. - Dabo Bldg, 4F, 61-1, Gyesu-dong, Sosa-gu - Bucheon Gyunggi-do 422-070 - KR - 00-26-B3 (hex) Thales Communications Inc 0026B3 (base 16) Thales Communications Inc 22605 Gateway Center Drive @@ -11690,12 +11630,6 @@ A8CE90 (base 16) CVC Adelaide South Australia 5000 AU -00-15-1E (hex) Ethernet Powerlink Standardization Group (EPSG) -00151E (base 16) Ethernet Powerlink Standardization Group (EPSG) - c/o Zurich University of Applied Sciences - CH-8401 Winterthur - CH - 00-15-25 (hex) Chamberlain Access Solutions 001525 (base 16) Chamberlain Access Solutions 8271 E. Gelding Drive @@ -12476,12 +12410,6 @@ A8CE90 (base 16) CVC Tamsui Taipei 251 TW -00-13-8A (hex) QINGDAO GOERTEK ELECTRONICS CO.,LTD. -00138A (base 16) QINGDAO GOERTEK ELECTRONICS CO.,LTD. - Room 605,Innovation Building,Hi-tech Industrial Park, - QINGDAO SHANDONG 266061 - CN - 00-13-89 (hex) Redes de Telefonía Móvil S.A. 001389 (base 16) Redes de Telefonía Móvil S.A. C/Puerto de la Morcuera 14 B4 @@ -16529,12 +16457,6 @@ A8CE90 (base 16) CVC San Jose CA 95113 US -00-04-13 (hex) SNOM Technology AG -000413 (base 16) SNOM Technology AG - Helmholtzstraße 2-9 - - DE - 00-04-18 (hex) Teltronic S.A.U. 000418 (base 16) Teltronic S.A.U. Poligono de Malpica @@ -17237,12 +17159,6 @@ A8CE90 (base 16) CVC FR -00-02-84 (hex) AREVA T&D -000284 (base 16) AREVA T&D - Avenue de Figuieres BP 75 - - FR - 00-02-7D (hex) Cisco Systems, Inc 00027D (base 16) Cisco Systems, Inc 80 West Tasman Drive @@ -22088,48 +22004,6 @@ EC086B (base 16) TP-LINK TECHNOLOGIES CO.,LTD. Shenzhen Guangdong 518057 CN -24-21-AB (hex) Sony Mobile Communications AB -2421AB (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -6C-23-B9 (hex) Sony Mobile Communications AB -6C23B9 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -58-17-0C (hex) Sony Mobile Communications AB -58170C (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -B8-F9-34 (hex) Sony Mobile Communications AB -B8F934 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -20-54-76 (hex) Sony Mobile Communications AB -205476 (base 16) Sony Mobile Communications AB - Mobilvägen 10 - Lund 22188 - SE - -30-39-26 (hex) Sony Mobile Communications AB -303926 (base 16) Sony Mobile Communications AB - Mobilvägen 10 - Lund 22181 - SE - -00-EB-2D (hex) Sony Mobile Communications AB -00EB2D (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - B0-05-94 (hex) Liteon Technology Corporation B00594 (base 16) Liteon Technology Corporation 4F,90,Chien 1 Road,ChungHo @@ -22172,24 +22046,6 @@ D0DF9A (base 16) Liteon Technology Corporation Tokyo 141-0001 JP -00-21-9E (hex) Sony Mobile Communications AB -00219E (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -00-1E-45 (hex) Sony Mobile Communications AB -001E45 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-18-13 (hex) Sony Mobile Communications AB -001813 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - 00-21-63 (hex) ASKEY COMPUTER CORP 002163 (base 16) ASKEY COMPUTER CORP 10F,NO.119.CHIENKANG RD,CHUNG-HO, @@ -25652,12 +25508,6 @@ D4CF37 (base 16) Symbolic IO Holmdel NJ 07733 US -28-3F-69 (hex) Sony Mobile Communications AB -283F69 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - F0-D2-F1 (hex) Amazon Technologies Inc. F0D2F1 (base 16) Amazon Technologies Inc. P.O Box 8102 @@ -26729,30 +26579,6 @@ A00460 (base 16) NETGEAR San Jose CA 95134 US -AC-FD-93 (hex) Weifang GoerTek Technology Co.,Ltd. -ACFD93 (base 16) Weifang GoerTek Technology Co.,Ltd. - Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China - Weifang Shandong 261205 - CN - -A4-53-85 (hex) Weifang GoerTek Technology Co.,Ltd. -A45385 (base 16) Weifang GoerTek Technology Co.,Ltd. - Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China - Weifang Shandong 261205 - CN - -2C-4D-79 (hex) Weifang GoerTek Technology Co.,Ltd. -2C4D79 (base 16) Weifang GoerTek Technology Co.,Ltd. - No.268 Dongfang Road - Weifang Shandong 261000 - CN - -84-17-66 (hex) Weifang GoerTek Technology Co.,Ltd. -841766 (base 16) Weifang GoerTek Technology Co.,Ltd. - Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China - Wei Fang Shan Dong - CN - 74-1C-27 (hex) ITEL MOBILE LIMITED 741C27 (base 16) ITEL MOBILE LIMITED RM B3 & B4 BLOCK B, KO FAI INDUSTRIAL BUILDING NO.7 KO FAI ROAD, YAU TONG, KLN, H.K @@ -27029,9 +26855,6 @@ E4A7C5 (base 16) HUAWEI TECHNOLOGIES CO.,LTD GUMI KYUNGBUK 730-030 KR -8C-E7-48 (hex) Private -8CE748 (base 16) Private - 48-D3-5D (hex) Private 48D35D (base 16) Private @@ -29069,6 +28892,24 @@ E48F65 (base 16) Yelatma Instrument Making Enterprise, JSC Beijing Beijing 100029 CN +54-B2-03 (hex) PEGATRON CORPORATION +54B203 (base 16) PEGATRON CORPORATION + 5F No. 76, Ligong St., Beitou District + Taipei City Taiwan 112 + TW + +E4-EA-83 (hex) SHENZHEN GONGJIN ELECTRONICS CO.,LT +E4EA83 (base 16) SHENZHEN GONGJIN ELECTRONICS CO.,LT + SONGGANG + SHENZHEN GUANGDONG 518105 + CN + +D0-8A-91 (hex) Technicolor CH USA Inc. +D08A91 (base 16) Technicolor CH USA Inc. + 101 West 103rd St. + Indianapolis IN 46290 + US + 00-15-D0 (hex) ARRIS Group, Inc. 0015D0 (base 16) ARRIS Group, Inc. 6450 Sequence Drive @@ -29369,6 +29210,357 @@ CCA462 (base 16) ARRIS Group, Inc. CAMBRIDGE MA 02142 US +54-48-10 (hex) Dell Inc. +544810 (base 16) Dell Inc. + One Dell Way + Round Rock TX 78682 + US + +00-04-13 (hex) snom technology GmbH +000413 (base 16) snom technology GmbH + Wittestr 30 G + Berlin 13509 + DE + +8C-E7-48 (hex) Private +8CE748 (base 16) Private + +C0-D2-F3 (hex) Hui Zhou Gaoshengda Technology Co.,LTD +C0D2F3 (base 16) Hui Zhou Gaoshengda Technology Co.,LTD + No.75,Zhongkai High-Tech Development District,Huizhou + Hui Zhou Guangdong 516006 + CN + +C4-24-56 (hex) Palo Alto Networks +C42456 (base 16) Palo Alto Networks + 3000 Tannery Way + Santa Clara CA 95054 + US + +B8-83-03 (hex) Hewlett Packard Enterprise +B88303 (base 16) Hewlett Packard Enterprise + 8000 Foothills Blvd. + Roseville CA 95747 + US + +E4-CA-12 (hex) zte corporation +E4CA12 (base 16) zte corporation + 12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China + shenzhen guangdong 518057 + CN + +B4-B6-86 (hex) Hewlett Packard +B4B686 (base 16) Hewlett Packard + 11445 Compaq Center Drive + Houston TX 77070 + US + +C8-B1-EE (hex) Qorvo +C8B1EE (base 16) Qorvo + 1 Changi Business Park Crescent, Avenue 1, #04-01 + NA 486058 + SG + +48-2A-E3 (hex) Wistron InfoComm(Kunshan)Co.,Ltd. +482AE3 (base 16) Wistron InfoComm(Kunshan)Co.,Ltd. + 168# First Avenue,Kunshan Integrated Free Trade Zone,Kunshan,Jiangsu,China + Kunshan Jiangsu 215300 + CN + +B0-EB-57 (hex) HUAWEI TECHNOLOGIES CO.,LTD +B0EB57 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +60-FA-9D (hex) HUAWEI TECHNOLOGIES CO.,LTD +60FA9D (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +DC-99-14 (hex) HUAWEI TECHNOLOGIES CO.,LTD +DC9914 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +2C-97-B1 (hex) HUAWEI TECHNOLOGIES CO.,LTD +2C97B1 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +70-89-CC (hex) China Mobile Group Device Co.,Ltd. +7089CC (base 16) China Mobile Group Device Co.,Ltd. + 32 Xuanwumen West Street,Xicheng District + Beijing 100053 + CN + +8C-15-C7 (hex) HUAWEI TECHNOLOGIES CO.,LTD +8C15C7 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +A4-BE-2B (hex) HUAWEI TECHNOLOGIES CO.,LTD +A4BE2B (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +7C-96-D2 (hex) Fihonest communication co.,Ltd +7C96D2 (base 16) Fihonest communication co.,Ltd + The Frist Building ,ShangKeng Industrial Zone, Changping Town + Dongguan Guangdong 523560 + CN + +B8-F9-34 (hex) Sony Mobile Communications AB +B8F934 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +58-17-0C (hex) Sony Mobile Communications AB +58170C (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +6C-23-B9 (hex) Sony Mobile Communications AB +6C23B9 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +24-21-AB (hex) Sony Mobile Communications AB +2421AB (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-18-13 (hex) Sony Mobile Communications AB +001813 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1E-45 (hex) Sony Mobile Communications AB +001E45 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +BC-6E-64 (hex) Sony Mobile Communications AB +BC6E64 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-EB-2D (hex) Sony Mobile Communications AB +00EB2D (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +30-39-26 (hex) Sony Mobile Communications AB +303926 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +20-54-76 (hex) Sony Mobile Communications AB +205476 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +1C-7B-21 (hex) Sony Mobile Communications AB +1C7B21 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +A0-E4-53 (hex) Sony Mobile Communications AB +A0E453 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-21-9E (hex) Sony Mobile Communications AB +00219E (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +28-3F-69 (hex) Sony Mobile Communications AB +283F69 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +0C-B6-D2 (hex) D-Link International +0CB6D2 (base 16) D-Link International + 1 Internal Business Park, #03-12,The Synergy, Singapore + Singapore Singapore 609917 + SG + +B8-B7-F1 (hex) Wistron Neweb Corporation +B8B7F1 (base 16) Wistron Neweb Corporation + No.20,Park Avenue II,Hsinchu Science Park + Hsin-Chu R.O.C. 308 + TW + +44-EF-CF (hex) UGENE SOLUTION inc. +44EFCF (base 16) UGENE SOLUTION inc. + A-1508, 1509, 583, Yangcheon-ro, Gangseo-gu + Seoul KS013 + KR + +00-13-8A (hex) Qingdao GoerTek Technology Co., Ltd. +00138A (base 16) Qingdao GoerTek Technology Co., Ltd. + Room 605,Innovation Building,Hi-tech Industrial Park, + QINGDAO SHANDONG 266061 + CN + +84-17-66 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +841766 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China + Wei Fang Shan Dong + CN + +2C-4D-79 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +2C4D79 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + No.268 Dongfang Road + Weifang Shandong 261000 + CN + +A4-53-85 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +A45385 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China + Weifang Shandong 261205 + CN + +AC-FD-93 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +ACFD93 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China + Weifang Shandong 261205 + CN + +0C-E0-DC (hex) Samsung Electronics Co.,Ltd +0CE0DC (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +10-8E-E0 (hex) Samsung Electronics Co.,Ltd +108EE0 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +68-E7-C2 (hex) Samsung Electronics Co.,Ltd +68E7C2 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +3C-57-6C (hex) Samsung Electronics Co.,Ltd +3C576C (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +D4-21-22 (hex) Sercomm Corporation. +D42122 (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +F4-EE-14 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +F4EE14 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +6C-59-40 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +6C5940 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +1C-60-DE (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +1C60DE (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +A8-D4-98 (hex) Avira Operations GmbH & Co. KG +A8D498 (base 16) Avira Operations GmbH & Co. KG + Kaplaneiweg 1 + Tettnang Baden-Wuerttermberg 88069 + DE + +98-A4-04 (hex) Ericsson AB +98A404 (base 16) Ericsson AB + Torshamnsgatan 36 + Stockholm SE-164 80 + SE + +00-CC-3F (hex) Universal Electronics, Inc. +00CC3F (base 16) Universal Electronics, Inc. + 201 E. Sandpointe Ave + Santa Ana CA 92707 + US + +50-61-BF (hex) Cisco Systems, Inc +5061BF (base 16) Cisco Systems, Inc + 80 West Tasman Drive + San Jose CA 94568 + US + +20-A6-0C (hex) Xiaomi Communications Co Ltd +20A60C (base 16) Xiaomi Communications Co Ltd + The Rainbow City of China Resources + NO.68, Qinghe Middle Street Haidian District, Beijing 100085 + CN + +04-AB-18 (hex) ELECOM CO.,LTD. +04AB18 (base 16) ELECOM CO.,LTD. + 11F Tokyubancho Bldg. 6-2, + Chiyoda-ku Tokyo 102-0081 + JP + +00-26-BD (hex) JTEC Card & Communication Co., Ltd +0026BD (base 16) JTEC Card & Communication Co., Ltd + Dabo Bldg, 4F, 61-1, Gyesu-dong, Sosa-gu + Bucheon Gyunggi-do 422-070 + KR + +00-15-1E (hex) ETHERNET Powerlink Standarization Group (EPSG) +00151E (base 16) ETHERNET Powerlink Standarization Group (EPSG) + c/o Zurich University of Applied Sciences + CH-8401 Winterthur + CH + +4C-5E-0C (hex) Routerboard.com +4C5E0C (base 16) Routerboard.com + Mikrotikls SIA + Riga LV1009 + LV + +64-1C-67 (hex) DIGIBRAS INDUSTRIA DO BRASILS/A +641C67 (base 16) DIGIBRAS INDUSTRIA DO BRASILS/A + Rua Tambaqui, 180-B - MANAUS - AM ¨C BRAZIL + MANAUS 69075-210 + BR + +00-02-84 (hex) UK Grid Solutions Limited +000284 (base 16) UK Grid Solutions Limited + St Leonards Building Redhill Business Park + Stafford ST16 1TW + GB + 0C-6F-9C (hex) Shaw Communications Inc. 0C6F9C (base 16) Shaw Communications Inc. Suite 900, 630 3rd Avenue S.W. @@ -30581,12 +30773,6 @@ ECB870 (base 16) Beijing Heweinet Technology Co.,Ltd. Shanghai / 200355 CN -40-40-A7 (hex) Sony Mobile Communications AB -4040A7 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 54-BE-53 (hex) zte corporation 54BE53 (base 16) zte corporation 12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China @@ -30881,12 +31067,6 @@ A4A1E4 (base 16) Innotube, Inc. Taipei Taiwan 112 TW -40-B8-37 (hex) Sony Mobile Communications AB -40B837 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 28-76-10 (hex) IgniteNet 287610 (base 16) IgniteNet 1, Creation 3rd Rd. @@ -31019,12 +31199,6 @@ F87AEF (base 16) Rosonix Technology, Inc. Taipei Taiwan 11167 TW -C4-3A-BE (hex) Sony Mobile Communications AB -C43ABE (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 18-B1-69 (hex) Sonicwall 18B169 (base 16) Sonicwall 2001 Logic Drive @@ -31271,12 +31445,6 @@ B04515 (base 16) mira fitness,LLC. Lake Forest IL 60045 US -30-75-12 (hex) Sony Mobile Communications AB -307512 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - A4-9D-49 (hex) Ketra, Inc. A49D49 (base 16) Ketra, Inc. 3815 S. Capital of Texas Hwy @@ -32681,12 +32849,6 @@ F42012 (base 16) Cuciniale GmbH Lindau 88131 DE -4C-21-D0 (hex) Sony Mobile Communications AB -4C21D0 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 18-10-4E (hex) CEDINT-UPM 18104E (base 16) CEDINT-UPM Campus de Montegancedo @@ -38378,12 +38540,6 @@ D0D286 (base 16) Beckman Coulter K.K. Macquarie Park NSW 2113 AU -00-21-06 (hex) RIM Testing Services -002106 (base 16) RIM Testing Services - 440 Phillip Street - Waterloo ON N2L 5R9 - CA - 00-1F-FF (hex) Respironics, Inc. 001FFF (base 16) Respironics, Inc. 1740 Golden Mile Highway @@ -44411,12 +44567,6 @@ D0D286 (base 16) Beckman Coulter K.K. Sanchong City Taipei 241 TW -00-0A-DB (hex) SkyPilot Network, Inc -000ADB (base 16) SkyPilot Network, Inc - 1301 Shoreway Road - Belmont CA 94002 - US - 00-0A-DD (hex) Allworx Corp. 000ADD (base 16) Allworx Corp. 245 East Main Street @@ -47609,12 +47759,6 @@ D0D286 (base 16) Beckman Coulter K.K. RENO NV 89511 US -00-90-7F (hex) WatchGuard Technologies, Inc. -00907F (base 16) WatchGuard Technologies, Inc. - 505 Fifth Ave South - Seattle WA 98104 - US - 00-90-7E (hex) VETRONIX CORP. 00907E (base 16) VETRONIX CORP. 2030 ALAMEDE PADRE SERRA @@ -48155,12 +48299,6 @@ D0D286 (base 16) Beckman Coulter K.K. TU-CHENG TAIPEI TW -00-10-17 (hex) Bosch Access Systems GmbH -001017 (base 16) Bosch Access Systems GmbH - Charlottenburger Allee 50 - AACHEN D-52068 - DE - 00-10-24 (hex) NAGOYA ELECTRIC WORKS CO., LTD 001024 (base 16) NAGOYA ELECTRIC WORKS CO., LTD 29-1 SHINODA, MIWA-CHO @@ -51386,30 +51524,6 @@ ECCD6D (base 16) Allied Telesis, Inc. Hsinchu 30352 TW -40-2B-A1 (hex) Sony Mobile Communications AB -402BA1 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -00-25-E7 (hex) Sony Mobile Communications AB -0025E7 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -D0-51-62 (hex) Sony Mobile Communications AB -D05162 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - -94-CE-2C (hex) Sony Mobile Communications AB -94CE2C (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - 00-1A-80 (hex) Sony Corporation 001A80 (base 16) Sony Corporation Gotenyama Tec, 5-1-2 Kitashinagawa @@ -51422,18 +51536,6 @@ D05162 (base 16) Sony Mobile Communications AB Shinagawa-ku Tokyo 141-0001 JP -00-16-20 (hex) Sony Mobile Communications AB -001620 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-12-EE (hex) Sony Mobile Communications AB -0012EE (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - 20-68-9D (hex) Liteon Technology Corporation 20689D (base 16) Liteon Technology Corporation 4F,90,Chien 1 Road,ChungHo @@ -53219,12 +53321,6 @@ C411E0 (base 16) Bull Group Co., Ltd Billund DK-7190 DK -84-C7-EA (hex) Sony Mobile Communications AB -84C7EA (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 8C-61-02 (hex) Beijing Baofengmojing Technologies Co., Ltd 8C6102 (base 16) Beijing Baofengmojing Technologies Co., Ltd 7/F, Tower C, Zhizhen Plaza, No.7 Zhichun Rd, Haidian District @@ -54329,9 +54425,6 @@ C0143D (base 16) Hon Hai Precision Ind. Co.,Ltd. Rowley MA 01969 US -60-4B-AA (hex) Private -604BAA (base 16) Private - CC-73-14 (hex) HONG KONG WHEATEK TECHNOLOGY LIMITED CC7314 (base 16) HONG KONG WHEATEK TECHNOLOGY LIMITED Building 20,No.2277, ZuChongZhi Road, PuDong District, Shanghai @@ -55517,12 +55610,6 @@ A013CB (base 16) Fiberhome Telecommunication Technologies Co.,LTD Wuhan Hubei 430074 CN -CC-3A-DF (hex) Neptune Technology Group Inc. -CC3ADF (base 16) Neptune Technology Group Inc. - 1600 AL Highway 229 S - Tallassee AL 36078 - US - 28-ED-E0 (hex) AMPAK Technology, Inc. 28EDE0 (base 16) AMPAK Technology, Inc. No.1,Jen Ai Road Hsinchu Industrial Park, Hukou @@ -57137,12 +57224,6 @@ F87394 (base 16) NETGEAR San Jose CA 95134 US -40-1B-5F (hex) Weifang GoerTek Technology Co.,Ltd. -401B5F (base 16) Weifang GoerTek Technology Co.,Ltd. - Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China - Weifang Shandong 261205 - CN - AC-51-2C (hex) Infinix mobility limited AC512C (base 16) Infinix mobility limited RMS 05-15, 13A/F SOUTH TOWER WORLD FINANCE CTR HARBOUR CITY 17 CANTON RD TST KLN HONG KONG @@ -58691,12 +58772,6 @@ A4ED4E (base 16) ARRIS Group, Inc. Round Rock TX 78682 US -9C-7F-57 (hex) DERA Co. Ltd -9C7F57 (base 16) DERA Co. Ltd - Huilongguan Dongdajie No.338, Building A Room 506, Changping District - Beijing 102208 - CN - B4-E0-1D (hex) CONCEPTION ELECTRONIQUE B4E01D (base 16) CONCEPTION ELECTRONIQUE 3 boulevard de l'europe @@ -58715,6 +58790,12 @@ B4E01D (base 16) CONCEPTION ELECTRONIQUE Shenzhen Guangdong 518000 CN +9C-7F-57 (hex) DERA Co. Ltd +9C7F57 (base 16) DERA Co. Ltd + Huilongguan Dongdajie No.338, Building A Room 506, Changping District + Beijing 102208 + CN + 00-E0-09 (hex) Stratus Technologies 00E009 (base 16) Stratus Technologies 5 Mill and Main Place, Suite 500 @@ -58745,12 +58826,6 @@ A0E617 (base 16) MATIS Shintomi,Chuo-Ku, Tokyo 104-0041 JP -84-0D-8E (hex) Espressif Inc. -840D8E (base 16) Espressif Inc. - Room 204, Building 2, 690 Bibo Road, Pudong New Area - Shanghai Shanghai 201203 - CN - 50-5B-C2 (hex) Liteon Technology Corporation 505BC2 (base 16) Liteon Technology Corporation 4F, 90, Chien 1 Road @@ -58763,12 +58838,312 @@ D832E3 (base 16) Xiaomi Communications Co Ltd NO.68, Qinghe Middle Street Haidian District, Beijing 100085 CN +84-0D-8E (hex) Espressif Inc. +840D8E (base 16) Espressif Inc. + Room 204, Building 2, 690 Bibo Road, Pudong New Area + Shanghai Shanghai 201203 + CN + FC-90-FA (hex) Independent Technologies FC90FA (base 16) Independent Technologies 1960 Ridgeview Rd Blair NE 68008 US +CC-C9-2C (hex) Schindler - PORT Technology +CCC92C (base 16) Schindler - PORT Technology + via della Pace 22 + Locarno Ticino 6600 + CH + +7C-2E-BD (hex) Google, Inc. +7C2EBD (base 16) Google, Inc. + 1600 Amphitheatre Parkway + Mountain View CA 94043 + US + +E0-BA-B4 (hex) Arrcus, Inc +E0BAB4 (base 16) Arrcus, Inc + 2077 Gateway Pl, Suite 250, + San Jose CA 95110 + US + +00-0A-DB (hex) Trilliant +000ADB (base 16) Trilliant + 401 Harrison Oaks Blvd. Suite 300 + Cary NC 27513 + US + +3C-F5-CC (hex) New H3C Technologies Co., Ltd +3CF5CC (base 16) New H3C Technologies Co., Ltd + 466 Changhe Road, Binjiang District + Hangzhou Zhejiang 310052 + CN + +74-EC-42 (hex) Fiberhome Telecommunication Technologies Co.,LTD +74EC42 (base 16) Fiberhome Telecommunication Technologies Co.,LTD + No.5 DongXin Road + Wuhan Hubei 430074 + CN + +CC-3A-DF (hex) Private +CC3ADF (base 16) Private + +60-4B-AA (hex) Private +604BAA (base 16) Private + +2C-58-4F (hex) ARRIS Group, Inc. +2C584F (base 16) ARRIS Group, Inc. + 6450 Sequence Drive + San Diego CA 92121 + US + +90-A1-37 (hex) Beijing Splendidtel Communication Technology Co,. Ltd +90A137 (base 16) Beijing Splendidtel Communication Technology Co,. Ltd + 4 Floor,Taixing Tower,No.11 Huayuan East Road. Haidian District + Beijing Beijing 100191 + CN + +78-AF-E4 (hex) Comau S.p.A +78AFE4 (base 16) Comau S.p.A + via Rivalta 30 + Grugliasco (TO) 10095 + IT + +AC-3B-77 (hex) Sagemcom Broadband SAS +AC3B77 (base 16) Sagemcom Broadband SAS + 250, route de l'Empereur + Rueil Malmaison Cedex hauts de seine 92848 + FR + +00-C3-F4 (hex) Samsung Electronics Co.,Ltd +00C3F4 (base 16) Samsung Electronics Co.,Ltd + 129, Samsung-ro, Youngtongl-Gu + Suwon Gyeonggi-Do 16677 + KR + +B8-8A-EC (hex) Nintendo Co.,Ltd +B88AEC (base 16) Nintendo Co.,Ltd + 11-1 HOKOTATE-CHO KAMITOBA,MINAMI-KU + KYOTO KYOTO 601-8501 + JP + +F4-BF-80 (hex) HUAWEI TECHNOLOGIES CO.,LTD +F4BF80 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +30-45-96 (hex) HUAWEI TECHNOLOGIES CO.,LTD +304596 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +F8-C3-9E (hex) HUAWEI TECHNOLOGIES CO.,LTD +F8C39E (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +D0-D7-83 (hex) HUAWEI TECHNOLOGIES CO.,LTD +D0D783 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +D8-F3-DB (hex) Post CH AG +D8F3DB (base 16) Post CH AG + Wankdorfallee 4 + Bern 3030 + CH + +28-11-A5 (hex) Bose Corporation +2811A5 (base 16) Bose Corporation + The Mountain + Framingham MA 01701-9168 + US + +3C-F4-F9 (hex) Moda-InnoChips +3CF4F9 (base 16) Moda-InnoChips + 42-7(Wonsi-Dong),Dongsan-ro 27beon-gil,Danwon-gu + Ansan-si Gyeonggi-Do 15433 + KR + +30-88-41 (hex) Sichuan AI-Link Technology Co., Ltd. +308841 (base 16) Sichuan AI-Link Technology Co., Ltd. + Anzhou,Industrial Park + Anzhou,Industrial Park Sichuan 621000 + CN + +0C-01-DB (hex) Infinix mobility limited +0C01DB (base 16) Infinix mobility limited + RMS 05-15, 13A/F SOUTH TOWER WORLD FINANCE CTR HARBOUR CITY 17 CANTON RD TST KLN HONG KONG + HongKong HongKong 999077 + HK + +80-50-F6 (hex) ITEL MOBILE LIMITED +8050F6 (base 16) ITEL MOBILE LIMITED + RM B3 & B4 BLOCK B, KO FAI INDUSTRIAL BUILDING NO.7 KO FAI ROAD, YAU TONG, KLN, H.K + Hong Kong KOWLOON 999077 + HK + +40-1B-5F (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +401B5F (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China + Weifang Shandong 261205 + CN + +F0-4B-3A (hex) Juniper Networks +F04B3A (base 16) Juniper Networks + 1133 Innovation Way + Sunnyvale CA 94089 + US + +D0-58-FC (hex) BSkyB Ltd +D058FC (base 16) BSkyB Ltd + 130 Kings Road + Brentwood Essex 08854 + GB + +74-EB-80 (hex) Samsung Electronics Co.,Ltd +74EB80 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +A8-2B-B9 (hex) Samsung Electronics Co.,Ltd +A82BB9 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +00-10-17 (hex) Bosch Access Systems GmbH +001017 (base 16) Bosch Access Systems GmbH + Charlottenburger Allee 50 + AACHEN D-52068 + DE + +74-B9-1E (hex) Nanjing Bestway Automation System Co., Ltd +74B91E (base 16) Nanjing Bestway Automation System Co., Ltd + #50 Baoxiang Road, Jiangning Bin Jiang Economic Development Zone + nanjing jiangsu 211161 + CN + +60-05-8A (hex) Hitachi Metals, Ltd. +60058A (base 16) Hitachi Metals, Ltd. + Shinagawa Season Terrace, 2-70, Konan 1-chome + Minato-ku Tokyo 108-8224 + JP + +00-21-06 (hex) RIM Testing Services +002106 (base 16) RIM Testing Services + 440 Phillip Street + Waterloo ON N2L 5R9 + CA + +00-90-7F (hex) Watchguard Technologies, Inc. +00907F (base 16) Watchguard Technologies, Inc. + 505 Fifth Ave South + Seattle WA 98104 + US + +14-57-9F (hex) HUAWEI TECHNOLOGIES CO.,LTD +14579F (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +14-4F-8A (hex) Intel Corporate +144F8A (base 16) Intel Corporate + Lot 8, Jalan Hi-Tech 2/3 + Kulim Kedah 09000 + MY + +88-2D-53 (hex) Baidu Online Network Technology (Beijing) Co., Ltd. +882D53 (base 16) Baidu Online Network Technology (Beijing) Co., Ltd. + Baidu Campus, No.10 Shangdi 10th Street, Haidian District Beijing 100085 CN + Beijing 100085 + CN + +A4-DA-32 (hex) Texas Instruments +A4DA32 (base 16) Texas Instruments + 12500 TI Blvd + Dallas TX 75243 + US + +4C-21-D0 (hex) Sony Mobile Communications AB +4C21D0 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +30-75-12 (hex) Sony Mobile Communications AB +307512 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +C4-3A-BE (hex) Sony Mobile Communications AB +C43ABE (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +40-B8-37 (hex) Sony Mobile Communications AB +40B837 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +40-40-A7 (hex) Sony Mobile Communications AB +4040A7 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +94-CE-2C (hex) Sony Mobile Communications AB +94CE2C (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +D0-51-62 (hex) Sony Mobile Communications AB +D05162 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-25-E7 (hex) Sony Mobile Communications AB +0025E7 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +40-2B-A1 (hex) Sony Mobile Communications AB +402BA1 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-12-EE (hex) Sony Mobile Communications AB +0012EE (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-16-20 (hex) Sony Mobile Communications AB +001620 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +84-C7-EA (hex) Sony Mobile Communications AB +84C7EA (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + 58-46-E1 (hex) Baxter International Inc 5846E1 (base 16) Baxter International Inc One Baxter Parkway @@ -59033,12 +59408,6 @@ E899C4 (base 16) HTC Corporation Logan UT 84321 US -8C-F2-28 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -8CF228 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 88-51-FB (hex) Hewlett Packard 8851FB (base 16) Hewlett Packard 11445 Compaq Center Drive @@ -59255,12 +59624,6 @@ A01D48 (base 16) Hewlett Packard Beijing Beijing 100102 CN -E0-60-66 (hex) Sercomm Corporation -E06066 (base 16) Sercomm Corporation - 8F, 3-1, YuanQu St., NanKang, - Taipei Taiwan 115 - TW - 00-19-E0 (hex) TP-LINK TECHNOLOGIES CO.,LTD. 0019E0 (base 16) TP-LINK TECHNOLOGIES CO.,LTD. South Building, No.5 Keyuan Road @@ -60077,12 +60440,6 @@ E8DED6 (base 16) Intrising Networks, Inc. Chapel Hill NC 27514 US -BC-5F-F6 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -BC5FF6 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - C8-F9-C8 (hex) NewSharp Technology(SuZhou)Co,Ltd C8F9C8 (base 16) NewSharp Technology(SuZhou)Co,Ltd 1st/f.building 7th No.328 XingHu street SuZhou City @@ -61166,12 +61523,6 @@ C80210 (base 16) LG Innotek Shanghai Shanghai 200000 CN -44-74-6C (hex) Sony Mobile Communications AB -44746C (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - F4-F6-46 (hex) Dediprog Technology Co. Ltd. F4F646 (base 16) Dediprog Technology Co. Ltd. 4F,No.7,Lane 143, Xinming Rd., @@ -61430,12 +61781,6 @@ B48547 (base 16) Amptown System Company GmbH Osaka Osaka 532-0003 JP -30-A8-DB (hex) Sony Mobile Communications AB -30A8DB (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - CC-9F-35 (hex) Transbit Sp. z o.o. CC9F35 (base 16) Transbit Sp. z o.o. Przyczolkowa 109A @@ -64757,12 +65102,6 @@ BC99BC (base 16) FonSee Technology Inc. Incheon 405-819 KR -80-B3-2A (hex) Alstom Grid -80B32A (base 16) Alstom Grid - St Leonard's Ave - Stafford Staffordshire ST17 4LX - GB - 80-34-57 (hex) OT Systems Limited 803457 (base 16) OT Systems Limited Unit 1023, 10/F., Landmark North, @@ -70463,18 +70802,6 @@ A893E6 (base 16) JIANGXI JINGGANGSHAN CKING COMMUNICATION TECHNOLOGY CO.,LT Richardson TX 75081 US -00-14-77 (hex) Nertec Inc. -001477 (base 16) Nertec Inc. - 950 Cowie st. - Granby Quebec J2J 1P2 - CA - -00-14-72 (hex) China Broadband Wireless IP Standard Group -001472 (base 16) China Broadband Wireless IP Standard Group - P.O.BOX 88,West High-tech - Xi'an Shaan Xi 710075 - CN - 00-14-66 (hex) Kleinhenz Elektronik GmbH 001466 (base 16) Kleinhenz Elektronik GmbH Greinerberg 14 @@ -71525,12 +71852,6 @@ A893E6 (base 16) JIANGXI JINGGANGSHAN CKING COMMUNICATION TECHNOLOGY CO.,LT HK -00-11-1E (hex) EPSG (Ethernet Powerlink Standardization Group) -00111E (base 16) EPSG (Ethernet Powerlink Standardization Group) - c/o University of Applied Sciences - Winterthur ZH CH-8401 - CH - 00-11-1F (hex) Doremi Labs, Inc. 00111F (base 16) Doremi Labs, Inc. 306 E. Alameda Ave. @@ -73148,12 +73469,6 @@ A893E6 (base 16) JIANGXI JINGGANGSHAN CKING COMMUNICATION TECHNOLOGY CO.,LT Enfield CT 06082 US -00-09-DF (hex) Vestel Komunikasyon Sanayi ve Ticaret A.S. -0009DF (base 16) Vestel Komunikasyon Sanayi ve Ticaret A.S. - Ege Serbest Bolgesi No:144/1 - Izmir 35410 - TR - 00-09-CD (hex) HUDSON SOFT CO.,LTD. 0009CD (base 16) HUDSON SOFT CO.,LTD. C62,Geijutsu-no-mori @@ -77990,12 +78305,6 @@ A06A00 (base 16) Verilink Corporation MADISON HEIGHTS MI 48071 US -00-C0-02 (hex) SERCOMM CORPORATION -00C002 (base 16) SERCOMM CORPORATION - 3F,NO.81,YU-YIH ROAD,CHU-NAN CHEN - TAIPEI - TW - 00-C0-F5 (hex) METACOMP, INC. 00C0F5 (base 16) METACOMP, INC. 10989 VIA FRONTERA @@ -78578,12 +78887,6 @@ A06A00 (base 16) Verilink Corporation HONG KONG HK -00-80-B6 (hex) THEMIS COMPUTER -0080B6 (base 16) THEMIS COMPUTER - 6681 OWENS DRIVE - PLEASONTON CA 94588 - US - 00-80-C0 (hex) PENRIL DATACOMM 0080C0 (base 16) PENRIL DATACOMM 1300 QUINCE ORCHARD BLVD. @@ -78908,12 +79211,6 @@ A06A00 (base 16) Verilink Corporation MILPITAS CA 95035 US -00-40-9D (hex) DIGIBOARD, INC. -00409D (base 16) DIGIBOARD, INC. - 6400 FLYING CLOUD DRIVE - EDEN PRAIRIE MN 55344 - US - 00-40-1A (hex) FUJI ELECTRIC CO., LTD. 00401A (base 16) FUJI ELECTRIC CO., LTD. NEW YURAKUCHO BLDG @@ -80144,60 +80441,12 @@ B8EE65 (base 16) Liteon Technology Corporation Shinagawa-ku Tokyo 141-0001 JP -00-0A-D9 (hex) Sony Mobile Communications AB -000AD9 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-0F-DE (hex) Sony Mobile Communications AB -000FDE (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-1E-DC (hex) Sony Mobile Communications AB -001EDC (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -00-19-63 (hex) Sony Mobile Communications AB -001963 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-1B-59 (hex) Sony Mobile Communications AB -001B59 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - 78-84-3C (hex) Sony Corporation 78843C (base 16) Sony Corporation Gotenyama Tec,5-1-12, Shinagawa-ku Tokyo 141-0001 JP -00-23-F1 (hex) Sony Mobile Communications AB -0023F1 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -30-17-C8 (hex) Sony Mobile Communications AB -3017C8 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -18-00-2D (hex) Sony Mobile Communications AB -18002D (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - 04-E6-76 (hex) AMPAK Technology, Inc. 04E676 (base 16) AMPAK Technology, Inc. No.1,Jen Ai Road @@ -81866,12 +82115,6 @@ D8D43C (base 16) Sony Corporation Dongguan 523808 CN -C8-77-8B (hex) Themis Computer -C8778B (base 16) Themis Computer - 47200 Bayside Pkwy - Fremont CA 94538 - US - 00-0A-68 (hex) Solarflare Communications Inc 000A68 (base 16) Solarflare Communications Inc 9501 Jeronimo @@ -82556,12 +82799,6 @@ BC282C (base 16) e-Smart Systems Pvt. Ltd Dallas TX 75243 US -F8-5C-4D (hex) NOKIA -F85C4D (base 16) NOKIA - 1 Robbins Road - Westford 01886-4113 - US - D8-E7-2B (hex) NetScout Systems, Inc. D8E72B (base 16) NetScout Systems, Inc. 310 Littleton Road @@ -85073,12 +85310,6 @@ A021B7 (base 16) NETGEAR San Jose CA 95134 US -A4-15-66 (hex) Weifang GoerTek Technology Co.,Ltd. -A41566 (base 16) Weifang GoerTek Technology Co.,Ltd. - Wei fang Export processing Zone - Wei Fang Shan Dong 261205 - CN - 74-E6-0F (hex) TECNO MOBILE LIMITED 74E60F (base 16) TECNO MOBILE LIMITED ROOMS 05-15, 13A/F., SOUTH TOWER, WORLD FINANCE CENTRE, HARBOUR CITY, 17 CANTON ROAD, TSIM SHA TSUI, KOWLOON, HONG KONG @@ -85097,9 +85328,6 @@ D8C497 (base 16) Quanta Computer Inc. Berlin Berlin 10559 DE -00-50-C7 (hex) Private -0050C7 (base 16) Private - 40-99-22 (hex) AzureWave Technology Inc. 409922 (base 16) AzureWave Technology Inc. 8F., No. 94, Baozhong Rd. @@ -85220,9 +85448,6 @@ CC5A53 (base 16) Cisco Systems, Inc Obersulm BW 74182 DE -28-EF-01 (hex) Private -28EF01 (base 16) Private - A8-75-E2 (hex) Aventura Technologies, Inc. A875E2 (base 16) Aventura Technologies, Inc. 48 Mall Drive @@ -86318,15 +86543,189 @@ F04CD5 (base 16) Maxlinear, Inc Carlsbad CA 92008 US -AC-F8-5C (hex) Private -ACF85C (base 16) Private +BC-99-11 (hex) Zyxel Communications Corporation +BC9911 (base 16) Zyxel Communications Corporation + No. 6 Innovation Road II, Science Park + Hsichu Taiwan 300 + TW + +28-02-45 (hex) Konze System Technology Co.,Ltd. +280245 (base 16) Konze System Technology Co.,Ltd. + 4F., No.134, Ln. 235, Baoqiao Rd., Xindian Dist. + New Taipei City --- 231 + TW + +8C-1C-DA (hex) IEEE Registration Authority +8C1CDA (base 16) IEEE Registration Authority + 445 Hoes Lane + Piscataway NJ 08554 + US + +E8-D0-99 (hex) Fiberhome Telecommunication Technologies Co.,LTD +E8D099 (base 16) Fiberhome Telecommunication Technologies Co.,LTD + No.5 DongXin Road + Wuhan Hubei 430074 + CN + +D0-B2-14 (hex) PoeWit Inc +D0B214 (base 16) PoeWit Inc + 2307 Sea Island Dr + Fort Lauderdale FL 33301 + US + +08-47-D0 (hex) Nokia Shanghai Bell Co. Ltd.) +0847D0 (base 16) Nokia Shanghai Bell Co. Ltd.) + No.388 Ning Qiao Road,Jin Qiao Pudong Shanghai 201206,P.R.China + Shanghai Pudong 201206 + CN + +18-69-DA (hex) China Mobile Group Device Co.,Ltd. +1869DA (base 16) China Mobile Group Device Co.,Ltd. + 32 Xuanwumen West Street,Xicheng District + Beijing 100053 + CN + +60-D2-1C (hex) Sunnovo International Limited +60D21C (base 16) Sunnovo International Limited + 1717 Haitai Building + Beijing Beijing 100083 + CN + +A4-92-CB (hex) Nokia +A492CB (base 16) Nokia + 600 March Road + Kanata Ontario K2K 2E6 + CA + +DC-B4-AC (hex) FLEXTRONICS MANUFACTURING(ZHUHAI)CO.,LTD. +DCB4AC (base 16) FLEXTRONICS MANUFACTURING(ZHUHAI)CO.,LTD. + Xin Qing Science & Technology Industrial Park,Jin An Town,Doumen ,Zhuhai,Guangdong,PRC + Zhuhai Guangdong 519180 + CN + +5C-CD-7C (hex) MEIZU Technology Co.,Ltd. +5CCD7C (base 16) MEIZU Technology Co.,Ltd. + MEIZU Tech Bldg., Technology& Innovation Coast + Zhuhai Guangdong 519085 + CN + +A8-7D-12 (hex) HUAWEI TECHNOLOGIES CO.,LTD +A87D12 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +C0-F4-E6 (hex) HUAWEI TECHNOLOGIES CO.,LTD +C0F4E6 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +2C-48-35 (hex) IEEE Registration Authority +2C4835 (base 16) IEEE Registration Authority + 445 Hoes Lane + Piscataway NJ 08554 + US D4-60-E3 (hex) Sercomm Corporation. D460E3 (base 16) Sercomm Corporation. - violet_liu@sercomm.com + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen Miao-Lih Hsuan 115 TW +00-C0-02 (hex) Sercomm Corporation. +00C002 (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +E0-60-66 (hex) Sercomm Corporation. +E06066 (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +A4-15-66 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +A41566 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Wei fang Export processing Zone + Wei Fang Shan Dong 261205 + CN + +FC-A6-21 (hex) Samsung Electronics Co.,Ltd +FCA621 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +60-D0-2C (hex) Ruckus Wireless +60D02C (base 16) Ruckus Wireless + 350 West Java Drive + Sunnyvale CA 94089 + US + +8C-F2-28 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +8CF228 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +00-80-B6 (hex) Mercury Systems – Trusted Mission Solutions, Inc. +0080B6 (base 16) Mercury Systems – Trusted Mission Solutions, Inc. + 6681 OWENS DRIVE + PLEASONTON CA 94588 + US + +C8-77-8B (hex) Mercury Systems – Trusted Mission Solutions, Inc. +C8778B (base 16) Mercury Systems – Trusted Mission Solutions, Inc. + 47200 Bayside Pkwy + Fremont CA 94538 + US + +80-B3-2A (hex) UK Grid Solutions Ltd +80B32A (base 16) UK Grid Solutions Ltd + Harry Kerr Drive + Stafford Staffordshire ST17 4LX + GB + +00-09-DF (hex) Vestel Elektronik San ve Tic. A.Ş. +0009DF (base 16) Vestel Elektronik San ve Tic. A.Ş. + Organize san + Manisa Turket 45030 + TR + +BC-5F-F6 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +BC5FF6 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +9C-71-3A (hex) HUAWEI TECHNOLOGIES CO.,LTD +9C713A (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +B4-43-26 (hex) HUAWEI TECHNOLOGIES CO.,LTD +B44326 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +24-EC-51 (hex) ADF Technologies Sdn Bhd +24EC51 (base 16) ADF Technologies Sdn Bhd + Plot 88F, Lintang Bayan Lepas 10, Bayan Lepas Industrial Park Phase IV + Bayan Lepas Pulau Pinang 11900 + MY + +38-56-B5 (hex) Peerbridge Health Inc +3856B5 (base 16) Peerbridge Health Inc + 3 Columbus Circle 15th Fl + New York NY 10019 + US + +AC-F8-5C (hex) Private +ACF85C (base 16) Private + A0-39-EE (hex) Sagemcom Broadband SAS A039EE (base 16) Sagemcom Broadband SAS 250, route de l'Empereur @@ -87641,6 +88040,180 @@ E8FAF7 (base 16) Guangdong Uniteddata Holding Group Co., Ltd. NO.68, Qinghe Middle Street Haidian District, Beijing 100085 CN +C0-81-35 (hex) Ningbo Forfan technology Co., LTD +C08135 (base 16) Ningbo Forfan technology Co., LTD + Room B308,Tianjing Building,Tianan Cyber Park,Futian + Shenzhen Guangdong 518040 + CN + +B4-6B-FC (hex) Intel Corporate +B46BFC (base 16) Intel Corporate + Lot 8, Jalan Hi-Tech 2/3 + Kulim Kedah 09000 + MY + +00-50-C7 (hex) Private +0050C7 (base 16) Private + +00-14-77 (hex) Trilliant +001477 (base 16) Trilliant + 950 Cowie st. + Granby Quebec J2J 1P2 + CA + +28-EF-01 (hex) Private +28EF01 (base 16) Private + +F8-5C-4D (hex) Nokia +F85C4D (base 16) Nokia + 1 Robbins Road + Westford MA 01886-4113 + US + +F8-2D-C0 (hex) ARRIS Group, Inc. +F82DC0 (base 16) ARRIS Group, Inc. + 6450 Sequence Drive + San Diego CA 92121 + US + +A8-5B-6C (hex) Robert Bosch Gmbh, CM-CI2 +A85B6C (base 16) Robert Bosch Gmbh, CM-CI2 + Renningen + Stuttgart D-70465 + DE + +4C-ED-FB (hex) ASUSTek COMPUTER INC. +4CEDFB (base 16) ASUSTek COMPUTER INC. + 15,Li-Te Rd., Peitou, Taipei 112, Taiwan + Taipei Taiwan 112 + TW + +58-5F-F6 (hex) zte corporation +585FF6 (base 16) zte corporation + 12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China + shenzhen guangdong 518057 + CN + +A8-E5-52 (hex) JUWEL Aquarium AG & Co. KG +A8E552 (base 16) JUWEL Aquarium AG & Co. KG + Karl-Göx-Straße 1 + Rotenburg / Wümme 27356 + DE + +74-6B-AB (hex) GUANGDONG ENOK COMMUNICATION CO., LTD +746BAB (base 16) GUANGDONG ENOK COMMUNICATION CO., LTD + NO.139 Lixiang road, Songmushan Dalang Town + Dongguan, Guangdong 523770 + CN + +08-C5-E1 (hex) SAMSUNG ELECTRO-MECHANICS(THAILAND) +08C5E1 (base 16) SAMSUNG ELECTRO-MECHANICS(THAILAND) + 93Moo5T. Bangsamak SEMTHAI, WELLGROW INDUSTRIAL ESTATE + Bangpakong Chachoengsao 24180 + TH + +20-3D-BD (hex) LG Innotek +203DBD (base 16) LG Innotek + 26, Hanamsandan 5beon-ro + Gwangju Gwangsan-gu 506-731 + KR + +00-11-1E (hex) ETHERNET Powerlink Standarization Group (EPSG) +00111E (base 16) ETHERNET Powerlink Standarization Group (EPSG) + c/o University of Applied Sciences + Winterthur ZH CH-8401 + CH + +00-40-9D (hex) DigiBoard +00409D (base 16) DigiBoard + 6400 FLYING CLOUD DRIVE + EDEN PRAIRIE MN 55344 + US + +00-14-72 (hex) China Broadband Wireless IP Standard group(ChinaBWIPS) +001472 (base 16) China Broadband Wireless IP Standard group(ChinaBWIPS) + P.O.BOX 88,West High-tech + Xi'an Shaan Xi 710075 + CN + +D8-24-77 (hex) Universal Electric Corporation +D82477 (base 16) Universal Electric Corporation + 168 Georgetown Road + Canonsburg PA 15317 + US + +40-06-A0 (hex) Texas Instruments +4006A0 (base 16) Texas Instruments + 12500 TI Blvd + Dallas TX 75243 + US + +30-A8-DB (hex) Sony Mobile Communications AB +30A8DB (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +44-74-6C (hex) Sony Mobile Communications AB +44746C (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +18-00-2D (hex) Sony Mobile Communications AB +18002D (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +30-17-C8 (hex) Sony Mobile Communications AB +3017C8 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-23-F1 (hex) Sony Mobile Communications AB +0023F1 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1B-59 (hex) Sony Mobile Communications AB +001B59 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-19-63 (hex) Sony Mobile Communications AB +001963 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1E-DC (hex) Sony Mobile Communications AB +001EDC (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-0F-DE (hex) Sony Mobile Communications AB +000FDE (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-0A-D9 (hex) Sony Mobile Communications AB +000AD9 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +64-4F-42 (hex) JETTER CO., Ltd. +644F42 (base 16) JETTER CO., Ltd. + 265-40 Emukaecho Tanomoto + Sasebo-shi Nagasaki 859-6134 + JP + D8-6C-E9 (hex) Sagemcom Broadband SAS D86CE9 (base 16) Sagemcom Broadband SAS 250 route de l'Empereur @@ -87797,12 +88370,6 @@ C056E3 (base 16) Hangzhou Hikvision Digital Technology Co.,Ltd. Hangzhou Zhejiang 310052 CN -C8-E7-D8 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -C8E7D8 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr., Building 28, Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 9C-EF-D5 (hex) Panda Wireless, Inc. 9CEFD5 (base 16) Panda Wireless, Inc. 15559 Union Ave, Suite 300 @@ -89069,12 +89636,6 @@ EC21E5 (base 16) Toshiba Shenzhen Guangdong 518057 CN -58-48-22 (hex) Sony Mobile Communications AB -584822 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - F8-BF-09 (hex) HUAWEI TECHNOLOGIES CO.,LTD F8BF09 (base 16) HUAWEI TECHNOLOGIES CO.,LTD No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park @@ -89171,18 +89732,6 @@ C09A71 (base 16) XIAMEN MEITU MOBILE TECHNOLOGY CO.LTD SAN MARTINO B.A. (VR) VERONA 37036 IT -94-4A-0C (hex) Sercomm Corporation -944A0C (base 16) Sercomm Corporation - 8F, 3-1, YuanQu St., NanKang, - Taipei Taiwan 115 - TW - -D0-25-16 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -D02516 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - D0-5C-7A (hex) Sartura d.o.o. D05C7A (base 16) Sartura d.o.o. Kuniscak 28 @@ -90647,12 +91196,6 @@ FC19D0 (base 16) Cloud Vision Networks Technology Co.,Ltd. Norwood MA 02062 US -68-76-4F (hex) Sony Mobile Communications AB -68764F (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - D4-D9-19 (hex) GoPro D4D919 (base 16) GoPro 3000 Clearview Way @@ -93029,12 +93572,6 @@ F8313E (base 16) endeavour GmbH Taipei 114 TW -D4-CA-6D (hex) Routerboard.com -D4CA6D (base 16) Routerboard.com - Mikrotikls SIA - Riga LV-1009 - LV - D8-E7-43 (hex) Wush, Inc D8E743 (base 16) Wush, Inc 17F.No 268, Liancheng Rd., Zhonghe District @@ -101234,12 +101771,6 @@ EC3091 (base 16) Cisco Systems, Inc Gurogu Seoul 152-766 KR -00-0E-8F (hex) Sercomm Corp. -000E8F (base 16) Sercomm Corp. - 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen - Miao-Lih Hsuan 350 - TW - 00-0E-96 (hex) Cubic Defense Applications, Inc. 000E96 (base 16) Cubic Defense Applications, Inc. P.O. Box 85587 @@ -101606,12 +102137,6 @@ EC3091 (base 16) Cisco Systems, Inc Santa Barbara CA 93117 US -00-0D-82 (hex) PHS srl -000D82 (base 16) PHS srl - Via Palù, 17 - Arcugnano Vicenza 36057 - IT - 00-0D-81 (hex) Pepperl+Fuchs GmbH 000D81 (base 16) Pepperl+Fuchs GmbH Lilienthalstraße 200 @@ -102068,12 +102593,6 @@ EC3091 (base 16) Cisco Systems, Inc TAMPERE FIN 33950 FI -00-0C-42 (hex) Routerboard.com -000C42 (base 16) Routerboard.com - Pernavas 46 - Riga LV-1009 - LV - 00-0C-44 (hex) Automated Interfaces, Inc. 000C44 (base 16) Automated Interfaces, Inc. 120 Confederate Lane @@ -109664,66 +110183,6 @@ D0D412 (base 16) ADB Broadband Italia Hsinchu 30352 TW -00-24-EF (hex) Sony Mobile Communications AB -0024EF (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -6C-0E-0D (hex) Sony Mobile Communications AB -6C0E0D (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -B4-52-7D (hex) Sony Mobile Communications AB -B4527D (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - -E0-63-E5 (hex) Sony Mobile Communications AB -E063E5 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - -00-0E-07 (hex) Sony Mobile Communications AB -000E07 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE-221 88 - SE - -00-1A-75 (hex) Sony Mobile Communications AB -001A75 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -00-16-B8 (hex) Sony Mobile Communications AB -0016B8 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -00-1D-28 (hex) Sony Mobile Communications AB -001D28 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -00-1F-E4 (hex) Sony Mobile Communications AB -001FE4 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -00-22-98 (hex) Sony Mobile Communications AB -002298 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - 24-FD-52 (hex) Liteon Technology Corporation 24FD52 (base 16) Liteon Technology Corporation 4F,90,Chien 1 Road,ChungHo @@ -114371,15 +114830,6 @@ B0B98A (base 16) NETGEAR San Jose CA 95134 US -11-00-AA (hex) Private -1100AA (base 16) Private - -1C-96-5A (hex) Weifang GoerTek Technology Co.,Ltd. -1C965A (base 16) Weifang GoerTek Technology Co.,Ltd. - Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China - Wei Fang Shan Dong 261205 - CN - 10-4E-89 (hex) Garmin International 104E89 (base 16) Garmin International 1200 E. 151st St @@ -114638,9 +115088,6 @@ B8D94D (base 16) Sagemcom Broadband SAS Hong Kong Hong Kong HK -A4-68-BC (hex) Private -A468BC (base 16) Private - 80-C7-55 (hex) Panasonic Appliances Company 80C755 (base 16) Panasonic Appliances Company 2-3-1-2 Noji-higashi @@ -115004,12 +115451,6 @@ B0B3AD (base 16) HUMAX Co., Ltd. Seongnam-si Gyeonggi-do 463-875 KR -38-78-62 (hex) Sony Mobile Communications AB -387862 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 18-31-BF (hex) ASUSTek COMPUTER INC. 1831BF (base 16) ASUSTek COMPUTER INC. 15,Li-Te Rd., Peitou, Taipei 112, Taiwan @@ -115544,6 +115985,171 @@ D818D3 (base 16) Juniper Networks Stockdorf Bayern 82131 DE +94-19-3A (hex) Elvaco AB +94193A (base 16) Elvaco AB + Kabelgatan 2T + Kungsbacka 43437 + SE + +38-68-DD (hex) INVENTEC CORPORATION +3868DD (base 16) INVENTEC CORPORATION + NO.88, DAZHI RD. + TAOYUAN 33068 + TW + +3C-6A-A7 (hex) Intel Corporate +3C6AA7 (base 16) Intel Corporate + Lot 8, Jalan Hi-Tech 2/3 + Kulim Kedah 09000 + MY + +FC-6B-F0 (hex) TOPWELL INTERNATIONAL HOLDINDS LIMITED +FC6BF0 (base 16) TOPWELL INTERNATIONAL HOLDINDS LIMITED + Room 1301-5,Buliding China Youshe,NO.6013,ShenNan Road,CheGong Temple,FuTian District,ShenZhen,GuangDong province,China + SHENZHEN GUANGDONG 518000 + CN + +11-00-AA (hex) Private +1100AA (base 16) Private + +80-02-9C (hex) Gemtek Technology Co., Ltd. +80029C (base 16) Gemtek Technology Co., Ltd. + No.15-1 Zhonghua Road + Hukou Hsinchu 30352 + TW + +D4-FC-13 (hex) Fiberhome Telecommunication Technologies Co.,LTD +D4FC13 (base 16) Fiberhome Telecommunication Technologies Co.,LTD + No.5 DongXin Road + Wuhan Hubei 430074 + CN + +B0-53-65 (hex) China Mobile IOT Company Limited +B05365 (base 16) China Mobile IOT Company Limited + NO.8 Yu Ma Road, NanAn Area Chongqing,China + Chongqing Chongqing 401336 + CN + +1C-96-5A (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +1C965A (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road,Free Trade Zone,Weifang,Shandong,261205,P.R.China + Wei Fang Shan Dong 261205 + CN + +00-0E-8F (hex) Sercomm Corporation. +000E8F (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +94-4A-0C (hex) Sercomm Corporation. +944A0C (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +D0-C5-D8 (hex) LATECOERE +D0C5D8 (base 16) LATECOERE + 135 Rue de Périole, BP25211 + Toulouse Cedex 5 31 Haute-Garonne 31079 + FR + +DC-E0-EB (hex) Nanjing Aozheng Information Technology Co.Ltd +DCE0EB (base 16) Nanjing Aozheng Information Technology Co.Ltd + #E1-453, Zidong Road #1,Qixia District + Nanjing jiangsu 210000 + CN + +C8-E7-D8 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +C8E7D8 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr., Building 28, Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +50-59-67 (hex) Intent Solutions Inc +505967 (base 16) Intent Solutions Inc + 730 Peachtree St NE, Suite 550 + ATLANTA GA 30308 + US + +68-3A-1E (hex) Cisco Meraki +683A1E (base 16) Cisco Meraki + 500 Terry A. Francois Blvd + San Francisco 94158 + US + +A8-3E-0E (hex) HMD Global Oy +A83E0E (base 16) HMD Global Oy + Karaportti 2 + Espoo 02610 + FI + +10-C1-72 (hex) HUAWEI TECHNOLOGIES CO.,LTD +10C172 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +80-B5-75 (hex) HUAWEI TECHNOLOGIES CO.,LTD +80B575 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +00-0D-82 (hex) PHSNET SRLS +000D82 (base 16) PHSNET SRLS + Piazza Mariano Rumor, 18 + Arcugnano Vicenza 36057 + IT + +E0-63-E5 (hex) Sony Mobile Communications AB +E063E5 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +B4-52-7D (hex) Sony Mobile Communications AB +B4527D (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +08-D4-6A (hex) LG Electronics (Mobile Communications) +08D46A (base 16) LG Electronics (Mobile Communications) + 60-39, Gasan-dong, Geumcheon-gu + Seoul 153-801 + KR + +68-76-4F (hex) Sony Mobile Communications AB +68764F (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +58-48-22 (hex) Sony Mobile Communications AB +584822 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +6C-0E-0D (hex) Sony Mobile Communications AB +6C0E0D (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-24-EF (hex) Sony Mobile Communications AB +0024EF (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +B4-EC-02 (hex) ALPS ELECTRIC CO.,LTD. +B4EC02 (base 16) ALPS ELECTRIC CO.,LTD. + 6-1 + Kakuda Miyagi-Pref 981-1595 + JP + 54-C5-7A (hex) Sunnovo International Limited 54C57A (base 16) Sunnovo International Limited 1717 Haitai Building @@ -116933,6 +117539,177 @@ ECAF97 (base 16) GIT Hsinchu Taiwan ROC. 30352 TW +20-39-56 (hex) HMD Global Oy +203956 (base 16) HMD Global Oy + Karaportti 2 + Espoo 02610 + FI + +78-72-5D (hex) Cisco Systems, Inc +78725D (base 16) Cisco Systems, Inc + 80 West Tasman Drive + San Jose CA 94568 + US + +00-FC-BA (hex) Cisco Systems, Inc +00FCBA (base 16) Cisco Systems, Inc + 80 West Tasman Drive + San Jose CA 94568 + US + +18-9C-27 (hex) ARRIS Group, Inc. +189C27 (base 16) ARRIS Group, Inc. + 6450 Sequence Drive + San Diego CA 92121 + US + +A4-68-BC (hex) Private +A468BC (base 16) Private + +CC-51-B4 (hex) Integrated Device Technology (Malaysia) Sdn. Bhd. +CC51B4 (base 16) Integrated Device Technology (Malaysia) Sdn. Bhd. + Phase 3, Bayan Lepas FIZ + Bayan Lepas Penang 11900 + MY + +7C-41-A2 (hex) Nokia +7C41A2 (base 16) Nokia + 600 March Road + Kanata Ontario K2K 2E6 + CA + +64-A2-F9 (hex) OnePlus Technology (Shenzhen) Co., Ltd +64A2F9 (base 16) OnePlus Technology (Shenzhen) Co., Ltd + 18C02, 18C03, 18C04 ,18C05,TAIRAN BUILDING, + Shenzhen Guangdong 518000 + CN + +EC-8C-9A (hex) HUAWEI TECHNOLOGIES CO.,LTD +EC8C9A (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +B4-86-55 (hex) HUAWEI TECHNOLOGIES CO.,LTD +B48655 (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +18-66-C7 (hex) Shenzhen Libre Technology Co., Ltd +1866C7 (base 16) Shenzhen Libre Technology Co., Ltd + 634, Tian Hui Building #B, You Song Lu, Long Hua District + Shenzhen 511700 + CN + +5C-B3-F6 (hex) Human, Incorporated +5CB3F6 (base 16) Human, Incorporated + 3100 Airport Way S, 25-512 + Seattle WA 98134 + US + +70-9F-A9 (hex) TECNO MOBILE LIMITED +709FA9 (base 16) TECNO MOBILE LIMITED + ROOMS 05-15, 13A/F., SOUTH TOWER, WORLD FINANCE CENTRE, HARBOUR CITY, 17 CANTON ROAD, TSIM SHA TSUI, KOWLOON, HONG KONG + Hong Kong Hong Kong 999077 + HK + +78-D2-94 (hex) NETGEAR +78D294 (base 16) NETGEAR + 350 East Plumeria Drive + San Jose CA 95134 + US + +D0-25-16 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +D02516 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +58-B1-0F (hex) Samsung Electronics Co.,Ltd +58B10F (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +BC-22-FB (hex) RF Industries +BC22FB (base 16) RF Industries + PO Box 5 + Welland SA 5007 + AU + +70-0F-6A (hex) Cisco Systems, Inc +700F6A (base 16) Cisco Systems, Inc + 80 West Tasman Drive + San Jose CA 94568 + US + +2C-47-59 (hex) Beijing MEGA preponderance Science & Technology Co. Ltd +2C4759 (base 16) Beijing MEGA preponderance Science & Technology Co. Ltd + Room 2201,No.8,Ruichuang International B Block,Wangjing East Road + Beijing 100102 + CN + +D4-CA-6D (hex) Routerboard.com +D4CA6D (base 16) Routerboard.com + Mikrotikls SIA + Riga LV-1009 + LV + +00-0C-42 (hex) Routerboard.com +000C42 (base 16) Routerboard.com + Pernavas 46 + Riga LV-1009 + LV + +DC-E3-05 (hex) ZAO NPK Rotek +DCE305 (base 16) ZAO NPK Rotek + Prospekt Mira + Moscow 129223 + RU + +00-22-98 (hex) Sony Mobile Communications AB +002298 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1F-E4 (hex) Sony Mobile Communications AB +001FE4 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1D-28 (hex) Sony Mobile Communications AB +001D28 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-16-B8 (hex) Sony Mobile Communications AB +0016B8 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1A-75 (hex) Sony Mobile Communications AB +001A75 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-0E-07 (hex) Sony Mobile Communications AB +000E07 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +38-78-62 (hex) Sony Mobile Communications AB +387862 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + 2C-39-96 (hex) Sagemcom Broadband SAS 2C3996 (base 16) Sagemcom Broadband SAS 250 route de l'Empereur @@ -118091,12 +118868,6 @@ E8EDF3 (base 16) Cisco Systems, Inc San Jose CA 95134 US -48-8A-D2 (hex) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. -488AD2 (base 16) SHENZHEN MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. - Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan - Shenzhen Guangdong 518057 - CN - 14-02-EC (hex) Hewlett Packard Enterprise 1402EC (base 16) Hewlett Packard Enterprise 8000 Foothills Blvd. @@ -119204,12 +119975,6 @@ F0FE6B (base 16) Shanghai High-Flying Electronics Technology Co., Ltd Beijing Beijing 100083 CN -84-8E-DF (hex) Sony Mobile Communications AB -848EDF (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - CC-BD-D3 (hex) Ultimaker B.V. CCBDD3 (base 16) Ultimaker B.V. Burgemeester Rozeveld van de Venlaan 11 @@ -119480,12 +120245,6 @@ A0FC6E (base 16) Telegrafia a.s. Kosice Slovakia 040 01 -44-D4-E0 (hex) Sony Mobile Communications AB -44D4E0 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - D0-FA-1D (hex) Qihoo 360 Technology Co.,Ltd D0FA1D (base 16) Qihoo 360 Technology Co.,Ltd Building 2,6 Haoyuan @@ -120080,12 +120839,6 @@ DC0575 (base 16) SIEMENS ENERGY AUTOMATION Frankfurt am Main Hessen 60311 DE -B4-52-7E (hex) Sony Mobile Communications AB -B4527E (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 50-E1-4A (hex) Private 50E14A (base 16) Private @@ -121502,12 +122255,6 @@ ACC698 (base 16) Kohzu Precision Co., Ltd. Sunnyvale California 94086 US -4C-0F-C7 (hex) Earda Electronics Co.,Ltd -4C0FC7 (base 16) Earda Electronics Co.,Ltd - 5/F,Block 2 East area,Haosheng Industrial Park, - Guangzhou Guangdong 511400 - CN - 64-C9-44 (hex) LARK Technologies, Inc 64C944 (base 16) LARK Technologies, Inc 2570 W El Camino Real @@ -129551,12 +130298,6 @@ DC3350 (base 16) TechSAT GmbH Chiyoda-ku Tokyo 101-0051 JP -00-13-4F (hex) Tranzeo Wireless Technologies Inc. -00134F (base 16) Tranzeo Wireless Technologies Inc. - 20155 Stewart Cres. - Maple Ridge British Columbia V2X 0T6 - CA - 00-13-48 (hex) Artila Electronics Co., Ltd. 001348 (base 16) Artila Electronics Co., Ltd. 2F., No.1, Alley 8, Siwei Lane, Zhongzheng Rd., @@ -139241,42 +139982,6 @@ D05349 (base 16) Liteon Technology Corporation Tokyo 141-0001 JP -00-1C-A4 (hex) Sony Mobile Communications AB -001CA4 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -00-23-45 (hex) Sony Mobile Communications AB -002345 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund Skåne 22188 - SE - -8C-64-22 (hex) Sony Mobile Communications AB -8C6422 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 221 88 - SE - -90-C1-15 (hex) Sony Mobile Communications AB -90C115 (base 16) Sony Mobile Communications AB - Mobilvägen 10 - Lund 22181 - SE - -84-00-D2 (hex) Sony Mobile Communications AB -8400D2 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22188 - SE - -5C-B5-24 (hex) Sony Mobile Communications AB -5CB524 (base 16) Sony Mobile Communications AB - Mobilvägen 10 - Lund 22181 - SE - 94-A1-A2 (hex) AMPAK Technology, Inc. 94A1A2 (base 16) AMPAK Technology, Inc. No.1,Jen Ai Road @@ -139925,12 +140630,6 @@ C4E510 (base 16) Mechatro, Inc. Sunnyvale CA 94085 US -9C-5C-F9 (hex) Sony Mobile Communications AB -9C5CF9 (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 88-A0-84 (hex) Formation Data Systems 88A084 (base 16) Formation Data Systems 39141 Civic Center Drive, Suite 410 @@ -141077,12 +141776,6 @@ BC8AA3 (base 16) NHN Entertainment Jincheon-Gun Chungbuk 27850 KR -48-6D-BB (hex) Vestel Elektronik San ve Tic. A.Ş. -486DBB (base 16) Vestel Elektronik San ve Tic. A.Ş. - Organize san - Manisa Turket 45030 - TR - E0-9D-FA (hex) Wanan Hongsheng Electronic Co.Ltd E09DFA (base 16) Wanan Hongsheng Electronic Co.Ltd 1st section of industrial pack,Wan'An County,Ji'An City,jiangxi province @@ -141923,12 +142616,6 @@ A091C8 (base 16) zte corporation Shawinigan Quebec G9N 0A3 CA -B4-A5-EF (hex) Sercomm Corporation. -B4A5EF (base 16) Sercomm Corporation. - violet_liu@sercomm.com - Miao-Lih Hsuan 115 - TW - 30-44-A1 (hex) Shanghai Nanchao Information Technology 3044A1 (base 16) Shanghai Nanchao Information Technology Floor 1th, building 13, No.368 Zhangjiang Road, Pudong New District, Shanghai @@ -144869,12 +145556,6 @@ AC6B0F (base 16) CADENCE DESIGN SYSTEMS INC Piscataway NJ 08554 US -00-BB-3A (hex) Private -00BB3A (base 16) Private - -E0-CB-1D (hex) Private -E0CB1D (base 16) Private - 84-D6-D0 (hex) Amazon Technologies Inc. 84D6D0 (base 16) Amazon Technologies Inc. P.O Box 8102 @@ -144893,12 +145574,6 @@ CC82EB (base 16) KYOCERA CORPORATION Yokohama-shi Kanagawa 224-8502 JP -78-94-B4 (hex) Sercomm Corporation. -7894B4 (base 16) Sercomm Corporation. - violet_liu@sercomm.com - Miao-Lih Hsuan 115 - TW - 00-0F-17 (hex) Insta Elektro GmbH 000F17 (base 16) Insta Elektro GmbH Hohe Steinert 10 @@ -145739,9 +146414,6 @@ F4B520 (base 16) Biostar Microtech international corp. New Taipei City Taiwan 231 TW -9C-93-E4 (hex) Private -9C93E4 (base 16) Private - F0-F8-F2 (hex) Texas Instruments F0F8F2 (base 16) Texas Instruments 12500 TI Blvd @@ -145796,12 +146468,6 @@ F0F8F2 (base 16) Texas Instruments Dongguan Guangdong 518057 CN -78-81-02 (hex) Sercomm Corporation. -788102 (base 16) Sercomm Corporation. - violet_liu@sercomm.com - Miao-Lih Hsuan 115 - TW - 58-A0-CB (hex) TrackNet, Inc 58A0CB (base 16) TrackNet, Inc 900 Lafayette Street #329 @@ -145934,12 +146600,6 @@ F86465 (base 16) Anova Applied Electronics, Inc. san francisco CA 94105 US -A8-30-AD (hex) Weifang GoerTek Technology Co.,Ltd. -A830AD (base 16) Weifang GoerTek Technology Co.,Ltd. - Wei fang Export processing Zone - Wei Fang Shan Dong 261205 - CN - 70-E1-FD (hex) FLEXTRONICS 70E1FD (base 16) FLEXTRONICS Carretera Base Aerea 5850 int 4 @@ -146102,12 +146762,6 @@ F89DBB (base 16) Tintri Mountain View CA 94070 US -D4-38-9C (hex) Sony Mobile Communications AB -D4389C (base 16) Sony Mobile Communications AB - Nya Vattentornet - Lund SE 22128 - SE - 10-49-63 (hex) HARTING K.K. 104963 (base 16) HARTING K.K. 1-7-9, Shin-Yokohama, Kohoku-ku @@ -146425,3 +147079,243 @@ E4E130 (base 16) TCT mobile ltd 2315 Briargate Pkwy, Suite 100 Colorado Springs CO 80920 US + +B0-FC-0D (hex) Amazon Technologies Inc. +B0FC0D (base 16) Amazon Technologies Inc. + P.O Box 8102 + Reno NV 89507 + US + +00-BB-3A (hex) Amazon Technologies Inc. +00BB3A (base 16) Amazon Technologies Inc. + PO BOX 8102 + Reno NV 89507 + US + +E0-CB-1D (hex) Private +E0CB1D (base 16) Private + +10-7B-A4 (hex) Olive & Dove Co.,Ltd. +107BA4 (base 16) Olive & Dove Co.,Ltd. + 803 Polaris bldg., 381, Seongnam-daero, Bundang-gu + Gyeonggi-do Seongnam-si 13555 + KR + +D0-C5-D3 (hex) AzureWave Technology Inc. +D0C5D3 (base 16) AzureWave Technology Inc. + 8F., No. 94, Baozhong Rd. + New Taipei City Taiwan 231 + TW + +14-16-9E (hex) Wingtech Group (HongKong)Limited +14169E (base 16) Wingtech Group (HongKong)Limited + FLAT/RM 1903 19/F PODIUM PLAZA 5HANOI ROAD TSIM SHA TSUI + Hong Kong Hong Kong 999077 + HK + +D4-9E-05 (hex) zte corporation +D49E05 (base 16) zte corporation + 12/F.,zte R&D building ,kejinan Road,Shenzhen,P.R.China + shenzhen guangdong 518057 + CN + +00-B8-C2 (hex) Heights Telecom T ltd +00B8C2 (base 16) Heights Telecom T ltd + Moshe Lerer 15 + Nes Ziona 7404996 + IL + +9C-93-E4 (hex) Private +9C93E4 (base 16) Private + +74-C1-4F (hex) HUAWEI TECHNOLOGIES CO.,LTD +74C14F (base 16) HUAWEI TECHNOLOGIES CO.,LTD + No.2 Xin Cheng Road, Room R6,Songshan Lake Technology Park + Dongguan 523808 + CN + +A8-CA-B9 (hex) SAMSUNG ELECTRO MECHANICS CO., LTD. +A8CAB9 (base 16) SAMSUNG ELECTRO MECHANICS CO., LTD. + 314, Maetan3-Dong, Yeongtong-Gu + SUWON KYUNGGI-DO 443-743 + KR + +54-BF-64 (hex) Dell Inc. +54BF64 (base 16) Dell Inc. + One Dell Way + Round Rock TX 78682 + US + +00-13-4F (hex) Rapidus Wireless Networks Inc. +00134F (base 16) Rapidus Wireless Networks Inc. + 47 - 14550 Morris Valley Road + Agassiz British Columbia V0M 1A1 + CA + +78-29-ED (hex) ASKEY COMPUTER CORP +7829ED (base 16) ASKEY COMPUTER CORP + 10F,No.119,JIANKANG RD,ZHONGHE DIST + NEW TAIPEI TAIWAN 23585 + TW + +78-81-02 (hex) Sercomm Corporation. +788102 (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +78-94-B4 (hex) Sercomm Corporation. +7894B4 (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +B4-A5-EF (hex) Sercomm Corporation. +B4A5EF (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +A8-30-AD (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +A830AD (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Wei fang Export processing Zone + Wei Fang Shan Dong 261205 + CN + +D8-68-C3 (hex) Samsung Electronics Co.,Ltd +D868C3 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +C4-93-D9 (hex) Samsung Electronics Co.,Ltd +C493D9 (base 16) Samsung Electronics Co.,Ltd + #94-1, Imsoo-Dong + Gumi Gyeongbuk 730-350 + KR + +48-8A-D2 (hex) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. +488AD2 (base 16) MERCURY COMMUNICATION TECHNOLOGIES CO.,LTD. + Mid-Fourth Flr.,Building 28,Cui Xi Fourth Road,Ke Yuan West,Nanshan + Shenzhen Guangdong 518057 + CN + +48-6D-BB (hex) Vestel Elektronik San ve Tic. A.Ş. +486DBB (base 16) Vestel Elektronik San ve Tic. A.Ş. + Organize san + Manisa Turket 45030 + TR + +70-54-B4 (hex) Vestel Elektronik San ve Tic. A.Ş. +7054B4 (base 16) Vestel Elektronik San ve Tic. A.Ş. + Organize san + Manisa Turket 45030 + TR + +4C-0F-C7 (hex) Earda Technologies co Ltd +4C0FC7 (base 16) Earda Technologies co Ltd + 5/F,Block 2 East area,Haosheng Industrial Park, + Guangzhou Guangdong 511400 + CN + +CC-7B-61 (hex) NIKKISO CO., LTD. +CC7B61 (base 16) NIKKISO CO., LTD. + Yebisu Garden Place Tower 22nd Floor, 20-3, Ebisu 4-Chome + Shibuya-ku Tokyo 150-6022 + JP + +78-04-73 (hex) Texas Instruments +780473 (base 16) Texas Instruments + 12500 TI Blvd + Dallas TX 75243 + US + +4C-3F-D3 (hex) Texas Instruments +4C3FD3 (base 16) Texas Instruments + 12500 TI Blvd + Dallas TX 75243 + US + +CC-50-E3 (hex) Espressif Inc. +CC50E3 (base 16) Espressif Inc. + Room 204, Building 2, 690 Bibo Road, Pudong New Area + Shanghai Shanghai 201203 + CN + +5C-B5-24 (hex) Sony Mobile Communications AB +5CB524 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +84-00-D2 (hex) Sony Mobile Communications AB +8400D2 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +90-C1-15 (hex) Sony Mobile Communications AB +90C115 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +8C-64-22 (hex) Sony Mobile Communications AB +8C6422 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +B4-52-7E (hex) Sony Mobile Communications AB +B4527E (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +44-D4-E0 (hex) Sony Mobile Communications AB +44D4E0 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +84-8E-DF (hex) Sony Mobile Communications AB +848EDF (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +DC-AF-68 (hex) WEIFANG GOERTEK ELECTRONICS CO.,LTD +DCAF68 (base 16) WEIFANG GOERTEK ELECTRONICS CO.,LTD + Gaoxin 2 Road, Free Trade Zone,Weifang,Shandong,261205,P.R.China + Weifang Shandong 261205 + CN + +00-23-45 (hex) Sony Mobile Communications AB +002345 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +00-1C-A4 (hex) Sony Mobile Communications AB +001CA4 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +9C-5C-F9 (hex) Sony Mobile Communications AB +9C5CF9 (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +D4-38-9C (hex) Sony Mobile Communications AB +D4389C (base 16) Sony Mobile Communications AB + 4-12-3 Higashi – Shinagaw + Shinagawa-ku Tokyo 140-0002 + JP + +A0-19-B2 (hex) IEEE Registration Authority +A019B2 (base 16) IEEE Registration Authority + 445 Hoes Lane + Piscataway NJ 08554 + US diff --git a/hwdb/ma-medium.txt b/hwdb/ma-medium.txt index 9c97afffd..12165cb14 100644 --- a/hwdb/ma-medium.txt +++ b/hwdb/ma-medium.txt @@ -1511,12 +1511,6 @@ D00000-DFFFFF (base 16) Shanghai B&A Technology Co., Ltd San Anselmo CA 94960 US -98-AA-FC (hex) Comarch S.A. -E00000-EFFFFF (base 16) Comarch S.A. - Al. Jana Pawla II 39a - Krakow 31-864 - PL - 98-AA-FC (hex) Beijing Tiandi-Marco Electro-Hydraulic Control System Company Ltd. 800000-8FFFFF (base 16) Beijing Tiandi-Marco Electro-Hydraulic Control System Company Ltd. No.5 Qing Nian Gou Road, Hepingli @@ -1706,15 +1700,6 @@ E00000-EFFFFF (base 16) CL International Issaquah 98027 US -1C-CA-E3 (hex) Private -F00000-FFFFFF (base 16) Private - -90-C6-82 (hex) Private -F00000-FFFFFF (base 16) Private - -D0-76-50 (hex) Private -F00000-FFFFFF (base 16) Private - 28-F5-37 (hex) LogiM GmbH Software und Entwicklung B00000-BFFFFF (base 16) LogiM GmbH Software und Entwicklung Mahonienweg 22b @@ -1841,9 +1826,6 @@ C00000-CFFFFF (base 16) WAYCOM Technology Co.,Ltd Littleton MA 01460 US -D0-D9-4F (hex) Private -700000-7FFFFF (base 16) Private - CC-22-37 (hex) Hebei ZHSF Technology Co.,Ltd. C00000-CFFFFF (base 16) Hebei ZHSF Technology Co.,Ltd. 88 Xinshi South Road @@ -2183,12 +2165,90 @@ C00000-CFFFFF (base 16) Authentico Technologies Mesa AZ 85215 US +8C-1C-DA (hex) GEOMC +200000-2FFFFF (base 16) GEOMC + Suite514, 130, Digital-ro + Seoul 08589 + KP + +8C-1C-DA (hex) CEOS Pty Ltd +000000-0FFFFF (base 16) CEOS Pty Ltd + 3/17 Burgundy Street, + Heidelberg VIC 3084 + AU + 0C-73-EB (hex) Shenzhen Samchung Video Technology Co., Ltd. C00000-CFFFFF (base 16) Shenzhen Samchung Video Technology Co., Ltd. Xixiang Street 4016 Bao'an Avenue Yong Kai Business Building A, Bao'an District of Shenzhen City Guangdong 528470 CN +8C-1C-DA (hex) K Technology Corporation +700000-7FFFFF (base 16) K Technology Corporation + LIVMO Rising Bldg. 5F, 3-19-1 + Shin-Yokohama, Kohoku-ku, Yokohama, Kanagawa 222-0033 + JP + +90-C6-82 (hex) Private +F00000-FFFFFF (base 16) Private + +D0-76-50 (hex) Private +F00000-FFFFFF (base 16) Private + +1C-CA-E3 (hex) Private +F00000-FFFFFF (base 16) Private + +D0-D9-4F (hex) Private +700000-7FFFFF (base 16) Private + +8C-1C-DA (hex) Anntec (Beijing) Technology Co.,Ltd. +400000-4FFFFF (base 16) Anntec (Beijing) Technology Co.,Ltd. + F803, Shangdi Third Street, No.9,HaiDian District + Beijing 100080 + CN + +2C-48-35 (hex) FAST +700000-7FFFFF (base 16) FAST + 4740 44th Ave SW Suite #201 + Seattle WA 98116 + US + +A0-19-B2 (hex) El Sewedy Electrometer Egypt S.A.E. +100000-1FFFFF (base 16) El Sewedy Electrometer Egypt S.A.E. + Plot No. 154/173 Industrial Zone 2 + ET-6th October City + EG + +A0-19-B2 (hex) Beijing Deephi Intelligent Technology Co., Ltd +200000-2FFFFF (base 16) Beijing Deephi Intelligent Technology Co., Ltd + 7F Building D, Tsinghua Tongfang High-Tech PlazaRoom 1706, Building D-East, Tsinghua Tongfang High-Tech Plaza Haidian District, Beijing, 100083, China + BEIJING HAIDIAN 100083 + CN + +2C-48-35 (hex) Advanced Electronics Company Ltd +100000-1FFFFF (base 16) Advanced Electronics Company Ltd + POBOX 90916, KKIA INDUSTRIAL ESTATE + RIYADH CENTRAL 11623 + SA + +2C-48-35 (hex) Phasor Solutions Ltd +D00000-DFFFFF (base 16) Phasor Solutions Ltd + The Record Hall, 16 Baldwin Gardens + London EC1N 7RJ + GB + +98-AA-FC (hex) Comarch S.A. +E00000-EFFFFF (base 16) Comarch S.A. + Al. Jana Pawla II 39A + Krakow Poland 31-864 + PL + +2C-48-35 (hex) SureFlap Ltd +900000-9FFFFF (base 16) SureFlap Ltd + 7 The Irwin Centre, Scotland Road, Dry Drayton + Cambridge Cambridgeshire CB23 8AR + GB + 1C-87-76 (hex) Strone Technology C00000-CFFFFF (base 16) Strone Technology 13 Ellis Street @@ -4127,9 +4187,6 @@ A0-C5-F2 (hex) Shenzhen Feima Robotics Technology Co.,Ltd Shenzhen Guangdong 518000 CN -7C-70-BC (hex) Private -F00000-FFFFFF (base 16) Private - B0-1F-81 (hex) Private F00000-FFFFFF (base 16) Private @@ -4157,9 +4214,6 @@ C00000-CFFFFF (base 16) Shenzhen Chenzhuo Technology Co., Ltd. Torrance CA 90501 US -A4-3B-FA (hex) Private -F00000-FFFFFF (base 16) Private - 28-F5-37 (hex) MyOmega Systems GmbH 600000-6FFFFF (base 16) MyOmega Systems GmbH Neumeyerstr. 28-34 @@ -4334,6 +4388,60 @@ A00000-AFFFFF (base 16) Pi Innovo LLC Romano D'Ezzelino Vicenza 36060 IT +3C-24-F0 (hex) GETMOBIT LLC +E00000-EFFFFF (base 16) GETMOBIT LLC + d. 4 str. 2 pom. 137, ul. Programmistov + Dubna Moscow 141983 + RU + +3C-24-F0 (hex) Sivat Technology Co.,Ltd. +800000-8FFFFF (base 16) Sivat Technology Co.,Ltd. + Room 1602, Starbuilding 2, west Complex of ChangYing TianJie ChaoYang District + BeiJing Beijing 100024 + CN + +A4-3B-FA (hex) Private +F00000-FFFFFF (base 16) Private + +8C-1C-DA (hex) Structura Technology & Innovation +300000-3FFFFF (base 16) Structura Technology & Innovation + via Roveredo 20/B + Pordenone PN 33170 + IT + +2C-48-35 (hex) Exertus Oy +600000-6FFFFF (base 16) Exertus Oy + Kampusranta 9 C + Seinäjoki 60320 + FI + +2C-48-35 (hex) Collatz+Trojan GmbH +A00000-AFFFFF (base 16) Collatz+Trojan GmbH + Borsteler Chaussee85-99a + Hamburg Hamburg 22453 + DE + +2C-48-35 (hex) GEARTECH LTD +400000-4FFFFF (base 16) GEARTECH LTD + R310/312,3/F,Beike Venture Building,No.1077,Nanhai Avenue,Nanshan District + Shenzhen Guangdong 518067 + CN + +2C-48-35 (hex) Progress Rail Services, Inspection and Information Systems +000000-0FFFFF (base 16) Progress Rail Services, Inspection and Information Systems + 3801-1 South Selsa Road + Independence 64057 + US + +2C-48-35 (hex) Rheonik Messtechnik GmbH +200000-2FFFFF (base 16) Rheonik Messtechnik GmbH + Rudolf-Diesel-Str., 5 + Odelzhausen Deutschland 85235 + DE + +7C-70-BC (hex) Private +F00000-FFFFFF (base 16) Private + 1C-87-76 (hex) Zhuhai MYZR Technology Co.,Ltd 500000-5FFFFF (base 16) Zhuhai MYZR Technology Co.,Ltd Room 302,Area D2,National Hi-tech Zone,NO.1,Software Park Road @@ -4580,12 +4688,6 @@ CC-1B-E0 (hex) MobiStor Technology Inc. New Taipei City Taiwn 23154 TW -74-F8-DB (hex) Ballard Technology Inc. -A00000-AFFFFF (base 16) Ballard Technology Inc. - 11400 Airport Rd - Everett Wa 98204 - US - 74-F8-DB (hex) WiFi Hotspots, SL 400000-4FFFFF (base 16) WiFi Hotspots, SL C/ Montaña Clara, No.18 @@ -6122,21 +6224,12 @@ A00000-AFFFFF (base 16) annapurnalabs 88-5D-90 (hex) Private F00000-FFFFFF (base 16) Private -BC-34-00 (hex) Private -F00000-FFFFFF (base 16) Private - 28-F5-37 (hex) Skyrockettoys LLC D00000-DFFFFF (base 16) Skyrockettoys LLC 12910 culver blvd Ste F los angeles CA 90066 US -74-19-F8 (hex) Private -F00000-FFFFFF (base 16) Private - -80-E4-DA (hex) Private -F00000-FFFFFF (base 16) Private - 28-F5-37 (hex) PRIMETECH ENGINEERING CORP. 300000-3FFFFF (base 16) PRIMETECH ENGINEERING CORP. Koishikawadaikoku Bldg. 3F, 1-3-25 @@ -6449,6 +6542,30 @@ D00000-DFFFFF (base 16) Travis Holding B.V. Rotterdam 3013AK NL +3C-24-F0 (hex) CASKY eTech Co., Ltd. +500000-5FFFFF (base 16) CASKY eTech Co., Ltd. + 10th Floor, Viva Plaza, Yard 29 Suzhou Street, Haidian District, + Beijing Beijing 100080 + CN + +8C-1C-DA (hex) Raychem RPG PVT. LTD. +900000-9FFFFF (base 16) Raychem RPG PVT. LTD. + Safari Crossing, Near Halol GIDC, Village - Kanjari, Taluka - Halol + Halol Gujarat 389350 + IN + +8C-1C-DA (hex) Alcidae Inc +C00000-CFFFFF (base 16) Alcidae Inc + 535 Mission St, 14th Fl, + San Francisco CA 94105 + US + +2C-48-35 (hex) Santec Corporation +C00000-CFFFFF (base 16) Santec Corporation + 5823 Ohkusa-Nenjozaka + Komaki Aichi 485-0802 + JP + 28-2C-02 (hex) SHENZHEN DOMENOR TECHNOLOGY LLC D00000-DFFFFF (base 16) SHENZHEN DOMENOR TECHNOLOGY LLC F4, BUILDING A3, SILICON VALLEY POWER TECHNOLOGY PARK, SILI ROAD, KUKENG COMMUNITY, GUANLAN TOWN,LONGHUA DISTRICT @@ -6647,6 +6764,45 @@ B00000-BFFFFF (base 16) COMATIS SAINT-CYR-L'ECOLE 78210 FR +8C-1C-DA (hex) Septentrio NV +500000-5FFFFF (base 16) Septentrio NV + Interleuvenlaan 15i + Leuven 3001 + BE + +80-E4-DA (hex) Private +F00000-FFFFFF (base 16) Private + +74-19-F8 (hex) Private +F00000-FFFFFF (base 16) Private + +2C-48-35 (hex) Newtrax Technologies Inc +300000-3FFFFF (base 16) Newtrax Technologies Inc + 360 St-Jacques, Floor 8 + Montreal Quebec H2Y 1P5 + CA + +BC-34-00 (hex) Private +F00000-FFFFFF (base 16) Private + +74-F8-DB (hex) Ballard Technology, Inc, +A00000-AFFFFF (base 16) Ballard Technology, Inc, + 11400 Airport Rd + Everett Wa 98204 + US + +2C-48-35 (hex) IROOTECH TECHNOLOGY CO.,LTD +E00000-EFFFFF (base 16) IROOTECH TECHNOLOGY CO.,LTD + Room 606, Floor 6, Building 5, Eastern Yard 10, Xibeiwang East Road + Beijing 100092 + CN + +A0-19-B2 (hex) MIS Industrie Systeme GmbH & Co. KG +800000-8FFFFF (base 16) MIS Industrie Systeme GmbH & Co. KG + Lohwiese 7 + Scheuring Bavaria 86937 + DE + 1C-87-76 (hex) Hekatron Vertriebs GmbH B00000-BFFFFF (base 16) Hekatron Vertriebs GmbH Brühlmatten 9 @@ -7985,9 +8141,6 @@ C00000-CFFFFF (base 16) mirakonta s.l. Johannesburg Gauteng 2060 ZA -24-4E-7B (hex) Private -D00000-DFFFFF (base 16) Private - 50-0B-91 (hex) Shenzhen Lucky Sonics Co .,Ltd D00000-DFFFFF (base 16) Shenzhen Lucky Sonics Co .,Ltd 201A, BLOCK 10 ROW 1, SHANGTUN VILLAGE HESHUIKOU COMMUNITY,GO NGMING STREET, GUANGMING DISTRICT @@ -8186,9 +8339,6 @@ B00000-BFFFFF (base 16) Eginity, Inc. hangzhou 311121 CN -34-04-9E (hex) Private -C00000-CFFFFF (base 16) Private - 50-A4-D0 (hex) OEM PRODUCTION INC. 900000-9FFFFF (base 16) OEM PRODUCTION INC. 1461-3 San Mateo Ave. @@ -8384,9 +8534,6 @@ A00000-AFFFFF (base 16) Bluemega Document & Print Services Villejust Essonne 91140 FR -8C-14-7D (hex) Private -100000-1FFFFF (base 16) Private - 8C-14-7D (hex) Bausch Datacom NV/SA B00000-BFFFFF (base 16) Bausch Datacom NV/SA Tiensesteenweg 54-56 @@ -8525,18 +8672,9 @@ E00000-EFFFFF (base 16) ALPHA TECHNOLOGIES, LLC Chicago IL 60611 US -64-FB-81 (hex) Private -F00000-FFFFFF (base 16) Private - 58-FC-DB (hex) Private F00000-FFFFFF (base 16) Private -2C-D1-41 (hex) Private -F00000-FFFFFF (base 16) Private - -2C-6A-6F (hex) Private -F00000-FFFFFF (base 16) Private - BC-66-41 (hex) Private F00000-FFFFFF (base 16) Private @@ -8564,9 +8702,6 @@ D00000-DFFFFF (base 16) Keystone Electronic Solutions Dongguan Guangdong China 523929 CN -58-E8-76 (hex) Private -000000-0FFFFF (base 16) Private - 34-29-8F (hex) ARC Technology Co., Ltd E00000-EFFFFF (base 16) ARC Technology Co., Ltd 4F.-2, No.26, Wuquan 2nd Road, @@ -8612,9 +8747,6 @@ E00000-EFFFFF (base 16) Taiwan Name Plate Co.,LTD Lystrup 8520 DK -38-B8-EB (hex) Private -700000-7FFFFF (base 16) Private - CC-22-37 (hex) Shanghai Doit IOT Technology Co.,Ltd. 700000-7FFFFF (base 16) Shanghai Doit IOT Technology Co.,Ltd. 410-412 rooms of 1B business building in NO.1588 ,lianhang road, minhang district @@ -8795,6 +8927,45 @@ D00000-DFFFFF (base 16) D-Link (Shanghai)Limited Corp. GYEONGGI-DO GOYANG-SI,ILSANDONG-GU 410315 KR +24-4E-7B (hex) Private +D00000-DFFFFF (base 16) Private + +2C-6A-6F (hex) Private +F00000-FFFFFF (base 16) Private + +2C-D1-41 (hex) Private +F00000-FFFFFF (base 16) Private + +8C-1C-DA (hex) T+A elektroakustik GmbH & Co.KG +B00000-BFFFFF (base 16) T+A elektroakustik GmbH & Co.KG + Planckstr. 9-11 + Herford 32052 + DE + +8C-1C-DA (hex) GESAS GmbH +100000-1FFFFF (base 16) GESAS GmbH + Pfaelzer Ring 18 + Hockenheim Baden-Wuerttemberg 68766 + DE + +8C-1C-DA (hex) LocoLabs LLC +600000-6FFFFF (base 16) LocoLabs LLC + 3350 Scott Blvd, Bldg 56 + Santa Clara CA 95054 + US + +2C-48-35 (hex) Shanghai Visteon Automotive Electronics System CO. Ltd. +B00000-BFFFFF (base 16) Shanghai Visteon Automotive Electronics System CO. Ltd. + No.1268, East Kangqiao Road, Pudong District, + ShangHai 201315 + CN + +2C-48-35 (hex) Scout Security, Inc. +500000-5FFFFF (base 16) Scout Security, Inc. + 210 N Racine Ave, STE 2M + Chicago IL 60607 + US + 34-D0-B8 (hex) Kongqiguanjia (Beijing)Technology co.,ltd E00000-EFFFFF (base 16) Kongqiguanjia (Beijing)Technology co.,ltd Room 1201,Block A,Building of Fesco,Xidawang Road,Chaoyang district @@ -8963,6 +9134,21 @@ B00000-BFFFFF (base 16) Popit Oy Shenzhen Guangdong 518000 CN +58-E8-76 (hex) Private +000000-0FFFFF (base 16) Private + +38-B8-EB (hex) Private +700000-7FFFFF (base 16) Private + +8C-14-7D (hex) Private +100000-1FFFFF (base 16) Private + +64-FB-81 (hex) Private +F00000-FFFFFF (base 16) Private + +34-04-9E (hex) Private +C00000-CFFFFF (base 16) Private + 1C-87-74 (hex) Philips Personal Health Solutions 000000-0FFFFF (base 16) Philips Personal Health Solutions High Tech Campus, HTC37 floor 0 @@ -9935,12 +10121,6 @@ A00000-AFFFFF (base 16) Groupeer Technologies Paris Ile-de-France 75008 FR -F0-AC-D7 (hex) Sercomm Corporation. -400000-4FFFFF (base 16) Sercomm Corporation. - violet_liu@sercomm.com - Miao-Lih Hsuan 115 - TW - 58-E8-76 (hex) annapurnalabs B00000-BFFFFF (base 16) annapurnalabs HACRMEL 2 st Brosh BLDG FLOOR3 @@ -10919,18 +11099,12 @@ D00000-DFFFFF (base 16) THK Co.,LTD. Changsha Hunan 410000 CN -80-7B-85 (hex) Private -F00000-FFFFFF (base 16) Private - 14-1F-BA (hex) Private F00000-FFFFFF (base 16) Private B4-37-D1 (hex) Private F00000-FFFFFF (base 16) Private -54-9A-11 (hex) Private -F00000-FFFFFF (base 16) Private - 7C-BA-CC (hex) Fossil Power Systems Inc 600000-6FFFFF (base 16) Fossil Power Systems Inc 10 Mosher Drive @@ -11158,3 +11332,45 @@ A00000-AFFFFF (base 16) Shenzhen Bestway Technology Co., Ltd 2nd Floor, Building 9, Jingxuan Industrial Park, East Ring Road, Longhua District, Shenzhen GuangDong 518109 CN + +3C-24-F0 (hex) Laipac Technology Inc. +200000-2FFFFF (base 16) Laipac Technology Inc. + 20 Mural St. Unit 5 + Richmond Hill ON - Ontario L4B 1K3 + CA + +8C-1C-DA (hex) China Potevio Co., Ltd +A00000-AFFFFF (base 16) China Potevio Co., Ltd + No.6, haidian north second street, haidian district, Beijing + Beijing Beijing 100080 + CN + +8C-1C-DA (hex) ATOL LLC +800000-8FFFFF (base 16) ATOL LLC + Bolshaya Novodmitrovskaya str., 14, build 4 + Moscow 127015 + RU + +8C-1C-DA (hex) Electronic Controlled Systems, Inc. +E00000-EFFFFF (base 16) Electronic Controlled Systems, Inc. + 11200 Hampshire Ave South + Bloomington MN 55438 + US + +80-7B-85 (hex) Private +F00000-FFFFFF (base 16) Private + +F0-AC-D7 (hex) Sercomm Corporation. +400000-4FFFFF (base 16) Sercomm Corporation. + 3F,No.81,Yu-Yih Rd.,Chu-Nan Chen + Miao-Lih Hsuan 115 + TW + +2C-48-35 (hex) DPS Electronics +800000-8FFFFF (base 16) DPS Electronics + 317 Gallatin Park Dr #2 + Bozeman MT 59715 + US + +54-9A-11 (hex) Private +F00000-FFFFFF (base 16) Private diff --git a/hwdb/ma-small.txt b/hwdb/ma-small.txt index 93d659d0b..7d784ccf0 100644 --- a/hwdb/ma-small.txt +++ b/hwdb/ma-small.txt @@ -2522,9 +2522,6 @@ A7E000-A7EFFF (base 16) QUICCO SOUND Corporation Odense SV Region Syd 5230 DK -70-B3-D5 (hex) Private -FFE000-FFEFFF (base 16) Private - 70-B3-D5 (hex) Mentor Graphics 3FE000-3FEFFF (base 16) Mentor Graphics 46871 Bayside Parkway @@ -2582,9 +2579,6 @@ BEA000-BEAFFF (base 16) Virtuosys Ltd Sauerlach Bavaria 82054 DE -70-B3-D5 (hex) Private -720000-720FFF (base 16) Private - 70-B3-D5 (hex) Sanmina Israel 1E6000-1E6FFF (base 16) Sanmina Israel Koren Industrial Zone , POBox 102 @@ -2948,6 +2942,87 @@ DF1000-DF1FFF (base 16) CoXlab Inc. Berlin 12247 DE +70-B3-D5 (hex) AVI Pty Ltd +790000-790FFF (base 16) AVI Pty Ltd + 9 Pitt Way + Booragoon Western Australia 6154 + AU + +70-B3-D5 (hex) Private +FFE000-FFEFFF (base 16) Private + +70-B3-D5 (hex) Vocality international T/A Cubic +75F000-75FFFF (base 16) Vocality international T/A Cubic + Lydling Barn,Lydling Farm,, Puttenham Lane + Godalming Surrey gu8 6ap + GB + +70-B3-D5 (hex) DEA SYSTEM SPA +8FA000-8FAFFF (base 16) DEA SYSTEM SPA + VIA DELLA TECNICA 6 + PIOVENE ROCCHETTE VICENZA 36013 + IT + +70-B3-D5 (hex) Kalfire +64B000-64BFFF (base 16) Kalfire + Geloërveldweg 21 + Belfeld Limburg 5951 DH + NL + +70-B3-D5 (hex) Contec DTx +363000-363FFF (base 16) Contec DTx + 1800 Penn St Suite 1 + Melbourne FL 32901 + US + +70-B3-D5 (hex) Private +720000-720FFF (base 16) Private + +70-B3-D5 (hex) Private +292000-292FFF (base 16) Private + +70-B3-D5 (hex) RoboCore Tecnologia +0AC000-0ACFFF (base 16) RoboCore Tecnologia + Estrada das Lagrimas 1986 sala 22 + Sao Caetano do Sul SP 09580500 + BR + +70-B3-D5 (hex) Enyx SA +21C000-21CFFF (base 16) Enyx SA + 8 rue greneta + Paris 75003 + FR + +70-B3-D5 (hex) Tornado Modular Systems +A87000-A87FFF (base 16) Tornado Modular Systems + Inzhenernaya st. 4a + Novosibirsk Novosibirsk 630128 + RU + +70-B3-D5 (hex) FUJICOM Co.,Ltd. +00A000-00AFFF (base 16) FUJICOM Co.,Ltd. + 8-10-17-403, HON-chou + KOUNOSU-shi SAITAMA-ken 3650038 + JP + +70-B3-D5 (hex) Vistec Electron Beam GmbH +17B000-17BFFF (base 16) Vistec Electron Beam GmbH + Ilmstraße 4 + Jena 07743 + DE + +70-B3-D5 (hex) JSK System +B7F000-B7FFFF (base 16) JSK System + Wiośniana, 30/32 + Łódź 93-228 + PL + +70-B3-D5 (hex) Fink Telecom Services +23B000-23BFFF (base 16) Fink Telecom Services + Paradieshofstrasse 101 + Basel 4054 + CH + 70-B3-D5 (hex) Flintab AB D60000-D60FFF (base 16) Flintab AB Kabelvägen 4 @@ -2990,9 +3065,6 @@ AE2000-AE2FFF (base 16) Transas Marine Limited Askim Västra Götaland 43632 SE -00-1B-C5 (hex) Private -015000-015FFF (base 16) Private - 70-B3-D5 (hex) FR-Team International SA 476000-476FFF (base 16) FR-Team International SA Zone industrielle lotissement Vulcalux 10 @@ -3860,12 +3932,6 @@ B8C000-B8CFFF (base 16) ePOINT Embedded Computing Limited Lyndonville NY 14098 US -70-B3-D5 (hex) DITEST FAHRZEUGDIAGNOSE GMBH -109000-109FFF (base 16) DITEST FAHRZEUGDIAGNOSE GMBH - ALTE POSTSTRASSE 152 - A-8020 GRAZ STEIERMARK - AT - 70-B3-D5 (hex) Ars Products F63000-F63FFF (base 16) Ars Products 30 Crabtree Lane @@ -6020,6 +6086,69 @@ F06000-F06FFF (base 16) WARECUBE,INC Dinkelsbuehl Bavaria 91550 DE +70-B3-D5 (hex) Eurotek Srl +1D1000-1D1FFF (base 16) Eurotek Srl + Strada Comunale Savonesa, 9 + Rivalta Scrivia AL 15050 + IT + +00-1B-C5 (hex) Private +015000-015FFF (base 16) Private + +70-B3-D5 (hex) Redcap Solutions s.r.o. +027000-027FFF (base 16) Redcap Solutions s.r.o. + Na Viničních Horách 16 + Praha 6 16000 + CZ + +70-B3-D5 (hex) SiFive +92F000-92FFFF (base 16) SiFive + 1875 S Grant St + San Mateo CA 94403 + US + +70-B3-D5 (hex) Telefrank GmbH +A82000-A82FFF (base 16) Telefrank GmbH + Am Wildengrund 1 + Altenambach TH 98553 + DE + +70-B3-D5 (hex) EIFFAGE ENERGIE ELECTRONIQUE +037000-037FFF (base 16) EIFFAGE ENERGIE ELECTRONIQUE + D937 + VERQUIN 62131 + FR + +70-B3-D5 (hex) Blue Marble Communications, Inc. +77E000-77EFFF (base 16) Blue Marble Communications, Inc. + 9520 Padgett St, Suite 101 + San Diego CA 92126 + US + +70-B3-D5 (hex) D.T.S Illuminazione Srl +D7C000-D7CFFF (base 16) D.T.S Illuminazione Srl + Via Fagnano Selve, 12 / 14 + Misano Adriatico Rimini 47843 + IT + +70-B3-D5 (hex) Duerkopp-Adler +3C9000-3C9FFF (base 16) Duerkopp-Adler + Potsdamerstr. 190 + Bielefeld 33719 + DE + +70-B3-D5 (hex) DiTEST Fahrzeugdiagnose GmbH +109000-109FFF (base 16) DiTEST Fahrzeugdiagnose GmbH + ALTE POSTSTRASSE 152 + A-8020 GRAZ STEIERMARK + AT + +70-B3-D5 (hex) MSB Elektronik und Gerätebau GmbH +E9E000-E9EFFF (base 16) MSB Elektronik und Gerätebau GmbH + Hofwiesenstr. 23 + Crailsheim 74564 + DE + 70-B3-D5 (hex) Schildknecht AG 494000-494FFF (base 16) Schildknecht AG Haugweg 26 @@ -7343,9 +7472,6 @@ F56000-F56FFF (base 16) VirtualHere Pty. Ltd. Sereing Liège 4102 BE -70-B3-D5 (hex) Private -A9F000-A9FFFF (base 16) Private - 70-B3-D5 (hex) Alligator Communications 9CB000-9CBFFF (base 16) Alligator Communications 317 Brokaw Road @@ -7979,9 +8105,6 @@ F03000-F03FFF (base 16) GMI Ltd Inazawa city Aichi pref. 495-0001 JP -70-B3-D5 (hex) Private -6CF000-6CFFFF (base 16) Private - 70-B3-D5 (hex) NuRi&G Engineering co,.Ltd. 72C000-72CFFF (base 16) NuRi&G Engineering co,.Ltd. #66-33, Elevator road, Geochang Industrial Complex @@ -8210,12 +8333,6 @@ FFC000-FFCFFF (base 16) Symetrics Industries d.b.a. Extant Aerospace Seoul 135-860 KR -70-B3-D5 (hex) ard sa -489000-489FFF (base 16) ard sa - Micropolis Bat Clematis - Gap France 05000 - FR - 70-B3-D5 (hex) WIXCON Co., Ltd 2B1000-2B1FFF (base 16) WIXCON Co., Ltd Room 803, 77, Seongsuil-ro, Seongdong-gu @@ -8372,9 +8489,6 @@ DDB000-DDBFFF (base 16) Intra Corporation Orlando FL 32801 US -70-B3-D5 (hex) Private -FFF000-FFFFFF (base 16) Private - 70-B3-D5 (hex) SISTEM SA DB8000-DB8FFF (base 16) SISTEM SA Avda.Rita Levi Montalcini, nº2 Parcela 5 @@ -8762,16 +8876,52 @@ E0B000-E0BFFF (base 16) ENTEC Electric & Electronic Co., LTD. Rome Italy 00155 IT +70-B3-D5 (hex) Biovigil Hygiene Technologies +DB1000-DB1FFF (base 16) Biovigil Hygiene Technologies + 924 N. Main st., Suite 2 + Ann Arbor MI 48104 + US + 70-B3-D5 (hex) Nautel Limited 87C000-87CFFF (base 16) Nautel Limited 10089 Peggy's Cove Road Hackett's Cove Nova Scotia B3Z3J4 CA -70-B3-D5 (hex) Biovigil Hygiene Technologies -DB1000-DB1FFF (base 16) Biovigil Hygiene Technologies - 924 N. Main st., Suite 2 - Ann Arbor MI 48104 +70-B3-D5 (hex) Andasis Elektronik San. ve Tic. A.Ş. +D62000-D62FFF (base 16) Andasis Elektronik San. ve Tic. A.Ş. + Teknopark İstanbul, Sanayi Mah, Teknopark Bulvarı, No:1/1C 1206 Pendik/İstanbul + İstanbul 34906 + TR + +70-B3-D5 (hex) samwooeleco +676000-676FFF (base 16) samwooeleco + A-1001,#119,GASAN-DIGITAL 1RO, GEUMCHEON-GU + SEOUL 153-773 + KR + +70-B3-D5 (hex) Grossenbacher Systeme AG +6B7000-6B7FFF (base 16) Grossenbacher Systeme AG + Spinnereistrasse 10 + St. Gallen 9008 + CH + +70-B3-D5 (hex) ard sa +489000-489FFF (base 16) ard sa + Micropolis Bat Clematis + Gap France 05000 + FR + +70-B3-D5 (hex) Touchnet/OneCard +478000-478FFF (base 16) Touchnet/OneCard + 2115 Chapman Rd. Suite 159 + Chattanooga TN 37421 + US + +70-B3-D5 (hex) Human Systems Integration +085000-085FFF (base 16) Human Systems Integration + 153 Washington St, 4th Floor + Walpole MA 02170 US 70-B3-D5 (hex) Shenzhen INVT Electric Co.,Ltd @@ -8984,6 +9134,39 @@ B43000-B43FFF (base 16) ZAO ZEO Seoul 07796 KR +70-B3-D5 (hex) SLAT +920000-920FFF (base 16) SLAT + 11 Rue Jean-Elysée DUPUY + Champagne au Mont d'Or Rhône 69543 + FR + +70-B3-D5 (hex) Private +A9F000-A9FFFF (base 16) Private + +70-B3-D5 (hex) Private +FFF000-FFFFFF (base 16) Private + +70-B3-D5 (hex) Technica Engineering GmbH +4C0000-4C0FFF (base 16) Technica Engineering GmbH + Leopoldstraße 236 + Munich 80807 + DE + +70-B3-D5 (hex) AIROBOT OÜ +1D3000-1D3FFF (base 16) AIROBOT OÜ + Pardi 32-1 + Pärnu 80016 + EE + +70-B3-D5 (hex) Private +6CF000-6CFFFF (base 16) Private + +70-B3-D5 (hex) SHANGHAI IRISIAN OPTRONICS TECHNOLOGY CO.,LTD. +2D2000-2D2FFF (base 16) SHANGHAI IRISIAN OPTRONICS TECHNOLOGY CO.,LTD. + 8F, NO.800, Huanhu NO.2 Road (W), Pudong New District, Shanghai 201306, China + Shanghai Shanghai 201306 + CN + 70-B3-D5 (hex) Innitive B.V. 66B000-66BFFF (base 16) Innitive B.V. Brouwerijstraat 20 @@ -10640,9 +10823,6 @@ CD9000-CD9FFF (base 16) Peter Huber Kaeltemaschinenbau GmbH Offenburg Ba-Wue 77656 DE -70-B3-D5 (hex) Private -1D7000-1D7FFF (base 16) Private - 70-B3-D5 (hex) Atonarp Micro-Systems India Pvt. Ltd. 976000-976FFF (base 16) Atonarp Micro-Systems India Pvt. Ltd. The Millenia, Tower A, 3rd Floor, No. 1&2 Murphy Road – Ulsoor, @@ -11729,12 +11909,6 @@ B74000-B74FFF (base 16) OnYield Inc Ltd Kowloon TST East HK -70-B3-D5 (hex) SonoSound ApS -656000-656FFF (base 16) SonoSound ApS - Malov Byvej 229 - Malov Hovedstaden 2760 - DK - 70-B3-D5 (hex) Granite River Labs Inc 749000-749FFF (base 16) Granite River Labs Inc 3500 Thomas Rd # A, @@ -11747,6 +11921,57 @@ B74000-B74FFF (base 16) OnYield Inc Ltd Moscow RUSSIA 129085 RU +70-B3-D5 (hex) SonoSound ApS +656000-656FFF (base 16) SonoSound ApS + Malov Byvej 229 + Malov Hovedstaden 2760 + DK + +70-B3-D5 (hex) Rishaad Brown +D09000-D09FFF (base 16) Rishaad Brown + 224 Thoreau dr. Apt.D + Yorktown VA 23693 + US + +70-B3-D5 (hex) Power Electronics Espana, S.L. +2A9000-2A9FFF (base 16) Power Electronics Espana, S.L. + C/ Leonardo Da Vinci, 24-26 + Paterna Valencia 46980 + ES + +70-B3-D5 (hex) Private +1D7000-1D7FFF (base 16) Private + +70-B3-D5 (hex) Suprock Technologies +613000-613FFF (base 16) Suprock Technologies + 45 Scott Hill Rd + Warren NH 03279 + US + +70-B3-D5 (hex) Yukilab +7D6000-7D6FFF (base 16) Yukilab + 1-7-3 Sekiya-Matsunami, Chuo + Niigata Niigata 951-8161 + JP + +70-B3-D5 (hex) SYS TEC electronic GmbH +BAF000-BAFFFF (base 16) SYS TEC electronic GmbH + Am Windrad 2 + Heinsdorfergrund D-08468 + DE + +70-B3-D5 (hex) MITSUBISHI HEAVY INDUSTRIES THERMAL SYSTEMS, LTD. +A37000-A37FFF (base 16) MITSUBISHI HEAVY INDUSTRIES THERMAL SYSTEMS, LTD. + 3-1, Asahi, Nishibiwajima-Cho + Kiyosu Aichi 452-8561 + JP + +70-B3-D5 (hex) Hangzhou Youshi Industry Co., Ltd. +4EC000-4ECFFF (base 16) Hangzhou Youshi Industry Co., Ltd. + Unit 501-38, Blue Sky Business Centre,GongShu District, + Hangzhou Zhejiang 310000 + CN + 70-B3-D5 (hex) Saline Lectronics, Inc. 246000-246FFF (base 16) Saline Lectronics, Inc. 710 N Maple Rd @@ -11939,6 +12164,54 @@ CA2000-CA2FFF (base 16) De Haardt bv Santa Clarita CA 91350 US +70-B3-D5 (hex) Orange Tree Technologies Ltd +EF4000-EF4FFF (base 16) Orange Tree Technologies Ltd + 173 Curie Avenue, Harwell Oxford + Didcot Oxfordshire OX11 0QG + GB + +70-B3-D5 (hex) Adel System srl +375000-375FFF (base 16) Adel System srl + VIA LUIGI BARCHI, 9/B + Reggio Emilia 42124 + IT + +70-B3-D5 (hex) Pietro Fiorentini +A76000-A76FFF (base 16) Pietro Fiorentini + Via Enrico Fermi + Arcugnano 36057 + IT + +70-B3-D5 (hex) UMAN +722000-722FFF (base 16) UMAN + Unit 12, Oxbow Crescent, Esturies, Century City + Cape Town Western Cape 7441 + ZA + +70-B3-D5 (hex) YAWATA ELECTRIC INDUSTRIAL CO.,LTD. +BCE000-BCEFFF (base 16) YAWATA ELECTRIC INDUSTRIAL CO.,LTD. + 1-17-1 Ohmorihigashi + Ohta-ku Tokyo 143-0012 + JP + +70-B3-D5 (hex) PEEK TRAFFIC +C65000-C65FFF (base 16) PEEK TRAFFIC + 5401 N SAM HOUSTON PKWY W + HOUSTON 77086 + US + +70-B3-D5 (hex) Enertex Bayern GmbH +DC8000-DC8FFF (base 16) Enertex Bayern GmbH + Ebermannstädter Str. 8 + Forchheim Bayern 91301 + DE + +70-B3-D5 (hex) Potter Electric Signal Co. LLC +1BE000-1BEFFF (base 16) Potter Electric Signal Co. LLC + 1609 Park 370 Place + Hazelwood MO 63042 + US + 70-B3-D5 (hex) EMAC, Inc. 8AB000-8ABFFF (base 16) EMAC, Inc. 2390 EMAC Way @@ -13295,9 +13568,6 @@ EE1000-EE1FFF (base 16) allora Factory BVBA Bornem 2880 BE -70-B3-D5 (hex) Private -389000-389FFF (base 16) Private - 70-B3-D5 (hex) Electronic Equipment Company Pvt. Ltd. 640000-640FFF (base 16) Electronic Equipment Company Pvt. Ltd. 146/2, Old China Bazar Street, @@ -14833,3 +15103,84 @@ C11000-C11FFF (base 16) Ariston Thermo s.p.a. Rm121 B1 Shouxindasha Building, 5 Jiangtailu Rd., Chaoyang District Beijing 100015 CN + +70-B3-D5 (hex) OnYield Inc Ltd +D72000-D72FFF (base 16) OnYield Inc Ltd + 814 Houston Centre, 63 Mody Road + Kowloon TST East + HK + +70-B3-D5 (hex) KnowRoaming +D6A000-D6AFFF (base 16) KnowRoaming + 90 Eglinton Ave. E + Toronto Ontario - ON M4P2Y3 + CA + +70-B3-D5 (hex) RFRain LLC +F5F000-F5FFFF (base 16) RFRain LLC + 8 THE GREEN SUITE 4510 + Dover DE 19901 + US + +70-B3-D5 (hex) Refine Technology, LLC +EBC000-EBCFFF (base 16) Refine Technology, LLC + 26 Chapin Road, Unit 1107, PO Box 691 + Pine Brook NJ 07058 + US + +70-B3-D5 (hex) Private +389000-389FFF (base 16) Private + +70-B3-D5 (hex) Sanmina Israel +984000-984FFF (base 16) Sanmina Israel + Koren Industrial Zone , POBox 102 + Maalot Israel 2101002 + IL + +70-B3-D5 (hex) Common Sense Monitoring Solutions Ltd. +0D1000-0D1FFF (base 16) Common Sense Monitoring Solutions Ltd. + Unit 1, Holts Court + Threshers Bush Essex CM17 0NS + GB + +70-B3-D5 (hex) Naval Group +382000-382FFF (base 16) Naval Group + 40-42 Rue Du Docteur Finlay + PARIS CEDEX 15 75732 + FR + +70-B3-D5 (hex) Koizumi Lighting Technology Corp. +19F000-19FFFF (base 16) Koizumi Lighting Technology Corp. + 3-5-2-Chome + Higashinakamoto,Higashinari-ku,Osaka 537-0021 + JP + +70-B3-D5 (hex) LGM Ingénierie +968000-968FFF (base 16) LGM Ingénierie + 13 avenue Morane Saulnier + Vélizy-Villacoublay 78140 + FR + +70-B3-D5 (hex) EN ElectronicNetwork Hamburg GmbH +015000-015FFF (base 16) EN ElectronicNetwork Hamburg GmbH + Meiendorfer Strasse 205 + Hamburg 22145 + DE + +70-B3-D5 (hex) VITEC +05E000-05EFFF (base 16) VITEC + 99 rue pierre sémard + Chatillon France 92320 + FR + +70-B3-D5 (hex) Saankhya Labs Private Limited +CA3000-CA3FFF (base 16) Saankhya Labs Private Limited + Embassy Icon, 3rd Floor, No. 3, Infantry Road, + Bangalore Karnataka 560001 + IN + +70-B3-D5 (hex) ard sa +D6E000-D6EFFF (base 16) ard sa + Micropolis Bat Clematis + Gap France 05000 + FR diff --git a/hwdb/pci.ids b/hwdb/pci.ids index d6f8b1cf2..27cca09d2 100644 --- a/hwdb/pci.ids +++ b/hwdb/pci.ids @@ -1,8 +1,8 @@ # # List of PCI ID's # -# Version: 2018.01.14 -# Date: 2018-01-14 03:15:02 +# Version: 2018.02.19 +# Date: 2018-02-19 03:15:01 # # Maintained by Albert Pool, Martin Mares, and other volunteers from # the PCI ID Project at http://pci-ids.ucw.cz/. @@ -250,6 +250,7 @@ 1028 1fd4 PERC H745P MX 1d49 0602 ThinkSystem RAID 930-16i 4GB Flash PCIe 12Gb Adapter 1d49 0604 ThinkSystem RAID 930-8e 4GB Flash PCIe 12Gb Adapter + 1d49 0607 ThinkSystem RAID 930-16i 8GB Flash PCIe 12Gb Adapter 8086 352d Integrated RAID Module RMSP3AD160F 8086 9460 RAID Controller RSP3TD160F 8086 9480 RAID Controller RSP3MD088F @@ -751,7 +752,9 @@ 131b Kaveri [Radeon R4 Graphics] 131c Kaveri [Radeon R7 Graphics] 131d Kaveri [Radeon R6 Graphics] - 15dd Vega [Radeon Vega 8 Mobile] + 15dd Raven Bridge [Radeon Vega Series / Radeon Vega Mobile Series] + 103c 83c6 Radeon Vega 8 Mobile + 1458 d000 Radeon RX Vega 11 15ff Vega [Radeon Vega 28 Mobile] 1714 BeaverCreek HDMI Audio [Radeon HD 6500D and 6400G-6600G series] 103c 168b ProBook 4535s @@ -784,7 +787,7 @@ 18bc 0101 GC-R9600PRO (Primary) 4151 RV350 [Radeon 9600 Series] 1043 c004 A9600SE - 174b 7c37 Radeon 9600 SE + 174b 7c37 Radeon 9600SE 128M DDR V/D/VO 4152 RV360 [Radeon 9600/X1050 Series] 1002 0002 Radeon 9600XT 1002 4772 All-in-Wonder 9600 XT @@ -814,7 +817,7 @@ 18bc 0100 GC-R9600PRO (Secondary) 4171 RV350 [Radeon 9600] (Secondary) 1043 c005 A9600SE (Secondary) - 174b 7c36 Radeon 9600 SE (secondary) + 174b 7c36 Radeon 9600SE 128M DDR V/D/VO (secondary) 4172 RV350 [Radeon 9600/X1050 Series] (Secondary) 1002 0003 Radeon 9600XT (Secondary) 1002 4773 All-in-Wonder 9600 XT (Secondary) @@ -921,6 +924,7 @@ 1043 836c M4A785TD Motherboard 1043 8410 M4A89GTD PRO/USB3 Motherboard 1043 841b M5A88-V EVO + 1043 8445 M5A78L LE 105b 0e13 N15235/A74MX mainboard / AMD SB700 1179 ff50 Satellite P305D-S8995E 1458 a022 GA-MA770-DS3rev2.0 Motherboard @@ -1598,15 +1602,18 @@ 103c 2100 FirePro M4100 6602 Mars 6603 Mars - 6604 Opal XT [Radeon R7 M265] + 6604 Opal XT [Radeon R7 M265/M365X/M465] 103c 8006 FirePro M4170 + 103c 814f Litho XT [Radeon R7 M365X] + 103c 82aa Litho XT [Radeon R7 M465] 17aa 3643 Radeon R7 A360 - 6605 Opal PRO [Radeon R7 M260] + 6605 Opal PRO [Radeon R7 M260X] 103c 2259 FirePro M4150 6606 Mars XTX [Radeon HD 8790M] 1028 0684 FirePro W4170M 6607 Mars LE [Radeon HD 8530M / R5 M240] 6608 Oland GL [FirePro W2100] + 13cc 3d28 MXRT-2600 6610 Oland XT [Radeon HD 8670 / R7 250/350] 1019 0030 Radeon HD 8670 1028 2120 Radeon R7 250 @@ -1639,6 +1646,7 @@ 1002 0b0c FirePro W4300 103c 0b0c Bonaire [FirePro W4300] 103c 230c FirePro W5100 + 13cc 3d2a MXRT-5600 6650 Bonaire 6651 Bonaire 6658 Bonaire XTX [Radeon R7 260X/360] @@ -1674,6 +1682,7 @@ 103c 80be Radeon R5 M330 103c 8136 Radeon R5 M330 103c 8329 Radeon R7 M520 + 17aa 3633 Radeon R5 A330 17aa 3804 Radeon R5 M330 17aa 3809 Radeon R5 M330 17aa 381a Radeon R5 M430 @@ -1877,7 +1886,10 @@ 8086 2111 Radeon HD 6625M 6743 Whistler [Radeon E6760] 6749 Turks GL [FirePro V4900] + 15c3 2b06 MED-X4900 674a Turks GL [FirePro V3900] + 13cc 3d22 MXRT-2500 + 15c3 0106 MED-X3900 6750 Onega [Radeon HD 6650A/7650A] 1462 2670 Radeon HD 6670A 17aa 3079 Radeon HD 7650A @@ -2190,11 +2202,13 @@ 1043 3001 Tahiti XTL [ROG Matrix R9 280X] 1043 3006 Tahiti XTL [Radeon R9 280X DirectCU II TOP] 1043 9999 ARES II + 106b 0127 FirePro D700 + 106b 0128 FirePro D700 1092 3000 Tahiti XT2 [Radeon HD 7970 GHz Edition] 1458 2261 Tahiti XT2 [Radeon HD 7970 GHz Edition OC] # GV-R928XOC-3GD 1458 3001 Tahiti XTL [Radeon R9 280X OC] - 1462 2774 MSI R7970 TF 3GD5/OC BE + 1462 2774 HD 7970 TwinFrozr III Boost Edition OC 1682 3001 Tahiti XTL [Radeon R9 280X] 1682 3211 Double D HD 7970 Black Edition # FX-797A-TNBC @@ -2215,6 +2229,8 @@ 1462 8036 Radeon HD 8990 OEM 148c 8990 Radeon HD 8990 OEM 679e Tahiti LE [Radeon HD 7870 XT] + 106b 0125 FirePro D500 + 106b 0126 FirePro D500 1787 2328 Radeon HD 7870 Black Edition 2 GB GDDR5 [2GBD5-2DHV3E] 679f Tahiti 67a0 Hawaii XT GL [FirePro W9100] @@ -2269,7 +2285,7 @@ 174b e324 Sapphire Nitro R9 390 67b9 Vesuvius [Radeon R9 295X2] 67be Hawaii LE - 67c0 Ellesmere [Radeon Pro WX 7100] + 67c0 Ellesmere [Radeon Pro WX 7100 Mobile] 67c2 Ellesmere [Radeon Pro V7300X / V7350x2] 67c4 Ellesmere [Radeon Pro WX 7100] 1002 0336 Radeon Pro Duo @@ -2299,10 +2315,20 @@ 1787 a480 Radeon RX 480 1da2 e353 Sapphire Radeon RX 580 Pulse 8GB 1da2 e366 Nitro+ Radeon RX 580 4GB - 67e0 Baffin [Polaris11] + 67e0 Baffin [Radeon Pro WX 4170] + 103c 8270 Radeon Pro WX 4170 + 103c 8272 Radeon Pro WX 4170 67e1 Baffin [Polaris11] 67e3 Baffin [Radeon Pro WX 4100] - 67e8 Baffin [Polaris11] + 67e8 Baffin [Radeon Pro WX 4130/4150] + 1028 075d Radeon Pro WX 4150 + 1028 07b0 Radeon Pro WX 4130/4150 + 1028 07b1 Radeon Pro WX 4130 + 1028 175d Radeon Pro WX 4150 + 1028 17b0 Radeon Pro WX 4130/4150 + 1028 17b1 Radeon Pro WX 4130 + 103c 8275 Radeon Pro WX 4150 + 103c 8277 Radeon Pro WX 4150 67e9 Baffin [Polaris11] 67eb Baffin [Radeon Pro V5300X] 67ef Baffin [Radeon RX 460/560D / Pro 450/455/460/560] @@ -2312,7 +2338,14 @@ 106b 0179 Radeon Pro 560 1642 1727 Polaris 21 XL [Radeon RX 560D] 1682 956d Polaris 21 XL [Radeon RX 560D] - 67ff Baffin [Radeon RX 560] + 67ff Baffin [Radeon RX 550 640SP / RX 560] + 1002 0b04 Radeon RX 560 + 1043 04bc Radeon RX 560 + 1458 22ed Radeon RX 560 + 148c 2381 Radeon RX 560 + 1682 9560 Radeon RX 560 + 1da2 e348 Radeon RX 560 + 1da2 e367 Radeon RX 550 640SP 6800 Wimbledon XT [Radeon HD 7970M] 1002 0124 Radeon HD 7970M 8086 2110 Radeon HD 7970M @@ -2327,8 +2360,16 @@ 6808 Pitcairn XT GL [FirePro W7000] 1002 0310 FirePro S7000 1002 0420 Radeon Sky 500 + 103c 030c MED-X7000 + 13cc 3d25 MXRT-7500 + 15c3 030c MED-X7000 6809 Pitcairn LE GL [FirePro W5000] + 13cc 3d23 MXRT-5500 + 13cc 3d24 MXRT-5550 + 15c3 0b06 MED-X5000 6810 Curacao XT / Trinidad XT [Radeon R7 370 / R9 270X/370X] + 106b 012a FirePro D300 + 106b 012b FirePro D300 148c 0908 Radeon R9 370 OEM 1682 7370 Radeon R7 370 6811 Curacao PRO [Radeon R7 370 / R9 270/370 OEM] @@ -2374,6 +2415,7 @@ 6826 Chelsea LP [Radeon HD 7700M Series] 6827 Heathrow PRO [Radeon HD 7850M/8850M] 6828 Cape Verde PRO [FirePro W600] + 15c3 2b1e MED-X6000 6829 Cape Verde 682a Venus PRO 682b Venus LE / Tropo PRO-L [Radeon HD 8830M / R7 M465X] @@ -2382,8 +2424,6 @@ 682d Chelsea XT GL [FirePro M4000] 682f Chelsea LP [Radeon HD 7730M] 103c 1851 Radeon HD 7750M - 6830 Cape Verde [Radeon HD 7800M Series] - 6831 Cape Verde [AMD Radeon HD 7700M Series] 6835 Cape Verde PRX [Radeon R9 255 OEM] 6837 Cape Verde LE [Radeon HD 7730/8730] 1462 2796 Radeon HD 8730 @@ -2512,17 +2552,19 @@ 6842 Thames LE [Radeon HD 7000M Series] 6843 Thames [Radeon HD 7670M] 6860 Vega 10 [Radeon Instinct MI25] + 106b 017c Radeon Pro Vega 64 6861 Vega 10 XT [Radeon PRO WX 9100] 6862 Vega 10 XT [Radeon PRO SSG] 6863 Vega 10 XTX [Radeon Vega Frontier Edition] 6864 Vega - 6867 Vega + 6867 Vega 10 XL [Radeon Pro Vega 56] 6868 Vega 686c Vega 10 [Radeon Instinct MI25 MxGPU] 687f Vega 10 XT [Radeon RX Vega 64] 6888 Cypress XT [FirePro V8800] 6889 Cypress PRO [FirePro V7800] 1002 0301 FirePro V7800P + 13cc 3d1f MXRT-7400 688a Cypress XT [FirePro V9800] 1002 030c FirePro V9800P 688c Cypress XT GL [FireStream 9370] @@ -2570,6 +2612,8 @@ 103c 159b Radeon HD 6850M 144d c0ad Radeon HD 6850M 68a9 Juniper XT [FirePro V5800] + 13cc 3d1e MXRT-5400 + 13cc 3d20 MXRT-5450 68b8 Juniper XT [Radeon HD 5770] 106b 00cf MacPro5,1 [Mac Pro 2.8GHz DDR3] 68b9 Juniper LE [Radeon HD 5670 640SP Edition] @@ -2731,6 +2775,7 @@ 1462 2246 Radeon HD 6550A 68c8 Redwood XT GL [FirePro V4800] 68c9 Redwood PRO GL [FirePro V3800] + 13cc 3d1d MXRT-2400 68d8 Redwood XT [Radeon HD 5670/5690/5730] 1028 68e0 Radeon HD 5670 174b 5690 Radeon HD 5690 @@ -2992,6 +3037,7 @@ 103c 2269 Radeon R7 M260 103c 22c6 Radeon R7 M260 103c 22c8 Radeon R7 M260 + 103c 2b45 Radeon R7 A360 103c 808c Radeon R7 M260 103c 8099 Radeon R7 M360 103c 80b5 Radeon R7 M360 @@ -3013,6 +3059,7 @@ 6921 Amethyst XT [Radeon R9 M295X] 6929 Tonga XT GL [FirePro S7150] 692b Tonga PRO GL [FirePro W7100] + 13cc 3d2b MXRT-7600 692f Tonga XTV GL [FirePro S7150V] 6938 Tonga XT / Amethyst XT [Radeon R9 380X / R9 M295X] 1043 04f5 Radeon R9 380X @@ -3027,7 +3074,8 @@ 148c 9380 Radeon R9 380 # Make naming scheme consistent 174b e308 Radeon R9 380 Nitro 4G D5 - 694c Vega [Radeon RX Vega M] + 694c Polaris 22 [Radeon RX Vega M GH] + 694e Polaris 22 [Radeon RX Vega M GL] 6980 Polaris12 6981 Polaris12 6985 Lexa XT [Radeon PRO WX 3100] @@ -3043,17 +3091,27 @@ 7101 R520/M58 [Mobility Radeon X1800 XT] 7102 R520/M58 [Mobility Radeon X1800] 7104 R520 GL [FireGL V7200] + 13cc 3d0a MXRT-5100 7109 R520 [Radeon X1800 XL] 1002 0322 All-in-Wonder X1800XL 1002 0d02 Radeon X1800 CrossFire Edition 710a R520 [Radeon X1800 GTO] 1002 0b12 Radeon X1800 GTO² 710b R520 [Radeon X1800 GTO] + 710e R520 GL [FireGL V7300] + 13cc 3d0c MXRT-5150 + 710f R520 GL [FireGL V7350] + 13cc 3d0e MXRT-7100 7120 R520 [Radeon X1800] (Secondary) 7124 R520 GL [FireGL V7200] (Secondary) + 13cc 3d0b MXRT-5100 (Secondary) 7129 R520 [Radeon X1800] (Secondary) 1002 0323 All-In-Wonder X1800 XL (Secondary) 1002 0d03 Radeon X1800 CrossFire Edition (Secondary) + 712e R520 GL [FireGL V7300] (Secondary) + 13cc 3d0d MXRT-5150 (Secondary) + 712f R520 GL [FireGL V7350] (Secondary) + 13cc 3d0f MXRT-7100 (Secondary) 7140 RV515 [Radeon X1300/X1550/X1600 Series] 7142 RV515 PRO [Radeon X1300/X1550 Series] 1002 0322 All-in-Wonder 2006 PCI-E Edition @@ -3093,12 +3151,16 @@ 7193 RV516 [Radeon X1550 Series] 7196 RV516/M62-S [Mobility Radeon X1350] 719b RV516 GL [FireMV 2250] + 13cc 3d12 MXRT-1150 + 13cc 3d14 MXRT-2150 719f RV516 [Radeon X1550 Series] 71a0 RV516 [Radeon X1300/X1550 Series] (Secondary) 71a1 RV516 [Radeon X1600/X1650 Series] (Secondary) 71a3 RV516 [Radeon X1300/X1550 Series] (Secondary) 71a7 RV516 [Radeon X1300/X1550 Series] (Secondary) 71bb RV516 GL [FireMV 2250] (Secondary) + 13cc 3d13 MXRT-1150 (Secondary) + 13cc 3d15 MXRT-2150 (Secondary) 71c0 RV530 [Radeon X1600 XT/X1650 GTO] 1002 e160 Radeon X1650 GTO 174b e160 Radeon X1650 GTO @@ -3117,6 +3179,7 @@ 1787 3000 PowerColor X1650 PRO AGP 71ce RV530 [Radeon X1300 XT/X1600 PRO] 71d2 RV530 GL [FireGL V3400] + 13cc 3d08 MXRT-2100 71d4 RV530/M66 GL [Mobility FireGL V5250] 71d5 RV530/M66-P [Mobility Radeon X1700] 71d6 RV530/M66-XT [Mobility Radeon X1700] @@ -3130,6 +3193,7 @@ 71e7 RV535 [Radeon X1650 PRO] (Secondary) 1787 3001 Radeon X1650 PRO AGP 71f2 RV530 GL [FireGL V3400] (Secondary) + 13cc 3d09 MXRT-2100 (Secondary) 7210 RV550/M71 [Mobility Radeon HD 2300] 7211 RV550/M71 [Mobility Radeon X2300 HD] 7240 R580+ [Radeon X1950 XTX] @@ -3206,6 +3270,7 @@ 9403 R600 [Radeon HD 2900 PRO] 9405 R600 [Radeon HD 2900 GT] 940a R600 GL [FireGL V8650] + 13cc 3d16 MXRT-7200 940b R600 GL [FireGL V8600] 940f R600 GL [FireGL V7600] 9440 RV770 [Radeon HD 4870] @@ -3243,6 +3308,7 @@ 174b 0028 Radeon HD 4650 AGP DDR2 9498 RV730 PRO [Radeon HD 4650] 949c RV730 GL [FirePro V7750] + 13cc 3d1b MXRT-7300 949e RV730 GL [FirePro V5700] 949f RV730 GL [FirePro V3750] 94a0 RV740/M97 [Mobility Radeon HD 4830] @@ -3329,6 +3395,7 @@ 958a RV630 [Radeon HD 2600 X2] 958b RV630/M76 [Mobility Radeon HD 2600 XT] 958c RV630 GL [FireGL V5600] + 13cc 3d18 MXRT-5200 958d RV630 GL [FireGL V3600] 9591 RV635/M86 [Mobility Radeon HD 3650] 1002 9591 Mobility Radeon HD 3650 @@ -3343,6 +3410,7 @@ 1043 3001 Radeon HD 4570 174b 3001 Radeon HD 3750 174b 4580 RV635 PRO [Radeon HD 4580] + 17af 3011 RV635 PRO [Radeon HD 4580] 9599 RV635 PRO [Radeon HD 3650 AGP] 95c0 RV620 PRO [Radeon HD 3470] 1002 95c0 Mobility Radeon HD 3470 @@ -3354,7 +3422,7 @@ 95c6 RV620 LE [Radeon HD 3450 AGP] 95c9 RV620 LE [Radeon HD 3450 PCI] 95cc RV620 GL [FirePro V3700] - 95cd RV620 [FirePro 2450] + 95cd RV620 GL [FirePro 2450] 95cf RV620 GL [FirePro 2260] 960f RS780 HDMI Audio [Radeon 3000/3100 / HD 3200/3300] 9610 RS780 [Radeon HD 3200] @@ -3430,7 +3498,19 @@ 985d Mullins 985e Mullins 985f Mullins - 9874 Carrizo + 9874 Wani [Radeon R5/R6/R7 Graphics] + 1002 1871 Radeon R5 Graphics + 1002 1e20 Radeon R7 Graphics + 1028 06bd Radeon R6 Graphics + 103c 2b44 Radeon R6 Graphics + 103c 8221 Radeon R5 Graphics + 103c 8223 Radeon R5 Graphics + 103c 8238 Radeon R7 Graphics + 103c 8353 Radeon R7 Graphics + 1458 d000 Radeon R7 Graphics + 17aa 5113 Radeon R6 Graphics + 17aa 5116 Radeon R6 Graphics + 17aa 5118 Radeon R5 Graphics 9900 Trinity [Radeon HD 7660G] 103c 1985 Pavilion 17-e163sg Notebook PC # AMD A10-5800K CPU @@ -3442,8 +3522,8 @@ 103c 194e ProBook 455 G1 Notebook 103c 1952 ProBook 455 G1 Notebook 9904 Trinity [Radeon HD 7560D] - 9905 Trinity [FirePro A300 Series Graphics] - 9906 Trinity [FirePro A300 Series Graphics] + 9905 Trinity GL [FirePro A300] + 9906 Trinity GL [FirePro A320] 9907 Trinity [Radeon HD 7620G] 9908 Trinity [Radeon HD 7600G] 9909 Trinity [Radeon HD 7500G] @@ -4079,7 +4159,7 @@ 1463 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 3 1464 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 4 1465 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 5 - 1466 Family 17h (Models 00h-0fh) Data Fabric Device 18h Function 6 + 1466 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 1467 Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 1510 Family 14h Processor Root Complex 174b 1001 PURE Fusion Mini @@ -4096,6 +4176,17 @@ 1535 Family 16h Processor Function 5 1536 Family 16h Processor Root Complex 1538 Family 16h Processor Function 0 + 1570 Family 15h (Models 60h-6fh) Processor Function 0 + 1571 Family 15h (Models 60h-6fh) Processor Function 1 + 1572 Family 15h (Models 60h-6fh) Processor Function 2 + 1573 Family 15h (Models 60h-6fh) Processor Function 3 + 1574 Family 15h (Models 60h-6fh) Processor Function 4 + 1575 Family 15h (Models 60h-6fh) Processor Function 5 + 1576 Family 15h (Models 60h-6fh) Processor Root Complex + 1577 Family 15h (Models 60h-6fh) I/O Memory Management Unit + 157a Family 15h (Models 60h-6fh) Audio Controller + 157b Family 15h (Models 60h-6fh) Host Bridge + 157c Family 15h (Models 60h-6fh) Processor Root Port 1600 Family 15h Processor Function 0 1601 Family 15h Processor Function 1 1602 Family 15h Processor Function 2 @@ -4165,8 +4256,11 @@ 43a1 Hudson PCI to PCI bridge (PCIE port 1) 43a2 Hudson PCI to PCI bridge (PCIE port 2) 43a3 Hudson PCI to PCI bridge (PCIE port 3) + 43b1 X399 Series Chipset PCIe Bridge 43b4 300 Series Chipset PCIe Port + 43b6 X399 Series Chipset SATA Controller 43b7 300 Series Chipset SATA Controller + 43ba X399 Series Chipset USB 3.1 xHCI Controller 43bb 300 Series Chipset USB 3.1 xHCI Controller 7006 AMD-751 [Irongate] System Controller 7007 AMD-751 [Irongate] AGP Bridge @@ -4623,7 +4717,7 @@ 103c 3381 iLO4 0534 G200eR2 0536 Integrated Matrox G200eW3 Graphics Controller - 0538 G200eH + 0538 MGA G200eH3 1590 00e4 iLO5 VGA 0540 M91XX 102b 2080 M9140 LP PCIe x16 @@ -5309,7 +5403,7 @@ c824 82C824 c825 82C825 [Firebridge 2] c832 82C832 - c861 82C861 + c861 82C861 OHCI USB Host c881 82C881 [FireLink] 1394 OHCI Link Controller c895 82C895 c935 EV1935 ECTIVA MachOne PCIAudio @@ -9293,6 +9387,7 @@ 0424 G86 [GeForce 8400 GS] 0425 G86M [GeForce 8600M GS] 1025 0121 Aspire 5920G + 1043 1514 F3SV 0426 G86M [GeForce 8400M GT] 0427 G86M [GeForce 8400M GS] 103c 30cc Pavilion dv6700 @@ -9464,6 +9559,7 @@ 1682 2385 GeForce 9600 GSO 768mb 0611 G92 [GeForce 8800 GT] 107d 2ab0 Winfast PX8800 GT PCI-E + 1462 1170 NX8800GT series model V117 2xDVI+TV 19da 1040 ZT-88TES2P-FSP 0612 G92 [GeForce 9800 GTX / 9800 GTX+] 0613 G92 [GeForce 9800 GTX+] @@ -10248,8 +10344,10 @@ 102a GK110BGL [Tesla K40t] 102d GK210GL [Tesla K80] 102e GK110BGL [Tesla K40d] + 102f GK110BGL [Tesla Stella Solo] 103a GK110GL [Quadro K6000] 103c GK110GL [Quadro K5200] + 103f GK110BGL [Tesla Stella SXM] 1040 GF119 [GeForce GT 520] 1043 83a0 ENGT520 SILENT 1042 GF119 [GeForce 510] @@ -10703,6 +10801,7 @@ 11a3 GK104M [GeForce GTX 680MX] 106b 010d iMac 13,2 11a7 GK104M [GeForce GTX 675MX] + 11af GK104GLM [GRID IceCube] # GRID K2 Quadro USM 11b0 GK104GL [GRID K240Q\K260Q vGPU] 10de 101a GRID K240Q @@ -10882,6 +10981,7 @@ 13bd GM107GL [Tesla M10] 10de 110a GRID M40 10de 1160 Tesla M10 + 10de 11d2 GRID M10-8Q 13c0 GM204 [GeForce GTX 980] 1043 8504 GTX980-4GD5 13c1 GM204 @@ -10895,6 +10995,10 @@ 13f0 GM204GL [Quadro M5000] 13f1 GM204GL [Quadro M4000] 13f2 GM204GL [Tesla M60] + 10de 114d GRID M60-1Q + 10de 114e GRID M60-2Q + 10de 1150 GRID M60-8Q + 10de 11b0 GRID M60-4A 13f3 GM204GL [Tesla M6] 10de 1184 GRID M6-8Q 13f8 GM204GLM [Quadro M5000M / M5000 SE] @@ -10925,6 +11029,7 @@ 172f GP100 174d GM108M [GeForce MX130] 174e GM108M [GeForce MX110] + 1789 GM107GL [GRID M3-3020] 17c2 GM200 [GeForce GTX TITAN X] 17c8 GM200 [GeForce GTX 980 Ti] 17f0 GM200GL [Quadro M6000] @@ -10996,12 +11101,13 @@ 1cb1 GP107GL [Quadro P1000] 1cb2 GP107GL [Quadro P600] 1cb3 GP107GL [Quadro P400] + 1cb6 GP107GL [Quadro P620] 1d01 GP108 [GeForce GT 1030] 1d10 GP108M [GeForce MX150] 1d33 GP108GL [Quadro P500] 1d81 GV100 [TITAN V] - 1db1 GV100 [Tesla V100 SXM2] - 1db4 GV100 [Tesla V100 PCIe] + 1db1 GV100GL [Tesla V100 SXM2] + 1db4 GV100GL [Tesla V100 PCIe] 10df Emulex Corporation 0720 OneConnect NIC (Skyhawk) 103c 1934 FlexFabric 20Gb 2-port 650M Adapter @@ -11280,7 +11386,7 @@ 1043 16d5 U6V/U31J laptop 1043 81aa P5B 1043 82c6 M3A78 Series Motherboard - 1043 83a3 M4A785TD Motherboard + 1043 83a3 M4A785/P7P55 Motherboard 1043 8432 P8P67 and other motherboards 1043 8505 P8 series motherboard 105b 0d7c D270S/D250S Motherboard @@ -11288,6 +11394,7 @@ 144d c652 RTL8168 on a NP300E5C series laptop 1458 e000 Onboard Ethernet 1462 238c Onboard RTL8111b on MSI P965 Platinum Mainboard + 1462 345c RTL8111B on MS-7345 Motherboard 1462 368c K9AG Neo2 1462 4180 Wind PC MS-7418 1462 7522 X58 Pro-E @@ -11342,6 +11449,7 @@ 8821 RTL8821AE 802.11ac PCIe Wireless Network Adapter b723 RTL8723BE PCIe Wireless Network Adapter 10ec 8739 Dell Wireless 1801 + b822 RTL8822BE 802.11a/b/g/n/ac WiFi adapter c821 RTL8821CE 802.11ac PCIe Wireless Network Adapter 10ed Ascii Corporation 7310 V7310 @@ -13272,6 +13380,7 @@ 0102 Extended IDE Controller 0103 EX-IDE Type-B 010f NVMe Controller + 0115 XG4 NVMe SSD Controller 0404 DVD Decoder card 0406 Tecra Video Capture device 0407 DVD Decoder card (Version 2) @@ -13304,9 +13413,47 @@ 117c 802f ExpressPCI UL5D Low Profile 0033 SAS Adapter 0041 ExpressSAS R30F + 0042 ExpressSAS 6Gb/s SAS/SATA HBA + 117c 0042 ExpressSAS H680 + 117c 0043 ExpressSAS H608 + 117c 0044 ExpressSAS H60F + 117c 0045 ExpressSAS H6F0 + 117c 0046 ExpressSAS H644 + 117c 004f ExpressSAS M608 + 117c 0057 ExpressSAS M680 + 117c 0058 ExpressSAS M644 + 117c 0059 ExpressSAS W608 + 117c 005a ExpressSAS W680 + 117c 005b ExpressSAS W644 + 0049 ExpressSAS 6Gb SAS/SATA RAID Adapter + 117c 0049 ExpressSAS R680 + 117c 004a ExpressSAS R608 + 117c 004b ExpressSAS R60F + 117c 004c ExpressSAS R6F0 + 117c 004d ExpressSAS R644 + 117c 004e ExpressSAS R648 + 0064 Celerity FC 16Gb/s Gen 5 Fibre Channel HBA + 117c 0063 Celerity FC-161E + 117c 0064 Celerity FC-162E + 117c 0065 Celerity FC-164E + 0094 Celerity FC 16/32Gb/s Gen 6 Fibre Channel HBA + 117c 0094 Celerity FC-162P + 117c 00a0 Celerity FC-161P + 117c 00a1 Celerity FC-164P + 117c 00a2 Celerity FC-321E + 117c 00a3 Celerity FC-322E + 117c 00ac Celerity FC-324E 8013 ExpressPCI UL4D 8014 ExpressPCI UL4S 8027 ExpressPCI UL5D + 8070 ExpressSAS 12Gb/s SAS/SATA HBA + 117c 0070 ExpressSAS H1280 + 117c 0071 ExpressSAS H1208 + 117c 0080 ExpressSAS H1244 + 8072 ExpressSAS 12Gb/s SAS/SATA HBA + 117c 0072 ExpressSAS H12F0 + 117c 0073 ExpressSAS H120F + 117c 0082 ExpressSAS H1288 117d Becton & Dickinson 117e T/R Systems 117f Integrated Circuit Systems @@ -13361,6 +13508,7 @@ 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cc Pavilion dv6700 @@ -13378,6 +13526,7 @@ 1028 01a2 Inspiron 9200 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 03b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30c1 Compaq 6910p @@ -13394,6 +13543,7 @@ 1025 0121 Aspire 5920G 1028 01d7 XPS M1210 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 1028 024d Latitude E4300 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL @@ -13416,6 +13566,7 @@ 0852 xD-Picture Card Controller 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30b5 Presario V3242AU 103c 30b7 Presario V6133CL 103c 30cc Pavilion dv6700 @@ -13667,6 +13818,7 @@ 4353 88E8039 PCI-E Fast Ethernet Controller 104d 902d VAIO VGN-NR120E 4354 88E8040 PCI-E Fast Ethernet Controller + 1028 022f Inspiron 1525 144d c06a R730 Laptop 144d c072 Notebook N150P 4355 88E8040T PCI-E Fast Ethernet Controller @@ -13762,8 +13914,9 @@ 6081 MV88SX6081 8-port SATA II PCI-X Controller 6101 88SE6101/6102 single-port PATA133 interface 1043 82e0 P5K PRO Motherboard - 6111 88SE6111 1-port PATA133(IDE) and 1-port SATA II Controllers - 6121 88SE6121 SATA II / PATA Controller + 6121 88SE6111/6121 SATA II / PATA Controller +# 6111: 1 SATA port; 6121: 2 SATA ports + 11ab 6121 88SE6111/6121 1/2 port SATA II + 1 port PATA Controller 6141 88SE614x SATA II PCI-E controller 6145 88SE6145 SATA II PCI-E controller 6180 88F6180 [Kirkwood] ARM SoC @@ -14089,6 +14242,7 @@ 8000 PM8000 [SPC - SAS Protocol Controller] 8009 PM8009 SPCve 8x6G 8032 ATTO Celerity FC8xEN + 117c 003a Celerity FC-81EN Fibre Channel Adapter 117c 003b Celerity FC-82EN Fibre Channel Adapter 117c 003c Celerity FC-84EN Fibre Channel Adapter 8053 PM8053 SXP 12G 24-port SAS/SATA expander @@ -14109,39 +14263,39 @@ 11fc Silicon Magic 11fd High Street Consultants 11fe Comtrol Corporation - 0001 RocketPort 32 port w/external I/F - 0002 RocketPort 8 port w/external I/F - 0003 RocketPort 16 port w/external I/F - 0004 RocketPort 4 port w/quad cable - 0005 RocketPort 8 port w/octa cable - 0006 RocketPort 8 port w/RJ11 connectors - 0007 RocketPort 4 port w/RJ11 connectors - 0008 RocketPort 8 port w/ DB78 SNI (Siemens) connector - 0009 RocketPort 16 port w/ DB78 SNI (Siemens) connector - 000a RocketPort Plus 4 port - 000b RocketPort Plus 8 port - 000c RocketModem 6 port + 0001 RocketPort PCI 32-port w/external I/F + 0002 RocketPort PCI 8-port w/external I/F + 0003 RocketPort PCI 16-port w/external I/F + 0004 RocketPort PCI 4-port w/Quad Cable + 0005 RocketPort PCI 8-port w/Octa Cable + 0006 RocketPort PCI 8-port w/RJ11 connectors + 0007 RocketPort PCI 4-port w/RJ45 connectors + 0008 RocketPort PCI 8-port w/DB78 SNI connector (Siemens) + 0009 RocketPort PCI 16-port w/DB78 SNI connector (Siemens) + 000a RocketPort PCI Plus 4-port w/Quad Cable + 000b RocketPort PCI Plus 8-port w/Octa Cable + 000c RocketModem II 6-port 000d RocketModem 4-port - 000e RocketPort Plus 2 port RS232 - 000f RocketPort Plus 2 port RS422 - 0040 RocketPort Infinity Octa, 8port, RJ45 - 0041 RocketPort Infinity 32port, External Interface - 0042 RocketPort Infinity 8port, External Interface - 0043 RocketPort Infinity 16port, External Interface - 0044 RocketPort Infinity Quad, 4port, DB - 0045 RocketPort Infinity Octa, 8port, DB + 000e RocketPort PCI Plus 2-port RS-232 w/DB9 connectors + 000f RocketPort PCI Plus 2-port SMPTE w/DB9 connectors + 0040 RocketPort INFINITY 8-port w/Octa Cable RJ45 + 0041 RocketPort INFINITY 32-port w/external I/F + 0042 RocketPort INFINITY 8-port w/external I/F + 0043 RocketPort INFINITY 16-port w/external I/F + 0044 RocketPort INFINITY 4-port w/Quad Cable DB + 0045 RocketPort INFINITY 8-port w/Octa Cable DB 0046 RocketPort INFINITY 4-port w/external I/F - 0047 RocketPort Infinity 4port, RJ45 + 0047 RocketPort INFINITY 4J (4-port) w/RJ45 connectors 0048 RocketPort INFINITY 4J (4-port) w/RJ45 connectors 004a RocketPort INFINITY Plus 4-port 004b RocketPort INFINITY Plus 8-port 004c RocketModem INFINITY III 8-port 004d RocketModem INFINITY III 4-port 004e RocketPort INFINITY Plus 2-port - 004f RocketPort Infinity 2port, SMPTE + 004f RocketPort INFINITY 2-port SMPTE w/DB9 connectors 0050 RocketPort INFINITY Plus 4-port RJ45 0051 RocketPort INFINITY Plus 8-port RJ11 - 0052 RocketPort Infinity Octa, 8port, SMPTE + 0052 RocketPort INFINITY 8-port SMPTE w/DB9 Connectors 0060 RocketPort EXPRESS 8-port w/Octa Cable 0061 RocketPort EXPRESS 32-port w/external I/F 0062 RocketPort EXPRESS 8-Port w/external I/F @@ -14159,7 +14313,7 @@ 0805 RocketPort uPCI 8-port w/Octa Cable 080b RocketPort Plus uPCI 8-port w/Octa Cable 080c RocketModem III 8-port - 080d RcoketModem III 4-port + 080d RocketModem III 4-port 080e RocketPort uPCI 2-port RS232 w/DB9 connectors 080f RocketPort uPCI SMPTE 2-port 0810 RocketPort Plus uPCI 4J (4-port) w/RJ45 connectors @@ -16335,6 +16489,7 @@ 4887 T440T-4087 Unified Wire Ethernet Controller [VF] 4888 T440-4088 Unified Wire Ethernet Controller [VF] 5001 T520-CR Unified Wire Ethernet Controller + 193d 1001 510F-B 5002 T522-CR Unified Wire Ethernet Controller 5003 T540-CR Unified Wire Ethernet Controller 5004 T520-BCH Unified Wire Ethernet Controller @@ -17058,6 +17213,7 @@ 14be L3 Communications 14bf SPIDER Communications Inc. 14c0 COMPAL Electronics Inc + 1201 X550 10Gb 2P RJ45 OCP Mezz # now owned by CSP, Inc. 14c1 MYRICOM Inc. 0008 Myri-10G Dual-Protocol NIC @@ -17166,7 +17322,12 @@ 107b 5048 E4500 Onboard 1259 2705 AT-2711FX 1601 NetXtreme BCM5752M Gigabit Ethernet PCI Express + 1604 BCM5745X NetXtreme-E Ethernet Partition + 1605 BCM5745X NetXtreme-E RDMA Partition + 1606 BCM5745X NetXtreme-E RDMA Virtual Function + 1609 BCM5745X NetXtreme-E Ethernet Virtual Function 1612 BCM70012 Video Decoder [Crystal HD] + 1614 BCM57454 NetXtreme-E 10Gb/25Gb/40Gb/50Gb/100Gb Ethernet 1615 BCM70015 Video Decoder [Crystal HD] 1639 NetXtreme II BCM5709 Gigabit Ethernet 1028 0235 PowerEdge R710 BCM5709 Gigabit Ethernet @@ -17409,6 +17570,8 @@ 103c 193a FlexFabric 10Gb 2-port 533FLR-T Adapter 103c 3382 Ethernet 10Gb 2-port 530FLR-SFP+ Adapter 103c 339d Ethernet 10Gb 2-port 530SFP+ Adapter + 193d 1003 530F-B + 193d 1006 530F-L 1690 NetXtreme BCM57760 Gigabit Ethernet PCIe 1691 NetLink BCM57788 Gigabit Ethernet PCIe 1028 04aa XPS 8300 @@ -17581,6 +17744,7 @@ 16ed BCM57414 NetXtreme-E RDMA Partition 16ee BCM57416 NetXtreme-E Ethernet Partition 16ef BCM57416 NetXtreme-E RDMA Partition + 16f1 BCM57452 NetXtreme-E 10Gb/25Gb/40Gb/50Gb Ethernet 16f3 NetXtreme BCM5727 Gigabit Ethernet PCIe 16f7 NetXtreme BCM5753 Gigabit Ethernet PCI Express 16fd NetXtreme BCM5753M Gigabit Ethernet PCI Express @@ -17857,6 +18021,13 @@ aa52 BCM43602 802.11ac Wireless LAN SoC b302 BCM56302 StrataXGS 24x1GE 2x10GE Switch Controller b334 BCM56334 StrataXGS 24x1GE 4x10GE Switch Controller + b370 BCM56370 Switch ASIC + b371 BCM56371 Switch ASIC + b372 BCM56372 Switch ASIC + b375 BCM56375 Switch ASIC + b376 BCM56376 Switch ASIC + b377 BCM56377 Switch ASIC + b379 Broadcom BCM56379 Switch ASIC b800 BCM56800 StrataXGS 10GE Switch Controller b842 BCM56842 Trident 10GE Switch Controller # Trident2 @@ -18565,6 +18736,7 @@ 15b3 0078 ConnectX-3 Pro 10 GbE Dual Port KR Mezzanine Card 15b3 0079 ConnectX-3 Pro 40 GbE Dual Port QSFP+ Adapter 15b3 0080 ConnectX-3 Pro 10 GbE Dual Port SFP+ Adapter + 193d 1002 520F-B 1009 MT27530 Family 100a MT27531 Family 100b MT27540 Family @@ -18586,12 +18758,15 @@ 15b3 0050 ConnectX-4 100 GbE Dual Port QSFP28 Adapter 1014 MT27700 Family [ConnectX-4 Virtual Function] 1015 MT27710 Family [ConnectX-4 Lx] + 15b3 0001 ConnectX-4 Lx EN network interface card, 25GbE single-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6 + 15b3 0003 ConnectX-4 Lx EN network interface card, 25GbE dual-port SFP28, PCIe3.0 x8, tall bracket, ROHS R6 15b3 0004 ConnectX-4 Lx Stand-up dual-port 10GbE MCX4121A-XCAT 15b3 0005 Mellanox Technologies ConnectX-4 Lx Stand-up single-port 40GbE MCX4131A-BCAT 15b3 0016 ConnectX-4 Lx 25 GbE Dual Port SFP28 Adapter 15b3 0020 MCX4411A-ACQN, ConnectX-4 Lx EN OCP, 1x25Gb 15b3 0021 MCX4421A-ACQN ConnectX-4 Lx EN OCP,2x25G 15b3 0025 ConnectX-4 Lx 25 GbE Dual Port SFP28 rNDC + 193d 100a 620F-B 1016 MT27710 Family [ConnectX-4 Lx Virtual Function] 1017 MT27800 Family [ConnectX-5] 1018 MT27800 Family [ConnectX-5 Virtual Function] @@ -18659,7 +18834,7 @@ # Spectrum, 100GbE Switch cb84 MT52100 cf08 MT53236 - cf6c MT53100 [Spectrum-2, 64 x 100GbE switch] + cf6c MT53100 [Spectrum-2] d2f0 Switch-IB 3 HDR (200Gbps) switch 15b4 CCI/TRIAD 15b5 Cimetrics Inc @@ -18824,6 +18999,14 @@ 5641 FarSync T4Ee PCI Express (4 port X.21/V.35/V.24) 6620 FarSync T2U-PMC PCI Express (2 port X.21/V.35/V.24) 161f Rioworks +1621 Lynx Studio Technology, Inc. + 0020 LynxTWO-A + 0021 LynxTWO-B + 0022 LynxTWO-C + 0023 Lynx L22 + 0024 Lynx AES16 + 0025 Lynx AES16-SRC + 0028 Lynx AES16e 1626 TDK Semiconductor Corp. 8410 RTL81xx Fast Ethernet 1629 Kongsberg Spacetec AS @@ -19344,6 +19527,9 @@ 7029 AP342 14-bit, 12-Channel Isolated Simultaneous Conversion Analog Input Module 702a AP226 12-Bit, 8-Channel Isolated Analog Output Module 702b AP236 16-Bit, 8-Channel Isolated Analog Output Module + 7031 AP441-1: 32-Channel Isolated Digital Input Module + 7032 AP441-2: 32-Channel Isolated Digital Input Module + 7033 AP441-3: 32-Channel Isolated Digital Input Module 7042 AP482 Counter Timer Module with TTL Level Input/Output 7043 AP483 Counter Timer Module with TTL Level and RS422 Input/Output 7044 AP484 Counter Timer Module with RS422 Input/Output @@ -19416,6 +19602,7 @@ 0101 PCD-7004 Digital Bi-Directional Ports PCI Card 0102 PCD-7104 Digital Input & Output PCI Card 0303 PCD-7006C Digital Input & Output PCI Card +1761 Pickering Interfaces Ltd 1771 InnoVISION Multimedia Ltd. # nee SBS Technologies 1775 GE Intelligent Platforms @@ -20565,6 +20752,8 @@ 2000 PGPCard - 4 Lane 2001 PGPCard - 8 Lane Plus EVR 2010 PCI-Express EVR +# PC-260-101-03 + 2020 PGP-GEN3 PCIe 1a51 Hectronic AB 1a55 Rohde & Schwarz DVS GmbH 0010 SDStationOEM @@ -20618,6 +20807,7 @@ 0009 RAIDCore Controller 000a RAIDCore Controller 1aae Global Velocity, Inc. +1ab4 FFEI Ltd 1ab6 CalDigit, Inc. 6201 RAID Card # Parallels VM virtual devices @@ -20792,6 +20982,9 @@ 91a4 88SE912x IDE Controller 9220 88SE9220 PCIe 2.0 x2 2-port SATA 6 Gb/s RAID Controller 9230 88SE9230 PCIe SATA 6Gb/s Controller + 1028 1fd6 BOSS-S1 Adapter + 1028 1fdf BOSS-S1 Modular + 1028 1fe2 BOSS-S1 Adapter 1d49 0300 ThinkSystem M.2 with Mirroring Enablement Kit 9235 88SE9235 PCIe 2.0 x2 4-port SATA 6 Gb/s Controller 9445 88SE9445 PCIe 2.0 x4 4-Port SAS/SATA 6 Gbps RAID Controller @@ -20934,6 +21127,8 @@ 1014 04f5 PCIe3 1.6TB NVMe Flash Adapter 1014 04f6 PCIe3 3.2TB NVMe Flash Adapter 0023 Ultrastar SN200 Series NVMe SSD +1c5c SK hynix + 1283 PC300 NVMe Solid State Drive 1c5f Beijing Memblaze Technology Co. Ltd. 0540 PBlaze4 NVMe SSD # http://www.nicevt.ru/ (in Russian) @@ -21137,6 +21332,9 @@ e00b Skylark PCI Express Root Port 6 [X-Gene 3] e00c Skylark PCI Express Root Port 7 [X-Gene 3] 1df7 opencpi.org + 0001 ml605 + 0002 alst4 + 0003 alst4x # nee Tumsan Oy 1fc0 Ascom (Finland) Oy 0300 E2200 Dual E1/Rawpipe Card @@ -21187,6 +21385,7 @@ 4027 TN9710P 10GBase-T/NBASE-T Ethernet Adapter 1154 0368 LGY-PCIE-MG 1432 8104 10 Gigabit Ethernet PCI Express Adapter + 1546 4027 IOI9710P 10Gbase-T/NBASE-T Ethernet Adapter 1fc9 3015 Ethernet Adapter 4527 TN9710Q 5GBase-T/NBASE-T Ethernet Adapter 1fcc StreamLabs @@ -23252,6 +23451,7 @@ 17aa 402b 82599ES 10Gb 2-port Server Adapter X520-DA2 17aa 402f FPGA Card XC7VX690T-3FFG1157E 18d4 0c09 82599ES 10Gb 2-port SFP+ OCP Mezz Card MOP81-I-10GS2 + 193d 1004 560F-B 1bd4 001b 10G SFP+ DP ER102Fi4 Rack Adapter 1bd4 002f 10G SFP+ DP EP102Fi4A Adapter 1bd4 0032 10G SFP+ DP EP102Fi4 Adapter @@ -23570,6 +23770,8 @@ 17aa 1074 ThinkServer I350-T4 AnyFabric 17aa 4005 I350 Gigabit Network Connection 18d4 0c07 I350 1Gb 2-port RJ45 OCP Mezz Card MOP41-I-1GT2 + 193d 1005 360T-B + 193d 1007 360T-L 1bd4 001d 1G base-T QP EP014Ti1 Adapter 1bd4 0035 1G base-T QP EP014Ti1 Adapter 8086 0001 Ethernet Server Adapter I350-T4 @@ -23683,9 +23885,12 @@ 1563 Ethernet Controller 10G X550T 1028 1fa8 Ethernet 10G 4P X550/I350 rNDC 1028 1fa9 Ethernet 10G 4P X550 rNDC + 14c0 1201 X550 10Gb 2P RJ45 OCP Mezz 1590 00d1 Ethernet 10Gb 2-port 562T Adapter 1590 00d2 Ethernet 10Gb 2-port 562FLR-T Adapter 18d4 0c08 X550 10Gb 2-port RJ45 OCP Mezz Card MOP81-I-10GT2 + 193d 1008 560T-B + 193d 1009 560T-L 8086 0001 Ethernet Converged Network Adapter X550-T2 8086 001a Ethernet Converged Network Adapter X550-T2 8086 001b Ethernet Server Adapter X550-T2 for OCP @@ -24696,6 +24901,7 @@ 1043 8277 P5K PRO Motherboard 1043 844d P8 series motherboard 1458 5000 Motherboard + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7418 Wind PC MS-7418 15d9 060d C7SIM-Q Motherboard 15d9 9680 X7DBN Motherboard @@ -25184,6 +25390,7 @@ 24f4 Wireless 8260 # Snow Field Peak AC 8086 0030 Dual Band Wireless-AC 8260 + 24fb Dual Band Wireless-AC 3168NGW [Stone Peak] 24fd Wireless 8265 / 8275 # Windstorm Peak 8086 0010 Dual Band Wireless-AC 8265 @@ -25197,6 +25404,7 @@ 250f 82820 820 (Camino) Chipset AGP Bridge 2520 82805AA MTH Memory Translator Hub 2521 82804AA MRH-S Memory Repeater Hub for SDRAM + 2526 Wireless-AC 9260 2530 82850 850 (Tehama) Chipset Host Bridge (MCH) 1028 00c7 Dimension 8100 147b 0507 TH7II-RAID @@ -26070,6 +26278,7 @@ 2815 82801HM (ICH8M) LPC Interface Controller 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30cc Pavilion dv6700 103c 30d9 Presario C700 @@ -26085,6 +26294,7 @@ 1028 020d Inspiron 530 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 2823 C610/X99 series chipset sSATA Controller [RAID mode] 2824 82801HB (ICH8) 4 port SATA Controller [AHCI mode] 1043 81ec P5B @@ -26106,6 +26316,7 @@ e4bf cc47 CCG-RUMBA 2829 82801HM/HEM (ICH8M/ICH8M-E) SATA Controller [AHCI mode] 1025 0121 Aspire 5920G + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26122,6 +26333,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26137,6 +26349,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26152,6 +26365,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26168,6 +26382,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26182,6 +26397,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26195,6 +26411,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26210,6 +26427,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26223,6 +26441,7 @@ 1025 0121 Aspire 5920G 1028 01da OptiPlex 745 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30d9 Presario C700 1043 81ec P5B 104d 9005 Vaio VGN-FZ260E @@ -26264,6 +26483,7 @@ 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 1028 01ff Precision M4300 + 1028 022f Inspiron 1525 1028 0256 Studio 1735 103c 2802 Compaq dc7700p 103c 30c0 Compaq 6710b @@ -26284,6 +26504,7 @@ 2850 82801HM/HEM (ICH8M/ICH8M-E) IDE Controller 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26300,6 +26521,7 @@ 1028 020d Inspiron 530 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard + 1462 7345 MS-7345 Motherboard 8086 5044 Desktop Board DP35DP 2917 ICH9M-E LPC Interface Controller e4bf cc4d CCM-BOOGIE @@ -26315,6 +26537,7 @@ 1028 0211 Optiplex 755 1028 023c PowerEdge R200 onboard SATA Controller 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801IR [ICH9R] 2921 82801IB (ICH9) 2 port SATA Controller [IDE mode] 1028 0235 PowerEdge R710 SATA IDE Controller 1028 0236 PowerEdge R610 SATA IDE Controller @@ -26322,6 +26545,7 @@ 1462 7360 G33/P35 Neo 2922 82801IR/IO/IH (ICH9R/DO/DH) 6 port SATA Controller [AHCI mode] 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801IR [ICH9R] 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP 2923 82801IB (ICH9) 4 port SATA Controller [AHCI mode] @@ -26334,6 +26558,7 @@ 1028 0210 PowerEdge T300 onboard SATA Controller 1028 0211 Optiplex 755 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801IR [ICH9R] 1462 7360 G33/P35 Neo 2928 82801IBM/IEM (ICH9M/ICH9M-E) 2 port SATA Controller [IDE mode] 2929 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] @@ -26348,6 +26573,7 @@ 103c 2a6f Asus IPIBL-LB Motherboard 103c 3628 dv6-1190en 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26368,6 +26594,7 @@ 1028 2011 Optiplex 755 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26385,6 +26612,7 @@ 1028 029c PowerEdge M710 USB UHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26400,6 +26628,7 @@ 1028 029c PowerEdge M710 USB UHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26415,6 +26644,7 @@ 1028 2011 Optiplex 755 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 2937 Optiplex 755 @@ -26431,6 +26661,7 @@ 1028 029c PowerEdge M710 USB UHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 2938 Optiplex 755 @@ -26442,6 +26673,7 @@ 1028 0237 PowerEdge T610 USB UHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26459,6 +26691,7 @@ 1028 029c PowerEdge M710 USB EHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26473,6 +26706,7 @@ 1028 029c PowerEdge M710 USB EHCI Controller 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 293c Optiplex 755 @@ -26484,6 +26718,7 @@ 103c 2a6f Asus IPIBL-LB Motherboard 103c 3628 dv6-1190en 1043 829f P5K PRO Motherboard: 82801IR [ICH9R] + 1462 735a MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 293e Optiplex 755 @@ -26494,6 +26729,7 @@ 1028 0211 Optiplex 755 103c 2a6f Asus IPIBL-LB Motherboard 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 8086 2940 Optiplex 755 2942 82801I (ICH9 Family) PCI Express Port 2 1028 020d Inspiron 530 @@ -26505,9 +26741,11 @@ 2948 82801I (ICH9 Family) PCI Express Port 5 1028 020d Inspiron 530 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 294a 82801I (ICH9 Family) PCI Express Port 6 1028 020d Inspiron 530 1043 8277 P5K PRO Motherboard: 82801IR [ICH9R] + 1462 7345 MS-7345 Motherboard: Intel 82801I/IR [ICH9/ICH9R] 294c 82566DC-2 Gigabit Network Connection 17aa 302e 82566DM-2 Gigabit Network Connection 2970 82946GZ/PL/GL Memory Controller Hub @@ -26563,6 +26801,7 @@ 103c 2a6f Asus IPIBL-LB Motherboard 1043 8276 P5K PRO Motherboard: Intel 82P35 Northbridge 1043 82b0 P5KPL-VM Motherboard + 1462 7345 MS-7345 Motherboard: Intel 82G33/P35 Northbridge 1462 7360 G33/P35 Neo 1af4 1100 QEMU Virtual Machine 8086 5044 Desktop Board DP35DP @@ -26606,6 +26845,7 @@ 2a00 Mobile PM965/GM965/GL960 Memory Controller Hub 1025 0121 Aspire 5920G 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30c1 Compaq 6910p 103c 30cc Pavilion dv6700 @@ -26620,6 +26860,7 @@ 2a02 Mobile GM965/GL960 Integrated Graphics Controller (primary) 1028 01f3 Inspiron 1420 1028 01f9 Latitude D630 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E @@ -26628,6 +26869,7 @@ e4bf cc47 CCG-RUMBA 2a03 Mobile GM965/GL960 Integrated Graphics Controller (secondary) 1028 01f3 Inspiron 1420 + 1028 022f Inspiron 1525 103c 30c0 Compaq 6710b 103c 30d9 Presario C700 104d 902d VAIO VGN-NR120E @@ -27343,6 +27585,10 @@ 17aa 4020 Intel Ethernet Connection X722 for 10G SFP+ 17aa 4021 Intel Ethernet Connection X722 for 10G SFP+ 17aa 4022 Ethernet Connection X722 for 10GbE SFP+ + 8086 0001 Ethernet Network Adapter X722-2 + 8086 0002 Ethernet Network Adapter X722-2 + 8086 0003 Ethernet Network Adapter X722-4 + 8086 0004 Ethernet Network Adapter X722-4 37d1 Ethernet Connection X722 for 1GbE 14cd 0010 88E1514 Ethernet OCP 2x1G RJ45 Phy Card [USI-1514-1GbaseT] 1590 0216 Ethernet 1Gb 2-port 368i Adapter @@ -27561,6 +27807,8 @@ 1028 02da OptiPlex 980 1028 040a Latitude E6410 1028 040b Latitude E6510 + 1043 3838 P7P55-M Motherboard + 1043 8383 P7P55-M Motherboard 144d c06a R730 Laptop 15d9 060d C7SIM-Q Motherboard 17c0 10d2 Medion Akoya E7214 Notebook PC [MD98410] @@ -29573,9 +29821,8 @@ deaf Middle Digital Inc. 9052 PC Weasel Watchdog Timer # formerly SoftHard Technology Ltd. deda XIMEA - 4001 Camera CB -# Thunderbolt based camera MT family - 4021 Camera MT + 4001 CB or MX camera + 4021 MT camera e000 Winbond e000 W89C940 e159 Tiger Jet Network Inc. @@ -29666,9 +29913,13 @@ eace Endace Measurement Systems, Ltd 8500 DAG 8.5I Infiniband x4 DDR 9200 DAG 9.2SX2 10G Ethernet 920e DAG 9.2X2 10G Ethernet + 9540 DAG 9.5G4 Gig Ethernet + 954f DAG 9.5G4F Gig Ethernet a120 DAG 10X2-P 10G Ethernet a12e DAG 10X2-S 10G Ethernet - a140 DAG 10X4-P 10G Ethernet + a140 DAG 10X4-P 10/40G Ethernet + a14e DAG 10X4-S 10/40G Ethernet + eace vDAG virtual device ec80 Belkin Corporation ec00 F5D6000 ecc0 Echo Digital Audio Corporation diff --git a/man/custom-entities.ent.in b/man/custom-entities.ent.in index 9ea92384a..a1dbf7133 100644 --- a/man/custom-entities.ent.in +++ b/man/custom-entities.ent.in @@ -6,3 +6,4 @@ + diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml index 4220520a1..3e28fc6be 100644 --- a/man/file-hierarchy.xml +++ b/man/file-hierarchy.xml @@ -57,7 +57,7 @@ system and service manager are organized based on a file system hierarchy inspired by UNIX, more specifically the hierarchy described in the File + url="http://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html">File System Hierarchy specification and hier7. This manual page describes a more minimal, modernized subset of diff --git a/man/logind.conf.xml b/man/logind.conf.xml index 8d2bfc5d5..e9b7118af 100644 --- a/man/logind.conf.xml +++ b/man/logind.conf.xml @@ -211,6 +211,7 @@ HandleSuspendKey= HandleHibernateKey= HandleLidSwitch= + HandleLidSwitchExternalPower= HandleLidSwitchDocked= Controls how logind shall handle the @@ -235,12 +236,17 @@ HandleSuspendKey= and HandleLidSwitch= default to suspend. - HandleLidSwitchDocked= defaults to - ignore. + HandleLidSwitchExternalPower= is completely + ignored by default (for backwards compatibility) — an explicit + value must be set before it will be used to determine + behaviour. HandleLidSwitchDocked= defaults + to ignore. HandleHibernateKey= defaults to hibernate. If the system is inserted in a docking station, or if more than one display is connected, the action specified by HandleLidSwitchDocked= + occurs; if the system is on external power the action (if any) + specified by HandleLidSwitchExternalPower= occurs; otherwise the HandleLidSwitch= action occurs. diff --git a/man/rules/meson.build b/man/rules/meson.build index bfc267b54..84b911b36 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -186,6 +186,7 @@ manpages = [ ['SD_BUS_ERROR_END', 'SD_BUS_ERROR_MAP', 'sd_bus_error_map'], ''], ['sd_bus_get_fd', '3', [], ''], + ['sd_bus_get_n_queued_read', '3', ['sd_bus_get_n_queued_write'], ''], ['sd_bus_is_open', '3', ['sd_bus_is_ready'], ''], ['sd_bus_message_append', '3', ['sd_bus_message_appendv'], ''], ['sd_bus_message_append_array', diff --git a/man/sd_bus_get_n_queued_read.xml b/man/sd_bus_get_n_queued_read.xml new file mode 100644 index 000000000..32be403fc --- /dev/null +++ b/man/sd_bus_get_n_queued_read.xml @@ -0,0 +1,129 @@ + + + + + + + + + sd_bus_get_fd + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + sd_bus_get_n_queued_read + 3 + + + + sd_bus_get_n_queued_read + sd_bus_get_n_queued_write + + Get the number of pending bus messages in the read and write queues of a bus connection object + + + + + #include <systemd/sd-bus.h> + + + int sd_bus_get_n_queued_read + sd_bus *bus + uint64_t *ret + + + + int sd_bus_get_n_queued_write + sd_bus *bus + uint64_t *ret + + + + + + Description + + + sd_bus_get_n_queued_read() may be used to query the number of bus messages in the read queue + of a bus connection object. The read queue contains all messages read from the transport medium (e.g. network + socket) but not yet processed locally. The function expects two arguments: the bus object to query, and a pointer + to a 64bit counter variable to write the current queue size to. Use sd_bus_process() in + order to process queued messages, i.e. to reduce the size of the read queue (as well as, in fact, the write + queue, see below). + + + + Similarly, sd_bus_get_n_queued_write() may be used to query the number of currently pending + bus messages in the write queue of a bus connection object. The write queue contains all messages enqueued into + the connection with a call such as sd_bus_send() but not yet written to the transport + medium. The expected arguments are similar to sd_bus_get_n_queued_read(). Here too, use + sd_bus_process() to reduce the size of the write queue. Alternatively, use + sd_bus_flush() to synchronously write out any pending bus messages until the write queue is + empty. + + + + + Return Value + + On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style + error code. + + + + Errors + + Returned errors may indicate the following problems: + + + + -ECHILD + + The bus connection was created in a different process. + + + + + + + See Also + + + systemd1, + sd-bus3, + sd_bus_process3, + sd_bus_send3, + sd_bus_flush3 + + + + diff --git a/man/systemctl.xml b/man/systemctl.xml index 60882e5aa..1588ca719 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -58,7 +58,7 @@ systemctl OPTIONS COMMAND - NAME + UNIT @@ -835,7 +835,7 @@ Sun 2017-02-26 20:57:49 EST 2h 3min left Sun 2017-02-26 11:56:36 EST 6h ago - isolate NAME + isolate UNIT Start the unit specified on the command line and its dependencies @@ -1004,7 +1004,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - set-property NAME ASSIGNMENT + set-property UNIT PROPERTY=VALUE Set the specified unit properties at runtime where @@ -1013,7 +1013,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err runtime. Not all properties may be changed at runtime, but many resource control settings (primarily those in systemd.resource-control5) - may. The changes are applied instantly, and stored on disk + may. The changes are applied immediately, and stored on disk for future boots, unless is passed, in which case the settings only apply until the next reboot. The syntax of the property assignment follows @@ -1028,9 +1028,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Note that this command allows changing multiple properties at the same time, which is preferable over - setting them individually. Like unit file configuration - settings, assigning the empty list to list parameters will - reset the list. + setting them individually. Like with unit file configuration + settings, assigning an empty list will reset the property. + @@ -1059,7 +1059,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err list-dependencies - NAME + UNIT @@ -1101,7 +1101,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - enable NAME + enable UNIT enable PATH @@ -1120,7 +1120,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err automatically searched for unit files with appropriate names), or absolute paths to unit files (in which case these files are read directly). If a specified unit file is located outside of the usual unit file directories, an additional symlink is created, linking it into the unit configuration path, thus ensuring - it is found when requested by commands such as start. + it is found when requested by commands such as start. The file system where the linked + unit files are located must be accessible when systemd is started (e.g. anything underneath + /home or /var is not allowed, unless those directories are + located on the root file system). This command will print the file system operations executed. This output may be suppressed by passing . @@ -1152,7 +1155,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - disable NAME + disable UNIT Disables one or more units. This removes all symlinks to the unit files backing the specified units @@ -1184,7 +1187,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - reenable NAME + reenable UNIT Reenable one or more units, as specified on the command line. This is a combination of @@ -1195,7 +1198,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - preset NAME + preset UNIT Reset the enable/disable status one or more unit files, as specified on @@ -1208,7 +1211,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err enabled and disabled, or only enabled, or only disabled. If the unit carries no install information, it will be silently ignored - by this command. NAME must be the real unit name, + by this command. UNIT must be the real unit name, any alias names are ignored silently. For more information on the preset policy format, see @@ -1233,7 +1236,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - is-enabled NAME + is-enabled UNIT Checks whether any of the specified unit files are @@ -1320,7 +1323,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - mask NAME + mask UNIT Mask one or more units, as specified on the command line. This will link these unit files to @@ -1334,7 +1337,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - unmask NAME + unmask UNIT Unmask one or more unit files, as specified on the command line. This will undo the effect of @@ -1350,12 +1353,15 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Link a unit file that is not in the unit file search paths into the unit file search path. This command expects an absolute path to a unit file. The effect of this may be undone with disable. The effect of this command is that a unit file is made available for commands - such as start, even though it is not installed directly in the unit search path. + such as start, even though it is not installed directly in the unit search path. The + file system where the linked unit files are located must be accessible when systemd is started + (e.g. anything underneath /home or /var is not allowed, unless + those directories are located on the root file system). - revert NAME + revert UNIT Revert one or more unit files to their vendor versions. This command removes drop-in configuration @@ -1378,9 +1384,9 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err add-wants TARGET - NAME + UNITadd-requires TARGET - NAME + UNIT Adds Wants= or Requires= @@ -1396,7 +1402,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - edit NAME + edit UNIT Edit a drop-in snippet or a whole replacement file if @@ -1446,7 +1452,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err - set-default NAME + set-default TARGET Set the default target to boot into. This sets @@ -1869,7 +1875,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err Parameter Syntax - Unit commands listed above take either a single unit name (designated as NAME), + Unit commands listed above take either a single unit name (designated as UNIT), or multiple unit specifications (designated as PATTERN…). In the first case, the unit name with or without a suffix must be given. If the suffix is not specified (unit name is "abbreviated"), systemctl will append a suitable suffix, .service by default, and a type-specific suffix in @@ -1906,7 +1912,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err in memory are not considered for glob expansion. - For unit file commands, the specified NAME should be the name of the unit file + For unit file commands, the specified UNIT should be the name of the unit file (possibly abbreviated, see above), or the absolute path to the unit file: # systemctl enable foo.service or diff --git a/man/systemd-analyze.xml b/man/systemd-analyze.xml index 4f7248cd0..97a9b2cca 100644 --- a/man/systemd-analyze.xml +++ b/man/systemd-analyze.xml @@ -91,6 +91,11 @@ OPTIONS dump + + systemd-analyze + OPTIONS + unit-paths + systemd-analyze OPTIONS @@ -188,6 +193,18 @@ state. Its format is subject to change without notice and should not be parsed by applications. + systemd-analyze unit-paths outputs a list of all + directories from which unit files, .d overrides, and + .wants, .requires symlinks may be + loaded. Combine with to retrieve the list for the user + manager instance, and for the global configuration of + user manager instances. Note that this verb prints the list that is compiled into + systemd-analyze itself, and does not comunicate with the + running manager. Use + systemctl [--user] [--global] show -p UnitPath --value + to retrieve the actual list that the manager uses, with any empty directories + omitted. + systemd-analyze log-level prints the current log level of the systemd daemon. If an optional argument LEVEL is provided, then the command changes the current log @@ -242,6 +259,13 @@ The following options are understood: + + + + Operates on the system systemd instance. This + is the implied default. + + @@ -250,10 +274,10 @@ - + - Operates on the system systemd instance. This - is the implied default. + Operates on the system-wide configuration for + user systemd instance. @@ -322,9 +346,8 @@ Invoke unit generators, see systemd.generator7. - Some generators require root privileges. When run under a - normal users, enabling generators will generally result in - some warnings. + Some generators require root privileges. Under a normal user, running with + generators enabled will generally result in some warnings. diff --git a/man/systemd-cgtop.xml b/man/systemd-cgtop.xml index d7ad08ec3..295f23519 100644 --- a/man/systemd-cgtop.xml +++ b/man/systemd-cgtop.xml @@ -228,6 +228,12 @@ indefinitely. + + + + A shortcut for . + + diff --git a/man/systemd-detect-virt.xml b/man/systemd-detect-virt.xml index 4426827e5..aeeb51d09 100644 --- a/man/systemd-detect-virt.xml +++ b/man/systemd-detect-virt.xml @@ -91,7 +91,7 @@ - VM + VM qemu QEMU software virtualization, without KVM @@ -143,11 +143,16 @@ Parallels Desktop, Parallels Server - + bhyve bhyve, FreeBSD hypervisor + + qnx + QNX hypervisor + + Container openvz diff --git a/man/systemd-resolve.xml b/man/systemd-resolve.xml index f92409055..fd5e35954 100644 --- a/man/systemd-resolve.xml +++ b/man/systemd-resolve.xml @@ -104,6 +104,36 @@ --reset-statistics + + systemd-resolve + OPTIONS + --flush-caches + + + + systemd-resolve + OPTIONS + --reset-server-features + + + + systemd-resolve + OPTIONS + --status + + + + systemd-resolve + OPTIONS + --set-dns=SERVER --set-domain=DOMAIN --set-llmnr=MODE --set-mdns=MODE --set-dnssec=MODE --set-nta=DOMAIN + + + + systemd-resolve + OPTIONS + --revert + + diff --git a/man/systemd-socket-activate.xml b/man/systemd-socket-activate.xml index ff9e7758b..7cdd9d4c3 100644 --- a/man/systemd-socket-activate.xml +++ b/man/systemd-socket-activate.xml @@ -201,6 +201,7 @@ systemd1, systemd.socket5, systemd.service5, + systemd-run1, sd_listen_fds3, sd_listen_fds_with_names3, cat1 diff --git a/man/systemd-system.conf.xml b/man/systemd-system.conf.xml index 08f6c9190..fca969009 100644 --- a/man/systemd-system.conf.xml +++ b/man/systemd-system.conf.xml @@ -1,6 +1,9 @@ + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ + +%entities; +]> + @@ -46,6 +46,8 @@ send_interface="org.freedesktop.DBus.Properties" send_member="GetAll"/> + + @@ -62,6 +64,10 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="LoadUnit"/> + + @@ -88,23 +94,7 @@ - - - - - - - - + send_member="ListUnitsByNames"/> + + + + + + + + @@ -134,7 +140,43 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="LookupDynamicUserByUID"/> - + + + + + + + + + + + + + + + + + + + + + + + + + + send_member="RefUnit"/> + + + + + + + + @@ -200,14 +258,6 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="Reexecute"/> - - - - @@ -224,10 +274,6 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="LinkUnitFiles"/> - - @@ -244,6 +290,10 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="UnmaskUnitFiles"/> + + @@ -256,6 +306,8 @@ send_interface="org.freedesktop.systemd1.Manager" send_member="AddDependencyUnitFiles"/> + + @@ -268,6 +320,68 @@ send_interface="org.freedesktop.systemd1.Job" send_member="GetBefore"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/org.freedesktop.systemd1.policy.in.in b/src/core/org.freedesktop.systemd1.policy.in similarity index 67% rename from src/core/org.freedesktop.systemd1.policy.in.in rename to src/core/org.freedesktop.systemd1.policy.in index 2c6ed749f..648221b85 100644 --- a/src/core/org.freedesktop.systemd1.policy.in.in +++ b/src/core/org.freedesktop.systemd1.policy.in @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Send passphrase back to system - Authentication is required to send the entered passphrase back to the system. + Send passphrase back to system + Authentication is required to send the entered passphrase back to the system. no no @@ -30,8 +30,8 @@ - Manage system services or other units - Authentication is required to manage system services or other units. + Manage system services or other units + Authentication is required to manage system services or other units. auth_admin auth_admin @@ -40,8 +40,8 @@ - Manage system service or unit files - Authentication is required to manage system service or unit files. + Manage system service or unit files + Authentication is required to manage system service or unit files. auth_admin auth_admin @@ -50,8 +50,8 @@ - Set or unset system and service manager environment variables - Authentication is required to set or unset system and service manager environment variables. + Set or unset system and service manager environment variables + Authentication is required to set or unset system and service manager environment variables. auth_admin auth_admin @@ -60,8 +60,8 @@ - Reload the systemd state - Authentication is required to reload the systemd state. + Reload the systemd state + Authentication is required to reload the systemd state. auth_admin auth_admin diff --git a/src/core/path.c b/src/core/path.c index 8a5ec0a72..1893d8de4 100644 --- a/src/core/path.c +++ b/src/core/path.c @@ -80,7 +80,8 @@ int path_spec_watch(PathSpec *s, sd_event_io_handler_t handler) { (void) sd_event_source_set_description(s->event_source, "path"); - /* This assumes the path was passed through path_kill_slashes()! */ + /* This function assumes the path was passed through path_kill_slashes()! */ + assert(!strstr(s->path, "//")); for (slash = strchr(s->path, '/'); ; slash = strchr(slash+1, '/')) { char *cut = NULL; diff --git a/src/core/scope.c b/src/core/scope.c index 468dd8121..5b9c2bb3c 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -163,9 +163,6 @@ static int scope_load_init_scope(Unit *u) { * synthesize it here, instead of relying on the unit file on disk. */ u->default_dependencies = false; - u->ignore_on_isolate = true; - - SCOPE(u)->kill_context.kill_signal = SIGRTMIN+14; /* Prettify things, if we can. */ if (!u->description) @@ -346,7 +343,7 @@ static int scope_start(Unit *u) { unit_export_state_files(UNIT(s)); - r = unit_attach_pids_to_cgroup(u); + r = unit_attach_pids_to_cgroup(u, UNIT(s)->pids, NULL); if (r < 0) { log_unit_warning_errno(UNIT(s), r, "Failed to add PIDs to scope's control group: %m"); scope_enter_dead(s, SCOPE_FAILURE_RESOURCES); @@ -602,6 +599,7 @@ const UnitVTable scope_vtable = { .private_section = "Scope", .can_transient = true, + .can_delegate = true, .init = scope_init, .load = scope_load, diff --git a/src/core/selinux-access.h b/src/core/selinux-access.h index c5f5fb975..dd48d0654 100644 --- a/src/core/selinux-access.h +++ b/src/core/selinux-access.h @@ -33,10 +33,7 @@ int mac_selinux_generic_access_check(sd_bus_message *message, const char *path, mac_selinux_generic_access_check((message), NULL, (permission), (error)) #define mac_selinux_unit_access_check(unit, message, permission, error) \ - ({ \ - const Unit *_unit = (unit); \ - mac_selinux_generic_access_check((message), _unit->source_path ?: _unit->fragment_path, (permission), (error)); \ - }) + mac_selinux_generic_access_check((message), unit_label_path(unit), (permission), (error)) #else diff --git a/src/core/service.c b/src/core/service.c index 6476dc68c..df36019f6 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -120,6 +120,9 @@ static void service_init(Unit *u) { s->guess_main_pid = true; s->control_command_id = _SERVICE_EXEC_COMMAND_INVALID; + + s->exec_context.keyring_mode = MANAGER_IS_SYSTEM(u->manager) ? + EXEC_KEYRING_PRIVATE : EXEC_KEYRING_INHERIT; } static void service_unwatch_control_pid(Service *s) { @@ -369,7 +372,7 @@ static void service_done(Unit *u) { s->pid_file = mfree(s->pid_file); s->status_text = mfree(s->status_text); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, false); exec_command_free_array(s->exec_command, _SERVICE_EXEC_COMMAND_MAX); s->control_command = NULL; s->main_command = NULL; @@ -774,6 +777,8 @@ static int service_load(Unit *u) { } static void service_dump(Unit *u, FILE *f, const char *prefix) { + char buf_restart[FORMAT_TIMESPAN_MAX], buf_start[FORMAT_TIMESPAN_MAX], buf_stop[FORMAT_TIMESPAN_MAX]; + char buf_runtime[FORMAT_TIMESPAN_MAX], buf_watchdog[FORMAT_TIMESPAN_MAX]; ServiceExecCommand c; Service *s = SERVICE(u); const char *prefix2; @@ -838,6 +843,18 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) { "%sAccept Socket: %s\n", prefix, UNIT_DEREF(s->accept_socket)->id); + fprintf(f, + "%sRestartSec: %s\n" + "%sTimeoutStartSec: %s\n" + "%sTimeoutStopSec: %s\n" + "%sRuntimeMaxSec: %s\n" + "%sWatchdogSec: %s\n", + prefix, format_timespan(buf_restart, sizeof(buf_restart), s->restart_usec, USEC_PER_SEC), + prefix, format_timespan(buf_start, sizeof(buf_start), s->timeout_start_usec, USEC_PER_SEC), + prefix, format_timespan(buf_stop, sizeof(buf_stop), s->timeout_stop_usec, USEC_PER_SEC), + prefix, format_timespan(buf_runtime, sizeof(buf_runtime), s->runtime_max_usec, USEC_PER_SEC), + prefix, format_timespan(buf_watchdog, sizeof(buf_watchdog), s->watchdog_usec, USEC_PER_SEC)); + kill_context_dump(&s->kill_context, f, prefix); exec_context_dump(&s->exec_context, f, prefix); @@ -902,6 +919,7 @@ static int service_is_suitable_main_pid(Service *s, pid_t pid, int prio) { static int service_load_pid_file(Service *s, bool may_warn) { char procfs[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + bool questionable_pid_file = false; _cleanup_free_ char *k = NULL; _cleanup_close_ int fd = -1; int r, prio; @@ -915,8 +933,13 @@ static int service_load_pid_file(Service *s, bool may_warn) { prio = may_warn ? LOG_INFO : LOG_DEBUG; fd = chase_symlinks(s->pid_file, NULL, CHASE_OPEN|CHASE_SAFE, NULL); - if (fd == -EPERM) - return log_unit_full(UNIT(s), prio, fd, "Permission denied while opening PID file or unsafe symlink chain: %s", s->pid_file); + if (fd == -EPERM) { + log_unit_full(UNIT(s), LOG_DEBUG, fd, "Permission denied while opening PID file or potentially unsafe symlink chain, will now retry with relaxed checks: %s", s->pid_file); + + questionable_pid_file = true; + + fd = chase_symlinks(s->pid_file, NULL, CHASE_OPEN, NULL); + } if (fd < 0) return log_unit_full(UNIT(s), prio, fd, "Can't open PID file %s (yet?) after %s: %m", s->pid_file, service_state_to_string(s->state)); @@ -939,6 +962,11 @@ static int service_load_pid_file(Service *s, bool may_warn) { if (r == 0) { struct stat st; + if (questionable_pid_file) { + log_unit_error(UNIT(s), "Refusing to accept PID outside of service control group, acquired through unsafe symlink chain: %s", s->pid_file); + return -EPERM; + } + /* Hmm, it's not clear if the new main PID is safe. Let's allow this if the PID file is owned by root */ if (fstat(fd, &st) < 0) @@ -1141,8 +1169,10 @@ static int service_coldplug(Unit *u) { if (IN_SET(s->deserialized_state, SERVICE_START_POST, SERVICE_RUNNING, SERVICE_RELOAD)) service_start_watchdog(s); - if (!IN_SET(s->deserialized_state, SERVICE_DEAD, SERVICE_FAILED, SERVICE_AUTO_RESTART)) + if (!IN_SET(s->deserialized_state, SERVICE_DEAD, SERVICE_FAILED, SERVICE_AUTO_RESTART)) { (void) unit_setup_dynamic_creds(u); + (void) unit_setup_exec_runtime(u); + } if (UNIT_ISSET(s->accept_socket)) { Socket* socket = SOCKET(UNIT_DEREF(s->accept_socket)); @@ -1224,7 +1254,7 @@ static int service_collect_fds(Service *s, } else { int *t; - t = realloc(rfds, (rn_socket_fds + cn_fds) * sizeof(int)); + t = reallocarray(rfds, rn_socket_fds + cn_fds, sizeof(int)); if (!t) return -ENOMEM; @@ -1246,13 +1276,13 @@ static int service_collect_fds(Service *s, char **nl; int *t; - t = realloc(rfds, (rn_socket_fds + s->n_fd_store) * sizeof(int)); + t = reallocarray(rfds, rn_socket_fds + s->n_fd_store, sizeof(int)); if (!t) return -ENOMEM; rfds = t; - nl = realloc(rfd_names, (rn_socket_fds + s->n_fd_store + 1) * sizeof(char*)); + nl = reallocarray(rfd_names, rn_socket_fds + s->n_fd_store + 1, sizeof(char *)); if (!nl) return -ENOMEM; @@ -1422,7 +1452,6 @@ static int service_spawn( } } - manager_set_exec_params(UNIT(s)->manager, &exec_params); unit_set_exec_params(UNIT(s), &exec_params); final_env = strv_env_merge(2, exec_params.environment, our_env, NULL); @@ -1629,8 +1658,7 @@ static void service_enter_dead(Service *s, ServiceResult f, bool allow_restart) s->forbid_restart = false; /* We want fresh tmpdirs in case service is started again immediately */ - exec_runtime_destroy(s->exec_runtime); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, true); if (s->exec_context.runtime_directory_preserve_mode == EXEC_PRESERVE_NO || (s->exec_context.runtime_directory_preserve_mode == EXEC_PRESERVE_RESTART && !service_will_restart(UNIT(s)))) @@ -2658,7 +2686,7 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, if (r < 0) log_unit_debug_errno(u, r, "Failed to load accept-socket unit: %s", value); else { - unit_ref_set(&s->accept_socket, socket); + unit_ref_set(&s->accept_socket, u, socket); SOCKET(socket)->n_connections++; } @@ -2807,20 +2835,20 @@ static const char *service_sub_state_to_string(Unit *u) { return service_state_to_string(SERVICE(u)->state); } -static bool service_check_gc(Unit *u) { +static bool service_may_gc(Unit *u) { Service *s = SERVICE(u); assert(s); /* Never clean up services that still have a process around, even if the service is formally dead. Note that - * unit_check_gc() already checked our cgroup for us, we just check our two additional PIDs, too, in case they + * unit_may_gc() already checked our cgroup for us, we just check our two additional PIDs, too, in case they * have moved outside of the cgroup. */ if (main_pid_good(s) > 0 || control_pid_good(s) > 0) - return true; + return false; - return false; + return true; } static int service_retry_pid_file(Service *s) { @@ -3744,7 +3772,7 @@ int service_set_socket_fd(Service *s, int fd, Socket *sock, bool selinux_context s->socket_fd = fd; s->socket_fd_selinux_context_net = selinux_context_net; - unit_ref_set(&s->accept_socket, UNIT(sock)); + unit_ref_set(&s->accept_socket, UNIT(s), UNIT(sock)); return 0; } @@ -3883,6 +3911,9 @@ const UnitVTable service_vtable = { "Install\0", .private_section = "Service", + .can_transient = true, + .can_delegate = true, + .init = service_init, .done = service_done, .load = service_load, @@ -3908,7 +3939,7 @@ const UnitVTable service_vtable = { .will_restart = service_will_restart, - .check_gc = service_check_gc, + .may_gc = service_may_gc, .sigchld_event = service_sigchld_event, @@ -3928,7 +3959,6 @@ const UnitVTable service_vtable = { .get_timeout = service_get_timeout, .needs_console = service_needs_console, - .can_transient = true, .status_message_formats = { .starting_stopping = { diff --git a/src/core/shutdown.c b/src/core/shutdown.c index cc31b33f1..58c9a9de7 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -42,6 +42,7 @@ #include "missing.h" #include "parse-util.h" #include "process-util.h" +#include "reboot-util.h" #include "signal-util.h" #include "string-util.h" #include "switch-root.h" @@ -93,14 +94,14 @@ static int parse_argv(int argc, char *argv[]) { case ARG_LOG_LEVEL: r = log_set_max_level_from_string(optarg); if (r < 0) - log_error("Failed to parse log level %s, ignoring.", optarg); + log_error_errno(r, "Failed to parse log level %s, ignoring.", optarg); break; case ARG_LOG_TARGET: r = log_set_target_from_string(optarg); if (r < 0) - log_error("Failed to parse log target %s, ignoring", optarg); + log_error_errno(r, "Failed to parse log target %s, ignoring", optarg); break; @@ -109,7 +110,7 @@ static int parse_argv(int argc, char *argv[]) { if (optarg) { r = log_show_color_from_string(optarg); if (r < 0) - log_error("Failed to parse log color setting %s, ignoring", optarg); + log_error_errno(r, "Failed to parse log color setting %s, ignoring", optarg); } else log_show_color(true); @@ -119,7 +120,7 @@ static int parse_argv(int argc, char *argv[]) { if (optarg) { r = log_show_location_from_string(optarg); if (r < 0) - log_error("Failed to parse log location setting %s, ignoring", optarg); + log_error_errno(r, "Failed to parse log location setting %s, ignoring", optarg); } else log_show_location(true); @@ -128,14 +129,14 @@ static int parse_argv(int argc, char *argv[]) { case ARG_EXIT_CODE: r = safe_atou8(optarg, &arg_exit_code); if (r < 0) - log_error("Failed to parse exit code %s, ignoring", optarg); + log_error_errno(r, "Failed to parse exit code %s, ignoring", optarg); break; case ARG_TIMEOUT: r = parse_sec(optarg, &arg_timeout); if (r < 0) - log_error("Failed to parse shutdown timeout %s, ignoring", optarg); + log_error_errno(r, "Failed to parse shutdown timeout %s, ignoring", optarg); break; @@ -276,15 +277,18 @@ int main(int argc, char *argv[]) { static const char* const dirs[] = {SYSTEM_SHUTDOWN_PATH, NULL}; char *watchdog_device; + /* The log target defaults to console, but the original systemd process will pass its log target in through a + * command line argument, which will override this default. Also, ensure we'll never log to the journal or + * syslog, as these logging daemons are either already dead or will die very soon. */ + + log_set_target(LOG_TARGET_CONSOLE); + log_set_prohibit_ipc(true); log_parse_environment(); + r = parse_argv(argc, argv); if (r < 0) goto error; - /* journald will die if not gone yet. The log target defaults - * to console, but may have been changed by command line options. */ - - log_set_prohibit_ipc(true); log_open(); umask(0022); @@ -306,8 +310,8 @@ int main(int argc, char *argv[]) { else if (streq(arg_verb, "exit")) cmd = 0; /* ignored, just checking that arg_verb is valid */ else { - r = -EINVAL; log_error("Unknown action '%s'.", arg_verb); + r = -EINVAL; goto error; } @@ -324,7 +328,7 @@ int main(int argc, char *argv[]) { } /* Lock us into memory */ - mlockall(MCL_CURRENT|MCL_FUTURE); + (void) mlockall(MCL_CURRENT|MCL_FUTURE); /* Synchronize everything that is not written to disk yet at this point already. This is a good idea so that * slow IO is processed here already and the final process killing spree is not impacted by processes @@ -481,12 +485,9 @@ int main(int argc, char *argv[]) { if (streq(arg_verb, "exit")) { if (in_container) - exit(arg_exit_code); - else { - /* We cannot exit() on the host, fallback on another - * method. */ - cmd = RB_POWER_OFF; - } + return arg_exit_code; + + cmd = RB_POWER_OFF; /* We cannot exit() on the host, fallback on another method. */ } switch (cmd) { @@ -514,22 +515,9 @@ int main(int argc, char *argv[]) { cmd = RB_AUTOBOOT; _fallthrough_; + case RB_AUTOBOOT: - - if (!in_container) { - _cleanup_free_ char *param = NULL; - - r = read_one_line_file("/run/systemd/reboot-param", ¶m); - if (r < 0 && r != -ENOENT) - log_warning_errno(r, "Failed to read reboot parameter file: %m"); - - if (!isempty(param)) { - log_info("Rebooting with argument '%s'.", param); - syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, param); - log_warning_errno(errno, "Failed to reboot with parameter, retrying without: %m"); - } - } - + (void) reboot_with_parameter(REBOOT_LOG); log_info("Rebooting."); break; @@ -545,13 +533,13 @@ int main(int argc, char *argv[]) { assert_not_reached("Unknown magic"); } - reboot(cmd); + (void) reboot(cmd); if (errno == EPERM && in_container) { /* If we are in a container, and we lacked * CAP_SYS_BOOT just exit, this will kill our * container for good. */ log_info("Exiting container."); - exit(EXIT_SUCCESS); + return EXIT_SUCCESS; } r = log_error_errno(errno, "Failed to invoke reboot(): %m"); diff --git a/src/core/slice.c b/src/core/slice.c index fef47b04f..1c4574b8b 100644 --- a/src/core/slice.c +++ b/src/core/slice.c @@ -76,7 +76,7 @@ static int slice_add_parent_slice(Slice *s) { if (r < 0) return r; - unit_ref_set(&u->slice, parent); + unit_ref_set(&u->slice, u, parent); return 0; } @@ -137,7 +137,6 @@ static int slice_load_root_slice(Unit *u) { * special semantics we synthesize it here, instead of relying on the unit file on disk. */ u->default_dependencies = false; - u->ignore_on_isolate = true; if (!u->description) u->description = strdup("Root Slice"); @@ -147,6 +146,29 @@ static int slice_load_root_slice(Unit *u) { return 1; } +static int slice_load_system_slice(Unit *u) { + assert(u); + + if (!MANAGER_IS_SYSTEM(u->manager)) + return 0; + if (!unit_has_name(u, SPECIAL_SYSTEM_SLICE)) + return 0; + + u->perpetual = true; + + /* The system slice is a bit special. For example it is always running and cannot be terminated. Because of its + * special semantics we synthesize it here, instead of relying on the unit file on disk. */ + + u->default_dependencies = false; + + if (!u->description) + u->description = strdup("System Slice"); + if (!u->documentation) + u->documentation = strv_new("man:systemd.special(7)", NULL); + + return 1; +} + static int slice_load(Unit *u) { Slice *s = SLICE(u); int r; @@ -157,6 +179,10 @@ static int slice_load(Unit *u) { r = slice_load_root_slice(u); if (r < 0) return r; + r = slice_load_system_slice(u); + if (r < 0) + return r; + r = unit_load_fragment_and_dropin_optional(u); if (r < 0) return r; @@ -287,19 +313,18 @@ _pure_ static const char *slice_sub_state_to_string(Unit *u) { return slice_state_to_string(SLICE(u)->state); } -static void slice_enumerate(Manager *m) { +static int slice_make_perpetual(Manager *m, const char *name, Unit **ret) { Unit *u; int r; assert(m); + assert(name); - u = manager_get_unit(m, SPECIAL_ROOT_SLICE); + u = manager_get_unit(m, name); if (!u) { - r = unit_new_for_name(m, sizeof(Slice), SPECIAL_ROOT_SLICE, &u); - if (r < 0) { - log_error_errno(r, "Failed to allocate the special " SPECIAL_ROOT_SLICE " unit: %m"); - return; - } + r = unit_new_for_name(m, sizeof(Slice), name, &u); + if (r < 0) + return log_error_errno(r, "Failed to allocate the special %s unit: %m", name); } u->perpetual = true; @@ -307,6 +332,34 @@ static void slice_enumerate(Manager *m) { unit_add_to_load_queue(u); unit_add_to_dbus_queue(u); + + if (ret) + *ret = u; + + return 0; +} + +static void slice_enumerate(Manager *m) { + Unit *u; + int r; + + assert(m); + + r = slice_make_perpetual(m, SPECIAL_ROOT_SLICE, &u); + if (r >= 0 && manager_owns_root_cgroup(m)) { + Slice *s = SLICE(u); + + /* If we are managing the root cgroup then this means our root slice covers the whole system, which + * means the kernel will track CPU/tasks/memory for us anyway, and it is all available in /proc. Let's + * hence turn accounting on here, so that our APIs to query this data are available. */ + + s->cgroup_context.cpu_accounting = true; + s->cgroup_context.tasks_accounting = true; + s->cgroup_context.memory_accounting = true; + } + + if (MANAGER_IS_SYSTEM(m)) + (void) slice_make_perpetual(m, SPECIAL_SYSTEM_SLICE, NULL); } const UnitVTable slice_vtable = { diff --git a/src/core/socket.c b/src/core/socket.c index 74cdebbe8..41988788b 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -164,7 +164,7 @@ static void socket_done(Unit *u) { s->peers_by_address = set_free(s->peers_by_address); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, false); exec_command_free_array(s->exec_command, _SOCKET_EXEC_COMMAND_MAX); s->control_command = NULL; @@ -250,7 +250,7 @@ int socket_instantiate_service(Socket *s) { if (r < 0) return r; - unit_ref_set(&s->service, u); + unit_ref_set(&s->service, UNIT(s), u); return unit_add_two_dependencies(UNIT(s), UNIT_BEFORE, UNIT_TRIGGERS, u, false, UNIT_DEPENDENCY_IMPLICIT); } @@ -377,7 +377,7 @@ static int socket_add_extras(Socket *s) { if (r < 0) return r; - unit_ref_set(&s->service, x); + unit_ref_set(&s->service, u, x); } r = unit_add_two_dependencies(u, UNIT_BEFORE, UNIT_TRIGGERS, UNIT_DEREF(s->service), true, UNIT_DEPENDENCY_IMPLICIT); @@ -1521,7 +1521,7 @@ static int socket_address_listen_in_cgroup( r = bpf_firewall_supported(); if (r < 0) return r; - if (r == 0) /* If BPF firewalling isn't supported anyway — there's no point in this forking complexity */ + if (r == BPF_FIREWALL_UNSUPPORTED) /* If BPF firewalling isn't supported anyway — there's no point in this forking complexity */ goto shortcut; if (socketpair(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0, pair) < 0) @@ -1878,8 +1878,10 @@ static int socket_coldplug(Unit *u) { return r; } - if (!IN_SET(s->deserialized_state, SOCKET_DEAD, SOCKET_FAILED)) + if (!IN_SET(s->deserialized_state, SOCKET_DEAD, SOCKET_FAILED)) { (void) unit_setup_dynamic_creds(u); + (void) unit_setup_exec_runtime(u); + } socket_set_state(s, s->deserialized_state); return 0; @@ -1908,7 +1910,6 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) { if (r < 0) return r; - manager_set_exec_params(UNIT(s)->manager, &exec_params); unit_set_exec_params(UNIT(s), &exec_params); exec_params.argv = c->argv; @@ -2017,8 +2018,7 @@ static void socket_enter_dead(Socket *s, SocketResult f) { socket_set_state(s, s->result != SOCKET_SUCCESS ? SOCKET_FAILED : SOCKET_DEAD); - exec_runtime_destroy(s->exec_runtime); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, true); exec_context_destroy_runtime_directory(&s->exec_context, UNIT(s)->manager->prefix[EXEC_DIRECTORY_RUNTIME]); @@ -2818,12 +2818,12 @@ SocketType socket_port_type_from_string(const char *s) { return _SOCKET_TYPE_INVALID; } -_pure_ static bool socket_check_gc(Unit *u) { +_pure_ static bool socket_may_gc(Unit *u) { Socket *s = SOCKET(u); assert(u); - return s->n_connections > 0; + return s->n_connections == 0; } static int socket_accept_do(Socket *s, int fd) { @@ -2865,7 +2865,7 @@ static int socket_accept_in_cgroup(Socket *s, SocketPort *p, int fd) { r = bpf_firewall_supported(); if (r < 0) return r; - if (r == 0) + if (r == BPF_FIREWALL_UNSUPPORTED) goto shortcut; if (socketpair(AF_UNIX, SOCK_SEQPACKET|SOCK_CLOEXEC, 0, pair) < 0) @@ -3323,7 +3323,7 @@ const UnitVTable socket_vtable = { .active_state = socket_active_state, .sub_state_to_string = socket_sub_state_to_string, - .check_gc = socket_check_gc, + .may_gc = socket_may_gc, .sigchld_event = socket_sigchld_event, diff --git a/src/core/socket.h b/src/core/socket.h index 9c528fb39..84ec9cff0 100644 --- a/src/core/socket.h +++ b/src/core/socket.h @@ -104,8 +104,8 @@ struct Socket { DynamicCreds dynamic_creds; /* For Accept=no sockets refers to the one service we'll - activate. For Accept=yes sockets is either NULL, or filled - when the next service we spawn. */ + * activate. For Accept=yes sockets is either NULL, or filled + * to refer to the next service we spawn. */ UnitRef service; SocketState state, deserialized_state; diff --git a/src/core/swap.c b/src/core/swap.c index 70097ff2b..ed397c4c9 100644 --- a/src/core/swap.c +++ b/src/core/swap.c @@ -85,7 +85,7 @@ static int swap_set_devnode(Swap *s, const char *devnode) { assert(s); - r = hashmap_ensure_allocated(&UNIT(s)->manager->swaps_by_devnode, &string_hash_ops); + r = hashmap_ensure_allocated(&UNIT(s)->manager->swaps_by_devnode, &path_hash_ops); if (r < 0) return r; @@ -157,7 +157,7 @@ static void swap_done(Unit *u) { s->parameters_fragment.what = mfree(s->parameters_fragment.what); s->parameters_fragment.options = mfree(s->parameters_fragment.options); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, false); exec_command_done_array(s->exec_command, _SWAP_EXEC_COMMAND_MAX); s->control_command = NULL; @@ -549,14 +549,17 @@ static int swap_coldplug(Unit *u) { return r; } - if (!IN_SET(new_state, SWAP_DEAD, SWAP_FAILED)) + if (!IN_SET(new_state, SWAP_DEAD, SWAP_FAILED)) { (void) unit_setup_dynamic_creds(u); + (void) unit_setup_exec_runtime(u); + } swap_set_state(s, new_state); return 0; } static void swap_dump(Unit *u, FILE *f, const char *prefix) { + char buf[FORMAT_TIMESPAN_MAX]; Swap *s = SWAP(u); SwapParameters *p; @@ -592,6 +595,10 @@ static void swap_dump(Unit *u, FILE *f, const char *prefix) { prefix, p->priority, prefix, strempty(p->options)); + fprintf(f, + "%sTimeoutSec: %s\n", + prefix, format_timespan(buf, sizeof(buf), s->timeout_usec, USEC_PER_SEC)); + if (s->control_pid > 0) fprintf(f, "%sControl PID: "PID_FMT"\n", @@ -625,7 +632,6 @@ static int swap_spawn(Swap *s, ExecCommand *c, pid_t *_pid) { if (r < 0) goto fail; - manager_set_exec_params(UNIT(s)->manager, &exec_params); unit_set_exec_params(UNIT(s), &exec_params); r = exec_spawn(UNIT(s), @@ -664,8 +670,7 @@ static void swap_enter_dead(Swap *s, SwapResult f) { swap_set_state(s, s->result != SWAP_SUCCESS ? SWAP_FAILED : SWAP_DEAD); - exec_runtime_destroy(s->exec_runtime); - s->exec_runtime = exec_runtime_unref(s->exec_runtime); + s->exec_runtime = exec_runtime_unref(s->exec_runtime, true); exec_context_destroy_runtime_directory(&s->exec_context, UNIT(s)->manager->prefix[EXEC_DIRECTORY_RUNTIME]); @@ -973,12 +978,15 @@ _pure_ static const char *swap_sub_state_to_string(Unit *u) { return swap_state_to_string(SWAP(u)->state); } -_pure_ static bool swap_check_gc(Unit *u) { +_pure_ static bool swap_may_gc(Unit *u) { Swap *s = SWAP(u); assert(s); - return s->from_proc_swaps; + if (s->from_proc_swaps) + return false; + + return true; } static void swap_sigchld_event(Unit *u, pid_t pid, int code, int status) { @@ -1500,7 +1508,7 @@ const UnitVTable swap_vtable = { .active_state = swap_active_state, .sub_state_to_string = swap_sub_state_to_string, - .check_gc = swap_check_gc, + .may_gc = swap_may_gc, .sigchld_event = swap_sigchld_event, diff --git a/src/core/system.conf b/src/core/system.conf.in similarity index 96% rename from src/core/system.conf rename to src/core/system.conf.in index 6b86eac33..08cbe529b 100644 --- a/src/core/system.conf +++ b/src/core/system.conf.in @@ -42,7 +42,7 @@ #DefaultIOAccounting=no #DefaultIPAccounting=no #DefaultBlockIOAccounting=no -#DefaultMemoryAccounting=no +#DefaultMemoryAccounting=@MEMORY_ACCOUNTING_DEFAULT@ #DefaultTasksAccounting=yes #DefaultTasksMax=15% #DefaultLimitCPU= diff --git a/src/core/timer.c b/src/core/timer.c index 133cbb974..ddb9c82b8 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -354,7 +354,6 @@ static void timer_enter_waiting(Timer *t, bool initial) { bool found_monotonic = false, found_realtime = false; bool leave_around = false; triple_timestamp ts; - usec_t base = 0; TimerValue *v; Unit *trigger; int r; @@ -372,7 +371,6 @@ static void timer_enter_waiting(Timer *t, bool initial) { t->next_elapse_monotonic_or_boottime = t->next_elapse_realtime = 0; LIST_FOREACH(value, v, t->values) { - if (v->disabled) continue; @@ -381,10 +379,17 @@ static void timer_enter_waiting(Timer *t, bool initial) { /* If we know the last time this was * triggered, schedule the job based relative - * to that. If we don't just start from - * now. */ + * to that. If we don't, just start from + * the activation time. */ - b = t->last_trigger.realtime > 0 ? t->last_trigger.realtime : ts.realtime; + if (t->last_trigger.realtime > 0) + b = t->last_trigger.realtime; + else { + if (state_translation_table[t->state] == UNIT_ACTIVE) + b = UNIT(t)->inactive_exit_timestamp.realtime; + else + b = ts.realtime; + } r = calendar_spec_next_usec(v->calendar_spec, b, &v->next_elapse); if (r < 0) @@ -397,7 +402,8 @@ static void timer_enter_waiting(Timer *t, bool initial) { found_realtime = true; - } else { + } else { + usec_t base; switch (v->base) { @@ -807,12 +813,21 @@ static void timer_reset_failed(Unit *u) { static void timer_time_change(Unit *u) { Timer *t = TIMER(u); + usec_t ts; assert(u); if (t->state != TIMER_WAITING) return; + /* If we appear to have triggered in the future, the system clock must + * have been set backwards. So let's rewind our own clock and allow + * the future trigger(s) to happen again :). Exactly the same as when + * you start a timer unit with Persistent=yes. */ + ts = now(CLOCK_REALTIME); + if (t->last_trigger.realtime > ts) + t->last_trigger.realtime = ts; + log_unit_debug(u, "Time change, recalculating next elapse."); timer_enter_waiting(t, false); } diff --git a/src/core/triggers.systemd.in b/src/core/triggers.systemd.in index 985c6d8b2..c582d4097 100644 --- a/src/core/triggers.systemd.in +++ b/src/core/triggers.systemd.in @@ -4,6 +4,7 @@ # This file is part of systemd. # # Copyright 2015 Zbigniew Jędrzejewski-Szmek +# Copyright 2018 Neal Gompa # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by @@ -69,3 +70,89 @@ if posix.access("%{_localstatedir}/lib/rpm-state/systemd/needs-reload") then posix.wait(pid) end end + +%transfiletriggerin -P 100700 -p -- @sysusersdir@ +-- This script will process files installed in @sysusersdir@ to create +-- specified users automatically. The priority is set such that it +-- will run before the tmpfiles file trigger. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("%{_bindir}/systemd-sysusers")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -P 100500 -- @tmpfilesdir@ +-- This script will process files installed in @tmpfilesdir@ to create +-- tmpfiles automatically. The priority is set such that it will run +-- after the sysusers file trigger, but before any other triggers. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("%{_bindir}/systemd-tmpfiles", "--create")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -- @udevhwdbdir@ +-- This script will automatically invoke hwdb update if files have been +-- installed or updated in @udevhwdbdir@. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("%{_bindir}/systemd-hwdb", "update")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -- @catalogdir@ +-- This script will automatically invoke journal catalog update if files +-- have been installed or updated in @catalogdir@. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("%{_bindir}/journalctl", "--update-catalog")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -- @udevrulesdir@ +-- This script will automatically update udev with new rules if files +-- have been installed or updated in @udevrulesdir@. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("%{_bindir}/udevadm", "control", "--reload")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -- @sysctldir@ +-- This script will automatically apply sysctl rules if files have been +-- installed or updated in @sysctldir@. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("@rootlibexecdir@/systemd-sysctl")) + elseif pid > 0 then + posix.wait(pid) + end +end + +%transfiletriggerin -- @binfmtdir@ +-- This script will automatically apply binfmt rules if files have been +-- installed or updated in @binfmtdir@. +if posix.access("/run/systemd/system") then + pid = posix.fork() + if pid == 0 then + assert(posix.exec("@rootlibexecdir@/systemd-binfmt")) + elseif pid > 0 then + posix.wait(pid) + end +end diff --git a/src/core/umount.c b/src/core/umount.c index 731436af2..ff3e63710 100644 --- a/src/core/umount.c +++ b/src/core/umount.c @@ -390,7 +390,7 @@ static int remount_with_timeout(MountPoint *m, char *options, int *n_failed) { * fork a child process and set a timeout. If the timeout * lapses, the assumption is that that particular remount * failed. */ - r = safe_fork("(sd-remount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid); + r = safe_fork("(sd-remount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r; if (r == 0) { @@ -406,10 +406,12 @@ static int remount_with_timeout(MountPoint *m, char *options, int *n_failed) { r = wait_for_terminate_with_timeout(pid, DEFAULT_TIMEOUT_USEC); if (r == -ETIMEDOUT) { - log_error_errno(errno, "Remounting '%s' - timed out, issuing SIGKILL to PID "PID_FMT".", m->path, pid); + log_error_errno(r, "Remounting '%s' timed out, issuing SIGKILL to PID " PID_FMT ".", m->path, pid); (void) kill(pid, SIGKILL); - } else if (r < 0) - log_error_errno(r, "Failed to wait for process: %m"); + } else if (r == -EPROTO) + log_error_errno(r, "Remounting '%s' failed abnormally, child process " PID_FMT " aborted or exited non-zero.", m->path, pid); + else if (r < 0) + log_error_errno(r, "Remounting '%s' failed unexpectedly, couldn't wait for child process " PID_FMT ": %m", m->path, pid); return r; } @@ -424,7 +426,7 @@ static int umount_with_timeout(MountPoint *m, bool *changed) { * fork a child process and set a timeout. If the timeout * lapses, the assumption is that that particular umount * failed. */ - r = safe_fork("(sd-umount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG, &pid); + r = safe_fork("(sd-umount)", FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_LOG|FORK_REOPEN_LOG, &pid); if (r < 0) return r; if (r == 0) { @@ -446,10 +448,12 @@ static int umount_with_timeout(MountPoint *m, bool *changed) { r = wait_for_terminate_with_timeout(pid, DEFAULT_TIMEOUT_USEC); if (r == -ETIMEDOUT) { - log_error_errno(errno, "Unmounting '%s' - timed out, issuing SIGKILL to PID "PID_FMT".", m->path, pid); + log_error_errno(r, "Unmounting '%s' timed out, issuing SIGKILL to PID " PID_FMT ".", m->path, pid); (void) kill(pid, SIGKILL); - } else if (r < 0) - log_error_errno(r, "Failed to wait for process: %m"); + } else if (r == -EPROTO) + log_error_errno(r, "Unmounting '%s' failed abnormally, child process " PID_FMT " aborted or exited non-zero.", m->path, pid); + else if (r < 0) + log_error_errno(r, "Unmounting '%s' failed unexpectedly, couldn't wait for child process " PID_FMT ": %m", m->path, pid); return r; } diff --git a/src/core/unit.c b/src/core/unit.c index 932f05baa..c3056624e 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -186,7 +186,7 @@ static void unit_init(Unit *u) { exec_context_init(ec); ec->keyring_mode = MANAGER_IS_SYSTEM(u->manager) ? - EXEC_KEYRING_PRIVATE : EXEC_KEYRING_INHERIT; + EXEC_KEYRING_SHARED : EXEC_KEYRING_INHERIT; } kc = unit_get_kill_context(u); @@ -336,20 +336,25 @@ int unit_set_description(Unit *u, const char *description) { return 0; } -bool unit_check_gc(Unit *u) { +bool unit_may_gc(Unit *u) { UnitActiveState state; int r; assert(u); - /* Checks whether the unit is ready to be unloaded for garbage collection. Returns true, when the unit shall - * stay around, false if there's no reason to keep it loaded. */ + /* Checks whether the unit is ready to be unloaded for garbage collection. + * Returns true when the unit may be collected, and false if there's some + * reason to keep it loaded. + * + * References from other units are *not* checked here. Instead, this is done + * in unit_gc_sweep(), but using markers to properly collect dependency loops. + */ if (u->job) - return true; + return false; if (u->nop_job) - return true; + return false; state = unit_active_state(u); @@ -359,26 +364,23 @@ bool unit_check_gc(Unit *u) { UNIT_VTABLE(u)->release_resources(u); if (u->perpetual) - return true; - - if (u->refs) - return true; + return false; if (sd_bus_track_count(u->bus_track) > 0) - return true; + return false; /* But we keep the unit object around for longer when it is referenced or configured to not be gc'ed */ switch (u->collect_mode) { case COLLECT_INACTIVE: if (state != UNIT_INACTIVE) - return true; + return false; break; case COLLECT_INACTIVE_OR_FAILED: if (!IN_SET(state, UNIT_INACTIVE, UNIT_FAILED)) - return true; + return false; break; @@ -394,14 +396,13 @@ bool unit_check_gc(Unit *u) { if (r < 0) log_unit_debug_errno(u, r, "Failed to determine whether cgroup %s is empty: %m", u->cgroup_path); if (r <= 0) - return true; + return false; } - if (UNIT_VTABLE(u)->check_gc) - if (UNIT_VTABLE(u)->check_gc(u)) - return true; + if (UNIT_VTABLE(u)->may_gc && !UNIT_VTABLE(u)->may_gc(u)) + return false; - return false; + return true; } void unit_add_to_load_queue(Unit *u) { @@ -431,7 +432,7 @@ void unit_add_to_gc_queue(Unit *u) { if (u->in_gc_queue || u->in_cleanup_queue) return; - if (unit_check_gc(u)) + if (!unit_may_gc(u)) return; LIST_PREPEND(gc_queue, u->manager->gc_unit_queue, u); @@ -609,27 +610,6 @@ void unit_free(Unit *u) { for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++) bidi_set_free(u, u->dependencies[d]); - if (u->type != _UNIT_TYPE_INVALID) - LIST_REMOVE(units_by_type, u->manager->units_by_type[u->type], u); - - if (u->in_load_queue) - LIST_REMOVE(load_queue, u->manager->load_queue, u); - - if (u->in_dbus_queue) - LIST_REMOVE(dbus_queue, u->manager->dbus_unit_queue, u); - - if (u->in_cleanup_queue) - LIST_REMOVE(cleanup_queue, u->manager->cleanup_queue, u); - - if (u->in_gc_queue) - LIST_REMOVE(gc_queue, u->manager->gc_unit_queue, u); - - if (u->in_cgroup_realize_queue) - LIST_REMOVE(cgroup_realize_queue, u->manager->cgroup_realize_queue, u); - - if (u->in_cgroup_empty_queue) - LIST_REMOVE(cgroup_empty_queue, u->manager->cgroup_empty_queue, u); - if (u->on_console) manager_unref_console(u->manager); @@ -643,6 +623,49 @@ void unit_free(Unit *u) { (void) manager_update_failed_units(u->manager, u, false); set_remove(u->manager->startup_units, u); + unit_unwatch_all_pids(u); + + unit_ref_unset(&u->slice); + while (u->refs_by_target) + unit_ref_unset(u->refs_by_target); + + if (u->type != _UNIT_TYPE_INVALID) + LIST_REMOVE(units_by_type, u->manager->units_by_type[u->type], u); + + if (u->in_load_queue) + LIST_REMOVE(load_queue, u->manager->load_queue, u); + + if (u->in_dbus_queue) + LIST_REMOVE(dbus_queue, u->manager->dbus_unit_queue, u); + + if (u->in_gc_queue) + LIST_REMOVE(gc_queue, u->manager->gc_unit_queue, u); + + if (u->in_cgroup_realize_queue) + LIST_REMOVE(cgroup_realize_queue, u->manager->cgroup_realize_queue, u); + + if (u->in_cgroup_empty_queue) + LIST_REMOVE(cgroup_empty_queue, u->manager->cgroup_empty_queue, u); + + if (u->in_cleanup_queue) + LIST_REMOVE(cleanup_queue, u->manager->cleanup_queue, u); + + safe_close(u->ip_accounting_ingress_map_fd); + safe_close(u->ip_accounting_egress_map_fd); + + safe_close(u->ipv4_allow_map_fd); + safe_close(u->ipv6_allow_map_fd); + safe_close(u->ipv4_deny_map_fd); + safe_close(u->ipv6_deny_map_fd); + + bpf_program_unref(u->ip_bpf_ingress); + bpf_program_unref(u->ip_bpf_ingress_installed); + bpf_program_unref(u->ip_bpf_egress); + bpf_program_unref(u->ip_bpf_egress_installed); + + condition_free_list(u->conditions); + condition_free_list(u->asserts); + free(u->description); strv_free(u->documentation); free(u->fragment_path); @@ -654,29 +677,8 @@ void unit_free(Unit *u) { set_free_free(u->names); - unit_unwatch_all_pids(u); - - condition_free_list(u->conditions); - condition_free_list(u->asserts); - free(u->reboot_arg); - unit_ref_unset(&u->slice); - - while (u->refs) - unit_ref_unset(u->refs); - - safe_close(u->ip_accounting_ingress_map_fd); - safe_close(u->ip_accounting_egress_map_fd); - - safe_close(u->ipv4_allow_map_fd); - safe_close(u->ipv6_allow_map_fd); - safe_close(u->ipv4_deny_map_fd); - safe_close(u->ipv6_deny_map_fd); - - bpf_program_unref(u->ip_bpf_ingress); - bpf_program_unref(u->ip_bpf_egress); - free(u); } @@ -896,8 +898,8 @@ int unit_merge(Unit *u, Unit *other) { return r; /* Redirect all references */ - while (other->refs) - unit_ref_set(other->refs, u); + while (other->refs_by_target) + unit_ref_set(other->refs_by_target, other->refs_by_target->source, u); /* Merge dependencies */ for (d = 0; d < _UNIT_DEPENDENCY_MAX; d++) @@ -1119,7 +1121,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { "%s\tActive Enter Timestamp: %s\n" "%s\tActive Exit Timestamp: %s\n" "%s\tInactive Enter Timestamp: %s\n" - "%s\tGC Check Good: %s\n" + "%s\tMay GC: %s\n" "%s\tNeed Daemon Reload: %s\n" "%s\tTransient: %s\n" "%s\tPerpetual: %s\n" @@ -1137,7 +1139,7 @@ void unit_dump(Unit *u, FILE *f, const char *prefix) { prefix, strna(format_timestamp(timestamp2, sizeof(timestamp2), u->active_enter_timestamp.realtime)), prefix, strna(format_timestamp(timestamp3, sizeof(timestamp3), u->active_exit_timestamp.realtime)), prefix, strna(format_timestamp(timestamp4, sizeof(timestamp4), u->inactive_enter_timestamp.realtime)), - prefix, yes_no(unit_check_gc(u)), + prefix, yes_no(unit_may_gc(u)), prefix, yes_no(unit_need_daemon_reload(u)), prefix, yes_no(u->transient), prefix, yes_no(u->perpetual), @@ -1697,7 +1699,7 @@ static void unit_status_log_starting_stopping_reloading(Unit *u, JobType t) { format = unit_get_status_message_format(u, t); DISABLE_WARNING_FORMAT_NONLITERAL; - xsprintf(buf, format, unit_description(u)); + (void) snprintf(buf, sizeof buf, format, unit_description(u)); REENABLE_WARNING; mid = t == JOB_START ? "MESSAGE_ID=" SD_MESSAGE_UNIT_STARTING_STR : @@ -2326,18 +2328,16 @@ static void unit_update_on_console(Unit *u) { } void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_success) { - Manager *m; bool unexpected; + Manager *m; assert(u); assert(os < _UNIT_ACTIVE_STATE_MAX); assert(ns < _UNIT_ACTIVE_STATE_MAX); - /* Note that this is called for all low-level state changes, - * even if they might map to the same high-level - * UnitActiveState! That means that ns == os is an expected - * behavior here. For example: if a mount point is remounted - * this function will be called too! */ + /* Note that this is called for all low-level state changes, even if they might map to the same high-level + * UnitActiveState! That means that ns == os is an expected behavior here. For example: if a mount point is + * remounted this function will be called too! */ m = u->manager; @@ -2460,15 +2460,8 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su } } - /* Some names are special */ if (UNIT_IS_ACTIVE_OR_RELOADING(ns)) { - if (unit_has_name(u, SPECIAL_DBUS_SERVICE)) - /* The bus might have just become available, - * hence try to connect to it, if we aren't - * yet connected. */ - bus_init(m, true); - if (u->type == UNIT_SERVICE && !UNIT_IS_ACTIVE_OR_RELOADING(os) && !MANAGER_IS_RELOADING(m)) { @@ -2481,8 +2474,6 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su manager_send_unit_plymouth(m, u); } else { - /* We don't care about D-Bus going down here, since we'll get an asynchronous notification for it - * anyway. */ if (UNIT_IS_INACTIVE_OR_FAILED(ns) && !UNIT_IS_INACTIVE_OR_FAILED(os) @@ -2512,17 +2503,15 @@ void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_su } manager_recheck_journal(m); + manager_recheck_dbus(m); unit_trigger_notify(u); if (!MANAGER_IS_RELOADING(u->manager)) { - /* Maybe we finished startup and are now ready for - * being stopped because unneeded? */ + /* Maybe we finished startup and are now ready for being stopped because unneeded? */ unit_check_unneeded(u); - /* Maybe we finished startup, but something we needed - * has vanished? Let's die then. (This happens when - * something BindsTo= to a Type=oneshot unit, as these - * units go directly from starting to inactive, + /* Maybe we finished startup, but something we needed has vanished? Let's die then. (This happens when + * something BindsTo= to a Type=oneshot unit, as these units go directly from starting to inactive, * without ever entering started.) */ unit_check_binds_to(u); @@ -2976,8 +2965,7 @@ int unit_set_slice(Unit *u, Unit *slice) { if (UNIT_ISSET(u->slice) && u->cgroup_realized) return -EBUSY; - unit_ref_unset(&u->slice); - unit_ref_set(&u->slice, slice); + unit_ref_set(&u->slice, u, slice); return 1; } @@ -3176,18 +3164,9 @@ int unit_serialize(Unit *u, FILE *f, FDSet *fds, bool serialize_jobs) { assert(fds); if (unit_can_serialize(u)) { - ExecRuntime *rt; - r = UNIT_VTABLE(u)->serialize(u, f, fds); if (r < 0) return r; - - rt = unit_get_exec_runtime(u); - if (rt) { - r = exec_runtime_serialize(u, rt, f, fds); - if (r < 0) - return r; - } } dual_timestamp_serialize(f, "state-change-timestamp", &u->state_change_timestamp); @@ -3333,18 +3312,12 @@ void unit_serialize_item_format(Unit *u, FILE *f, const char *key, const char *f } int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { - ExecRuntime **rt = NULL; - size_t offset; int r; assert(u); assert(f); assert(fds); - offset = UNIT_VTABLE(u)->exec_runtime_offset; - if (offset > 0) - rt = (ExecRuntime**) ((uint8_t*) u + offset); - for (;;) { char line[LINE_MAX], *l, *v; CGroupIPAccountingMetric m; @@ -3604,18 +3577,16 @@ int unit_deserialize(Unit *u, FILE *f, FDSet *fds) { } if (unit_can_serialize(u)) { - if (rt) { - r = exec_runtime_deserialize_item(u, rt, l, v, fds); - if (r < 0) { - log_unit_warning(u, "Failed to deserialize runtime parameter '%s', ignoring.", l); - continue; - } - - /* Returns positive if key was handled by the call */ - if (r > 0) - continue; + r = exec_runtime_deserialize_compat(u, l, v, fds); + if (r < 0) { + log_unit_warning(u, "Failed to deserialize runtime parameter '%s', ignoring.", l); + continue; } + /* Returns positive if key was handled by the call */ + if (r > 0) + continue; + r = UNIT_VTABLE(u)->deserialize_item(u, l, v, fds); if (r < 0) log_unit_warning(u, "Failed to deserialize unit parameter '%s', ignoring.", l); @@ -3982,7 +3953,7 @@ UnitFileState unit_get_unit_file_state(Unit *u) { r = unit_file_get_state( u->manager->unit_file_scope, NULL, - basename(u->fragment_path), + u->id, &u->unit_file_state); if (r < 0) u->unit_file_state = UNIT_FILE_BAD; @@ -4003,30 +3974,32 @@ int unit_get_unit_file_preset(Unit *u) { return u->unit_file_preset; } -Unit* unit_ref_set(UnitRef *ref, Unit *u) { +Unit* unit_ref_set(UnitRef *ref, Unit *source, Unit *target) { assert(ref); - assert(u); + assert(source); + assert(target); - if (ref->unit) + if (ref->target) unit_ref_unset(ref); - ref->unit = u; - LIST_PREPEND(refs, u->refs, ref); - return u; + ref->source = source; + ref->target = target; + LIST_PREPEND(refs_by_target, target->refs_by_target, ref); + return target; } void unit_ref_unset(UnitRef *ref) { assert(ref); - if (!ref->unit) + if (!ref->target) return; /* We are about to drop a reference to the unit, make sure the garbage collection has a look at it as it might * be unreferenced now. */ - unit_add_to_gc_queue(ref->unit); + unit_add_to_gc_queue(ref->target); - LIST_REMOVE(refs, ref->unit->refs, ref); - ref->unit = NULL; + LIST_REMOVE(refs_by_target, ref->target->refs_by_target, ref); + ref->source = ref->target = NULL; } static int user_from_unit_name(Unit *u, char **ret) { @@ -4558,22 +4531,15 @@ int unit_kill_context( } else if (r > 0) { - /* FIXME: For now, on the legacy hierarchy, we - * will not wait for the cgroup members to die - * if we are running in a container or if this - * is a delegation unit, simply because cgroup - * notification is unreliable in these - * cases. It doesn't work at all in - * containers, and outside of containers it - * can be confused easily by left-over - * directories in the cgroup — which however - * should not exist in non-delegated units. On - * the unified hierarchy that's different, - * there we get proper events. Hence rely on - * them. */ + /* FIXME: For now, on the legacy hierarchy, we will not wait for the cgroup members to die if + * we are running in a container or if this is a delegation unit, simply because cgroup + * notification is unreliable in these cases. It doesn't work at all in containers, and outside + * of containers it can be confused easily by left-over directories in the cgroup — which + * however should not exist in non-delegated units. On the unified hierarchy that's different, + * there we get proper events. Hence rely on them. */ if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) > 0 || - (detect_container() == 0 && !UNIT_CGROUP_BOOL(u, delegate))) + (detect_container() == 0 && !unit_cgroup_delegate(u))) wait_for_exit = true; if (send_sighup) { @@ -4611,7 +4577,7 @@ int unit_require_mounts_for(Unit *u, const char *path, UnitDependencyMask mask) if (!path_is_absolute(path)) return -EINVAL; - r = hashmap_ensure_allocated(&u->requires_mounts_for, &string_hash_ops); + r = hashmap_ensure_allocated(&u->requires_mounts_for, &path_hash_ops); if (r < 0) return r; @@ -4648,7 +4614,7 @@ int unit_require_mounts_for(Unit *u, const char *path, UnitDependencyMask mask) if (!x) { char *q; - r = hashmap_ensure_allocated(&u->manager->units_requiring_mounts_for, &string_hash_ops); + r = hashmap_ensure_allocated(&u->manager->units_requiring_mounts_for, &path_hash_ops); if (r < 0) return r; @@ -4684,6 +4650,7 @@ int unit_setup_exec_runtime(Unit *u) { Unit *other; Iterator i; void *v; + int r; offset = UNIT_VTABLE(u)->exec_runtime_offset; assert(offset > 0); @@ -4695,15 +4662,12 @@ int unit_setup_exec_runtime(Unit *u) { /* Try to get it from somebody else */ HASHMAP_FOREACH_KEY(v, other, u->dependencies[UNIT_JOINS_NAMESPACE_OF], i) { - - *rt = unit_get_exec_runtime(other); - if (*rt) { - exec_runtime_ref(*rt); - return 0; - } + r = exec_runtime_acquire(u->manager, NULL, other->id, false, rt); + if (r == 1) + return 1; } - return exec_runtime_make(rt, unit_get_exec_context(u), u->id); + return exec_runtime_acquire(u->manager, unit_get_exec_context(u), u->id, true, rt); } int unit_setup_dynamic_creds(Unit *u) { @@ -4745,7 +4709,7 @@ void unit_warn_if_dir_nonempty(Unit *u, const char* where) { assert(where); r = dir_is_empty(where); - if (r > 0) + if (r > 0 || r == -ENOTDIR) return; if (r < 0) { log_unit_warning_errno(u, r, "Failed to check directory %s: %m", where); @@ -5025,8 +4989,16 @@ void unit_set_exec_params(Unit *u, ExecParameters *p) { assert(u); assert(p); + /* Copy parameters from manager */ + p->environment = u->manager->environment; + p->confirm_spawn = manager_get_confirm_spawn(u->manager); + p->cgroup_supported = u->manager->cgroup_supported; + p->prefix = u->manager->prefix; + SET_FLAG(p->flags, EXEC_PASS_LOG_UNIT|EXEC_CHOWN_DIRECTORIES, MANAGER_IS_SYSTEM(u->manager)); + + /* Copy paramaters from unit */ p->cgroup_path = u->cgroup_path; - SET_FLAG(p->flags, EXEC_CGROUP_DELEGATE, UNIT_CGROUP_BOOL(u, delegate)); + SET_FLAG(p->flags, EXEC_CGROUP_DELEGATE, unit_cgroup_delegate(u)); } int unit_fork_helper_process(Unit *u, const char *name, pid_t *ret) { @@ -5375,6 +5347,51 @@ bool unit_needs_console(Unit *u) { return exec_context_may_touch_console(ec); } +const char *unit_label_path(Unit *u) { + const char *p; + + /* Returns the file system path to use for MAC access decisions, i.e. the file to read the SELinux label off + * when validating access checks. */ + + p = u->source_path ?: u->fragment_path; + if (!p) + return NULL; + + /* If a unit is masked, then don't read the SELinux label of /dev/null, as that really makes no sense */ + if (path_equal(p, "/dev/null")) + return NULL; + + return p; +} + +int unit_pid_attachable(Unit *u, pid_t pid, sd_bus_error *error) { + int r; + + assert(u); + + /* Checks whether the specified PID is generally good for attaching, i.e. a valid PID, not our manager itself, + * and not a kernel thread either */ + + /* First, a simple range check */ + if (!pid_is_valid(pid)) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Process identifier " PID_FMT " is not valid.", pid); + + /* Some extra safety check */ + if (pid == 1 || pid == getpid_cached()) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Process " PID_FMT " is a manager processs, refusing.", pid); + + /* Don't even begin to bother with kernel threads */ + r = is_kernel_thread(pid); + if (r == -ESRCH) + return sd_bus_error_setf(error, SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN, "Process with ID " PID_FMT " does not exist.", pid); + if (r < 0) + return sd_bus_error_set_errnof(error, r, "Failed to determine whether process " PID_FMT " is a kernel thread: %m", pid); + if (r > 0) + return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Process " PID_FMT " is a kernel thread, refusing.", pid); + + return 0; +} + static const char* const collect_mode_table[_COLLECT_MODE_MAX] = { [COLLECT_INACTIVE] = "inactive", [COLLECT_INACTIVE_OR_FAILED] = "inactive-or-failed", diff --git a/src/core/unit.h b/src/core/unit.h index 8c79d4ed2..e903bf8ad 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -123,8 +123,8 @@ struct UnitRef { * that we can merge two units if necessary and correct all * references to them */ - Unit* unit; - LIST_FIELDS(UnitRef, refs); + Unit *source, *target; + LIST_FIELDS(UnitRef, refs_by_target); }; typedef enum UnitCGroupBPFState { @@ -187,7 +187,7 @@ struct Unit { char *job_timeout_reboot_arg; /* References to this */ - LIST_HEAD(UnitRef, refs); + LIST_HEAD(UnitRef, refs_by_target); /* Conditions to check */ LIST_HEAD(Condition, conditions); @@ -287,8 +287,8 @@ struct Unit { int ipv4_deny_map_fd; int ipv6_deny_map_fd; - BPFProgram *ip_bpf_ingress; - BPFProgram *ip_bpf_egress; + BPFProgram *ip_bpf_ingress, *ip_bpf_ingress_installed; + BPFProgram *ip_bpf_egress, *ip_bpf_egress_installed; uint64_t ip_accounting_extra[_CGROUP_IP_ACCOUNTING_METRIC_MAX]; @@ -490,10 +490,9 @@ struct UnitVTable { /* Additionally to UnitActiveState determine whether unit is to be restarted. */ bool (*will_restart)(Unit *u); - /* Return true when there is reason to keep this entry around - * even nothing references it and it isn't active in any - * way */ - bool (*check_gc)(Unit *u); + /* Return false when there is a reason to prevent this unit from being gc'ed + * even though nothing references it and it isn't active in any way. */ + bool (*may_gc)(Unit *u); /* When the unit is not running and no job for it queued we shall release its runtime resources */ void (*release_resources)(Unit *u); @@ -568,6 +567,9 @@ struct UnitVTable { /* True if transient units of this type are OK */ bool can_transient:1; + /* True if cgroup delegation is permissible */ + bool can_delegate:1; + /* True if queued jobs of this type should be GC'ed if no other job needs them anymore */ bool gc_jobs:1; }; @@ -623,7 +625,7 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c); int unit_choose_id(Unit *u, const char *name); int unit_set_description(Unit *u, const char *description); -bool unit_check_gc(Unit *u); +bool unit_may_gc(Unit *u); void unit_add_to_load_queue(Unit *u); void unit_add_to_dbus_queue(Unit *u); @@ -725,11 +727,11 @@ void unit_trigger_notify(Unit *u); UnitFileState unit_get_unit_file_state(Unit *u); int unit_get_unit_file_preset(Unit *u); -Unit* unit_ref_set(UnitRef *ref, Unit *u); +Unit* unit_ref_set(UnitRef *ref, Unit *source, Unit *target); void unit_ref_unset(UnitRef *ref); -#define UNIT_DEREF(ref) ((ref).unit) -#define UNIT_ISSET(ref) (!!(ref).unit) +#define UNIT_DEREF(ref) ((ref).target) +#define UNIT_ISSET(ref) (!!(ref).target) int unit_patch_contexts(Unit *u); @@ -801,6 +803,10 @@ void unit_warn_leftover_processes(Unit *u); bool unit_needs_console(Unit *u); +const char *unit_label_path(Unit *u); + +int unit_pid_attachable(Unit *unit, pid_t pid, sd_bus_error *error); + /* Macros which append UNIT= or USER_UNIT= to the message */ #define log_unit_full(unit, level, error, ...) \ diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c index aede180b4..e27512167 100644 --- a/src/coredump/coredump-vacuum.c +++ b/src/coredump/coredump-vacuum.c @@ -24,6 +24,7 @@ #include "coredump-vacuum.h" #include "dirent-util.h" #include "fd-util.h" +#include "fs-util.h" #include "hashmap.h" #include "macro.h" #include "string-util.h" @@ -247,14 +248,13 @@ int coredump_vacuum(int exclude_fd, uint64_t keep_free, uint64_t max_use) { if (r <= 0) return r; - if (unlinkat(dirfd(d), worst->oldest_file, 0) < 0) { + r = unlinkat_deallocate(dirfd(d), worst->oldest_file, 0); + if (r == -ENOENT) + continue; + if (r < 0) + return log_error_errno(r, "Failed to remove file %s: %m", worst->oldest_file); - if (errno == ENOENT) - continue; - - return log_error_errno(errno, "Failed to remove file %s: %m", worst->oldest_file); - } else - log_info("Removed old coredump %s.", worst->oldest_file); + log_info("Removed old coredump %s.", worst->oldest_file); } return 0; diff --git a/src/coredump/coredump.c b/src/coredump/coredump.c index fdcea22f5..e924750d1 100644 --- a/src/coredump/coredump.c +++ b/src/coredump/coredump.c @@ -102,6 +102,7 @@ enum { CONTEXT_SIGNAL, CONTEXT_TIMESTAMP, CONTEXT_RLIMIT, + CONTEXT_HOSTNAME, CONTEXT_COMM, CONTEXT_EXE, CONTEXT_UNIT, @@ -205,6 +206,7 @@ static int fix_xattr(int fd, const char *context[_CONTEXT_MAX]) { [CONTEXT_SIGNAL] = "user.coredump.signal", [CONTEXT_TIMESTAMP] = "user.coredump.timestamp", [CONTEXT_RLIMIT] = "user.coredump.rlimit", + [CONTEXT_HOSTNAME] = "user.coredump.hostname", [CONTEXT_COMM] = "user.coredump.comm", [CONTEXT_EXE] = "user.coredump.exe", }; @@ -258,6 +260,8 @@ static int fix_permissions( if (fsync(fd) < 0) return log_error_errno(errno, "Failed to sync coredump %s: %m", coredump_tmpfile_name(filename)); + (void) fsync_directory_of_file(fd); + r = link_tmpfile(fd, filename, target); if (r < 0) return log_error_errno(r, "Failed to move coredump %s into place: %m", target); @@ -848,6 +852,7 @@ static void map_context_fields(const struct iovec *iovec, const char* context[]) [CONTEXT_SIGNAL] = "COREDUMP_SIGNAL=", [CONTEXT_TIMESTAMP] = "COREDUMP_TIMESTAMP=", [CONTEXT_RLIMIT] = "COREDUMP_RLIMIT=", + [CONTEXT_HOSTNAME] = "COREDUMP_HOSTNAME=", [CONTEXT_COMM] = "COREDUMP_COMM=", [CONTEXT_EXE] = "COREDUMP_EXE=", }; @@ -981,6 +986,7 @@ static int process_socket(int fd) { assert(context[CONTEXT_SIGNAL]); assert(context[CONTEXT_TIMESTAMP]); assert(context[CONTEXT_RLIMIT]); + assert(context[CONTEXT_HOSTNAME]); assert(context[CONTEXT_COMM]); assert(coredump_fd >= 0); @@ -1067,7 +1073,7 @@ static int send_iovec(const struct iovec iovec[], size_t n_iovec, int input_fd) return 0; } -static char* set_iovec_field(struct iovec iovec[27], size_t *n_iovec, const char *field, const char *value) { +static char* set_iovec_field(struct iovec *iovec, size_t *n_iovec, const char *field, const char *value) { char *x; x = strappend(field, value); @@ -1076,7 +1082,7 @@ static char* set_iovec_field(struct iovec iovec[27], size_t *n_iovec, const char return x; } -static char* set_iovec_field_free(struct iovec iovec[27], size_t *n_iovec, const char *field, char *value) { +static char* set_iovec_field_free(struct iovec *iovec, size_t *n_iovec, const char *field, char *value) { char *x; x = set_iovec_field(iovec, n_iovec, field, value); @@ -1089,7 +1095,7 @@ static int gather_pid_metadata( char **comm_fallback, struct iovec *iovec, size_t *n_iovec) { - /* We need 26 empty slots in iovec! + /* We need 27 empty slots in iovec! * * Note that if we fail on oom later on, we do not roll-back changes to the iovec structure. (It remains valid, * with the first n_iovec fields initialized.) */ @@ -1151,6 +1157,9 @@ static int gather_pid_metadata( if (!set_iovec_field(iovec, n_iovec, "COREDUMP_RLIMIT=", context[CONTEXT_RLIMIT])) return log_oom(); + if (!set_iovec_field(iovec, n_iovec, "COREDUMP_HOSTNAME=", context[CONTEXT_HOSTNAME])) + return log_oom(); + if (!set_iovec_field(iovec, n_iovec, "COREDUMP_COMM=", context[CONTEXT_COMM])) return log_oom(); @@ -1231,7 +1240,7 @@ static int gather_pid_metadata( static int process_kernel(int argc, char* argv[]) { char* context[_CONTEXT_MAX] = {}; - struct iovec iovec[28 + SUBMIT_COREDUMP_FIELDS]; + struct iovec iovec[29 + SUBMIT_COREDUMP_FIELDS]; size_t i, n_iovec, n_to_free = 0; int r; @@ -1248,6 +1257,7 @@ static int process_kernel(int argc, char* argv[]) { context[CONTEXT_SIGNAL] = argv[1 + CONTEXT_SIGNAL]; context[CONTEXT_TIMESTAMP] = argv[1 + CONTEXT_TIMESTAMP]; context[CONTEXT_RLIMIT] = argv[1 + CONTEXT_RLIMIT]; + context[CONTEXT_HOSTNAME] = argv[1 + CONTEXT_HOSTNAME]; r = gather_pid_metadata(context, argv + 1 + CONTEXT_COMM, iovec, &n_to_free); if (r < 0) @@ -1304,9 +1314,10 @@ static int process_backtrace(int argc, char *argv[]) { context[CONTEXT_SIGNAL] = argv[2 + CONTEXT_SIGNAL]; context[CONTEXT_TIMESTAMP] = argv[2 + CONTEXT_TIMESTAMP]; context[CONTEXT_RLIMIT] = argv[2 + CONTEXT_RLIMIT]; + context[CONTEXT_HOSTNAME] = argv[2 + CONTEXT_HOSTNAME]; - n_allocated = 33 + COREDUMP_STORAGE_EXTERNAL; - /* 25 metadata, 2 static, +unknown input, 4 storage, rounded up */ + n_allocated = 34 + COREDUMP_STORAGE_EXTERNAL; + /* 26 metadata, 2 static, +unknown input, 4 storage, rounded up */ iovec = new(struct iovec, n_allocated); if (!iovec) return log_oom(); diff --git a/src/coredump/coredumpctl.c b/src/coredump/coredumpctl.c index 96e4a3e7e..a4cc9c1db 100644 --- a/src/coredump/coredumpctl.c +++ b/src/coredump/coredumpctl.c @@ -94,10 +94,7 @@ static int add_match(sd_journal *j, const char *match) { else prefix = "COREDUMP_COMM="; - pattern = strjoin(prefix, match); - if (!pattern) - return log_oom(); - + pattern = strjoina(prefix, match); log_debug("Adding match: %s", pattern); r = sd_journal_add_match(j, pattern, 0); if (r < 0) @@ -932,6 +929,7 @@ static int run_gdb(sd_journal *j) { goto finish; if (r == 0) { execlp("gdb", "gdb", exe, path, NULL); + log_open(); log_error_errno(errno, "Failed to invoke gdb: %m"); _exit(EXIT_FAILURE); } @@ -1040,7 +1038,7 @@ int main(int argc, char *argv[]) { } } - r = journal_access_check_and_warn(j, arg_quiet); + r = journal_access_check_and_warn(j, arg_quiet, true); if (r < 0) goto end; diff --git a/src/delta/delta.c b/src/delta/delta.c index 645b0b227..4fe89ff9b 100644 --- a/src/delta/delta.c +++ b/src/delta/delta.c @@ -191,6 +191,7 @@ static int found_override(const char *top, const char *bottom) { return r; if (r == 0) { execlp("diff", "diff", "-us", "--", bottom, top, NULL); + log_open(); log_error_errno(errno, "Failed to execute diff: %m"); _exit(EXIT_FAILURE); } diff --git a/src/firstboot/firstboot.c b/src/firstboot/firstboot.c index 262e520d5..effa092ec 100644 --- a/src/firstboot/firstboot.c +++ b/src/firstboot/firstboot.c @@ -558,7 +558,7 @@ static int prompt_root_password(void) { for (;;) { _cleanup_string_free_erase_ char *a = NULL, *b = NULL; - r = ask_password_tty(msg1, NULL, 0, 0, NULL, &a); + r = ask_password_tty(-1, msg1, NULL, 0, 0, NULL, &a); if (r < 0) return log_error_errno(r, "Failed to query root password: %m"); @@ -567,7 +567,7 @@ static int prompt_root_password(void) { break; } - r = ask_password_tty(msg2, NULL, 0, 0, NULL, &b); + r = ask_password_tty(-1, msg2, NULL, 0, 0, NULL, &b); if (r < 0) return log_error_errno(r, "Failed to query root password: %m"); diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c index f392f8909..fc58cba64 100644 --- a/src/fstab-generator/fstab-generator.c +++ b/src/fstab-generator/fstab-generator.c @@ -557,31 +557,28 @@ static int parse_fstab(bool initrd) { if (is_path(where)) { path_kill_slashes(where); + /* Follow symlinks here; see 5261ba901845c084de5a8fd06500ed09bfb0bd80 which makes sense for * mount units, but causes problems since it historically worked to have symlinks in e.g. * /etc/fstab. So we canonicalize here. Note that we use CHASE_NONEXISTENT to handle the case * where a symlink refers to another mount target; this works assuming the sub-mountpoint - * target is the final directory. - */ + * target is the final directory. */ r = chase_symlinks(where, initrd ? "/sysroot" : NULL, CHASE_PREFIX_ROOT | CHASE_NONEXISTENT, &canonical_where); - if (r < 0) - /* In this case for now we continue on as if it wasn't a symlink */ - log_warning_errno(r, "Failed to read symlink target for %s: %m", where); - else { - if (streq(canonical_where, where)) - canonical_where = mfree(canonical_where); - else - log_debug("Canonicalized what=%s where=%s to %s", - what, where, canonical_where); - } + if (r < 0) /* If we can't canonicalize we continue on as if it wasn't a symlink */ + log_debug_errno(r, "Failed to read symlink target for %s, ignoring: %m", where); + else if (streq(canonical_where, where)) /* If it was fully canonicalized, suppress the change */ + canonical_where = mfree(canonical_where); + else + log_debug("Canonicalized what=%s where=%s to %s", what, where, canonical_where); } makefs = fstab_test_option(me->mnt_opts, "x-systemd.makefs\0"); growfs = fstab_test_option(me->mnt_opts, "x-systemd.growfs\0"); noauto = fstab_test_yes_no_option(me->mnt_opts, "noauto\0" "auto\0"); nofail = fstab_test_yes_no_option(me->mnt_opts, "nofail\0" "fail\0"); + log_debug("Found entry what=%s where=%s type=%s makefs=%s nofail=%s noauto=%s", what, where, me->mnt_type, yes_no(makefs), diff --git a/src/hostname/meson.build b/src/hostname/meson.build index 75cc94874..1ab9271b4 100644 --- a/src/hostname/meson.build +++ b/src/hostname/meson.build @@ -20,13 +20,6 @@ if conf.get('ENABLE_HOSTNAMED') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.hostname1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.hostname1.policy', - input : 'org.freedesktop.hostname1.policy.in', - output : 'org.freedesktop.hostname1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.hostname1.policy', + install_dir : polkitpolicydir) endif diff --git a/src/hostname/org.freedesktop.hostname1.policy.in b/src/hostname/org.freedesktop.hostname1.policy similarity index 74% rename from src/hostname/org.freedesktop.hostname1.policy.in rename to src/hostname/org.freedesktop.hostname1.policy index b10ca31ac..4ac82c659 100644 --- a/src/hostname/org.freedesktop.hostname1.policy.in +++ b/src/hostname/org.freedesktop.hostname1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Set host name - Authentication is required to set the local host name. + Set host name + Authentication is required to set the local host name. auth_admin_keep auth_admin_keep @@ -29,8 +29,8 @@ - Set static host name - Authentication is required to set the statically configured local host name, as well as the pretty host name. + Set static host name + Authentication is required to set the statically configured local host name, as well as the pretty host name. auth_admin_keep auth_admin_keep @@ -40,8 +40,8 @@ - Set machine information - Authentication is required to set local machine information. + Set machine information + Authentication is required to set local machine information. auth_admin_keep auth_admin_keep diff --git a/src/hwdb/hwdb.c b/src/hwdb/hwdb.c index 4540260f9..f27f60e97 100644 --- a/src/hwdb/hwdb.c +++ b/src/hwdb/hwdb.c @@ -103,7 +103,7 @@ static int node_add_child(struct trie *trie, struct trie_node *node, struct trie struct trie_child_entry *child; /* extend array, add new entry, sort for bisection */ - child = realloc(node->children, (node->children_count + 1) * sizeof(struct trie_child_entry)); + child = reallocarray(node->children, node->children_count + 1, sizeof(struct trie_child_entry)); if (!child) return -ENOMEM; @@ -197,7 +197,7 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, } /* extend array, add new entry, sort for bisection */ - val = realloc(node->values, (node->values_count + 1) * sizeof(struct trie_value_entry)); + val = reallocarray(node->values, node->values_count + 1, sizeof(struct trie_value_entry)); if (!val) return -ENOMEM; trie->values_count++; diff --git a/src/import/export-raw.c b/src/import/export-raw.c index 8485027b2..eaa6d1091 100644 --- a/src/import/export-raw.c +++ b/src/import/export-raw.c @@ -37,6 +37,7 @@ #include "import-common.h" #include "missing.h" #include "ratelimit.h" +#include "stat-util.h" #include "string-util.h" #include "util.h" @@ -319,8 +320,9 @@ int raw_export_start(RawExport *e, const char *path, int fd, ImportCompressType if (fstat(sfd, &e->st) < 0) return -errno; - if (!S_ISREG(e->st.st_mode)) - return -ENOTTY; + r = stat_verify_regular(&e->st); + if (r < 0) + return r; /* Try to take a reflink snapshot of the file, if we can t make the export atomic */ tfd = reflink_snapshot(sfd, path); diff --git a/src/import/import-common.c b/src/import/import-common.c index c24a0b0c8..a3dc1dde8 100644 --- a/src/import/import-common.c +++ b/src/import/import-common.c @@ -87,7 +87,6 @@ int import_fork_tar_x(const char *path, pid_t *ret) { if (r < 0) return r; if (r == 0) { - int null_fd; uint64_t retain = (1ULL << CAP_CHOWN) | (1ULL << CAP_FOWNER) | @@ -100,26 +99,12 @@ int import_fork_tar_x(const char *path, pid_t *ret) { pipefd[1] = safe_close(pipefd[1]); - r = move_fd(pipefd[0], STDIN_FILENO, false); + r = rearrange_stdio(pipefd[0], -1, STDERR_FILENO); if (r < 0) { - log_error_errno(r, "Failed to move fd: %m"); + log_error_errno(r, "Failed to rearrange stdin/stdout: %m"); _exit(EXIT_FAILURE); } - null_fd = open("/dev/null", O_WRONLY|O_NOCTTY); - if (null_fd < 0) { - log_error_errno(errno, "Failed to open /dev/null: %m"); - _exit(EXIT_FAILURE); - } - - r = move_fd(null_fd, STDOUT_FILENO, false); - if (r < 0) { - log_error_errno(r, "Failed to move fd: %m"); - _exit(EXIT_FAILURE); - } - - stdio_unset_cloexec(); - if (unshare(CLONE_NEWNET) < 0) log_error_errno(errno, "Failed to lock tar into network namespace, ignoring: %m"); @@ -156,33 +141,18 @@ int import_fork_tar_c(const char *path, pid_t *ret) { if (r < 0) return r; if (r == 0) { - int null_fd; uint64_t retain = (1ULL << CAP_DAC_OVERRIDE); /* Child */ pipefd[0] = safe_close(pipefd[0]); - r = move_fd(pipefd[1], STDOUT_FILENO, false); + r = rearrange_stdio(-1, pipefd[1], STDERR_FILENO); if (r < 0) { - log_error_errno(r, "Failed to move fd: %m"); + log_error_errno(r, "Failed to rearrange stdin/stdout: %m"); _exit(EXIT_FAILURE); } - null_fd = open("/dev/null", O_RDONLY|O_NOCTTY); - if (null_fd < 0) { - log_error_errno(errno, "Failed to open /dev/null: %m"); - _exit(EXIT_FAILURE); - } - - r = move_fd(null_fd, STDIN_FILENO, false); - if (r < 0) { - log_error_errno(errno, "Failed to move fd: %m"); - _exit(EXIT_FAILURE); - } - - stdio_unset_cloexec(); - if (unshare(CLONE_NEWNET) < 0) log_error_errno(errno, "Failed to lock tar into network namespace, ignoring: %m"); diff --git a/src/import/importd.c b/src/import/importd.c index 98ee1a2fa..10f52c7fc 100644 --- a/src/import/importd.c +++ b/src/import/importd.c @@ -395,57 +395,14 @@ static int transfer_start(Transfer *t) { pipefd[0] = safe_close(pipefd[0]); - if (dup2(pipefd[1], STDERR_FILENO) != STDERR_FILENO) { - log_error_errno(errno, "Failed to dup2() fd: %m"); + r = rearrange_stdio(t->stdin_fd, + t->stdout_fd < 0 ? pipefd[1] : t->stdout_fd, + pipefd[1]); + if (r < 0) { + log_error_errno(r, "Failed to set stdin/stdout/stderr: %m"); _exit(EXIT_FAILURE); } - if (t->stdout_fd >= 0) { - if (dup2(t->stdout_fd, STDOUT_FILENO) != STDOUT_FILENO) { - log_error_errno(errno, "Failed to dup2() fd: %m"); - _exit(EXIT_FAILURE); - } - - if (t->stdout_fd != STDOUT_FILENO) - safe_close(t->stdout_fd); - } else { - if (dup2(pipefd[1], STDOUT_FILENO) != STDOUT_FILENO) { - log_error_errno(errno, "Failed to dup2() fd: %m"); - _exit(EXIT_FAILURE); - } - } - - if (!IN_SET(pipefd[1], STDOUT_FILENO, STDERR_FILENO)) - pipefd[1] = safe_close(pipefd[1]); - - if (t->stdin_fd >= 0) { - if (dup2(t->stdin_fd, STDIN_FILENO) != STDIN_FILENO) { - log_error_errno(errno, "Failed to dup2() fd: %m"); - _exit(EXIT_FAILURE); - } - - if (t->stdin_fd != STDIN_FILENO) - safe_close(t->stdin_fd); - } else { - int null_fd; - - null_fd = open("/dev/null", O_RDONLY|O_NOCTTY); - if (null_fd < 0) { - log_error_errno(errno, "Failed to open /dev/null: %m"); - _exit(EXIT_FAILURE); - } - - if (dup2(null_fd, STDIN_FILENO) != STDIN_FILENO) { - log_error_errno(errno, "Failed to dup2() fd: %m"); - _exit(EXIT_FAILURE); - } - - if (null_fd != STDIN_FILENO) - safe_close(null_fd); - } - - stdio_unset_cloexec(); - if (setenv("SYSTEMD_LOG_TARGET", "console-prefixed", 1) < 0 || setenv("NOTIFY_SOCKET", "/run/systemd/import/notify", 1) < 0) { log_error_errno(errno, "setenv() failed: %m"); diff --git a/src/import/meson.build b/src/import/meson.build index 2dcc0bcc0..975afc624 100644 --- a/src/import/meson.build +++ b/src/import/meson.build @@ -70,15 +70,8 @@ if conf.get('ENABLE_IMPORTD') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.import1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.import1.policy', - input : 'org.freedesktop.import1.policy.in', - output : 'org.freedesktop.import1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.import1.policy', + install_dir : polkitpolicydir) install_data('import-pubring.gpg', install_dir : rootlibexecdir) diff --git a/src/import/org.freedesktop.import1.policy.in b/src/import/org.freedesktop.import1.policy similarity index 71% rename from src/import/org.freedesktop.import1.policy.in rename to src/import/org.freedesktop.import1.policy index d96ca2d06..beea5fea6 100644 --- a/src/import/org.freedesktop.import1.policy.in +++ b/src/import/org.freedesktop.import1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Import a VM or container image - Authentication is required to import a VM or container image + Import a VM or container image + Authentication is required to import a VM or container image auth_admin auth_admin @@ -29,8 +29,8 @@ - Export a VM or container image - Authentication is required to export a VM or container image + Export a VM or container image + Authentication is required to export a VM or container image auth_admin auth_admin @@ -39,8 +39,8 @@ - Download a VM or container image - Authentication is required to download a VM or container image + Download a VM or container image + Authentication is required to download a VM or container image auth_admin auth_admin diff --git a/src/import/pull-common.c b/src/import/pull-common.c index ecdcbd2dc..7651870bf 100644 --- a/src/import/pull-common.c +++ b/src/import/pull-common.c @@ -483,27 +483,14 @@ int pull_verify(PullJob *main_job, NULL /* trailing NULL */ }; unsigned k = ELEMENTSOF(cmd) - 6; - int null_fd; /* Child */ gpg_pipe[1] = safe_close(gpg_pipe[1]); - r = move_fd(gpg_pipe[0], STDIN_FILENO, false); + r = rearrange_stdio(gpg_pipe[0], -1, STDERR_FILENO); if (r < 0) { - log_error_errno(errno, "Failed to move fd: %m"); - _exit(EXIT_FAILURE); - } - - null_fd = open("/dev/null", O_WRONLY|O_NOCTTY); - if (null_fd < 0) { - log_error_errno(errno, "Failed to open /dev/null: %m"); - _exit(EXIT_FAILURE); - } - - r = move_fd(null_fd, STDOUT_FILENO, false); - if (r < 0) { - log_error_errno(errno, "Failed to move fd: %m"); + log_error_errno(r, "Failed to rearrange stdin/stdout: %m"); _exit(EXIT_FAILURE); } @@ -524,8 +511,6 @@ int pull_verify(PullJob *main_job, cmd[k++] = NULL; } - stdio_unset_cloexec(); - execvp("gpg2", (char * const *) cmd); execvp("gpg", (char * const *) cmd); log_error_errno(errno, "Failed to execute gpg: %m"); diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 66d5369a5..428725223 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -96,23 +96,20 @@ static int spawn_child(const char* child, char** argv) { /* In the child */ if (r == 0) { + safe_close(fd[0]); - r = dup2(fd[1], STDOUT_FILENO); + r = rearrange_stdio(STDIN_FILENO, fd[1], STDERR_FILENO); if (r < 0) { - log_error_errno(errno, "Failed to dup pipe to stdout: %m"); + log_error_errno(r, "Failed to dup pipe to stdout: %m"); _exit(EXIT_FAILURE); } - safe_close_pair(fd); - execvp(child, argv); log_error_errno(errno, "Failed to exec child %s: %m", child); _exit(EXIT_FAILURE); } - r = close(fd[1]); - if (r < 0) - log_warning_errno(errno, "Failed to close write end of pipe: %m"); + safe_close(fd[1]); r = fd_nonblock(fd[0], true); if (r < 0) diff --git a/src/journal-remote/journal-upload.c b/src/journal-remote/journal-upload.c index 0b74ca98a..309478561 100644 --- a/src/journal-remote/journal-upload.c +++ b/src/journal-remote/journal-upload.c @@ -328,9 +328,7 @@ static size_t fd_input_callback(void *buf, size_t size, size_t nmemb, void *user static void close_fd_input(Uploader *u) { assert(u); - if (u->input >= 0) - close_nointr(u->input); - u->input = -1; + u->input = safe_close(u->input); u->timeout = 0; } diff --git a/src/journal/cat.c b/src/journal/cat.c index b2f9ed501..1815d5815 100644 --- a/src/journal/cat.c +++ b/src/journal/cat.c @@ -135,16 +135,13 @@ int main(int argc, char *argv[]) { saved_stderr = fcntl(STDERR_FILENO, F_DUPFD_CLOEXEC, 3); - if (dup3(fd, STDOUT_FILENO, 0) < 0 || - dup3(fd, STDERR_FILENO, 0) < 0) { - r = log_error_errno(errno, "Failed to duplicate fd: %m"); + r = rearrange_stdio(STDIN_FILENO, fd, fd); /* Invalidates fd on succcess + error! */ + fd = -1; + if (r < 0) { + log_error_errno(r, "Failed to rearrange stdout/stderr: %m"); goto finish; } - if (fd >= 3) - safe_close(fd); - fd = -1; - if (argc <= optind) (void) execl("/bin/cat", "/bin/cat", NULL); else diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c index 3353b3a0d..5643c0578 100644 --- a/src/journal/journal-file.c +++ b/src/journal/journal-file.c @@ -33,6 +33,7 @@ #include "chattr-util.h" #include "compress.h" #include "fd-util.h" +#include "fs-util.h" #include "journal-authenticate.h" #include "journal-def.h" #include "journal-file.h" @@ -42,6 +43,7 @@ #include "random-util.h" #include "sd-event.h" #include "set.h" +#include "stat-util.h" #include "string-util.h" #include "strv.h" #include "xattr-util.h" @@ -453,39 +455,6 @@ static int journal_file_init_header(JournalFile *f, JournalFile *template) { return 0; } -static int fsync_directory_of_file(int fd) { - _cleanup_free_ char *path = NULL, *dn = NULL; - _cleanup_close_ int dfd = -1; - struct stat st; - int r; - - if (fstat(fd, &st) < 0) - return -errno; - - if (!S_ISREG(st.st_mode)) - return -EBADFD; - - r = fd_get_path(fd, &path); - if (r < 0) - return r; - - if (!path_is_absolute(path)) - return -EINVAL; - - dn = dirname_malloc(path); - if (!dn) - return -ENOMEM; - - dfd = open(dn, O_RDONLY|O_CLOEXEC|O_DIRECTORY); - if (dfd < 0) - return -errno; - - if (fsync(dfd) < 0) - return -errno; - - return 0; -} - static int journal_file_refresh_header(JournalFile *f) { sd_id128_t boot_id; int r; @@ -643,6 +612,8 @@ static int journal_file_verify_header(JournalFile *f) { } static int journal_file_fstat(JournalFile *f) { + int r; + assert(f); assert(f->fd >= 0); @@ -651,6 +622,11 @@ static int journal_file_fstat(JournalFile *f) { f->last_stat_usec = now(CLOCK_MONOTONIC); + /* Refuse dealing with with files that aren't regular */ + r = stat_verify_regular(&f->last_stat); + if (r < 0) + return r; + /* Refuse appending to files that are already deleted */ if (f->last_stat.st_nlink <= 0) return -EIDRM; @@ -3292,6 +3268,8 @@ int journal_file_open( goto fail; } } else { + assert(fd >= 0); + /* If we don't know the path, fill in something explanatory and vaguely useful */ if (asprintf(&f->path, "/proc/self/%i", fd) < 0) { r = -ENOMEM; @@ -3306,7 +3284,11 @@ int journal_file_open( } if (f->fd < 0) { - f->fd = open(f->path, f->flags|O_CLOEXEC, f->mode); + /* We pass O_NONBLOCK here, so that in case somebody pointed us to some character device node or FIFO + * or so, we likely fail quickly than block for long. For regular files O_NONBLOCK has no effect, hence + * it doesn't hurt in that case. */ + + f->fd = open(f->path, f->flags|O_CLOEXEC|O_NONBLOCK, f->mode); if (f->fd < 0) { r = -errno; goto fail; @@ -3314,6 +3296,10 @@ int journal_file_open( /* fds we opened here by us should also be closed by us. */ f->close_fd = true; + + r = fd_nonblock(f->fd, false); + if (r < 0) + goto fail; } f->cache_fd = mmap_cache_add_fd(f->mmap, f->fd); @@ -3330,17 +3316,12 @@ int journal_file_open( (void) journal_file_warn_btrfs(f); - /* Let's attach the creation time to the journal file, - * so that the vacuuming code knows the age of this - * file even if the file might end up corrupted one - * day... Ideally we'd just use the creation time many - * file systems maintain for each file, but there is - * currently no usable API to query this, hence let's - * emulate this via extended attributes. If extended - * attributes are not supported we'll just skip this, - * and rely solely on mtime/atime/ctime of the file. */ - - fd_setcrtime(f->fd, 0); + /* Let's attach the creation time to the journal file, so that the vacuuming code knows the age of this + * file even if the file might end up corrupted one day... Ideally we'd just use the creation time many + * file systems maintain for each file, but the API to query this is very new, hence let's emulate this + * via extended attributes. If extended attributes are not supported we'll just skip this, and rely + * solely on mtime/atime/ctime of the file. */ + (void) fd_setcrtime(f->fd, 0); #if HAVE_GCRYPT /* Try to load the FSPRG state, and if we can't, then @@ -3691,7 +3672,7 @@ void journal_default_metrics(JournalMetrics *m, int fd) { if (fstatvfs(fd, &ss) >= 0) fs_size = ss.f_frsize * ss.f_blocks; else { - log_debug_errno(errno, "Failed to detremine disk size: %m"); + log_debug_errno(errno, "Failed to determine disk size: %m"); fs_size = 0; } diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h index c5cfa3d87..67abf8da4 100644 --- a/src/journal/journal-file.h +++ b/src/journal/journal-file.h @@ -122,6 +122,8 @@ typedef struct JournalFile { pthread_t offline_thread; volatile OfflineState offline_state; + unsigned last_seen_generation; + #if HAVE_XZ || HAVE_LZ4 void *compress_buffer; size_t compress_buffer_size; diff --git a/src/journal/journal-internal.h b/src/journal/journal-internal.h index 5ec87e83d..e5f563cce 100644 --- a/src/journal/journal-internal.h +++ b/src/journal/journal-internal.h @@ -80,6 +80,7 @@ struct Directory { char *path; int wd; bool is_root; + unsigned last_seen_generation; }; struct sd_journal { @@ -89,6 +90,7 @@ struct sd_journal { char *prefix; OrderedHashmap *files; + IteratedCache *files_cache; MMapCache *mmap; Location current_location; @@ -103,6 +105,7 @@ struct sd_journal { int inotify_fd; unsigned current_invalidate_counter, last_invalidate_counter; usec_t last_process_usec; + unsigned generation; /* Iterating through unique fields and their data values */ char *unique_field; diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c index c21e87858..db36a6ab8 100644 --- a/src/journal/journal-vacuum.c +++ b/src/journal/journal-vacuum.c @@ -27,6 +27,7 @@ #include "alloc-util.h" #include "dirent-util.h" #include "fd-util.h" +#include "fs-util.h" #include "journal-def.h" #include "journal-file.h" #include "journal-vacuum.h" @@ -278,14 +279,15 @@ int journal_directory_vacuum( if (r > 0) { /* Always vacuum empty non-online files. */ - if (unlinkat(dirfd(d), p, 0) >= 0) { + r = unlinkat_deallocate(dirfd(d), p, 0); + if (r >= 0) { log_full(verbose ? LOG_INFO : LOG_DEBUG, "Deleted empty archived journal %s/%s (%s).", directory, p, format_bytes(sbytes, sizeof(sbytes), size)); freed += size; - } else if (errno != ENOENT) - log_warning_errno(errno, "Failed to delete empty archived journal %s/%s: %m", directory, p); + } else if (r != -ENOENT) + log_warning_errno(r, "Failed to delete empty archived journal %s/%s: %m", directory, p); continue; } @@ -321,7 +323,8 @@ int journal_directory_vacuum( (n_max_files <= 0 || left <= n_max_files)) break; - if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) { + r = unlinkat_deallocate(dirfd(d), list[i].filename, 0); + if (r >= 0) { log_full(verbose ? LOG_INFO : LOG_DEBUG, "Deleted archived journal %s/%s (%s).", directory, list[i].filename, format_bytes(sbytes, sizeof(sbytes), list[i].usage)); freed += list[i].usage; @@ -330,8 +333,8 @@ int journal_directory_vacuum( else sum = 0; - } else if (errno != ENOENT) - log_warning_errno(errno, "Failed to delete archived journal %s/%s: %m", directory, list[i].filename); + } else if (r != -ENOENT) + log_warning_errno(r, "Failed to delete archived journal %s/%s: %m", directory, list[i].filename); } if (oldest_usec && i < n_list && (*oldest_usec == 0 || list[i].realtime < *oldest_usec)) diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 17782688d..e0ad0e1d1 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -81,6 +81,8 @@ #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) +#define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ + #if HAVE_PCRE2 DEFINE_TRIVIAL_CLEANUP_FUNC(pcre2_match_data*, pcre2_match_data_free); DEFINE_TRIVIAL_CLEANUP_FUNC(pcre2_code*, pcre2_code_free); @@ -334,7 +336,7 @@ static void help(void) { " --user-unit=UNIT Show logs from the specified user unit\n" " -t --identifier=STRING Show entries with the specified syslog identifier\n" " -p --priority=RANGE Show entries with the specified priority\n" - " -g --grep=PATTERN Show entries with MESSSAGE matching PATTERN\n" + " -g --grep=PATTERN Show entries with MESSAGE matching PATTERN\n" " --case-sensitive[=BOOL] Force case sensitive or insenstive matching\n" " -e --pager-end Immediately jump to the end in the pager\n" " -f --follow Follow the journal\n" @@ -492,7 +494,7 @@ static int parse_argv(int argc, char *argv[]) { assert(argc >= 0); assert(argv); - while ((c = getopt_long(argc, argv, "hefo:aln::qmb::kD:p:c:S:U:t:u:NF:xrM:", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "hefo:aln::qmb::kD:p:g:c:S:U:t:u:NF:xrM:", options, NULL)) >= 0) switch (c) { @@ -970,8 +972,7 @@ static int parse_argv(int argc, char *argv[]) { return -EINVAL; } - if (!strv_isempty(arg_system_units) && (arg_journal_type == SD_JOURNAL_CURRENT_USER)) { - + if (!strv_isempty(arg_system_units) && arg_journal_type == SD_JOURNAL_CURRENT_USER) { /* Specifying --user and --unit= at the same time makes no sense (as the former excludes the user * journal, but the latter excludes the system journal, thus resulting in empty output). Let's be nice * to users, and automatically turn --unit= into --user-unit= if combined with --user. */ @@ -2239,7 +2240,8 @@ int main(int argc, char *argv[]) { goto finish; } - r = journal_access_check_and_warn(j, arg_quiet); + r = journal_access_check_and_warn(j, arg_quiet, + !(arg_journal_type == SD_JOURNAL_CURRENT_USER || arg_user_units)); if (r < 0) goto finish; @@ -2639,6 +2641,20 @@ int main(int argc, char *argv[]) { goto finish; n_shown++; + + /* If journalctl take a long time to process messages, and during that time journal file + * rotation occurs, a journalctl client will keep those rotated files open until it calls + * sd_journal_process(), which typically happens as a result of calling sd_journal_wait() below + * in the "following" case. By periodically calling sd_journal_process() during the processing + * loop we shrink the window of time a client instance has open file descriptors for rotated + * (deleted) journal files. */ + if ((n_shown % PROCESS_INOTIFY_INTERVAL) == 0) { + r = sd_journal_process(j); + if (r < 0) { + log_error_errno(r, "Failed to process inotify events: %m"); + goto finish; + } + } } if (!arg_follow) { diff --git a/src/journal/journald-kmsg.c b/src/journal/journald-kmsg.c index 0fadc16fb..5895e4870 100644 --- a/src/journal/journald-kmsg.c +++ b/src/journal/journald-kmsg.c @@ -98,15 +98,17 @@ void server_forward_kmsg( log_debug_errno(errno, "Failed to write to /dev/kmsg for logging: %m"); } -static bool is_us(const char *pid) { - pid_t t; +static bool is_us(const char *identifier, const char *pid) { + pid_t pid_num; - assert(pid); - - if (parse_pid(pid, &t) < 0) + if (!identifier || !pid) return false; - return t == getpid_cached(); + if (parse_pid(pid, &pid_num) < 0) + return false; + + return pid_num == getpid_cached() && + streq(identifier, program_invocation_short_name); } static void dev_kmsg_record(Server *s, const char *p, size_t l) { @@ -136,7 +138,7 @@ static void dev_kmsg_record(Server *s, const char *p, size_t l) { if (r < 0 || priority < 0 || priority > 999) return; - if (s->forward_to_kmsg && (priority & LOG_FACMASK) != LOG_KERN) + if (s->forward_to_kmsg && LOG_FAC(priority) != LOG_KERN) return; l -= (e - p) + 1; @@ -285,14 +287,14 @@ static void dev_kmsg_record(Server *s, const char *p, size_t l) { if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0) iovec[n++] = IOVEC_MAKE_STRING(syslog_facility); - if ((priority & LOG_FACMASK) == LOG_KERN) + if (LOG_FAC(priority) == LOG_KERN) iovec[n++] = IOVEC_MAKE_STRING("SYSLOG_IDENTIFIER=kernel"); else { pl -= syslog_parse_identifier((const char**) &p, &identifier, &pid); /* Avoid any messages we generated ourselves via * log_info() and friends. */ - if (pid && is_us(pid)) + if (is_us(identifier, pid)) goto finish; if (identifier) { diff --git a/src/journal/journald-native.h b/src/journal/journald-native.h index 7ca17ec60..f1b4abc41 100644 --- a/src/journal/journald-native.h +++ b/src/journal/journald-native.h @@ -22,8 +22,6 @@ #include "journald-server.h" -bool valid_user_field(const char *p, size_t l, bool allow_protected); - void server_process_native_message(Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len); void server_process_native_file(Server *s, int fd, const struct ucred *ucred, const struct timeval *tv, const char *label, size_t label_len); diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c index 671ada718..bb7330f3d 100644 --- a/src/journal/journald-stream.c +++ b/src/journal/journald-stream.c @@ -778,7 +778,9 @@ int server_restore_streams(Server *s, FDSet *fds) { if (!found) { /* No file descriptor? Then let's delete the state file */ log_debug("Cannot restore stream file %s", de->d_name); - unlinkat(dirfd(d), de->d_name, 0); + if (unlinkat(dirfd(d), de->d_name, 0) < 0) + log_warning("Failed to remove /run/systemd/journal/streams/%s: %m", + de->d_name); continue; } diff --git a/src/journal/meson.build b/src/journal/meson.build index a23f6a712..db4d598e7 100644 --- a/src/journal/meson.build +++ b/src/journal/meson.build @@ -131,8 +131,8 @@ meson.add_install_script( mkdir_p.format('/var/log/journal')) meson.add_install_script( 'sh', '-c', - 'chown 0:0 $DESTDIR/var/log/journal && - chmod 755 $DESTDIR/var/log/journal || :') + '''chown 0:0 $DESTDIR/var/log/journal && + chmod 755 $DESTDIR/var/log/journal || :''') if get_option('adm-group') meson.add_install_script( 'sh', '-c', diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 6da7bf8e8..11dbd83f2 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -40,6 +40,7 @@ #include "fs-util.h" #include "hashmap.h" #include "hostname-util.h" +#include "id128-util.h" #include "io-util.h" #include "journal-def.h" #include "journal-file.h" @@ -51,6 +52,7 @@ #include "process-util.h" #include "replace-var.h" #include "stat-util.h" +#include "stat-util.h" #include "stdio-util.h" #include "string-util.h" #include "strv.h" @@ -820,15 +822,21 @@ static int next_beyond_location(sd_journal *j, JournalFile *f, direction_t direc } static int real_journal_next(sd_journal *j, direction_t direction) { - JournalFile *f, *new_file = NULL; - Iterator i; + JournalFile *new_file = NULL; + unsigned i, n_files; + const void **files; Object *o; int r; assert_return(j, -EINVAL); assert_return(!journal_pid_changed(j), -ECHILD); - ORDERED_HASHMAP_FOREACH(f, j->files, i) { + r = iterated_cache_get(j->files_cache, NULL, &files, &n_files); + if (r < 0) + return r; + + for (i = 0; i < n_files; i++) { + JournalFile *f = (JournalFile *)files[i]; bool found; r = next_beyond_location(j, f, direction); @@ -1133,7 +1141,6 @@ _public_ int sd_journal_test_cursor(sd_journal *j, const char *cursor) { return 1; } - _public_ int sd_journal_seek_monotonic_usec(sd_journal *j, sd_id128_t boot_id, uint64_t usec) { assert_return(j, -EINVAL); assert_return(!journal_pid_changed(j), -ECHILD); @@ -1180,22 +1187,12 @@ _public_ int sd_journal_seek_tail(sd_journal *j) { } static void check_network(sd_journal *j, int fd) { - struct statfs sfs; - assert(j); if (j->on_network) return; - if (fstatfs(fd, &sfs) < 0) - return; - - j->on_network = - F_TYPE_EQUAL(sfs.f_type, CIFS_MAGIC_NUMBER) || - F_TYPE_EQUAL(sfs.f_type, CODA_SUPER_MAGIC) || - F_TYPE_EQUAL(sfs.f_type, NCP_SUPER_MAGIC) || - F_TYPE_EQUAL(sfs.f_type, NFS_SUPER_MAGIC) || - F_TYPE_EQUAL(sfs.f_type, SMB_SUPER_MAGIC); + j->on_network = fd_is_network_fs(fd); } static bool file_has_type_prefix(const char *prefix, const char *filename) { @@ -1246,6 +1243,16 @@ static bool path_has_prefix(sd_journal *j, const char *path, const char *prefix) return path_startswith(path, prefix); } +static void track_file_disposition(sd_journal *j, JournalFile *f) { + assert(j); + assert(f); + + if (!j->has_runtime_files && path_has_prefix(j, f->path, "/run")) + j->has_runtime_files = true; + else if (!j->has_persistent_files && path_has_prefix(j, f->path, "/var")) + j->has_persistent_files = true; +} + static const char *skip_slash(const char *p) { if (!p) @@ -1257,76 +1264,125 @@ static const char *skip_slash(const char *p) { return p; } -static int add_any_file(sd_journal *j, int fd, const char *path) { - JournalFile *f = NULL; +static int add_any_file( + sd_journal *j, + int fd, + const char *path) { + bool close_fd = false; + JournalFile *f; + struct stat st; int r, k; assert(j); assert(fd >= 0 || path); - if (path && ordered_hashmap_get(j->files, path)) - return 0; + if (fd < 0) { + if (j->toplevel_fd >= 0) + /* If there's a top-level fd defined make the path relative, explicitly, since otherwise + * openat() ignores the first argument. */ + + fd = openat(j->toplevel_fd, skip_slash(path), O_RDONLY|O_CLOEXEC|O_NONBLOCK); + else + fd = open(path, O_RDONLY|O_CLOEXEC|O_NONBLOCK); + if (fd < 0) { + r = log_debug_errno(errno, "Failed to open journal file %s: %m", path); + goto finish; + } + + close_fd = true; + + r = fd_nonblock(fd, false); + if (r < 0) { + r = log_debug_errno(errno, "Failed to turn off O_NONBLOCK for %s: %m", path); + goto finish; + } + } + + if (fstat(fd, &st) < 0) { + r = log_debug_errno(errno, "Failed to fstat file '%s': %m", path); + goto finish; + } + + r = stat_verify_regular(&st); + if (r < 0) { + log_debug_errno(r, "Refusing to open '%s', as it is not a regular file.", path); + goto finish; + } + + f = ordered_hashmap_get(j->files, path); + if (f) { + if (f->last_stat.st_dev == st.st_dev && + f->last_stat.st_ino == st.st_ino) { + + /* We already track this file, under the same path and with the same device/inode numbers, it's + * hence really the same. Mark this file as seen in this generation. This is used to GC old + * files in process_q_overflow() to detect journal files that are still there and discern them + * from those which are gone. */ + + f->last_seen_generation = j->generation; + r = 0; + goto finish; + } + + /* So we tracked a file under this name, but it has a different inode/device. In that case, it got + * replaced (probably due to rotation?), let's drop it hence from our list. */ + remove_file_real(j, f); + f = NULL; + } if (ordered_hashmap_size(j->files) >= JOURNAL_FILES_MAX) { log_debug("Too many open journal files, not adding %s.", path); r = -ETOOMANYREFS; - goto fail; - } - - if (fd < 0 && j->toplevel_fd >= 0) { - - /* If there's a top-level fd defined, open the file relative to this now. (Make the path relative, - * explicitly, since otherwise openat() ignores the first argument.) */ - - fd = openat(j->toplevel_fd, skip_slash(path), O_RDONLY|O_CLOEXEC); - if (fd < 0) { - r = log_debug_errno(errno, "Failed to open journal file %s: %m", path); - goto fail; - } - - close_fd = true; + goto finish; } r = journal_file_open(fd, path, O_RDONLY, 0, false, false, NULL, j->mmap, NULL, NULL, &f); if (r < 0) { - if (close_fd) - safe_close(fd); log_debug_errno(r, "Failed to open journal file %s: %m", path); - goto fail; + goto finish; } /* journal_file_dump(f); */ r = ordered_hashmap_put(j->files, f->path, f); if (r < 0) { - f->close_fd = close_fd; + f->close_fd = false; /* make sure journal_file_close() doesn't close the caller's fd (or our own). We'll let the caller do that, or ourselves */ (void) journal_file_close(f); - goto fail; + goto finish; } - if (!j->has_runtime_files && path_has_prefix(j, f->path, "/run")) - j->has_runtime_files = true; - else if (!j->has_persistent_files && path_has_prefix(j, f->path, "/var")) - j->has_persistent_files = true; + close_fd = false; /* the fd is now owned by the JournalFile object */ - log_debug("File %s added.", f->path); + f->last_seen_generation = j->generation; + track_file_disposition(j, f); check_network(j, f->fd); j->current_invalidate_counter++; - return 0; + log_debug("File %s added.", f->path); -fail: - k = journal_put_error(j, r, path); - if (k < 0) - return k; + r = 0; + +finish: + if (close_fd) + safe_close(fd); + + if (r < 0) { + k = journal_put_error(j, r, path); + if (k < 0) + return k; + } return r; } -static int add_file(sd_journal *j, const char *prefix, const char *filename) { +static int add_file_by_name( + sd_journal *j, + const char *prefix, + const char *filename) { + const char *path; assert(j); @@ -1343,7 +1399,11 @@ static int add_file(sd_journal *j, const char *prefix, const char *filename) { return add_any_file(j, -1, path); } -static void remove_file(sd_journal *j, const char *prefix, const char *filename) { +static void remove_file_by_name( + sd_journal *j, + const char *prefix, + const char *filename) { + const char *path; JournalFile *f; @@ -1363,7 +1423,7 @@ static void remove_file_real(sd_journal *j, JournalFile *f) { assert(j); assert(f); - ordered_hashmap_remove(j->files, f->path); + (void) ordered_hashmap_remove(j->files, f->path); log_debug("File %s removed.", f->path); @@ -1407,10 +1467,102 @@ static int dirname_is_machine_id(const char *fn) { return sd_id128_equal(id, machine); } +static bool dirent_is_journal_file(const struct dirent *de) { + assert(de); + + if (!IN_SET(de->d_type, DT_REG, DT_LNK, DT_UNKNOWN)) + return false; + + return endswith(de->d_name, ".journal") || + endswith(de->d_name, ".journal~"); +} + +static bool dirent_is_id128_subdir(const struct dirent *de) { + assert(de); + + if (!IN_SET(de->d_type, DT_DIR, DT_LNK, DT_UNKNOWN)) + return false; + + return id128_is_valid(de->d_name); +} + +static int directory_open(sd_journal *j, const char *path, DIR **ret) { + DIR *d; + + assert(j); + assert(path); + assert(ret); + + if (j->toplevel_fd < 0) + d = opendir(path); + else + /* Open the specified directory relative to the toplevel fd. Enforce that the path specified is + * relative, by dropping the initial slash */ + d = xopendirat(j->toplevel_fd, skip_slash(path), 0); + if (!d) + return -errno; + + *ret = d; + return 0; +} + +static int add_directory(sd_journal *j, const char *prefix, const char *dirname); + +static void directory_enumerate(sd_journal *j, Directory *m, DIR *d) { + struct dirent *de; + + assert(j); + assert(m); + assert(d); + + FOREACH_DIRENT_ALL(de, d, goto fail) { + + if (dirent_is_journal_file(de)) + (void) add_file_by_name(j, m->path, de->d_name); + + if (m->is_root && dirent_is_id128_subdir(de)) + (void) add_directory(j, m->path, de->d_name); + } + + return; + +fail: + log_debug_errno(errno, "Failed to enumerate directory %s, ignoring: %m", m->path); +} + +static void directory_watch(sd_journal *j, Directory *m, int fd, uint32_t mask) { + int r; + + assert(j); + assert(m); + assert(fd >= 0); + + /* Watch this directory if that's enabled and if it not being watched yet. */ + + if (m->wd > 0) /* Already have a watch? */ + return; + if (j->inotify_fd < 0) /* Not watching at all? */ + return; + + m->wd = inotify_add_watch_fd(j->inotify_fd, fd, mask); + if (m->wd < 0) { + log_debug_errno(errno, "Failed to watch journal directory '%s', ignoring: %m", m->path); + return; + } + + r = hashmap_put(j->directories_by_wd, INT_TO_PTR(m->wd), m); + if (r == -EEXIST) + log_debug_errno(r, "Directory '%s' already being watched under a different path, ignoring: %m", m->path); + if (r < 0) { + log_debug_errno(r, "Failed to add watch for journal directory '%s' to hashmap, ignoring: %m", m->path); + (void) inotify_rm_watch(j->inotify_fd, m->wd); + m->wd = -1; + } +} + static int add_directory(sd_journal *j, const char *prefix, const char *dirname) { _cleanup_free_ char *path = NULL; _cleanup_closedir_ DIR *d = NULL; - struct dirent *de = NULL; Directory *m; int r, k; @@ -1429,22 +1581,16 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) goto fail; } - log_debug("Considering directory %s.", path); + log_debug("Considering directory '%s'.", path); /* We consider everything local that is in a directory for the local machine ID, or that is stored in /run */ if ((j->flags & SD_JOURNAL_LOCAL_ONLY) && !((dirname && dirname_is_machine_id(dirname) > 0) || path_has_prefix(j, path, "/run"))) - return 0; + return 0; - - if (j->toplevel_fd < 0) - d = opendir(path); - else - /* Open the specified directory relative to the toplevel fd. Enforce that the path specified is - * relative, by dropping the initial slash */ - d = xopendirat(j->toplevel_fd, skip_slash(path), 0); - if (!d) { - r = log_debug_errno(errno, "Failed to open directory %s: %m", path); + r = directory_open(j, path, &d); + if (r < 0) { + log_debug_errno(r, "Failed to open directory '%s': %m", path); goto fail; } @@ -1471,26 +1617,17 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) log_debug("Directory %s added.", m->path); } else if (m->is_root) - return 0; + return 0; /* Don't 'downgrade' from root directory */ - if (m->wd <= 0 && j->inotify_fd >= 0) { - /* Watch this directory, if it not being watched yet. */ + m->last_seen_generation = j->generation; - m->wd = inotify_add_watch_fd(j->inotify_fd, dirfd(d), - IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB|IN_DELETE| - IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_MOVED_FROM| - IN_ONLYDIR); + directory_watch(j, m, dirfd(d), + IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB|IN_DELETE| + IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT|IN_MOVED_FROM| + IN_ONLYDIR); - if (m->wd > 0 && hashmap_put(j->directories_by_wd, INT_TO_PTR(m->wd), m) < 0) - inotify_rm_watch(j->inotify_fd, m->wd); - } - - FOREACH_DIRENT_ALL(de, d, r = log_debug_errno(errno, "Failed to read directory %s: %m", m->path); goto fail) { - - if (dirent_is_file_with_suffix(de, ".journal") || - dirent_is_file_with_suffix(de, ".journal~")) - (void) add_file(j, m->path, de->d_name); - } + if (!j->no_new_files) + directory_enumerate(j, m, d); check_network(j, dirfd(d)); @@ -1507,7 +1644,6 @@ fail: static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) { _cleanup_closedir_ DIR *d = NULL; - struct dirent *de; Directory *m; int r, k; @@ -1520,6 +1656,8 @@ static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) { if (p) { /* If there's a path specified, use it. */ + log_debug("Considering root directory '%s'.", p); + if ((j->flags & SD_JOURNAL_RUNTIME_ONLY) && !path_has_prefix(j, p, "/run")) return -EINVAL; @@ -1527,16 +1665,11 @@ static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) { if (j->prefix) p = strjoina(j->prefix, p); - if (j->toplevel_fd < 0) - d = opendir(p); - else - d = xopendirat(j->toplevel_fd, skip_slash(p), 0); - - if (!d) { - if (errno == ENOENT && missing_ok) - return 0; - - r = log_debug_errno(errno, "Failed to open root directory %s: %m", p); + r = directory_open(j, p, &d); + if (r == -ENOENT && missing_ok) + return 0; + if (r < 0) { + log_debug_errno(r, "Failed to open root directory %s: %m", p); goto fail; } } else { @@ -1594,29 +1727,12 @@ static int add_root_directory(sd_journal *j, const char *p, bool missing_ok) { } else if (!m->is_root) return 0; - if (m->wd <= 0 && j->inotify_fd >= 0) { + directory_watch(j, m, dirfd(d), + IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB|IN_DELETE| + IN_ONLYDIR); - m->wd = inotify_add_watch_fd(j->inotify_fd, dirfd(d), - IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB|IN_DELETE| - IN_ONLYDIR); - - if (m->wd > 0 && hashmap_put(j->directories_by_wd, INT_TO_PTR(m->wd), m) < 0) - inotify_rm_watch(j->inotify_fd, m->wd); - } - - if (j->no_new_files) - return 0; - - FOREACH_DIRENT_ALL(de, d, r = log_debug_errno(errno, "Failed to read directory %s: %m", m->path); goto fail) { - sd_id128_t id; - - if (dirent_is_file_with_suffix(de, ".journal") || - dirent_is_file_with_suffix(de, ".journal~")) - (void) add_file(j, m->path, de->d_name); - else if (IN_SET(de->d_type, DT_DIR, DT_LNK, DT_UNKNOWN) && - sd_id128_from_string(de->d_name, &id) >= 0) - (void) add_directory(j, m->path, de->d_name); - } + if (!j->no_new_files) + directory_enumerate(j, m, d); check_network(j, dirfd(d)); @@ -1736,10 +1852,14 @@ static sd_journal *journal_new(int flags, const char *path) { j->path = t; } - j->files = ordered_hashmap_new(&string_hash_ops); - j->directories_by_path = hashmap_new(&string_hash_ops); + j->files = ordered_hashmap_new(&path_hash_ops); + if (!j->files) + goto fail; + + j->files_cache = ordered_hashmap_iterated_cache_new(j->files); + j->directories_by_path = hashmap_new(&path_hash_ops); j->mmap = mmap_cache_new(); - if (!j->files || !j->directories_by_path || !j->mmap) + if (!j->files_cache || !j->directories_by_path || !j->mmap) goto fail; return j; @@ -1950,10 +2070,9 @@ _public_ int sd_journal_open_files_fd(sd_journal **ret, int fds[], unsigned n_fd goto fail; } - if (!S_ISREG(st.st_mode)) { - r = -EBADFD; + r = stat_verify_regular(&st); + if (r < 0) goto fail; - } r = add_any_file(j, fds[i], NULL); if (r < 0) @@ -1985,6 +2104,7 @@ _public_ void sd_journal_close(sd_journal *j) { sd_journal_flush_matches(j); ordered_hashmap_free_with_destructor(j->files, journal_file_close); + iterated_cache_free(j->files_cache); while ((d = hashmap_first(j->directories_by_path))) remove_directory(j, d); @@ -2286,6 +2406,24 @@ _public_ void sd_journal_restart_data(sd_journal *j) { j->current_field = 0; } +static int reiterate_all_paths(sd_journal *j) { + assert(j); + + if (j->no_new_files) + return add_current_paths(j); + + if (j->flags & SD_JOURNAL_OS_ROOT) + return add_search_paths(j); + + if (j->toplevel_fd >= 0) + return add_root_directory(j, NULL, false); + + if (j->path) + return add_root_directory(j, j->path, true); + + return add_search_paths(j); +} + _public_ int sd_journal_get_fd(sd_journal *j) { int r; @@ -2302,20 +2440,10 @@ _public_ int sd_journal_get_fd(sd_journal *j) { if (r < 0) return r; - log_debug("Reiterating files to get inotify watches established"); + log_debug("Reiterating files to get inotify watches established."); - /* Iterate through all dirs again, to add them to the - * inotify */ - if (j->no_new_files) - r = add_current_paths(j); - else if (j->flags & SD_JOURNAL_OS_ROOT) - r = add_search_paths(j); - else if (j->toplevel_fd >= 0) - r = add_root_directory(j, NULL, false); - else if (j->path) - r = add_root_directory(j, j->path, true); - else - r = add_search_paths(j); + /* Iterate through all dirs again, to add them to the inotify */ + r = reiterate_all_paths(j); if (r < 0) return r; @@ -2358,17 +2486,61 @@ _public_ int sd_journal_get_timeout(sd_journal *j, uint64_t *timeout_usec) { return 1; } +static void process_q_overflow(sd_journal *j) { + JournalFile *f; + Directory *m; + Iterator i; + + assert(j); + + /* When the inotify queue overruns we need to enumerate and re-validate all journal files to bring our list + * back in sync with what's on disk. For this we pick a new generation counter value. It'll be assigned to all + * journal files we encounter. All journal files and all directories that don't carry it after reenumeration + * are subject for unloading. */ + + log_debug("Inotify queue overrun, reiterating everything."); + + j->generation++; + (void) reiterate_all_paths(j); + + ORDERED_HASHMAP_FOREACH(f, j->files, i) { + + if (f->last_seen_generation == j->generation) + continue; + + log_debug("File '%s' hasn't been seen in this enumeration, removing.", f->path); + remove_file_real(j, f); + } + + HASHMAP_FOREACH(m, j->directories_by_path, i) { + + if (m->last_seen_generation == j->generation) + continue; + + if (m->is_root) /* Never GC root directories */ + continue; + + log_debug("Directory '%s' hasn't been seen in this enumeration, removing.", f->path); + remove_directory(j, m); + } + + log_debug("Reiteration complete."); +} + static void process_inotify_event(sd_journal *j, struct inotify_event *e) { Directory *d; assert(j); assert(e); + if (e->mask & IN_Q_OVERFLOW) { + process_q_overflow(j); + return; + } + /* Is this a subdirectory we watch? */ d = hashmap_get(j->directories_by_wd, INT_TO_PTR(e->wd)); if (d) { - sd_id128_t id; - if (!(e->mask & IN_ISDIR) && e->len > 0 && (endswith(e->name, ".journal") || endswith(e->name, ".journal~"))) { @@ -2376,9 +2548,9 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) { /* Event for a journal file */ if (e->mask & (IN_CREATE|IN_MOVED_TO|IN_MODIFY|IN_ATTRIB)) - (void) add_file(j, d->path, e->name); + (void) add_file_by_name(j, d->path, e->name); else if (e->mask & (IN_DELETE|IN_MOVED_FROM|IN_UNMOUNT)) - remove_file(j, d->path, e->name); + remove_file_by_name(j, d->path, e->name); } else if (!d->is_root && e->len == 0) { @@ -2387,7 +2559,7 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) { if (e->mask & (IN_DELETE_SELF|IN_MOVE_SELF|IN_UNMOUNT)) remove_directory(j, d); - } else if (d->is_root && (e->mask & IN_ISDIR) && e->len > 0 && sd_id128_from_string(e->name, &id) >= 0) { + } else if (d->is_root && (e->mask & IN_ISDIR) && e->len > 0 && id128_is_valid(e->name)) { /* Event for root directory */ @@ -2401,7 +2573,7 @@ static void process_inotify_event(sd_journal *j, struct inotify_event *e) { if (e->mask & IN_IGNORED) return; - log_debug("Unknown inotify event."); + log_debug("Unexpected inotify event."); } static int determine_change(sd_journal *j) { @@ -2421,6 +2593,9 @@ _public_ int sd_journal_process(sd_journal *j) { assert_return(j, -EINVAL); assert_return(!journal_pid_changed(j), -ECHILD); + if (j->inotify_fd < 0) /* We have no inotify fd yet? Then there's noting to process. */ + return 0; + j->last_process_usec = now(CLOCK_MONOTONIC); j->last_invalidate_counter = j->current_invalidate_counter; diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install index 305ea8f5c..a271cdb8a 100644 --- a/src/kernel-install/90-loaderentry.install +++ b/src/kernel-install/90-loaderentry.install @@ -11,6 +11,10 @@ if ! [[ $KERNEL_INSTALL_MACHINE_ID ]]; then exit 0 fi +if ! [[ -d "$BOOT_DIR_ABS" ]]; then + exit 0 +fi + MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID BOOT_DIR="/$MACHINE_ID/$KERNEL_VERSION" diff --git a/src/libsystemd-network/arp-util.c b/src/libsystemd-network/arp-util.c index 89e68c7ac..b8e9b2e49 100644 --- a/src/libsystemd-network/arp-util.c +++ b/src/libsystemd-network/arp-util.c @@ -49,12 +49,12 @@ int arp_network_bind_raw_socket(int ifindex, be32_t address, const struct ether_ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, ARPOP_REPLY, 1, 0), /* protocol == reply ? */ BPF_STMT(BPF_RET + BPF_K, 0), /* ignore */ /* Sender Hardware Address must be different from our own */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_ne32(ð_mac->ether_addr_octet[0])),/* A <- 4 bytes of client's MAC */ + BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be32(ð_mac->ether_addr_octet[0])),/* A <- 4 bytes of client's MAC */ BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ BPF_STMT(BPF_LD + BPF_W + BPF_ABS, offsetof(struct ether_arp, arp_sha)), /* A <- 4 bytes of SHA */ BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, 0, 0, 6), /* A == 0 ? */ - BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_ne16(ð_mac->ether_addr_octet[4])),/* A <- remainder of client's MAC */ + BPF_STMT(BPF_LD + BPF_IMM, unaligned_read_be16(ð_mac->ether_addr_octet[4])),/* A <- remainder of client's MAC */ BPF_STMT(BPF_MISC + BPF_TAX, 0), /* X <- A */ BPF_STMT(BPF_LD + BPF_H + BPF_ABS, offsetof(struct ether_arp, arp_sha) + 4), /* A <- remainder of SHA */ BPF_STMT(BPF_ALU + BPF_XOR + BPF_X, 0), /* A xor X */ diff --git a/src/libsystemd-network/network-internal.c b/src/libsystemd-network/network-internal.c index 94386e486..584a1f36a 100644 --- a/src/libsystemd-network/network-internal.c +++ b/src/libsystemd-network/network-internal.c @@ -424,7 +424,7 @@ int deserialize_in_addrs(struct in_addr **ret, const char *string) { if (r == 0) break; - new_addresses = realloc(addresses, (size + 1) * sizeof(struct in_addr)); + new_addresses = reallocarray(addresses, size + 1, sizeof(struct in_addr)); if (!new_addresses) return -ENOMEM; else @@ -478,7 +478,7 @@ int deserialize_in6_addrs(struct in6_addr **ret, const char *string) { if (r == 0) break; - new_addresses = realloc(addresses, (size + 1) * sizeof(struct in6_addr)); + new_addresses = reallocarray(addresses, size + 1, sizeof(struct in6_addr)); if (!new_addresses) return -ENOMEM; else diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 228af69d8..33f3469f0 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -1260,9 +1260,9 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer, size_ if (!lease->have_subnet_mask) { r = dhcp_lease_set_default_subnet_mask(lease); if (r < 0) { - log_dhcp_client(client, "received lease lacks subnet " - "mask, and a fallback one can not be " - "generated, ignoring"); + log_dhcp_client(client, + "received lease lacks subnet mask, " + "and a fallback one cannot be generated, ignoring"); return -ENOMSG; } } @@ -1331,9 +1331,9 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack, size_t le if (lease->subnet_mask == INADDR_ANY) { r = dhcp_lease_set_default_subnet_mask(lease); if (r < 0) { - log_dhcp_client(client, "received lease lacks subnet " - "mask, and a fallback one can not be " - "generated, ignoring"); + log_dhcp_client(client, + "received lease lacks subnet mask, " + "and a fallback one cannot be generated, ignoring"); return -ENOMSG; } } diff --git a/src/libsystemd-network/sd-dhcp-server.c b/src/libsystemd-network/sd-dhcp-server.c index 907b72391..d64a47d2f 100644 --- a/src/libsystemd-network/sd-dhcp-server.c +++ b/src/libsystemd-network/sd-dhcp-server.c @@ -316,7 +316,7 @@ static int dhcp_server_send_udp(sd_dhcp_server *server, be32_t destination, int r; assert(server); - assert(server->fd > 0); + assert(server->fd >= 0); assert(message); assert(len > sizeof(DHCPMessage)); diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index ec3484383..056bfa3d3 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -771,8 +771,6 @@ static int client_parse_message( size_t pos = 0; int r; bool clientid = false; - uint8_t *id = NULL; - size_t id_len; uint32_t lt_t1 = ~0, lt_t2 = ~0; assert(client); @@ -817,8 +815,8 @@ static int client_parse_message( break; case SD_DHCP6_OPTION_SERVERID: - r = dhcp6_lease_get_serverid(lease, &id, &id_len); - if (r >= 0 && id) { + r = dhcp6_lease_get_serverid(lease, NULL, NULL); + if (r >= 0) { log_dhcp6_client(client, "%s contains multiple serverids", dhcp6_message_type_to_string(message->type)); return -EINVAL; @@ -956,24 +954,26 @@ static int client_parse_message( } if (client->state != DHCP6_STATE_INFORMATION_REQUEST) { - r = dhcp6_lease_get_serverid(lease, &id, &id_len); - if (r < 0) + r = dhcp6_lease_get_serverid(lease, NULL, NULL); + if (r < 0) { log_dhcp6_client(client, "%s has no server id", dhcp6_message_type_to_string(message->type)); - return r; + return -EINVAL; + } + + } else { + if (lease->ia.addresses) { + lease->ia.ia_na.lifetime_t1 = htobe32(lt_t1); + lease->ia.ia_na.lifetime_t2 = htobe32(lt_t2); + } + + if (lease->pd.addresses) { + lease->pd.ia_pd.lifetime_t1 = htobe32(lt_t1); + lease->pd.ia_pd.lifetime_t2 = htobe32(lt_t2); + } } - if (lease->ia.addresses) { - lease->ia.ia_na.lifetime_t1 = htobe32(lt_t1); - lease->ia.ia_na.lifetime_t2 = htobe32(lt_t2); - } - - if (lease->pd.addresses) { - lease->pd.ia_pd.lifetime_t1 = htobe32(lt_t1); - lease->pd.ia_pd.lifetime_t2 = htobe32(lt_t2); - } - - return r; + return 0; } static int client_receive_reply(sd_dhcp6_client *client, DHCP6Message *reply, size_t len) { diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c index 1f3a782f8..0089fbb73 100644 --- a/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libsystemd-network/sd-dhcp6-lease.c @@ -95,11 +95,14 @@ int dhcp6_lease_set_serverid(sd_dhcp6_lease *lease, const uint8_t *id, int dhcp6_lease_get_serverid(sd_dhcp6_lease *lease, uint8_t **id, size_t *len) { assert_return(lease, -EINVAL); - assert_return(id, -EINVAL); - assert_return(len, -EINVAL); - *id = lease->serverid; - *len = lease->serverid_len; + if (!lease->serverid) + return -ENOMSG; + + if (id) + *id = lease->serverid; + if (len) + *len = lease->serverid_len; return 0; } diff --git a/src/libsystemd-network/test-lldp.c b/src/libsystemd-network/test-lldp.c index b91797cb6..5f6829cf6 100644 --- a/src/libsystemd-network/test-lldp.c +++ b/src/libsystemd-network/test-lldp.c @@ -139,7 +139,7 @@ static void test_receive_basic_packet(sd_event *e) { assert_se(sd_lldp_neighbor_get_port_id(neighbors[0], &type, &data, &length) == 0); assert_se(type == SD_LLDP_PORT_SUBTYPE_INTERFACE_NAME); assert_se(length == 3); - assert_se(strneq((char *) data, "1/3", 3)); + assert_se(!memcmp(data, "1/3", 3)); assert_se(sd_lldp_neighbor_get_port_description(neighbors[0], &str) == 0); assert_se(streq(str, "Port")); diff --git a/src/libsystemd/libsystemd.sym b/src/libsystemd/libsystemd.sym index 00aeefbe1..7ff581618 100644 --- a/src/libsystemd/libsystemd.sym +++ b/src/libsystemd/libsystemd.sym @@ -549,3 +549,9 @@ global: sd_event_source_get_io_fd_own; sd_event_source_set_io_fd_own; } LIBSYSTEMD_236; + +LIBSYSTEMD_238 { +global: + sd_bus_get_n_queued_read; + sd_bus_get_n_queued_write; +} LIBSYSTEMD_237; diff --git a/src/libsystemd/meson.build b/src/libsystemd/meson.build index 706e09076..bd72e3d69 100644 --- a/src/libsystemd/meson.build +++ b/src/libsystemd/meson.build @@ -15,6 +15,14 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . +id128_sources = files(''' + sd-id128/id128-util.c + sd-id128/id128-util.h + sd-id128/sd-id128.c +'''.split()) + +sd_daemon_c = files('sd-daemon/sd-daemon.c') +sd_event_c = files('sd-event/sd-event.c') sd_login_c = files('sd-login/sd-login.c') libsystemd_sources = files(''' @@ -57,7 +65,6 @@ libsystemd_sources = files(''' sd-bus/bus-type.c sd-bus/bus-type.h sd-bus/sd-bus.c - sd-daemon/sd-daemon.c sd-device/device-enumerator-private.h sd-device/device-enumerator.c sd-device/device-internal.h @@ -65,13 +72,9 @@ libsystemd_sources = files(''' sd-device/device-private.h sd-device/device-util.h sd-device/sd-device.c - sd-event/sd-event.c sd-hwdb/hwdb-internal.h sd-hwdb/hwdb-util.h sd-hwdb/sd-hwdb.c - sd-id128/id128-util.c - sd-id128/id128-util.h - sd-id128/sd-id128.c sd-netlink/generic-netlink.c sd-netlink/local-addresses.c sd-netlink/local-addresses.h @@ -90,7 +93,7 @@ libsystemd_sources = files(''' sd-path/sd-path.c sd-resolve/sd-resolve.c sd-utf8/sd-utf8.c -'''.split()) + sd_login_c +'''.split()) + id128_sources + sd_daemon_c + sd_event_c + sd_login_c libsystemd_static = static_library( 'systemd', diff --git a/src/libsystemd/sd-bus/bus-container.c b/src/libsystemd/sd-bus/bus-container.c index 16156d882..477f7053e 100644 --- a/src/libsystemd/sd-bus/bus-container.c +++ b/src/libsystemd/sd-bus/bus-container.c @@ -54,6 +54,8 @@ int bus_container_connect_socket(sd_bus *b) { if (b->input_fd < 0) return -errno; + b->input_fd = fd_move_above_stdio(b->input_fd); + b->output_fd = b->input_fd; bus_socket_setup(b); diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index c9517499d..3939d0a4e 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -595,7 +595,7 @@ _public_ int sd_bus_error_add_map(const sd_bus_error_map *map) { if (additional_error_maps[n] == map) return 0; - maps = realloc_multiply(additional_error_maps, sizeof(struct sd_bus_error_map*), n + 2); + maps = reallocarray(additional_error_maps, n + 2, sizeof(struct sd_bus_error_map*)); if (!maps) return -ENOMEM; diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h index 1b55cdafe..b305c4162 100644 --- a/src/libsystemd/sd-bus/bus-internal.h +++ b/src/libsystemd/sd-bus/bus-internal.h @@ -296,6 +296,7 @@ struct sd_bus { unsigned n_memfd_cache; pid_t original_pid; + pid_t busexec_pid; sd_event_source *input_io_event_source; sd_event_source *output_io_event_source; diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 95a87da08..c76f6e87b 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -1400,7 +1400,7 @@ static int message_push_fd(sd_bus_message *m, int fd) { if (copy < 0) return -errno; - f = realloc(m->fds, sizeof(int) * (m->n_fds + 1)); + f = reallocarray(m->fds, sizeof(int), m->n_fds + 1); if (!f) { m->poisoned = true; safe_close(copy); @@ -2646,7 +2646,7 @@ _public_ int sd_bus_message_append_array_memfd( if (r < 0) return r; - copy_fd = dup(memfd); + copy_fd = fcntl(memfd, F_DUPFD_CLOEXEC, 3); if (copy_fd < 0) return copy_fd; @@ -2721,7 +2721,7 @@ _public_ int sd_bus_message_append_string_memfd( if (r < 0) return r; - copy_fd = dup(memfd); + copy_fd = fcntl(memfd, FD_CLOEXEC, 3); if (copy_fd < 0) return copy_fd; diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c index 2fe86b61c..b5160cff6 100644 --- a/src/libsystemd/sd-bus/bus-socket.c +++ b/src/libsystemd/sd-bus/bus-socket.c @@ -713,6 +713,8 @@ static int bus_socket_inotify_setup(sd_bus *b) { b->inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); if (b->inotify_fd < 0) return -errno; + + b->inotify_fd = fd_move_above_stdio(b->inotify_fd); } /* Make sure the path is NUL terminated */ @@ -879,6 +881,8 @@ int bus_socket_connect(sd_bus *b) { if (b->input_fd < 0) return -errno; + b->input_fd = fd_move_above_stdio(b->input_fd); + b->output_fd = b->input_fd; bus_socket_setup(b); @@ -937,18 +941,18 @@ int bus_socket_connect(sd_bus *b) { int bus_socket_exec(sd_bus *b) { int s[2], r; - pid_t pid; assert(b); assert(b->input_fd < 0); assert(b->output_fd < 0); assert(b->exec_path); + assert(b->busexec_pid == 0); r = socketpair(AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, s); if (r < 0) return -errno; - r = safe_fork_full("(sd-busexec)", s+1, 1, FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS, &pid); + r = safe_fork_full("(sd-busexec)", s+1, 1, FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS, &b->busexec_pid); if (r < 0) { safe_close_pair(s); return r; @@ -956,14 +960,11 @@ int bus_socket_exec(sd_bus *b) { if (r == 0) { /* Child */ - assert_se(dup3(s[1], STDIN_FILENO, 0) == STDIN_FILENO); - assert_se(dup3(s[1], STDOUT_FILENO, 0) == STDOUT_FILENO); + safe_close(s[0]); - if (!IN_SET(s[1], STDIN_FILENO, STDOUT_FILENO)) - safe_close(s[1]); + if (rearrange_stdio(s[1], s[1], STDERR_FILENO) < 0) + _exit(EXIT_FAILURE); - (void) fd_cloexec(STDIN_FILENO, false); - (void) fd_cloexec(STDOUT_FILENO, false); (void) fd_nonblock(STDIN_FILENO, false); (void) fd_nonblock(STDOUT_FILENO, false); @@ -978,7 +979,7 @@ int bus_socket_exec(sd_bus *b) { } safe_close(s[1]); - b->output_fd = b->input_fd = s[0]; + b->output_fd = b->input_fd = fd_move_above_stdio(s[0]); bus_socket_setup(b); @@ -1206,7 +1207,7 @@ int bus_socket_read_message(sd_bus *bus) { CMSG_FOREACH(cmsg, &mh) if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { - int n, *f; + int n, *f, i; n = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int); @@ -1219,15 +1220,15 @@ int bus_socket_read_message(sd_bus *bus) { return -EIO; } - f = realloc(bus->fds, sizeof(int) * (bus->n_fds + n)); + f = reallocarray(bus->fds, bus->n_fds + n, sizeof(int)); if (!f) { close_many((int*) CMSG_DATA(cmsg), n); return -ENOMEM; } - memcpy_safe(f + bus->n_fds, CMSG_DATA(cmsg), n * sizeof(int)); + for (i = 0; i < n; i++) + f[bus->n_fds++] = fd_move_above_stdio(((int*) CMSG_DATA(cmsg))[i]); bus->fds = f; - bus->n_fds += n; } else log_debug("Got unexpected auxiliary data with level=%d and type=%d", cmsg->cmsg_level, cmsg->cmsg_type); diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index 7e7ebb27a..2f5e483ae 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -22,8 +22,10 @@ #include #include #include +#include #include #include +#include #include #include "sd-bus.h" @@ -286,8 +288,7 @@ _public_ int sd_bus_set_address(sd_bus *bus, const char *address) { if (!a) return -ENOMEM; - free(bus->address); - bus->address = a; + free_and_replace(bus->address, a); return 0; } @@ -325,10 +326,9 @@ _public_ int sd_bus_set_exec(sd_bus *bus, const char *path, char *const argv[]) return -ENOMEM; } - free(bus->exec_path); - strv_free(bus->exec_argv); + free_and_replace(bus->exec_path, p); - bus->exec_path = p; + strv_free(bus->exec_argv); bus->exec_argv = a; return 0; @@ -351,7 +351,7 @@ _public_ int sd_bus_set_monitor(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->is_monitor = b; + bus->is_monitor = !!b; return 0; } @@ -361,7 +361,7 @@ _public_ int sd_bus_negotiate_fds(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->accept_fd = b; + bus->accept_fd = !!b; return 0; } @@ -373,7 +373,7 @@ _public_ int sd_bus_negotiate_timestamp(sd_bus *bus, int b) { /* This is not actually supported by any of our transports these days, but we do honour it for synthetic * replies, and maybe one day classic D-Bus learns this too */ - bus->attach_timestamp = b; + bus->attach_timestamp = !!b; return 0; } @@ -457,7 +457,7 @@ _public_ int sd_bus_set_watch_bind(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->watch_bind = b; + bus->watch_bind = !!b; return 0; } @@ -475,7 +475,7 @@ _public_ int sd_bus_set_connected_signal(sd_bus *bus, int b) { assert_return(bus->state == BUS_UNSET, -EPERM); assert_return(!bus_pid_changed(bus), -ECHILD); - bus->connected_signal = b; + bus->connected_signal = !!b; return 0; } @@ -556,6 +556,7 @@ void bus_set_state(sd_bus *bus, enum bus_state state) { static int hello_callback(sd_bus_message *reply, void *userdata, sd_bus_error *error) { const char *s; + char *t; sd_bus *bus; int r; @@ -575,10 +576,12 @@ static int hello_callback(sd_bus_message *reply, void *userdata, sd_bus_error *e if (!service_name_is_valid(s) || s[0] != ':') return -EBADMSG; - bus->unique_name = strdup(s); - if (!bus->unique_name) + t = strdup(s); + if (!t) return -ENOMEM; + free_and_replace(bus->unique_name, t); + if (bus->state == BUS_HELLO) { bus_set_state(bus, BUS_RUNNING); @@ -649,8 +652,8 @@ int bus_start_running(sd_bus *bus) { static int parse_address_key(const char **p, const char *key, char **value) { size_t l, n = 0, allocated = 0; + _cleanup_free_ char *r = NULL; const char *a; - char *r = NULL; assert(p); assert(*p); @@ -678,16 +681,12 @@ static int parse_address_key(const char **p, const char *key, char **value) { int x, y; x = unhexchar(a[1]); - if (x < 0) { - free(r); + if (x < 0) return x; - } y = unhexchar(a[2]); - if (y < 0) { - free(r); + if (y < 0) return y; - } c = (char) ((x << 4) | y); a += 3; @@ -714,8 +713,7 @@ static int parse_address_key(const char **p, const char *key, char **value) { *p = a; - free(*value); - *value = r; + free_and_replace(*value, r); return 1; } @@ -1099,6 +1097,13 @@ static int bus_parse_next_address(sd_bus *b) { return 1; } +static void bus_kill_exec(sd_bus *bus) { + if (pid_is_valid(bus->busexec_pid) > 0) { + sigterm_wait(bus->busexec_pid); + bus->busexec_pid = 0; + } +} + static int bus_start_address(sd_bus *b) { int r; @@ -1108,6 +1113,8 @@ static int bus_start_address(sd_bus *b) { bus_close_io_fds(b); bus_close_inotify_fd(b); + bus_kill_exec(b); + /* If you provide multiple different bus-addresses, we * try all of them in order and use the first one that * succeeds. */ @@ -1377,7 +1384,7 @@ fail: int bus_set_address_system_remote(sd_bus *b, const char *host) { _cleanup_free_ char *e = NULL; - char *m = NULL, *c = NULL; + char *m = NULL, *c = NULL, *a; assert(b); assert(host); @@ -1408,10 +1415,12 @@ int bus_set_address_system_remote(sd_bus *b, const char *host) { return -ENOMEM; } - b->address = strjoin("unixexec:path=ssh,argv1=-xT,argv2=--,argv3=", e, ",argv4=systemd-stdio-bridge", c); - if (!b->address) + a = strjoin("unixexec:path=ssh,argv1=-xT,argv2=--,argv3=", e, ",argv4=systemd-stdio-bridge", c); + if (!a) return -ENOMEM; + free_and_replace(b->address, a); + return 0; } @@ -1449,6 +1458,7 @@ fail: int bus_set_address_system_machine(sd_bus *b, const char *machine) { _cleanup_free_ char *e = NULL; + char *a; assert(b); assert(machine); @@ -1457,10 +1467,12 @@ int bus_set_address_system_machine(sd_bus *b, const char *machine) { if (!e) return -ENOMEM; - b->address = strjoin("x-machine-unix:machine=", e); - if (!b->address) + a = strjoin("x-machine-unix:machine=", e); + if (!a) return -ENOMEM; + free_and_replace(b->address, a); + return 0; } @@ -1506,6 +1518,9 @@ _public_ void sd_bus_close(sd_bus *bus) { if (bus_pid_changed(bus)) return; + /* Don't leave ssh hanging around */ + bus_kill_exec(bus); + bus_set_state(bus, BUS_CLOSED); sd_bus_detach_event(bus); @@ -1523,6 +1538,9 @@ _public_ sd_bus* sd_bus_flush_close_unref(sd_bus *bus) { if (!bus) return NULL; + /* Have to do this before flush() to prevent hang */ + bus_kill_exec(bus); + sd_bus_flush(bus); sd_bus_close(bus); @@ -3902,7 +3920,15 @@ _public_ int sd_bus_get_description(sd_bus *bus, const char **description) { assert_return(bus->description, -ENXIO); assert_return(!bus_pid_changed(bus), -ECHILD); - *description = bus->description; + if (bus->description) + *description = bus->description; + else if (bus->is_system) + *description = "system"; + else if (bus->is_user) + *description = "user"; + else + *description = NULL; + return 0; } @@ -4065,3 +4091,23 @@ _public_ int sd_bus_get_sender(sd_bus *bus, const char **ret) { *ret = bus->patch_sender; return 0; } + +_public_ int sd_bus_get_n_queued_read(sd_bus *bus, uint64_t *ret) { + assert_return(bus, -EINVAL); + assert_return(bus = bus_resolve(bus), -ENOPKG); + assert_return(!bus_pid_changed(bus), -ECHILD); + assert_return(ret, -EINVAL); + + *ret = bus->rqueue_size; + return 0; +} + +_public_ int sd_bus_get_n_queued_write(sd_bus *bus, uint64_t *ret) { + assert_return(bus, -EINVAL); + assert_return(bus = bus_resolve(bus), -ENOPKG); + assert_return(!bus_pid_changed(bus), -ECHILD); + assert_return(ret, -EINVAL); + + *ret = bus->wqueue_size; + return 0; +} diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index cb9b3a454..7355921d3 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -457,6 +457,8 @@ _public_ int sd_event_new(sd_event** ret) { goto fail; } + e->epoll_fd = fd_move_above_stdio(e->epoll_fd); + if (secure_getenv("SD_EVENT_PROFILE_DELAYS")) { log_debug("Event loop profiling enabled. Logarithmic histogram of event loop iterations in the range 2^0 ... 2^63 us will be logged every 5s."); e->profile_delays = true; @@ -695,7 +697,7 @@ static int event_make_signal_data( return 0; } - d->fd = r; + d->fd = fd_move_above_stdio(r); ev.events = EPOLLIN; ev.data.ptr = d; @@ -1045,6 +1047,8 @@ static int event_setup_timer_fd( if (fd < 0) return -errno; + fd = fd_move_above_stdio(fd); + ev.events = EPOLLIN; ev.data.ptr = d; diff --git a/src/libsystemd/sd-id128/id128-util.c b/src/libsystemd/sd-id128/id128-util.c index a6e38578b..8ce012e35 100644 --- a/src/libsystemd/sd-id128/id128-util.c +++ b/src/libsystemd/sd-id128/id128-util.c @@ -23,6 +23,7 @@ #include #include "fd-util.h" +#include "fs-util.h" #include "hexdecoct.h" #include "id128-util.h" #include "io-util.h" @@ -180,9 +181,13 @@ int id128_write_fd(int fd, Id128Format f, sd_id128_t id, bool do_sync) { if (do_sync) { if (fsync(fd) < 0) return -errno; + + r = fsync_directory_of_file(fd); + if (r < 0) + return r; } - return r; + return 0; } int id128_write(const char *p, Id128Format f, sd_id128_t id, bool do_sync) { diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c index 69572d1a5..6601bcd6b 100644 --- a/src/libsystemd/sd-login/sd-login.c +++ b/src/libsystemd/sd-login/sd-login.c @@ -990,8 +990,9 @@ static inline sd_login_monitor* FD_TO_MONITOR(int fd) { } _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) { - int fd, k; + _cleanup_close_ int fd = -1; bool good = false; + int k; assert_return(m, -EINVAL); @@ -1001,50 +1002,42 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) { if (!category || streq(category, "seat")) { k = inotify_add_watch(fd, "/run/systemd/seats/", IN_MOVED_TO|IN_DELETE); - if (k < 0) { - safe_close(fd); + if (k < 0) return -errno; - } good = true; } if (!category || streq(category, "session")) { k = inotify_add_watch(fd, "/run/systemd/sessions/", IN_MOVED_TO|IN_DELETE); - if (k < 0) { - safe_close(fd); + if (k < 0) return -errno; - } good = true; } if (!category || streq(category, "uid")) { k = inotify_add_watch(fd, "/run/systemd/users/", IN_MOVED_TO|IN_DELETE); - if (k < 0) { - safe_close(fd); + if (k < 0) return -errno; - } good = true; } if (!category || streq(category, "machine")) { k = inotify_add_watch(fd, "/run/systemd/machines/", IN_MOVED_TO|IN_DELETE); - if (k < 0) { - safe_close(fd); + if (k < 0) return -errno; - } good = true; } - if (!good) { - close_nointr(fd); + if (!good) return -EINVAL; - } *m = FD_TO_MONITOR(fd); + fd = -1; + return 0; } diff --git a/src/libsystemd/sd-netlink/netlink-socket.c b/src/libsystemd/sd-netlink/netlink-socket.c index e08248c9f..3474ad9dd 100644 --- a/src/libsystemd/sd-netlink/netlink-socket.c +++ b/src/libsystemd/sd-netlink/netlink-socket.c @@ -25,6 +25,7 @@ #include "sd-netlink.h" #include "alloc-util.h" +#include "fd-util.h" #include "format-util.h" #include "missing.h" #include "netlink-internal.h" @@ -41,7 +42,7 @@ int socket_open(int family) { if (fd < 0) return -errno; - return fd; + return fd_move_above_stdio(fd); } static int broadcast_groups_get(sd_netlink *nl) { diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c index cd76e3507..419c76366 100644 --- a/src/libsystemd/sd-path/sd-path.c +++ b/src/libsystemd/sd-path/sd-path.c @@ -478,6 +478,12 @@ static int search_from_environment( return 0; } +#if HAVE_SPLIT_BIN +# define ARRAY_SBIN_BIN(x) x "sbin", x "bin" +#else +# define ARRAY_SBIN_BIN(x) x "bin" +#endif + static int get_search(uint64_t type, char ***list) { assert(list); @@ -490,13 +496,10 @@ static int get_search(uint64_t type, char ***list) { ".local/bin", "PATH", true, - "/usr/local/sbin", - "/usr/local/bin", - "/usr/sbin", - "/usr/bin", + ARRAY_SBIN_BIN("/usr/local/"), + ARRAY_SBIN_BIN("/usr/"), #if HAVE_SPLIT_USR - "/sbin", - "/bin", + ARRAY_SBIN_BIN("/"), #endif NULL); diff --git a/src/libsystemd/sd-resolve/sd-resolve.c b/src/libsystemd/sd-resolve/sd-resolve.c index 787642a7f..1c68a96fe 100644 --- a/src/libsystemd/sd-resolve/sd-resolve.c +++ b/src/libsystemd/sd-resolve/sd-resolve.c @@ -507,12 +507,15 @@ _public_ int sd_resolve_new(sd_resolve **ret) { goto fail; } - fd_inc_sndbuf(resolve->fds[REQUEST_SEND_FD], QUERIES_MAX * BUFSIZE); - fd_inc_rcvbuf(resolve->fds[REQUEST_RECV_FD], QUERIES_MAX * BUFSIZE); - fd_inc_sndbuf(resolve->fds[RESPONSE_SEND_FD], QUERIES_MAX * BUFSIZE); - fd_inc_rcvbuf(resolve->fds[RESPONSE_RECV_FD], QUERIES_MAX * BUFSIZE); + for (i = 0; i < _FD_MAX; i++) + resolve->fds[i] = fd_move_above_stdio(resolve->fds[i]); - fd_nonblock(resolve->fds[RESPONSE_RECV_FD], true); + (void) fd_inc_sndbuf(resolve->fds[REQUEST_SEND_FD], QUERIES_MAX * BUFSIZE); + (void) fd_inc_rcvbuf(resolve->fds[REQUEST_RECV_FD], QUERIES_MAX * BUFSIZE); + (void) fd_inc_sndbuf(resolve->fds[RESPONSE_SEND_FD], QUERIES_MAX * BUFSIZE); + (void) fd_inc_rcvbuf(resolve->fds[RESPONSE_RECV_FD], QUERIES_MAX * BUFSIZE); + + (void) fd_nonblock(resolve->fds[RESPONSE_RECV_FD], true); *ret = resolve; return 0; diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c index 82df42649..8e65cfd40 100644 --- a/src/libudev/libudev-device.c +++ b/src/libudev/libudev-device.c @@ -143,7 +143,7 @@ _public_ const char *udev_device_get_driver(struct udev_device *udev_device) * * Retrieve the devtype string of the udev device. * - * Returns: the devtype name of the udev device, or #NULL if it can not be determined + * Returns: the devtype name of the udev device, or #NULL if it cannot be determined **/ _public_ const char *udev_device_get_devtype(struct udev_device *udev_device) { @@ -168,7 +168,7 @@ _public_ const char *udev_device_get_devtype(struct udev_device *udev_device) * Retrieve the subsystem string of the udev device. The string does not * contain any "/". * - * Returns: the subsystem name of the udev device, or #NULL if it can not be determined + * Returns: the subsystem name of the udev device, or #NULL if it cannot be determined **/ _public_ const char *udev_device_get_subsystem(struct udev_device *udev_device) { diff --git a/src/libudev/libudev-list.c b/src/libudev/libudev-list.c index 29fbdbd45..681e2e445 100644 --- a/src/libudev/libudev-list.c +++ b/src/libudev/libudev-list.c @@ -140,8 +140,7 @@ static int list_search(struct udev_list *list, const char *name) return -(first+1); } -struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char *name, const char *value) -{ +struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char *name, const char *value) { struct udev_list_entry *entry; int i = 0; @@ -152,12 +151,12 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char * entry = list->entries[i]; free(entry->value); - if (value == NULL) { + if (!value) { entry->value = NULL; return entry; } entry->value = strdup(value); - if (entry->value == NULL) + if (!entry->value) return NULL; return entry; } @@ -165,16 +164,16 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char * /* add new name */ entry = new0(struct udev_list_entry, 1); - if (entry == NULL) + if (!entry) return NULL; entry->name = strdup(name); - if (entry->name == NULL) + if (!entry->name) return mfree(entry); - if (value != NULL) { + if (value) { entry->value = strdup(value); - if (entry->value == NULL) { + if (!entry->value) { free(entry->name); return mfree(entry); } @@ -189,8 +188,8 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char * add = list->entries_max; if (add < 1) add = 64; - entries = realloc(list->entries, (list->entries_max + add) * sizeof(struct udev_list_entry *)); - if (entries == NULL) { + entries = reallocarray(list->entries, list->entries_max + add, sizeof(struct udev_list_entry *)); + if (!entries) { free(entry->name); free(entry->value); return mfree(entry); @@ -213,9 +212,8 @@ struct udev_list_entry *udev_list_entry_add(struct udev_list *list, const char * (list->entries_cur - i) * sizeof(struct udev_list_entry *)); list->entries[i] = entry; list->entries_cur++; - } else { + } else udev_list_entry_append(entry, list); - } return entry; } diff --git a/src/libudev/libudev-private.h b/src/libudev/libudev-private.h index 76730cc05..565da326f 100644 --- a/src/libudev/libudev-private.h +++ b/src/libudev/libudev-private.h @@ -1,4 +1,6 @@ /* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + /*** This file is part of systemd. @@ -18,9 +20,6 @@ along with systemd; If not, see . ***/ -#ifndef _LIBUDEV_PRIVATE_H_ -#define _LIBUDEV_PRIVATE_H_ - #include #include #include @@ -146,5 +145,3 @@ uint64_t util_string_bloom64(const char *str); /* libudev-util-private.c */ int util_resolve_subsys_kernel(struct udev *udev, const char *string, char *result, size_t maxsize, int read_value); - -#endif diff --git a/src/locale/meson.build b/src/locale/meson.build index dca2c51d2..6b85f6bea 100644 --- a/src/locale/meson.build +++ b/src/locale/meson.build @@ -28,15 +28,8 @@ if conf.get('ENABLE_LOCALED') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.locale1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.locale1.policy', - input : 'org.freedesktop.locale1.policy.in', - output : 'org.freedesktop.locale1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.locale1.policy', + install_dir : polkitpolicydir) endif # If you know a way that allows the same variables to be used diff --git a/src/locale/org.freedesktop.locale1.policy.in b/src/locale/org.freedesktop.locale1.policy similarity index 78% rename from src/locale/org.freedesktop.locale1.policy.in rename to src/locale/org.freedesktop.locale1.policy index 4c1c34da0..f9241749e 100644 --- a/src/locale/org.freedesktop.locale1.policy.in +++ b/src/locale/org.freedesktop.locale1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Set system locale - Authentication is required to set the system locale. + Set system locale + Authentication is required to set the system locale. auth_admin_keep auth_admin_keep @@ -30,8 +30,8 @@ - Set system keyboard settings - Authentication is required to set the system keyboard settings. + Set system keyboard settings + Authentication is required to set the system keyboard settings. auth_admin_keep auth_admin_keep diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules index f2c838f35..3515d292a 100644 --- a/src/login/70-uaccess.rules +++ b/src/login/70-uaccess.rules @@ -27,7 +27,7 @@ SUBSYSTEM=="block", ENV{ID_CDROM}=="1", TAG+="uaccess" SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", TAG+="uaccess" # Sound devices -SUBSYSTEM=="sound", TAG+="uaccess" \ +SUBSYSTEM=="sound", TAG+="uaccess", \ OPTIONS+="static_node=snd/timer", OPTIONS+="static_node=snd/seq" # ffado is an userspace driver for firewire sound cards diff --git a/src/login/inhibit.c b/src/login/inhibit.c index 22657f9ed..6b5d9c29b 100644 --- a/src/login/inhibit.c +++ b/src/login/inhibit.c @@ -272,6 +272,7 @@ int main(int argc, char *argv[]) { if (r == 0) { /* Child */ execvp(argv[optind], argv + optind); + log_open(); log_error_errno(errno, "Failed to execute %s: %m", argv[optind]); _exit(EXIT_FAILURE); } diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c index d785f67ca..3f355e7ea 100644 --- a/src/login/logind-acl.c +++ b/src/login/logind-acl.c @@ -192,7 +192,7 @@ int devnode_acl_all(struct udev *udev, assert(udev); - nodes = set_new(&string_hash_ops); + nodes = set_new(&path_hash_ops); if (!nodes) return -ENOMEM; diff --git a/src/login/logind-button.c b/src/login/logind-button.c index 94945f0bc..2da6e6995 100644 --- a/src/login/logind-button.c +++ b/src/login/logind-button.c @@ -110,9 +110,13 @@ static void button_lid_switch_handle_action(Manager *manager, bool is_edge) { assert(manager); - /* If we are docked, handle the lid switch differently */ + /* If we are docked or on external power, handle the lid switch + * differently */ if (manager_is_docked_or_external_displays(manager)) handle_action = manager->handle_lid_switch_docked; + else if (manager->handle_lid_switch_ep != _HANDLE_ACTION_INVALID && + manager_is_on_external_power()) + handle_action = manager->handle_lid_switch_ep; else handle_action = manager->handle_lid_switch; diff --git a/src/login/logind-core.c b/src/login/logind-core.c index e338682f4..41b4d4d8d 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -602,3 +602,37 @@ bool manager_is_docked_or_external_displays(Manager *m) { return false; } + +bool manager_is_on_external_power(void) { + int r; + + /* For now we only check for AC power, but 'external power' can apply + * to anything that isn't an internal battery */ + r = on_ac_power(); + if (r < 0) + log_warning_errno(r, "Failed to read AC power status: %m"); + else if (r > 0) + return true; + + return false; +} + +bool manager_all_buttons_ignored(Manager *m) { + assert(m); + + if (m->handle_power_key != HANDLE_IGNORE) + return false; + if (m->handle_suspend_key != HANDLE_IGNORE) + return false; + if (m->handle_hibernate_key != HANDLE_IGNORE) + return false; + if (m->handle_lid_switch != HANDLE_IGNORE) + return false; + if (m->handle_lid_switch_ep != _HANDLE_ACTION_INVALID && + m->handle_lid_switch_ep != HANDLE_IGNORE) + return false; + if (m->handle_lid_switch_docked != HANDLE_IGNORE) + return false; + + return true; +} diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c index ae36ececb..07cb25715 100644 --- a/src/login/logind-dbus.c +++ b/src/login/logind-dbus.c @@ -41,6 +41,7 @@ #include "mkdir.h" #include "path-util.h" #include "process-util.h" +#include "cgroup-util.h" #include "selinux-util.h" #include "sleep-config.h" #include "special.h" @@ -658,6 +659,7 @@ static int method_list_inhibitors(sd_bus_message *message, void *userdata, sd_bu static int method_create_session(sd_bus_message *message, void *userdata, sd_bus_error *error) { const char *service, *type, *class, *cseat, *tty, *display, *remote_user, *remote_host, *desktop; uint32_t audit_id = 0; + _cleanup_free_ char *unit = NULL; _cleanup_free_ char *id = NULL; Session *session = NULL; Manager *m = userdata; @@ -787,8 +789,15 @@ static int method_create_session(sd_bus_message *message, void *userdata, sd_bus return r; } - r = manager_get_session_by_pid(m, leader, NULL); - if (r > 0) + /* + * Check if we are already in a logind session. Or if we are in user@.service + * which is a special PAM session that avoids creating a logind session. + */ + r = cg_pid_get_unit(leader, &unit); + if (r < 0) + return r; + if (hashmap_get(m->session_units, unit) || + hashmap_get(m->user_units, unit)) return sd_bus_error_setf(error, BUS_ERROR_SESSION_BUSY, "Already running in a session"); /* @@ -1930,15 +1939,11 @@ static int nologin_timeout_handler( void *userdata) { Manager *m = userdata; - int r; log_info("Creating /run/nologin, blocking further logins..."); - r = write_string_file_atomic_label("/run/nologin", "System is going down."); - if (r < 0) - log_error_errno(r, "Failed to create /run/nologin: %m"); - else - m->unlink_nologin = true; + m->unlink_nologin = + create_shutdown_run_nologin_or_warn() >= 0; return 0; } @@ -2010,7 +2015,7 @@ static void reset_scheduled_shutdown(Manager *m) { m->shutdown_dry_run = false; if (m->unlink_nologin) { - (void) unlink("/run/nologin"); + (void) unlink_or_warn("/run/nologin"); m->unlink_nologin = false; } @@ -2653,6 +2658,7 @@ const sd_bus_vtable manager_vtable[] = { SD_BUS_PROPERTY("HandleSuspendKey", "s", property_get_handle_action, offsetof(Manager, handle_suspend_key), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HandleHibernateKey", "s", property_get_handle_action, offsetof(Manager, handle_hibernate_key), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HandleLidSwitch", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("HandleLidSwitchExternalPower", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_ep), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HandleLidSwitchDocked", "s", property_get_handle_action, offsetof(Manager, handle_lid_switch_docked), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("HoldoffTimeoutUSec", "t", NULL, offsetof(Manager, holdoff_timeout_usec), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("IdleAction", "s", property_get_handle_action, offsetof(Manager, idle_action), SD_BUS_VTABLE_PROPERTY_CONST), diff --git a/src/login/logind-gperf.gperf b/src/login/logind-gperf.gperf index ee62db63a..f6f57526f 100644 --- a/src/login/logind-gperf.gperf +++ b/src/login/logind-gperf.gperf @@ -27,6 +27,7 @@ Login.HandlePowerKey, config_parse_handle_action, 0, offsetof(Manag Login.HandleSuspendKey, config_parse_handle_action, 0, offsetof(Manager, handle_suspend_key) Login.HandleHibernateKey, config_parse_handle_action, 0, offsetof(Manager, handle_hibernate_key) Login.HandleLidSwitch, config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch) +Login.HandleLidSwitchExternalPower,config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch_ep) Login.HandleLidSwitchDocked, config_parse_handle_action, 0, offsetof(Manager, handle_lid_switch_docked) Login.PowerKeyIgnoreInhibited, config_parse_bool, 0, offsetof(Manager, power_key_ignore_inhibited) Login.SuspendKeyIgnoreInhibited, config_parse_bool, 0, offsetof(Manager, suspend_key_ignore_inhibited) diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index b99e7abf9..46e7c06dd 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -639,16 +639,16 @@ int seat_get_idle_hint(Seat *s, dual_timestamp *t) { return idle_hint; } -bool seat_check_gc(Seat *s, bool drop_not_started) { +bool seat_may_gc(Seat *s, bool drop_not_started) { assert(s); if (drop_not_started && !s->started) - return false; - - if (seat_is_seat0(s)) return true; - return seat_has_master_device(s); + if (seat_is_seat0(s)) + return false; + + return !seat_has_master_device(s); } void seat_add_to_gc_queue(Seat *s) { diff --git a/src/login/logind-seat.h b/src/login/logind-seat.h index 5427ac21c..4982ea338 100644 --- a/src/login/logind-seat.h +++ b/src/login/logind-seat.h @@ -79,7 +79,7 @@ int seat_start(Seat *s); int seat_stop(Seat *s, bool force); int seat_stop_sessions(Seat *s, bool force); -bool seat_check_gc(Seat *s, bool drop_not_started); +bool seat_may_gc(Seat *s, bool drop_not_started); void seat_add_to_gc_queue(Seat *s); bool seat_name_is_valid(const char *name); diff --git a/src/login/logind-session-device.c b/src/login/logind-session-device.c index 067e67a93..73eee7251 100644 --- a/src/login/logind-session-device.c +++ b/src/login/logind-session-device.c @@ -74,20 +74,25 @@ static int session_device_notify(SessionDevice *sd, enum SessionDeviceNotificati return r; switch (type) { + case SESSION_DEVICE_RESUME: r = sd_bus_message_append(m, "uuh", major, minor, sd->fd); if (r < 0) return r; break; + case SESSION_DEVICE_TRY_PAUSE: t = "pause"; break; + case SESSION_DEVICE_PAUSE: t = "force"; break; + case SESSION_DEVICE_RELEASE: t = "gone"; break; + default: return -EINVAL; } @@ -101,43 +106,33 @@ static int session_device_notify(SessionDevice *sd, enum SessionDeviceNotificati return sd_bus_send(sd->session->manager->bus, m, NULL); } -static int sd_eviocrevoke(int fd) { - static bool warned; - int r; +static void sd_eviocrevoke(int fd) { + static bool warned = false; assert(fd >= 0); - r = ioctl(fd, EVIOCREVOKE, NULL); - if (r < 0) { - r = -errno; - if (r == -EINVAL && !warned) { + if (ioctl(fd, EVIOCREVOKE, NULL) < 0) { + + if (errno == EINVAL && !warned) { + log_warning_errno(errno, "Kernel does not support evdev-revocation: %m"); warned = true; - log_warning("kernel does not support evdev-revocation"); } } - - return 0; } static int sd_drmsetmaster(int fd) { - int r; - assert(fd >= 0); - r = ioctl(fd, DRM_IOCTL_SET_MASTER, 0); - if (r < 0) + if (ioctl(fd, DRM_IOCTL_SET_MASTER, 0) < 0) return -errno; return 0; } static int sd_drmdropmaster(int fd) { - int r; - assert(fd >= 0); - r = ioctl(fd, DRM_IOCTL_DROP_MASTER, 0); - if (r < 0) + if (ioctl(fd, DRM_IOCTL_DROP_MASTER, 0) < 0) return -errno; return 0; @@ -146,7 +141,9 @@ static int sd_drmdropmaster(int fd) { static int session_device_open(SessionDevice *sd, bool active) { int fd, r; + assert(sd); assert(sd->type != DEVICE_TYPE_UNKNOWN); + assert(sd->node); /* open device and try to get an udev_device from it */ fd = open(sd->node, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); @@ -154,28 +151,27 @@ static int session_device_open(SessionDevice *sd, bool active) { return -errno; switch (sd->type) { + case DEVICE_TYPE_DRM: if (active) { - /* Weird legacy DRM semantics might return an error - * even though we're master. No way to detect that so - * fail at all times and let caller retry in inactive - * state. */ + /* Weird legacy DRM semantics might return an error even though we're master. No way to detect + * that so fail at all times and let caller retry in inactive state. */ r = sd_drmsetmaster(fd); if (r < 0) { close_nointr(fd); return r; } - } else { - /* DRM-Master is granted to the first user who opens a - * device automatically (ughh, racy!). Hence, we just - * drop DRM-Master in case we were the first. */ - sd_drmdropmaster(fd); - } + } else + /* DRM-Master is granted to the first user who opens a device automatically (ughh, + * racy!). Hence, we just drop DRM-Master in case we were the first. */ + (void) sd_drmdropmaster(fd); break; + case DEVICE_TYPE_EVDEV: if (!active) sd_eviocrevoke(fd); break; + case DEVICE_TYPE_UNKNOWN: default: /* fallback for devices wihout synchronizations */ @@ -195,29 +191,38 @@ static int session_device_start(SessionDevice *sd) { return 0; switch (sd->type) { + case DEVICE_TYPE_DRM: - /* Device is kept open. Simply call drmSetMaster() and hope - * there is no-one else. In case it fails, we keep the device - * paused. Maybe at some point we have a drmStealMaster(). */ - r = sd_drmsetmaster(sd->fd); - if (r < 0) - return r; + + if (sd->fd < 0) { + /* Open device if it isn't open yet */ + sd->fd = session_device_open(sd, true); + if (sd->fd < 0) + return sd->fd; + } else { + /* Device is kept open. Simply call drmSetMaster() and hope there is no-one else. In case it fails, we + * keep the device paused. Maybe at some point we have a drmStealMaster(). */ + r = sd_drmsetmaster(sd->fd); + if (r < 0) + return r; + } break; + case DEVICE_TYPE_EVDEV: - /* Evdev devices are revoked while inactive. Reopen it and we - * are fine. */ + /* Evdev devices are revoked while inactive. Reopen it and we are fine. */ r = session_device_open(sd, true); if (r < 0) return r; - /* For evdev devices, the file descriptor might be left - * uninitialized. This might happen while resuming into a - * session and logind has been restarted right before. */ + + /* For evdev devices, the file descriptor might be left uninitialized. This might happen while resuming + * into a session and logind has been restarted right before. */ safe_close(sd->fd); sd->fd = r; break; + case DEVICE_TYPE_UNKNOWN: default: - /* fallback for devices wihout synchronizations */ + /* fallback for devices without synchronizations */ break; } @@ -232,6 +237,7 @@ static void session_device_stop(SessionDevice *sd) { return; switch (sd->type) { + case DEVICE_TYPE_DRM: /* On DRM devices we simply drop DRM-Master but keep it open. * This allows the user to keep resources allocated. The @@ -239,6 +245,7 @@ static void session_device_stop(SessionDevice *sd) { * circumventing this. */ sd_drmdropmaster(sd->fd); break; + case DEVICE_TYPE_EVDEV: /* Revoke access on evdev file-descriptors during deactivation. * This will basically prevent any operations on the fd and @@ -246,6 +253,7 @@ static void session_device_stop(SessionDevice *sd) { * protection this way. */ sd_eviocrevoke(sd->fd); break; + case DEVICE_TYPE_UNKNOWN: default: /* fallback for devices without synchronization */ @@ -371,10 +379,8 @@ int session_device_new(Session *s, dev_t dev, bool open_device, SessionDevice ** goto error; r = hashmap_put(s->devices, &sd->dev, sd); - if (r < 0) { - r = -ENOMEM; + if (r < 0) goto error; - } if (open_device) { /* Open the device for the first time. We need a valid fd to pass back @@ -423,7 +429,7 @@ void session_device_free(SessionDevice *sd) { session_device_stop(sd); session_device_notify(sd, SESSION_DEVICE_RELEASE); - close_nointr(sd->fd); + safe_close(sd->fd); LIST_REMOVE(sd_by_device, sd->device->session_devices, sd); @@ -458,13 +464,15 @@ void session_device_resume_all(Session *s) { assert(s); HASHMAP_FOREACH(sd, s->devices, i) { - if (!sd->active) { - if (session_device_start(sd) < 0) - continue; - if (session_device_save(sd) < 0) - continue; - session_device_notify(sd, SESSION_DEVICE_RESUME); - } + if (sd->active) + continue; + + if (session_device_start(sd) < 0) + continue; + if (session_device_save(sd) < 0) + continue; + + session_device_notify(sd, SESSION_DEVICE_RESUME); } } @@ -475,25 +483,27 @@ void session_device_pause_all(Session *s) { assert(s); HASHMAP_FOREACH(sd, s->devices, i) { - if (sd->active) { - session_device_stop(sd); - session_device_notify(sd, SESSION_DEVICE_PAUSE); - } + if (!sd->active) + continue; + + session_device_stop(sd); + session_device_notify(sd, SESSION_DEVICE_PAUSE); } } unsigned int session_device_try_pause_all(Session *s) { + unsigned num_pending = 0; SessionDevice *sd; Iterator i; - unsigned int num_pending = 0; assert(s); HASHMAP_FOREACH(sd, s->devices, i) { - if (sd->active) { - session_device_notify(sd, SESSION_DEVICE_TRY_PAUSE); - ++num_pending; - } + if (!sd->active) + continue; + + session_device_notify(sd, SESSION_DEVICE_TRY_PAUSE); + num_pending++; } return num_pending; @@ -516,7 +526,7 @@ int session_device_save(SessionDevice *sd) { return 0; m = strjoina("FDSTORE=1\n" - "FDNAME=session", sd->session->id); + "FDNAME=session-", sd->session->id); r = sd_pid_notify_with_fds(0, false, m, &sd->fd, 1); if (r < 0) @@ -527,11 +537,12 @@ int session_device_save(SessionDevice *sd) { } void session_device_attach_fd(SessionDevice *sd, int fd, bool active) { - assert(fd > 0); + assert(fd >= 0); assert(sd); assert(sd->fd < 0); assert(!sd->active); sd->fd = fd; + sd->pushed_fd = true; sd->active = active; } diff --git a/src/login/logind-session-device.h b/src/login/logind-session-device.h index a1cf17af9..a9ead7bdc 100644 --- a/src/login/logind-session-device.h +++ b/src/login/logind-session-device.h @@ -39,9 +39,9 @@ struct SessionDevice { dev_t dev; char *node; int fd; - bool active; - DeviceType type; - bool pushed_fd; + DeviceType type:3; + bool active:1; + bool pushed_fd:1; LIST_FIELDS(struct SessionDevice, sd_by_device); }; diff --git a/src/login/logind-session.c b/src/login/logind-session.c index 92eb2943f..1859150b5 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -1000,27 +1000,27 @@ static void session_remove_fifo(Session *s) { } } -bool session_check_gc(Session *s, bool drop_not_started) { +bool session_may_gc(Session *s, bool drop_not_started) { assert(s); if (drop_not_started && !s->started) - return false; + return true; if (!s->user) - return false; + return true; if (s->fifo_fd >= 0) { if (pipe_eof(s->fifo_fd) <= 0) - return true; + return false; } if (s->scope_job && manager_job_is_active(s->manager, s->scope_job)) - return true; + return false; if (s->scope && manager_unit_is_active(s->manager, s->scope)) - return true; + return false; - return false; + return true; } void session_add_to_gc_queue(Session *s) { diff --git a/src/login/logind-session.h b/src/login/logind-session.h index 849183240..16a278c79 100644 --- a/src/login/logind-session.h +++ b/src/login/logind-session.h @@ -131,7 +131,7 @@ struct Session { Session *session_new(Manager *m, const char *id); void session_free(Session *s); void session_set_user(Session *s, User *u); -bool session_check_gc(Session *s, bool drop_not_started); +bool session_may_gc(Session *s, bool drop_not_started); void session_add_to_gc_queue(Session *s); int session_activate(Session *s); bool session_is_active(Session *s); diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 32b204569..f85564f22 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -680,25 +680,25 @@ int user_check_linger_file(User *u) { return access(p, F_OK) >= 0; } -bool user_check_gc(User *u, bool drop_not_started) { +bool user_may_gc(User *u, bool drop_not_started) { assert(u); if (drop_not_started && !u->started) - return false; + return true; if (u->sessions) - return true; + return false; if (user_check_linger_file(u) > 0) - return true; + return false; if (u->slice_job && manager_job_is_active(u->manager, u->slice_job)) - return true; + return false; if (u->service_job && manager_job_is_active(u->manager, u->service_job)) - return true; + return false; - return false; + return true; } void user_add_to_gc_queue(User *u) { diff --git a/src/login/logind-user.h b/src/login/logind-user.h index ad1686ffc..c3452dcd0 100644 --- a/src/login/logind-user.h +++ b/src/login/logind-user.h @@ -66,7 +66,7 @@ User *user_free(User *u); DEFINE_TRIVIAL_CLEANUP_FUNC(User *, user_free); -bool user_check_gc(User *u, bool drop_not_started); +bool user_may_gc(User *u, bool drop_not_started); void user_add_to_gc_queue(User *u); int user_start(User *u); int user_stop(User *u, bool force); diff --git a/src/login/logind.c b/src/login/logind.c index d15d4cec5..5220861c1 100644 --- a/src/login/logind.c +++ b/src/login/logind.c @@ -35,6 +35,7 @@ #include "dirent-util.h" #include "fd-util.h" #include "format-util.h" +#include "fs-util.h" #include "logind.h" #include "process-util.h" #include "selinux-util.h" @@ -53,6 +54,7 @@ static void manager_reset_config(Manager *m) { m->handle_suspend_key = HANDLE_SUSPEND; m->handle_hibernate_key = HANDLE_HIBERNATE; m->handle_lid_switch = HANDLE_SUSPEND; + m->handle_lid_switch_ep = _HANDLE_ACTION_INVALID; m->handle_lid_switch_docked = HANDLE_IGNORE; m->power_key_ignore_inhibited = false; m->suspend_key_ignore_inhibited = false; @@ -182,7 +184,7 @@ static void manager_free(Manager *m) { udev_unref(m->udev); if (m->unlink_nologin) - (void) unlink("/run/nologin"); + (void) unlink_or_warn("/run/nologin"); bus_verify_polkit_async_registry_free(m->polkit_registry); @@ -253,11 +255,7 @@ static int manager_enumerate_buttons(Manager *m) { /* Loads buttons from udev */ - if (m->handle_power_key == HANDLE_IGNORE && - m->handle_suspend_key == HANDLE_IGNORE && - m->handle_hibernate_key == HANDLE_IGNORE && - m->handle_lid_switch == HANDLE_IGNORE && - m->handle_lid_switch_docked == HANDLE_IGNORE) + if (manager_all_buttons_ignored(m)) return 0; e = udev_enumerate_new(m->udev); @@ -325,7 +323,9 @@ static int manager_enumerate_seats(Manager *m) { s = hashmap_get(m->seats, de->d_name); if (!s) { - unlinkat(dirfd(d), de->d_name, 0); + if (unlinkat(dirfd(d), de->d_name, 0) < 0) + log_warning("Failed to remove /run/systemd/seats/%s: %m", + de->d_name); continue; } @@ -453,9 +453,15 @@ static int manager_attach_fds(Manager *m) { continue; } + if (!S_ISCHR(st.st_mode) && !S_ISBLK(st.st_mode)) { + log_debug("Device fd doesn't actually point to device node: %m"); + close_nointr(fd); + continue; + } + sd = hashmap_get(s->devices, &st.st_rdev); if (!sd) { - /* Weird we got an fd for a session device which wasn't + /* Weird, we got an fd for a session device which wasn't * recorded in the session state file... */ log_warning("Got fd for missing session device [%u:%u] in session %s", major(st.st_rdev), minor(st.st_rdev), s->id); @@ -905,12 +911,7 @@ static int manager_connect_udev(Manager *m) { return r; /* Don't watch keys if nobody cares */ - if (m->handle_power_key != HANDLE_IGNORE || - m->handle_suspend_key != HANDLE_IGNORE || - m->handle_hibernate_key != HANDLE_IGNORE || - m->handle_lid_switch != HANDLE_IGNORE || - m->handle_lid_switch_docked != HANDLE_IGNORE) { - + if (!manager_all_buttons_ignored(m)) { m->udev_button_monitor = udev_monitor_new_from_netlink(m->udev, "udev"); if (!m->udev_button_monitor) return -ENOMEM; @@ -966,7 +967,7 @@ static void manager_gc(Manager *m, bool drop_not_started) { LIST_REMOVE(gc_queue, m->seat_gc_queue, seat); seat->in_gc_queue = false; - if (!seat_check_gc(seat, drop_not_started)) { + if (seat_may_gc(seat, drop_not_started)) { seat_stop(seat, false); seat_free(seat); } @@ -977,14 +978,14 @@ static void manager_gc(Manager *m, bool drop_not_started) { session->in_gc_queue = false; /* First, if we are not closing yet, initiate stopping */ - if (!session_check_gc(session, drop_not_started) && + if (session_may_gc(session, drop_not_started) && session_get_state(session) != SESSION_CLOSING) session_stop(session, false); /* Normally, this should make the session referenced * again, if it doesn't then let's get rid of it * immediately */ - if (!session_check_gc(session, drop_not_started)) { + if (session_may_gc(session, drop_not_started)) { session_finalize(session); session_free(session); } @@ -995,11 +996,11 @@ static void manager_gc(Manager *m, bool drop_not_started) { user->in_gc_queue = false; /* First step: queue stop jobs */ - if (!user_check_gc(user, drop_not_started)) + if (user_may_gc(user, drop_not_started)) user_stop(user, false); /* Second step: finalize user */ - if (!user_check_gc(user, drop_not_started)) { + if (user_may_gc(user, drop_not_started)) { user_finalize(user); user_free(user); } diff --git a/src/login/logind.conf.in b/src/login/logind.conf.in index 6f720b770..40a77dc7b 100644 --- a/src/login/logind.conf.in +++ b/src/login/logind.conf.in @@ -22,6 +22,7 @@ #HandleSuspendKey=suspend #HandleHibernateKey=hibernate #HandleLidSwitch=suspend +#HandleLidSwitchExternalPower=suspend #HandleLidSwitchDocked=ignore #PowerKeyIgnoreInhibited=no #SuspendKeyIgnoreInhibited=no diff --git a/src/login/logind.h b/src/login/logind.h index 826236713..918bc1f91 100644 --- a/src/login/logind.h +++ b/src/login/logind.h @@ -118,6 +118,7 @@ struct Manager { HandleAction handle_suspend_key; HandleAction handle_hibernate_key; HandleAction handle_lid_switch; + HandleAction handle_lid_switch_ep; HandleAction handle_lid_switch_docked; bool power_key_ignore_inhibited; @@ -160,6 +161,8 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **user); int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session); bool manager_is_docked_or_external_displays(Manager *m); +bool manager_is_on_external_power(void); +bool manager_all_buttons_ignored(Manager *m); extern const sd_bus_vtable manager_vtable[]; diff --git a/src/login/meson.build b/src/login/meson.build index e8e4f7bd7..5b75382e5 100644 --- a/src/login/meson.build +++ b/src/login/meson.build @@ -87,15 +87,8 @@ if conf.get('ENABLE_LOGIND') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.login1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.login1.policy', - input : 'org.freedesktop.login1.policy.in', - output : 'org.freedesktop.login1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.login1.policy', + install_dir : polkitpolicydir) install_data('70-power-switch.rules', install_dir : udevrulesdir) diff --git a/src/login/org.freedesktop.login1.policy.in b/src/login/org.freedesktop.login1.policy similarity index 63% rename from src/login/org.freedesktop.login1.policy.in rename to src/login/org.freedesktop.login1.policy index 47162022d..f1d1f956d 100644 --- a/src/login/org.freedesktop.login1.policy.in +++ b/src/login/org.freedesktop.login1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Allow applications to inhibit system shutdown - Authentication is required for an application to inhibit system shutdown. + Allow applications to inhibit system shutdown + Authentication is required for an application to inhibit system shutdown. no yes @@ -30,8 +30,8 @@ - Allow applications to delay system shutdown - Authentication is required for an application to delay system shutdown. + Allow applications to delay system shutdown + Authentication is required for an application to delay system shutdown. yes yes @@ -41,8 +41,8 @@ - Allow applications to inhibit system sleep - Authentication is required for an application to inhibit system sleep. + Allow applications to inhibit system sleep + Authentication is required for an application to inhibit system sleep. no yes @@ -52,8 +52,8 @@ - Allow applications to delay system sleep - Authentication is required for an application to delay system sleep. + Allow applications to delay system sleep + Authentication is required for an application to delay system sleep. yes yes @@ -62,8 +62,8 @@ - Allow applications to inhibit automatic system suspend - Authentication is required for an application to inhibit automatic system suspend. + Allow applications to inhibit automatic system suspend + Authentication is required for an application to inhibit automatic system suspend. yes yes @@ -72,8 +72,8 @@ - Allow applications to inhibit system handling of the power key - Authentication is required for an application to inhibit system handling of the power key. + Allow applications to inhibit system handling of the power key + Authentication is required for an application to inhibit system handling of the power key. no yes @@ -83,8 +83,8 @@ - Allow applications to inhibit system handling of the suspend key - Authentication is required for an application to inhibit system handling of the suspend key. + Allow applications to inhibit system handling of the suspend key + Authentication is required for an application to inhibit system handling of the suspend key. no yes @@ -94,8 +94,8 @@ - Allow applications to inhibit system handling of the hibernate key - Authentication is required for an application to inhibit system handling of the hibernate key. + Allow applications to inhibit system handling of the hibernate key + Authentication is required for an application to inhibit system handling of the hibernate key. no yes @@ -104,8 +104,8 @@ - Allow applications to inhibit system handling of the lid switch - Authentication is required for an application to inhibit system handling of the lid switch. + Allow applications to inhibit system handling of the lid switch + Authentication is required for an application to inhibit system handling of the lid switch. no yes @@ -114,8 +114,8 @@ - Allow non-logged-in user to run programs - Explicit request is required to run programs as a non-logged-in user. + Allow non-logged-in user to run programs + Explicit request is required to run programs as a non-logged-in user. yes yes @@ -124,8 +124,8 @@ - Allow non-logged-in users to run programs - Authentication is required to run programs as a non-logged-in user. + Allow non-logged-in users to run programs + Authentication is required to run programs as a non-logged-in user. auth_admin_keep auth_admin_keep @@ -134,8 +134,8 @@ - Allow attaching devices to seats - Authentication is required for attaching a device to a seat. + Allow attaching devices to seats + Authentication is required for attaching a device to a seat. auth_admin_keep auth_admin_keep @@ -145,8 +145,8 @@ - Flush device to seat attachments - Authentication is required for resetting how devices are attached to seats. + Flush device to seat attachments + Authentication is required for resetting how devices are attached to seats. auth_admin_keep auth_admin_keep @@ -155,8 +155,8 @@ - Power off the system - Authentication is required for powering off the system. + Power off the system + Authentication is required for powering off the system. auth_admin_keep auth_admin_keep @@ -166,8 +166,8 @@ - Power off the system while other users are logged in - Authentication is required for powering off the system while other users are logged in. + Power off the system while other users are logged in + Authentication is required for powering off the system while other users are logged in. auth_admin_keep auth_admin_keep @@ -177,8 +177,8 @@ - Power off the system while an application asked to inhibit it - Authentication is required for powering off the system while an application asked to inhibit it. + Power off the system while an application asked to inhibit it + Authentication is required for powering off the system while an application asked to inhibit it. auth_admin_keep auth_admin_keep @@ -188,8 +188,8 @@ - Reboot the system - Authentication is required for rebooting the system. + Reboot the system + Authentication is required for rebooting the system. auth_admin_keep auth_admin_keep @@ -199,8 +199,8 @@ - Reboot the system while other users are logged in - Authentication is required for rebooting the system while other users are logged in. + Reboot the system while other users are logged in + Authentication is required for rebooting the system while other users are logged in. auth_admin_keep auth_admin_keep @@ -210,8 +210,8 @@ - Reboot the system while an application asked to inhibit it - Authentication is required for rebooting the system while an application asked to inhibit it. + Reboot the system while an application asked to inhibit it + Authentication is required for rebooting the system while an application asked to inhibit it. auth_admin_keep auth_admin_keep @@ -221,8 +221,8 @@ - Halt the system - Authentication is required for halting the system. + Halt the system + Authentication is required for halting the system. auth_admin_keep auth_admin_keep @@ -232,8 +232,8 @@ - Halt the system while other users are logged in - Authentication is required for halting the system while other users are logged in. + Halt the system while other users are logged in + Authentication is required for halting the system while other users are logged in. auth_admin_keep auth_admin_keep @@ -243,8 +243,8 @@ - Halt the system while an application asked to inhibit it - Authentication is required for halting the system while an application asked to inhibit it. + Halt the system while an application asked to inhibit it + Authentication is required for halting the system while an application asked to inhibit it. auth_admin_keep auth_admin_keep @@ -254,8 +254,8 @@ - Suspend the system - Authentication is required for suspending the system. + Suspend the system + Authentication is required for suspending the system. auth_admin_keep auth_admin_keep @@ -264,8 +264,8 @@ - Suspend the system while other users are logged in - Authentication is required for suspending the system while other users are logged in. + Suspend the system while other users are logged in + Authentication is required for suspending the system while other users are logged in. auth_admin_keep auth_admin_keep @@ -275,8 +275,8 @@ - Suspend the system while an application asked to inhibit it - Authentication is required for suspending the system while an application asked to inhibit it. + Suspend the system while an application asked to inhibit it + Authentication is required for suspending the system while an application asked to inhibit it. auth_admin_keep auth_admin_keep @@ -286,8 +286,8 @@ - Hibernate the system - Authentication is required for hibernating the system. + Hibernate the system + Authentication is required for hibernating the system. auth_admin_keep auth_admin_keep @@ -296,8 +296,8 @@ - Hibernate the system while other users are logged in - Authentication is required for hibernating the system while other users are logged in. + Hibernate the system while other users are logged in + Authentication is required for hibernating the system while other users are logged in. auth_admin_keep auth_admin_keep @@ -307,8 +307,8 @@ - Hibernate the system while an application asked to inhibit it - Authentication is required for hibernating the system while an application asked to inhibit it. + Hibernate the system while an application asked to inhibit it + Authentication is required for hibernating the system while an application asked to inhibit it. auth_admin_keep auth_admin_keep @@ -318,8 +318,8 @@ - Manage active sessions, users and seats - Authentication is required for managing active sessions, users and seats. + Manage active sessions, users and seats + Authentication is required for managing active sessions, users and seats. auth_admin_keep auth_admin_keep @@ -328,8 +328,8 @@ - Lock or unlock active sessions - Authentication is required to lock or unlock active sessions. + Lock or unlock active sessions + Authentication is required to lock or unlock active sessions. auth_admin_keep auth_admin_keep @@ -338,8 +338,8 @@ - Allow indication to the firmware to boot to setup interface - Authentication is required to indicate to the firmware to boot to setup interface. + Allow indication to the firmware to boot to setup interface + Authentication is required to indicate to the firmware to boot to setup interface. auth_admin_keep auth_admin_keep @@ -348,8 +348,8 @@ - Set a wall message - Authentication is required to set a wall message + Set a wall message + Authentication is required to set a wall message auth_admin_keep auth_admin_keep diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c index 2d7806491..9c435d671 100644 --- a/src/machine/machine-dbus.c +++ b/src/machine/machine-dbus.c @@ -1204,7 +1204,7 @@ int bus_machine_method_copy(sd_bus_message *message, void *userdata, sd_bus_erro containerfd = open(container_dirname, O_CLOEXEC|O_RDONLY|O_NOCTTY|O_DIRECTORY); if (containerfd < 0) { - r = log_error_errno(errno, "Failed top open destination directory: %m"); + r = log_error_errno(errno, "Failed to open destination directory: %m"); goto child_fail; } diff --git a/src/machine/machine.c b/src/machine/machine.c index 7375d83a4..4bacf91d2 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -486,22 +486,22 @@ int machine_finalize(Machine *m) { return 0; } -bool machine_check_gc(Machine *m, bool drop_not_started) { +bool machine_may_gc(Machine *m, bool drop_not_started) { assert(m); if (m->class == MACHINE_HOST) - return true; - - if (drop_not_started && !m->started) return false; - if (m->scope_job && manager_job_is_active(m->manager, m->scope_job)) + if (drop_not_started && !m->started) return true; + if (m->scope_job && manager_job_is_active(m->manager, m->scope_job)) + return false; + if (m->unit && manager_unit_is_active(m->manager, m->unit)) - return true; + return false; - return false; + return true; } void machine_add_to_gc_queue(Machine *m) { diff --git a/src/machine/machine.h b/src/machine/machine.h index 1ee82ffe8..1ef5dcdb8 100644 --- a/src/machine/machine.h +++ b/src/machine/machine.h @@ -85,7 +85,7 @@ struct Machine { Machine* machine_new(Manager *manager, MachineClass class, const char *name); void machine_free(Machine *m); -bool machine_check_gc(Machine *m, bool drop_not_started); +bool machine_may_gc(Machine *m, bool drop_not_started); void machine_add_to_gc_queue(Machine *m); int machine_start(Machine *m, sd_bus_message *properties, sd_bus_error *error); int machine_stop(Machine *m); diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index 75743ce6a..e695bdbab 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1724,6 +1724,8 @@ static int rename_image(int argc, char *argv[], void *userdata) { sd_bus *bus = userdata; int r; + assert(bus); + polkit_agent_open_if_enabled(arg_transport, arg_ask_password); r = sd_bus_call_method( @@ -1749,6 +1751,8 @@ static int clone_image(int argc, char *argv[], void *userdata) { sd_bus *bus = userdata; int r; + assert(bus); + polkit_agent_open_if_enabled(arg_transport, arg_ask_password); r = sd_bus_message_new_method_call( @@ -1778,6 +1782,8 @@ static int read_only_image(int argc, char *argv[], void *userdata) { sd_bus *bus = userdata; int b = true, r; + assert(bus); + if (argc > 2) { b = parse_boolean(argv[2]); if (b < 0) { diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c index c5e59c471..2eb97ebed 100644 --- a/src/machine/machined-dbus.c +++ b/src/machine/machined-dbus.c @@ -1327,7 +1327,7 @@ static int method_map_to_machine_user(sd_bus_message *message, void *userdata, s xsprintf(p, "/proc/" UID_FMT "/uid_map", machine->leader); f = fopen(p, "re"); if (!f) { - log_warning_errno(errno, "Failed top open %s, ignoring,", p); + log_warning_errno(errno, "Failed to open %s, ignoring,", p); continue; } @@ -1445,7 +1445,7 @@ static int method_map_to_machine_group(sd_bus_message *message, void *groupdata, xsprintf(p, "/proc/" GID_FMT "/gid_map", machine->leader); f = fopen(p, "re"); if (!f) { - log_warning_errno(errno, "Failed top open %s, ignoring,", p); + log_warning_errno(errno, "Failed to open %s, ignoring,", p); continue; } diff --git a/src/machine/machined.c b/src/machine/machined.c index 34b202404..9fb67882e 100644 --- a/src/machine/machined.c +++ b/src/machine/machined.c @@ -292,14 +292,14 @@ void manager_gc(Manager *m, bool drop_not_started) { machine->in_gc_queue = false; /* First, if we are not closing yet, initiate stopping */ - if (!machine_check_gc(machine, drop_not_started) && + if (machine_may_gc(machine, drop_not_started) && machine_get_state(machine) != MACHINE_CLOSING) machine_stop(machine); /* Now, the stop probably made this referenced * again, but if it didn't, then it's time to let it * go entirely. */ - if (!machine_check_gc(machine, drop_not_started)) { + if (machine_may_gc(machine, drop_not_started)) { machine_finalize(machine); machine_free(machine); } diff --git a/src/machine/meson.build b/src/machine/meson.build index 7ea5d9de8..b530ca637 100644 --- a/src/machine/meson.build +++ b/src/machine/meson.build @@ -43,15 +43,8 @@ if conf.get('ENABLE_MACHINED') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.machine1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.machine1.policy', - input : 'org.freedesktop.machine1.policy.in', - output : 'org.freedesktop.machine1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.machine1.policy', + install_dir : polkitpolicydir) endif tests += [ diff --git a/src/machine/org.freedesktop.machine1.policy.in b/src/machine/org.freedesktop.machine1.policy similarity index 66% rename from src/machine/org.freedesktop.machine1.policy.in rename to src/machine/org.freedesktop.machine1.policy index eeeeb4c0f..039c3d451 100644 --- a/src/machine/org.freedesktop.machine1.policy.in +++ b/src/machine/org.freedesktop.machine1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Log into a local container - Authentication is required to log into a local container. + Log into a local container + Authentication is required to log into a local container. auth_admin auth_admin @@ -29,8 +29,8 @@ - Log into the local host - Authentication is required to log into the local host. + Log into the local host + Authentication is required to log into the local host. auth_admin auth_admin @@ -39,8 +39,8 @@ - Acquire a shell in a local container - Authentication is required to acquire a shell in a local container. + Acquire a shell in a local container + Authentication is required to acquire a shell in a local container. auth_admin auth_admin @@ -50,8 +50,8 @@ - Acquire a shell on the local host - Authentication is required to acquire a shell on the local host. + Acquire a shell on the local host + Authentication is required to acquire a shell on the local host. auth_admin auth_admin @@ -61,8 +61,8 @@ - Acquire a pseudo TTY in a local container - Authentication is required to acquire a pseudo TTY in a local container. + Acquire a pseudo TTY in a local container + Authentication is required to acquire a pseudo TTY in a local container. auth_admin auth_admin @@ -71,8 +71,8 @@ - Acquire a pseudo TTY on the local host - Authentication is required to acquire a pseudo TTY on the local host. + Acquire a pseudo TTY on the local host + Authentication is required to acquire a pseudo TTY on the local host. auth_admin auth_admin @@ -81,8 +81,8 @@ - Manage local virtual machines and containers - Authentication is required to manage local virtual machines and containers. + Manage local virtual machines and containers + Authentication is required to manage local virtual machines and containers. auth_admin auth_admin @@ -92,8 +92,8 @@ - Manage local virtual machine and container images - Authentication is required to manage local virtual machine and container images. + Manage local virtual machine and container images + Authentication is required to manage local virtual machine and container images. auth_admin auth_admin diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c index 580e5e650..c9fd93171 100644 --- a/src/network/netdev/vxlan.c +++ b/src/network/netdev/vxlan.c @@ -198,20 +198,23 @@ int config_parse_vxlan_address(const char *unit, r = in_addr_is_multicast(f, &buffer); - if (STR_IN_SET(lvalue, "Group", "Remote")) { + if (streq(lvalue, "Group")) { if (r <= 0) { - log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan invalid multicast '%s' address, ignoring assignment: %s", lvalue, rvalue); + log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan %s invalid multicast address, ignoring assignment: %s", lvalue, rvalue); return 0; } v->remote_family = f; } else { if (r > 0) { - log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan %s can not be multicast address, ignoring assignment: %s", lvalue, rvalue); + log_syntax(unit, LOG_ERR, filename, line, 0, "vxlan %s cannot be a multicast address, ignoring assignment: %s", lvalue, rvalue); return 0; } - v->local_family = f; + if (streq(lvalue, "Remote")) + v->remote_family = f; + else + v->local_family = f; } *addr = buffer; diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 59ce098cd..14d8ecb03 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -56,49 +56,28 @@ static bool arg_no_pager = false; static bool arg_legend = true; static bool arg_all = false; -static int link_get_type_string(unsigned short iftype, sd_device *d, char **ret) { +static char *link_get_type_string(unsigned short iftype, sd_device *d) { const char *t; char *p; - assert(ret); - - if (iftype == ARPHRD_ETHER && d) { - const char *devtype = NULL, *id = NULL; - /* WLANs have iftype ARPHRD_ETHER, but we want - * to show a more useful type string for - * them */ + if (d) { + const char *devtype = NULL; (void) sd_device_get_devtype(d, &devtype); - - if (streq_ptr(devtype, "wlan")) - id = "wlan"; - else if (streq_ptr(devtype, "wwan")) - id = "wwan"; - - if (id) { - p = strdup(id); - if (!p) - return -ENOMEM; - - *ret = p; - return 1; - } + if (!isempty(devtype)) + return strdup(devtype); } t = arphrd_to_name(iftype); - if (!t) { - *ret = NULL; - return 0; - } + if (!t) + return NULL; p = strdup(t); if (!p) - return -ENOMEM; + return NULL; ascii_strlower(p); - *ret = p; - - return 0; + return p; } static void operational_state_to_color(const char *state, const char **on, const char **off) { @@ -323,7 +302,7 @@ static int list_links(int argc, char *argv[], void *userdata) { xsprintf(devid, "n%i", links[i].ifindex); (void) sd_device_new_from_device_id(&d, devid); - (void) link_get_type_string(links[i].iftype, d, &t); + t = link_get_type_string(links[i].iftype, d); printf("%3i %-16s %-18s %s%-11s%s %s%-10s%s\n", links[i].ifindex, links[i].name, strna(t), @@ -816,7 +795,7 @@ static int link_status_one( (void) sd_device_get_property_value(d, "ID_MODEL", &model); } - (void) link_get_type_string(info->iftype, d, &t); + t = link_get_type_string(info->iftype, d); (void) sd_network_link_get_network_file(info->ifindex, &network); diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index ca5b54bdb..7e722b1a2 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -776,7 +776,7 @@ int config_parse_address(const char *unit, if (!e && f == AF_INET) { r = in4_addr_default_prefixlen(&buffer.in, &n->prefixlen); if (r < 0) { - log_syntax(unit, LOG_ERR, filename, line, r, "Prefix length not specified, and a default one can not be deduced for '%s', ignoring assignment", address); + log_syntax(unit, LOG_ERR, filename, line, r, "Prefix length not specified, and a default one cannot be deduced for '%s', ignoring assignment", address); return 0; } } diff --git a/src/network/networkd-ipv6-proxy-ndp.c b/src/network/networkd-ipv6-proxy-ndp.c index 31b7c6b0f..1a357ac8e 100644 --- a/src/network/networkd-ipv6-proxy-ndp.c +++ b/src/network/networkd-ipv6-proxy-ndp.c @@ -142,7 +142,7 @@ int config_parse_ipv6_proxy_ndp_address( r = in_addr_is_null(AF_INET6, &buffer); if (r != 0) { log_syntax(unit, LOG_ERR, filename, line, r, - "IPv6 proxy NDP address can not be the ANY address, ignoring: %s", rvalue); + "IPv6 proxy NDP address cannot be the ANY address, ignoring: %s", rvalue); return 0; } diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 749b87f33..4f55c0172 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -1380,7 +1380,7 @@ static void dhcp6_prefixes_hash_func(const void *p, struct siphash *state) { static int dhcp6_prefixes_compare_func(const void *_a, const void *_b) { const struct in6_addr *a = _a, *b = _b; - return memcmp(&a, &b, sizeof(*a)); + return memcmp(a, b, sizeof(*a)); } static const struct hash_ops dhcp6_prefixes_hash_ops = { diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c index 2dc3de3f6..709ae2a0c 100644 --- a/src/network/networkd-network.c +++ b/src/network/networkd-network.c @@ -635,13 +635,13 @@ int config_parse_netdev(const char *unit, case NETDEV_KIND_VCAN: r = hashmap_put(network->stacked_netdevs, netdev->ifname, netdev); if (r < 0) { - log_syntax(unit, LOG_ERR, filename, line, r, "Can not add NetDev '%s' to network: %m", rvalue); + log_syntax(unit, LOG_ERR, filename, line, r, "Cannot add NetDev '%s' to network: %m", rvalue); return 0; } break; default: - assert_not_reached("Can not parse NetDev"); + assert_not_reached("Cannot parse NetDev"); } netdev_ref(netdev); @@ -894,12 +894,12 @@ int config_parse_ipv6token( r = in_addr_is_null(AF_INET6, &buffer); if (r != 0) { - log_syntax(unit, LOG_ERR, filename, line, r, "IPv6 token can not be the ANY address, ignoring: %s", rvalue); + log_syntax(unit, LOG_ERR, filename, line, r, "IPv6 token cannot be the ANY address, ignoring: %s", rvalue); return 0; } if ((buffer.in6.s6_addr32[0] | buffer.in6.s6_addr32[1]) != 0) { - log_syntax(unit, LOG_ERR, filename, line, 0, "IPv6 token can not be longer than 64 bits, ignoring: %s", rvalue); + log_syntax(unit, LOG_ERR, filename, line, 0, "IPv6 token cannot be longer than 64 bits, ignoring: %s", rvalue); return 0; } @@ -1072,7 +1072,7 @@ int config_parse_dhcp_server_dns( continue; } - m = realloc(n->dhcp_server_dns, (n->n_dhcp_server_dns + 1) * sizeof(struct in_addr)); + m = reallocarray(n->dhcp_server_dns, n->n_dhcp_server_dns + 1, sizeof(struct in_addr)); if (!m) return log_oom(); @@ -1120,7 +1120,7 @@ int config_parse_radv_dns( if (in_addr_from_string(AF_INET6, w, &a) >= 0) { struct in6_addr *m; - m = realloc(n->router_dns, (n->n_router_dns + 1) * sizeof(struct in6_addr)); + m = reallocarray(n->router_dns, n->n_router_dns + 1, sizeof(struct in6_addr)); if (!m) return log_oom(); @@ -1223,7 +1223,7 @@ int config_parse_dhcp_server_ntp( continue; } - m = realloc(n->dhcp_server_ntp, (n->n_dhcp_server_ntp + 1) * sizeof(struct in_addr)); + m = reallocarray(n->dhcp_server_ntp, n->n_dhcp_server_ntp + 1, sizeof(struct in_addr)); if (!m) return log_oom(); @@ -1273,7 +1273,7 @@ int config_parse_dns( continue; } - m = realloc(n->dns, (n->n_dns + 1) * sizeof(struct in_addr_data)); + m = reallocarray(n->dns, n->n_dns + 1, sizeof(struct in_addr_data)); if (!m) return log_oom(); diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c index c9236ea3d..0ee69114b 100644 --- a/src/nspawn/nspawn-mount.c +++ b/src/nspawn/nspawn-mount.c @@ -48,7 +48,7 @@ CustomMount* custom_mount_add(CustomMount **l, unsigned *n, CustomMountType t) { assert(t >= 0); assert(t < _CUSTOM_MOUNT_TYPE_MAX); - c = realloc_multiply(*l, (*n + 1), sizeof(CustomMount)); + c = reallocarray(*l, *n + 1, sizeof(CustomMount)); if (!c) return NULL; @@ -545,21 +545,21 @@ int mount_all(const char *dest, { "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ... */ { "/proc/sys/net", "/proc/sys/net", NULL, NULL, MS_BIND, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO|MOUNT_APPLY_APIVFS_NETNS }, /* (except for this) */ { NULL, "/proc/sys", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_FATAL|MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */ - { "/proc/sysrq-trigger", "/proc/sysrq-trigger", NULL, NULL, MS_BIND, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ... */ - { NULL, "/proc/sysrq-trigger", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */ + { "/proc/sysrq-trigger", "/proc/sysrq-trigger", NULL, NULL, MS_BIND, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* Bind mount first ... */ + { NULL, "/proc/sysrq-trigger", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, MOUNT_IN_USERNS|MOUNT_APPLY_APIVFS_RO }, /* ... then, make it r/o */ /* outer child mounts */ - { "tmpfs", "/tmp", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, MOUNT_FATAL }, + { "tmpfs", "/tmp", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, MOUNT_FATAL }, { "tmpfs", "/sys", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL|MOUNT_APPLY_APIVFS_NETNS }, { "sysfs", "/sys", "sysfs", NULL, MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL|MOUNT_APPLY_APIVFS_RO }, /* skipped if above was mounted */ - { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL }, /* skipped if above was mounted */ + { "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, MOUNT_FATAL }, /* skipped if above was mounted */ { "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, MOUNT_FATAL }, { "tmpfs", "/dev/shm", "tmpfs", "mode=1777", MS_NOSUID|MS_NODEV|MS_STRICTATIME, MOUNT_FATAL }, { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, MOUNT_FATAL }, #if HAVE_SELINUX - { "/sys/fs/selinux", "/sys/fs/selinux", NULL, NULL, MS_BIND, 0 }, /* Bind mount first */ - { NULL, "/sys/fs/selinux", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, 0 }, /* Then, make it r/o */ + { "/sys/fs/selinux", "/sys/fs/selinux", NULL, NULL, MS_BIND, 0 }, /* Bind mount first */ + { NULL, "/sys/fs/selinux", NULL, NULL, MS_BIND|MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_REMOUNT, 0 }, /* Then, make it r/o */ #endif }; @@ -634,56 +634,15 @@ int mount_all(const char *dest, return 0; } -static int parse_mount_bind_options(const char *options, unsigned long *mount_flags, char **mount_opts) { - const char *p = options; - unsigned long flags = *mount_flags; - char *opts = NULL; - int r; - - assert(options); - - for (;;) { - _cleanup_free_ char *word = NULL; - - r = extract_first_word(&p, &word, ",", 0); - if (r < 0) - return log_error_errno(r, "Failed to extract mount option: %m"); - if (r == 0) - break; - - if (streq(word, "rbind")) - flags |= MS_REC; - else if (streq(word, "norbind")) - flags &= ~MS_REC; - else { - log_error("Invalid bind mount option: %s", word); - return -EINVAL; - } - } - - *mount_flags = flags; - /* in the future mount_opts will hold string options for mount(2) */ - *mount_opts = opts; - - return 0; -} - static int mount_bind(const char *dest, CustomMount *m) { - _cleanup_free_ char *mount_opts = NULL, *where = NULL; - unsigned long mount_flags = MS_BIND | MS_REC; + _cleanup_free_ char *where = NULL; struct stat source_st, dest_st; int r; assert(dest); assert(m); - if (m->options) { - r = parse_mount_bind_options(m->options, &mount_flags, &mount_opts); - if (r < 0) - return r; - } - if (stat(m->source, &source_st) < 0) return log_error_errno(errno, "Failed to stat %s: %m", m->source); @@ -723,7 +682,7 @@ static int mount_bind(const char *dest, CustomMount *m) { } - r = mount_verbose(LOG_ERR, m->source, where, NULL, mount_flags, mount_opts); + r = mount_verbose(LOG_ERR, m->source, where, NULL, MS_BIND | MS_REC, m->options); if (r < 0) return r; diff --git a/src/nspawn/nspawn-setuid.c b/src/nspawn/nspawn-setuid.c index b08bcd988..2dee5f8ec 100644 --- a/src/nspawn/nspawn-setuid.c +++ b/src/nspawn/nspawn-setuid.c @@ -23,13 +23,16 @@ #include #include "alloc-util.h" +#include "def.h" #include "errno.h" #include "fd-util.h" +#include "fileio.h" #include "mkdir.h" #include "nspawn-setuid.h" #include "process-util.h" #include "signal-util.h" #include "string-util.h" +#include "strv.h" #include "user-util.h" #include "util.h" @@ -45,33 +48,18 @@ static int spawn_getent(const char *database, const char *key, pid_t *rpid) { return log_error_errno(errno, "Failed to allocate pipe: %m"); r = safe_fork("(getent)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid); - if (r < 0) + if (r < 0) { + safe_close_pair(pipe_fds); return r; + } if (r == 0) { - int nullfd; char *empty_env = NULL; - if (dup3(pipe_fds[1], STDOUT_FILENO, 0) < 0) + safe_close(pipe_fds[0]); + + if (rearrange_stdio(-1, pipe_fds[1], -1) < 0) _exit(EXIT_FAILURE); - if (pipe_fds[0] > 2) - safe_close(pipe_fds[0]); - if (pipe_fds[1] > 2) - safe_close(pipe_fds[1]); - - nullfd = open("/dev/null", O_RDWR); - if (nullfd < 0) - _exit(EXIT_FAILURE); - - if (dup3(nullfd, STDIN_FILENO, 0) < 0) - _exit(EXIT_FAILURE); - - if (dup3(nullfd, STDERR_FILENO, 0) < 0) - _exit(EXIT_FAILURE); - - if (nullfd > 2) - safe_close(nullfd); - close_all_fds(NULL, 0); execle("/usr/bin/getent", "getent", database, key, NULL, &empty_env); @@ -87,10 +75,10 @@ static int spawn_getent(const char *database, const char *key, pid_t *rpid) { } int change_uid_gid(const char *user, char **_home) { - char line[LINE_MAX], *x, *u, *g, *h; + char *x, *u, *g, *h; const char *word, *state; _cleanup_free_ uid_t *uids = NULL; - _cleanup_free_ char *home = NULL; + _cleanup_free_ char *home = NULL, *line = NULL; _cleanup_fclose_ FILE *f = NULL; _cleanup_close_ int fd = -1; unsigned n_uids = 0; @@ -102,7 +90,7 @@ int change_uid_gid(const char *user, char **_home) { assert(_home); - if (!user || streq(user, "root") || streq(user, "0")) { + if (!user || STR_IN_SET(user, "root", "0")) { /* Reset everything fully to 0, just in case */ r = reset_uid_gid(); @@ -118,21 +106,18 @@ int change_uid_gid(const char *user, char **_home) { if (fd < 0) return fd; - f = fdopen(fd, "r"); + f = fdopen(fd, "re"); if (!f) return log_oom(); fd = -1; - if (!fgets(line, sizeof(line), f)) { - if (!ferror(f)) { - log_error("Failed to resolve user %s.", user); - return -ESRCH; - } - - return log_error_errno(errno, "Failed to read from getent: %m"); + r = read_line(f, LONG_LINE_MAX, &line); + if (r == 0) { + log_error("Failed to resolve user %s.", user); + return -ESRCH; } - - truncate_nl(line); + if (r < 0) + return log_error_errno(r, "Failed to read from getent: %m"); (void) wait_for_terminate_and_check("getent passwd", pid, WAIT_LOG); @@ -195,27 +180,26 @@ int change_uid_gid(const char *user, char **_home) { if (!home) return log_oom(); + f = safe_fclose(f); + line = mfree(line); + /* Second, get group memberships */ fd = spawn_getent("initgroups", user, &pid); if (fd < 0) return fd; - fclose(f); - f = fdopen(fd, "r"); + f = fdopen(fd, "re"); if (!f) return log_oom(); fd = -1; - if (!fgets(line, sizeof(line), f)) { - if (!ferror(f)) { - log_error("Failed to resolve user %s.", user); - return -ESRCH; - } - - return log_error_errno(errno, "Failed to read from getent: %m"); + r = read_line(f, LONG_LINE_MAX, &line); + if (r == 0) { + log_error("Failed to resolve user %s.", user); + return -ESRCH; } - - truncate_nl(line); + if (r < 0) + return log_error_errno(r, "Failed to read from getent: %m"); (void) wait_for_terminate_and_check("getent initgroups", pid, WAIT_LOG); @@ -234,10 +218,8 @@ int change_uid_gid(const char *user, char **_home) { return log_oom(); r = parse_uid(c, &uids[n_uids++]); - if (r < 0) { - log_error("Failed to parse group data from getent."); - return -EIO; - } + if (r < 0) + return log_error_errno(r, "Failed to parse group data from getent: %m"); } r = mkdir_parents(home, 0775); diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 0f05ecff0..90f1c4184 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2233,10 +2233,8 @@ static int chase_symlinks_and_update(char **p, unsigned flags) { if (r < 0) return log_error_errno(r, "Failed to resolve path %s: %m", *p); - free(*p); - *p = chased; - - return 0; + free_and_replace(*p, chased); + return r; /* r might be an fd here in case we ever use CHASE_OPEN in flags */ } static int determine_uid_shift(const char *directory) { @@ -2584,23 +2582,15 @@ static int outer_child( return log_error_errno(errno, "PR_SET_PDEATHSIG failed: %m"); if (interactive) { - close_nointr(STDIN_FILENO); - close_nointr(STDOUT_FILENO); - close_nointr(STDERR_FILENO); + int terminal; - r = open_terminal(console, O_RDWR); - if (r != STDIN_FILENO) { - if (r >= 0) { - safe_close(r); - r = -EINVAL; - } + terminal = open_terminal(console, O_RDWR); + if (terminal < 0) + return log_error_errno(terminal, "Failed to open console: %m"); - return log_error_errno(r, "Failed to open console: %m"); - } - - if (dup2(STDIN_FILENO, STDOUT_FILENO) != STDOUT_FILENO || - dup2(STDIN_FILENO, STDERR_FILENO) != STDERR_FILENO) - return log_error_errno(errno, "Failed to duplicate console: %m"); + r = rearrange_stdio(terminal, terminal, terminal); /* invalidates 'terminal' on success and failure */ + if (r < 0) + return log_error_errno(r, "Failed to move console to stdin/stdout/stderr: %m"); } r = reset_audit_loginuid(); diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index b2f46e3db..8a665cba3 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -575,6 +575,8 @@ fail: return NSS_STATUS_UNAVAIL; } +#pragma GCC diagnostic ignored "-Wsizeof-pointer-memaccess" + enum nss_status _nss_mymachines_getgrnam_r( const char *name, struct group *gr, diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c index f75405d2e..c502b5f5f 100644 --- a/src/nss-systemd/nss-systemd.c +++ b/src/nss-systemd/nss-systemd.c @@ -328,6 +328,8 @@ fail: return NSS_STATUS_UNAVAIL; } +#pragma GCC diagnostic ignored "-Wsizeof-pointer-memaccess" + enum nss_status _nss_systemd_getgrnam_r( const char *name, struct group *gr, diff --git a/src/resolve/meson.build b/src/resolve/meson.build index 15752d24f..16ba83ef8 100644 --- a/src/resolve/meson.build +++ b/src/resolve/meson.build @@ -154,6 +154,8 @@ if conf.get('ENABLE_RESOLVE') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.resolve1.service', install_dir : dbussystemservicedir) + install_data('org.freedesktop.resolve1.policy', + install_dir : polkitpolicydir) resolved_conf = configure_file( input : 'resolved.conf.in', @@ -164,15 +166,6 @@ if conf.get('ENABLE_RESOLVE') == 1 install_data('resolv.conf', install_dir : rootlibexecdir) - - i18n.merge_file( - 'org.freedesktop.resolve1.policy', - input : 'org.freedesktop.resolve1.policy.in', - output : 'org.freedesktop.resolve1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) endif tests += [ diff --git a/src/resolve/org.freedesktop.resolve1.policy.in b/src/resolve/org.freedesktop.resolve1.policy similarity index 78% rename from src/resolve/org.freedesktop.resolve1.policy.in rename to src/resolve/org.freedesktop.resolve1.policy index da948eb0b..b65ba3e56 100644 --- a/src/resolve/org.freedesktop.resolve1.policy.in +++ b/src/resolve/org.freedesktop.resolve1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Register a DNS-SD service - Authentication is required to register a DNS-SD service + Register a DNS-SD service + Authentication is required to register a DNS-SD service auth_admin auth_admin @@ -30,8 +30,8 @@ - Unregister a DNS-SD service - Authentication is required to unregister a DNS-SD service + Unregister a DNS-SD service + Authentication is required to unregister a DNS-SD service auth_admin auth_admin diff --git a/src/resolve/resolve-tool.c b/src/resolve/resolve-tool.c index 2a6bf9407..fce86d1e7 100644 --- a/src/resolve/resolve-tool.c +++ b/src/resolve/resolve-tool.c @@ -88,7 +88,7 @@ static char *arg_set_dnssec = NULL; static char **arg_set_nta = NULL; static ServiceFamily service_family_from_string(const char *s) { - if (s == NULL || streq(s, "tcp")) + if (!s || streq(s, "tcp")) return SERVICE_FAMILY_TCP; if (streq(s, "udp")) return SERVICE_FAMILY_UDP; @@ -1940,12 +1940,10 @@ static int parse_argv(int argc, char *argv[]) { arg_family = AF_INET6; break; - case 'i': { - int ifi; + case 'i': + if (parse_ifindex(optarg, &arg_ifindex) < 0) { + int ifi; - if (parse_ifindex(optarg, &ifi) >= 0) - arg_ifindex = ifi; - else { ifi = if_nametoindex(optarg); if (ifi <= 0) return log_error_errno(errno, "Unknown interface %s: %m", optarg); @@ -1954,7 +1952,6 @@ static int parse_argv(int argc, char *argv[]) { } break; - } case 't': if (streq(optarg, "help")) { @@ -2116,7 +2113,7 @@ static int parse_argv(int argc, char *argv[]) { if (r < 0) return log_error_errno(r, "Failed to parse DNS server address: %s", optarg); - n = realloc(arg_set_dns, sizeof(struct in_addr_data) * (arg_n_set_dns + 1)); + n = reallocarray(arg_set_dns, arg_n_set_dns + 1, sizeof(struct in_addr_data)); if (!n) return log_oom(); arg_set_dns = n; @@ -2134,8 +2131,10 @@ static int parse_argv(int argc, char *argv[]) { r = dns_name_is_valid(p); if (r < 0) return log_error_errno(r, "Failed to validate specified domain %s: %m", p); - if (r == 0) - return log_error_errno(r, "Domain not valid: %s", p); + if (r == 0) { + log_error("Domain not valid: %s", p); + return -EINVAL; + } r = strv_extend(&arg_set_domain, optarg); if (r < 0) @@ -2173,8 +2172,10 @@ static int parse_argv(int argc, char *argv[]) { r = dns_name_is_valid(optarg); if (r < 0) return log_error_errno(r, "Failed to validate specified domain %s: %m", optarg); - if (r == 0) - return log_error_errno(r, "Domain not valid: %s", optarg); + if (r == 0) { + log_error("Domain not valid: %s", optarg); + return -EINVAL; + } r = strv_extend(&arg_set_nta, optarg); if (r < 0) @@ -2415,7 +2416,6 @@ int main(int argc, char **argv) { break; - case MODE_SET_LINK: if (argc > optind) { log_error("Too many arguments."); diff --git a/src/resolve/resolved-dns-dnssec.c b/src/resolve/resolved-dns-dnssec.c index e3eca7e62..1bd2c93a3 100644 --- a/src/resolve/resolved-dns-dnssec.c +++ b/src/resolve/resolved-dns-dnssec.c @@ -716,7 +716,7 @@ int dnssec_verify_rrset( uint8_t wire_format_name[DNS_WIRE_FOMAT_HOSTNAME_MAX]; DnsResourceRecord **list, *rr; const char *source, *name; - gcry_md_hd_t md = NULL; + _cleanup_(gcry_md_closep) gcry_md_hd_t md = NULL; int r, md_algorithm; size_t k, n = 0; size_t sig_size = 0; @@ -841,13 +841,13 @@ int dnssec_verify_rrset( r = dns_name_to_wire_format(rrsig->rrsig.signer, wire_format_name, sizeof(wire_format_name), true); if (r < 0) - goto finish; + return r; fwrite(wire_format_name, 1, r, f); /* Convert the source of synthesis into wire format */ r = dns_name_to_wire_format(source, wire_format_name, sizeof(wire_format_name), true); if (r < 0) - goto finish; + return r; for (k = 0; k < n; k++) { size_t l; @@ -885,26 +885,20 @@ int dnssec_verify_rrset( #endif case DNSSEC_ALGORITHM_ED448: *result = DNSSEC_UNSUPPORTED_ALGORITHM; - r = 0; - goto finish; + return 0; default: /* OK, the RRs are now in canonical order. Let's calculate the digest */ md_algorithm = algorithm_to_gcrypt_md(rrsig->rrsig.algorithm); if (md_algorithm == -EOPNOTSUPP) { *result = DNSSEC_UNSUPPORTED_ALGORITHM; - r = 0; - goto finish; - } - if (md_algorithm < 0) { - r = md_algorithm; - goto finish; + return 0; } + if (md_algorithm < 0) + return md_algorithm; gcry_md_open(&md, md_algorithm, 0); - if (!md) { - r = -EIO; - goto finish; - } + if (!md) + return -EIO; hash_size = gcry_md_get_algo_dlen(md_algorithm); assert(hash_size > 0); @@ -912,10 +906,8 @@ int dnssec_verify_rrset( gcry_md_write(md, sig_data, sig_size); hash = gcry_md_read(md, 0); - if (!hash) { - r = -EIO; - goto finish; - } + if (!hash) + return -EIO; } switch (rrsig->rrsig.algorithm) { @@ -950,9 +942,8 @@ int dnssec_verify_rrset( break; #endif } - if (r < 0) - goto finish; + return r; /* Now, fix the ttl, expiry, and remember the synthesizing source and the signer */ if (r > 0) @@ -965,13 +956,7 @@ int dnssec_verify_rrset( else *result = DNSSEC_VALIDATED; - r = 0; - -finish: - if (md) - gcry_md_close(md); - - return r; + return 0; } int dnssec_rrsig_match_dnskey(DnsResourceRecord *rrsig, DnsResourceRecord *dnskey, bool revoked_ok) { @@ -1182,7 +1167,7 @@ static int digest_to_gcrypt_md(uint8_t algorithm) { int dnssec_verify_dnskey_by_ds(DnsResourceRecord *dnskey, DnsResourceRecord *ds, bool mask_revoke) { char owner_name[DNSSEC_CANONICAL_HOSTNAME_MAX]; - gcry_md_hd_t md = NULL; + _cleanup_(gcry_md_closep) gcry_md_hd_t md = NULL; size_t hash_size; int md_algorithm, r; void *result; @@ -1238,16 +1223,10 @@ int dnssec_verify_dnskey_by_ds(DnsResourceRecord *dnskey, DnsResourceRecord *ds, gcry_md_write(md, dnskey->dnskey.key, dnskey->dnskey.key_size); result = gcry_md_read(md, 0); - if (!result) { - r = -EIO; - goto finish; - } + if (!result) + return -EIO; - r = memcmp(result, ds->ds.digest, ds->ds.digest_size) != 0; - -finish: - gcry_md_close(md); - return r; + return memcmp(result, ds->ds.digest, ds->ds.digest_size) != 0; } int dnssec_verify_dnskey_by_ds_search(DnsResourceRecord *dnskey, DnsAnswer *validated_ds) { diff --git a/src/resolve/resolved-resolv-conf.c b/src/resolve/resolved-resolv-conf.c index bad04d6a2..c828e9201 100644 --- a/src/resolve/resolved-resolv-conf.c +++ b/src/resolve/resolved-resolv-conf.c @@ -68,6 +68,7 @@ int manager_read_resolv_conf(Manager *m) { _cleanup_fclose_ FILE *f = NULL; struct stat st; char line[LINE_MAX]; + unsigned n = 0; int r; assert(m); @@ -118,8 +119,10 @@ int manager_read_resolv_conf(Manager *m) { const char *a; char *l; + n++; + l = strstrip(line); - if (IN_SET(*l, '#', ';')) + if (IN_SET(*l, '#', ';', 0)) continue; a = first_word(l, "nameserver"); @@ -139,6 +142,8 @@ int manager_read_resolv_conf(Manager *m) { if (r < 0) log_warning_errno(r, "Failed to parse search domain string '%s', ignoring.", a); } + + log_syntax(NULL, LOG_DEBUG, "/etc/resolv.conf", n, 0, "Ignoring resolv.conf line: %s", l); } m->resolv_conf_mtime = timespec_load(&st.st_mtim); diff --git a/src/shared/ask-password-api.c b/src/shared/ask-password-api.c index 99d6a9b14..4fa918895 100644 --- a/src/shared/ask-password-api.c +++ b/src/shared/ask-password-api.c @@ -201,7 +201,29 @@ static void backspace_chars(int ttyfd, size_t p) { } } +static void backspace_string(int ttyfd, const char *str) { + size_t m; + + assert(str); + + if (ttyfd < 0) + return; + + /* Backspaces through enough characters to entirely undo printing of the specified string. */ + + m = utf8_n_codepoints(str); + if (m == (size_t) -1) + m = strlen(str); /* Not a valid UTF-8 string? If so, let's backspace the number of bytes output. Most + * likely this happened because we are not in an UTF-8 locale, and in that case that + * is the correct thing to do. And even if it's not, terminals tend to stop + * backspacing at the leftmost column, hence backspacing too much should be mostly + * OK. */ + + backspace_chars(ttyfd, m); +} + int ask_password_tty( + int ttyfd, const char *message, const char *keyname, usec_t until, @@ -209,19 +231,20 @@ int ask_password_tty( const char *flag_file, char **ret) { - struct termios old_termios, new_termios; - char passphrase[LINE_MAX + 1] = {}, *x; - size_t p = 0, codepoint = 0; - int r; - _cleanup_close_ int ttyfd = -1, notify = -1; - struct pollfd pollfd[2]; - bool reset_tty = false; - bool dirty = false; enum { POLL_TTY, - POLL_INOTIFY + POLL_INOTIFY, + _POLL_MAX, }; + bool reset_tty = false, dirty = false, use_color = false; + _cleanup_close_ int cttyfd = -1, notify = -1; + struct termios old_termios, new_termios; + char passphrase[LINE_MAX + 1] = {}, *x; + struct pollfd pollfd[_POLL_MAX]; + size_t p = 0, codepoint = 0; + int r; + assert(ret); if (flags & ASK_PASSWORD_NO_TTY) @@ -232,33 +255,34 @@ int ask_password_tty( if (flag_file) { notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK); - if (notify < 0) { - r = -errno; - goto finish; - } + if (notify < 0) + return -errno; - if (inotify_add_watch(notify, flag_file, IN_ATTRIB /* for the link count */) < 0) { - r = -errno; - goto finish; - } + if (inotify_add_watch(notify, flag_file, IN_ATTRIB /* for the link count */) < 0) + return -errno; } - ttyfd = open("/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC); + /* If the caller didn't specify a TTY, then use the controlling tty, if we can. */ + if (ttyfd < 0) + ttyfd = cttyfd = open("/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC); + if (ttyfd >= 0) { + if (tcgetattr(ttyfd, &old_termios) < 0) + return -errno; - if (tcgetattr(ttyfd, &old_termios) < 0) { - r = -errno; - goto finish; - } + if (flags & ASK_PASSWORD_CONSOLE_COLOR) + use_color = dev_console_colors_enabled(); + else + use_color = colors_enabled(); - if (colors_enabled()) - loop_write(ttyfd, ANSI_HIGHLIGHT, - STRLEN(ANSI_HIGHLIGHT), false); - loop_write(ttyfd, message, strlen(message), false); - loop_write(ttyfd, " ", 1, false); - if (colors_enabled()) - loop_write(ttyfd, ANSI_NORMAL, STRLEN(ANSI_NORMAL), - false); + if (use_color) + (void) loop_write(ttyfd, ANSI_HIGHLIGHT, STRLEN(ANSI_HIGHLIGHT), false); + + (void) loop_write(ttyfd, message, strlen(message), false); + (void) loop_write(ttyfd, " ", 1, false); + + if (use_color) + (void) loop_write(ttyfd, ANSI_NORMAL, STRLEN(ANSI_NORMAL), false); new_termios = old_termios; new_termios.c_lflag &= ~(ICANON|ECHO); @@ -273,16 +297,19 @@ int ask_password_tty( reset_tty = true; } - zero(pollfd); - pollfd[POLL_TTY].fd = ttyfd >= 0 ? ttyfd : STDIN_FILENO; - pollfd[POLL_TTY].events = POLLIN; - pollfd[POLL_INOTIFY].fd = notify; - pollfd[POLL_INOTIFY].events = POLLIN; + pollfd[POLL_TTY] = (struct pollfd) { + .fd = ttyfd >= 0 ? ttyfd : STDIN_FILENO, + .events = POLLIN, + }; + pollfd[POLL_INOTIFY] = (struct pollfd) { + .fd = notify, + .events = POLLIN, + }; for (;;) { - char c; int sleep_for = -1, k; ssize_t n; + char c; if (until > 0) { usec_t y; @@ -294,7 +321,7 @@ int ask_password_tty( goto finish; } - sleep_for = (int) ((until - y) / USEC_PER_MSEC); + sleep_for = (int) DIV_ROUND_UP(until - y, USEC_PER_MSEC); } if (flag_file) @@ -329,72 +356,99 @@ int ask_password_tty( r = -errno; goto finish; - } else if (n == 0) + } + + /* We treat EOF, newline and NUL byte all as valid end markers */ + if (n == 0 || c == '\n' || c == 0) break; - if (c == '\n') - break; - else if (c == 21) { /* C-u */ + if (c == 21) { /* C-u */ if (!(flags & ASK_PASSWORD_SILENT)) - backspace_chars(ttyfd, p); - p = 0; + backspace_string(ttyfd, passphrase); + + explicit_bzero(passphrase, sizeof(passphrase)); + p = codepoint = 0; } else if (IN_SET(c, '\b', 127)) { if (p > 0) { + size_t q; if (!(flags & ASK_PASSWORD_SILENT)) backspace_chars(ttyfd, 1); - p--; + /* Remove a full UTF-8 codepoint from the end. For that, figure out where the last one + * begins */ + q = 0; + for (;;) { + size_t z; + + z = utf8_encoded_valid_unichar(passphrase + q); + if (z == 0) { + q = (size_t) -1; /* Invalid UTF8! */ + break; + } + + if (q + z >= p) /* This one brings us over the edge */ + break; + + q += z; + } + + p = codepoint = q == (size_t) -1 ? p - 1 : q; + explicit_bzero(passphrase + p, sizeof(passphrase) - p); + } else if (!dirty && !(flags & ASK_PASSWORD_SILENT)) { flags |= ASK_PASSWORD_SILENT; - /* There are two ways to enter silent - * mode. Either by pressing backspace - * as first key (and only as first - * key), or ... */ + /* There are two ways to enter silent mode. Either by pressing backspace as first key + * (and only as first key), or ... */ + if (ttyfd >= 0) - loop_write(ttyfd, "(no echo) ", 10, false); + (void) loop_write(ttyfd, "(no echo) ", 10, false); } else if (ttyfd >= 0) - loop_write(ttyfd, "\a", 1, false); + (void) loop_write(ttyfd, "\a", 1, false); } else if (c == '\t' && !(flags & ASK_PASSWORD_SILENT)) { - backspace_chars(ttyfd, p); + backspace_string(ttyfd, passphrase); flags |= ASK_PASSWORD_SILENT; /* ... or by pressing TAB at any time. */ if (ttyfd >= 0) - loop_write(ttyfd, "(no echo) ", 10, false); - } else { - if (p >= sizeof(passphrase)-1) { - loop_write(ttyfd, "\a", 1, false); - continue; - } + (void) loop_write(ttyfd, "(no echo) ", 10, false); + } else if (p >= sizeof(passphrase)-1) { + + /* Reached the size limit */ + if (ttyfd >= 0) + (void) loop_write(ttyfd, "\a", 1, false); + + } else { passphrase[p++] = c; if (!(flags & ASK_PASSWORD_SILENT) && ttyfd >= 0) { + /* Check if we got a complete UTF-8 character now. If so, let's output one '*'. */ n = utf8_encoded_valid_unichar(passphrase + codepoint); if (n >= 0) { codepoint = p; - loop_write(ttyfd, (flags & ASK_PASSWORD_ECHO) ? &c : "*", 1, false); + (void) loop_write(ttyfd, (flags & ASK_PASSWORD_ECHO) ? &c : "*", 1, false); } } dirty = true; } + /* Let's forget this char, just to not keep needlessly copies of key material around */ c = 'x'; } x = strndup(passphrase, p); - explicit_bzero(passphrase, p); + explicit_bzero(passphrase, sizeof(passphrase)); if (!x) { r = -ENOMEM; goto finish; @@ -408,8 +462,8 @@ int ask_password_tty( finish: if (ttyfd >= 0 && reset_tty) { - loop_write(ttyfd, "\n", 1, false); - tcsetattr(ttyfd, TCSADRAIN, &old_termios); + (void) loop_write(ttyfd, "\n", 1, false); + (void) tcsetattr(ttyfd, TCSADRAIN, &old_termios); } return r; @@ -715,7 +769,7 @@ int ask_password_auto( if (!(flags & ASK_PASSWORD_NO_TTY) && isatty(STDIN_FILENO)) { char *s = NULL, **l = NULL; - r = ask_password_tty(message, keyname, until, flags, NULL, &s); + r = ask_password_tty(-1, message, keyname, until, flags, NULL, &s); if (r < 0) return r; diff --git a/src/shared/ask-password-api.h b/src/shared/ask-password-api.h index f3ca6743a..4b2eb3fe9 100644 --- a/src/shared/ask-password-api.h +++ b/src/shared/ask-password-api.h @@ -25,15 +25,16 @@ #include "time-util.h" typedef enum AskPasswordFlags { - ASK_PASSWORD_ACCEPT_CACHED = 1, - ASK_PASSWORD_PUSH_CACHE = 2, - ASK_PASSWORD_ECHO = 4, /* show the password literally while reading, instead of "*" */ - ASK_PASSWORD_SILENT = 8, /* do no show any password at all while reading */ - ASK_PASSWORD_NO_TTY = 16, - ASK_PASSWORD_NO_AGENT = 32, + ASK_PASSWORD_ACCEPT_CACHED = 1U << 0, + ASK_PASSWORD_PUSH_CACHE = 1U << 1, + ASK_PASSWORD_ECHO = 1U << 2, /* show the password literally while reading, instead of "*" */ + ASK_PASSWORD_SILENT = 1U << 3, /* do no show any password at all while reading */ + ASK_PASSWORD_NO_TTY = 1U << 4, + ASK_PASSWORD_NO_AGENT = 1U << 5, + ASK_PASSWORD_CONSOLE_COLOR = 1U << 6, /* Use color if /dev/console points to a console that supports color */ } AskPasswordFlags; -int ask_password_tty(const char *message, const char *keyname, usec_t until, AskPasswordFlags flags, const char *flag_file, char **ret); +int ask_password_tty(int tty_fd, const char *message, const char *keyname, usec_t until, AskPasswordFlags flags, const char *flag_file, char **ret); int ask_password_agent(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret); int ask_password_keyring(const char *keyname, AskPasswordFlags flags, char ***ret); int ask_password_auto(const char *message, const char *icon, const char *id, const char *keyname, usec_t until, AskPasswordFlags flag, char ***ret); diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 9c3bdd47d..0e3e17a77 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -79,8 +79,8 @@ int boot_entry_load(const char *path, BootEntry *entry) { return log_error_errno(errno, "Failed to open \"%s\": %m", path); for (;;) { - _cleanup_free_ char *buf = NULL; - char *p; + _cleanup_free_ char *buf = NULL, *field = NULL; + const char *p; r = read_line(f, LONG_LINE_MAX, &buf); if (r == 0) @@ -95,34 +95,37 @@ int boot_entry_load(const char *path, BootEntry *entry) { if (IN_SET(*strstrip(buf), '#', '\0')) continue; - p = strchr(buf, ' '); - if (!p) { + p = buf; + r = extract_first_word(&p, &field, " \t", 0); + if (r < 0) { + log_error_errno(r, "Failed to parse config file %s line %u: %m", path, line); + continue; + } + if (r == 0) { log_warning("%s:%u: Bad syntax", path, line); continue; } - *p = '\0'; - p = strstrip(p + 1); - if (streq(buf, "title")) + if (streq(field, "title")) r = free_and_strdup(&tmp.title, p); - else if (streq(buf, "version")) + else if (streq(field, "version")) r = free_and_strdup(&tmp.version, p); - else if (streq(buf, "machine-id")) + else if (streq(field, "machine-id")) r = free_and_strdup(&tmp.machine_id, p); - else if (streq(buf, "architecture")) + else if (streq(field, "architecture")) r = free_and_strdup(&tmp.architecture, p); - else if (streq(buf, "options")) + else if (streq(field, "options")) r = strv_extend(&tmp.options, p); - else if (streq(buf, "linux")) + else if (streq(field, "linux")) r = free_and_strdup(&tmp.kernel, p); - else if (streq(buf, "efi")) + else if (streq(field, "efi")) r = free_and_strdup(&tmp.efi, p); - else if (streq(buf, "initrd")) + else if (streq(field, "initrd")) r = strv_extend(&tmp.initrd, p); - else if (streq(buf, "devicetree")) + else if (streq(field, "devicetree")) r = free_and_strdup(&tmp.device_tree, p); else { - log_notice("%s:%u: Unknown line \"%s\"", path, line, buf); + log_notice("%s:%u: Unknown line \"%s\"", path, line, field); continue; } if (r < 0) @@ -164,8 +167,8 @@ int boot_loader_read_conf(const char *path, BootConfig *config) { return log_error_errno(errno, "Failed to open \"%s\": %m", path); for (;;) { - _cleanup_free_ char *buf = NULL; - char *p; + _cleanup_free_ char *buf = NULL, *field = NULL; + const char *p; r = read_line(f, LONG_LINE_MAX, &buf); if (r == 0) @@ -180,22 +183,25 @@ int boot_loader_read_conf(const char *path, BootConfig *config) { if (IN_SET(*strstrip(buf), '#', '\0')) continue; - p = strchr(buf, ' '); - if (!p) { + p = buf; + r = extract_first_word(&p, &field, " \t", 0); + if (r < 0) { + log_error_errno(r, "Failed to parse config file %s line %u: %m", path, line); + continue; + } + if (r == 0) { log_warning("%s:%u: Bad syntax", path, line); continue; } - *p = '\0'; - p = strstrip(p + 1); - if (streq(buf, "default")) + if (streq(field, "default")) r = free_and_strdup(&config->default_pattern, p); - else if (streq(buf, "timeout")) + else if (streq(field, "timeout")) r = free_and_strdup(&config->timeout, p); - else if (streq(buf, "editor")) + else if (streq(field, "editor")) r = free_and_strdup(&config->editor, p); else { - log_notice("%s:%u: Unknown line \"%s\"", path, line, buf); + log_notice("%s:%u: Unknown line \"%s\"", path, line, field); continue; } if (r < 0) diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index bc77c3abd..54b2137c9 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -1135,6 +1135,62 @@ static int bus_append_execute_property(sd_bus_message *m, const char *field, con return 1; } + if (streq(field, "TemporaryFileSystem")) { + const char *p = eq; + + r = sd_bus_message_open_container(m, SD_BUS_TYPE_STRUCT, "sv"); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_append_basic(m, SD_BUS_TYPE_STRING, field); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_open_container(m, 'v', "a(ss)"); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_open_container(m, 'a', "(ss)"); + if (r < 0) + return bus_log_create_error(r); + + for (;;) { + _cleanup_free_ char *word = NULL, *path = NULL; + const char *w; + + r = extract_first_word(&p, &word, NULL, EXTRACT_QUOTES); + if (r < 0) + return log_error_errno(r, "Failed to parse argument: %m"); + if (r == 0) + break; + + w = word; + r = extract_first_word(&w, &path, ":", EXTRACT_DONT_COALESCE_SEPARATORS); + if (r < 0) + return log_error_errno(r, "Failed to parse argument: %m"); + if (r == 0) + return log_error("Failed to parse argument: %m"); + + r = sd_bus_message_append(m, "(ss)", path, w); + if (r < 0) + return bus_log_create_error(r); + } + + r = sd_bus_message_close_container(m); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_close_container(m); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_close_container(m); + if (r < 0) + return bus_log_create_error(r); + + return 1; + } + return 0; } @@ -1263,13 +1319,13 @@ static int bus_append_service_property(sd_bus_message *m, const char *field, con if (val < 0) return log_error_errno(r, "Invalid status or signal %s in %s: %m", word, field); - signal = realloc_multiply(signal, sizeof(int), sz_signal + 1); + signal = reallocarray(signal, sz_signal + 1, sizeof(int)); if (!signal) return log_oom(); signal[sz_signal++] = val; } else { - status = realloc_multiply(status, sizeof(int), sz_status + 1); + status = reallocarray(status, sz_status + 1, sizeof(int)); if (!status) return log_oom(); @@ -2369,7 +2425,7 @@ int unit_show_processes( if (r < 0) return r; - cgroups = hashmap_new(&string_hash_ops); + cgroups = hashmap_new(&path_hash_ops); if (!cgroups) return -ENOMEM; diff --git a/src/shared/conf-parser.c b/src/shared/conf-parser.c index daddb7cf2..15cfe4e4f 100644 --- a/src/shared/conf-parser.c +++ b/src/shared/conf-parser.c @@ -1021,3 +1021,119 @@ int config_parse_ip_port( return 0; } + +int config_parse_join_controllers( + const char *unit, + const char *filename, + unsigned line, + const char *section, + unsigned section_line, + const char *lvalue, + int ltype, + const char *rvalue, + void *data, + void *userdata) { + + char ****ret = data; + const char *whole_rvalue = rvalue; + unsigned n = 0; + _cleanup_(strv_free_freep) char ***controllers = NULL; + + assert(filename); + assert(lvalue); + assert(rvalue); + assert(ret); + + for (;;) { + _cleanup_free_ char *word = NULL; + char **l; + int r; + + r = extract_first_word(&rvalue, &word, NULL, EXTRACT_QUOTES); + if (r < 0) { + log_syntax(unit, LOG_ERR, filename, line, r, "Invalid value for %s: %s", lvalue, whole_rvalue); + return r; + } + if (r == 0) + break; + + l = strv_split(word, ","); + if (!l) + return log_oom(); + strv_uniq(l); + + if (strv_length(l) <= 1) { + strv_free(l); + continue; + } + + if (!controllers) { + controllers = new(char**, 2); + if (!controllers) { + strv_free(l); + return log_oom(); + } + + controllers[0] = l; + controllers[1] = NULL; + + n = 1; + } else { + char ***a; + char ***t; + + t = new0(char**, n+2); + if (!t) { + strv_free(l); + return log_oom(); + } + + n = 0; + + for (a = controllers; *a; a++) + if (strv_overlap(*a, l)) { + if (strv_extend_strv(&l, *a, false) < 0) { + strv_free(l); + strv_free_free(t); + return log_oom(); + } + + } else { + char **c; + + c = strv_copy(*a); + if (!c) { + strv_free(l); + strv_free_free(t); + return log_oom(); + } + + t[n++] = c; + } + + t[n++] = strv_uniq(l); + + strv_free_free(controllers); + controllers = t; + } + } + if (!isempty(rvalue)) + log_syntax(unit, LOG_ERR, filename, line, 0, "Trailing garbage, ignoring."); + + /* As a special case, return a single empty strv, to override the default */ + if (!controllers) { + controllers = new(char**, 2); + if (!controllers) + return log_oom(); + controllers[0] = strv_new(NULL, NULL); + if (!controllers[0]) + return log_oom(); + controllers[1] = NULL; + } + + strv_free_free(*ret); + *ret = controllers; + controllers = NULL; + + return 0; +} diff --git a/src/shared/conf-parser.h b/src/shared/conf-parser.h index 2fd135baa..908f53071 100644 --- a/src/shared/conf-parser.h +++ b/src/shared/conf-parser.h @@ -121,44 +121,46 @@ int config_parse_many( void *userdata); /* Generic parsers */ -int config_parse_int(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_unsigned(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_long(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_uint8(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_uint16(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_uint32(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_uint64(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_double(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_iec_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_si_size(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_iec_uint64(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_bool(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_tristate(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_string(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_path(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_strv(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_sec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_nsec(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_mode(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_log_facility(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_log_level(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_signal(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_personality(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_ifname(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); -int config_parse_ip_port(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata); +#define GENERIC_PARSER_ARGS \ + const char *unit, \ + const char *filename, \ + unsigned line, \ + const char *section, \ + unsigned section_line, \ + const char *lvalue, \ + int ltype, \ + const char *rvalue, \ + void *data, \ + void *userdata +int config_parse_int(GENERIC_PARSER_ARGS); +int config_parse_unsigned(GENERIC_PARSER_ARGS); +int config_parse_long(GENERIC_PARSER_ARGS); +int config_parse_uint8(GENERIC_PARSER_ARGS); +int config_parse_uint16(GENERIC_PARSER_ARGS); +int config_parse_uint32(GENERIC_PARSER_ARGS); +int config_parse_uint64(GENERIC_PARSER_ARGS); +int config_parse_double(GENERIC_PARSER_ARGS); +int config_parse_iec_size(GENERIC_PARSER_ARGS); +int config_parse_si_size(GENERIC_PARSER_ARGS); +int config_parse_iec_uint64(GENERIC_PARSER_ARGS); +int config_parse_bool(GENERIC_PARSER_ARGS); +int config_parse_tristate(GENERIC_PARSER_ARGS); +int config_parse_string(GENERIC_PARSER_ARGS); +int config_parse_path(GENERIC_PARSER_ARGS); +int config_parse_strv(GENERIC_PARSER_ARGS); +int config_parse_sec(GENERIC_PARSER_ARGS); +int config_parse_nsec(GENERIC_PARSER_ARGS); +int config_parse_mode(GENERIC_PARSER_ARGS); +int config_parse_log_facility(GENERIC_PARSER_ARGS); +int config_parse_log_level(GENERIC_PARSER_ARGS); +int config_parse_signal(GENERIC_PARSER_ARGS); +int config_parse_personality(GENERIC_PARSER_ARGS); +int config_parse_ifname(GENERIC_PARSER_ARGS); +int config_parse_ip_port(GENERIC_PARSER_ARGS); +int config_parse_join_controllers(GENERIC_PARSER_ARGS); #define DEFINE_CONFIG_PARSE_ENUM(function,name,type,msg) \ - int function(const char *unit, \ - const char *filename, \ - unsigned line, \ - const char *section, \ - unsigned section_line, \ - const char *lvalue, \ - int ltype, \ - const char *rvalue, \ - void *data, \ - void *userdata) { \ - \ + int function(GENERIC_PARSER_ARGS) { \ type *i = data, x; \ \ assert(filename); \ @@ -177,17 +179,7 @@ int config_parse_ip_port(const char *unit, const char *filename, unsigned line, } #define DEFINE_CONFIG_PARSE_ENUMV(function,name,type,invalid,msg) \ - int function(const char *unit, \ - const char *filename, \ - unsigned line, \ - const char *section, \ - unsigned section_line, \ - const char *lvalue, \ - int ltype, \ - const char *rvalue, \ - void *data, \ - void *userdata) { \ - \ + int function(GENERIC_PARSER_ARGS) { \ type **enums = data, x, *ys; \ _cleanup_free_ type *xs = NULL; \ const char *word, *state; \ diff --git a/src/shared/install.c b/src/shared/install.c index 026aa3230..ed5f51cc4 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -311,7 +311,7 @@ int unit_file_changes_add( if (!changes) return 0; - c = realloc(*changes, (*n_changes + 1) * sizeof(UnitFileChange)); + c = reallocarray(*changes, *n_changes + 1, sizeof(UnitFileChange)); if (!c) return -ENOMEM; *changes = c; @@ -522,7 +522,7 @@ static int mark_symlink_for_removal( assert(p); - r = set_ensure_allocated(remove_symlinks_to, &string_hash_ops); + r = set_ensure_allocated(remove_symlinks_to, &path_hash_ops); if (r < 0) return r; @@ -1284,10 +1284,10 @@ static int unit_file_load( info->type = UNIT_FILE_TYPE_MASKED; return 0; } - if (S_ISDIR(st.st_mode)) - return -EISDIR; - if (!S_ISREG(st.st_mode)) - return -ENOTTY; + + r = stat_verify_regular(&st); + if (r < 0) + return r; f = fdopen(fd, "re"); if (!f) @@ -1461,6 +1461,9 @@ static int unit_file_search( return -ENOENT; } + if (info->type == UNIT_FILE_TYPE_MASKED) + return result; + /* Search for drop-in directories */ dropin_dir_name = strjoina(info->name, ".d"); @@ -2163,12 +2166,9 @@ int unit_file_link( if (lstat(full, &st) < 0) return -errno; - if (S_ISLNK(st.st_mode)) - return -ELOOP; - if (S_ISDIR(st.st_mode)) - return -EISDIR; - if (!S_ISREG(st.st_mode)) - return -ENOTTY; + r = stat_verify_regular(&st); + if (r < 0) + return r; q = in_search_path(&paths, *i); if (q < 0) diff --git a/src/shared/journal-util.c b/src/shared/journal-util.c index eb7a75295..7d53f9dd5 100644 --- a/src/shared/journal-util.c +++ b/src/shared/journal-util.c @@ -28,7 +28,7 @@ #include "strv.h" #include "user-util.h" -static int access_check_var_log_journal(sd_journal *j) { +static int access_check_var_log_journal(sd_journal *j, bool want_other_users) { #if HAVE_ACL _cleanup_strv_free_ char **g = NULL; const char* dir; @@ -81,22 +81,25 @@ static int access_check_var_log_journal(sd_journal *j) { if (!s) return log_oom(); - log_notice("Hint: You are currently not seeing messages from other users and the system.\n" + log_notice("Hint: You are currently not seeing messages from %s.\n" " Users in groups '%s' can see all messages.\n" - " Pass -q to turn off this notice.", s); + " Pass -q to turn off this notice.", + want_other_users ? "other users and the system" : "the system", + s); return 1; } #endif /* If no ACLs were found, print a short version of the message. */ - log_notice("Hint: You are currently not seeing messages from other users and the system.\n" + log_notice("Hint: You are currently not seeing messages from %s.\n" " Users in the 'systemd-journal' group can see all messages. Pass -q to\n" - " turn off this notice."); + " turn off this notice.", + want_other_users ? "other users and the system" : "the system"); return 1; } -int journal_access_check_and_warn(sd_journal *j, bool quiet) { +int journal_access_check_and_warn(sd_journal *j, bool quiet, bool want_other_users) { Iterator it; void *code; char *path; @@ -113,7 +116,7 @@ int journal_access_check_and_warn(sd_journal *j, bool quiet) { if (hashmap_contains(j->errors, INT_TO_PTR(-EACCES))) { if (!quiet) - (void) access_check_var_log_journal(j); + (void) access_check_var_log_journal(j, want_other_users); if (ordered_hashmap_isempty(j->files)) r = log_error_errno(EACCES, "No journal files were opened due to insufficient permissions."); diff --git a/src/shared/journal-util.h b/src/shared/journal-util.h index ef5e314d3..f973729a3 100644 --- a/src/shared/journal-util.h +++ b/src/shared/journal-util.h @@ -26,4 +26,4 @@ bool journal_field_valid(const char *p, size_t l, bool allow_protected); -int journal_access_check_and_warn(sd_journal *j, bool quiet); +int journal_access_check_and_warn(sd_journal *j, bool quiet, bool want_other_users); diff --git a/src/shared/linux/bpf.h b/src/shared/linux/bpf.h index 8477b4460..1df9e7e3d 100644 --- a/src/shared/linux/bpf.h +++ b/src/shared/linux/bpf.h @@ -1,11 +1,12 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* Copyright (c) 2011-2014 PLUMgrid, http://plumgrid.com * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. */ -#ifndef __LINUX_BPF_H__ -#define __LINUX_BPF_H__ +#ifndef _UAPI__LINUX_BPF_H__ +#define _UAPI__LINUX_BPF_H__ #include #include @@ -16,7 +17,7 @@ #define BPF_ALU64 0x07 /* alu mode in double word width */ /* ld/ldx fields */ -#define BPF_DW 0x18 /* double word */ +#define BPF_DW 0x18 /* double word (64-bit) */ #define BPF_XADD 0xc0 /* exclusive add */ /* alu/jmp fields */ @@ -30,9 +31,14 @@ #define BPF_FROM_LE BPF_TO_LE #define BPF_FROM_BE BPF_TO_BE +/* jmp encodings */ #define BPF_JNE 0x50 /* jump != */ +#define BPF_JLT 0xa0 /* LT is unsigned, '<' */ +#define BPF_JLE 0xb0 /* LE is unsigned, '<=' */ #define BPF_JSGT 0x60 /* SGT is signed '>', GT in x86 */ #define BPF_JSGE 0x70 /* SGE is signed '>=', GE in x86 */ +#define BPF_JSLT 0xc0 /* SLT is signed, '<' */ +#define BPF_JSLE 0xd0 /* SLE is signed, '<=' */ #define BPF_CALL 0x80 /* function call */ #define BPF_EXIT 0x90 /* function return */ @@ -82,6 +88,12 @@ enum bpf_cmd { BPF_PROG_ATTACH, BPF_PROG_DETACH, BPF_PROG_TEST_RUN, + BPF_PROG_GET_NEXT_ID, + BPF_MAP_GET_NEXT_ID, + BPF_PROG_GET_FD_BY_ID, + BPF_MAP_GET_FD_BY_ID, + BPF_OBJ_GET_INFO_BY_FD, + BPF_PROG_QUERY, }; enum bpf_map_type { @@ -99,6 +111,9 @@ enum bpf_map_type { BPF_MAP_TYPE_LPM_TRIE, BPF_MAP_TYPE_ARRAY_OF_MAPS, BPF_MAP_TYPE_HASH_OF_MAPS, + BPF_MAP_TYPE_DEVMAP, + BPF_MAP_TYPE_SOCKMAP, + BPF_MAP_TYPE_CPUMAP, }; enum bpf_prog_type { @@ -115,22 +130,65 @@ enum bpf_prog_type { BPF_PROG_TYPE_LWT_IN, BPF_PROG_TYPE_LWT_OUT, BPF_PROG_TYPE_LWT_XMIT, + BPF_PROG_TYPE_SOCK_OPS, + BPF_PROG_TYPE_SK_SKB, + BPF_PROG_TYPE_CGROUP_DEVICE, }; enum bpf_attach_type { BPF_CGROUP_INET_INGRESS, BPF_CGROUP_INET_EGRESS, BPF_CGROUP_INET_SOCK_CREATE, + BPF_CGROUP_SOCK_OPS, + BPF_SK_SKB_STREAM_PARSER, + BPF_SK_SKB_STREAM_VERDICT, + BPF_CGROUP_DEVICE, __MAX_BPF_ATTACH_TYPE }; #define MAX_BPF_ATTACH_TYPE __MAX_BPF_ATTACH_TYPE -/* If BPF_F_ALLOW_OVERRIDE flag is used in BPF_PROG_ATTACH command - * to the given target_fd cgroup the descendent cgroup will be able to - * override effective bpf program that was inherited from this cgroup +/* cgroup-bpf attach flags used in BPF_PROG_ATTACH command + * + * NONE(default): No further bpf programs allowed in the subtree. + * + * BPF_F_ALLOW_OVERRIDE: If a sub-cgroup installs some bpf program, + * the program in this cgroup yields to sub-cgroup program. + * + * BPF_F_ALLOW_MULTI: If a sub-cgroup installs some bpf program, + * that cgroup program gets run in addition to the program in this cgroup. + * + * Only one program is allowed to be attached to a cgroup with + * NONE or BPF_F_ALLOW_OVERRIDE flag. + * Attaching another program on top of NONE or BPF_F_ALLOW_OVERRIDE will + * release old program and attach the new one. Attach flags has to match. + * + * Multiple programs are allowed to be attached to a cgroup with + * BPF_F_ALLOW_MULTI flag. They are executed in FIFO order + * (those that were attached first, run first) + * The programs of sub-cgroup are executed first, then programs of + * this cgroup and then programs of parent cgroup. + * When children program makes decision (like picking TCP CA or sock bind) + * parent program has a chance to override it. + * + * A cgroup with MULTI or OVERRIDE flag allows any attach flags in sub-cgroups. + * A cgroup with NONE doesn't allow any programs in sub-cgroups. + * Ex1: + * cgrp1 (MULTI progs A, B) -> + * cgrp2 (OVERRIDE prog C) -> + * cgrp3 (MULTI prog D) -> + * cgrp4 (OVERRIDE prog E) -> + * cgrp5 (NONE prog F) + * the event in cgrp5 triggers execution of F,D,A,B in that order. + * if prog F is detached, the execution is E,D,A,B + * if prog F and D are detached, the execution is E,A,B + * if prog F, E and D are detached, the execution is C,A,B + * + * All eligible programs are executed regardless of return code from + * earlier programs. */ #define BPF_F_ALLOW_OVERRIDE (1U << 0) +#define BPF_F_ALLOW_MULTI (1U << 1) /* If BPF_F_STRICT_ALIGNMENT is used in BPF_PROG_LOAD command, the * verifier will perform strict alignment checking as if the kernel @@ -139,13 +197,20 @@ enum bpf_attach_type { */ #define BPF_F_STRICT_ALIGNMENT (1U << 0) +/* when bpf_ldimm64->src_reg == BPF_PSEUDO_MAP_FD, bpf_ldimm64->imm == fd */ #define BPF_PSEUDO_MAP_FD 1 +/* when bpf_call->src_reg == BPF_PSEUDO_CALL, bpf_call->imm == pc-relative + * offset to another bpf function + */ +#define BPF_PSEUDO_CALL 1 + /* flags for BPF_MAP_UPDATE_ELEM command */ #define BPF_ANY 0 /* create new element or update existing */ #define BPF_NOEXIST 1 /* create new element if it didn't exist */ #define BPF_EXIST 2 /* update existing element */ +/* flags for BPF_MAP_CREATE command */ #define BPF_F_NO_PREALLOC (1U << 0) /* Instead of having one common LRU list in the * BPF_MAP_TYPE_LRU_[PERCPU_]HASH map, use a percpu LRU list @@ -154,6 +219,17 @@ enum bpf_attach_type { * across different LRU lists. */ #define BPF_F_NO_COMMON_LRU (1U << 1) +/* Specify numa node during map creation */ +#define BPF_F_NUMA_NODE (1U << 2) + +/* flags for BPF_PROG_QUERY */ +#define BPF_F_QUERY_EFFECTIVE (1U << 0) + +#define BPF_OBJ_NAME_LEN 16U + +/* Flags for accessing BPF object */ +#define BPF_F_RDONLY (1U << 3) +#define BPF_F_WRONLY (1U << 4) union bpf_attr { struct { /* anonymous struct used by BPF_MAP_CREATE command */ @@ -161,8 +237,15 @@ union bpf_attr { __u32 key_size; /* size of key in bytes */ __u32 value_size; /* size of value in bytes */ __u32 max_entries; /* max number of entries in a map */ - __u32 map_flags; /* prealloc or not */ + __u32 map_flags; /* BPF_MAP_CREATE related + * flags defined above. + */ __u32 inner_map_fd; /* fd pointing to the inner map */ + __u32 numa_node; /* numa node (effective only if + * BPF_F_NUMA_NODE is set). + */ + char map_name[BPF_OBJ_NAME_LEN]; + __u32 map_ifindex; /* ifindex of netdev to create on */ }; struct { /* anonymous struct used by BPF_MAP_*_ELEM commands */ @@ -185,11 +268,14 @@ union bpf_attr { __aligned_u64 log_buf; /* user supplied buffer */ __u32 kern_version; /* checked when prog_type=kprobe */ __u32 prog_flags; + char prog_name[BPF_OBJ_NAME_LEN]; + __u32 prog_ifindex; /* ifindex of netdev to prep for */ }; struct { /* anonymous struct used by BPF_OBJ_* commands */ __aligned_u64 pathname; __u32 bpf_fd; + __u32 file_flags; }; struct { /* anonymous struct used by BPF_PROG_ATTACH/DETACH commands */ @@ -209,6 +295,31 @@ union bpf_attr { __u32 repeat; __u32 duration; } test; + + struct { /* anonymous struct used by BPF_*_GET_*_ID */ + union { + __u32 start_id; + __u32 prog_id; + __u32 map_id; + }; + __u32 next_id; + __u32 open_flags; + }; + + struct { /* anonymous struct used by BPF_OBJ_GET_INFO_BY_FD */ + __u32 bpf_fd; + __u32 info_len; + __aligned_u64 info; + } info; + + struct { /* anonymous struct used by BPF_PROG_QUERY command */ + __u32 target_fd; /* container object to query */ + __u32 attach_type; + __u32 query_flags; + __u32 attach_flags; + __aligned_u64 prog_ids; + __u32 prog_cnt; + } query; } __attribute__((aligned(8))); /* BPF helper function descriptions: @@ -272,7 +383,7 @@ union bpf_attr { * jump into another BPF program * @ctx: context pointer passed to next program * @prog_array_map: pointer to map which type is BPF_MAP_TYPE_PROG_ARRAY - * @index: index inside array that selects specific program to run + * @index: 32-bit index inside array that selects specific program to run * Return: 0 on success or negative error * * int bpf_clone_redirect(skb, ifindex, flags) @@ -313,26 +424,40 @@ union bpf_attr { * @flags: room for future extensions * Return: 0 on success or negative error * - * u64 bpf_perf_event_read(&map, index) - * Return: Number events read or error code + * u64 bpf_perf_event_read(map, flags) + * read perf event counter value + * @map: pointer to perf_event_array map + * @flags: index of event in the map or bitmask flags + * Return: value of perf event counter read or error code * * int bpf_redirect(ifindex, flags) * redirect to another netdev * @ifindex: ifindex of the net device - * @flags: bit 0 - if set, redirect to ingress instead of egress - * other bits - reserved - * Return: TC_ACT_REDIRECT + * @flags: + * cls_bpf: + * bit 0 - if set, redirect to ingress instead of egress + * other bits - reserved + * xdp_bpf: + * all bits - reserved + * Return: cls_bpf: TC_ACT_REDIRECT on success or TC_ACT_SHOT on error + * xdp_bfp: XDP_REDIRECT on success or XDP_ABORT on error + * int bpf_redirect_map(map, key, flags) + * redirect to endpoint in map + * @map: pointer to dev map + * @key: index in map to lookup + * @flags: -- + * Return: XDP_REDIRECT on success or XDP_ABORT on error * * u32 bpf_get_route_realm(skb) * retrieve a dst's tclassid * @skb: pointer to skb * Return: realm if != 0 * - * int bpf_perf_event_output(ctx, map, index, data, size) + * int bpf_perf_event_output(ctx, map, flags, data, size) * output perf raw sample * @ctx: struct pt_regs* * @map: pointer to perf_event_array map - * @index: index of event in the map + * @flags: index of event in the map or bitmask flags * @data: data on stack to be output as raw data * @size: size of data * Return: 0 on success or negative error @@ -490,6 +615,87 @@ union bpf_attr { * Get the owner uid of the socket stored inside sk_buff. * @skb: pointer to skb * Return: uid of the socket owner on success or overflowuid if failed. + * + * u32 bpf_set_hash(skb, hash) + * Set full skb->hash. + * @skb: pointer to skb + * @hash: hash to set + * + * int bpf_setsockopt(bpf_socket, level, optname, optval, optlen) + * Calls setsockopt. Not all opts are available, only those with + * integer optvals plus TCP_CONGESTION. + * Supported levels: SOL_SOCKET and IPPROTO_TCP + * @bpf_socket: pointer to bpf_socket + * @level: SOL_SOCKET or IPPROTO_TCP + * @optname: option name + * @optval: pointer to option value + * @optlen: length of optval in bytes + * Return: 0 or negative error + * + * int bpf_getsockopt(bpf_socket, level, optname, optval, optlen) + * Calls getsockopt. Not all opts are available. + * Supported levels: IPPROTO_TCP + * @bpf_socket: pointer to bpf_socket + * @level: IPPROTO_TCP + * @optname: option name + * @optval: pointer to option value + * @optlen: length of optval in bytes + * Return: 0 or negative error + * + * int bpf_sock_ops_cb_flags_set(bpf_sock_ops, flags) + * Set callback flags for sock_ops + * @bpf_sock_ops: pointer to bpf_sock_ops_kern struct + * @flags: flags value + * Return: 0 for no error + * -EINVAL if there is no full tcp socket + * bits in flags that are not supported by current kernel + * + * int bpf_skb_adjust_room(skb, len_diff, mode, flags) + * Grow or shrink room in sk_buff. + * @skb: pointer to skb + * @len_diff: (signed) amount of room to grow/shrink + * @mode: operation mode (enum bpf_adj_room_mode) + * @flags: reserved for future use + * Return: 0 on success or negative error code + * + * int bpf_sk_redirect_map(map, key, flags) + * Redirect skb to a sock in map using key as a lookup key for the + * sock in map. + * @map: pointer to sockmap + * @key: key to lookup sock in map + * @flags: reserved for future use + * Return: SK_PASS + * + * int bpf_sock_map_update(skops, map, key, flags) + * @skops: pointer to bpf_sock_ops + * @map: pointer to sockmap to update + * @key: key to insert/update sock in map + * @flags: same flags as map update elem + * + * int bpf_xdp_adjust_meta(xdp_md, delta) + * Adjust the xdp_md.data_meta by delta + * @xdp_md: pointer to xdp_md + * @delta: An positive/negative integer to be added to xdp_md.data_meta + * Return: 0 on success or negative on error + * + * int bpf_perf_event_read_value(map, flags, buf, buf_size) + * read perf event counter value and perf event enabled/running time + * @map: pointer to perf_event_array map + * @flags: index of event in the map or bitmask flags + * @buf: buf to fill + * @buf_size: size of the buf + * Return: 0 on success or negative error code + * + * int bpf_perf_prog_read_value(ctx, buf, buf_size) + * read perf prog attached perf event counter and enabled/running time + * @ctx: pointer to ctx + * @buf: buf to fill + * @buf_size: size of the buf + * Return : 0 on success or negative error code + * + * int bpf_override_return(pt_regs, rc) + * @pt_regs: pointer to struct pt_regs + * @rc: the return value to set */ #define __BPF_FUNC_MAPPER(FN) \ FN(unspec), \ @@ -539,7 +745,19 @@ union bpf_attr { FN(xdp_adjust_head), \ FN(probe_read_str), \ FN(get_socket_cookie), \ - FN(get_socket_uid), + FN(get_socket_uid), \ + FN(set_hash), \ + FN(setsockopt), \ + FN(skb_adjust_room), \ + FN(redirect_map), \ + FN(sk_redirect_map), \ + FN(sock_map_update), \ + FN(xdp_adjust_meta), \ + FN(perf_event_read_value), \ + FN(perf_prog_read_value), \ + FN(getsockopt), \ + FN(override_return), \ + FN(sock_ops_cb_flags_set), /* integer value in 'imm' field of BPF_CALL instruction selects which helper * function eBPF program intends to call @@ -583,12 +801,19 @@ enum bpf_func_id { #define BPF_F_ZERO_CSUM_TX (1ULL << 1) #define BPF_F_DONT_FRAGMENT (1ULL << 2) -/* BPF_FUNC_perf_event_output and BPF_FUNC_perf_event_read flags. */ +/* BPF_FUNC_perf_event_output, BPF_FUNC_perf_event_read and + * BPF_FUNC_perf_event_read_value flags. + */ #define BPF_F_INDEX_MASK 0xffffffffULL #define BPF_F_CURRENT_CPU BPF_F_INDEX_MASK /* BPF_FUNC_perf_event_output for sk_buff input context. */ #define BPF_F_CTXLEN_MASK (0xfffffULL << 32) +/* Mode for BPF_FUNC_skb_adjust_room helper. */ +enum bpf_adj_room_mode { + BPF_ADJ_ROOM_NET, +}; + /* user accessible mirror of in-kernel sk_buff. * new fields can only be added to the end of this structure */ @@ -611,6 +836,18 @@ struct __sk_buff { __u32 data; __u32 data_end; __u32 napi_id; + + /* Accessed by BPF_PROG_TYPE_sk_skb types from here to ... */ + __u32 family; + __u32 remote_ip4; /* Stored in network byte order */ + __u32 local_ip4; /* Stored in network byte order */ + __u32 remote_ip6[4]; /* Stored in network byte order */ + __u32 local_ip6[4]; /* Stored in network byte order */ + __u32 remote_port; /* Stored in network byte order */ + __u32 local_port; /* stored in host byte order */ + /* ... here. */ + + __u32 data_meta; }; struct bpf_tunnel_key { @@ -646,20 +883,23 @@ struct bpf_sock { __u32 family; __u32 type; __u32 protocol; + __u32 mark; + __u32 priority; }; #define XDP_PACKET_HEADROOM 256 /* User return codes for XDP prog type. * A valid XDP program must return one of these defined values. All other - * return codes are reserved for future use. Unknown return codes will result - * in packet drop. + * return codes are reserved for future use. Unknown return codes will + * result in packet drops and a warning via bpf_warn_invalid_xdp_action(). */ enum xdp_action { XDP_ABORTED = 0, XDP_DROP, XDP_PASS, XDP_TX, + XDP_REDIRECT, }; /* user accessible metadata for XDP packet hook @@ -668,6 +908,202 @@ enum xdp_action { struct xdp_md { __u32 data; __u32 data_end; + __u32 data_meta; + /* Below access go through struct xdp_rxq_info */ + __u32 ingress_ifindex; /* rxq->dev->ifindex */ + __u32 rx_queue_index; /* rxq->queue_index */ }; -#endif /* __LINUX_BPF_H__ */ +enum sk_action { + SK_DROP = 0, + SK_PASS, +}; + +#define BPF_TAG_SIZE 8 + +struct bpf_prog_info { + __u32 type; + __u32 id; + __u8 tag[BPF_TAG_SIZE]; + __u32 jited_prog_len; + __u32 xlated_prog_len; + __aligned_u64 jited_prog_insns; + __aligned_u64 xlated_prog_insns; + __u64 load_time; /* ns since boottime */ + __u32 created_by_uid; + __u32 nr_map_ids; + __aligned_u64 map_ids; + char name[BPF_OBJ_NAME_LEN]; + __u32 ifindex; + __u64 netns_dev; + __u64 netns_ino; +} __attribute__((aligned(8))); + +struct bpf_map_info { + __u32 type; + __u32 id; + __u32 key_size; + __u32 value_size; + __u32 max_entries; + __u32 map_flags; + char name[BPF_OBJ_NAME_LEN]; + __u32 ifindex; + __u64 netns_dev; + __u64 netns_ino; +} __attribute__((aligned(8))); + +/* User bpf_sock_ops struct to access socket values and specify request ops + * and their replies. + * Some of this fields are in network (bigendian) byte order and may need + * to be converted before use (bpf_ntohl() defined in samples/bpf/bpf_endian.h). + * New fields can only be added at the end of this structure + */ +struct bpf_sock_ops { + __u32 op; + union { + __u32 args[4]; /* Optionally passed to bpf program */ + __u32 reply; /* Returned by bpf program */ + __u32 replylong[4]; /* Optionally returned by bpf prog */ + }; + __u32 family; + __u32 remote_ip4; /* Stored in network byte order */ + __u32 local_ip4; /* Stored in network byte order */ + __u32 remote_ip6[4]; /* Stored in network byte order */ + __u32 local_ip6[4]; /* Stored in network byte order */ + __u32 remote_port; /* Stored in network byte order */ + __u32 local_port; /* stored in host byte order */ + __u32 is_fullsock; /* Some TCP fields are only valid if + * there is a full socket. If not, the + * fields read as zero. + */ + __u32 snd_cwnd; + __u32 srtt_us; /* Averaged RTT << 3 in usecs */ + __u32 bpf_sock_ops_cb_flags; /* flags defined in uapi/linux/tcp.h */ + __u32 state; + __u32 rtt_min; + __u32 snd_ssthresh; + __u32 rcv_nxt; + __u32 snd_nxt; + __u32 snd_una; + __u32 mss_cache; + __u32 ecn_flags; + __u32 rate_delivered; + __u32 rate_interval_us; + __u32 packets_out; + __u32 retrans_out; + __u32 total_retrans; + __u32 segs_in; + __u32 data_segs_in; + __u32 segs_out; + __u32 data_segs_out; + __u32 lost_out; + __u32 sacked_out; + __u32 sk_txhash; + __u64 bytes_received; + __u64 bytes_acked; +}; + +/* Definitions for bpf_sock_ops_cb_flags */ +#define BPF_SOCK_OPS_RTO_CB_FLAG (1<<0) +#define BPF_SOCK_OPS_RETRANS_CB_FLAG (1<<1) +#define BPF_SOCK_OPS_STATE_CB_FLAG (1<<2) +#define BPF_SOCK_OPS_ALL_CB_FLAGS 0x7 /* Mask of all currently + * supported cb flags + */ + +/* List of known BPF sock_ops operators. + * New entries can only be added at the end + */ +enum { + BPF_SOCK_OPS_VOID, + BPF_SOCK_OPS_TIMEOUT_INIT, /* Should return SYN-RTO value to use or + * -1 if default value should be used + */ + BPF_SOCK_OPS_RWND_INIT, /* Should return initial advertized + * window (in packets) or -1 if default + * value should be used + */ + BPF_SOCK_OPS_TCP_CONNECT_CB, /* Calls BPF program right before an + * active connection is initialized + */ + BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB, /* Calls BPF program when an + * active connection is + * established + */ + BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB, /* Calls BPF program when a + * passive connection is + * established + */ + BPF_SOCK_OPS_NEEDS_ECN, /* If connection's congestion control + * needs ECN + */ + BPF_SOCK_OPS_BASE_RTT, /* Get base RTT. The correct value is + * based on the path and may be + * dependent on the congestion control + * algorithm. In general it indicates + * a congestion threshold. RTTs above + * this indicate congestion + */ + BPF_SOCK_OPS_RTO_CB, /* Called when an RTO has triggered. + * Arg1: value of icsk_retransmits + * Arg2: value of icsk_rto + * Arg3: whether RTO has expired + */ + BPF_SOCK_OPS_RETRANS_CB, /* Called when skb is retransmitted. + * Arg1: sequence number of 1st byte + * Arg2: # segments + * Arg3: return value of + * tcp_transmit_skb (0 => success) + */ + BPF_SOCK_OPS_STATE_CB, /* Called when TCP changes state. + * Arg1: old_state + * Arg2: new_state + */ +}; + +/* List of TCP states. There is a build check in net/ipv4/tcp.c to detect + * changes between the TCP and BPF versions. Ideally this should never happen. + * If it does, we need to add code to convert them before calling + * the BPF sock_ops function. + */ +enum { + BPF_TCP_ESTABLISHED = 1, + BPF_TCP_SYN_SENT, + BPF_TCP_SYN_RECV, + BPF_TCP_FIN_WAIT1, + BPF_TCP_FIN_WAIT2, + BPF_TCP_TIME_WAIT, + BPF_TCP_CLOSE, + BPF_TCP_CLOSE_WAIT, + BPF_TCP_LAST_ACK, + BPF_TCP_LISTEN, + BPF_TCP_CLOSING, /* Now a valid state */ + BPF_TCP_NEW_SYN_RECV, + + BPF_TCP_MAX_STATES /* Leave at the end! */ +}; + +#define TCP_BPF_IW 1001 /* Set TCP initial congestion window */ +#define TCP_BPF_SNDCWND_CLAMP 1002 /* Set sndcwnd_clamp */ + +struct bpf_perf_event_value { + __u64 counter; + __u64 enabled; + __u64 running; +}; + +#define BPF_DEVCG_ACC_MKNOD (1ULL << 0) +#define BPF_DEVCG_ACC_READ (1ULL << 1) +#define BPF_DEVCG_ACC_WRITE (1ULL << 2) + +#define BPF_DEVCG_DEV_BLOCK (1ULL << 0) +#define BPF_DEVCG_DEV_CHAR (1ULL << 1) + +struct bpf_cgroup_dev_ctx { + /* access_type encoded as (BPF_DEVCG_ACC_* << 16) | BPF_DEVCG_DEV_* */ + __u32 access_type; + __u32 major; + __u32 minor; +}; + +#endif /* _UAPI__LINUX_BPF_H__ */ diff --git a/src/shared/loop-util.c b/src/shared/loop-util.c index 37b8479f8..0f3defd58 100644 --- a/src/shared/loop-util.c +++ b/src/shared/loop-util.c @@ -27,6 +27,7 @@ #include "alloc-util.h" #include "fd-util.h" #include "loop-util.h" +#include "stat-util.h" int loop_device_make(int fd, int open_flags, LoopDevice **ret) { const struct loop_info64 info = { @@ -37,7 +38,7 @@ int loop_device_make(int fd, int open_flags, LoopDevice **ret) { _cleanup_free_ char *loopdev = NULL; struct stat st; LoopDevice *d; - int nr; + int nr, r; assert(fd >= 0); assert(ret); @@ -69,8 +70,9 @@ int loop_device_make(int fd, int open_flags, LoopDevice **ret) { return 0; } - if (!S_ISREG(st.st_mode)) - return -EINVAL; + r = stat_verify_regular(&st); + if (r < 0) + return r; control = open("/dev/loop-control", O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK); if (control < 0) diff --git a/src/shared/path-lookup.c b/src/shared/path-lookup.c index d57c78a8b..5f31831c9 100644 --- a/src/shared/path-lookup.c +++ b/src/shared/path-lookup.c @@ -169,6 +169,8 @@ int xdg_user_dirs(char ***ret_config_dirs, char ***ret_data_dirs) { static char** user_dirs( const char *persistent_config, const char *runtime_config, + const char *global_persistent_config, + const char *global_runtime_config, const char *generator, const char *generator_early, const char *generator_late, @@ -209,12 +211,19 @@ static char** user_dirs( if (strv_extend(&res, persistent_config) < 0) return NULL; + /* global config has lower priority than the user config of the same type */ + if (strv_extend(&res, global_persistent_config) < 0) + return NULL; + if (strv_extend_strv(&res, (char**) user_config_unit_paths, false) < 0) return NULL; if (strv_extend(&res, runtime_config) < 0) return NULL; + if (strv_extend(&res, global_runtime_config) < 0) + return NULL; + if (strv_extend(&res, generator) < 0) return NULL; @@ -411,11 +420,11 @@ static int acquire_control_dirs(UnitFileScope scope, char **persistent, char **r } case UNIT_FILE_USER: - r = xdg_user_config_dir(&a, "/systemd/system.control"); + r = xdg_user_config_dir(&a, "/systemd/user.control"); if (r < 0 && r != -ENXIO) return r; - r = xdg_user_runtime_dir(runtime, "/systemd/system.control"); + r = xdg_user_runtime_dir(runtime, "/systemd/user.control"); if (r < 0) { if (r != -ENXIO) return r; @@ -484,6 +493,7 @@ int lookup_paths_init( _cleanup_free_ char *root = NULL, *persistent_config = NULL, *runtime_config = NULL, + *global_persistent_config = NULL, *global_runtime_config = NULL, *generator = NULL, *generator_early = NULL, *generator_late = NULL, *transient = NULL, *persistent_control = NULL, *runtime_control = NULL; @@ -522,6 +532,12 @@ int lookup_paths_init( if (r < 0) return r; + if (scope == UNIT_FILE_USER) { + r = acquire_config_dirs(UNIT_FILE_GLOBAL, &global_persistent_config, &global_runtime_config); + if (r < 0) + return r; + } + if ((flags & LOOKUP_PATHS_EXCLUDE_GENERATED) == 0) { /* Note: if XDG_RUNTIME_DIR is not set, this will fail completely with ENXIO */ r = acquire_generator_dirs(scope, tempdir, @@ -610,20 +626,21 @@ int lookup_paths_init( runtime_config, "/run/systemd/user", STRV_IFNOTNULL(generator), - "/usr/local/lib/systemd/user", "/usr/local/share/systemd/user", + "/usr/share/systemd/user", + "/usr/local/lib/systemd/user", USER_DATA_UNIT_PATH, "/usr/lib/systemd/user", - "/usr/share/systemd/user", STRV_IFNOTNULL(generator_late), NULL); break; case UNIT_FILE_USER: add = user_dirs(persistent_config, runtime_config, + global_persistent_config, global_runtime_config, generator, generator_early, generator_late, transient, - persistent_config, runtime_control); + persistent_control, runtime_control); break; default: diff --git a/src/shared/seccomp-util.c b/src/shared/seccomp-util.c index fbb232cd4..220658b3a 100644 --- a/src/shared/seccomp-util.c +++ b/src/shared/seccomp-util.c @@ -935,7 +935,7 @@ int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Hashmap* set, u /* If the system call is not known on this architecture, then that's fine, let's ignore it */ _cleanup_free_ char *n = NULL; - n = seccomp_syscall_resolve_num_arch(arch, PTR_TO_INT(id) - 1); + n = seccomp_syscall_resolve_num_arch(SCMP_ARCH_NATIVE, PTR_TO_INT(id) - 1); log_debug_errno(r, "Failed to add rule for system call %s() / %d, ignoring: %m", strna(n), PTR_TO_INT(id) - 1); } } @@ -950,13 +950,11 @@ int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Hashmap* set, u return 0; } -int seccomp_parse_syscall_filter_internal( - bool invert, +int seccomp_parse_syscall_filter_full( const char *name, int errno_num, Hashmap *filter, - bool whitelist, - bool warn, + SeccompParseFlags flags, const char *unit, const char *filename, unsigned line) { @@ -972,15 +970,20 @@ int seccomp_parse_syscall_filter_internal( set = syscall_filter_set_find(name); if (!set) { - if (warn) { - log_syntax(unit, LOG_WARNING, filename, line, 0, "Unknown system call group, ignoring: %s", name); - return 0; - } else + if (!(flags & SECCOMP_PARSE_PERMISSIVE)) return -EINVAL; + + log_syntax(unit, flags & SECCOMP_PARSE_LOG ? LOG_WARNING : LOG_DEBUG, filename, line, 0, + "Unknown system call group, ignoring: %s", name); + return 0; } NULSTR_FOREACH(i, set->value) { - r = seccomp_parse_syscall_filter_internal(invert, i, errno_num, filter, whitelist, warn, unit, filename, line); + /* Call ourselves again, for the group to parse. Note that we downgrade logging here (i.e. take + * away the SECCOMP_PARSE_LOG flag) since any issues in the group table are our own problem, + * not a problem in user configuration data and we shouldn't pretend otherwise by complaining + * about them. */ + r = seccomp_parse_syscall_filter_full(i, errno_num, filter, flags &~ SECCOMP_PARSE_LOG, unit, filename, line); if (r < 0) return r; } @@ -989,19 +992,20 @@ int seccomp_parse_syscall_filter_internal( id = seccomp_syscall_resolve_name(name); if (id == __NR_SCMP_ERROR) { - if (warn) { - log_syntax(unit, LOG_WARNING, filename, line, 0, "Failed to parse system call, ignoring: %s", name); - return 0; - } else + if (!(flags & SECCOMP_PARSE_PERMISSIVE)) return -EINVAL; + + log_syntax(unit, flags & SECCOMP_PARSE_LOG ? LOG_WARNING : LOG_DEBUG, filename, line, 0, + "Failed to parse system call, ignoring: %s", name); + return 0; } /* If we previously wanted to forbid a syscall and now * we want to allow it, then remove it from the list. */ - if (!invert == whitelist) { + if (!(flags & SECCOMP_PARSE_INVERT) == !!(flags & SECCOMP_PARSE_WHITELIST)) { r = hashmap_put(filter, INT_TO_PTR(id + 1), INT_TO_PTR(errno_num)); if (r < 0) - return warn ? log_oom() : -ENOMEM; + return flags & SECCOMP_PARSE_LOG ? log_oom() : -ENOMEM; } else (void) hashmap_remove(filter, INT_TO_PTR(id + 1)); } @@ -1534,17 +1538,35 @@ int seccomp_restrict_archs(Set *archs) { int r; /* This installs a filter with no rules, but that restricts the system call architectures to the specified - * list. */ + * list. + * + * There are some qualifications. However the most important use is to stop processes from bypassing + * system call restrictions, in case they used a broader (multiplexing) syscall which is only available + * in a non-native architecture. There are no holes in this use case, at least so far. */ + /* Note libseccomp includes our "native" (current) architecture in the filter by default. + * We do not remove it. For example, our callers expect to be able to call execve() afterwards + * to run a program with the restrictions applied. */ seccomp = seccomp_init(SCMP_ACT_ALLOW); if (!seccomp) return -ENOMEM; SET_FOREACH(id, archs, i) { r = seccomp_arch_add(seccomp, PTR_TO_UINT32(id) - 1); - if (r == -EEXIST) - continue; - if (r < 0) + if (r < 0 && r != -EEXIST) + return r; + } + + /* The vdso for x32 assumes that x86-64 syscalls are available. Let's allow them, since x32 + * x32 syscalls should basically match x86-64 for everything except the pointer type. + * The important thing is that you can block the old 32-bit x86 syscalls. + * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=850047 */ + + if (seccomp_arch_native() == SCMP_ARCH_X32 || + set_contains(archs, UINT32_TO_PTR(SCMP_ARCH_X32 + 1))) { + + r = seccomp_arch_add(seccomp, SCMP_ARCH_X86_64); + if (r < 0 && r != -EEXIST) return r; } diff --git a/src/shared/seccomp-util.h b/src/shared/seccomp-util.h index 0b30cdf38..5915ceb9a 100644 --- a/src/shared/seccomp-util.h +++ b/src/shared/seccomp-util.h @@ -81,22 +81,19 @@ int seccomp_add_syscall_filter_item(scmp_filter_ctx *ctx, const char *name, uint int seccomp_load_syscall_filter_set(uint32_t default_action, const SyscallFilterSet *set, uint32_t action); int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Hashmap* set, uint32_t action); -int seccomp_parse_syscall_filter_internal( - bool invert, const char *name, int errno_num, Hashmap *filter, bool whitelist, - bool warn, const char *unit, const char *filename, unsigned line); +typedef enum SeccompParseFlags { + SECCOMP_PARSE_INVERT = 1U << 0, + SECCOMP_PARSE_WHITELIST = 1U << 1, + SECCOMP_PARSE_LOG = 1U << 2, + SECCOMP_PARSE_PERMISSIVE = 1U << 3, +} SeccompParseFlags; -static inline int seccomp_parse_syscall_filter_and_warn( - bool invert, const char *name, int errno_num, Hashmap *filter, bool whitelist, - const char *unit, const char *filename, unsigned line) { - assert(unit); - assert(filename); +int seccomp_parse_syscall_filter_full( + const char *name, int errno_num, Hashmap *filter, SeccompParseFlags flags, + const char *unit, const char *filename, unsigned line); - return seccomp_parse_syscall_filter_internal(invert, name, errno_num, filter, whitelist, true, unit, filename, line); -} - -static inline int seccomp_parse_syscall_filter( - bool invert, const char *name, int errno_num, Hashmap *filter, bool whitelist) { - return seccomp_parse_syscall_filter_internal(invert, name, errno_num, filter, whitelist, false, NULL, NULL, 0); +static inline int seccomp_parse_syscall_filter(const char *name, int errno_num, Hashmap *filter, SeccompParseFlags flags) { + return seccomp_parse_syscall_filter_full(name, errno_num, filter, flags, NULL, NULL, 0); } int seccomp_restrict_archs(Set *archs); diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c index c38b7cc98..37d7c981f 100644 --- a/src/shared/uid-range.c +++ b/src/shared/uid-range.c @@ -22,6 +22,7 @@ #include #include +#include "alloc-util.h" #include "macro.h" #include "uid-range.h" #include "user-util.h" @@ -109,7 +110,7 @@ int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr) { } else { UidRange *t; - t = realloc(*p, sizeof(UidRange) * (*n + 1)); + t = reallocarray(*p, *n + 1, sizeof(UidRange)); if (!t) return -ENOMEM; diff --git a/src/sysctl/sysctl.c b/src/sysctl/sysctl.c index a1dc95b2b..d97656d6f 100644 --- a/src/sysctl/sysctl.c +++ b/src/sysctl/sysctl.c @@ -110,19 +110,19 @@ static int parse_file(OrderedHashmap *sysctl_options, const char *path, bool ign _cleanup_free_ char *l = NULL; void *v; int k; + k = read_line(f, LONG_LINE_MAX, &l); if (k == 0) break; - if (k < 0) return log_error_errno(k, "Failed to read file '%s', ignoring: %m", path); c++; p = strstrip(l); - if (!*p) - continue; + if (isempty(p)) + continue; if (strchr(COMMENTS "\n", *p)) continue; @@ -261,7 +261,7 @@ int main(int argc, char *argv[]) { umask(0022); - sysctl_options = ordered_hashmap_new(&string_hash_ops); + sysctl_options = ordered_hashmap_new(&path_hash_ops); if (!sysctl_options) { r = log_oom(); goto finish; diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 5732d88a1..1e975a5f2 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -57,8 +56,8 @@ #include "format-util.h" #include "fs-util.h" #include "glob-util.h" -#include "hostname-util.h" #include "hexdecoct.h" +#include "hostname-util.h" #include "initreq.h" #include "install.h" #include "io-util.h" @@ -73,6 +72,7 @@ #include "path-lookup.h" #include "path-util.h" #include "process-util.h" +#include "reboot-util.h" #include "rlimit-util.h" #include "set.h" #include "sigbus.h" @@ -2942,7 +2942,8 @@ static int start_unit_one( log_error("Failed to %s %s: %s", verb, name, bus_error_message(error, r)); if (!sd_bus_error_has_name(error, BUS_ERROR_NO_SUCH_UNIT) && - !sd_bus_error_has_name(error, BUS_ERROR_UNIT_MASKED)) + !sd_bus_error_has_name(error, BUS_ERROR_UNIT_MASKED) && + !sd_bus_error_has_name(error, BUS_ERROR_JOB_TYPE_NOT_APPLICABLE)) log_error("See %s logs and 'systemctl%s status%s %s' for details.", arg_scope == UNIT_FILE_SYSTEM ? "system" : "user", arg_scope == UNIT_FILE_SYSTEM ? "" : " --user", @@ -4870,7 +4871,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte return bus_log_parse_error(r); while ((r = sd_bus_message_read(m, "(sb)", &path, &ignore)) > 0) - print_prop("EnvironmentFile", "%s (ignore_errors=%s)", path, yes_no(ignore)); + print_prop(name, "%s (ignore_errors=%s)", path, yes_no(ignore)); if (r < 0) return bus_log_parse_error(r); @@ -4889,7 +4890,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte return bus_log_parse_error(r); while ((r = sd_bus_message_read(m, "(ss)", &type, &path)) > 0) - print_prop(type, "%s", path); + print_prop(name, "%s (%s)", path, type); if (r < 0) return bus_log_parse_error(r); @@ -4907,10 +4908,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte return bus_log_parse_error(r); while ((r = sd_bus_message_read(m, "(ss)", &type, &path)) > 0) - if (arg_value) - puts(path); - else - printf("Listen%s=%s\n", type, path); + print_prop(name, "%s (%s)", path, type); if (r < 0) return bus_log_parse_error(r); @@ -4920,7 +4918,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte return 0; - } else if (contents[1] == SD_BUS_TYPE_STRUCT_BEGIN && streq(name, "Timers")) { + } else if (contents[1] == SD_BUS_TYPE_STRUCT_BEGIN && streq(name, "TimersMonotonic")) { const char *base; uint64_t value, next_elapse; @@ -4931,7 +4929,7 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte while ((r = sd_bus_message_read(m, "(stt)", &base, &value, &next_elapse)) > 0) { char timespan1[FORMAT_TIMESPAN_MAX], timespan2[FORMAT_TIMESPAN_MAX]; - print_prop(base, "{ value=%s ; next_elapse=%s }", + print_prop(name, "{ %s=%s ; next_elapse=%s }", base, format_timespan(timespan1, sizeof(timespan1), value, 0), format_timespan(timespan2, sizeof(timespan2), next_elapse, 0)); } @@ -4944,6 +4942,29 @@ static int print_property(const char *name, sd_bus_message *m, const char *conte return 0; + } else if (contents[1] == SD_BUS_TYPE_STRUCT_BEGIN && streq(name, "TimersCalendar")) { + const char *base, *spec; + uint64_t next_elapse; + + r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, "(sst)"); + if (r < 0) + return bus_log_parse_error(r); + + while ((r = sd_bus_message_read(m, "(sst)", &base, &spec, &next_elapse)) > 0) { + char timestamp[FORMAT_TIMESTAMP_MAX]; + + print_prop(name, "{ %s=%s ; next_elapse=%s }", base, spec, + format_timestamp(timestamp, sizeof(timestamp), next_elapse)); + } + if (r < 0) + return bus_log_parse_error(r); + + r = sd_bus_message_exit_container(m); + if (r < 0) + return bus_log_parse_error(r); + + return 0; + } else if (contents[1] == SD_BUS_TYPE_STRUCT_BEGIN && startswith(name, "Exec")) { ExecStatusInfo info = {}; @@ -7227,85 +7248,85 @@ static void systemctl_help(void) { " --firmware-setup Tell the firmware to show the setup menu on next boot\n" " --plain Print unit dependencies as a list instead of a tree\n\n" "Unit Commands:\n" - " list-units [PATTERN...] List units currently in memory\n" - " list-sockets [PATTERN...] List socket units currently in memory, ordered\n" - " by address\n" - " list-timers [PATTERN...] List timer units currently in memory, ordered\n" - " by next elapse\n" - " start NAME... Start (activate) one or more units\n" - " stop NAME... Stop (deactivate) one or more units\n" - " reload NAME... Reload one or more units\n" - " restart NAME... Start or restart one or more units\n" - " try-restart NAME... Restart one or more units if active\n" - " reload-or-restart NAME... Reload one or more units if possible,\n" - " otherwise start or restart\n" - " try-reload-or-restart NAME... If active, reload one or more units,\n" - " if supported, otherwise restart\n" - " isolate NAME Start one unit and stop all others\n" - " kill NAME... Send signal to processes of a unit\n" - " is-active PATTERN... Check whether units are active\n" - " is-failed PATTERN... Check whether units are failed\n" - " status [PATTERN...|PID...] Show runtime status of one or more units\n" - " show [PATTERN...|JOB...] Show properties of one or more\n" - " units/jobs or the manager\n" - " cat PATTERN... Show files and drop-ins of one or more units\n" - " set-property NAME ASSIGNMENT... Sets one or more properties of a unit\n" - " help PATTERN...|PID... Show manual for one or more units\n" - " reset-failed [PATTERN...] Reset failed state for all, one, or more\n" - " units\n" - " list-dependencies [NAME] Recursively show units which are required\n" - " or wanted by this unit or by which this\n" - " unit is required or wanted\n\n" + " list-units [PATTERN...] List units currently in memory\n" + " list-sockets [PATTERN...] List socket units currently in memory,\n" + " ordered by address\n" + " list-timers [PATTERN...] List timer units currently in memory,\n" + " ordered by next elapse\n" + " start UNIT... Start (activate) one or more units\n" + " stop UNIT... Stop (deactivate) one or more units\n" + " reload UNIT... Reload one or more units\n" + " restart UNIT... Start or restart one or more units\n" + " try-restart UNIT... Restart one or more units if active\n" + " reload-or-restart UNIT... Reload one or more units if possible,\n" + " otherwise start or restart\n" + " try-reload-or-restart UNIT... If active, reload one or more units,\n" + " if supported, otherwise restart\n" + " isolate UNIT Start one unit and stop all others\n" + " kill UNIT... Send signal to processes of a unit\n" + " is-active PATTERN... Check whether units are active\n" + " is-failed PATTERN... Check whether units are failed\n" + " status [PATTERN...|PID...] Show runtime status of one or more units\n" + " show [PATTERN...|JOB...] Show properties of one or more\n" + " units/jobs or the manager\n" + " cat PATTERN... Show files and drop-ins of specified units\n" + " set-property UNIT PROPERTY=VALUE... Sets one or more properties of a unit\n" + " help PATTERN...|PID... Show manual for one or more units\n" + " reset-failed [PATTERN...] Reset failed state for all, one, or more\n" + " units\n" + " list-dependencies [UNIT] Recursively show units which are required\n" + " or wanted by this unit or by which this\n" + " unit is required or wanted\n\n" "Unit File Commands:\n" - " list-unit-files [PATTERN...] List installed unit files\n" - " enable [NAME...|PATH...] Enable one or more unit files\n" - " disable NAME... Disable one or more unit files\n" - " reenable NAME... Reenable one or more unit files\n" - " preset NAME... Enable/disable one or more unit files\n" - " based on preset configuration\n" - " preset-all Enable/disable all unit files based on\n" - " preset configuration\n" - " is-enabled NAME... Check whether unit files are enabled\n" - " mask NAME... Mask one or more units\n" - " unmask NAME... Unmask one or more units\n" - " link PATH... Link one or more units files into\n" - " the search path\n" - " revert NAME... Revert one or more unit files to vendor\n" - " version\n" - " add-wants TARGET NAME... Add 'Wants' dependency for the target\n" - " on specified one or more units\n" - " add-requires TARGET NAME... Add 'Requires' dependency for the target\n" - " on specified one or more units\n" - " edit NAME... Edit one or more unit files\n" - " get-default Get the name of the default target\n" - " set-default NAME Set the default target\n\n" + " list-unit-files [PATTERN...] List installed unit files\n" + " enable [UNIT...|PATH...] Enable one or more unit files\n" + " disable UNIT... Disable one or more unit files\n" + " reenable UNIT... Reenable one or more unit files\n" + " preset UNIT... Enable/disable one or more unit files\n" + " based on preset configuration\n" + " preset-all Enable/disable all unit files based on\n" + " preset configuration\n" + " is-enabled UNIT... Check whether unit files are enabled\n" + " mask UNIT... Mask one or more units\n" + " unmask UNIT... Unmask one or more units\n" + " link PATH... Link one or more units files into\n" + " the search path\n" + " revert UNIT... Revert one or more unit files to vendor\n" + " version\n" + " add-wants TARGET UNIT... Add 'Wants' dependency for the target\n" + " on specified one or more units\n" + " add-requires TARGET UNIT... Add 'Requires' dependency for the target\n" + " on specified one or more units\n" + " edit UNIT... Edit one or more unit files\n" + " get-default Get the name of the default target\n" + " set-default TARGET Set the default target\n\n" "Machine Commands:\n" - " list-machines [PATTERN...] List local containers and host\n\n" + " list-machines [PATTERN...] List local containers and host\n\n" "Job Commands:\n" - " list-jobs [PATTERN...] List jobs\n" - " cancel [JOB...] Cancel all, one, or more jobs\n\n" + " list-jobs [PATTERN...] List jobs\n" + " cancel [JOB...] Cancel all, one, or more jobs\n\n" "Environment Commands:\n" - " show-environment Dump environment\n" - " set-environment NAME=VALUE... Set one or more environment variables\n" - " unset-environment NAME... Unset one or more environment variables\n" - " import-environment [NAME...] Import all or some environment variables\n\n" + " show-environment Dump environment\n" + " set-environment VARIABLE=VALUE... Set one or more environment variables\n" + " unset-environment VARIABLE... Unset one or more environment variables\n" + " import-environment [VARIABLE...] Import all or some environment variables\n\n" "Manager Lifecycle Commands:\n" - " daemon-reload Reload systemd manager configuration\n" - " daemon-reexec Reexecute systemd manager\n\n" + " daemon-reload Reload systemd manager configuration\n" + " daemon-reexec Reexecute systemd manager\n\n" "System Commands:\n" - " is-system-running Check whether system is fully running\n" - " default Enter system default mode\n" - " rescue Enter system rescue mode\n" - " emergency Enter system emergency mode\n" - " halt Shut down and halt the system\n" - " poweroff Shut down and power-off the system\n" - " reboot [ARG] Shut down and reboot the system\n" - " kexec Shut down and reboot the system with kexec\n" - " exit [EXIT_CODE] Request user instance or container exit\n" - " switch-root ROOT [INIT] Change to a different root file system\n" - " suspend Suspend the system\n" - " hibernate Hibernate the system\n" - " hybrid-sleep Hibernate and suspend the system\n", + " is-system-running Check whether system is fully running\n" + " default Enter system default mode\n" + " rescue Enter system rescue mode\n" + " emergency Enter system emergency mode\n" + " halt Shut down and halt the system\n" + " poweroff Shut down and power-off the system\n" + " reboot [ARG] Shut down and reboot the system\n" + " kexec Shut down and reboot the system with kexec\n" + " exit [EXIT_CODE] Request user instance or container exit\n" + " switch-root ROOT [INIT] Change to a different root file system\n" + " suspend Suspend the system\n" + " hibernate Hibernate the system\n" + " hybrid-sleep Hibernate and suspend the system\n", program_invocation_short_name); } @@ -7467,7 +7488,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { ARG_NO_ASK_PASSWORD, ARG_FAILED, ARG_RUNTIME, - ARG_FORCE, ARG_PLAIN, ARG_STATE, ARG_JOB_MODE, @@ -7507,7 +7527,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { { "dry-run", no_argument, NULL, ARG_DRY_RUN }, { "quiet", no_argument, NULL, 'q' }, { "root", required_argument, NULL, ARG_ROOT }, - { "force", no_argument, NULL, ARG_FORCE }, + { "force", no_argument, NULL, 'f' }, { "no-reload", no_argument, NULL, ARG_NO_RELOAD }, { "kill-who", required_argument, NULL, ARG_KILL_WHO }, { "signal", required_argument, NULL, 's' }, @@ -7722,10 +7742,6 @@ static int systemctl_parse_argv(int argc, char *argv[]) { arg_quiet = true; break; - case ARG_FORCE: - arg_force++; - break; - case 'f': arg_force++; break; @@ -8252,28 +8268,43 @@ static int parse_argv(int argc, char *argv[]) { if (strstr(program_invocation_short_name, "halt")) { arg_action = ACTION_HALT; return halt_parse_argv(argc, argv); + } else if (strstr(program_invocation_short_name, "poweroff")) { arg_action = ACTION_POWEROFF; return halt_parse_argv(argc, argv); + } else if (strstr(program_invocation_short_name, "reboot")) { if (kexec_loaded()) arg_action = ACTION_KEXEC; else arg_action = ACTION_REBOOT; return halt_parse_argv(argc, argv); + } else if (strstr(program_invocation_short_name, "shutdown")) { arg_action = ACTION_POWEROFF; return shutdown_parse_argv(argc, argv); + } else if (strstr(program_invocation_short_name, "init")) { + /* Matches invocations as "init" as well as "telinit", which are synonymous when run as PID != + * 1 on SysV. + * + * On SysV "telinit" was the official command to communicate with PID 1, but "init" would + * redirect itself to "telinit" if called with PID != 1. We follow the same logic here still, + * though we add one level of indirection, as we implement "telinit" in "systemctl". Hence, for + * us if you invoke "init" you get "systemd", but it will execve() "systemctl" immediately with + * argv[] unmodified if PID is != 1. If you invoke "telinit" you directly get "systemctl". In + * both cases we shall do the same thing, which is why we do strstr(p_i_s_n, "init") here, as a + * quick way to match both. + * + * Also see redirect_telinit() in src/core/main.c. */ + if (sd_booted() > 0) { arg_action = _ACTION_INVALID; return telinit_parse_argv(argc, argv); } else { - /* Hmm, so some other init system is - * running, we need to forward this - * request to it. For now we simply - * guess that it is Upstart. */ + /* Hmm, so some other init system is running, we need to forward this request to + * it. For now we simply guess that it is Upstart. */ execv(TELINIT, argv); @@ -8452,11 +8483,9 @@ static int start_with_fallback(void) { } static int halt_now(enum action a) { - int r; - /* The kernel will automaticall flush ATA disks and suchlike - * on reboot(), but the file systems need to be synce'd - * explicitly in advance. */ + /* The kernel will automatically flush ATA disks and suchlike on reboot(), but the file systems need to be + * synce'd explicitly in advance. */ if (!arg_no_sync && !arg_dry_run) (void) sync(); @@ -8483,30 +8512,10 @@ static int halt_now(enum action a) { return -errno; case ACTION_KEXEC: - case ACTION_REBOOT: { - _cleanup_free_ char *param = NULL; - - r = read_one_line_file("/run/systemd/reboot-param", ¶m); - if (r < 0 && r != -ENOENT) - log_warning_errno(r, "Failed to read reboot parameter file: %m"); - - if (!isempty(param)) { - if (!arg_quiet) - log_info("Rebooting with argument '%s'.", param); - if (!arg_dry_run) { - (void) syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, - LINUX_REBOOT_CMD_RESTART2, param); - log_warning_errno(errno, "Failed to reboot with parameter, retrying without: %m"); - } - } - - if (!arg_quiet) - log_info("Rebooting."); - if (arg_dry_run) - return 0; - (void) reboot(RB_AUTOBOOT); - return -errno; - } + case ACTION_REBOOT: + return reboot_with_parameter(REBOOT_FALLBACK | + (arg_quiet ? 0 : REBOOT_LOG) | + (arg_dry_run ? REBOOT_DRY_RUN : 0)); default: assert_not_reached("Unknown action."); diff --git a/src/systemctl/systemd-sysv-install.SKELETON b/src/systemctl/systemd-sysv-install.SKELETON index a53a3e622..8c16cf999 100755 --- a/src/systemctl/systemd-sysv-install.SKELETON +++ b/src/systemctl/systemd-sysv-install.SKELETON @@ -11,6 +11,8 @@ usage() { exit 1 } +unset ROOT + # parse options eval set -- "$(getopt -o r: --long root: -- "$@")" while true; do diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h index 82e7d445d..fff6798d0 100644 --- a/src/systemd/sd-bus.h +++ b/src/systemd/sd-bus.h @@ -202,6 +202,9 @@ int sd_bus_attach_event(sd_bus *bus, sd_event *e, int priority); int sd_bus_detach_event(sd_bus *bus); sd_event *sd_bus_get_event(sd_bus *bus); +int sd_bus_get_n_queued_read(sd_bus *bus, uint64_t *ret); +int sd_bus_get_n_queued_write(sd_bus *bus, uint64_t *ret); + int sd_bus_add_filter(sd_bus *bus, sd_bus_slot **slot, sd_bus_message_handler_t callback, void *userdata); int sd_bus_add_match(sd_bus *bus, sd_bus_slot **slot, const char *match, sd_bus_message_handler_t callback, void *userdata); int sd_bus_add_match_async(sd_bus *bus, sd_bus_slot **slot, const char *match, sd_bus_message_handler_t callback, sd_bus_message_handler_t install_callback, void *userdata); diff --git a/src/sysusers/sysusers.c b/src/sysusers/sysusers.c index e06b4b6d5..cd273ef2c 100644 --- a/src/sysusers/sysusers.c +++ b/src/sysusers/sysusers.c @@ -59,12 +59,18 @@ typedef struct Item { char *gid_path; char *description; char *home; + char *shell; gid_t gid; uid_t uid; bool gid_set:1; - bool gid_must_exist:1; + + /* When set the group with the specified gid must exist + * and the check if a uid clashes with the gid is skipped. + */ + bool id_set_strict:1; + bool uid_set:1; bool todo_user:1; @@ -72,6 +78,8 @@ typedef struct Item { } Item; static char *arg_root = NULL; +static const char *arg_replace = NULL; +static bool arg_inline = false; static const char conf_file_dirs[] = CONF_PATHS_NULSTR("sysusers.d"); @@ -381,6 +389,10 @@ static int rename_and_apply_smack(const char *temp_path, const char *dest_path) return r; } +static const char* default_shell(uid_t uid) { + return uid == 0 ? "/bin/sh" : "/sbin/nologin"; +} + static int write_temporary_passwd(const char *passwd_path, FILE **tmpfile, char **tmpfile_path) { _cleanup_fclose_ FILE *original = NULL, *passwd = NULL; _cleanup_(unlink_and_freep) char *passwd_tmp = NULL; @@ -448,7 +460,7 @@ static int write_temporary_passwd(const char *passwd_path, FILE **tmpfile, char /* Initialize the shell to nologin, with one exception: * for root we patch in something special */ - .pw_shell = i->uid == 0 ? (char*) "/bin/sh" : (char*) "/sbin/nologin", + .pw_shell = i->shell ?: (char*) default_shell(i->uid), }; errno = 0; @@ -801,7 +813,7 @@ static int write_files(void) { return 0; } -static int uid_is_ok(uid_t uid, const char *name) { +static int uid_is_ok(uid_t uid, const char *name, bool check_with_gid) { struct passwd *p; struct group *g; const char *n; @@ -813,17 +825,21 @@ static int uid_is_ok(uid_t uid, const char *name) { /* Try to avoid using uids that are already used by a group * that doesn't have the same name as our new user. */ - i = ordered_hashmap_get(todo_gids, GID_TO_PTR(uid)); - if (i && !streq(i->name, name)) - return 0; + if (check_with_gid) { + i = ordered_hashmap_get(todo_gids, GID_TO_PTR(uid)); + if (i && !streq(i->name, name)) + return 0; + } /* Let's check the files directly */ if (hashmap_contains(database_uid, UID_TO_PTR(uid))) return 0; - n = hashmap_get(database_gid, GID_TO_PTR(uid)); - if (n && !streq(n, name)) - return 0; + if (check_with_gid) { + n = hashmap_get(database_gid, GID_TO_PTR(uid)); + if (n && !streq(n, name)) + return 0; + } /* Let's also check via NSS, to avoid UID clashes over LDAP and such, just in case */ if (!arg_root) { @@ -834,13 +850,15 @@ static int uid_is_ok(uid_t uid, const char *name) { if (!IN_SET(errno, 0, ENOENT)) return -errno; - errno = 0; - g = getgrgid((gid_t) uid); - if (g) { - if (!streq(g->gr_name, name)) - return 0; - } else if (!IN_SET(errno, 0, ENOENT)) - return -errno; + if (check_with_gid) { + errno = 0; + g = getgrgid((gid_t) uid); + if (g) { + if (!streq(g->gr_name, name)) + return 0; + } else if (!IN_SET(errno, 0, ENOENT)) + return -errno; + } } return 1; @@ -952,7 +970,7 @@ static int add_user(Item *i) { /* Try to use the suggested numeric uid */ if (i->uid_set) { - r = uid_is_ok(i->uid, i->name); + r = uid_is_ok(i->uid, i->name, !i->id_set_strict); if (r < 0) return log_error_errno(r, "Failed to verify uid " UID_FMT ": %m", i->uid); if (r == 0) { @@ -970,7 +988,7 @@ static int add_user(Item *i) { if (c <= 0 || !uid_range_contains(uid_range, n_uid_range, c)) log_debug("User ID " UID_FMT " of file not suitable for %s.", c, i->name); else { - r = uid_is_ok(c, i->name); + r = uid_is_ok(c, i->name, true); if (r < 0) return log_error_errno(r, "Failed to verify uid " UID_FMT ": %m", i->uid); else if (r > 0) { @@ -984,7 +1002,7 @@ static int add_user(Item *i) { /* Otherwise, try to reuse the group ID */ if (!i->uid_set && i->gid_set) { - r = uid_is_ok((uid_t) i->gid, i->name); + r = uid_is_ok((uid_t) i->gid, i->name, true); if (r < 0) return log_error_errno(r, "Failed to verify uid " UID_FMT ": %m", i->uid); if (r > 0) { @@ -1002,7 +1020,7 @@ static int add_user(Item *i) { return r; } - r = uid_is_ok(search_uid, i->name); + r = uid_is_ok(search_uid, i->name, true); if (r < 0) return log_error_errno(r, "Failed to verify uid " UID_FMT ": %m", i->uid); else if (r > 0) @@ -1099,7 +1117,7 @@ static int add_group(Item *i) { r = gid_is_ok(i->gid); if (r < 0) return log_error_errno(r, "Failed to verify gid " GID_FMT ": %m", i->gid); - if (i->gid_must_exist) { + if (i->id_set_strict) { /* If we require the gid to already exist we can return here: * r > 0: means the gid does not exist -> fail * r == 0: means the gid exists -> nothing more to do. @@ -1191,12 +1209,25 @@ static int process_item(Item *i) { switch (i->type) { - case ADD_USER: - r = add_group(i); - if (r < 0) - return r; + case ADD_USER: { + Item *j; + + j = ordered_hashmap_get(groups, i->name); + if (j && j->todo_group) { + /* When the group with the same name is already in queue, + * use the information about the group and do not create + * duplicated group entry. */ + i->gid_set = j->gid_set; + i->gid = j->gid; + i->id_set_strict = true; + } else { + r = add_group(i); + if (r < 0) + return r; + } return add_user(i); + } case ADD_GROUP: return add_group(i); @@ -1216,6 +1247,7 @@ static void item_free(Item *i) { free(i->gid_path); free(i->description); free(i->home); + free(i->shell); free(i); } @@ -1227,40 +1259,11 @@ static int add_implicit(void) { int r; /* Implicitly create additional users and groups, if they were listed in "m" lines */ - ORDERED_HASHMAP_FOREACH_KEY(l, g, members, iterator) { - Item *i; char **m; - i = ordered_hashmap_get(groups, g); - if (!i) { - _cleanup_(item_freep) Item *j = NULL; - - r = ordered_hashmap_ensure_allocated(&groups, &string_hash_ops); - if (r < 0) - return log_oom(); - - j = new0(Item, 1); - if (!j) - return log_oom(); - - j->type = ADD_GROUP; - j->name = strdup(g); - if (!j->name) - return log_oom(); - - r = ordered_hashmap_put(groups, j->name, j); - if (r < 0) - return log_oom(); - - log_debug("Adding implicit group '%s' due to m line", j->name); - j = NULL; - } - - STRV_FOREACH(m, l) { - - i = ordered_hashmap_get(users, *m); - if (!i) { + STRV_FOREACH(m, l) + if (!ordered_hashmap_get(users, *m)) { _cleanup_(item_freep) Item *j = NULL; r = ordered_hashmap_ensure_allocated(&users, &string_hash_ops); @@ -1283,6 +1286,30 @@ static int add_implicit(void) { log_debug("Adding implicit user '%s' due to m line", j->name); j = NULL; } + + if (!(ordered_hashmap_get(users, g) || + ordered_hashmap_get(groups, g))) { + _cleanup_(item_freep) Item *j = NULL; + + r = ordered_hashmap_ensure_allocated(&groups, &string_hash_ops); + if (r < 0) + return log_oom(); + + j = new0(Item, 1); + if (!j) + return log_oom(); + + j->type = ADD_GROUP; + j->name = strdup(g); + if (!j->name) + return log_oom(); + + r = ordered_hashmap_put(groups, j->name, j); + if (r < 0) + return log_oom(); + + log_debug("Adding implicit group '%s' due to m line", j->name); + j = NULL; } } @@ -1323,6 +1350,9 @@ static bool item_equal(Item *a, Item *b) { if (!streq_ptr(a->home, b->home)) return false; + if (!streq_ptr(a->shell, b->shell)) + return false; + return true; } @@ -1336,7 +1366,12 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { {} }; - _cleanup_free_ char *action = NULL, *name = NULL, *id = NULL, *resolved_name = NULL, *resolved_id = NULL, *description = NULL, *home = NULL; + _cleanup_free_ char *action = NULL, + *name = NULL, *resolved_name = NULL, + *id = NULL, *resolved_id = NULL, + *description = NULL, + *home = NULL, + *shell, *resolved_shell = NULL; _cleanup_(item_freep) Item *i = NULL; Item *existing; OrderedHashmap *h; @@ -1349,7 +1384,8 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { /* Parse columns */ p = buffer; - r = extract_many_words(&p, NULL, EXTRACT_QUOTES, &action, &name, &id, &description, &home, NULL); + r = extract_many_words(&p, NULL, EXTRACT_QUOTES, + &action, &name, &id, &description, &home, &shell, NULL); if (r < 0) { log_error("[%s:%u] Syntax error.", fname, line); return r; @@ -1425,6 +1461,24 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { } } + /* Verify shell */ + if (isempty(shell) || streq(shell, "-")) + shell = mfree(shell); + + if (shell) { + r = specifier_printf(shell, specifier_table, NULL, &resolved_shell); + if (r < 0) { + log_error("[%s:%u] Failed to replace specifiers: %s", fname, line, shell); + return r; + } + + if (!valid_shell(resolved_shell)) { + log_error("[%s:%u] '%s' is not a valid login shell field.", fname, line, resolved_shell); + return -EINVAL; + } + } + + switch (action[0]) { case ADD_RANGE: @@ -1438,13 +1492,10 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { return -EINVAL; } - if (description) { - log_error("[%s:%u] Lines of type 'r' don't take a GECOS field.", fname, line); - return -EINVAL; - } - - if (home) { - log_error("[%s:%u] Lines of type 'r' don't take a home directory field.", fname, line); + if (description || home || shell) { + log_error("[%s:%u] Lines of type '%c' don't take a %s field.", + fname, line, action[0], + description ? "GECOS" : home ? "home directory" : "login shell"); return -EINVAL; } @@ -1475,13 +1526,10 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { return -EINVAL; } - if (description) { - log_error("[%s:%u] Lines of type 'm' don't take a GECOS field.", fname, line); - return -EINVAL; - } - - if (home) { - log_error("[%s:%u] Lines of type 'm' don't take a home directory field.", fname, line); + if (description || home || shell) { + log_error("[%s:%u] Lines of type '%c' don't take a %s field.", + fname, line, action[0], + description ? "GECOS" : home ? "home directory" : "login shell"); return -EINVAL; } @@ -1548,14 +1596,15 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { if (r < 0) return log_error_errno(r, "Failed to parse GID: '%s': %m", id); i->gid_set = true; - i->gid_must_exist = true; + i->id_set_strict = true; free_and_replace(resolved_id, uid); } - r = parse_uid(resolved_id, &i->uid); - if (r < 0) - return log_error_errno(r, "Failed to parse UID: '%s': %m", id); - - i->uid_set = true; + if (!streq(resolved_id, "-")) { + r = parse_uid(resolved_id, &i->uid); + if (r < 0) + return log_error_errno(r, "Failed to parse UID: '%s': %m", id); + i->uid_set = true; + } } } @@ -1565,6 +1614,9 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { i->home = home; home = NULL; + i->shell = resolved_shell; + resolved_shell = NULL; + h = users; break; @@ -1574,13 +1626,10 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { return -EINVAL; } - if (description) { - log_error("[%s:%u] Lines of type 'g' don't take a GECOS field.", fname, line); - return -EINVAL; - } - - if (home) { - log_error("[%s:%u] Lines of type 'g' don't take a home directory field.", fname, line); + if (description || home || shell) { + log_error("[%s:%u] Lines of type '%c' don't take a %s field.", + fname, line, action[0], + description ? "GECOS" : home ? "home directory" : "login shell"); return -EINVAL; } @@ -1710,6 +1759,8 @@ static void help(void) { " -h --help Show this help\n" " --version Show package version\n" " --root=PATH Operate on an alternate filesystem root\n" + " --replace=PATH Treat arguments as replacement for PATH\n" + " --inline Treat arguments as configuration lines\n" , program_invocation_short_name); } @@ -1718,12 +1769,16 @@ static int parse_argv(int argc, char *argv[]) { enum { ARG_VERSION = 0x100, ARG_ROOT, + ARG_REPLACE, + ARG_INLINE, }; static const struct option options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, ARG_VERSION }, { "root", required_argument, NULL, ARG_ROOT }, + { "replace", required_argument, NULL, ARG_REPLACE }, + { "inline", no_argument, NULL, ARG_INLINE }, {} }; @@ -1749,6 +1804,20 @@ static int parse_argv(int argc, char *argv[]) { return r; break; + case ARG_REPLACE: + if (!path_is_absolute(optarg) || + !endswith(optarg, ".conf")) { + log_error("The argument to --replace= must an absolute path to a config file"); + return -EINVAL; + } + + arg_replace = optarg; + break; + + case ARG_INLINE: + arg_inline = true; + break; + case '?': return -EINVAL; @@ -1756,14 +1825,76 @@ static int parse_argv(int argc, char *argv[]) { assert_not_reached("Unhandled option"); } + if (arg_replace && optind >= argc) { + log_error("When --replace= is given, some configuration items must be specified"); + return -EINVAL; + } + return 1; } +static int parse_arguments(char **args) { + char **arg; + unsigned pos = 1; + int r; + + STRV_FOREACH(arg, args) { + if (arg_inline) + /* Use (argument):n, where n==1 for the first positional arg */ + r = parse_line("(argument)", pos, *arg); + else + r = read_config_file(*arg, false); + if (r < 0) + return r; + + pos++; + } + + return 0; +} + +static int read_config_files(const char* dirs, char **args) { + _cleanup_strv_free_ char **files = NULL; + _cleanup_free_ char *p = NULL; + char **f; + int r; + + r = conf_files_list_nulstr(&files, ".conf", arg_root, 0, dirs); + if (r < 0) + return log_error_errno(r, "Failed to enumerate sysusers.d files: %m"); + + if (arg_replace) { + r = conf_files_insert_nulstr(&files, arg_root, dirs, arg_replace); + if (r < 0) + return log_error_errno(r, "Failed to extend sysusers.d file list: %m"); + + p = path_join(arg_root, arg_replace, NULL); + if (!p) + return log_oom(); + } + + STRV_FOREACH(f, files) + if (p && path_equal(*f, p)) { + log_debug("Parsing arguments at position \"%s\"…", *f); + + r = parse_arguments(args); + if (r < 0) + return r; + } else { + log_debug("Reading config file \"%s\"…", *f); + + /* Just warn, ignore result otherwise */ + (void) read_config_file(*f, true); + } + + return 0; +} + int main(int argc, char *argv[]) { _cleanup_close_ int lock = -1; Iterator iterator; - int r, k; + int r; Item *i; char *n; @@ -1783,30 +1914,18 @@ int main(int argc, char *argv[]) { goto finish; } - if (optind < argc) { - int j; - - for (j = optind; j < argc; j++) { - k = read_config_file(argv[j], false); - if (k < 0 && r == 0) - r = k; - } - } else { - _cleanup_strv_free_ char **files = NULL; - char **f; - - r = conf_files_list_nulstr(&files, ".conf", arg_root, 0, conf_file_dirs); - if (r < 0) { - log_error_errno(r, "Failed to enumerate sysusers.d files: %m"); - goto finish; - } - - STRV_FOREACH(f, files) { - k = read_config_file(*f, true); - if (k < 0 && r == 0) - r = k; - } - } + /* If command line arguments are specified along with --replace, read all + * configuration files and insert the positional arguments at the specified + * place. Otherwise, if command line arguments are specified, execute just + * them, and finally, without --replace= or any positional arguments, just + * read configuration and execute it. + */ + if (arg_replace || optind >= argc) + r = read_config_files(conf_file_dirs, argv + optind); + else + r = parse_arguments(argv + optind); + if (r < 0) + goto finish; /* Let's tell nss-systemd not to synthesize the "root" and "nobody" entries for it, so that our detection * whether the names or UID/GID area already used otherwise doesn't get confused. After all, even though @@ -1819,7 +1938,7 @@ int main(int argc, char *argv[]) { } if (!uid_range) { - /* Default to default range of 1..SYSTEMD_UID_MAX */ + /* Default to default range of 1..SYSTEM_UID_MAX */ r = uid_range_add(&uid_range, &n_uid_range, 1, SYSTEM_UID_MAX); if (r < 0) { log_oom(); @@ -1833,7 +1952,7 @@ int main(int argc, char *argv[]) { lock = take_etc_passwd_lock(arg_root); if (lock < 0) { - log_error_errno(lock, "Failed to take lock: %m"); + log_error_errno(lock, "Failed to take /etc/passwd lock: %m"); goto finish; } diff --git a/src/test/meson.build b/src/test/meson.build index 1db8aa107..4f28ef872 100644 --- a/src/test/meson.build +++ b/src/test/meson.build @@ -643,6 +643,11 @@ tests += [ [], []], + [['src/test/test-gcrypt-util.c'], + [], + [], + 'HAVE_GCRYPT'], + [['src/test/test-nss.c'], [], [libdl], diff --git a/src/test/test-ask-password-api.c b/src/test/test-ask-password-api.c index da4446582..562a77453 100644 --- a/src/test/test-ask-password-api.c +++ b/src/test/test-ask-password-api.c @@ -26,7 +26,7 @@ static void ask_password(void) { int r; _cleanup_free_ char *ret; - r = ask_password_tty("hello?", "da key", 0, 0, NULL, &ret); + r = ask_password_tty(-1, "hello?", "da key", 0, 0, NULL, &ret); assert(r >= 0); log_info("Got %s", ret); diff --git a/src/test/test-bpf.c b/src/test/test-bpf.c index 361cf100b..6ca2be41b 100644 --- a/src/test/test-bpf.c +++ b/src/test/test-bpf.c @@ -71,12 +71,17 @@ int main(int argc, char *argv[]) { } r = bpf_firewall_supported(); - if (r == 0) { + if (r == BPF_FIREWALL_UNSUPPORTED) { log_notice("BPF firewalling not supported, skipping"); return EXIT_TEST_SKIP; } assert_se(r > 0); + if (r == BPF_FIREWALL_SUPPORTED_WITH_MULTI) + log_notice("BPF firewalling with BPF_F_ALLOW_MULTI supported. Yay!"); + else + log_notice("BPF firewalling (though without BPF_F_ALLOW_MULTI) supported. Good."); + r = bpf_program_load_kernel(p, log_buf, ELEMENTSOF(log_buf)); assert(r >= 0); diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 2248a3063..c4163fc3a 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -30,6 +30,7 @@ #include "special.h" #include "stat-util.h" #include "string-util.h" +#include "strv.h" #include "test-helper.h" #include "user-util.h" #include "util.h" @@ -404,6 +405,45 @@ static void test_cg_tests(void) { assert_se(!systemd); } +static void test_cg_get_keyed_attribute(void) { + _cleanup_free_ char *val = NULL; + char *vals3[3] = {}, *vals3a[3] = {}; + int i; + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "no_such_file", STRV_MAKE("no_such_attr"), &val) == -ENOENT); + assert_se(val == NULL); + + if (access("/sys/fs/cgroup/init.scope/cpu.stat", R_OK) < 0) { + log_info_errno(errno, "Skipping most of %s, /init.scope/cpu.stat not accessible: %m", __func__); + return; + } + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", STRV_MAKE("no_such_attr"), &val) == -ENXIO); + assert_se(val == NULL); + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", STRV_MAKE("usage_usec"), &val) == 0); + log_info("cpu /init.scope cpu.stat [usage_usec] → \"%s\"", val); + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", STRV_MAKE("usage_usec", "no_such_attr"), vals3) == -ENXIO); + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", STRV_MAKE("usage_usec", "usage_usec"), vals3) == -ENXIO); + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", + STRV_MAKE("usage_usec", "user_usec", "system_usec"), vals3) == 0); + log_info("cpu /init.scope cpu.stat [usage_usec user_usec system_usec] → \"%s\", \"%s\", \"%s\"", + vals3[0], vals3[1], vals3[2]); + + assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "cpu.stat", + STRV_MAKE("system_usec", "user_usec", "usage_usec"), vals3a) == 0); + log_info("cpu /init.scope cpu.stat [system_usec user_usec usage_usec] → \"%s\", \"%s\", \"%s\"", + vals3a[0], vals3a[1], vals3a[2]); + + for (i = 0; i < 3; i++) { + free(vals3[i]); + free(vals3a[i]); + } +} + int main(void) { log_set_max_level(LOG_DEBUG); log_parse_environment(); @@ -429,6 +469,7 @@ int main(void) { test_is_wanted_print(false); /* run twice to test caching */ test_is_wanted(); test_cg_tests(); + test_cg_get_keyed_attribute(); return 0; } diff --git a/src/test/test-conf-parser.c b/src/test/test-conf-parser.c index 770bb9600..72c53ab6a 100644 --- a/src/test/test-conf-parser.c +++ b/src/test/test-conf-parser.c @@ -226,6 +226,45 @@ static void test_config_parse_iec_uint64(void) { assert_se(config_parse_iec_uint64(NULL, "/this/file", 11, "Section", 22, "Size", 0, "4.5M", &offset, NULL) == 0); } +static void test_config_parse_join_controllers(void) { + int r; + _cleanup_(strv_free_freep) char ***c = NULL; + char ***c2; + + /* Test normal operation */ + r = config_parse_join_controllers(NULL, "example.conf", 11, "Section", 10, "JoinControllers", 0, "cpu,cpuacct net_cls,netprio", &c, NULL); + assert_se(r == 0); + assert_se(c); + assert_se(strv_length(c[0]) == 2); + assert_se(strv_equal(c[0], STRV_MAKE("cpu", "cpuacct"))); + assert_se(strv_length(c[1]) == 2); + assert_se(strv_equal(c[1], STRV_MAKE("net_cls", "netprio"))); + assert_se(c[2] == NULL); + + /* Test special case of no mounted controllers */ + r = config_parse_join_controllers(NULL, "example.conf", 12, "Section", 10, "JoinControllers", 0, "", &c, NULL); + assert_se(r == 0); + assert_se(c); + assert_se(strv_equal(c[0], STRV_MAKE_EMPTY)); + assert_se(c[1] == NULL); + + /* Test merging of overlapping lists */ + r = config_parse_join_controllers(NULL, "example.conf", 13, "Section", 10, "JoinControllers", 0, "a,b b,c", &c, NULL); + assert_se(r == 0); + assert_se(c); + assert_se(strv_length(c[0]) == 3); + assert_se(strv_contains(c[0], "a")); + assert_se(strv_contains(c[0], "b")); + assert_se(strv_contains(c[0], "c")); + assert_se(c[1] == NULL); + + /* Test ignoring of bad lines */ + c2 = c; + r = config_parse_join_controllers(NULL, "example.conf", 14, "Section", 10, "JoinControllers", 0, "a,\"b ", &c, NULL); + assert_se(r < 0); + assert_se(c == c2); +} + #define x10(x) x x x x x x x x x x #define x100(x) x10(x10(x)) #define x1000(x) x10(x100(x)) @@ -365,6 +404,7 @@ int main(int argc, char **argv) { test_config_parse_sec(); test_config_parse_nsec(); test_config_parse_iec_uint64(); + test_config_parse_join_controllers(); for (i = 0; i < ELEMENTSOF(config_file); i++) test_config_parse(i, config_file[i]); diff --git a/src/test/test-copy.c b/src/test/test-copy.c index d277b78c5..1dde878a9 100644 --- a/src/test/test-copy.c +++ b/src/test/test-copy.c @@ -146,7 +146,7 @@ static void test_copy_tree(void) { assert_se((f = strjoin(original_dir, *p))); assert_se((l = strjoin(copy_dir, *link))); - assert_se(readlink_and_canonicalize(l, NULL, &target) == 0); + assert_se(chase_symlinks(l, NULL, 0, &target) == 1); assert_se(path_equal(f, target)); } diff --git a/src/test/test-execute.c b/src/test/test-execute.c index fba798e22..645e0b3d4 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -24,6 +24,7 @@ #include #include +#include "capability-util.h" #include "cpu-set-util.h" #include "errno-list.h" #include "fileio.h" @@ -40,6 +41,7 @@ #include "test-helper.h" #include "tests.h" #include "unit.h" +#include "user-util.h" #include "util.h" #include "virt.h" @@ -75,6 +77,51 @@ static void check(Manager *m, Unit *unit, int status_expected, int code_expected assert_se(service->main_exec_status.code == code_expected); } +static bool check_nobody_user_and_group(void) { + static int cache = -1; + struct passwd *p; + struct group *g; + + if (cache >= 0) + return !!cache; + + if (!synthesize_nobody()) + goto invalid; + + p = getpwnam(NOBODY_USER_NAME); + if (!p || + !streq(p->pw_name, NOBODY_USER_NAME) || + p->pw_uid != UID_NOBODY || + p->pw_gid != GID_NOBODY) + goto invalid; + + p = getpwuid(UID_NOBODY); + if (!p || + !streq(p->pw_name, NOBODY_USER_NAME) || + p->pw_uid != UID_NOBODY || + p->pw_gid != GID_NOBODY) + goto invalid; + + g = getgrnam(NOBODY_GROUP_NAME); + if (!g || + !streq(g->gr_name, NOBODY_GROUP_NAME) || + g->gr_gid != GID_NOBODY) + goto invalid; + + g = getgrgid(GID_NOBODY); + if (!g || + !streq(g->gr_name, NOBODY_GROUP_NAME) || + g->gr_gid != GID_NOBODY) + goto invalid; + + cache = 1; + return true; + +invalid: + cache = 0; + return false; +} + static bool is_inaccessible_available(void) { char *p; @@ -202,7 +249,7 @@ static void test_exec_privatedevices(Manager *m) { * properly set, so be sure that it exists */ r = find_binary("capsh", NULL); if (r < 0) { - log_error_errno(r, "Could not find capsh binary, skipping remaining tests in %s: %m", __func__); + log_notice_errno(r, "Could not find capsh binary, skipping remaining tests in %s: %m", __func__); return; } @@ -226,7 +273,7 @@ static void test_exec_protectkernelmodules(Manager *m) { r = find_binary("capsh", NULL); if (r < 0) { - log_error_errno(r, "Skipping %s, could not find capsh binary: %m", __func__); + log_notice_errno(r, "Skipping %s, could not find capsh binary: %m", __func__); return; } @@ -276,6 +323,14 @@ static void test_exec_inaccessiblepaths(Manager *m) { test(m, "exec-inaccessiblepaths-mount-propagation.service", 0, CLD_EXITED); } +static void test_exec_temporaryfilesystem(Manager *m) { + + test(m, "exec-temporaryfilesystem-options.service", 0, CLD_EXITED); + test(m, "exec-temporaryfilesystem-ro.service", 0, CLD_EXITED); + test(m, "exec-temporaryfilesystem-rw.service", 0, CLD_EXITED); + test(m, "exec-temporaryfilesystem-usr.service", 0, CLD_EXITED); +} + static void test_exec_systemcallfilter(Manager *m) { #if HAVE_SECCOMP if (!is_seccomp_available()) { @@ -324,33 +379,53 @@ static void test_exec_systemcallfilter_system(Manager *m) { log_notice("Seccomp not available, skipping %s", __func__); return; } - if (getpwnam("nobody")) - test(m, "exec-systemcallfilter-system-user.service", 0, CLD_EXITED); - else if (getpwnam("nfsnobody")) - test(m, "exec-systemcallfilter-system-user-nfsnobody.service", 0, CLD_EXITED); - else - log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody user: %m", __func__); + + test(m, "exec-systemcallfilter-system-user.service", 0, CLD_EXITED); + + if (!check_nobody_user_and_group()) { + log_notice("nobody user/group is not synthesized or may conflict to other entries, skipping remaining tests in %s", __func__); + return; + } + + if (!STR_IN_SET(NOBODY_USER_NAME, "nobody", "nfsnobody")) { + log_notice("Unsupported nobody user name '%s', skipping remaining tests in %s", NOBODY_USER_NAME, __func__); + return; + } + + test(m, "exec-systemcallfilter-system-user-" NOBODY_USER_NAME ".service", 0, CLD_EXITED); #endif } static void test_exec_user(Manager *m) { - if (getpwnam("nobody")) - test(m, "exec-user.service", 0, CLD_EXITED); - else if (getpwnam("nfsnobody")) - test(m, "exec-user-nfsnobody.service", 0, CLD_EXITED); - else - log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody user: %m", __func__); + test(m, "exec-user.service", 0, CLD_EXITED); + + if (!check_nobody_user_and_group()) { + log_notice("nobody user/group is not synthesized or may conflict to other entries, skipping remaining tests in %s", __func__); + return; + } + + if (!STR_IN_SET(NOBODY_USER_NAME, "nobody", "nfsnobody")) { + log_notice("Unsupported nobody user name '%s', skipping remaining tests in %s", NOBODY_USER_NAME, __func__); + return; + } + + test(m, "exec-user-" NOBODY_USER_NAME ".service", 0, CLD_EXITED); } static void test_exec_group(Manager *m) { - if (getgrnam("nobody")) - test(m, "exec-group.service", 0, CLD_EXITED); - else if (getgrnam("nfsnobody")) - test(m, "exec-group-nfsnobody.service", 0, CLD_EXITED); - else if (getgrnam("nogroup")) - test(m, "exec-group-nogroup.service", 0, CLD_EXITED); - else - log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody/nogroup group: %m", __func__); + test(m, "exec-group.service", 0, CLD_EXITED); + + if (!check_nobody_user_and_group()) { + log_notice("nobody user/group is not synthesized or may conflict to other entries, skipping remaining tests in %s", __func__); + return; + } + + if (!STR_IN_SET(NOBODY_GROUP_NAME, "nobody", "nfsnobody", "nogroup")) { + log_notice("Unsupported nobody group name '%s', skipping remaining tests in %s", NOBODY_GROUP_NAME, __func__); + return; + } + + test(m, "exec-group-" NOBODY_GROUP_NAME ".service", 0, CLD_EXITED); } static void test_exec_supplementarygroups(Manager *m) { @@ -434,12 +509,19 @@ static void test_exec_umask(Manager *m) { static void test_exec_runtimedirectory(Manager *m) { test(m, "exec-runtimedirectory.service", 0, CLD_EXITED); test(m, "exec-runtimedirectory-mode.service", 0, CLD_EXITED); - if (getgrnam("nobody")) - test(m, "exec-runtimedirectory-owner.service", 0, CLD_EXITED); - else if (getgrnam("nfsnobody")) - test(m, "exec-runtimedirectory-owner-nfsnobody.service", 0, CLD_EXITED); - else - log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody group: %m", __func__); + test(m, "exec-runtimedirectory-owner.service", 0, CLD_EXITED); + + if (!check_nobody_user_and_group()) { + log_notice("nobody user/group is not synthesized or may conflict to other entries, skipping remaining tests in %s", __func__); + return; + } + + if (!STR_IN_SET(NOBODY_GROUP_NAME, "nobody", "nfsnobody", "nogroup")) { + log_notice("Unsupported nobody group name '%s', skipping remaining tests in %s", NOBODY_GROUP_NAME, __func__); + return; + } + + test(m, "exec-runtimedirectory-owner-" NOBODY_GROUP_NAME ".service", 0, CLD_EXITED); } static void test_exec_capabilityboundingset(Manager *m) { @@ -447,7 +529,14 @@ static void test_exec_capabilityboundingset(Manager *m) { r = find_binary("capsh", NULL); if (r < 0) { - log_error_errno(r, "Skipping %s, could not find capsh binary: %m", __func__); + log_notice_errno(r, "Skipping %s, could not find capsh binary: %m", __func__); + return; + } + + if (have_effective_cap(CAP_CHOWN) <= 0 || + have_effective_cap(CAP_FOWNER) <= 0 || + have_effective_cap(CAP_KILL) <= 0) { + log_notice("Skipping %s, this process does not have enough capabilities", __func__); return; } @@ -457,7 +546,7 @@ static void test_exec_capabilityboundingset(Manager *m) { test(m, "exec-capabilityboundingset-invert.service", 0, CLD_EXITED); } -static void test_exec_capabilityambientset(Manager *m) { +static void test_exec_ambientcapabilities(Manager *m) { int r; /* Check if the kernel has support for ambient capabilities. Run @@ -466,18 +555,31 @@ static void test_exec_capabilityambientset(Manager *m) { * in the first place for the tests. */ r = prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0); if (r < 0 && IN_SET(errno, EINVAL, EOPNOTSUPP, ENOSYS)) { - log_error("Skipping %s, the kernel does not support ambient capabilities", __func__); + log_notice("Skipping %s, the kernel does not support ambient capabilities", __func__); return; } - if (getpwnam("nobody")) { - test(m, "exec-capabilityambientset.service", 0, CLD_EXITED); - test(m, "exec-capabilityambientset-merge.service", 0, CLD_EXITED); - } else if (getpwnam("nfsnobody")) { - test(m, "exec-capabilityambientset-nfsnobody.service", 0, CLD_EXITED); - test(m, "exec-capabilityambientset-merge-nfsnobody.service", 0, CLD_EXITED); - } else - log_error_errno(errno, "Skipping %s, could not find nobody/nfsnobody user: %m", __func__); + if (have_effective_cap(CAP_CHOWN) <= 0 || + have_effective_cap(CAP_NET_RAW) <= 0) { + log_notice("Skipping %s, this process does not have enough capabilities", __func__); + return; + } + + test(m, "exec-ambientcapabilities.service", 0, CLD_EXITED); + test(m, "exec-ambientcapabilities-merge.service", 0, CLD_EXITED); + + if (!check_nobody_user_and_group()) { + log_notice("nobody user/group is not synthesized or may conflict to other entries, skipping remaining tests in %s", __func__); + return; + } + + if (!STR_IN_SET(NOBODY_USER_NAME, "nobody", "nfsnobody")) { + log_notice("Unsupported nobody user name '%s', skipping remaining tests in %s", NOBODY_USER_NAME, __func__); + return; + } + + test(m, "exec-ambientcapabilities-" NOBODY_USER_NAME ".service", 0, CLD_EXITED); + test(m, "exec-ambientcapabilities-merge-" NOBODY_USER_NAME ".service", 0, CLD_EXITED); } static void test_exec_privatenetwork(Manager *m) { @@ -485,7 +587,7 @@ static void test_exec_privatenetwork(Manager *m) { r = find_binary("ip", NULL); if (r < 0) { - log_error_errno(r, "Skipping %s, could not find ip binary: %m", __func__); + log_notice_errno(r, "Skipping %s, could not find ip binary: %m", __func__); return; } @@ -543,9 +645,10 @@ static int run_tests(UnitFileScope scope, const test_function_t *tests) { } int main(int argc, char *argv[]) { + _cleanup_(rm_rf_physical_and_freep) char *runtime_dir = NULL; static const test_function_t user_tests[] = { + test_exec_ambientcapabilities, test_exec_bindpaths, - test_exec_capabilityambientset, test_exec_capabilityboundingset, test_exec_cpuaffinity, test_exec_environment, @@ -569,6 +672,7 @@ int main(int argc, char *argv[]) { test_exec_supplementarygroups, test_exec_systemcallerrornumber, test_exec_systemcallfilter, + test_exec_temporaryfilesystem, test_exec_umask, test_exec_unsetenvironment, test_exec_user, @@ -602,7 +706,7 @@ int main(int argc, char *argv[]) { return EXIT_TEST_SKIP; } - assert_se(setenv("XDG_RUNTIME_DIR", "/tmp/", 1) == 0); + assert_se(runtime_dir = setup_fake_runtime_dir()); assert_se(set_unit_path(get_testdata_dir("/test-execute")) >= 0); /* Unset VAR1, VAR2 and VAR3 which are used in the PassEnvironment test diff --git a/src/test/test-fd-util.c b/src/test/test-fd-util.c index e5a0e9d51..3f94df2ee 100644 --- a/src/test/test-fd-util.c +++ b/src/test/test-fd-util.c @@ -25,6 +25,8 @@ #include "fd-util.h" #include "fileio.h" #include "macro.h" +#include "path-util.h" +#include "process-util.h" #include "random-util.h" #include "string-util.h" #include "util.h" @@ -155,12 +157,98 @@ static void test_acquire_data_fd(void) { test_acquire_data_fd_one(ACQUIRE_NO_DEV_NULL|ACQUIRE_NO_MEMFD|ACQUIRE_NO_PIPE|ACQUIRE_NO_TMPFILE); } +static void test_fd_move_above_stdio(void) { + int original_stdin, new_fd; + + original_stdin = fcntl(0, F_DUPFD, 3); + assert_se(original_stdin >= 3); + assert_se(close_nointr(0) != EBADF); + + new_fd = open("/dev/null", O_RDONLY); + assert_se(new_fd == 0); + + new_fd = fd_move_above_stdio(new_fd); + assert_se(new_fd >= 3); + + assert_se(dup(original_stdin) == 0); + assert_se(close_nointr(original_stdin) != EBADF); + assert_se(close_nointr(new_fd) != EBADF); +} + +static void test_rearrange_stdio(void) { + pid_t pid; + int r; + + r = safe_fork("rearrange", FORK_WAIT|FORK_LOG, &pid); + assert_se(r >= 0); + + if (r == 0) { + _cleanup_free_ char *path = NULL; + char buffer[10]; + + /* Child */ + + safe_close(STDERR_FILENO); /* Let's close an fd < 2, to make it more interesting */ + + assert_se(rearrange_stdio(-1, -1, -1) >= 0); + + assert_se(fd_get_path(STDIN_FILENO, &path) >= 0); + assert_se(path_equal(path, "/dev/null")); + path = mfree(path); + + assert_se(fd_get_path(STDOUT_FILENO, &path) >= 0); + assert_se(path_equal(path, "/dev/null")); + path = mfree(path); + + assert_se(fd_get_path(STDOUT_FILENO, &path) >= 0); + assert_se(path_equal(path, "/dev/null")); + path = mfree(path); + + safe_close(STDIN_FILENO); + safe_close(STDOUT_FILENO); + safe_close(STDERR_FILENO); + + { + int pair[2]; + assert_se(pipe(pair) >= 0); + assert_se(pair[0] == 0); + assert_se(pair[1] == 1); + assert_se(fd_move_above_stdio(0) == 3); + } + assert_se(open("/dev/full", O_WRONLY|O_CLOEXEC) == 0); + assert_se(acquire_data_fd("foobar", 6, 0) == 2); + + assert_se(rearrange_stdio(2, 0, 1) >= 0); + + assert_se(write(1, "x", 1) < 0 && errno == ENOSPC); + assert_se(write(2, "z", 1) == 1); + assert_se(read(3, buffer, sizeof(buffer)) == 1); + assert_se(buffer[0] == 'z'); + assert_se(read(0, buffer, sizeof(buffer)) == 6); + assert_se(memcmp(buffer, "foobar", 6) == 0); + + assert_se(rearrange_stdio(-1, 1, 2) >= 0); + assert_se(write(1, "a", 1) < 0 && errno == ENOSPC); + assert_se(write(2, "y", 1) == 1); + assert_se(read(3, buffer, sizeof(buffer)) == 1); + assert_se(buffer[0] == 'y'); + + assert_se(fd_get_path(0, &path) >= 0); + assert_se(path_equal(path, "/dev/null")); + path = mfree(path); + + _exit(EXIT_SUCCESS); + } +} + int main(int argc, char *argv[]) { test_close_many(); test_close_nointr(); test_same_fd(); test_open_serialization_fd(); test_acquire_data_fd(); + test_fd_move_above_stdio(); + test_rearrange_stdio(); return 0; } diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c index 9f3a50008..ebcec4fcc 100644 --- a/src/test/test-fs-util.c +++ b/src/test/test-fs-util.c @@ -527,6 +527,40 @@ static void test_touch_file(void) { assert_se(timespec_load(&st.st_mtim) == test_mtime); } +static void test_unlinkat_deallocate(void) { + _cleanup_free_ char *p = NULL; + _cleanup_close_ int fd = -1; + struct stat st; + + assert_se(tempfn_random_child(NULL, "unlink-deallocation", &p) >= 0); + + fd = open(p, O_WRONLY|O_CLOEXEC|O_CREAT|O_EXCL, 0600); + assert_se(fd >= 0); + + assert_se(write(fd, "hallo\n", 6) == 6); + + assert_se(fstat(fd, &st) >= 0); + assert_se(st.st_size == 6); + assert_se(st.st_blocks > 0); + assert_se(st.st_nlink == 1); + + assert_se(unlinkat_deallocate(AT_FDCWD, p, 0) >= 0); + + assert_se(fstat(fd, &st) >= 0); + assert_se(IN_SET(st.st_size, 0, 6)); /* depending on whether hole punching worked the size will be 6 (it worked) or 0 (we had to resort to truncation) */ + assert_se(st.st_blocks == 0); + assert_se(st.st_nlink == 0); +} + +static void test_fsync_directory_of_file(void) { + _cleanup_close_ int fd = -1; + + fd = open_tmpfile_unlinkable(NULL, O_RDWR); + assert_se(fd >= 0); + + assert_se(fsync_directory_of_file(fd) >= 0); +} + int main(int argc, char *argv[]) { test_unlink_noerrno(); test_get_files_in_directory(); @@ -536,6 +570,8 @@ int main(int argc, char *argv[]) { test_dot_or_dot_dot(); test_access_fd(); test_touch_file(); + test_unlinkat_deallocate(); + test_fsync_directory_of_file(); return 0; } diff --git a/src/test/test-gcrypt-util.c b/src/test/test-gcrypt-util.c new file mode 100644 index 000000000..d7d13a130 --- /dev/null +++ b/src/test/test-gcrypt-util.c @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: LGPL-2.1+ + * Copyright 2018 Zbigniew Jędrzejewski-Szmek + */ + +#include "alloc-util.h" +#include "gcrypt-util.h" +#include "macro.h" +#include "string-util.h" + +static void test_string_hashsum(void) { + _cleanup_free_ char *out1 = NULL, *out2 = NULL, *out3 = NULL, *out4 = NULL; + + assert_se(string_hashsum("asdf", 4, GCRY_MD_SHA224, &out1) == 0); + /* echo -n 'asdf' | sha224sum - */ + assert_se(streq(out1, "7872a74bcbf298a1e77d507cd95d4f8d96131cbbd4cdfc571e776c8a")); + + assert_se(string_hashsum("asdf", 4, GCRY_MD_SHA256, &out2) == 0); + /* echo -n 'asdf' | sha256sum - */ + assert_se(streq(out2, "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b")); + + assert_se(string_hashsum("", 0, GCRY_MD_SHA224, &out3) == 0); + /* echo -n '' | sha224sum - */ + assert_se(streq(out3, "d14a028c2a3a2bc9476102bb288234c415a2b01f828ea62ac5b3e42f")); + + assert_se(string_hashsum("", 0, GCRY_MD_SHA256, &out4) == 0); + /* echo -n '' | sha256sum - */ + assert_se(streq(out4, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")); +} + +int main(int argc, char **argv) { + test_string_hashsum(); + + return 0; +} diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c index bd2f8fcfd..a30e04016 100644 --- a/src/test/test-glob-util.c +++ b/src/test/test-glob-util.c @@ -49,12 +49,16 @@ static void test_glob_exists(void) { assert_se(r == 0); } +static void closedir_wrapper(void* v) { + (void) closedir(v); +} + static void test_glob_no_dot(void) { char template[] = "/tmp/test-glob-util.XXXXXXX"; const char *fn; _cleanup_globfree_ glob_t g = { - .gl_closedir = (void (*)(void *)) closedir, + .gl_closedir = closedir_wrapper, .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, .gl_opendir = (void *(*)(const char *)) opendir, .gl_lstat = lstat, diff --git a/src/test/test-hash.c b/src/test/test-hash.c index 036672747..d84a6a885 100644 --- a/src/test/test-hash.c +++ b/src/test/test-hash.c @@ -35,12 +35,15 @@ int main(int argc, char *argv[]) { assert_se(khash_new(&h, NULL) == -EINVAL); assert_se(khash_new(&h, "") == -EINVAL); - r = khash_new(&h, "foobar"); - if (r == -EAFNOSUPPORT) { + + r = khash_supported(); + assert_se(r >= 0); + if (r == 0) { puts("khash not supported on this kernel, skipping"); return EXIT_TEST_SKIP; } - assert_se(r == -EOPNOTSUPP); + + assert_se(khash_new(&h, "foobar") == -EOPNOTSUPP); /* undefined hash function */ assert_se(khash_new(&h, "sha256") >= 0); assert_se(khash_get_size(h) == 32); diff --git a/src/test/test-hashmap.c b/src/test/test-hashmap.c index dd9195425..ad0b7390e 100644 --- a/src/test/test-hashmap.c +++ b/src/test/test-hashmap.c @@ -80,6 +80,91 @@ static void test_string_compare_func(void) { assert_se(string_compare_func("fred", "fred") == 0); } +static void compare_cache(Hashmap *map, IteratedCache *cache) { + const void **keys = NULL, **values = NULL; + unsigned num, idx; + Iterator iter; + void *k, *v; + + assert_se(iterated_cache_get(cache, &keys, &values, &num) == 0); + assert_se(num == 0 || keys); + assert_se(num == 0 || values); + + idx = 0; + HASHMAP_FOREACH_KEY(v, k, map, iter) { + assert_se(v == values[idx]); + assert_se(k == keys[idx]); + + idx++; + } + + assert_se(idx == num); +} + +static void test_iterated_cache(void) { + Hashmap *m; + IteratedCache *c; + + assert_se(m = hashmap_new(NULL)); + assert_se(c = hashmap_iterated_cache_new(m)); + compare_cache(m, c); + + for (int stage = 0; stage < 100; stage++) { + + for (int i = 0; i < 100; i++) { + int foo = stage * 1000 + i; + + assert_se(hashmap_put(m, INT_TO_PTR(foo), INT_TO_PTR(foo + 777)) == 1); + } + + compare_cache(m, c); + + if (!(stage % 10)) { + for (int i = 0; i < 100; i++) { + int foo = stage * 1000 + i; + + assert_se(hashmap_remove(m, INT_TO_PTR(foo)) == INT_TO_PTR(foo + 777)); + } + + compare_cache(m, c); + } + } + + hashmap_clear(m); + compare_cache(m, c); + + assert_se(hashmap_free(m) == NULL); + assert_se(iterated_cache_free(c) == NULL); +} + +static void test_path_hashmap(void) { + _cleanup_(hashmap_freep) Hashmap *h = NULL; + + assert_se(h = hashmap_new(&path_hash_ops)); + + assert_se(hashmap_put(h, "foo", INT_TO_PTR(1)) >= 0); + assert_se(hashmap_put(h, "/foo", INT_TO_PTR(2)) >= 0); + assert_se(hashmap_put(h, "//foo", INT_TO_PTR(3)) == -EEXIST); + assert_se(hashmap_put(h, "//foox/", INT_TO_PTR(4)) >= 0); + assert_se(hashmap_put(h, "/foox////", INT_TO_PTR(5)) == -EEXIST); + assert_se(hashmap_put(h, "foo//////bar/quux//", INT_TO_PTR(6)) >= 0); + assert_se(hashmap_put(h, "foo/bar//quux/", INT_TO_PTR(8)) == -EEXIST); + + assert_se(hashmap_get(h, "foo") == INT_TO_PTR(1)); + assert_se(hashmap_get(h, "foo/") == INT_TO_PTR(1)); + assert_se(hashmap_get(h, "foo////") == INT_TO_PTR(1)); + assert_se(hashmap_get(h, "/foo") == INT_TO_PTR(2)); + assert_se(hashmap_get(h, "//foo") == INT_TO_PTR(2)); + assert_se(hashmap_get(h, "/////foo////") == INT_TO_PTR(2)); + assert_se(hashmap_get(h, "/////foox////") == INT_TO_PTR(4)); + assert_se(hashmap_get(h, "/foox/") == INT_TO_PTR(4)); + assert_se(hashmap_get(h, "/foox") == INT_TO_PTR(4)); + assert_se(!hashmap_get(h, "foox")); + assert_se(hashmap_get(h, "foo/bar/quux") == INT_TO_PTR(6)); + assert_se(hashmap_get(h, "foo////bar////quux/////") == INT_TO_PTR(6)); + assert_se(!hashmap_get(h, "/foo////bar////quux/////")); +} + int main(int argc, const char *argv[]) { test_hashmap_funcs(); test_ordered_hashmap_funcs(); @@ -89,4 +174,8 @@ int main(int argc, const char *argv[]) { test_uint64_compare_func(); test_trivial_compare_func(); test_string_compare_func(); + test_iterated_cache(); + test_path_hashmap(); + + return 0; } diff --git a/src/test/test-id128.c b/src/test/test-id128.c index b7fca1540..dba728376 100644 --- a/src/test/test-id128.c +++ b/src/test/test-id128.c @@ -156,9 +156,9 @@ int main(int argc, char *argv[]) { assert_se(sd_id128_equal(id, id2)); r = sd_id128_get_machine_app_specific(SD_ID128_MAKE(f0,3d,aa,eb,1c,33,4b,43,a7,32,17,29,44,bf,77,2e), &id); - if (r == -EAFNOSUPPORT) { + if (r == -EOPNOTSUPP) log_info("khash not supported on this kernel, skipping sd_id128_get_machine_app_specific() checks"); - } else { + else { assert_se(r >= 0); assert_se(sd_id128_get_machine_app_specific(SD_ID128_MAKE(f0,3d,aa,eb,1c,33,4b,43,a7,32,17,29,44,bf,77,2e), &id2) >= 0); assert_se(sd_id128_equal(id, id2)); diff --git a/src/test/test-libudev.c b/src/test/test-libudev.c index 408d14133..f748fbc87 100644 --- a/src/test/test-libudev.c +++ b/src/test/test-libudev.c @@ -372,7 +372,7 @@ int main(int argc, char *argv[]) { return 1; } - while ((c = getopt_long(argc, argv, "p:s:dhV", options, NULL)) >= 0) + while ((c = getopt_long(argc, argv, "p:s:dhVm", options, NULL)) >= 0) switch (c) { case 'p': diff --git a/src/test/test-log.c b/src/test/test-log.c index fd1989948..4a3c8955e 100644 --- a/src/test/test-log.c +++ b/src/test/test-log.c @@ -35,19 +35,18 @@ assert_cc((LOG_REALM_PLUS_LEVEL(LOG_REALM_SYSTEMD, LOG_LOCAL3 | LOG_DEBUG) & LOG assert_cc((LOG_REALM_PLUS_LEVEL(LOG_REALM_UDEV, LOG_USER | LOG_INFO) & LOG_PRIMASK) == LOG_INFO); -int main(int argc, char* argv[]) { - - log_set_target(LOG_TARGET_CONSOLE); - log_open(); +#define X10(x) x x x x x x x x x x +#define X100(x) X10(X10(x)) +#define X1000(x) X100(X10(x)) +static void test_log_console(void) { log_struct(LOG_INFO, "MESSAGE=Waldo PID="PID_FMT, getpid_cached(), "SERVICE=piepapo", NULL); +} - log_set_target(LOG_TARGET_JOURNAL); - log_open(); - +static void test_log_journal(void) { log_struct(LOG_INFO, "MESSAGE=Foobar PID="PID_FMT, getpid_cached(), "SERVICE=foobar", @@ -59,6 +58,32 @@ int main(int argc, char* argv[]) { (int) 1, 'A', (short) 2, (long int) 3, (long long int) 4, (void*) 1, "foo", (float) 2.5f, (double) 3.5, (long double) 4.5, "SUFFIX=GOT IT", NULL); +} + +static void test_long_lines(void) { + log_object_internal(LOG_NOTICE, + EUCLEAN, + X1000("abcd_") ".txt", + 1000000, + X1000("fff") "unc", + "OBJECT=", + X1000("obj_") "ect", + "EXTRA=", + X1000("ext_") "tra", + "asdfasdf %s asdfasdfa", "foobar"); +} + +int main(int argc, char* argv[]) { + int target; + + for (target = 0; target < _LOG_TARGET_MAX; target++) { + log_set_target(target); + log_open(); + + test_log_console(); + test_log_journal(); + test_long_lines(); + } return 0; } diff --git a/src/test/test-mount-util.c b/src/test/test-mount-util.c index 09a624842..c95baa81a 100644 --- a/src/test/test-mount-util.c +++ b/src/test/test-mount-util.c @@ -261,6 +261,60 @@ static void test_path_is_mount_point(void) { assert_se(rm_rf(tmp_dir, REMOVE_ROOT|REMOVE_PHYSICAL) == 0); } +static void test_mount_option_mangle(void) { + char *opts = NULL; + unsigned long f; + + assert_se(mount_option_mangle(NULL, MS_RDONLY|MS_NOSUID, &f, &opts) == 0); + assert_se(f == (MS_RDONLY|MS_NOSUID)); + assert_se(opts == NULL); + + assert_se(mount_option_mangle("", MS_RDONLY|MS_NOSUID, &f, &opts) == 0); + assert_se(f == (MS_RDONLY|MS_NOSUID)); + assert_se(opts == NULL); + + assert_se(mount_option_mangle("ro,nosuid,nodev,noexec", 0, &f, &opts) == 0); + assert_se(f == (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC)); + assert_se(opts == NULL); + + assert_se(mount_option_mangle("ro,nosuid,nodev,noexec,mode=755", 0, &f, &opts) == 0); + assert_se(f == (MS_RDONLY|MS_NOSUID|MS_NODEV|MS_NOEXEC)); + assert_se(streq(opts, "mode=755")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,nosuid,foo,hogehoge,nodev,mode=755", 0, &f, &opts) == 0); + assert_se(f == (MS_NOSUID|MS_NODEV)); + assert_se(streq(opts, "foo,hogehoge,mode=755")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,nosuid,nodev,noexec,relatime,net_cls,net_prio", MS_RDONLY, &f, &opts) == 0); + assert_se(f == (MS_NOSUID|MS_NODEV|MS_NOEXEC|MS_RELATIME)); + assert_se(streq(opts, "net_cls,net_prio")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,nosuid,nodev,relatime,size=1630748k,mode=700,uid=1000,gid=1000", MS_RDONLY, &f, &opts) == 0); + assert_se(f == (MS_NOSUID|MS_NODEV|MS_RELATIME)); + assert_se(streq(opts, "size=1630748k,mode=700,uid=1000,gid=1000")); + opts = mfree(opts); + + assert_se(mount_option_mangle("size=1630748k,rw,gid=1000,,,nodev,relatime,,mode=700,nosuid,uid=1000", MS_RDONLY, &f, &opts) == 0); + assert_se(f == (MS_NOSUID|MS_NODEV|MS_RELATIME)); + assert_se(streq(opts, "size=1630748k,gid=1000,mode=700,uid=1000")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,exec,size=8143984k,nr_inodes=2035996,mode=755", MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, &f, &opts) == 0); + assert_se(f == (MS_NOSUID|MS_NODEV)); + assert_se(streq(opts, "size=8143984k,nr_inodes=2035996,mode=755")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,relatime,fmask=0022,,,dmask=0022", MS_RDONLY, &f, &opts) == 0); + assert_se(f == MS_RELATIME); + assert_se(streq(opts, "fmask=0022,dmask=0022")); + opts = mfree(opts); + + assert_se(mount_option_mangle("rw,relatime,fmask=0022,dmask=0022,\"hogehoge", MS_RDONLY, &f, &opts) < 0); +} + int main(int argc, char *argv[]) { log_set_max_level(LOG_DEBUG); @@ -275,6 +329,7 @@ int main(int argc, char *argv[]) { test_mnt_id(); test_path_is_mount_point(); + test_mount_option_mangle(); return 0; } diff --git a/src/test/test-ns.c b/src/test/test-ns.c index 87b4facb8..3ab3c1ab9 100644 --- a/src/test/test-ns.c +++ b/src/test/test-ns.c @@ -86,6 +86,7 @@ int main(int argc, char *argv[]) { (char **) inaccessible, NULL, &(BindMount) { .source = (char*) "/usr/bin", .destination = (char*) "/etc/systemd", .read_only = true }, 1, + &(TemporaryFileSystem) { .path = (char*) "/var", .options = (char*) "ro" }, 1, tmp_dir, var_tmp_dir, PROTECT_HOME_NO, diff --git a/src/test/test-parse-util.c b/src/test/test-parse-util.c index 937500213..a99cea5a1 100644 --- a/src/test/test-parse-util.c +++ b/src/test/test-parse-util.c @@ -468,6 +468,44 @@ static void test_safe_atoi16(void) { assert_se(r == -EINVAL); } +static void test_safe_atoux16(void) { + int r; + uint16_t l; + + r = safe_atoux16("1234", &l); + assert_se(r == 0); + assert_se(l == 0x1234); + + r = safe_atoux16("abcd", &l); + assert_se(r == 0); + assert_se(l == 0xabcd); + + r = safe_atoux16(" 1234", &l); + assert_se(r == 0); + assert_se(l == 0x1234); + + r = safe_atoux16("12345", &l); + assert_se(r == -ERANGE); + + r = safe_atoux16("-1", &l); + assert_se(r == -ERANGE); + + r = safe_atoux16(" -1", &l); + assert_se(r == -ERANGE); + + r = safe_atoux16("junk", &l); + assert_se(r == -EINVAL); + + r = safe_atoux16("123x", &l); + assert_se(r == -EINVAL); + + r = safe_atoux16("12.3", &l); + assert_se(r == -EINVAL); + + r = safe_atoux16("", &l); + assert_se(r == -EINVAL); +} + static void test_safe_atou64(void) { int r; uint64_t l; @@ -745,6 +783,7 @@ int main(int argc, char *argv[]) { test_safe_atolli(); test_safe_atou16(); test_safe_atoi16(); + test_safe_atoux16(); test_safe_atou64(); test_safe_atoi64(); test_safe_atod(); diff --git a/src/test/test-path-lookup.c b/src/test/test-path-lookup.c index 834b06198..0541033d7 100644 --- a/src/test/test-path-lookup.c +++ b/src/test/test-path-lookup.c @@ -52,6 +52,36 @@ static void test_paths(UnitFileScope scope) { assert_se(rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL) >= 0); } +static void test_user_and_global_paths(void) { + _cleanup_lookup_paths_free_ LookupPaths lp_global = {}, lp_user = {}; + char **u, **g, **p; + unsigned k = 0; + + assert_se(unsetenv("SYSTEMD_UNIT_PATH") == 0); + + assert_se(lookup_paths_init(&lp_global, UNIT_FILE_GLOBAL, 0, NULL) == 0); + assert_se(lookup_paths_init(&lp_user, UNIT_FILE_USER, 0, NULL) == 0); + g = lp_global.search_path; + u = lp_user.search_path; + + /* Go over all entries in global search path, and verify + * that they also exist in the user search path. Skip any + * entries in user search path which don't exist in the global + * one, but not vice versa. */ + log_info("/* %s */", __func__); + STRV_FOREACH(p, g) { + while (u[k] && !streq(*p, u[k])) { + log_info("+ %s", u[k]); + k++; + } + log_info(" %s", *p); + assert(u[k]); /* If NULL, we didn't find a matching entry */ + k++; + } + STRV_FOREACH(p, u + k) + log_info("+ %s", *p); +} + static void print_generator_binary_paths(UnitFileScope scope) { _cleanup_strv_free_ char **paths; char **dir; @@ -72,6 +102,8 @@ int main(int argc, char **argv) { test_paths(UNIT_FILE_USER); test_paths(UNIT_FILE_GLOBAL); + test_user_and_global_paths(); + print_generator_binary_paths(UNIT_FILE_SYSTEM); print_generator_binary_paths(UNIT_FILE_USER); diff --git a/src/test/test-process-util.c b/src/test/test-process-util.c index 72edcbb7d..0e5a9d811 100644 --- a/src/test/test-process-util.c +++ b/src/test/test-process-util.c @@ -100,7 +100,7 @@ static void test_get_process_comm(pid_t pid) { if (!detect_container()) assert_se(get_ctty_devnr(pid, &h) == -ENXIO || pid != 1); - getenv_for_pid(pid, "PATH", &i); + (void) getenv_for_pid(pid, "PATH", &i); log_info("PID"PID_FMT" $PATH: '%s'", pid, strna(i)); } diff --git a/src/test/test-procfs-util.c b/src/test/test-procfs-util.c index a25318251..10229de4e 100644 --- a/src/test/test-procfs-util.c +++ b/src/test/test-procfs-util.c @@ -3,15 +3,24 @@ #include #include "log.h" +#include "parse-util.h" #include "procfs-util.h" int main(int argc, char *argv[]) { + char buf[CONST_MAX(FORMAT_TIMESPAN_MAX, FORMAT_BYTES_MAX)]; + nsec_t nsec; uint64_t v; int r; log_parse_environment(); log_open(); + assert_se(procfs_cpu_get_usage(&nsec) >= 0); + log_info("Current sytem CPU time: %s", format_timespan(buf, sizeof(buf), nsec/NSEC_PER_USEC, 1)); + + assert_se(procfs_memory_get_current(&v) >= 0); + log_info("Current memory usage: %s", format_bytes(buf, sizeof(buf), v)); + assert_se(procfs_tasks_get_current(&v) >= 0); log_info("Current number of tasks: %" PRIu64, v); diff --git a/src/test/test-socket-util.c b/src/test/test-socket-util.c index d1ab7486e..e35a27fa6 100644 --- a/src/test/test-socket-util.c +++ b/src/test/test-socket-util.c @@ -360,58 +360,6 @@ static void test_in_addr_ifindex_from_string_auto(void) { assert_se(in_addr_ifindex_from_string_auto("fe80::19%thisinterfacecantexist", &family, &ua, &ifindex) == -ENODEV); } -static void *connect_thread(void *arg) { - union sockaddr_union *sa = arg; - _cleanup_close_ int fd = -1; - - fd = socket(AF_INET, SOCK_STREAM | SOCK_CLOEXEC, 0); - assert_se(fd >= 0); - - assert_se(connect(fd, &sa->sa, sizeof(sa->in)) == 0); - - return NULL; -} - -static void test_nameinfo_pretty(void) { - _cleanup_free_ char *stdin_name = NULL, *localhost = NULL; - - union sockaddr_union s = { - .in.sin_family = AF_INET, - .in.sin_port = 0, - .in.sin_addr.s_addr = htobe32(INADDR_ANY), - }; - int r; - - union sockaddr_union c = {}; - socklen_t slen = sizeof(c.in), clen = sizeof(c.in); - - _cleanup_close_ int sfd = -1, cfd = -1; - r = getnameinfo_pretty(STDIN_FILENO, &stdin_name); - log_info_errno(r, "No connection remote: %m"); - - assert_se(r < 0); - - sfd = socket(AF_INET, SOCK_STREAM|SOCK_CLOEXEC, 0); - assert_se(sfd >= 0); - - assert_se(bind(sfd, &s.sa, sizeof(s.in)) == 0); - - /* find out the port number */ - assert_se(getsockname(sfd, &s.sa, &slen) == 0); - - assert_se(listen(sfd, 1) == 0); - - assert_se(asynchronous_job(connect_thread, &s) == 0); - - log_debug("Accepting new connection on fd:%d", sfd); - cfd = accept4(sfd, &c.sa, &clen, SOCK_CLOEXEC); - assert_se(cfd >= 0); - - r = getnameinfo_pretty(cfd, &localhost); - log_info("Connection from %s", localhost); - assert_se(r == 0); -} - static void test_sockaddr_equal(void) { union sockaddr_union a = { .in.sin_family = AF_INET, @@ -561,8 +509,6 @@ int main(int argc, char *argv[]) { test_in_addr_ifindex_to_string(); test_in_addr_ifindex_from_string_auto(); - test_nameinfo_pretty(); - test_sockaddr_equal(); test_sockaddr_un_len(); diff --git a/src/test/test-strv.c b/src/test/test-strv.c index aec00eb81..c6698f439 100644 --- a/src/test/test-strv.c +++ b/src/test/test-strv.c @@ -22,6 +22,7 @@ #include #include "alloc-util.h" +#include "escape.h" #include "specifier.h" #include "string-util.h" #include "strv.h" @@ -102,36 +103,6 @@ static const char* const input_table_one_empty[] = { }; -static const char* const input_table_quotes[] = { - "\"", - "'", - "\"\"", - "\\", - "\\\\", - NULL, -}; -#define QUOTES_STRING \ - "\"\\\"\" " \ - "\"\\\'\" " \ - "\"\\\"\\\"\" " \ - "\"\\\\\" " \ - "\"\\\\\\\\\"" - -static const char * const input_table_spaces[] = { - " ", - "' '", - "\" ", - " \"", - " \\\\ ", - NULL, -}; -#define SPACES_STRING \ - "\" \" " \ - "\"\\' \\'\" " \ - "\"\\\" \" " \ - "\" \\\"\" " \ - "\" \\\\\\\\ \"" - static void test_strv_find(void) { assert_se(strv_find((char **)input_table_multiple, "three")); assert_se(!strv_find((char **)input_table_multiple, "four")); @@ -193,28 +164,6 @@ static void test_strv_join(void) { assert_se(streq(w, "")); } -static void test_strv_quote_unquote(const char* const *split, const char *quoted) { - _cleanup_free_ char *p; - _cleanup_strv_free_ char **s = NULL; - char **t; - int r; - - p = strv_join_quoted((char **)split); - assert_se(p); - printf("-%s- --- -%s-\n", p, quoted); /* fprintf deals with NULL, puts does not */ - assert_se(p); - assert_se(streq(p, quoted)); - - r = strv_split_extract(&s, quoted, WHITESPACE, EXTRACT_QUOTES); - assert_se(r == (int) strv_length(s)); - assert_se(s); - STRV_FOREACH(t, s) { - assert_se(*t); - assert_se(streq(*t, *split)); - split++; - } -} - static void test_strv_unquote(const char *quoted, char **list) { _cleanup_strv_free_ char **s; _cleanup_free_ char *j; @@ -498,6 +447,36 @@ static void test_strv_from_stdarg_alloca(void) { test_strv_from_stdarg_alloca_one(STRV_MAKE_EMPTY, NULL); } +static void test_strv_insert(void) { + _cleanup_strv_free_ char **a = NULL; + + assert_se(strv_insert(&a, 0, strdup("first")) == 0); + assert_se(streq(a[0], "first")); + assert_se(!a[1]); + + assert_se(strv_insert(&a, 0, NULL) == 0); + assert_se(streq(a[0], "first")); + assert_se(!a[1]); + + assert_se(strv_insert(&a, 1, strdup("two")) == 0); + assert_se(streq(a[0], "first")); + assert_se(streq(a[1], "two")); + assert_se(!a[2]); + + assert_se(strv_insert(&a, 4, strdup("tri")) == 0); + assert_se(streq(a[0], "first")); + assert_se(streq(a[1], "two")); + assert_se(streq(a[2], "tri")); + assert_se(!a[3]); + + assert_se(strv_insert(&a, 1, strdup("duo")) == 0); + assert_se(streq(a[0], "first")); + assert_se(streq(a[1], "duo")); + assert_se(streq(a[2], "two")); + assert_se(streq(a[3], "tri")); + assert_se(!a[4]); +} + static void test_strv_push_prepend(void) { _cleanup_strv_free_ char **a = NULL; @@ -697,6 +676,17 @@ static void test_strv_make_nulstr(void) { test_strv_make_nulstr_one(STRV_MAKE("foo", "bar", "quuux")); } +static void test_strv_free_free(void) { + char ***t; + + assert_se(t = new(char**, 3)); + assert_se(t[0] = strv_new("a", "b", NULL)); + assert_se(t[1] = strv_new("c", "d", "e", NULL)); + t[2] = NULL; + + t = strv_free_free(t); +} + static void test_foreach_string(void) { const char * const t[] = { "foo", @@ -738,14 +728,6 @@ int main(int argc, char *argv[]) { test_strv_find_startswith(); test_strv_join(); - test_strv_quote_unquote(input_table_multiple, "\"one\" \"two\" \"three\""); - test_strv_quote_unquote(input_table_one, "\"one\""); - test_strv_quote_unquote(input_table_none, ""); - test_strv_quote_unquote(input_table_one_empty, "\"\""); - test_strv_quote_unquote(input_table_two_empties, "\"\" \"\""); - test_strv_quote_unquote(input_table_quotes, QUOTES_STRING); - test_strv_quote_unquote(input_table_spaces, SPACES_STRING); - test_strv_unquote(" foo=bar \"waldo\" zzz ", STRV_MAKE("foo=bar", "waldo", "zzz")); test_strv_unquote("", STRV_MAKE_EMPTY); test_strv_unquote(" ", STRV_MAKE_EMPTY); @@ -782,6 +764,7 @@ int main(int argc, char *argv[]) { test_strv_extend(); test_strv_extendf(); test_strv_from_stdarg_alloca(); + test_strv_insert(); test_strv_push_prepend(); test_strv_push(); test_strv_equal(); @@ -791,6 +774,7 @@ int main(int argc, char *argv[]) { test_strv_skip(); test_strv_extend_n(); test_strv_make_nulstr(); + test_strv_free_free(); test_foreach_string(); test_strv_fnmatch(); diff --git a/src/test/test-user-util.c b/src/test/test-user-util.c index 17a852074..3a943bf10 100644 --- a/src/test/test-user-util.c +++ b/src/test/test-user-util.c @@ -19,6 +19,7 @@ ***/ #include "alloc-util.h" +#include "log.h" #include "macro.h" #include "string-util.h" #include "user-util.h" @@ -28,14 +29,26 @@ static void test_uid_to_name_one(uid_t uid, const char *name) { _cleanup_free_ char *t = NULL; + log_info("/* %s("UID_FMT", \"%s\") */", __func__, uid, name); + assert_se(t = uid_to_name(uid)); + if (!synthesize_nobody() && streq(name, NOBODY_USER_NAME)) { + log_info("(skipping detailed tests because nobody is not synthesized)"); + return; + } assert_se(streq_ptr(t, name)); } static void test_gid_to_name_one(gid_t gid, const char *name) { _cleanup_free_ char *t = NULL; + log_info("/* %s("GID_FMT", \"%s\") */", __func__, gid, name); + assert_se(t = gid_to_name(gid)); + if (!synthesize_nobody() && streq(name, NOBODY_GROUP_NAME)) { + log_info("(skipping detailed tests because nobody is not synthesized)"); + return; + } assert_se(streq_ptr(t, name)); } @@ -43,6 +56,8 @@ static void test_parse_uid(void) { int r; uid_t uid; + log_info("/* %s */", __func__); + r = parse_uid("100", &uid); assert_se(r == 0); assert_se(uid == 100); @@ -55,6 +70,7 @@ static void test_parse_uid(void) { } static void test_uid_ptr(void) { + log_info("/* %s */", __func__); assert_se(UID_TO_PTR(0) != NULL); assert_se(UID_TO_PTR(1000) != NULL); @@ -64,6 +80,8 @@ static void test_uid_ptr(void) { } static void test_valid_user_group_name(void) { + log_info("/* %s */", __func__); + assert_se(!valid_user_group_name(NULL)); assert_se(!valid_user_group_name("")); assert_se(!valid_user_group_name("1")); @@ -90,6 +108,8 @@ static void test_valid_user_group_name(void) { } static void test_valid_user_group_name_or_id(void) { + log_info("/* %s */", __func__); + assert_se(!valid_user_group_name_or_id(NULL)); assert_se(!valid_user_group_name_or_id("")); assert_se(valid_user_group_name_or_id("0")); @@ -119,6 +139,7 @@ static void test_valid_user_group_name_or_id(void) { } static void test_valid_gecos(void) { + log_info("/* %s */", __func__); assert_se(!valid_gecos(NULL)); assert_se(valid_gecos("")); @@ -129,6 +150,7 @@ static void test_valid_gecos(void) { } static void test_valid_home(void) { + log_info("/* %s */", __func__); assert_se(!valid_home(NULL)); assert_se(!valid_home("")); @@ -146,12 +168,23 @@ static void test_valid_home(void) { } static void test_get_user_creds_one(const char *id, const char *name, uid_t uid, gid_t gid, const char *home, const char *shell) { - const char *rhome; - const char *rshell; - uid_t ruid; - gid_t rgid; + const char *rhome = NULL; + const char *rshell = NULL; + uid_t ruid = UID_INVALID; + gid_t rgid = GID_INVALID; + int r; - assert_se(get_user_creds(&id, &ruid, &rgid, &rhome, &rshell) >= 0); + log_info("/* %s(\"%s\", \"%s\", "UID_FMT", "GID_FMT", \"%s\", \"%s\") */", + __func__, id, name, uid, gid, home, shell); + + r = get_user_creds(&id, &ruid, &rgid, &rhome, &rshell); + log_info_errno(r, "got \"%s\", "UID_FMT", "GID_FMT", \"%s\", \"%s\": %m", + id, ruid, rgid, strnull(rhome), strnull(rshell)); + if (!synthesize_nobody() && streq(name, NOBODY_USER_NAME)) { + log_info("(skipping detailed tests because nobody is not synthesized)"); + return; + } + assert_se(r == 0); assert_se(streq_ptr(id, name)); assert_se(ruid == uid); assert_se(rgid == gid); @@ -160,15 +193,23 @@ static void test_get_user_creds_one(const char *id, const char *name, uid_t uid, } static void test_get_group_creds_one(const char *id, const char *name, gid_t gid) { - gid_t rgid; + gid_t rgid = GID_INVALID; + int r; - assert_se(get_group_creds(&id, &rgid) >= 0); + log_info("/* %s(\"%s\", \"%s\", "GID_FMT") */", __func__, id, name, gid); + + r = get_group_creds(&id, &rgid); + log_info_errno(r, "got \"%s\", "GID_FMT": %m", id, rgid); + if (!synthesize_nobody() && streq(name, NOBODY_GROUP_NAME)) { + log_info("(skipping detailed tests because nobody is not synthesized)"); + return; + } + assert_se(r == 0); assert_se(streq_ptr(id, name)); assert_se(rgid == gid); } int main(int argc, char*argv[]) { - test_uid_to_name_one(0, "root"); test_uid_to_name_one(UID_NOBODY, NOBODY_USER_NAME); test_uid_to_name_one(0xFFFF, "65535"); diff --git a/src/test/test-utf8.c b/src/test/test-utf8.c index 1ea0901f6..c04c99dca 100644 --- a/src/test/test-utf8.c +++ b/src/test/test-utf8.c @@ -106,6 +106,15 @@ static void test_utf16_to_utf8(void) { free(a); } +static void test_utf8_n_codepoints(void) { + assert_se(utf8_n_codepoints("abc") == 3); + assert_se(utf8_n_codepoints("zażółcić gęślą jaźń") == 19); + assert_se(utf8_n_codepoints("串") == 1); + assert_se(utf8_n_codepoints("") == 0); + assert_se(utf8_n_codepoints("…👊🔪💐…") == 5); + assert_se(utf8_n_codepoints("\xF1") == (size_t) -1); +} + int main(int argc, char *argv[]) { test_utf8_is_valid(); test_utf8_is_printable(); @@ -114,6 +123,7 @@ int main(int argc, char *argv[]) { test_utf8_escaping(); test_utf8_escaping_printable(); test_utf16_to_utf8(); + test_utf8_n_codepoints(); return 0; } diff --git a/src/test/test-xattr-util.c b/src/test/test-xattr-util.c index 01c371a39..36b648021 100644 --- a/src/test/test-xattr-util.c +++ b/src/test/test-xattr-util.c @@ -26,6 +26,7 @@ #include "alloc-util.h" #include "fd-util.h" +#include "fileio.h" #include "fs-util.h" #include "macro.h" #include "string-util.h" @@ -35,8 +36,9 @@ static void test_fgetxattrat_fake(void) { char t[] = "/var/tmp/xattrtestXXXXXX"; _cleanup_close_ int fd = -1; const char *x; - char v[3] = {}; + char v[3]; int r; + size_t size; assert_se(mkdtemp(t)); x = strjoina(t, "/test"); @@ -50,21 +52,56 @@ static void test_fgetxattrat_fake(void) { fd = open(t, O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY); assert_se(fd >= 0); - assert_se(fgetxattrat_fake(fd, "test", "user.foo", v, 3, 0) >= 0); + assert_se(fgetxattrat_fake(fd, "test", "user.foo", v, 3, 0, &size) >= 0); + assert_se(size == 3); assert_se(memcmp(v, "bar", 3) == 0); safe_close(fd); fd = open("/", O_RDONLY|O_DIRECTORY|O_CLOEXEC|O_NOCTTY); assert_se(fd >= 0); - assert_se(fgetxattrat_fake(fd, "usr", "user.idontexist", v, 3, 0) == -ENODATA); + assert_se(fgetxattrat_fake(fd, "usr", "user.idontexist", v, 3, 0, &size) == -ENODATA); cleanup: assert_se(unlink(x) >= 0); assert_se(rmdir(t) >= 0); } +static void test_getcrtime(void) { + + _cleanup_close_ int fd = -1; + char ts[FORMAT_TIMESTAMP_MAX]; + const char *vt; + usec_t usec, k; + int r; + + assert_se(tmp_dir(&vt) >= 0); + + fd = open_tmpfile_unlinkable(vt, O_RDWR); + assert_se(fd >= 0); + + r = fd_getcrtime(fd, &usec); + if (r < 0) + log_debug_errno(r, "btime: %m"); + else + log_debug("btime: %s", format_timestamp(ts, sizeof(ts), usec)); + + k = now(CLOCK_REALTIME); + + r = fd_setcrtime(fd, 1519126446UL * USEC_PER_SEC); + if (!IN_SET(r, -EOPNOTSUPP, -ENOTTY)) { + assert_se(fd_getcrtime(fd, &usec) >= 0); + assert_se(k < 1519126446UL * USEC_PER_SEC || + usec == 1519126446UL * USEC_PER_SEC); + } +} + int main(void) { + log_set_max_level(LOG_DEBUG); + log_parse_environment(); + log_open(); + test_fgetxattrat_fake(); + test_getcrtime(); return 0; } diff --git a/src/timedate/meson.build b/src/timedate/meson.build index 80e5cd21b..87482c04e 100644 --- a/src/timedate/meson.build +++ b/src/timedate/meson.build @@ -20,13 +20,6 @@ if conf.get('ENABLE_TIMEDATED') == 1 install_dir : dbuspolicydir) install_data('org.freedesktop.timedate1.service', install_dir : dbussystemservicedir) - - i18n.merge_file( - 'org.freedesktop.timedate1.policy', - input : 'org.freedesktop.timedate1.policy.in', - output : 'org.freedesktop.timedate1.policy', - po_dir : po_dir, - data_dirs : po_dir, - install : install_polkit, - install_dir : polkitpolicydir) + install_data('org.freedesktop.timedate1.policy', + install_dir : polkitpolicydir) endif diff --git a/src/timedate/org.freedesktop.timedate1.policy.in b/src/timedate/org.freedesktop.timedate1.policy similarity index 74% rename from src/timedate/org.freedesktop.timedate1.policy.in rename to src/timedate/org.freedesktop.timedate1.policy index cc2e1652d..d488572ae 100644 --- a/src/timedate/org.freedesktop.timedate1.policy.in +++ b/src/timedate/org.freedesktop.timedate1.policy @@ -19,8 +19,8 @@ http://www.freedesktop.org/wiki/Software/systemd - Set system time - Authentication is required to set the system time. + Set system time + Authentication is required to set the system time. auth_admin_keep auth_admin_keep @@ -30,8 +30,8 @@ - Set system timezone - Authentication is required to set the system timezone. + Set system timezone + Authentication is required to set the system timezone. auth_admin_keep auth_admin_keep @@ -40,8 +40,8 @@ - Set RTC to local timezone or UTC - Authentication is required to control whether + Set RTC to local timezone or UTC + Authentication is required to control whether the RTC stores the local or UTC time. auth_admin_keep @@ -51,8 +51,8 @@ - Turn network time synchronization on or off - Authentication is required to control whether + Turn network time synchronization on or off + Authentication is required to control whether network time synchronization shall be enabled. auth_admin_keep diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c index 19a382c1b..d0a510468 100644 --- a/src/timedate/timedatectl.c +++ b/src/timedate/timedatectl.c @@ -136,7 +136,7 @@ static void print_status_info(const StatusInfo *i) { if (i->rtc_local) printf("\n%s" "Warning: The system is configured to read the RTC time in the local time zone.\n" - " This mode can not be fully supported. It will create various problems\n" + " This mode cannot be fully supported. It will create various problems\n" " with time zone changes and daylight saving time adjustments. The RTC\n" " time is never updated, it relies on external facilities to maintain it.\n" " If at all possible, use RTC in UTC by calling\n" diff --git a/src/timesync/timesyncd.c b/src/timesync/timesyncd.c index bea800171..3d7cfd5be 100644 --- a/src/timesync/timesyncd.c +++ b/src/timesync/timesyncd.c @@ -147,7 +147,7 @@ int main(int argc, char *argv[]) { if (clock_is_localtime(NULL) > 0) { log_info("The system is configured to read the RTC time in the local time zone. " - "This mode can not be fully supported. All system time to RTC updates are disabled."); + "This mode cannot be fully supported. All system time to RTC updates are disabled."); m->rtc_local_time = true; } diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 38cbb739c..f1890f326 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -171,6 +171,7 @@ static bool arg_boot = false; static char **arg_include_prefixes = NULL; static char **arg_exclude_prefixes = NULL; static char *arg_root = NULL; +static char *arg_replace = NULL; #define MAX_DEPTH 256 @@ -382,9 +383,11 @@ static void load_unix_sockets(void) { /* We maintain a cache of the sockets we found in /proc/net/unix to speed things up a little. */ - unix_sockets = set_new(&string_hash_ops); - if (!unix_sockets) + unix_sockets = set_new(&path_hash_ops); + if (!unix_sockets) { + log_oom(); return; + } f = fopen("/proc/net/unix", "re"); if (!f) { @@ -567,12 +570,6 @@ static int dir_cleanup( continue; } - /* Do not delete read-only files owned by root */ - if (s.st_uid == 0 && !(s.st_mode & S_IWUSR)) { - log_debug("Ignoring \"%s/%s\": read-only and owner by root.", p, dent->d_name); - continue; - } - sub_path = strjoin(p, "/", dent->d_name); if (!sub_path) { r = log_oom(); @@ -780,28 +777,90 @@ static bool dangerous_hardlinks(void) { return cached; } -static bool hardlink_vulnerable(struct stat *st) { +static bool hardlink_vulnerable(const struct stat *st) { assert(st); return !S_ISDIR(st->st_mode) && st->st_nlink > 1 && dangerous_hardlinks(); } +static int fd_set_perms(Item *i, int fd, const struct stat *st) { + _cleanup_free_ char *path = NULL; + int r; + + assert(i); + assert(fd); + + r = fd_get_path(fd, &path); + if (r < 0) + return r; + + if (!i->mode_set && !i->uid_set && !i->gid_set) + goto shortcut; + + if (hardlink_vulnerable(st)) { + log_error("Refusing to set permissions on hardlinked file %s while the fs.protected_hardlinks sysctl is turned off.", path); + return -EPERM; + } + + if (i->mode_set) { + if (S_ISLNK(st->st_mode)) + log_debug("Skipping mode fix for symlink %s.", path); + else { + mode_t m = i->mode; + + if (i->mask_perms) { + if (!(st->st_mode & 0111)) + m &= ~0111; + if (!(st->st_mode & 0222)) + m &= ~0222; + if (!(st->st_mode & 0444)) + m &= ~0444; + if (!S_ISDIR(st->st_mode)) + m &= ~07000; /* remove sticky/sgid/suid bit, unless directory */ + } + + if (m == (st->st_mode & 07777)) + log_debug("\"%s\" has correct mode %o already.", path, st->st_mode); + else { + char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + + log_debug("Changing \"%s\" to mode %o.", path, m); + + /* fchmodat() still doesn't have AT_EMPTY_PATH flag. */ + xsprintf(procfs_path, "/proc/self/fd/%i", fd); + + if (chmod(procfs_path, m) < 0) + return log_error_errno(errno, "chmod() of %s via %s failed: %m", path, procfs_path); + } + } + } + + if ((i->uid_set && i->uid != st->st_uid) || + (i->gid_set && i->gid != st->st_gid)) { + log_debug("Changing \"%s\" to owner "UID_FMT":"GID_FMT, + path, + i->uid_set ? i->uid : UID_INVALID, + i->gid_set ? i->gid : GID_INVALID); + + if (fchownat(fd, + "", + i->uid_set ? i->uid : UID_INVALID, + i->gid_set ? i->gid : GID_INVALID, + AT_EMPTY_PATH) < 0) + return log_error_errno(errno, "fchownat() of %s failed: %m", path); + } + +shortcut: + return label_fix(path, false, false); +} + static int path_set_perms(Item *i, const char *path) { - char fn[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; _cleanup_close_ int fd = -1; struct stat st; assert(i); assert(path); - if (!i->mode_set && !i->uid_set && !i->gid_set) - goto shortcut; - - /* We open the file with O_PATH here, to make the operation - * somewhat atomic. Also there's unfortunately no fchmodat() - * with AT_SYMLINK_NOFOLLOW, hence we emulate it here via - * O_PATH. */ - fd = open(path, O_NOFOLLOW|O_CLOEXEC|O_PATH); if (fd < 0) { int level = LOG_ERR, r = -errno; @@ -817,61 +876,10 @@ static int path_set_perms(Item *i, const char *path) { return r; } - if (fstatat(fd, "", &st, AT_EMPTY_PATH) < 0) + if (fstat(fd, &st) < 0) return log_error_errno(errno, "Failed to fstat() file %s: %m", path); - if (hardlink_vulnerable(&st)) { - log_error("Refusing to set permissions on hardlinked file %s while the fs.protected_hardlinks sysctl is turned off.", path); - return -EPERM; - } - - xsprintf(fn, "/proc/self/fd/%i", fd); - - if (i->mode_set) { - if (S_ISLNK(st.st_mode)) - log_debug("Skipping mode fix for symlink %s.", path); - else { - mode_t m = i->mode; - - if (i->mask_perms) { - if (!(st.st_mode & 0111)) - m &= ~0111; - if (!(st.st_mode & 0222)) - m &= ~0222; - if (!(st.st_mode & 0444)) - m &= ~0444; - if (!S_ISDIR(st.st_mode)) - m &= ~07000; /* remove sticky/sgid/suid bit, unless directory */ - } - - if (m == (st.st_mode & 07777)) - log_debug("\"%s\" has correct mode %o already.", path, st.st_mode); - else { - log_debug("Changing \"%s\" to mode %o.", path, m); - - if (chmod(fn, m) < 0) - return log_error_errno(errno, "chmod() of %s via %s failed: %m", path, fn); - } - } - } - - if ((i->uid_set && i->uid != st.st_uid) || - (i->gid_set && i->gid != st.st_gid)) { - log_debug("Changing \"%s\" to owner "UID_FMT":"GID_FMT, - path, - i->uid_set ? i->uid : UID_INVALID, - i->gid_set ? i->gid : GID_INVALID); - - if (chown(fn, - i->uid_set ? i->uid : UID_INVALID, - i->gid_set ? i->gid : GID_INVALID) < 0) - return log_error_errno(errno, "chown() of %s via %s failed: %m", path, fn); - } - - fd = safe_close(fd); - -shortcut: - return label_fix(path, false, false); + return fd_set_perms(i, fd, &st); } static int parse_xattrs_from_arg(Item *i) { @@ -912,21 +920,43 @@ static int parse_xattrs_from_arg(Item *i) { return 0; } -static int path_set_xattrs(Item *i, const char *path) { +static int fd_set_xattrs(Item *i, int fd, const struct stat *st) { + char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + _cleanup_free_ char *path = NULL; char **name, **value; + int r; assert(i); - assert(path); + assert(fd); + + r = fd_get_path(fd, &path); + if (r < 0) + return r; + + xsprintf(procfs_path, "/proc/self/fd/%i", fd); STRV_FOREACH_PAIR(name, value, i->xattrs) { log_debug("Setting extended attribute '%s=%s' on %s.", *name, *value, path); - if (lsetxattr(path, *name, *value, strlen(*value), 0) < 0) + if (setxattr(procfs_path, *name, *value, strlen(*value), 0) < 0) return log_error_errno(errno, "Setting extended attribute %s=%s on %s failed: %m", *name, *value, path); } return 0; } +static int path_set_xattrs(Item *i, const char *path) { + _cleanup_close_ int fd = -1; + + assert(i); + assert(path); + + fd = open(path, O_CLOEXEC|O_NOFOLLOW|O_PATH); + if (fd < 0) + return log_error_errno(errno, "Cannot open '%s': %m", path); + + return fd_set_xattrs(i, fd, NULL); +} + static int parse_acls_from_arg(Item *item) { #if HAVE_ACL int r; @@ -992,10 +1022,53 @@ static int path_set_acl(const char *path, const char *pretty, acl_type_t type, a } #endif -static int path_set_acls(Item *item, const char *path) { +static int fd_set_acls(Item *item, int fd, const struct stat *st) { int r = 0; #if HAVE_ACL - char fn[STRLEN("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + _cleanup_free_ char *path = NULL; + + assert(item); + assert(fd); + assert(st); + + r = fd_get_path(fd, &path); + if (r < 0) + return r; + + if (hardlink_vulnerable(st)) { + log_error("Refusing to set ACLs on hardlinked file %s while the fs.protected_hardlinks sysctl is turned off.", path); + return -EPERM; + } + + if (S_ISLNK(st->st_mode)) { + log_debug("Skipping ACL fix for symlink %s.", path); + return 0; + } + + xsprintf(procfs_path, "/proc/self/fd/%i", fd); + + if (item->acl_access) + r = path_set_acl(procfs_path, path, ACL_TYPE_ACCESS, item->acl_access, item->force); + + if (r == 0 && item->acl_default) + r = path_set_acl(procfs_path, path, ACL_TYPE_DEFAULT, item->acl_default, item->force); + + if (r > 0) + return -r; /* already warned */ + if (r == -EOPNOTSUPP) { + log_debug_errno(r, "ACLs not supported by file system at %s", path); + return 0; + } + if (r < 0) + return log_error_errno(r, "ACL operation on \"%s\" failed: %m", path); +#endif + return r; +} + +static int path_set_acls(Item *item, const char *path) { + int r = 0; +#ifdef HAVE_ACL _cleanup_close_ int fd = -1; struct stat st; @@ -1006,37 +1079,13 @@ static int path_set_acls(Item *item, const char *path) { if (fd < 0) return log_error_errno(errno, "Adjusting ACL of %s failed: %m", path); - if (fstatat(fd, "", &st, AT_EMPTY_PATH) < 0) + if (fstat(fd, &st) < 0) return log_error_errno(errno, "Failed to fstat() file %s: %m", path); - if (hardlink_vulnerable(&st)) { - log_error("Refusing to set ACLs on hardlinked file %s while the fs.protected_hardlinks sysctl is turned off.", path); - return -EPERM; - } - - if (S_ISLNK(st.st_mode)) { - log_debug("Skipping ACL fix for symlink %s.", path); - return 0; - } - - xsprintf(fn, "/proc/self/fd/%i", fd); - - if (item->acl_access) - r = path_set_acl(fn, path, ACL_TYPE_ACCESS, item->acl_access, item->force); - - if (r == 0 && item->acl_default) - r = path_set_acl(fn, path, ACL_TYPE_DEFAULT, item->acl_default, item->force); - - if (r > 0) - return -r; /* already warned */ - else if (r == -EOPNOTSUPP) { - log_debug_errno(r, "ACLs not supported by file system at %s", path); - return 0; - } else if (r < 0) - log_error_errno(r, "ACL operation on \"%s\" failed: %m", path); -#endif - return r; -} + r = fd_set_acls(item, fd, &st); + #endif + return r; + } #define ATTRIBUTES_ALL \ (FS_NOATIME_FL | \ @@ -1137,30 +1186,24 @@ static int parse_attribute_from_arg(Item *item) { return 0; } -static int path_set_attribute(Item *item, const char *path) { - _cleanup_close_ int fd = -1; - struct stat st; +static int fd_set_attribute(Item *item, int fd, const struct stat *st) { + char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + _cleanup_close_ int procfs_fd = -1; + _cleanup_free_ char *path = NULL; unsigned f; int r; if (!item->attribute_set || item->attribute_mask == 0) return 0; - fd = open(path, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOATIME|O_NOFOLLOW); - if (fd < 0) { - if (errno == ELOOP) - return log_error_errno(errno, "Skipping file attributes adjustment on symlink %s.", path); - - return log_error_errno(errno, "Cannot open '%s': %m", path); - } - - if (fstat(fd, &st) < 0) - return log_error_errno(errno, "Cannot stat '%s': %m", path); + r = fd_get_path(fd, &path); + if (r < 0) + return r; /* Issuing the file attribute ioctls on device nodes is not * safe, as that will be delivered to the drivers, not the * file system containing the device node. */ - if (!S_ISREG(st.st_mode) && !S_ISDIR(st.st_mode)) { + if (!S_ISREG(st->st_mode) && !S_ISDIR(st->st_mode)) { log_error("Setting file flags is only supported on regular files and directories, cannot set on '%s'.", path); return -EINVAL; } @@ -1168,10 +1211,16 @@ static int path_set_attribute(Item *item, const char *path) { f = item->attribute_value & item->attribute_mask; /* Mask away directory-specific flags */ - if (!S_ISDIR(st.st_mode)) + if (!S_ISDIR(st->st_mode)) f &= ~FS_DIRSYNC_FL; - r = chattr_fd(fd, f, item->attribute_mask); + xsprintf(procfs_path, "/proc/self/fd/%i", fd); + + procfs_fd = open(procfs_path, O_RDONLY|O_CLOEXEC|O_NOATIME); + if (procfs_fd < 0) + return -errno; + + r = chattr_fd(procfs_fd, f, item->attribute_mask); if (r < 0) log_full_errno(IN_SET(r, -ENOTTY, -EOPNOTSUPP) ? LOG_DEBUG : LOG_WARNING, r, @@ -1181,6 +1230,23 @@ static int path_set_attribute(Item *item, const char *path) { return 0; } +static int path_set_attribute(Item *item, const char *path) { + _cleanup_close_ int fd = -1; + struct stat st; + + if (!item->attribute_set || item->attribute_mask == 0) + return 0; + + fd = open(path, O_CLOEXEC|O_NOFOLLOW|O_PATH); + if (fd < 0) + return log_error_errno(errno, "Cannot open '%s': %m", path); + + if (fstat(fd, &st) < 0) + return log_error_errno(errno, "Cannot stat '%s': %m", path); + + return fd_set_attribute(item, fd, &st); +} + static int write_one_file(Item *i, const char *path) { _cleanup_close_ int fd = -1; int flags, r = 0; @@ -1245,48 +1311,58 @@ done: } typedef int (*action_t)(Item *, const char *); +typedef int (*fdaction_t)(Item *, int fd, const struct stat *st); -static int item_do_children(Item *i, const char *path, action_t action) { - _cleanup_closedir_ DIR *d; - struct dirent *de; - int r = 0; +static int item_do(Item *i, int fd, const struct stat *st, fdaction_t action) { + int r = 0, q; assert(i); - assert(path); + assert(fd >= 0); + assert(st); /* This returns the first error we run into, but nevertheless * tries to go on */ + r = action(i, fd, st); - d = opendir_nomod(path); - if (!d) - return IN_SET(errno, ENOENT, ENOTDIR, ELOOP) ? 0 : -errno; + if (S_ISDIR(st->st_mode)) { + char procfs_path[strlen("/proc/self/fd/") + DECIMAL_STR_MAX(int)]; + _cleanup_closedir_ DIR *d = NULL; + struct dirent *de; - FOREACH_DIRENT_ALL(de, d, r = -errno) { - _cleanup_free_ char *p = NULL; - int q; + /* The passed 'fd' was opened with O_PATH. We need to convert + * it into a 'regular' fd before reading the directory content. */ + xsprintf(procfs_path, "/proc/self/fd/%i", fd); - if (dot_or_dot_dot(de->d_name)) - continue; + d = opendir(procfs_path); + if (!d) { + r = r ?: -errno; + goto finish; + } - p = strjoin(path, "/", de->d_name); - if (!p) - return -ENOMEM; + FOREACH_DIRENT_ALL(de, d, q = -errno; goto finish) { + struct stat de_st; + int de_fd; - q = action(i, p); - if (q < 0 && q != -ENOENT && r == 0) - r = q; + if (dot_or_dot_dot(de->d_name)) + continue; + + de_fd = openat(fd, de->d_name, O_NOFOLLOW|O_CLOEXEC|O_PATH); + if (de_fd >= 0 && fstat(de_fd, &de_st) >= 0) + /* pass ownership of dirent fd over */ + q = item_do(i, de_fd, &de_st, action); + else + q = -errno; - if (IN_SET(de->d_type, DT_UNKNOWN, DT_DIR)) { - q = item_do_children(i, p, action); if (q < 0 && r == 0) r = q; } } - +finish: + safe_close(fd); return r; } -static int glob_item(Item *i, action_t action, bool recursive) { +static int glob_item(Item *i, action_t action) { _cleanup_globfree_ glob_t g = { .gl_opendir = (void *(*)(const char *)) opendir_nomod, }; @@ -1301,12 +1377,48 @@ static int glob_item(Item *i, action_t action, bool recursive) { k = action(i, *fn); if (k < 0 && r == 0) r = k; + } - if (recursive) { - k = item_do_children(i, *fn, action); - if (k < 0 && r == 0) - r = k; + return r; +} + +static int glob_item_recursively(Item *i, fdaction_t action) { + _cleanup_globfree_ glob_t g = { + .gl_opendir = (void *(*)(const char *)) opendir_nomod, + }; + int r = 0, k; + char **fn; + + k = safe_glob(i->path, GLOB_NOSORT|GLOB_BRACE, &g); + if (k < 0 && k != -ENOENT) + return log_error_errno(k, "glob(%s) failed: %m", i->path); + + STRV_FOREACH(fn, g.gl_pathv) { + _cleanup_close_ int fd = -1; + struct stat st; + + /* Make sure we won't trigger/follow file object (such as + * device nodes, automounts, ...) pointed out by 'fn' with + * O_PATH. Note, when O_PATH is used, flags other than + * O_CLOEXEC, O_DIRECTORY, and O_NOFOLLOW are ignored. */ + + fd = open(*fn, O_CLOEXEC|O_NOFOLLOW|O_PATH); + if (fd < 0) { + r = r ?: -errno; + continue; } + + if (fstat(fd, &st) < 0) { + r = r ?: -errno; + continue; + } + + k = item_do(i, fd, &st, action); + if (k < 0 && r == 0) + r = k; + + /* we passed fd ownership to the previous call */ + fd = -1; } return r; @@ -1395,7 +1507,7 @@ static int create_item(Item *i) { break; case WRITE_FILE: - r = glob_item(i, write_one_file, false); + r = glob_item(i, write_one_file); if (r < 0) return r; @@ -1654,49 +1766,49 @@ static int create_item(Item *i) { case ADJUST_MODE: case RELABEL_PATH: - r = glob_item(i, path_set_perms, false); + r = glob_item(i, path_set_perms); if (r < 0) return r; break; case RECURSIVE_RELABEL_PATH: - r = glob_item(i, path_set_perms, true); + r = glob_item_recursively(i, fd_set_perms); if (r < 0) return r; break; case SET_XATTR: - r = glob_item(i, path_set_xattrs, false); + r = glob_item(i, path_set_xattrs); if (r < 0) return r; break; case RECURSIVE_SET_XATTR: - r = glob_item(i, path_set_xattrs, true); + r = glob_item_recursively(i, fd_set_xattrs); if (r < 0) return r; break; case SET_ACL: - r = glob_item(i, path_set_acls, false); + r = glob_item(i, path_set_acls); if (r < 0) return r; break; case RECURSIVE_SET_ACL: - r = glob_item(i, path_set_acls, true); + r = glob_item_recursively(i, fd_set_acls); if (r < 0) return r; break; case SET_ATTRIBUTE: - r = glob_item(i, path_set_attribute, false); + r = glob_item(i, path_set_attribute); if (r < 0) return r; break; case RECURSIVE_SET_ATTRIBUTE: - r = glob_item(i, path_set_attribute, true); + r = glob_item_recursively(i, fd_set_attribute); if (r < 0) return r; break; @@ -1746,7 +1858,7 @@ static int remove_item(Item *i) { case REMOVE_PATH: case TRUNCATE_DIRECTORY: case RECURSIVE_REMOVE_PATH: - return glob_item(i, remove_item_instance, false); + return glob_item(i, remove_item_instance); default: return 0; @@ -1820,7 +1932,7 @@ static int clean_item(Item *i) { return 0; case EMPTY_DIRECTORY: case IGNORE_DIRECTORY_PATH: - return glob_item(i, clean_item_instance, false); + return glob_item(i, clean_item_instance); default: return 0; } @@ -2364,6 +2476,7 @@ static void help(void) { " --prefix=PATH Only apply rules with the specified prefix\n" " --exclude-prefix=PATH Ignore rules with the specified prefix\n" " --root=PATH Operate on an alternate filesystem root\n" + " --replace=PATH Treat arguments as replacement for PATH\n" , program_invocation_short_name); } @@ -2379,6 +2492,7 @@ static int parse_argv(int argc, char *argv[]) { ARG_PREFIX, ARG_EXCLUDE_PREFIX, ARG_ROOT, + ARG_REPLACE, }; static const struct option options[] = { @@ -2392,6 +2506,7 @@ static int parse_argv(int argc, char *argv[]) { { "prefix", required_argument, NULL, ARG_PREFIX }, { "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX }, { "root", required_argument, NULL, ARG_ROOT }, + { "replace", required_argument, NULL, ARG_REPLACE }, {} }; @@ -2447,6 +2562,16 @@ static int parse_argv(int argc, char *argv[]) { return r; break; + case ARG_REPLACE: + if (!path_is_absolute(optarg) || + !endswith(optarg, ".conf")) { + log_error("The argument to --replace= must an absolute path to a config file"); + return -EINVAL; + } + + arg_replace = optarg; + break; + case '?': return -EINVAL; @@ -2459,10 +2584,15 @@ static int parse_argv(int argc, char *argv[]) { return -EINVAL; } + if (arg_replace && optind >= argc) { + log_error("When --replace= is given, some configuration items must be specified"); + return -EINVAL; + } + return 1; } -static int read_config_file(const char **config_dirs, const char *fn, bool ignore_enoent, bool *invalid_config) { +static int read_config_file(char **config_dirs, const char *fn, bool ignore_enoent, bool *invalid_config) { _cleanup_fclose_ FILE *_f = NULL; FILE *f; char line[LINE_MAX]; @@ -2474,11 +2604,11 @@ static int read_config_file(const char **config_dirs, const char *fn, bool ignor assert(fn); if (streq(fn, "-")) { - log_debug("Reading config from stdin."); + log_debug("Reading config from stdin…"); fn = ""; f = stdin; } else { - r = search_and_fopen(fn, "re", arg_root, config_dirs, &_f); + r = search_and_fopen(fn, "re", arg_root, (const char**) config_dirs, &_f); if (r < 0) { if (ignore_enoent && r == -ENOENT) { log_debug_errno(r, "Failed to open \"%s\", ignoring: %m", fn); @@ -2487,7 +2617,7 @@ static int read_config_file(const char **config_dirs, const char *fn, bool ignor return log_error_errno(r, "Failed to open '%s': %m", fn); } - log_debug("Reading config file \"%s\".", fn); + log_debug("Reading config file \"%s\"…", fn); f = _f; } @@ -2550,13 +2680,60 @@ static int read_config_file(const char **config_dirs, const char *fn, bool ignor return r; } +static int parse_arguments(char **config_dirs, char **args, bool *invalid_config) { + char **arg; + int r; + + STRV_FOREACH(arg, args) { + r = read_config_file(config_dirs, *arg, false, invalid_config); + if (r < 0) + return r; + } + + return 0; +} + +static int read_config_files(char **config_dirs, char **args, bool *invalid_config) { + _cleanup_strv_free_ char **files = NULL; + _cleanup_free_ char *p = NULL; + char **f; + int r; + + r = conf_files_list_strv(&files, ".conf", arg_root, 0, (const char* const*) config_dirs); + if (r < 0) + return log_error_errno(r, "Failed to enumerate tmpfiles.d files: %m"); + + if (arg_replace) { + r = conf_files_insert(&files, arg_root, config_dirs, arg_replace); + if (r < 0) + return log_error_errno(r, "Failed to extend tmpfiles.d file list: %m"); + + p = path_join(arg_root, arg_replace, NULL); + if (!p) + return log_oom(); + } + + STRV_FOREACH(f, files) + if (p && path_equal(*f, p)) { + log_debug("Parsing arguments at position \"%s\"…", *f); + + r = parse_arguments(config_dirs, args, invalid_config); + if (r < 0) + return r; + } else + /* Just warn, ignore result otherwise. + * read_config_file() has some debug output, so no need to print anything. */ + (void) read_config_file(config_dirs, *f, true, invalid_config); + + return 0; +} + int main(int argc, char *argv[]) { int r, k; ItemArray *a; Iterator iterator; _cleanup_strv_free_ char **config_dirs = NULL; bool invalid_config = false; - char **f; r = parse_argv(argc, argv); if (r <= 0) @@ -2602,30 +2779,20 @@ int main(int argc, char *argv[]) { log_debug("Looking for configuration files in (higher priority first:\n\t%s", t); } - if (optind < argc) { - int j; + /* If command line arguments are specified along with --replace, read all + * configuration files and insert the positional arguments at the specified + * place. Otherwise, if command line arguments are specified, execute just + * them, and finally, without --replace= or any positional arguments, just + * read configuration and execute it. + */ + if (arg_replace || optind >= argc) + r = read_config_files(config_dirs, argv + optind, &invalid_config); + else + r = parse_arguments(config_dirs, argv + optind, &invalid_config); + if (r < 0) + goto finish; - for (j = optind; j < argc; j++) { - k = read_config_file((const char**) config_dirs, argv[j], false, &invalid_config); - if (k < 0 && r == 0) - r = k; - } - } else { - _cleanup_strv_free_ char **files = NULL; - - r = conf_files_list_strv(&files, ".conf", arg_root, 0, (const char* const*) config_dirs); - if (r < 0) { - log_error_errno(r, "Failed to enumerate tmpfiles.d files: %m"); - goto finish; - } - - STRV_FOREACH(f, files) { - k = read_config_file((const char**) config_dirs, *f, true, &invalid_config); - if (k < 0 && r == 0) - r = k; - } - } /* The non-globbing ones usually create things, hence we apply * them first */ diff --git a/src/tty-ask-password-agent/tty-ask-password-agent.c b/src/tty-ask-password-agent/tty-ask-password-agent.c index 9dfb0d80d..74a10bb17 100644 --- a/src/tty-ask-password-agent/tty-ask-password-agent.c +++ b/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -254,6 +254,7 @@ static int send_passwords(const char *socket_name, char **passwords) { union sockaddr_union sa = { .un.sun_family = AF_UNIX }; size_t packet_length = 1; char **p, *d; + ssize_t n; int r; assert(socket_name); @@ -279,9 +280,13 @@ static int send_passwords(const char *socket_name, char **passwords) { strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path)); - r = sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa, SOCKADDR_UN_LEN(sa.un)); - if (r < 0) + n = sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa, SOCKADDR_UN_LEN(sa.un)); + if (n < 0) { r = log_debug_errno(errno, "sendto(): %m"); + goto finish; + } + + r = (int) n; finish: explicit_bzero(packet, packet_length); @@ -363,18 +368,21 @@ static int parse_password(const char *filename, char **wall) { int tty_fd = -1; if (arg_console) { - const char *con = arg_device ? arg_device : "/dev/console"; + const char *con = arg_device ?: "/dev/console"; - tty_fd = acquire_terminal(con, false, false, false, USEC_INFINITY); + tty_fd = acquire_terminal(con, ACQUIRE_TERMINAL_WAIT, USEC_INFINITY); if (tty_fd < 0) - return log_error_errno(tty_fd, "Failed to acquire /dev/console: %m"); + return log_error_errno(tty_fd, "Failed to acquire %s: %m", con); r = reset_terminal_fd(tty_fd, true); if (r < 0) log_warning_errno(r, "Failed to reset terminal, ignoring: %m"); } - r = ask_password_tty(message, NULL, not_after, echo ? ASK_PASSWORD_ECHO : 0, filename, &password); + r = ask_password_tty(tty_fd, message, NULL, not_after, + (echo ? ASK_PASSWORD_ECHO : 0) | + (arg_console ? ASK_PASSWORD_CONSOLE_COLOR : 0), + filename, &password); if (arg_console) { tty_fd = safe_close(tty_fd); @@ -460,7 +468,7 @@ static bool wall_tty_match(const char *path, void *userdata) { fd = open(p, O_WRONLY|O_CLOEXEC|O_NONBLOCK|O_NOCTTY); if (fd < 0) { - log_debug_errno(errno, "Failed top open the wall pipe: %m"); + log_debug_errno(errno, "Failed to open the wall pipe: %m"); return 1; } diff --git a/src/udev/cdrom_id/cdrom_id.c b/src/udev/cdrom_id/cdrom_id.c index 9644861ad..5e7bebeb1 100644 --- a/src/udev/cdrom_id/cdrom_id.c +++ b/src/udev/cdrom_id/cdrom_id.c @@ -566,7 +566,7 @@ static int cd_profiles(struct udev *udev, int fd) log_debug("GET CONFIGURATION: size of features buffer 0x%04x", len); if (len > sizeof(features)) { - log_debug("can not get features in a single query, truncating"); + log_debug("cannot get features in a single query, truncating"); len = sizeof(features); } else if (len <= 8) len = sizeof(features); @@ -588,7 +588,7 @@ static int cd_profiles(struct udev *udev, int fd) log_debug("GET CONFIGURATION: size of features buffer 0x%04x", len); if (len > sizeof(features)) { - log_debug("can not get features in a single query, truncating"); + log_debug("cannot get features in a single query, truncating"); len = sizeof(features); } diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c index 3e278bd63..2821640e9 100644 --- a/src/udev/collect/collect.c +++ b/src/udev/collect/collect.c @@ -94,7 +94,7 @@ static int prepare(char *dir, char *filename) if (r < 0 && errno != EEXIST) return -errno; - xsprintf(buf, "%s/%s", dir, filename); + snprintf(buf, sizeof buf, "%s/%s", dir, filename); fd = open(buf, O_RDWR|O_CREAT|O_CLOEXEC, S_IRUSR|S_IWUSR); if (fd < 0) diff --git a/src/udev/udev-builtin-blkid.c b/src/udev/udev-builtin-blkid.c index 6ff244e96..eeed803f5 100644 --- a/src/udev/udev-builtin-blkid.c +++ b/src/udev/udev-builtin-blkid.c @@ -35,6 +35,7 @@ #include "efivars.h" #include "fd-util.h" #include "gpt.h" +#include "parse-util.h" #include "string-util.h" #include "udev.h" @@ -236,7 +237,7 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t bool is_gpt = false; static const struct option options[] = { - { "offset", optional_argument, NULL, 'o' }, + { "offset", required_argument, NULL, 'o' }, { "noraid", no_argument, NULL, 'R' }, {} }; @@ -244,13 +245,19 @@ static int builtin_blkid(struct udev_device *dev, int argc, char *argv[], bool t for (;;) { int option; - option = getopt_long(argc, argv, "oR", options, NULL); + option = getopt_long(argc, argv, "o:R", options, NULL); if (option == -1) break; switch (option) { case 'o': - offset = strtoull(optarg, NULL, 0); + err = safe_atoi64(optarg, &offset); + if (err < 0) + goto out; + if (offset < 0) { + err = -ERANGE; + goto out; + } break; case 'R': noraid = true; diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c index ca7f7c230..dbfe02429 100644 --- a/src/udev/udev-builtin-hwdb.c +++ b/src/udev/udev-builtin-hwdb.c @@ -27,6 +27,7 @@ #include "alloc-util.h" #include "hwdb-util.h" +#include "parse-util.h" #include "string-util.h" #include "udev-util.h" #include "udev.h" @@ -63,7 +64,7 @@ int udev_builtin_hwdb_lookup(struct udev_device *dev, static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) { const char *v, *p; - int vn, pn; + uint16_t vn, pn; v = udev_device_get_sysattr_value(dev, "idVendor"); if (!v) @@ -71,12 +72,10 @@ static const char *modalias_usb(struct udev_device *dev, char *s, size_t size) { p = udev_device_get_sysattr_value(dev, "idProduct"); if (!p) return NULL; - vn = strtol(v, NULL, 16); - if (vn <= 0) - return NULL; - pn = strtol(p, NULL, 16); - if (pn <= 0) - return NULL; + if (safe_atoux16(v, &vn) < 0) + return NULL; + if (safe_atoux16(p, &pn) < 0) + return NULL; snprintf(s, size, "usb:v%04Xp%04X*", vn, pn); return s; } diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c index fa830213f..02b86cce2 100644 --- a/src/udev/udev-builtin-input_id.c +++ b/src/udev/udev-builtin-input_id.c @@ -233,7 +233,8 @@ static bool test_pointers(struct udev_device *dev, is_touchscreen = true; } - if (has_mouse_button && + if (!is_tablet && !is_touchpad && !is_joystick && + has_mouse_button && (has_rel_coordinates || !has_abs_coordinates)) /* mouse buttons and no axis */ is_mouse = true; diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index 945585d82..36994360c 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -115,6 +115,7 @@ #include "stdio-util.h" #include "string-util.h" #include "udev.h" +#include "udev-util.h" #define ONBOARD_INDEX_MAX (16*1024-1) @@ -236,11 +237,11 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { size_t l; char *s; const char *attr, *port_name; - struct udev_device *pci = NULL; + _cleanup_udev_device_unref_ struct udev_device *pci = NULL; char slots[PATH_MAX]; _cleanup_closedir_ DIR *dir = NULL; struct dirent *dent; - int hotplug_slot = 0, err = 0; + int hotplug_slot = 0; if (sscanf(udev_device_get_sysname(names->pcidev), "%x:%x:%x.%u", &domain, &bus, &slot, &func) != 4) return -ENOENT; @@ -270,21 +271,20 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { /* ACPI _SUN — slot user number */ pci = udev_device_new_from_subsystem_sysname(udev, "subsystem", "pci"); - if (!pci) { - err = -ENOENT; - goto out; - } + if (!pci) + return -ENOENT; + + if (!snprintf_ok(slots, sizeof slots, "%s/slots", udev_device_get_syspath(pci))) + return -ENAMETOOLONG; - xsprintf(slots, "%s/slots", udev_device_get_syspath(pci)); dir = opendir(slots); - if (!dir) { - err = -errno; - goto out; - } + if (!dir) + return -errno; FOREACH_DIRENT_ALL(dent, dir, break) { int i; - char *rest, *address, str[PATH_MAX]; + char *rest, str[PATH_MAX]; + _cleanup_free_ char *address = NULL; if (dent->d_name[0] == '.') continue; @@ -294,13 +294,11 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { if (i < 1) continue; - xsprintf(str, "%s/%s/address", slots, dent->d_name); - if (read_one_line_file(str, &address) >= 0) { + if (snprintf_ok(str, sizeof str, "%s/%s/address", slots, dent->d_name) && + read_one_line_file(str, &address) >= 0) /* match slot address with device by stripping the function */ - if (strneq(address, udev_device_get_sysname(names->pcidev), strlen(address))) + if (streq(address, udev_device_get_sysname(names->pcidev))) hotplug_slot = i; - free(address); - } if (hotplug_slot > 0) break; @@ -321,9 +319,8 @@ static int dev_pci_slot(struct udev_device *dev, struct netnames *names) { if (l == 0) names->pci_slot[0] = '\0'; } -out: - udev_device_unref(pci); - return err; + + return 0; } static int names_vio(struct udev_device *dev, struct netnames *names) { @@ -517,7 +514,6 @@ static int names_ccw(struct udev_device *dev, struct netnames *names) { const char *bus_id, *subsys; size_t bus_id_len; size_t bus_id_start; - int rc; assert(dev); assert(names); @@ -559,9 +555,9 @@ static int names_ccw(struct udev_device *dev, struct netnames *names) { bus_id += bus_id_start < bus_id_len ? bus_id_start : bus_id_len - 1; /* Store the CCW bus-ID for use as network device name */ - rc = snprintf(names->ccw_busid, sizeof(names->ccw_busid), "c%s", bus_id); - if (rc >= 0 && rc < (int)sizeof(names->ccw_busid)) + if (snprintf_ok(names->ccw_busid, sizeof(names->ccw_busid), "c%s", bus_id)) names->type = NET_CCW; + return 0; } @@ -674,7 +670,7 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (err >= 0 && names.type == NET_CCW) { char str[IFNAMSIZ]; - if (snprintf(str, sizeof(str), "%s%s", prefix, names.ccw_busid) < (int)sizeof(str)) + if (snprintf_ok(str, sizeof str, "%s%s", prefix, names.ccw_busid)) udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); goto out; } @@ -684,7 +680,7 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (err >= 0 && names.type == NET_VIO) { char str[IFNAMSIZ]; - if (snprintf(str, sizeof(str), "%s%s", prefix, names.vio_slot) < (int)sizeof(str)) + if (snprintf_ok(str, sizeof str, "%s%s", prefix, names.vio_slot)) udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); goto out; } @@ -694,7 +690,7 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (err >= 0 && names.type == NET_PLATFORM) { char str[IFNAMSIZ]; - if (snprintf(str, sizeof(str), "%s%s", prefix, names.platform_path) < (int)sizeof(str)) + if (snprintf_ok(str, sizeof str, "%s%s", prefix, names.platform_path)) udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); goto out; } @@ -708,21 +704,21 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (names.type == NET_PCI) { char str[IFNAMSIZ]; - if (names.pci_onboard[0]) - if (snprintf(str, sizeof(str), "%s%s", prefix, names.pci_onboard) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_ONBOARD", str); + if (names.pci_onboard[0] && + snprintf_ok(str, sizeof str, "%s%s", prefix, names.pci_onboard)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_ONBOARD", str); - if (names.pci_onboard_label) - if (snprintf(str, sizeof(str), "%s%s", prefix, names.pci_onboard_label) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_LABEL_ONBOARD", str); + if (names.pci_onboard_label && + snprintf_ok(str, sizeof str, "%s%s", prefix, names.pci_onboard_label)) + udev_builtin_add_property(dev, test, "ID_NET_LABEL_ONBOARD", str); - if (names.pci_path[0]) - if (snprintf(str, sizeof(str), "%s%s", prefix, names.pci_path) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); + if (names.pci_path[0] && + snprintf_ok(str, sizeof str, "%s%s", prefix, names.pci_path)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); - if (names.pci_slot[0]) - if (snprintf(str, sizeof(str), "%s%s", prefix, names.pci_slot) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); + if (names.pci_slot[0] && + snprintf_ok(str, sizeof str, "%s%s", prefix, names.pci_slot)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); goto out; } @@ -731,13 +727,13 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (err >= 0 && names.type == NET_USB) { char str[IFNAMSIZ]; - if (names.pci_path[0]) - if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.usb_ports) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); + if (names.pci_path[0] && + snprintf_ok(str, sizeof str, "%s%s%s", prefix, names.pci_path, names.usb_ports)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); - if (names.pci_slot[0]) - if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.usb_ports) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); + if (names.pci_slot[0] && + snprintf_ok(str, sizeof str, "%s%s%s", prefix, names.pci_slot, names.usb_ports)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); goto out; } @@ -746,13 +742,13 @@ static int builtin_net_id(struct udev_device *dev, int argc, char *argv[], bool if (err >= 0 && names.type == NET_BCMA) { char str[IFNAMSIZ]; - if (names.pci_path[0]) - if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_path, names.bcma_core) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); + if (names.pci_path[0] && + snprintf_ok(str, sizeof str, "%s%s%s", prefix, names.pci_path, names.bcma_core)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_PATH", str); - if (names.pci_slot[0]) - if (snprintf(str, sizeof(str), "%s%s%s", prefix, names.pci_slot, names.bcma_core) < (int)sizeof(str)) - udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); + if (names.pci_slot[0] && + snprintf(str, sizeof str, "%s%s%s", prefix, names.pci_slot, names.bcma_core)) + udev_builtin_add_property(dev, test, "ID_NET_NAME_SLOT", str); goto out; } out: diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index bb845889c..6a3ee93ca 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -265,7 +265,7 @@ static int node_permissions_apply(struct udev_device *dev, bool apply, mode |= S_IFCHR; if (lstat(devnode, &stats) != 0) { - err = log_debug_errno(errno, "can not stat() node '%s' (%m)", devnode); + err = log_debug_errno(errno, "cannot stat() node '%s' (%m)", devnode); goto out; } diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index f4708bb06..635811c59 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -465,7 +465,7 @@ static int add_token(struct udev_rules *rules, struct token *token) { if (add < 8) add = 8; - tokens = realloc(rules->tokens, (rules->token_max + add ) * sizeof(struct token)); + tokens = reallocarray(rules->tokens, rules->token_max + add, sizeof(struct token)); if (tokens == NULL) return -1; rules->tokens = tokens; @@ -511,7 +511,7 @@ static uid_t add_uid(struct udev_rules *rules, const char *owner) { if (add < 1) add = 8; - uids = realloc(rules->uids, (rules->uids_max + add ) * sizeof(struct uid_gid)); + uids = reallocarray(rules->uids, rules->uids_max + add, sizeof(struct uid_gid)); if (uids == NULL) return uid; rules->uids = uids; @@ -554,7 +554,7 @@ static gid_t add_gid(struct udev_rules *rules, const char *group) { if (add < 1) add = 8; - gids = realloc(rules->gids, (rules->gids_max + add ) * sizeof(struct uid_gid)); + gids = reallocarray(rules->gids, rules->gids_max + add, sizeof(struct uid_gid)); if (gids == NULL) return gid; rules->gids = gids; @@ -1544,7 +1544,7 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names) { udev_list_init(udev, &file_list, true); /* init token array and string buffer */ - rules->tokens = malloc(PREALLOC_TOKEN * sizeof(struct token)); + rules->tokens = malloc_multiply(PREALLOC_TOKEN, sizeof(struct token)); if (rules->tokens == NULL) return udev_rules_unref(rules); rules->token_max = PREALLOC_TOKEN; diff --git a/src/udev/udev-watch.c b/src/udev/udev-watch.c index 351cb6345..61179ce03 100644 --- a/src/udev/udev-watch.c +++ b/src/udev/udev-watch.c @@ -79,7 +79,7 @@ void udev_watch_restore(struct udev *udev) { udev_watch_begin(udev, dev); udev_device_unref(dev); unlink: - unlinkat(dirfd(dir), ent->d_name, 0); + (void) unlinkat(dirfd(dir), ent->d_name, 0); } closedir(dir); diff --git a/src/udev/udev.conf b/src/udev/udev.conf index 47d143300..0d812d4a6 100644 --- a/src/udev/udev.conf +++ b/src/udev/udev.conf @@ -1,3 +1,6 @@ # see udev.conf(5) for details +# +# udevd is also started in the initrd. When this file is modified you might +# also want to rebuild the initrd, so that it will include the modified configuration. #udev_log="info" diff --git a/src/udev/udevadm-hwdb.c b/src/udev/udevadm-hwdb.c index ab5dc7ab6..dc3ae7484 100644 --- a/src/udev/udevadm-hwdb.c +++ b/src/udev/udevadm-hwdb.c @@ -94,7 +94,7 @@ static int node_add_child(struct trie *trie, struct trie_node *node, struct trie struct trie_child_entry *child; /* extend array, add new entry, sort for bisection */ - child = realloc(node->children, (node->children_count + 1) * sizeof(struct trie_child_entry)); + child = reallocarray(node->children, node->children_count + 1, sizeof(struct trie_child_entry)); if (!child) return -ENOMEM; @@ -166,7 +166,7 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, } /* extend array, add new entry, sort for bisection */ - val = realloc(node->values, (node->values_count + 1) * sizeof(struct trie_value_entry)); + val = reallocarray(node->values, node->values_count + 1, sizeof(struct trie_value_entry)); if (!val) return -ENOMEM; trie->values_count++; diff --git a/src/udev/udevadm-trigger.c b/src/udev/udevadm-trigger.c index f78a2ba43..d979c1bc2 100644 --- a/src/udev/udevadm-trigger.c +++ b/src/udev/udevadm-trigger.c @@ -24,6 +24,8 @@ #include #include +#include "fd-util.h" +#include "set.h" #include "string-util.h" #include "udev-util.h" #include "udev.h" @@ -33,25 +35,37 @@ static int verbose; static int dry_run; -static void exec_list(struct udev_enumerate *udev_enumerate, const char *action) { +static int exec_list(struct udev_enumerate *udev_enumerate, const char *action, Set *settle_set) { struct udev_list_entry *entry; + int r; udev_list_entry_foreach(entry, udev_enumerate_get_list_entry(udev_enumerate)) { char filename[UTIL_PATH_SIZE]; - int fd; + const char *syspath; + _cleanup_close_ int fd = -1; + syspath = udev_list_entry_get_name(entry); if (verbose) - printf("%s\n", udev_list_entry_get_name(entry)); + printf("%s\n", syspath); if (dry_run) continue; - strscpyl(filename, sizeof(filename), udev_list_entry_get_name(entry), "/uevent", NULL); + + strscpyl(filename, sizeof(filename), syspath, "/uevent", NULL); fd = open(filename, O_WRONLY|O_CLOEXEC); if (fd < 0) continue; + + if (settle_set) { + r = set_put_strdup(settle_set, syspath); + if (r < 0) + return log_oom(); + } + if (write(fd, action, strlen(action)) < 0) log_debug_errno(errno, "error writing '%s' to '%s': %m", action, filename); - close(fd); } + + return 0; } static const char *keyval(const char *str, const char **val, char *buf, size_t size) { @@ -87,6 +101,7 @@ static void help(void) { " -y --sysname-match=NAME Trigger devices with this /sys path\n" " --name-match=NAME Trigger devices with this /dev name\n" " -b --parent-match=NAME Trigger devices with that parent device\n" + " -w --settle Wait for the triggered events to complete\n" , program_invocation_short_name); } @@ -109,6 +124,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { { "sysname-match", required_argument, NULL, 'y' }, { "name-match", required_argument, NULL, ARG_NAME }, { "parent-match", required_argument, NULL, 'b' }, + { "settle", no_argument, NULL, 'w' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, {} @@ -119,13 +135,19 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { } device_type = TYPE_DEVICES; const char *action = "change"; _cleanup_udev_enumerate_unref_ struct udev_enumerate *udev_enumerate = NULL; + _cleanup_udev_monitor_unref_ struct udev_monitor *udev_monitor = NULL; + _cleanup_close_ int fd_ep = -1; + int fd_udev = -1; + struct epoll_event ep_udev; + bool settle = false; + _cleanup_set_free_free_ Set *settle_set = NULL; int c, r; udev_enumerate = udev_enumerate_new(udev); - if (udev_enumerate == NULL) + if (!udev_enumerate) return 1; - while ((c = getopt_long(argc, argv, "vnt:c:s:S:a:A:p:g:y:b:Vh", options, NULL)) >= 0) { + while ((c = getopt_long(argc, argv, "vnt:c:s:S:a:A:p:g:y:b:wVh", options, NULL)) >= 0) { const char *key; const char *val; char buf[UTIL_PATH_SIZE]; @@ -211,7 +233,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { _cleanup_udev_device_unref_ struct udev_device *dev; dev = find_device(udev, optarg, "/sys"); - if (dev == NULL) { + if (!dev) { log_error("unable to open the device '%s'", optarg); return 2; } @@ -223,12 +245,15 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { } break; } + case 'w': + settle = true; + break; case ARG_NAME: { _cleanup_udev_device_unref_ struct udev_device *dev; dev = find_device(udev, optarg, "/dev/"); - if (dev == NULL) { + if (!dev) { log_error("unable to open the device '%s'", optarg); return 2; } @@ -258,7 +283,7 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { _cleanup_udev_device_unref_ struct udev_device *dev; dev = find_device(udev, argv[optind], NULL); - if (dev == NULL) { + if (!dev) { log_error("unable to open the device '%s'", argv[optind]); return 2; } @@ -270,18 +295,83 @@ static int adm_trigger(struct udev *udev, int argc, char *argv[]) { } } + if (settle) { + fd_ep = epoll_create1(EPOLL_CLOEXEC); + if (fd_ep < 0) { + log_error_errno(errno, "error creating epoll fd: %m"); + return 1; + } + + udev_monitor = udev_monitor_new_from_netlink(udev, "udev"); + if (!udev_monitor) { + log_error("error: unable to create netlink socket"); + return 3; + } + fd_udev = udev_monitor_get_fd(udev_monitor); + + if (udev_monitor_enable_receiving(udev_monitor) < 0) { + log_error("error: unable to subscribe to udev events"); + return 4; + } + + ep_udev = (struct epoll_event) { .events = EPOLLIN, .data.fd = fd_udev }; + if (epoll_ctl(fd_ep, EPOLL_CTL_ADD, fd_udev, &ep_udev) < 0) { + log_error_errno(errno, "fail to add fd to epoll: %m"); + return 5; + } + + settle_set = set_new(&string_hash_ops); + if (!settle_set) { + log_oom(); + return 1; + } + } + switch (device_type) { case TYPE_SUBSYSTEMS: udev_enumerate_scan_subsystems(udev_enumerate); - exec_list(udev_enumerate, action); - return 0; + break; case TYPE_DEVICES: udev_enumerate_scan_devices(udev_enumerate); - exec_list(udev_enumerate, action); - return 0; + break; default: assert_not_reached("device_type"); } + r = exec_list(udev_enumerate, action, settle_set); + if (r < 0) + return 1; + + while (!set_isempty(settle_set)) { + int fdcount; + struct epoll_event ev[4]; + int i; + + fdcount = epoll_wait(fd_ep, ev, ELEMENTSOF(ev), -1); + if (fdcount < 0) { + if (errno != EINTR) + log_error_errno(errno, "error receiving uevent message: %m"); + continue; + } + + for (i = 0; i < fdcount; i++) { + if (ev[i].data.fd == fd_udev && ev[i].events & EPOLLIN) { + _cleanup_udev_device_unref_ struct udev_device *device; + const char *syspath = NULL; + + device = udev_monitor_receive_device(udev_monitor); + if (!device) + continue; + + syspath = udev_device_get_syspath(device); + if (verbose) + printf("settle %s\n", syspath); + if (!set_remove(settle_set, syspath)) + log_debug("Got epoll event on syspath %s not present in syspath set", syspath); + } + } + } + + return 0; } const struct udevadm_cmd udevadm_trigger = { diff --git a/src/udev/udevd.c b/src/udev/udevd.c index 5c757d513..615c4ed3e 100644 --- a/src/udev/udevd.c +++ b/src/udev/udevd.c @@ -648,7 +648,7 @@ static bool is_devpath_busy(Manager *manager, struct event *event) { /* check if queue contains events we depend on */ LIST_FOREACH(event, loop_event, manager->events) { - /* we already found a later event, earlier can not block us, no need to check again */ + /* we already found a later event, earlier cannot block us, no need to check again */ if (loop_event->seqnum < event->delaying_seqnum) continue; diff --git a/src/user-sessions/user-sessions.c b/src/user-sessions/user-sessions.c index 795766a65..8e8d43e1d 100644 --- a/src/user-sessions/user-sessions.c +++ b/src/user-sessions/user-sessions.c @@ -23,12 +23,14 @@ #include "fileio.h" #include "fileio-label.h" +#include "fs-util.h" #include "log.h" #include "selinux-util.h" #include "string-util.h" #include "util.h" int main(int argc, char*argv[]) { + int r, k; if (argc != 2) { log_error("This program requires one argument."); @@ -44,42 +46,18 @@ int main(int argc, char*argv[]) { mac_selinux_init(); if (streq(argv[1], "start")) { - int r = 0; + r = unlink_or_warn("/run/nologin"); + k = unlink_or_warn("/etc/nologin"); + if (k < 0 && r >= 0) + r = k; - if (unlink("/run/nologin") < 0 && errno != ENOENT) - r = log_error_errno(errno, - "Failed to remove /run/nologin file: %m"); - - if (unlink("/etc/nologin") < 0 && errno != ENOENT) { - /* If the file doesn't exist and /etc simply - * was read-only (in which case unlink() - * returns EROFS even if the file doesn't - * exist), don't complain */ - - if (errno != EROFS || access("/etc/nologin", F_OK) >= 0) { - log_error_errno(errno, "Failed to remove /etc/nologin file: %m"); - return EXIT_FAILURE; - } - } - - if (r < 0) - return EXIT_FAILURE; - - } else if (streq(argv[1], "stop")) { - int r; - - r = write_string_file_atomic_label("/run/nologin", "System is going down."); - if (r < 0) { - log_error_errno(r, "Failed to create /run/nologin: %m"); - return EXIT_FAILURE; - } - - } else { - log_error("Unknown verb %s.", argv[1]); - return EXIT_FAILURE; + } else if (streq(argv[1], "stop")) + r = create_shutdown_run_nologin_or_warn(); + else { + log_error("Unknown verb '%s'.", argv[1]); + r = -EINVAL; } mac_selinux_finish(); - - return EXIT_SUCCESS; + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; } diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index 2e0e09d84..a9cc2bf63 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -248,7 +248,7 @@ static void setup_remaining_vcs(int src_fd, unsigned src_idx, bool utf8) { * requries 32 per glyph, regardless of the actual height - see the comment above #define * max_font_size 65536 in drivers/tty/vt/vt.c for more details. */ - fontbuf = malloc((cfo.width + 7) / 8 * 32 * cfo.charcount); + fontbuf = malloc_multiply((cfo.width + 7) / 8 * 32, cfo.charcount); if (!fontbuf) { log_oom(); return; diff --git a/sysctl.d/50-coredump.conf.in b/sysctl.d/50-coredump.conf.in index 5a25de451..ccd5c2cc5 100644 --- a/sysctl.d/50-coredump.conf.in +++ b/sysctl.d/50-coredump.conf.in @@ -9,4 +9,4 @@ # and systemd-coredump(8) and core(5) for the explanation of the # setting below. -kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %P %u %g %s %t %c %e +kernel.core_pattern=|@rootlibexecdir@/systemd-coredump %P %u %g %s %t %c %h %e diff --git a/test/TEST-15-DROPIN/test-dropin.sh b/test/TEST-15-DROPIN/test-dropin.sh index 9d8af99ac..ab0a58cae 100755 --- a/test/TEST-15-DROPIN/test-dropin.sh +++ b/test/TEST-15-DROPIN/test-dropin.sh @@ -179,6 +179,16 @@ test_masked_dropins () { ln -sf ../b.service /usr/lib/systemd/system/a.service.wants/b.service check_ko a Wants b.service + # 'a' is masked but has an override config file + echo "*** test a is masked but has an override" + create_services a b + ln -sf /dev/null /etc/systemd/system/a.service + cat >/usr/lib/systemd/system/a.service.d/override.conf < /dev/null journalctl -t systemd-sysusers -o cat | tail -n1 > $TESTDIR/tmp/err diff --git a/test/TEST-21-SYSUSERS/unhappy-1.input b/test/TEST-21-SYSUSERS/unhappy-1.input index 77390371d..b8ed85525 100644 --- a/test/TEST-21-SYSUSERS/unhappy-1.input +++ b/test/TEST-21-SYSUSERS/unhappy-1.input @@ -1 +1,4 @@ -u u1 9999999999 - - \ No newline at end of file +# Ensure invalid uids are detected +# +#Type Name ID GECOS HOMEDIR +u u1 9999999999 - - diff --git a/test/TEST-21-SYSUSERS/unhappy-2.input b/test/TEST-21-SYSUSERS/unhappy-2.input index 521c741cb..5be0e6d18 100644 --- a/test/TEST-21-SYSUSERS/unhappy-2.input +++ b/test/TEST-21-SYSUSERS/unhappy-2.input @@ -1,2 +1,4 @@ -# it is not allowed to create groups implicitely in the uid:gid syntax -u u1 100:100 - \ No newline at end of file +# Ensure it is not allowed to create groups implicitely in the uid:gid syntax +# +#Type Name ID GECOS HOMEDIR +u u1 100:100 - diff --git a/test/TEST-22-TMPFILES/Makefile b/test/TEST-22-TMPFILES/Makefile new file mode 100644 index 000000000..34d7cc6cd --- /dev/null +++ b/test/TEST-22-TMPFILES/Makefile @@ -0,0 +1,4 @@ +BUILD_DIR=$(shell ../../tools/find-build-dir.sh) + +all setup clean run: + @basedir=../.. TEST_BASE_DIR=../ BUILD_DIR=$(BUILD_DIR) ./test.sh --$@ diff --git a/test/TEST-22-TMPFILES/run-tmpfiles-tests.sh b/test/TEST-22-TMPFILES/run-tmpfiles-tests.sh new file mode 100755 index 000000000..3ad652f4e --- /dev/null +++ b/test/TEST-22-TMPFILES/run-tmpfiles-tests.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +set -x +set -e + +>/failed + +for t in test-*.sh; do + echo "Running $t"; ./$t +done + +touch /testok +rm /failed diff --git a/test/TEST-22-TMPFILES/test-01.sh b/test/TEST-22-TMPFILES/test-01.sh new file mode 100755 index 000000000..d233e37fb --- /dev/null +++ b/test/TEST-22-TMPFILES/test-01.sh @@ -0,0 +1,13 @@ +#! /bin/bash +# +# With "e" don't attempt to set permissions when file doesn't exist, see +# https://github.com/systemd/systemd/pull/6682. +# + +set -e + +rm -fr /tmp/test + +echo "e /tmp/test - root root 1d" | systemd-tmpfiles --create - + +! test -e /tmp/test diff --git a/test/TEST-22-TMPFILES/test.sh b/test/TEST-22-TMPFILES/test.sh new file mode 100755 index 000000000..ca7893338 --- /dev/null +++ b/test/TEST-22-TMPFILES/test.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- +# ex: ts=8 sw=4 sts=4 et filetype=sh +set -e +TEST_DESCRIPTION="Tmpfiles related tests" +TEST_NO_QEMU=1 + +. $TEST_BASE_DIR/test-functions + +test_setup() { + # create the basic filesystem layout + setup_basic_environment >/dev/null + inst_binary mv + inst_binary stat + inst_binary seq + inst_binary xargs + + # mask some services that we do not want to run in these tests + ln -fs /dev/null $initdir/etc/systemd/system/systemd-hwdb-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-journal-catalog-update.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-networkd.socket + ln -fs /dev/null $initdir/etc/systemd/system/systemd-resolved.service + ln -fs /dev/null $initdir/etc/systemd/system/systemd-machined.service + + # setup the testsuite service + cp testsuite.service $initdir/etc/systemd/system/ + setup_testsuite + + mkdir -p $initdir/testsuite + cp run-tmpfiles-tests.sh $initdir/testsuite/ + cp test-*.sh $initdir/testsuite/ + + # create dedicated rootfs for nspawn (located in $TESTDIR/nspawn-root) + setup_nspawn_root +} + +do_test "$@" diff --git a/test/TEST-22-TMPFILES/testsuite.service b/test/TEST-22-TMPFILES/testsuite.service new file mode 100644 index 000000000..3a44b4198 --- /dev/null +++ b/test/TEST-22-TMPFILES/testsuite.service @@ -0,0 +1,8 @@ +[Unit] +Description=Testsuite service +After=multi-user.target + +[Service] +WorkingDirectory=/testsuite +ExecStart=/testsuite/run-tmpfiles-tests.sh +Type=oneshot diff --git a/test/meson.build b/test/meson.build index 4667628b2..f86cf388e 100644 --- a/test/meson.build +++ b/test/meson.build @@ -45,11 +45,13 @@ test_data_files = ''' sockets.target son.service sysinit.target + test-execute/exec-ambientcapabilities-merge-nfsnobody.service + test-execute/exec-ambientcapabilities-merge-nobody.service + test-execute/exec-ambientcapabilities-merge.service + test-execute/exec-ambientcapabilities-nfsnobody.service + test-execute/exec-ambientcapabilities-nobody.service + test-execute/exec-ambientcapabilities.service test-execute/exec-bindpaths.service - test-execute/exec-capabilityambientset-merge-nfsnobody.service - test-execute/exec-capabilityambientset-merge.service - test-execute/exec-capabilityambientset-nfsnobody.service - test-execute/exec-capabilityambientset.service test-execute/exec-capabilityboundingset-invert.service test-execute/exec-capabilityboundingset-merge.service test-execute/exec-capabilityboundingset-reset.service @@ -68,6 +70,7 @@ test_data_files = ''' test-execute/exec-environment.service test-execute/exec-environmentfile.service test-execute/exec-group-nfsnobody.service + test-execute/exec-group-nobody.service test-execute/exec-group-nogroup.service test-execute/exec-group.service test-execute/exec-ignoresigpipe-no.service @@ -113,6 +116,8 @@ test_data_files = ''' test-execute/exec-restrictnamespaces-yes.service test-execute/exec-runtimedirectory-mode.service test-execute/exec-runtimedirectory-owner-nfsnobody.service + test-execute/exec-runtimedirectory-owner-nobody.service + test-execute/exec-runtimedirectory-owner-nogroup.service test-execute/exec-runtimedirectory-owner.service test-execute/exec-runtimedirectory.service test-execute/exec-specifier-interpolation.service @@ -133,13 +138,19 @@ test_data_files = ''' test-execute/exec-systemcallfilter-not-failing.service test-execute/exec-systemcallfilter-not-failing2.service test-execute/exec-systemcallfilter-system-user-nfsnobody.service + test-execute/exec-systemcallfilter-system-user-nobody.service test-execute/exec-systemcallfilter-system-user.service test-execute/exec-systemcallfilter-with-errno-name.service test-execute/exec-systemcallfilter-with-errno-number.service + test-execute/exec-temporaryfilesystem-options.service + test-execute/exec-temporaryfilesystem-ro.service + test-execute/exec-temporaryfilesystem-rw.service + test-execute/exec-temporaryfilesystem-usr.service test-execute/exec-umask-0177.service test-execute/exec-umask-default.service test-execute/exec-unsetenvironment.service test-execute/exec-user-nfsnobody.service + test-execute/exec-user-nobody.service test-execute/exec-user.service test-execute/exec-workingdirectory.service test-path/basic.target diff --git a/test/networkd-test.py b/test/networkd-test.py index 860c9f189..3f917f0d9 100755 --- a/test/networkd-test.py +++ b/test/networkd-test.py @@ -33,13 +33,13 @@ import errno import os -import sys -import time -import unittest -import tempfile -import subprocess import shutil import socket +import subprocess +import sys +import tempfile +import time +import unittest HAVE_DNSMASQ = shutil.which('dnsmasq') is not None @@ -93,8 +93,8 @@ class NetworkdTestingUtilities: def write_network_dropin(self, unit_name, dropin_name, contents): """Write a network unit drop-in, and queue it to be removed.""" - dropin_dir = os.path.join(NETWORK_UNITDIR, "%s.d" % unit_name) - dropin_path = os.path.join(dropin_dir, "%s.conf" % dropin_name) + dropin_dir = os.path.join(NETWORK_UNITDIR, "{}.d".format(unit_name)) + dropin_path = os.path.join(dropin_dir, "{}.conf".format(dropin_name)) os.makedirs(dropin_dir, exist_ok=True) self.addCleanup(os.rmdir, dropin_dir) @@ -130,7 +130,7 @@ class NetworkdTestingUtilities: # Wait for the requested interfaces, but don't fail for them. subprocess.call([NETWORKD_WAIT_ONLINE, '--timeout=5'] + - ['--interface=%s' % iface for iface in kwargs]) + ['--interface={}'.format(iface) for iface in kwargs]) # Validate each link state found in the networkctl output. out = subprocess.check_output(['networkctl', '--no-legend']).rstrip() @@ -142,13 +142,12 @@ class NetworkdTestingUtilities: actual = fields[-1] if (actual != expected and not (expected == 'managed' and actual != 'unmanaged')): - self.fail("Link %s expects state %s, found %s" % - (iface, expected, actual)) + self.fail("Link {} expects state {}, found {}".format(iface, expected, actual)) interfaces.remove(iface) # Ensure that all requested interfaces have been covered. if interfaces: - self.fail("Missing links in status output: %s" % interfaces) + self.fail("Missing links in status output: {}".format(interfaces)) class BridgeTest(NetworkdTestingUtilities, unittest.TestCase): @@ -257,7 +256,7 @@ class ClientTestBase(NetworkdTestingUtilities): def show_journal(self, unit): '''Show journal of given unit since start of the test''' - print('---- %s ----' % unit) + print('---- {} ----'.format(unit)) subprocess.check_output(['journalctl', '--sync']) sys.stdout.flush() subprocess.call(['journalctl', '-b', '--no-pager', '--quiet', @@ -287,10 +286,10 @@ class ClientTestBase(NetworkdTestingUtilities): raise self.write_network(self.config, '''\ [Match] -Name=%s +Name={} [Network] -DHCP=%s -%s''' % (self.iface, dhcp_mode, extra_opts)) +DHCP={} +{}'''.format(self.iface, dhcp_mode, extra_opts)) if coldplug: # create interface first, then start networkd @@ -335,8 +334,8 @@ DHCP=%s # check networkctl state out = subprocess.check_output(['networkctl']) - self.assertRegex(out, (r'%s\s+ether\s+[a-z-]+\s+unmanaged' % self.if_router).encode()) - self.assertRegex(out, (r'%s\s+ether\s+routable\s+configured' % self.iface).encode()) + self.assertRegex(out, (r'{}\s+ether\s+[a-z-]+\s+unmanaged'.format(self.if_router)).encode()) + self.assertRegex(out, (r'{}\s+ether\s+routable\s+configured'.format(self.iface)).encode()) out = subprocess.check_output(['networkctl', 'status', self.iface]) self.assertRegex(out, br'Type:\s+ether') @@ -352,11 +351,11 @@ DHCP=%s except (AssertionError, subprocess.CalledProcessError): # show networkd status, journal, and DHCP server log on failure with open(os.path.join(NETWORK_UNITDIR, self.config)) as f: - print('\n---- %s ----\n%s' % (self.config, f.read())) + print('\n---- {} ----\n{}'.format(self.config, f.read())) print('---- interface status ----') sys.stdout.flush() subprocess.call(['ip', 'a', 'show', 'dev', self.iface]) - print('---- networkctl status %s ----' % self.iface) + print('---- networkctl status {} ----'.format(self.iface)) sys.stdout.flush() subprocess.call(['networkctl', 'status', self.iface]) self.show_journal('systemd-networkd.service') @@ -513,7 +512,7 @@ class DnsmasqClientTest(ClientTestBase, unittest.TestCase): '''Print DHCP server log for debugging failures''' with open(self.dnsmasq_log) as f: - sys.stdout.write('\n\n---- dnsmasq log ----\n%s\n------\n\n' % f.read()) + sys.stdout.write('\n\n---- dnsmasq log ----\n{}\n------\n\n'.format(f.read())) def test_resolved_domain_restricted_dns(self): '''resolved: domain-restricted DNS servers''' @@ -523,10 +522,10 @@ class DnsmasqClientTest(ClientTestBase, unittest.TestCase): self.create_iface(dnsmasq_opts=['--address=/#/192.168.42.1']) self.write_network('general.network', '''\ [Match] -Name=%s +Name={} [Network] DHCP=ipv4 -IPv6AcceptRA=False''' % self.iface) +IPv6AcceptRA=False'''.format(self.iface)) # create second device/dnsmasq for a .company/.lab VPN interface # static IPs for simplicity @@ -653,7 +652,7 @@ Domains= ~company ~lab''') self.addCleanup(subprocess.call, ['umount', '/etc/hostname']) subprocess.check_call(['systemctl', 'stop', 'systemd-hostnamed.service']) - self.create_iface(dnsmasq_opts=['--dhcp-host=%s,192.168.5.210,testgreen' % self.iface_mac]) + self.create_iface(dnsmasq_opts=['--dhcp-host={},192.168.5.210,testgreen'.format(self.iface_mac)]) self.do_test(coldplug=None, extra_opts='IPv6AcceptRA=False', dhcp_mode='ipv4') try: @@ -670,7 +669,7 @@ Domains= ~company ~lab''') sys.stdout.write('[retry %i] ' % retry) sys.stdout.flush() else: - self.fail('Transient hostname not found in hostnamectl:\n%s' % out.decode()) + self.fail('Transient hostname not found in hostnamectl:\n{}'.format(out.decode())) # and also applied to the system self.assertEqual(socket.gethostname(), 'testgreen') except AssertionError: @@ -688,7 +687,7 @@ Domains= ~company ~lab''') self.writeConfig('/etc/hostname', orig_hostname) subprocess.check_call(['systemctl', 'stop', 'systemd-hostnamed.service']) - self.create_iface(dnsmasq_opts=['--dhcp-host=%s,192.168.5.210,testgreen' % self.iface_mac]) + self.create_iface(dnsmasq_opts=['--dhcp-host={},192.168.5.210,testgreen'.format(self.iface_mac)]) self.do_test(coldplug=None, extra_opts='IPv6AcceptRA=False', dhcp_mode='ipv4') try: @@ -942,9 +941,9 @@ class MatchClientTest(unittest.TestCase, NetworkdTestingUtilities): ['addr', mac], ['addr', mac]) self.write_network('no-veth.network', """\ [Match] -MACAddress=%s +MACAddress={} Name=!nonexistent *peer* -[Network]""" % mac) +[Network]""".format(mac)) subprocess.check_call(['systemctl', 'start', 'systemd-networkd']) self.assert_link_states(test_veth='managed', test_peer='unmanaged') diff --git a/test/rule-syntax-check.py b/test/rule-syntax-check.py index e053b027c..a245432b6 100755 --- a/test/rule-syntax-check.py +++ b/test/rule-syntax-check.py @@ -28,10 +28,15 @@ rules_files = sys.argv[1:] if not rules_files: sys.exit('Specify files to test as arguments') -no_args_tests = re.compile(r'(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|RESULT|TEST)\s*(?:=|!)=\s*"([^"]*)"$') -args_tests = re.compile(r'(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*"([^"]*)"$') -no_args_assign = re.compile(r'(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|PROGRAM|RUN|LABEL|GOTO|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*"([^"]*)"$') -args_assign = re.compile(r'(ATTR|ENV|IMPORT|RUN){([a-zA-Z0-9/_.*%-]+)}\s*(=|\+=)\s*"([^"]*)"$') +quoted_string_re = r'"(?:[^\\"]|\\.)*"' +no_args_tests = re.compile(r'(ACTION|DEVPATH|KERNELS?|NAME|SYMLINK|SUBSYSTEMS?|DRIVERS?|TAG|PROGRAM|RESULT|TEST)\s*(?:=|!)=\s*' + quoted_string_re + '$') +args_tests = re.compile(r'(ATTRS?|ENV|TEST){([a-zA-Z0-9/_.*%-]+)}\s*(?:=|!)=\s*' + quoted_string_re + '$') +no_args_assign = re.compile(r'(NAME|SYMLINK|OWNER|GROUP|MODE|TAG|RUN|LABEL|GOTO|OPTIONS|IMPORT)\s*(?:\+=|:=|=)\s*' + quoted_string_re + '$') +args_assign = re.compile(r'(ATTR|ENV|IMPORT|RUN){([a-zA-Z0-9/_.*%-]+)}\s*(=|\+=)\s*' + quoted_string_re + '$') +# Find comma-separated groups, but allow commas that are inside quoted strings. +# Using quoted_string_re + '?' so that strings missing the last double quote +# will still match for this part that splits on commas. +comma_separated_group_re = re.compile(r'(?:[^,"]|' + quoted_string_re + '?)+') result = 0 buffer = '' @@ -54,8 +59,10 @@ for path in rules_files: if not line or line.startswith('#'): continue - for clause in line.split(','): - clause = clause.strip() + # Separator ',' is normally optional but we make it mandatory here as + # it generally improves the readability of the rules. + for clause_match in comma_separated_group_re.finditer(line): + clause = clause_match.group().strip() if not (no_args_tests.match(clause) or args_tests.match(clause) or no_args_assign.match(clause) or args_assign.match(clause)): diff --git a/test/sysv-generator-test.py b/test/sysv-generator-test.py index 0b4710aea..463ee3c55 100755 --- a/test/sysv-generator-test.py +++ b/test/sysv-generator-test.py @@ -19,15 +19,16 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . -import unittest -import sys -import os -import subprocess -import tempfile -import shutil -from glob import glob import collections +import os +import shutil +import subprocess +import sys +import tempfile +import unittest + from configparser import RawConfigParser +from glob import glob sysv_generator = './systemd-sysv-generator' @@ -112,22 +113,20 @@ class SysvGeneratorTest(unittest.TestCase): keys.setdefault('Required-Stop', keys['Required-Start']) keys.setdefault('Default-Start', '2 3 4 5') keys.setdefault('Default-Stop', '0 1 6') - keys.setdefault('Short-Description', 'test %s service' % - name_without_sh) - keys.setdefault('Description', 'long description for test %s service' % - name_without_sh) + keys.setdefault('Short-Description', 'test {} service'.format(name_without_sh)) + keys.setdefault('Description', 'long description for test {} service'.format(name_without_sh)) script = os.path.join(self.init_d_dir, fname) with open(script, 'w') as f: f.write('#!/bin/init-d-interpreter\n### BEGIN INIT INFO\n') for k, v in keys.items(): if v is not None: - f.write('#%20s %s\n' % (k + ':', v)) + f.write('#{:>20} {}\n'.format(k + ':', v)) f.write('### END INIT INFO\ncode --goes here\n') os.chmod(script, 0o755) if enable: def make_link(prefix, runlevel): - d = os.path.join(self.rcnd_dir, 'rc%s.d' % runlevel) + d = os.path.join(self.rcnd_dir, 'rc{}.d'.format(runlevel)) if not os.path.isdir(d): os.mkdir(d) os.symlink('../init.d/' + fname, os.path.join(d, prefix + fname)) @@ -146,7 +145,7 @@ class SysvGeneratorTest(unittest.TestCase): # should be enabled for target in all_targets: - link = os.path.join(self.out_dir, '%s.target.wants' % target, unit) + link = os.path.join(self.out_dir, '{}.target.wants'.format(target), unit) if target in targets: unit_file = os.readlink(link) # os.path.exists() will fail on a dangling symlink @@ -154,7 +153,7 @@ class SysvGeneratorTest(unittest.TestCase): self.assertEqual(os.path.basename(unit_file), unit) else: self.assertFalse(os.path.exists(link), - '%s unexpectedly exists' % link) + '{} unexpectedly exists'.format(link)) # # test cases @@ -188,9 +187,9 @@ class SysvGeneratorTest(unittest.TestCase): self.assertEqual(s.get('Service', 'Type'), 'forking') init_script = os.path.join(self.init_d_dir, 'foo') self.assertEqual(s.get('Service', 'ExecStart'), - '%s start' % init_script) + '{} start'.format(init_script)) self.assertEqual(s.get('Service', 'ExecStop'), - '%s stop' % init_script) + '{} stop'.format(init_script)) self.assertNotIn('Overwriting', err) @@ -276,7 +275,7 @@ class SysvGeneratorTest(unittest.TestCase): d = os.path.join(self.rcnd_dir, 'rc2.d') if not os.path.isdir(d): os.mkdir(d) - os.symlink('../init.d/' + name, os.path.join(d, 'S%02i%s' % (prio, name))) + os.symlink('../init.d/' + name, os.path.join(d, 'S{:>2}{}'.format(prio, name))) err, results = self.run_generator() self.assertEqual(sorted(results), ['consumer.service', 'provider.service']) @@ -351,9 +350,9 @@ class SysvGeneratorTest(unittest.TestCase): # calls correct script with .sh init_script = os.path.join(self.init_d_dir, 'foo.sh') self.assertEqual(s.get('Service', 'ExecStart'), - '%s start' % init_script) + '{} start'.format(init_script)) self.assertEqual(s.get('Service', 'ExecStop'), - '%s stop' % init_script) + '{} stop'.format(init_script)) self.assert_enabled('foo.service', ['multi-user', 'graphical']) diff --git a/test/test-execute/exec-capabilityambientset-merge-nfsnobody.service b/test/test-execute/exec-ambientcapabilities-merge-nfsnobody.service similarity index 70% rename from test/test-execute/exec-capabilityambientset-merge-nfsnobody.service rename to test/test-execute/exec-ambientcapabilities-merge-nfsnobody.service index 00bec581b..d2cadebde 100644 --- a/test/test-execute/exec-capabilityambientset-merge-nfsnobody.service +++ b/test/test-execute/exec-ambientcapabilities-merge-nfsnobody.service @@ -2,8 +2,8 @@ Description=Test for AmbientCapabilities [Service] -ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"' +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' Type=oneshot User=nfsnobody -AmbientCapabilities=CAP_NET_ADMIN +AmbientCapabilities=CAP_CHOWN AmbientCapabilities=CAP_NET_RAW diff --git a/test/test-execute/exec-capabilityambientset-merge.service b/test/test-execute/exec-ambientcapabilities-merge-nobody.service similarity index 70% rename from test/test-execute/exec-capabilityambientset-merge.service rename to test/test-execute/exec-ambientcapabilities-merge-nobody.service index 64964380e..545081d62 100644 --- a/test/test-execute/exec-capabilityambientset-merge.service +++ b/test/test-execute/exec-ambientcapabilities-merge-nobody.service @@ -2,8 +2,8 @@ Description=Test for AmbientCapabilities [Service] -ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"' +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' Type=oneshot User=nobody -AmbientCapabilities=CAP_NET_ADMIN +AmbientCapabilities=CAP_CHOWN AmbientCapabilities=CAP_NET_RAW diff --git a/test/test-execute/exec-ambientcapabilities-merge.service b/test/test-execute/exec-ambientcapabilities-merge.service new file mode 100644 index 000000000..2e3fe5912 --- /dev/null +++ b/test/test-execute/exec-ambientcapabilities-merge.service @@ -0,0 +1,9 @@ +[Unit] +Description=Test for AmbientCapabilities (daemon) + +[Service] +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' +Type=oneshot +User=daemon +AmbientCapabilities=CAP_CHOWN +AmbientCapabilities=CAP_NET_RAW diff --git a/test/test-execute/exec-capabilityambientset-nfsnobody.service b/test/test-execute/exec-ambientcapabilities-nfsnobody.service similarity index 63% rename from test/test-execute/exec-capabilityambientset-nfsnobody.service rename to test/test-execute/exec-ambientcapabilities-nfsnobody.service index 614cfdd58..9377ee16b 100644 --- a/test/test-execute/exec-capabilityambientset-nfsnobody.service +++ b/test/test-execute/exec-ambientcapabilities-nfsnobody.service @@ -2,7 +2,7 @@ Description=Test for AmbientCapabilities [Service] -ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"' +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' Type=oneshot User=nfsnobody -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW +AmbientCapabilities=CAP_CHOWN CAP_NET_RAW diff --git a/test/test-execute/exec-capabilityambientset.service b/test/test-execute/exec-ambientcapabilities-nobody.service similarity index 62% rename from test/test-execute/exec-capabilityambientset.service rename to test/test-execute/exec-ambientcapabilities-nobody.service index d63f884ef..07a6c7511 100644 --- a/test/test-execute/exec-capabilityambientset.service +++ b/test/test-execute/exec-ambientcapabilities-nobody.service @@ -2,7 +2,7 @@ Description=Test for AmbientCapabilities [Service] -ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000003000"' +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' Type=oneshot User=nobody -AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW +AmbientCapabilities=CAP_CHOWN CAP_NET_RAW diff --git a/test/test-execute/exec-ambientcapabilities.service b/test/test-execute/exec-ambientcapabilities.service new file mode 100644 index 000000000..d91cc09a4 --- /dev/null +++ b/test/test-execute/exec-ambientcapabilities.service @@ -0,0 +1,8 @@ +[Unit] +Description=Test for AmbientCapabilities (daemon) + +[Service] +ExecStart=/bin/sh -x -c 'c=$$(grep "CapAmb:" /proc/self/status); test "$$c" = "CapAmb: 0000000000002001"' +Type=oneshot +User=daemon +AmbientCapabilities=CAP_CHOWN CAP_NET_RAW diff --git a/test/test-execute/exec-dynamicuser-statedir.service b/test/test-execute/exec-dynamicuser-statedir.service index cc09c938c..5ea6d9da4 100644 --- a/test/test-execute/exec-dynamicuser-statedir.service +++ b/test/test-execute/exec-dynamicuser-statedir.service @@ -12,7 +12,7 @@ ExecStart=/bin/sh -c 'test -f /var/lib/private/waldo/yay' ExecStart=/bin/sh -c 'test -f /var/lib/private/quux/pief/yayyay' # Make sure that /var/lib/private/waldo is really the only writable directory besides the obvious candidates -ExecStart=/bin/sh -x -c 'test $$(find / -type d -writable 2> /dev/null | egrep -v -e \'^(/var/tmp$$|/tmp$$|/proc/|/dev/mqueue$$|/dev/shm$$)\' | sort -u | tr -d '\\\\n') = /var/lib/private/quux/pief/var/lib/private/waldo' +ExecStart=/bin/sh -x -c 'test $$(find / -type d -writable 2> /dev/null | egrep -v -e \'^(/var/tmp$$|/tmp$$|/proc/|/dev/mqueue$$|/dev/shm$$|/sys/fs/bpf$$)\' | sort -u | tr -d '\\\\n') = /var/lib/private/quux/pief/var/lib/private/waldo' Type=oneshot DynamicUser=yes diff --git a/test/test-execute/exec-group-nobody.service b/test/test-execute/exec-group-nobody.service new file mode 100644 index 000000000..be7c79691 --- /dev/null +++ b/test/test-execute/exec-group-nobody.service @@ -0,0 +1,7 @@ +[Unit] +Description=Test for Group + +[Service] +ExecStart=/bin/sh -x -c 'test "$$(id -n -g)" = "nobody"' +Type=oneshot +Group=nobody diff --git a/test/test-execute/exec-group.service b/test/test-execute/exec-group.service index be7c79691..be5599239 100644 --- a/test/test-execute/exec-group.service +++ b/test/test-execute/exec-group.service @@ -1,7 +1,7 @@ [Unit] -Description=Test for Group +Description=Test for Group (daemon) [Service] -ExecStart=/bin/sh -x -c 'test "$$(id -n -g)" = "nobody"' +ExecStart=/bin/sh -x -c 'test "$$(id -n -g)" = "daemon"' Type=oneshot -Group=nobody +Group=daemon diff --git a/test/test-execute/exec-runtimedirectory-mode.service b/test/test-execute/exec-runtimedirectory-mode.service index 842721d5c..480f90415 100644 --- a/test/test-execute/exec-runtimedirectory-mode.service +++ b/test/test-execute/exec-runtimedirectory-mode.service @@ -2,7 +2,7 @@ Description=Test for RuntimeDirectoryMode [Service] -ExecStart=/bin/sh -x -c 'mode=$$(stat -c %%a /tmp/test-exec_runtimedirectory-mode); test "$$mode" = "750"' +ExecStart=/bin/sh -x -c 'mode=$$(stat -c %%a %t/test-exec_runtimedirectory-mode); test "$$mode" = "750"' Type=oneshot RuntimeDirectory=test-exec_runtimedirectory-mode RuntimeDirectoryMode=0750 diff --git a/test/test-execute/exec-runtimedirectory-owner-nfsnobody.service b/test/test-execute/exec-runtimedirectory-owner-nfsnobody.service index e962af8a4..1e3b6b415 100644 --- a/test/test-execute/exec-runtimedirectory-owner-nfsnobody.service +++ b/test/test-execute/exec-runtimedirectory-owner-nfsnobody.service @@ -2,7 +2,7 @@ Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set) [Service] -ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G /tmp/test-exec_runtimedirectory-owner); test "$$group" = "nfsnobody"' +ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nfsnobody"' Type=oneshot Group=nfsnobody User=root diff --git a/test/test-execute/exec-runtimedirectory-owner-nobody.service b/test/test-execute/exec-runtimedirectory-owner-nobody.service new file mode 100644 index 000000000..54782f9bb --- /dev/null +++ b/test/test-execute/exec-runtimedirectory-owner-nobody.service @@ -0,0 +1,9 @@ +[Unit] +Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set) + +[Service] +ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nobody"' +Type=oneshot +Group=nobody +User=root +RuntimeDirectory=test-exec_runtimedirectory-owner diff --git a/test/test-execute/exec-runtimedirectory-owner-nogroup.service b/test/test-execute/exec-runtimedirectory-owner-nogroup.service new file mode 100644 index 000000000..663afe118 --- /dev/null +++ b/test/test-execute/exec-runtimedirectory-owner-nogroup.service @@ -0,0 +1,9 @@ +[Unit] +Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set) + +[Service] +ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner); test "$$group" = "nogroup"' +Type=oneshot +Group=nogroup +User=root +RuntimeDirectory=test-exec_runtimedirectory-owner diff --git a/test/test-execute/exec-runtimedirectory-owner.service b/test/test-execute/exec-runtimedirectory-owner.service index 1f438c182..07dd7ca3a 100644 --- a/test/test-execute/exec-runtimedirectory-owner.service +++ b/test/test-execute/exec-runtimedirectory-owner.service @@ -2,8 +2,8 @@ Description=Test for RuntimeDirectory owner (must not be the default group of the user if Group is set) [Service] -ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G /tmp/test-exec_runtimedirectory-owner); test "$$group" = "nobody"' +ExecStart=/bin/sh -x -c 'group=$$(stat -c %%G %t/test-exec_runtimedirectory-owner-daemon); test "$$group" = "daemon"' Type=oneshot -Group=nobody +Group=daemon User=root -RuntimeDirectory=test-exec_runtimedirectory-owner +RuntimeDirectory=test-exec_runtimedirectory-owner-daemon diff --git a/test/test-execute/exec-runtimedirectory.service b/test/test-execute/exec-runtimedirectory.service index ec46c9d49..d8f242fde 100644 --- a/test/test-execute/exec-runtimedirectory.service +++ b/test/test-execute/exec-runtimedirectory.service @@ -2,6 +2,6 @@ Description=Test for RuntimeDirectory [Service] -ExecStart=/bin/sh -x -c 'test -d /tmp/test-exec_runtimedirectory' +ExecStart=/bin/sh -x -c 'test -d %t/test-exec_runtimedirectory' Type=oneshot RuntimeDirectory=test-exec_runtimedirectory diff --git a/test/test-execute/exec-systemcallfilter-system-user-nobody.service b/test/test-execute/exec-systemcallfilter-system-user-nobody.service new file mode 100644 index 000000000..da129a30e --- /dev/null +++ b/test/test-execute/exec-systemcallfilter-system-user-nobody.service @@ -0,0 +1,11 @@ +[Unit] +Description=Test for SystemCallFilter in system mode with User set + +[Service] +ExecStart=/bin/sh -c 'echo "Foo bar"' +Type=oneshot +User=nobody +SystemCallFilter=~read write open execve ioperm +SystemCallFilter=ioctl +SystemCallFilter=read write open execve +SystemCallFilter=~ioperm diff --git a/test/test-execute/exec-systemcallfilter-system-user.service b/test/test-execute/exec-systemcallfilter-system-user.service index da129a30e..488a3bb79 100644 --- a/test/test-execute/exec-systemcallfilter-system-user.service +++ b/test/test-execute/exec-systemcallfilter-system-user.service @@ -1,10 +1,10 @@ [Unit] -Description=Test for SystemCallFilter in system mode with User set +Description=Test for SystemCallFilter in system mode with User set (daemon) [Service] ExecStart=/bin/sh -c 'echo "Foo bar"' Type=oneshot -User=nobody +User=daemon SystemCallFilter=~read write open execve ioperm SystemCallFilter=ioctl SystemCallFilter=read write open execve diff --git a/test/test-execute/exec-temporaryfilesystem-options.service b/test/test-execute/exec-temporaryfilesystem-options.service new file mode 100644 index 000000000..b7a5baf93 --- /dev/null +++ b/test/test-execute/exec-temporaryfilesystem-options.service @@ -0,0 +1,17 @@ +[Unit] +Description=Test for TemporaryFileSystem with mount options + +[Service] +Type=oneshot + +# The mount options default to "mode=0755,nodev,strictatime". +# Let's override some of them, and test the behaviour of "ro". +TemporaryFileSystem=/var:ro,mode=0700,nostrictatime + +# Check /proc/self/mountinfo +ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""' +ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$11 !~ /(^|,)mode=700(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""' + +ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)ro(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""' +ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 !~ /(^|,)nodev(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""' +ExecStart=/bin/sh -x -c 'test "$$(awk \'$$5 == "/var" && $$6 ~ /(^|,)strictatime(,|$$)/ { print $$6 }\' /proc/self/mountinfo)" = ""' diff --git a/test/test-execute/exec-temporaryfilesystem-ro.service b/test/test-execute/exec-temporaryfilesystem-ro.service new file mode 100644 index 000000000..c0e3721a0 --- /dev/null +++ b/test/test-execute/exec-temporaryfilesystem-ro.service @@ -0,0 +1,33 @@ +[Unit] +Description=Test for TemporaryFileSystem with read-only mode + +[Service] +Type=oneshot + +# Check directories exist +ExecStart=/bin/sh -c 'test -d /var/test-exec-temporaryfilesystem/rw && test -d /var/test-exec-temporaryfilesystem/ro' + +# Check TemporaryFileSystem= are empty +ExecStart=/bin/sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done' + +# Cannot create a file in /var +ExecStart=/bin/sh -c '! touch /var/hoge' + +# Create a file in /var/test-exec-temporaryfilesystem/rw +ExecStart=/bin/sh -c 'touch /var/test-exec-temporaryfilesystem/rw/thisisasimpletest-temporaryfilesystem' + +# Then, the file can be access through /tmp +ExecStart=/bin/sh -c 'test -f /tmp/thisisasimpletest-temporaryfilesystem' + +# Also, through /var/test-exec-temporaryfilesystem/ro +ExecStart=/bin/sh -c 'test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem' + +# The file cannot modify through /var/test-exec-temporaryfilesystem/ro +ExecStart=/bin/sh -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem' + +# Cleanup +ExecStart=/bin/sh -c 'rm /tmp/thisisasimpletest-temporaryfilesystem' + +TemporaryFileSystem=/var:ro +BindPaths=/tmp:/var/test-exec-temporaryfilesystem/rw +BindReadOnlyPaths=/tmp:/var/test-exec-temporaryfilesystem/ro diff --git a/test/test-execute/exec-temporaryfilesystem-rw.service b/test/test-execute/exec-temporaryfilesystem-rw.service new file mode 100644 index 000000000..fc02ceab1 --- /dev/null +++ b/test/test-execute/exec-temporaryfilesystem-rw.service @@ -0,0 +1,33 @@ +[Unit] +Description=Test for TemporaryFileSystem + +[Service] +Type=oneshot + +# Check directories exist +ExecStart=/bin/sh -c 'test -d /var/test-exec-temporaryfilesystem/rw && test -d /var/test-exec-temporaryfilesystem/ro' + +# Check TemporaryFileSystem= are empty +ExecStart=/bin/sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done' + +# Create a file in /var +ExecStart=/bin/sh -c 'touch /var/hoge' + +# Create a file in /var/test-exec-temporaryfilesystem/rw +ExecStart=/bin/sh -c 'touch /var/test-exec-temporaryfilesystem/rw/thisisasimpletest-temporaryfilesystem' + +# Then, the file can be access through /tmp +ExecStart=/bin/sh -c 'test -f /tmp/thisisasimpletest-temporaryfilesystem' + +# Also, through /var/test-exec-temporaryfilesystem/ro +ExecStart=/bin/sh -c 'test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem' + +# The file cannot modify through /var/test-exec-temporaryfilesystem/ro +ExecStart=/bin/sh -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem' + +# Cleanup +ExecStart=/bin/sh -c 'rm /tmp/thisisasimpletest-temporaryfilesystem' + +TemporaryFileSystem=/var +BindPaths=/tmp:/var/test-exec-temporaryfilesystem/rw +BindReadOnlyPaths=/tmp:/var/test-exec-temporaryfilesystem/ro diff --git a/test/test-execute/exec-temporaryfilesystem-usr.service b/test/test-execute/exec-temporaryfilesystem-usr.service new file mode 100644 index 000000000..05c1ec069 --- /dev/null +++ b/test/test-execute/exec-temporaryfilesystem-usr.service @@ -0,0 +1,15 @@ +[Unit] +Description=Test for TemporaryFileSystem on /usr + +[Service] +Type=oneshot + +# Check TemporaryFileSystem= are empty +ExecStart=/bin/sh -c 'for i in $$(ls -A /usr); do test $$i = lib -o $$i = lib64 -o $$i = bin -o $$i = sbin || false; done' + +# Cannot create files under /usr +ExecStart=/bin/sh -c '! touch /usr/hoge' +ExecStart=/bin/sh -c '! touch /usr/bin/hoge' + +TemporaryFileSystem=/usr:ro +BindReadOnlyPaths=-/usr/lib -/usr/lib64 /usr/bin /usr/sbin diff --git a/test/test-execute/exec-user-nobody.service b/test/test-execute/exec-user-nobody.service new file mode 100644 index 000000000..0a00c1abc --- /dev/null +++ b/test/test-execute/exec-user-nobody.service @@ -0,0 +1,7 @@ +[Unit] +Description=Test for User + +[Service] +ExecStart=/bin/sh -x -c 'test "$$USER" = "nobody"' +Type=oneshot +User=nobody diff --git a/test/test-execute/exec-user.service b/test/test-execute/exec-user.service index 0a00c1abc..d315a828d 100644 --- a/test/test-execute/exec-user.service +++ b/test/test-execute/exec-user.service @@ -1,7 +1,7 @@ [Unit] -Description=Test for User +Description=Test for User (daemon) [Service] -ExecStart=/bin/sh -x -c 'test "$$USER" = "nobody"' +ExecStart=/bin/sh -x -c 'test "$$USER" = "daemon"' Type=oneshot -User=nobody +User=daemon diff --git a/test/test-functions b/test/test-functions index 018bdca88..17e83ccf3 100644 --- a/test/test-functions +++ b/test/test-functions @@ -313,8 +313,9 @@ install_dmevent() { inst_libdir_file "libdevmapper-event.so*" if [[ "$LOOKS_LIKE_DEBIAN" ]]; then # dmsetup installs 55-dm and 60-persistent-storage-dm on Debian/Ubuntu - # see https://anonscm.debian.org/cgit/pkg-lvm/lvm2.git/tree/debian/patches/0007-udev.patch - inst_rules 55-dm.rules 60-persistent-storage-dm.rules + # and since buster/bionic 95-dm-notify.rules + # see https://gitlab.com/debian-lvm/lvm2/blob/master/debian/patches/udev.patch + inst_rules 55-dm.rules 60-persistent-storage-dm.rules 95-dm-notify.rules else inst_rules 10-dm.rules 13-dm-disk.rules 95-dm-notify.rules fi @@ -1057,6 +1058,7 @@ inst_rules() { fi done [[ $_found ]] || dinfo "Skipping udev rule: $_rule" + _found= done } @@ -1381,8 +1383,8 @@ inst_libdir_file() { } setup_suse() { - ln -s ../usr/bin/systemctl $initdir/bin/systemctl - ln -s ../usr/lib/systemd $initdir/lib/systemd + ln -fs ../usr/bin/systemctl $initdir/bin/ + ln -fs ../usr/lib/systemd $initdir/lib/ inst_simple "/usr/lib/systemd/system/haveged.service" } diff --git a/test/udev-test.pl b/test/udev-test.pl index 20f662eb3..9e7cc9463 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -606,9 +606,9 @@ EOF desc => "textual user id", devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda", exp_name => "node", - exp_perms => "nobody::0600", + exp_perms => "daemon::0600", rules => <20-acpi-vendor.hwdb.base patch -p0 -o- 20-acpi-vendor.hwdb.base <20-acpi-vendor.hwdb.patch >20-acpi-vendor.hwdb ! diff -u 20-acpi-vendor.hwdb.base 20-acpi-vendor.hwdb >20-acpi-vendor.hwdb.patch diff --git a/units/meson.build b/units/meson.build index 814ee7885..7f4046419 100644 --- a/units/meson.build +++ b/units/meson.build @@ -91,7 +91,6 @@ units = [ ['sysinit.target', ''], ['syslog.socket', ''], ['system-update.target', ''], - ['system.slice', ''], ['systemd-ask-password-console.path', '', 'sysinit.target.wants/'], ['systemd-ask-password-wall.path', '', diff --git a/units/system-update-cleanup.service.in b/units/system-update-cleanup.service.in index 51399f1c0..84d16f608 100644 --- a/units/system-update-cleanup.service.in +++ b/units/system-update-cleanup.service.in @@ -32,4 +32,4 @@ ConditionPathIsSymbolicLink=|/system-update [Service] Type=oneshot ExecStart=/bin/rm -fv /system-update -ExecStart=@SYSTEMCTL@ reboot +SuccessAction=reboot diff --git a/units/system.slice b/units/system.slice deleted file mode 100644 index a4d5edfae..000000000 --- a/units/system.slice +++ /dev/null @@ -1,14 +0,0 @@ -# SPDX-License-Identifier: LGPL-2.1+ -# -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. - -[Unit] -Description=System Slice -Documentation=man:systemd.special(7) -DefaultDependencies=no -Before=slices.target diff --git a/units/user@.service.in b/units/user@.service.in index e8195acbb..372ffa56d 100644 --- a/units/user@.service.in +++ b/units/user@.service.in @@ -18,6 +18,6 @@ Type=notify ExecStart=-@rootlibexecdir@/systemd --user Slice=user-%i.slice KillMode=mixed -Delegate=pids cpu +Delegate=pids memory TasksMax=infinity TimeoutStopSec=120s diff --git a/zanata.xml b/zanata.xml new file mode 100644 index 000000000..02fe72f1c --- /dev/null +++ b/zanata.xml @@ -0,0 +1,9 @@ + + + https://fedora.zanata.org/ + systemd + master + gettext + po + po +