mirror of
https://github.com/systemd/systemd
synced 2026-03-14 09:04:47 +01:00
Compare commits
30 Commits
fd7d8bf105
...
84e492cdba
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
84e492cdba | ||
|
|
00473ac804 | ||
|
|
3d396b2837 | ||
|
|
d8c1422439 | ||
|
|
d6eaee6e74 | ||
|
|
5971630cf6 | ||
|
|
f0373df1a7 | ||
|
|
c191e09230 | ||
|
|
52a89a5f08 | ||
|
|
3e2d0c6ab2 | ||
|
|
e17c95af8e | ||
|
|
7ecb052fb3 | ||
|
|
3968ccd0cd | ||
|
|
07b3075fad | ||
|
|
a687f50009 | ||
|
|
d762abece9 | ||
|
|
cc87b3f68f | ||
|
|
ecd64ffafd | ||
|
|
e51d5b9c8a | ||
|
|
002f6e92af | ||
|
|
fae95d9ff5 | ||
|
|
70fb7e5da5 | ||
|
|
78eb99c496 | ||
|
|
cc447b33f6 | ||
|
|
a9c6f9b8a6 | ||
|
|
5d66d89c42 | ||
|
|
c9816a9ac4 | ||
|
|
73ce91a05a | ||
|
|
6a3fff75ba | ||
|
|
2d94502724 |
1
.github/workflows/build_test.sh
vendored
1
.github/workflows/build_test.sh
vendored
@ -13,6 +13,7 @@ ARGS=(
|
||||
"--optimization=3 -Db_lto=true"
|
||||
"--optimization=3 -Db_lto=false"
|
||||
"--optimization=3 -Ddns-over-tls=openssl"
|
||||
"--optimization=3 -Dfexecve=true -Dstandalone-binaries=true -Dstatic-libsystemd=true -Dstatic-libudev=true"
|
||||
"-Db_ndebug=true"
|
||||
)
|
||||
PACKAGES=(
|
||||
|
||||
@ -59,14 +59,14 @@ The "portable service" concept ultimately will not provide a fully isolated
|
||||
environment to the payload, like containers mostly intend to. Instead they are
|
||||
from the beginning more alike regular system services, can be controlled with
|
||||
the same tools, are exposed the same way in all infrastructure and so on. Their
|
||||
main difference is that the use a different root directory than the rest of the
|
||||
main difference is that they use a different root directory than the rest of the
|
||||
system. Hence, the intention is not to run code in a different, isolated world
|
||||
from the host — like most containers would do it —, but to run it in the same
|
||||
from the host — like most containers would do it — but to run it in the same
|
||||
world, but with stricter access controls on what the service can see and do.
|
||||
|
||||
As one point of differentiation: as programs run as "portable services" are
|
||||
pretty much regular system services, they won't run as PID 1 (like Docker would
|
||||
do it), but as normal process. A corollary of that is that they aren't supposed
|
||||
do it), but as normal processes. A corollary of that is that they aren't supposed
|
||||
to manage anything in their own environment (such as the network) as the
|
||||
execution environment is mostly shared with the rest of the system.
|
||||
|
||||
@ -77,12 +77,12 @@ focus includes system extensions otherwise sometimes called "super-privileged
|
||||
containers".
|
||||
|
||||
Note that portable services are only available for system services, not for
|
||||
user services. i.e. the functionality cannot be used for the stuff
|
||||
bubblewrap/flatpak is focusing on.
|
||||
user services (i.e. the functionality cannot be used for the stuff
|
||||
bubblewrap/flatpak is focusing on).
|
||||
|
||||
## Mode of Operation
|
||||
|
||||
If you have portable service image, maybe in a raw disk image called
|
||||
If you have a portable service image, maybe in a raw disk image called
|
||||
`foobar_0.7.23.raw`, then attaching the services to the host is as easy as:
|
||||
|
||||
```
|
||||
@ -135,7 +135,7 @@ This command does the following:
|
||||
|
||||
And that's already it.
|
||||
|
||||
Note that the images need to stay around (and the same location) as long as the
|
||||
Note that the images need to stay around (and in the same location) as long as the
|
||||
portable service is attached. If an image is moved, the `RootImage=` line
|
||||
written to the unit drop-in would point to an non-existing place, and break the
|
||||
logic.
|
||||
@ -144,7 +144,7 @@ The `portablectl detach` command executes the reverse operation: it looks for
|
||||
the drop-ins and the unit files associated with the image, and removes them
|
||||
again.
|
||||
|
||||
Note that `portable attach` won't enable or start any of the units it copies
|
||||
Note that `portablectl attach` won't enable or start any of the units it copies
|
||||
out. This still has to take place in a second, separate step. (That said We
|
||||
might add options to do this automatically later on.).
|
||||
|
||||
@ -223,7 +223,7 @@ read-only, immutable images (e.g. squashfs images) all files and directories to
|
||||
over-mount must exist already.
|
||||
|
||||
Note that as no new image format or metadata is defined, it's very
|
||||
straight-forward to define images than can be made use of it a number of
|
||||
straightforward to define images than can be made use of in a number of
|
||||
different ways. For example, by using `mkosi -b` you can trivially build a
|
||||
single, unified image that:
|
||||
|
||||
|
||||
@ -505,8 +505,7 @@ sensor:modalias:acpi:BMA250E*:dmi:bvnLENOVO:*:pvrLenovoMIIX3-1030:*
|
||||
sensor:modalias:acpi:SMO8500*:dmi:bvnLENOVO:*:pvrLenovoMIIX3-830:*
|
||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
||||
|
||||
# IdeaPad D330 and D330-10IGM
|
||||
sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:pn81H3:*
|
||||
# IdeaPad D330-10IGM (both 81H3 and 81MD product numbers)
|
||||
sensor:modalias:acpi:BOSC0200*:dmi:*:svnLENOVO:*:cvrLenovoideapadD330-10IGM:*
|
||||
ACCEL_MOUNT_MATRIX=0, 1, 0; -1, 0, 0; 0, 0, 1
|
||||
|
||||
|
||||
@ -37,6 +37,77 @@
|
||||
# Additionally, ID_VENDOR_FROM_DATABASE and ID_MODEL_FROM_DATABASE environment variables are
|
||||
# preferable.
|
||||
|
||||
#
|
||||
# General entry for AV/C device compliant to AV/C command set generic specification:
|
||||
# * Configuration ROM for AV/C Devices 1.0 (Dec. 12, 2000, 1394 Trading Association, TA Document
|
||||
# 1999027)
|
||||
#
|
||||
|
||||
# Just for backward compatibility. Please invalidate IEEE1394_UNIT_FUNCTION_VIDEO by adding entries
|
||||
# if it is inconvenient.
|
||||
ieee1394:node:ven*mo*units*0x00a02d:0x010001*
|
||||
ieee1394:ven*mo*sp0000A02Dver00010001
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# General entries for AV/C device with vendor unique command set:
|
||||
# * IEC 61883-1:1998
|
||||
#
|
||||
|
||||
# Please invalidate IEEE1394_UNIT_FUNCTION_VIDEO by adding entries if it is inconvenient.
|
||||
ieee1394:node:ven*mo*units*0x00a02d:0x014000*
|
||||
ieee1394:ven*mo*sp0000A02Dver00014000
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
# Just for backward compatibility. Please invalidate IEEE1394_UNIT_FUNCTION_VIDEO by adding entries
|
||||
# if it is inconvenient.
|
||||
ieee1394:node:ven*mo*units*0x00a02d:0x014001*
|
||||
ieee1394:ven*mo*sp0000A02Dver00014001
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# General entry for:
|
||||
# * 1394-based Digital Camera Specification Version 1.04 (Aug. 9, 1996, 1394 Trading Association)
|
||||
#
|
||||
|
||||
ieee1394:node:ven*units0x00a02d:0x000100
|
||||
ieee1394:ven*sp0000A02Dver00000100
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# General entry for:
|
||||
# * 1394-based Digital Camera Specification Version 1.20 (Jul. 23, 1998, 1394 Trading Association)
|
||||
#
|
||||
|
||||
ieee1394:node:ven*units0x00a02d:0x000101
|
||||
ieee1394:ven*sp0000A02Dver00000101
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# General entry for:
|
||||
# * IIDC Digital Camera Control Specification Ver.1.30 (Jul. 25, 2000, 1394 Trading Association)
|
||||
# * IIDC Digital Camera Control Specification Ver.1.31 (Feb. 2, 2004, 1394 Trading Association, TA
|
||||
# Document 2003017)
|
||||
# * IIDC Digital Camera Control Specification Ver.1.32 (Jul. 24, 2008, 1394 Trading Association,
|
||||
# Document number 2007009)
|
||||
#
|
||||
|
||||
ieee1394:node:ven*units0x00a02d:0x000102
|
||||
ieee1394:ven*sp0000A02Dver00000102
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# General entry for:
|
||||
# * IIDC2 Digital Camera Control Specification Ver.1.0.0 (Jan 26th, 2012, 1394 Trading Association,
|
||||
# TS2011001)
|
||||
# * IIDC2 Digital Camera Control Specification Ver.1.1.0 (May 19th, 2015, 1394 Trading Association,
|
||||
# TS2015001)
|
||||
#
|
||||
|
||||
ieee1394:node:ven*units0x00a02d:0x000110
|
||||
ieee1394:ven*sp0000A02Dver00000110
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# BridgeCo. Enhancement BreakOut Box (BeBoB) for DM1000, DM1100, and DM1500 ASICs.
|
||||
#
|
||||
@ -47,6 +118,7 @@ ieee1394:ven00000AACmo00000002sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Acoustic Reality
|
||||
ID_MODEL_FROM_DATABASE=eAR FireWire Audio
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x0003dbmo0x01eeeeunits0x00a02d:0x010001
|
||||
ieee1394:ven000003DBmo0001EEEEsp0000A02Dver00010001
|
||||
@ -54,6 +126,7 @@ ieee1394:ven000003DBmo0001EEEEsp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=Ensemble FireWire
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# An extension card for Rosetta 200, Rosetta 800, AD16X, DA16X, DD16X, and BigBen.
|
||||
ieee1394:node:ven0x0003dbmo0x010048units0x00a02d:0x010001
|
||||
@ -62,6 +135,7 @@ ieee1394:ven000003DBmo00010048sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=X-FireWire Card
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001564mo0x000610units0x00a02d:0x010001
|
||||
ieee1394:ven00001564mo00000610sp0000A02Dver00010001
|
||||
@ -69,6 +143,7 @@ ieee1394:ven00001564mo00000610sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=F-Control Audio 610
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001564mo0x001616units0x00a02d:0x010001
|
||||
ieee1394:ven00001564mo00001616sp0000A02Dver00010001
|
||||
@ -76,18 +151,21 @@ ieee1394:ven00001564mo00001616sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=F-Control Audio 1616
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001564mo0x001204units0x00a02d:0x010001
|
||||
ieee1394:ven00001564mo00001204sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Behringer
|
||||
ID_MODEL_FROM_DATABASE=XENYX UFX1204
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001564mo0x001604units0x00a02d:0x010001
|
||||
ieee1394:ven00001564mo00001604sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Behringer
|
||||
ID_MODEL_FROM_DATABASE=XENYX UFX1604
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# An extension card for Behringer X32.
|
||||
ieee1394:node:ven0x001564mo0x000006units0x00a02d:0x010001
|
||||
@ -96,12 +174,14 @@ ieee1394:ven00001564mo00000006sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=X-UF
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00000amo0x030000units0x00a02d:0x010001
|
||||
ieee1394:ven0000000Amo00030000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=CME
|
||||
ID_MODEL_FROM_DATABASE=Matrix K FW
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00a07emo0x0000a9units0x00a02d:0x014001
|
||||
ieee1394:ven0000A07Emo000000A9sp0000A02Dver00014001
|
||||
@ -109,6 +189,7 @@ ieee1394:ven0000A07Emo000000A9sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=Mbox 2 Pro
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x0040abmo0x010048units0x00a02d:0x010001
|
||||
ieee1394:ven000040ABmo00010048sp0000A02Dver00010001
|
||||
@ -116,6 +197,7 @@ ieee1394:ven000040ABmo00010048sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FA-101
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x0040abmo0x010049units0x00a02d:0x010001
|
||||
ieee1394:ven000040ABmo00010049sp0000A02Dver00010001
|
||||
@ -123,6 +205,7 @@ ieee1394:ven000040ABmo00010049sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FA-66
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# The value of model field differs depending on firmware.
|
||||
ieee1394:node:ven0x000f1bmo0x010064units0x00a02d:0x010001
|
||||
@ -133,6 +216,7 @@ ieee1394:ven00000F1Bmo00000210sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=QuataFire
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to Saffire and Saffire LE.
|
||||
ieee1394:node:ven0x00130emo0x000000units0x00a02d:0x010001
|
||||
@ -141,6 +225,7 @@ ieee1394:ven0000130Emo00000000sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=Saffire
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00130emo0x000006units0x00a02d:0x010001
|
||||
ieee1394:ven0000130Emo00000006sp0000A02Dver00010001
|
||||
@ -148,6 +233,7 @@ ieee1394:ven0000130Emo00000006sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=Saffire Pro 10 i/o
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00130emo0x000003units0x00a02d:0x010001
|
||||
ieee1394:ven0000130Emo00000003sp0000A02Dver00010001
|
||||
@ -155,6 +241,7 @@ ieee1394:ven0000130Emo00000003sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=Saffire Pro 26 i/o
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x01a9eemo0x000001units0x00a02d:0x010001
|
||||
ieee1394:ven0001A9EEmo00000001sp0000A02Dver00010001
|
||||
@ -162,6 +249,7 @@ ieee1394:ven0001A9EEmo00000001sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FireXon
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x010071units0x00a02d:0x014001
|
||||
ieee1394:ven00000D6Cmo00010071sp0000A02Dver00014001
|
||||
@ -169,6 +257,7 @@ ieee1394:ven00000D6Cmo00010071sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=FW 1814
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Vendor is BridgeCo Co AG but M-Audio.
|
||||
ieee1394:node:ven0x0007f5mo0x010046units0x00a02d:0x014001
|
||||
@ -177,6 +266,7 @@ ieee1394:ven000007F5mo00010046sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=FW 410
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x010060units0x00a02d:0x014001
|
||||
ieee1394:ven00000D6Cmo00010060sp0000A02Dver00014001
|
||||
@ -184,18 +274,21 @@ ieee1394:ven00000D6Cmo00010060sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=FW Audiophile
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x010062units0x00a02d:0x010001
|
||||
ieee1394:ven00000D6Cmo00010062sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=M-Audio
|
||||
ID_MODEL_FROM_DATABASE=FW Solo
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x010081units0x00a02d:0x010001
|
||||
ieee1394:ven00000D6Cmo00010081sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=M-Audio
|
||||
ID_MODEL_FROM_DATABASE=NRV10
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x00000aunits0x00a02d:0x014001
|
||||
ieee1394:ven00000D6Cmo0000000Asp0000A02Dver00014001
|
||||
@ -203,6 +296,7 @@ ieee1394:ven00000D6Cmo0000000Asp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=Ozonic
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x0100a1units0x00a02d:0x014001
|
||||
ieee1394:ven00000D6Cmo000100A1sp0000A02Dver00014001
|
||||
@ -210,6 +304,7 @@ ieee1394:ven00000D6Cmo000100A1sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=ProFire Lightbridge
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000d6cmo0x010091units0x00a02d:0x014001
|
||||
ieee1394:ven00000D6Cmo00010091sp0000A02Dver00014001
|
||||
@ -217,6 +312,7 @@ ieee1394:ven00000D6Cmo00010091sp0000A02Dver00014001
|
||||
ID_MODEL_FROM_DATABASE=ProjectMix I/O
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# An extension card for Mackie Onyx 1220, 1620, and 1640.
|
||||
ieee1394:node:ven0x000ff2mo0x010065units0x00a02d:0x010001
|
||||
@ -224,6 +320,7 @@ ieee1394:ven00000FF2mo00010065sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Mackie Onyx FireWire
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# An extension card for Mackie d.2.
|
||||
ieee1394:node:ven0x000ff2mo0x010067units0x00a02d:0x010001
|
||||
@ -231,6 +328,7 @@ ieee1394:ven00000FF2mo00010067sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Mackie DJ Mixer
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to FireFly 202, 302, 808, and 808 Universal.
|
||||
# Match to HelixBoard 12 mk II, 18 mk II, 24 mk II, 12 Universal, 18 Universal, and 24 Universal.
|
||||
@ -240,6 +338,7 @@ ieee1394:ven00001496mo00000000sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FireFly/Helixboard
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000a92mo0x010000units0x00a02d:0x010001
|
||||
ieee1394:ven00000A92mo00010000sp0000A02Dver00010001
|
||||
@ -247,18 +346,21 @@ ieee1394:ven00000A92mo00010000sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FireBox
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000a92mo0x010001units0x00a02d:0x010001
|
||||
ieee1394:ven00000A92mo00010001sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=PreSonus
|
||||
ID_MODEL_FROM_DATABASE=Inspire 1394
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001198mo0x010048units0x00a02d:0x010001
|
||||
ieee1394:ven00001198mo00010048sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Prism Media Products
|
||||
ID_MODEL_FROM_DATABASE=Orpheus
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000a92mo0x010066units0x00a02d:0x010001
|
||||
ieee1394:ven00000A92mo00010066sp0000A02Dver00010001
|
||||
@ -266,6 +368,7 @@ ieee1394:ven00000A92mo00010066sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=PreSonus FP10
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001260mo0x000001units0x00a02d:0x010001
|
||||
ieee1394:ven00001260mo00000001sp0000A02Dver00010001
|
||||
@ -273,6 +376,7 @@ ieee1394:ven00001260mo00000001sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=ScratchAmp
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x010065mo0x010067units0x00a02d:0x010001
|
||||
ieee1394:ven00010065mo00010067sp0000A02Dver00010001
|
||||
@ -280,6 +384,7 @@ ieee1394:ven00010065mo00010067sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=IF-FW/DM
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000aacmo0x000003units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000003sp0000A02Dver00010001
|
||||
@ -287,6 +392,7 @@ ieee1394:ven00000AACmo00000003sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=PHASE 88 FW
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000aacmo0x000004units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000004sp0000A02Dver00010001
|
||||
@ -294,6 +400,7 @@ ieee1394:ven00000AACmo00000004sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=PHASE 24 FW
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000aacmo0x000007units0x00a02d:0x010001
|
||||
ieee1394:ven00000AACmo00000007sp0000A02Dver00010001
|
||||
@ -301,6 +408,7 @@ ieee1394:ven00000AACmo00000007sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=PHASE X24 FW
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x002327mo0x020002units0x00a02d:0x010001
|
||||
ieee1394:ven00002327mo00020002sp0000A02Dver00010001
|
||||
@ -308,6 +416,7 @@ ieee1394:ven00002327mo00020002sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FW66
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00a0demo0x10000bunits0x00a02d:0x010001
|
||||
ieee1394:ven0000A0DEmo0010000Bsp0000A02Dver00010001
|
||||
@ -315,6 +424,7 @@ ieee1394:ven0000A0DEmo0010000Bsp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=GO44
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00a0demo0x10000cunits0x00a02d:0x010001
|
||||
ieee1394:ven0000A0DEmo0010000Csp0000A02Dver00010001
|
||||
@ -322,6 +432,7 @@ ieee1394:ven0000A0DEmo0010000Csp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=GO46
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
#
|
||||
# Fireworks board module.
|
||||
@ -403,24 +514,28 @@ ieee1394:ven000003DBmo0001DDDDsp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Apogee Electronics
|
||||
ID_MODEL_FROM_DATABASE=Duet FireWire
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001564mo0x00fc22units0x00a02d:0x010001
|
||||
ieee1394:ven00001564mo0000FC22sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Behringer
|
||||
ID_MODEL_FROM_DATABASE=F-Control Audio 202
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001292mo0x00f970units0x00a02d:0x010001
|
||||
ieee1394:ven00001292mo0000F970sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Griffin Technology
|
||||
ID_MODEL_FROM_DATABASE=Griffin FireWave
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00d04bmo0x00f970units0x00a02d:0x010001
|
||||
ieee1394:ven0000D04Bmo0000F970sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=LaCie
|
||||
ID_MODEL_FROM_DATABASE=LaCie FireWire Speakers
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to former models of Onyx 820i, 1220i, and 1620i.
|
||||
ieee1394:node:ven0x000ff2mo0x081216units0x00a02d:0x010001
|
||||
@ -428,24 +543,28 @@ ieee1394:ven00000FF2mo00081216sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Mackie Onyx-i series
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000ff2mo0x001640units0x00a02d:0x010001
|
||||
ieee1394:ven00000FF2mo00001640sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Mackie Onyx 1640i
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000ff2mo0x00200funits0x00a02d:0x010001
|
||||
ieee1394:ven00000FF2mo0000200Fsp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Mackie Onyx Satellite
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x000ff2mo0x000460units0x00a02d:0x010001
|
||||
ieee1394:ven00000FF2mo00000460sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Loud Technologies
|
||||
ID_MODEL_FROM_DATABASE=Tapco LINK.firewire 4x6
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001260mo0x002000units0x00a02d:0x010001
|
||||
ieee1394:ven00001260mo00002000sp0000A02Dver00010001
|
||||
@ -453,12 +572,14 @@ ieee1394:ven00001260mo00002000sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=SCS.1d
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x001260mo0x001000units0x00a02d:0x010001
|
||||
ieee1394:ven00001260mo00001000sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Stanton Magnetics
|
||||
ID_MODEL_FROM_DATABASE=SCS.1m
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
ieee1394:node:ven0x00022emo0x800007units0x00a02d:0x010001
|
||||
ieee1394:ven0000022Emo00800007sp0000A02Dver00010001
|
||||
@ -466,6 +587,7 @@ ieee1394:ven0000022Emo00800007sp0000A02Dver00010001
|
||||
ID_MODEL_FROM_DATABASE=FireOne
|
||||
IEEE1394_UNIT_FUNCTION_MIDI=1
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
#
|
||||
# TC Applied Technologies. Digital Interface Communication Engine (DICE).
|
||||
@ -1061,6 +1183,7 @@ ieee1394:ven00000166mo00000002sp0000A02Dver00014000
|
||||
ID_VENDOR_FROM_DATABASE=TC Electronic
|
||||
ID_MODEL_FROM_DATABASE=PowerCore Compact
|
||||
IEEE1394_UNIT_FUNCTION_AUDIO=1
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=0
|
||||
|
||||
# Match to Adrenaline, Mojo, and V10.
|
||||
ieee1394:node:ven0x00a07eunits0x00a02d:0x014001
|
||||
@ -1071,13 +1194,71 @@ ieee1394:ven0000A07Emo00000001sp0000A02Dver00014001
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# Node with single unit for video function.
|
||||
# Point Grey cameras.
|
||||
#
|
||||
|
||||
ieee1394:node:ven0x0002f0units0x00a02d:0x000100
|
||||
ieee1394:ven000002F0mo00000000sp0000A02Dver00000100
|
||||
ID_VENDOR_FROM_DATABASE=Cool Stream
|
||||
ID_MODEL_FROM_DATABASE=iSweet
|
||||
# IIDC v1.04 compatible.
|
||||
ieee1394:node:ven0x00b09dmo*units0x00b09d:0x000100
|
||||
ieee1394:ven0000B09Dmo*spec0000B09Dver00000100
|
||||
ID_VENDOR_FROM_DATABASE=Point Grey Research
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
# IIDC v1.20 compatible.
|
||||
ieee1394:node:ven0x00b09dmo*units0x00b09d:0x000101
|
||||
ieee1394:ven0000B09Dmo*spec0000B09Dver00000101
|
||||
ID_VENDOR_FROM_DATABASE=Point Grey Research
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
# IIDC v1.30/v1.31/v1.32 compatible.
|
||||
ieee1394:node:ven0x00b09dmo*units0x00b09d:0x000102
|
||||
ieee1394:ven0000B09Dmo*spec0000B09Dver00000102
|
||||
ID_VENDOR_FROM_DATABASE=Point Grey Research
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
# Unique protocol.
|
||||
ieee1394:node:ven0x00b09dmo*units0x00b09d:0x000114
|
||||
ieee1394:ven0000B09Dmo*spec0000B09Dver00000114
|
||||
ID_VENDOR_FROM_DATABASE=Point Grey Research
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
# Digital Everywhere FloppyDTV and FireDtv series.
|
||||
#
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000024units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000024sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FloppyDTV S/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000025units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000025sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FloppyDTV T/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000026units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000026sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FloppyDTV C/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000034units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000034sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FireDTV S/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000035units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000035sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FireDTV T/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
ieee1394:node:ven0x001287mo0x000036units0x00a02d:0x010001
|
||||
ieee1394:ven00001287mo00000036sp0000A02Dver00010001
|
||||
ID_VENDOR_FROM_DATABASE=Digital Everywhere
|
||||
ID_MODEL_FROM_DATABASE=FireDTV C/CI
|
||||
IEEE1394_UNIT_FUNCTION_VIDEO=1
|
||||
|
||||
#
|
||||
|
||||
@ -301,7 +301,7 @@ def print_summary(fname, groups):
|
||||
error('{}: no matches or props'.format(fname))
|
||||
|
||||
if __name__ == '__main__':
|
||||
args = sys.argv[1:] or sorted(glob.glob(os.path.dirname(sys.argv[0]) + '/[67][0-9]-*.hwdb'))
|
||||
args = sys.argv[1:] or sorted(glob.glob(os.path.dirname(sys.argv[0]) + '/[678][0-9]-*.hwdb'))
|
||||
|
||||
for fname in args:
|
||||
groups = parse(fname)
|
||||
|
||||
@ -237,6 +237,19 @@
|
||||
cannot be written. Currently only applies to random seed operations.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><option>--make-machine-id-directory=yes|no|auto</option></term>
|
||||
<listitem><para>Control creation and deletion of <literal>$ESP/$MACHINE_ID</literal> during
|
||||
<option>install</option> and <option>remove</option>, respectively.
|
||||
<literal>auto</literal> is equivalent to to <literal>yes</literal> if <literal>/etc/machine-id</literal>
|
||||
resides on a filesystem other than tmpfs and <literal>no</literal> otherwise.
|
||||
Defaults to <literal>auto</literal>.</para>
|
||||
|
||||
<para>Overriding this may be desired to hide the machine ID from the (unencrypted) ESP,
|
||||
configure a <citerefentry><refentrytitle>kernel-install</refentrytitle><manvolnum>8</manvolnum></citerefentry> script, or,
|
||||
conversely, commit a machine-id that only appears transient.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<xi:include href="standard-options.xml" xpointer="no-pager"/>
|
||||
<xi:include href="standard-options.xml" xpointer="help"/>
|
||||
<xi:include href="standard-options.xml" xpointer="version"/>
|
||||
|
||||
@ -722,7 +722,7 @@ if time_epoch == -1
|
||||
if time_epoch == '' and git.found() and run_command('test', '-e', '.git').returncode() == 0
|
||||
# If we're in a git repository, use the creation time of the latest git tag.
|
||||
latest_tag = run_command('git', 'describe', '--abbrev=0', '--tags').stdout().strip()
|
||||
time_epoch = run_command('git', 'log', '-1', '--format=%at', latest_tag).stdout()
|
||||
time_epoch = run_command('git', 'log', '--no-show-signature', '-1', '--format=%at', latest_tag).stdout()
|
||||
endif
|
||||
if time_epoch == ''
|
||||
NEWS = files('NEWS')
|
||||
|
||||
@ -49,11 +49,6 @@ SUBSYSTEM=="sound", GROUP="audio", \
|
||||
|
||||
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0664"
|
||||
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", GROUP="video"
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", GROUP="video"
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", GROUP="video"
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", GROUP="video"
|
||||
|
||||
SUBSYSTEM=="firewire", TEST=="units", TEST=="model", \
|
||||
IMPORT{builtin}="hwdb 'ieee1394:node:ven$attr{vendor}mo$attr{model}units$attr{units}'"
|
||||
|
||||
|
||||
@ -1431,10 +1431,9 @@ int log_syntax_invalid_utf8_internal(
|
||||
if (rvalue)
|
||||
p = utf8_escape_invalid(rvalue);
|
||||
|
||||
log_syntax_internal(unit, level, config_file, config_line, 0, file, line, func,
|
||||
return log_syntax_internal(unit, level, config_file, config_line,
|
||||
SYNTHETIC_ERRNO(EINVAL), file, line, func,
|
||||
"String is not UTF-8 clean, ignoring assignment: %s", strna(p));
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
void log_set_upgrade_syslog_to_journal(bool b) {
|
||||
|
||||
@ -1278,8 +1278,8 @@ int get_timezones(char ***ret) {
|
||||
f = fopen("/usr/share/zoneinfo/zone1970.tab", "re");
|
||||
if (f) {
|
||||
for (;;) {
|
||||
_cleanup_free_ char *line = NULL;
|
||||
char *p, *w;
|
||||
_cleanup_free_ char *line = NULL, *w = NULL;
|
||||
char *p;
|
||||
size_t k;
|
||||
|
||||
r = read_line(f, LONG_LINE_MAX, &line);
|
||||
@ -1310,12 +1310,10 @@ int get_timezones(char ***ret) {
|
||||
if (!w)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!GREEDY_REALLOC(zones, n_allocated, n_zones + 2)) {
|
||||
free(w);
|
||||
if (!GREEDY_REALLOC(zones, n_allocated, n_zones + 2))
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
zones[n_zones++] = w;
|
||||
zones[n_zones++] = TAKE_PTR(w);
|
||||
zones[n_zones] = NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -72,7 +72,7 @@ int unit_validate_alias_symlink_and_warn(const char *filename, const char *targe
|
||||
const char *src, *dst;
|
||||
_cleanup_free_ char *src_instance = NULL, *dst_instance = NULL;
|
||||
UnitType src_unit_type, dst_unit_type;
|
||||
int src_name_type, dst_name_type;
|
||||
UnitNameFlags src_name_type, dst_name_type;
|
||||
|
||||
/* Check if the *alias* symlink is valid. This applies to symlinks like
|
||||
* /etc/systemd/system/dbus.service → dbus-broker.service, but not to .wants or .requires symlinks
|
||||
|
||||
@ -139,7 +139,7 @@ int unit_name_to_prefix(const char *n, char **ret) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int unit_name_to_instance(const char *n, char **ret) {
|
||||
UnitNameFlags unit_name_to_instance(const char *n, char **ret) {
|
||||
const char *p, *d;
|
||||
|
||||
assert(n);
|
||||
|
||||
@ -22,8 +22,8 @@ bool unit_instance_is_valid(const char *i) _pure_;
|
||||
bool unit_suffix_is_valid(const char *s) _pure_;
|
||||
|
||||
int unit_name_to_prefix(const char *n, char **ret);
|
||||
int unit_name_to_instance(const char *n, char **ret);
|
||||
static inline int unit_name_classify(const char *n) {
|
||||
UnitNameFlags unit_name_to_instance(const char *n, char **ret);
|
||||
static inline UnitNameFlags unit_name_classify(const char *n) {
|
||||
return unit_name_to_instance(n, NULL);
|
||||
}
|
||||
int unit_name_to_prefix_and_instance(const char *n, char **ret);
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
#include "main-func.h"
|
||||
#include "mkdir.h"
|
||||
#include "pager.h"
|
||||
#include "parse-argument.h"
|
||||
#include "parse-util.h"
|
||||
#include "pretty-print.h"
|
||||
#include "random-util.h"
|
||||
@ -52,6 +53,7 @@ static bool arg_print_dollar_boot_path = false;
|
||||
static bool arg_touch_variables = true;
|
||||
static PagerFlags arg_pager_flags = 0;
|
||||
static bool arg_graceful = false;
|
||||
static int arg_make_machine_id_directory = -1;
|
||||
|
||||
STATIC_DESTRUCTOR_REGISTER(arg_esp_path, freep);
|
||||
STATIC_DESTRUCTOR_REGISTER(arg_xbootldr_path, freep);
|
||||
@ -112,6 +114,19 @@ static int acquire_xbootldr(bool unprivileged_mode, sd_id128_t *ret_uuid) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void settle_make_machine_id_directory(void) {
|
||||
int r;
|
||||
|
||||
if (arg_make_machine_id_directory >= 0)
|
||||
return;
|
||||
|
||||
r = path_is_temporary_fs("/etc/machine-id");
|
||||
if (r < 0)
|
||||
log_debug_errno(r, "Couldn't determine whether /etc/machine-id is on a temporary file system, assuming so.");
|
||||
|
||||
arg_make_machine_id_directory = r == 0;
|
||||
}
|
||||
|
||||
/* search for "#### LoaderInfo: systemd-boot 218 ####" string inside the binary */
|
||||
static int get_file_version(int fd, char **v) {
|
||||
struct stat st;
|
||||
@ -888,6 +903,24 @@ static int remove_subdirs(const char *root, const char *const *subdirs) {
|
||||
return r < 0 ? r : q;
|
||||
}
|
||||
|
||||
static int remove_machine_id_directory(const char *root) {
|
||||
sd_id128_t machine_id;
|
||||
char buf[SD_ID128_STRING_MAX];
|
||||
int r;
|
||||
|
||||
assert(root);
|
||||
assert(arg_make_machine_id_directory >= 0);
|
||||
|
||||
if (!arg_make_machine_id_directory)
|
||||
return 0;
|
||||
|
||||
r = sd_id128_get_machine(&machine_id);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get machine id: %m");
|
||||
|
||||
return rmdir_one(root, sd_id128_to_string(machine_id, buf));
|
||||
}
|
||||
|
||||
static int remove_binaries(const char *esp_path) {
|
||||
const char *p;
|
||||
int r, q;
|
||||
@ -974,9 +1007,13 @@ static int install_loader_config(const char *esp_path) {
|
||||
_cleanup_(unlink_and_freep) char *t = NULL;
|
||||
_cleanup_fclose_ FILE *f = NULL;
|
||||
_cleanup_close_ int fd = -1;
|
||||
sd_id128_t machine_id;
|
||||
char machine_string[SD_ID128_STRING_MAX];
|
||||
const char *p;
|
||||
int r;
|
||||
|
||||
assert(arg_make_machine_id_directory >= 0);
|
||||
|
||||
p = prefix_roota(esp_path, "/loader/loader.conf");
|
||||
if (access(p, F_OK) >= 0) /* Silently skip creation if the file already exists (early check) */
|
||||
return 0;
|
||||
@ -991,6 +1028,13 @@ static int install_loader_config(const char *esp_path) {
|
||||
|
||||
fprintf(f, "#timeout 3\n"
|
||||
"#console-mode keep\n");
|
||||
if (arg_make_machine_id_directory) {
|
||||
r = sd_id128_get_machine(&machine_id);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get machine id: %m");
|
||||
|
||||
fprintf(f, "default %s-*\n", sd_id128_to_string(machine_id, machine_string));
|
||||
}
|
||||
|
||||
r = fflush_sync_and_check(f);
|
||||
if (r < 0)
|
||||
@ -1006,6 +1050,24 @@ static int install_loader_config(const char *esp_path) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int install_machine_id_directory(const char *root) {
|
||||
sd_id128_t machine_id;
|
||||
char buf[SD_ID128_STRING_MAX];
|
||||
int r;
|
||||
|
||||
assert(root);
|
||||
assert(arg_make_machine_id_directory >= 0);
|
||||
|
||||
if (!arg_make_machine_id_directory)
|
||||
return 0;
|
||||
|
||||
r = sd_id128_get_machine(&machine_id);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get machine id: %m");
|
||||
|
||||
return mkdir_one(root, sd_id128_to_string(machine_id, buf));
|
||||
}
|
||||
|
||||
static int help(int argc, char *argv[], void *userdata) {
|
||||
_cleanup_free_ char *link = NULL;
|
||||
int r;
|
||||
@ -1043,6 +1105,8 @@ static int help(int argc, char *argv[], void *userdata) {
|
||||
" --no-pager Do not pipe output into a pager\n"
|
||||
" --graceful Don't fail when the ESP cannot be found or EFI\n"
|
||||
" variables cannot be written\n"
|
||||
" --make-machine-id-directory=yes|no|auto\n"
|
||||
" Create $BOOT/$MACHINE_ID\n"
|
||||
"\nSee the %2$s for details.\n",
|
||||
program_invocation_short_name,
|
||||
link,
|
||||
@ -1062,6 +1126,7 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
ARG_NO_VARIABLES,
|
||||
ARG_NO_PAGER,
|
||||
ARG_GRACEFUL,
|
||||
ARG_MAKE_MACHINE_ID_DIRECTORY,
|
||||
};
|
||||
|
||||
static const struct option options[] = {
|
||||
@ -1076,10 +1141,12 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
{ "no-variables", no_argument, NULL, ARG_NO_VARIABLES },
|
||||
{ "no-pager", no_argument, NULL, ARG_NO_PAGER },
|
||||
{ "graceful", no_argument, NULL, ARG_GRACEFUL },
|
||||
{ "make-machine-id-directory", required_argument, NULL, ARG_MAKE_MACHINE_ID_DIRECTORY },
|
||||
{}
|
||||
};
|
||||
|
||||
int c, r;
|
||||
bool b;
|
||||
|
||||
assert(argc >= 0);
|
||||
assert(argv);
|
||||
@ -1132,6 +1199,17 @@ static int parse_argv(int argc, char *argv[]) {
|
||||
arg_graceful = true;
|
||||
break;
|
||||
|
||||
case ARG_MAKE_MACHINE_ID_DIRECTORY:
|
||||
if (streq(optarg, "auto"))
|
||||
arg_make_machine_id_directory = -1; /* default */
|
||||
else {
|
||||
r = parse_boolean_argument("--make-machine-id-directory=", optarg, &b);
|
||||
if (r < 0)
|
||||
return r;
|
||||
arg_make_machine_id_directory = b;
|
||||
}
|
||||
break;
|
||||
|
||||
case '?':
|
||||
return -EINVAL;
|
||||
|
||||
@ -1530,6 +1608,8 @@ static int verb_install(int argc, char *argv[], void *userdata) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
settle_make_machine_id_directory();
|
||||
|
||||
install = streq(argv[0], "install");
|
||||
|
||||
RUN_WITH_UMASK(0002) {
|
||||
@ -1555,6 +1635,10 @@ static int verb_install(int argc, char *argv[], void *userdata) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = install_machine_id_directory(arg_dollar_boot_path());
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
r = install_random_seed(arg_esp_path);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@ -1584,6 +1668,8 @@ static int verb_remove(int argc, char *argv[], void *userdata) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
settle_make_machine_id_directory();
|
||||
|
||||
r = remove_binaries(arg_esp_path);
|
||||
|
||||
q = remove_file(arg_esp_path, "/loader/loader.conf");
|
||||
@ -1602,11 +1688,19 @@ static int verb_remove(int argc, char *argv[], void *userdata) {
|
||||
if (q < 0 && r >= 0)
|
||||
r = q;
|
||||
|
||||
q = remove_machine_id_directory(arg_esp_path);
|
||||
if (q < 0 && r >= 0)
|
||||
r = 1;
|
||||
|
||||
if (arg_xbootldr_path) {
|
||||
/* Remove the latter two also in the XBOOTLDR partition if it exists */
|
||||
q = remove_subdirs(arg_xbootldr_path, dollar_boot_subdirs);
|
||||
if (q < 0 && r >= 0)
|
||||
r = q;
|
||||
|
||||
q = remove_machine_id_directory(arg_xbootldr_path);
|
||||
if (q < 0 && r >= 0)
|
||||
r = q;
|
||||
}
|
||||
|
||||
(void) sync_everything();
|
||||
|
||||
@ -2213,14 +2213,14 @@ int config_parse_service_sockets(
|
||||
_cleanup_free_ char *word = NULL, *k = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, 0);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Trailing garbage in sockets, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = unit_name_printf(UNIT(s), word, &k);
|
||||
if (r < 0) {
|
||||
@ -2488,14 +2488,14 @@ int config_parse_user_group_strv_compat(
|
||||
_cleanup_free_ char *word = NULL, *k = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, 0);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax: %s", rvalue);
|
||||
return -ENOEXEC;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = unit_full_printf(u, word, &k);
|
||||
if (r < 0) {
|
||||
@ -2654,8 +2654,6 @@ int config_parse_environ(
|
||||
_cleanup_free_ char *word = NULL, *resolved = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_CUNESCAPE|EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -2663,6 +2661,8 @@ int config_parse_environ(
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
if (u) {
|
||||
r = unit_full_printf(u, word, &resolved);
|
||||
@ -2719,8 +2719,6 @@ int config_parse_pass_environ(
|
||||
_cleanup_free_ char *word = NULL, *k = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
break;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -2728,6 +2726,8 @@ int config_parse_pass_environ(
|
||||
"Trailing garbage in %s, ignoring: %s", lvalue, rvalue);
|
||||
break;
|
||||
}
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
if (u) {
|
||||
r = unit_full_printf(u, word, &k);
|
||||
@ -2794,8 +2794,6 @@ int config_parse_unset_environ(
|
||||
_cleanup_free_ char *word = NULL, *k = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_CUNESCAPE|EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
break;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -2803,6 +2801,8 @@ int config_parse_unset_environ(
|
||||
"Trailing garbage in %s, ignoring: %s", lvalue, rvalue);
|
||||
break;
|
||||
}
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
if (u) {
|
||||
r = unit_full_printf(u, word, &k);
|
||||
@ -2868,14 +2868,14 @@ int config_parse_log_extra_fields(
|
||||
const char *eq;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_CUNESCAPE|EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = unit_full_printf(u, word, &k);
|
||||
if (r < 0) {
|
||||
@ -3080,8 +3080,6 @@ int config_parse_unit_requires_mounts_for(
|
||||
_cleanup_free_ char *word = NULL, *resolved = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -3089,6 +3087,8 @@ int config_parse_unit_requires_mounts_for(
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = unit_full_printf(u, word, &resolved);
|
||||
if (r < 0) {
|
||||
@ -3218,8 +3218,6 @@ int config_parse_syscall_filter(
|
||||
int num;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, 0);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -3227,6 +3225,8 @@ int config_parse_syscall_filter(
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = parse_syscall_and_errno(word, &name, &num);
|
||||
if (r < 0) {
|
||||
@ -3304,14 +3304,14 @@ int config_parse_syscall_log(
|
||||
_cleanup_free_ char *word = NULL;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, 0);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = seccomp_parse_syscall_filter(
|
||||
word, -1, c->syscall_log,
|
||||
@ -3349,8 +3349,6 @@ int config_parse_syscall_archs(
|
||||
uint32_t a;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -3358,6 +3356,8 @@ int config_parse_syscall_archs(
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
r = seccomp_arch_from_string(word, &a);
|
||||
if (r < 0) {
|
||||
@ -3463,8 +3463,6 @@ int config_parse_address_families(
|
||||
int af;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
@ -3472,6 +3470,8 @@ int config_parse_address_families(
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
af = af_from_name(word);
|
||||
if (af < 0) {
|
||||
@ -3821,14 +3821,14 @@ int config_parse_delegate(
|
||||
CGroupController cc;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
break;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
cc = cgroup_controller_from_string(word);
|
||||
if (cc < 0) {
|
||||
@ -3954,13 +3954,8 @@ int config_parse_device_allow(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device path and rights from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4025,13 +4020,8 @@ int config_parse_io_device_weight(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device path and weight from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4099,13 +4089,8 @@ int config_parse_io_device_latency(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device path and latency from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4174,13 +4159,8 @@ int config_parse_io_limit(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device node and bandwidth from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4265,13 +4245,8 @@ int config_parse_blockio_device_weight(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device node and weight from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4343,13 +4318,8 @@ int config_parse_blockio_bandwidth(
|
||||
r = extract_first_word(&p, &path, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid syntax, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0 || isempty(p)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Failed to extract device node and bandwidth from '%s', ignoring.", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -4751,14 +4721,14 @@ int config_parse_namespace_path_strv(
|
||||
bool ignore_enoent = false, shall_prefix = false;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
break;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to extract first word, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
w = word;
|
||||
if (startswith(w, "-")) {
|
||||
@ -4828,14 +4798,14 @@ int config_parse_temporary_filesystems(
|
||||
const char *w;
|
||||
|
||||
r = extract_first_word(&p, &word, NULL, EXTRACT_UNQUOTE);
|
||||
if (r == 0)
|
||||
return 0;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to extract first word, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
return 0;
|
||||
|
||||
w = word;
|
||||
r = extract_first_word(&w, &path, ":", EXTRACT_DONT_COALESCE_SEPARATORS);
|
||||
@ -4902,14 +4872,14 @@ int config_parse_bind_paths(
|
||||
bool rbind = true, ignore_enoent = false;
|
||||
|
||||
r = extract_first_word(&p, &source, ":" WHITESPACE, EXTRACT_UNQUOTE|EXTRACT_DONT_COALESCE_SEPARATORS);
|
||||
if (r == 0)
|
||||
break;
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse %s, ignoring: %s", lvalue, rvalue);
|
||||
return 0;
|
||||
}
|
||||
if (r == 0)
|
||||
break;
|
||||
|
||||
r = unit_full_printf(u, source, &sresolved);
|
||||
if (r < 0) {
|
||||
@ -5630,7 +5600,7 @@ int config_parse_bpf_foreign_program(
|
||||
r = extract_first_word(&rvalue, &word, ":", 0);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0) {
|
||||
if (r <= 0 || isempty(rvalue)) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r, "Failed to parse foreign BPF program, ignoring: %s", rvalue);
|
||||
return 0;
|
||||
}
|
||||
@ -5670,11 +5640,11 @@ int config_parse_cgroup_socket_bind(
|
||||
void *data,
|
||||
void *userdata) {
|
||||
_cleanup_free_ CGroupSocketBindItem *item = NULL;
|
||||
const char *address_family = NULL, *user_port;
|
||||
const char *user_port;
|
||||
uint16_t nr_ports = 0, port_min = 0;
|
||||
CGroupSocketBindItem **head = data;
|
||||
_cleanup_free_ char *word = NULL;
|
||||
int af = AF_UNSPEC, r;
|
||||
int af, r;
|
||||
|
||||
if (isempty(rvalue)) {
|
||||
cgroup_context_remove_socket_bind(head);
|
||||
@ -5684,29 +5654,40 @@ int config_parse_cgroup_socket_bind(
|
||||
r = extract_first_word(&rvalue, &word, ":", 0);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
|
||||
if (rvalue)
|
||||
address_family = word;
|
||||
|
||||
if (address_family) {
|
||||
if (streq(address_family, "IPv4"))
|
||||
af = AF_INET;
|
||||
else if (streq(address_family, "IPv6"))
|
||||
af = AF_INET6;
|
||||
else
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EINVAL),
|
||||
"Only IPv4 or IPv6 protocols are supported, ignoring");
|
||||
if (r <= 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Unable to parse %s= assignment, ignoring: %s", lvalue, rvalue);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (rvalue) {
|
||||
if (streq(word, "IPv4"))
|
||||
af = AF_INET;
|
||||
else if (streq(word, "IPv6"))
|
||||
af = AF_INET6;
|
||||
else {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, 0,
|
||||
"Only IPv4 and IPv6 protocols are supported, ignoring.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
user_port = rvalue;
|
||||
} else {
|
||||
af = AF_UNSPEC;
|
||||
user_port = word;
|
||||
}
|
||||
|
||||
user_port = rvalue ?: word;
|
||||
if (!streq(user_port, "any")) {
|
||||
uint16_t port_max;
|
||||
|
||||
r = parse_ip_port_range(user_port, &port_min, &port_max);
|
||||
if (r == -ENOMEM)
|
||||
return log_oom();
|
||||
if (r < 0)
|
||||
return log_warning_errno(r, "Invalid port or port range, ignoring: %m");
|
||||
if (r < 0) {
|
||||
log_syntax(unit, LOG_WARNING, filename, line, r,
|
||||
"Invalid port or port range, ignoring: %m");
|
||||
return 0;
|
||||
}
|
||||
|
||||
nr_ports = 1 + port_max - port_min;
|
||||
}
|
||||
|
||||
@ -10,6 +10,11 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
if (size == 0)
|
||||
return 0;
|
||||
|
||||
/* We don't want to fill the logs with assert warnings.
|
||||
* Disable most logging if not running standalone */
|
||||
if (!getenv("SYSTEMD_LOG_LEVEL"))
|
||||
log_set_max_level(LOG_CRIT);
|
||||
|
||||
dummy_server_init(&s, data, size);
|
||||
dev_kmsg_record(&s, s.buffer, size);
|
||||
server_done(&s);
|
||||
|
||||
@ -245,72 +245,69 @@ _public_ int sd_device_new_from_devnum(sd_device **ret, char type, dev_t devnum)
|
||||
}
|
||||
|
||||
_public_ int sd_device_new_from_subsystem_sysname(sd_device **ret, const char *subsystem, const char *sysname) {
|
||||
char *name, *syspath;
|
||||
size_t len = 0;
|
||||
char syspath[PATH_MAX], *name;
|
||||
|
||||
assert_return(ret, -EINVAL);
|
||||
assert_return(subsystem, -EINVAL);
|
||||
assert_return(sysname, -EINVAL);
|
||||
assert_return(strlen(sysname) < PATH_MAX - strlen("/sys/bus/"), -ENAMETOOLONG);
|
||||
|
||||
if (streq(subsystem, "subsystem")) {
|
||||
syspath = strjoina("/sys/subsystem/", sysname);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/subsystem/%s", sysname) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/bus/", sysname);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/bus/%s", sysname) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/class/", sysname);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/class/%s", sysname) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
} else if (streq(subsystem, "module")) {
|
||||
syspath = strjoina("/sys/module/", sysname);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/module/%s", sysname) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
} else if (streq(subsystem, "drivers")) {
|
||||
char subsys[PATH_MAX];
|
||||
char *driver;
|
||||
const char *subsys, *sep;
|
||||
|
||||
strscpy(subsys, sizeof(subsys), sysname);
|
||||
driver = strchr(subsys, ':');
|
||||
if (driver) {
|
||||
driver[0] = '\0';
|
||||
driver++;
|
||||
sep = strchr(sysname, ':');
|
||||
if (sep && sep[1] != '\0') { /* Require ":" and something non-empty after that. */
|
||||
subsys = memdupa_suffix0(sysname, sep - sysname);
|
||||
|
||||
syspath = strjoina("/sys/subsystem/", subsys, "/drivers/", driver);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/subsystem/%s/drivers/%s", subsys, sep + 1) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/bus/", subsys, "/drivers/", driver);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/bus/%s/drivers/%s", subsys, sep + 1) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
}
|
||||
}
|
||||
|
||||
/* translate sysname back to sysfs filename */
|
||||
name = strdupa(sysname);
|
||||
while (name[len] != '\0') {
|
||||
if (name[len] == '/')
|
||||
name[len] = '!';
|
||||
|
||||
len++;
|
||||
}
|
||||
for (size_t i = 0; name[i]; i++)
|
||||
if (name[i] == '/')
|
||||
name[i] = '!';
|
||||
|
||||
syspath = strjoina("/sys/subsystem/", subsystem, "/devices/", name);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/subsystem/%s/devices/%s", subsystem, name) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/bus/", subsystem, "/devices/", name);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/bus/%s/devices/%s", subsystem, name) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/class/", subsystem, "/", name);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/class/%s/%s", subsystem, name) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
syspath = strjoina("/sys/firmware/", subsystem, "/", sysname);
|
||||
if (access(syspath, F_OK) >= 0)
|
||||
if (snprintf_ok(syspath, sizeof syspath, "/sys/firmware/%s/%s", subsystem, sysname) &&
|
||||
access(syspath, F_OK) >= 0)
|
||||
return sd_device_new_from_syspath(ret, syspath);
|
||||
|
||||
return -ENODEV;
|
||||
@ -652,17 +649,15 @@ _public_ int sd_device_new_from_device_id(sd_device **ret, const char *id) {
|
||||
}
|
||||
|
||||
case '+': {
|
||||
char subsys[NAME_MAX+1]; /* NAME_MAX does not include the trailing NUL. */
|
||||
const char *sysname;
|
||||
const char *subsys, *sep;
|
||||
|
||||
sysname = strchr(id + 1, ':');
|
||||
if (!sysname)
|
||||
sep = strchr(id + 1, ':');
|
||||
if (!sep || sep - id - 1 > NAME_MAX)
|
||||
return -EINVAL;
|
||||
|
||||
(void) strnscpy(subsys, sizeof(subsys), id + 1, sysname - id - 1);
|
||||
sysname++;
|
||||
subsys = memdupa_suffix0(id + 1, sep - id - 1);
|
||||
|
||||
return sd_device_new_from_subsystem_sysname(ret, subsys, sysname);
|
||||
return sd_device_new_from_subsystem_sysname(ret, subsys, sep + 1);
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@ -30,20 +30,11 @@ SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", 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
|
||||
SUBSYSTEM=="firewire", ENV{ID_FFADO}=="1", TAG+="uaccess"
|
||||
|
||||
# Webcams, frame grabber, TV cards
|
||||
SUBSYSTEM=="video4linux", TAG+="uaccess"
|
||||
SUBSYSTEM=="dvb", TAG+="uaccess"
|
||||
|
||||
# IIDC devices: industrial cameras and some webcams
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x00010*", TAG+="uaccess"
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00b09d:0x00010*", TAG+="uaccess"
|
||||
# AV/C devices: camcorders, set-top boxes, TV sets, audio devices, and more
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x010001*", TAG+="uaccess"
|
||||
SUBSYSTEM=="firewire", ATTR{units}=="*0x00a02d:0x014001*", TAG+="uaccess"
|
||||
|
||||
# industrial cameras, some webcams, camcorders, set-top boxes, TV sets, audio devices, and more
|
||||
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_MIDI}=="1", TAG+="uaccess"
|
||||
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_AUDIO}=="1", TAG+="uaccess"
|
||||
SUBSYSTEM=="firewire", TEST=="units", ENV{IEEE1394_UNIT_FUNCTION_VIDEO}=="1", TAG+="uaccess"
|
||||
|
||||
@ -1754,12 +1754,12 @@ int unit_file_verify_alias(const UnitFileInstallInfo *i, const char *dst, char *
|
||||
"Invalid path \"%s\" in alias.", dir);
|
||||
*p = '\0'; /* dir should now be a unit name */
|
||||
|
||||
r = unit_name_classify(dir);
|
||||
if (r < 0)
|
||||
UnitNameFlags type = unit_name_classify(dir);
|
||||
if (type < 0)
|
||||
return log_warning_errno(SYNTHETIC_ERRNO(EXDEV),
|
||||
"Invalid unit name component \"%s\" in alias.", dir);
|
||||
|
||||
const bool instance_propagation = r == UNIT_NAME_TEMPLATE;
|
||||
const bool instance_propagation = type == UNIT_NAME_TEMPLATE;
|
||||
|
||||
/* That's the name we want to use for verification. */
|
||||
r = unit_symlink_name_compatible(path_alias, i->name, instance_propagation);
|
||||
@ -1776,11 +1776,11 @@ int unit_file_verify_alias(const UnitFileInstallInfo *i, const char *dst, char *
|
||||
if (unit_name_is_valid(dst, UNIT_NAME_TEMPLATE)) {
|
||||
_cleanup_free_ char *inst = NULL;
|
||||
|
||||
r = unit_name_to_instance(i->name, &inst);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to extract instance name from %s: %m", i->name);
|
||||
UnitNameFlags type = unit_name_to_instance(i->name, &inst);
|
||||
if (type < 0)
|
||||
return log_error_errno(type, "Failed to extract instance name from %s: %m", i->name);
|
||||
|
||||
if (r == UNIT_NAME_INSTANCE) {
|
||||
if (type == UNIT_NAME_INSTANCE) {
|
||||
r = unit_name_replace_instance(dst, inst, &dst_updated);
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to build unit name from %s+%s: %m",
|
||||
|
||||
@ -68,7 +68,6 @@ static void test_random_u64_range_one(unsigned mod) {
|
||||
|
||||
x = random_u64_range(mod);
|
||||
|
||||
log_trace("%05u: %"PRIu64, i, x);
|
||||
count[x]++;
|
||||
max = MAX(max, count[x]);
|
||||
}
|
||||
|
||||
@ -471,8 +471,8 @@ static void test_build_parent_slice(void) {
|
||||
}
|
||||
|
||||
static void test_unit_name_to_instance(void) {
|
||||
UnitNameFlags r;
|
||||
char *instance;
|
||||
int r;
|
||||
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
|
||||
4
test/fuzz/fuzz-journald-kmsg/oss-fuzz-33881
Normal file
4
test/fuzz/fuzz-journald-kmsg/oss-fuzz-33881
Normal file
File diff suppressed because one or more lines are too long
BIN
test/fuzz/fuzz-unit-file/oss-fuzz-33270
Normal file
BIN
test/fuzz/fuzz-unit-file/oss-fuzz-33270
Normal file
Binary file not shown.
BIN
test/fuzz/fuzz-unit-file/oss-fuzz-33876
Normal file
BIN
test/fuzz/fuzz-unit-file/oss-fuzz-33876
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user