Commit Graph

19595 Commits

Author SHA1 Message Date
Lennart Poettering b8af91e910 journal: uppercase first character in verify error messages
In the english language the first character of a sentence is supposed to
be uppercase. Let's make sure this also applies to the journal
verification error messages.

(cherry picked from commit e80acc51ae)
2015-08-04 00:44:09 -04:00
Lennart Poettering bf5c074384 journalctl: properly detect empty journal files
When we encounter a journal file with exactly zero entries, print a nice
message and exit, and don't print a weird error message.

(cherry picked from commit 02ab86c732)
2015-08-04 00:43:44 -04:00
Lennart Poettering 08bada1430 journal: explain the error when we find a non-DATA object that is compressed
Only objects of type DATA may be compressed, generate a message about
that, like we do for all other errros.

(cherry picked from commit bca9e39dfa)
2015-08-04 00:43:37 -04:00
Lennart Poettering 5f7944f009 journal: when verifying journal files, handle empty ones nicely
A journal file that carries no objects should be considered valid.

(cherry picked from commit 8dc37a8525)
2015-08-04 00:43:26 -04:00
Lennart Poettering 0983c262c2 journal: avoid mapping empty data and field hash tables
When a new journal file is created we write the header first, then sync
and only then create the data and field hash tables in them. That means
to other processes it might appear that the files have a valid header
but not data and field hash tables. Our reader code should be able to
deal with this.

With this change we'll not map the two hash tables right-away after
opening a file for reading anymore (because that will of course fail if
the objects are missing), but delay this until the first time we access
them. On top of that, when we want to look something up in the hash
tables and we notice they aren't initialized yet, we consider them
empty.

This improves handling of some journal files reported in #487.

(cherry picked from commit dade37d403)
2015-08-04 00:43:18 -04:00
Lennart Poettering 85b851e0e9 journal-verify: don't hit SIGFPE when determining progress
If we determine the progress based on a number of objects available,
don't blindly devide by the number of objects, given that it might be 0.

(cherry picked from commit 45c047b227)
2015-08-04 00:43:12 -04:00
Lennart Poettering dc9c3af131 journal: reword msg about enforced size limits a bit
http://lists.freedesktop.org/archives/systemd-devel/2015-July/033574.html
(cherry picked from commit da2e288bbc)
2015-08-04 00:43:06 -04:00
Kay Sievers 574984d5f8 timesyncd: enable timesyncd in virtual machines
On Fri, Mar 13, 2015 at 8:25 PM, Michael Marineau <michael.marineau@coreos.com> wrote:
> Currently systemd-timesyncd.service includes
> ConditionVirtualization=no, disabling it in both containers and
> virtual machines. Each VM platform tends to deal with or ignore the
> time problem in their own special ways, KVM/QEMU has the kernel time
> source kvm-clock, Xen has had different schemes over the years, VMware
> expects a userspace daemon sync the clock, and other platforms are
> content to drift with the wind as far as I can tell.
>
> I don't know of a robust way to know if a platform needs a little
> extra help from userspace to keep the clock sane or not but it seems
> generally safer to try than to risk drifting. Does anyone know of a
> reason to leave timesyncd off by default? Otherwise switching to
> ConditionVirtualization=!container should be reasonable.

(cherry picked from commit 4b16233e59)
2015-08-04 00:25:00 -04:00
Michael Biebl 5818ab38b6 man: fix typo in systemd-fsck@
(cherry picked from commit 349ca6e68b)
2015-08-04 00:19:35 -04:00
Alastair Hughes fc432393a6 hwdb: add resolution information for Dell Vostro 1510 touchpad
Dell Vostro 1510, AlpsPS/2 ALPS GlidePoint touchpad.

Relevant issue: #763

(cherry picked from commit 8d51633304)
2015-08-04 00:18:36 -04:00
Marcel Holtmann 5e3671b110 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 3d5ff087ce)
2015-08-04 00:14:34 -04:00
Marcel Holtmann aed2e647a3 hwdb: Update database of Bluetooth company identifiers
(cherry picked from commit 680198d6a1)
2015-08-04 00:14:34 -04:00
Kay Sievers 73a8d708a2 hwdb: update
(cherry picked from commit 1e40e358ee)
2015-08-04 00:10:53 -04:00
Kay Sievers 075954e049 timesyncd: remove RLIMIT_NPROC
NSS plugins might create additional threads. Remove the limit, we cannot
really make any assumptions here.

(cherry picked from commit b506d3141b)
2015-08-04 00:10:23 -04:00
David Herrmann be1c3830ca basic: fix error/memleak in socket-util
Probably a typo, checking 'ret' instead of the return value 'p'. This
might cause the function to return failure, even though it succeeded.
Furthermore, it might leak resources.

(cherry picked from commit 0810bc568a)
2015-08-04 00:07:23 -04:00
Andreas Kempf 6a70eb8959 hwdb: Add mouse DPI info for Logitech G402.
DPI information was taken from the device's setup guide.

Additional (shortened) information from udevadm info:

P: .../usb2/2-1/2-1:1.0/0003:046D:C07E.0002/input/input6/event2
N: input/event2
S: input/by-id/usb-Logitech_Gaming_Mouse_G402_6D93117D5049-event-mouse
S: input/by-path/pci-0000:00:12.0-usb-0:1:1.0-event-mouse
...
E: ID_BUS=usb
E: ID_INPUT=1
E: ID_INPUT_MOUSE=1
E: ID_MODEL=Gaming_Mouse_G402
E: ID_MODEL_ENC=Gaming\x20Mouse\x20G402
E: ID_MODEL_ID=c07e
E: ID_PATH=pci-0000:00:12.0-usb-0:1:1.0
E: ID_PATH_TAG=pci-0000_00_12_0-usb-0_1_1_0
E: ID_REVISION=9002
E: ID_SERIAL=Logitech_Gaming_Mouse_G402_6D93117D5049
E: ID_SERIAL_SHORT=6D93117D5049
E: ID_TYPE=hid
E: ID_USB_DRIVER=usbhid
E: ID_USB_INTERFACES=:030102:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_VENDOR=Logitech
E: ID_VENDOR_ENC=Logitech
E: ID_VENDOR_ID=046d
E: LIBINPUT_DEVICE_GROUP=3/46d/c07e/111:usb-0000:00:12.0-1
E: MAJOR=13
E: MINOR=66
E: SUBSYSTEM=input
...

(cherry picked from commit 3407fcd575)
2015-08-03 23:57:34 -04:00
Andreas Kempf f970b537ee hwdb: Update info for potential contributors.
Update the location of the bug tracker and mention that pull requests
are preferred.

(cherry picked from commit 8601a85cb4)
2015-08-03 23:57:33 -04:00
Christian Hesse a698254905 man: fix typo in man systemd-machine-id-commit
(cherry picked from commit 47c453f6a6)
2015-08-03 23:56:11 -04:00
Peter Hutterer cb3d6261d4 hwdb: add min/max/resolution override for Appletouch one-button touchpads
Macbook2,1, late 2006 model.

https://bugzilla.redhat.com/show_bug.cgi?id=1246651
(cherry picked from commit 47b84eac21)
2015-08-03 23:55:38 -04:00
Peter Hutterer f18bcb5648 hwdb: add resolution values for Asus K52JT touchpad
https://bugs.freedesktop.org/show_bug.cgi?id=91364
(cherry picked from commit 5b7246d09d)
2015-08-03 23:55:24 -04:00
Tom Gundersen f45bb7225a networkd-wait-online: fix race
We must consider 'pending' links as if they may be managed by networkd, as this
is the state we enter before deciding wether networkd should manage the link
or not, so we better wait for this decision being made.

(cherry picked from commit 79ac8ba973)
2015-08-03 23:53:35 -04:00
Herman Fries 7fd792efcc man: unit: fix StartTimeoutSec
should be TimeoutStartSec

(cherry picked from commit 21d1130207)
2015-08-03 23:51:50 -04:00
Thomas Hindoe Paaboel Andersen 79b95976c7 hwdb: add HP USB 1000dpi Laser Mouse
(cherry picked from commit d78dfff261)
2015-08-03 23:49:35 -04:00
Daniel Mack b6941d3196 udev: Fix udev_builtin_run_once()
Honour the boolean return value type.
This was an oversight in f89d10ae4.

(cherry picked from commit 4e18de3d27)
2015-08-03 23:49:13 -04:00
Daniel Mack 0d8f03f356 udev: check more builtins[] pointers before dereferencing
Fix some more locations where pointers from builtins[] are dereferenced
before checking. Related to 8cacf69b1.

(cherry picked from commit f89d10ae45)
2015-08-03 23:48:46 -04:00
Lidong Zhong 98428506f0 udev: avoid coredump when initializing udev builtins
If one of the macros(HAVE_BLKID/HAVE_KMOD/HAVE_ACL) is not
defined, there will be a coredump

(cherry picked from commit 8cacf69b1b)
2015-08-03 23:48:34 -04:00
Michal Sekletar a37a4e15c3 install: make unit_file_get_list aware of UNIT_FILE_INDIRECT
Commit aedd401 introduced new unit file state, UNIT_FILE_INDIRECT. Unit file is
said to have indirect state if it contains [Install] section which has only
Also= directive. Thus, if enable of such unit file is requested then some other
unit file gets enabled.

Whether or not unit file is in indirect state can be determined by calling
unit_file_can_install. Function unit_file_get_list populates list of unit files
present in given lookup location. So far it did call unit_file_can_install in a
way that would prevent finding out about unit files in indirect state. Such unit
file would be incorrectly marked as static.

Fixes following assertion in test-install,

Assertion 'p->state == s' failed at src/test/test-install.c:59, function main(). Aborting.
[1]    26868 abort (core dumped)  ./test-install

(cherry picked from commit 8508ea9d05)
2015-08-03 23:47:13 -04:00
HATAYAMA Daisuke bb67def7b5 selinux: fix missing SELinux unit access check
Currently, SELinux unit access check is not performed if a given unit
file has not been registered in a hash table. This is because function
manager_get_unit() only tries to pick up a Unit object from a Unit
hash table. Instead, we use function manager_load_unit() searching
Unit file pathes for the given Unit file.

(cherry picked from commit 4938696301)
2015-08-03 23:46:08 -04:00
Martin Pitt 7176a84cb6 networkd-wait-online: fix -i argument
-i (aka --interface) takes an argument. Tell getopt_long() that, so that optarg
isn't NULL.

(cherry picked from commit baee30afce)
2015-08-03 23:41:32 -04:00
Peter Hutterer 4d92df7bf5 hwdb: fix typo - "sort by by..." -> "sort by..."
(cherry picked from commit 47d36b7c85)
2015-07-30 16:03:00 +10:00
Benjamin Tissoires d1b8b6f6e9 hwdb: add Chromebook pixel (2015) resolution fix
The atmel driver sets a default resolution of 20 for each touchpads it
creates. On this model, 10 is more appropriate.

The resolution is not set for the touchscreen by the kernel, so match
the name to both touchpad and touchscreen.

(cherry picked from commit 696f1dbfe1)
2015-07-30 16:02:59 +10:00
Benjamin Tissoires d3f55153f4 hwdb: add evdev entry for the Lenovo X230 series touchpad
The Lenovo X230 advertize a vertical resolution of 136, which gives a true
size of 31 mm. The actual physical size of the touchpad is 40 mm, so
override the resolution to 100.

(cherry picked from commit a58223dc37)
2015-07-30 16:02:57 +10:00
Peter Hutterer 60b5bfa646 hwdb: set the resolution for a couple of bcm5974 touchpads
Verified for the 5,1 Macbook, the others are guesses based on the list of
supported devices of the moshi trackpad protector.
http://www.moshi.com/trackpad-protector-trackguard-macbook-pro#silver

Resolution calculated based on the min/max settings set in the kernel driver,
divided by the physical size. This is probably slightly off, but still better
than no resolution at all.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 3ebc2dc498)
2015-07-30 16:02:31 +10:00
Peter Hutterer 02e08c407a udev: builtin-keyboard: add support for EVDEV_ABS_*
Parse properties in the form
EVDEV_ABS_00="<min>:<max>:<res>:<fuzz>:<flat>"

and apply them to the kernel device. Future processes that open that device
will see the updated EV_ABS range.

This is particularly useful for touchpads that don't provide a resolution in
the kernel driver but can be fixed up through hwdb entries (e.g. bcm5974).

All values in the property are optional, e.g. a string of "::45" is valid to
set the resolution to 45.

The order intentionally orders resolution before fuzz and flat despite it
being the last element in the absinfo struct. The use-case for setting
fuzz/flat is almost non-existent, resolution is probably the most common case
we'll need.

To avoid multiple hwdb invocations for the same device, replace the
hwdb "keyboard:" prefix with "evdev:" and drop the separate 60-keyboard.rules
file. The new 60-evdev.rules is called for all event nodes
anyway, we don't need a separate rules file and second callout to the hwdb
builtin.

(cherry picked from commit 51c0c28698)

Changes to 51c0c28698:
- leave 60-keyboard.rules in place. This forces a double callout to the
  keyboard builtin but avoids breaking current setups that rely on the
  keyboard: prefix
- drop the AT keyboard matching rule from 60-evdev.rules, this is for keyboard
  matches and handled by the 60-keyboard.rules that was restored with the
  backport.
2015-07-30 15:56:48 +10:00
Peter Hutterer dd3e528c0d udev: builtin-keyboard: invert a condition
No functional changes, just to make the next patch easier to review

(cherry picked from commit 8a0fd83cf0)
2015-07-30 15:51:13 +10:00
Peter Hutterer a28f10722f udev: builtin-keyboard: move actual key mapping to a helper function
No changes in the mapping, but previously we opened the device only on
successful parsing. Now we open the mapping as soon as we have a value that
looks interesting. Since errors are supposed to be the exception, not the
rule, this is probably fine.

(cherry picked from commit c9a8e34094)
2015-07-30 15:51:08 +10:00
Peter Hutterer be30dd7a92 udev: builtin-keyboard: immediately EVIOCSKEYCODE when we have a pair
Rather than building a map and looping through the map, immediately call the
ioctl when we have a successfully parsed property.

This has a side-effect: before the maximum number of ioctls was limited to the
size of the map (1024), now it is unlimited.

(cherry picked from commit cfba2656e3)
2015-07-30 15:51:05 +10:00
Peter Hutterer dc1b8bf025 udev: builtin-keyboard: move fetching the device node up
No point parsing the properties if we can't get the devnode to apply them
later. Plus, this makes future additions easier to slot in.

(cherry picked from commit 753bd5c7ed)
2015-07-30 15:51:02 +10:00
Lidong Zhong a20c2f35ee udev: fix parameter process
(cherry picked from commit e14b6f211c)
2015-07-24 23:24:25 -04:00
Sungbae Yoo 22c7e11df3 exit-status: add a missing string for EXIT_SMACK_PROCESS_LABEL
(cherry picked from commit 94b573bd1a)
2015-07-24 23:23:54 -04:00
Lennart Poettering 08099717df tmpfiles: don't recursively descend into journal directories in /var
Do so only in /run. We shouldn't alter ACLs for existing files in /var,
but only for new files. If the admin made changes to the ACLs they
shouls stay in place.

We should still do recursive ACL changes for files in /run, since those
are not persistent, and will hence lack ACLs on every boot.

Also, /var/log/journal might be quit large, /run/log/journal is usually
not, hence we should avoid the recursive descending on /var, but not on
/run.

Fixes #534

(cherry picked from commit 8b258a645a)
2015-07-24 23:19:24 -04:00
Tom Gundersen 8171c9e20b units: order networkd after sysctl
This way networkd will correctly and race-freely inherit the default settings
applied by sysctl.

Suggested in issue #468.

(cherry picked from commit d2d1e36bee)
2015-07-24 23:15:02 -04:00
Zbigniew Jędrzejewski-Szmek 39f29e7302 ata_id,rules: temporarily restore botched wwn "stable" identifier
The identifier with broken format string and word ordering was added
in systemd-219. Keep the link around for the lifetime of F22.
2015-07-24 21:45:27 -04:00
Zbigniew Jędrzejewski-Szmek eaef7c5290 ata_id: unreverse WWN identifier
An endianness conversion was lost in 6024a6e302.
Restore it. Now ata_id and scsi_id output match.

https://bugzilla.redhat.com/show_bug.cgi?id=1227503
(cherry picked from commit 01f61d331b)
2015-07-24 21:44:44 -04:00
Peter Hutterer 831e080597 hwdb: add Logitech MX Master DPI settings
(cherry picked from commit cc00a2d191)
2015-07-24 21:44:25 -04:00
Daniel Mack 0d014d3d44 bootchart: fix negative 'timeleft' condition
Fix the overrun case in sample acquistion and negative number calculations.

Reported by Stefan Sauer.

Fixes #642

(cherry picked from commit 0a327854f8)
2015-07-24 21:43:11 -04:00
David Herrmann 73815c184c logind: never select closing sessions for a VT
If a session is in closing state (and already got rid of its VT), then
never re-select it for that VT. There is no reason why we should grant
something to a session that is already going away *AND* already got rid
of exactly that.

(cherry picked from commit 2810332843)
2015-07-24 21:31:17 -04:00
David Herrmann 9d811fef69 logind: prefer new sessions over older ones on VT switches
Our seat->positions[] array keeps track of the 'preferred' session on a
VT. The only situation this is used, is to select the session to activate
when a VT is activated. In the normal case, there's only one session per
VT so the selection is trivial.

Older greeters, however, implement take-overs when they start sessions on
the same VT that the greeter ran on. We recently limited such take-overs
to VTs where a greeter is running on, to force people to never share VTs
in new code that is written.

For legacy reasons, we need to be compatible to old greeters, though.
Hence, we allow those greeters to implement take-over. In such take-overs,
however, we should really make sure that the new sessions gets preferred
over the old one under all circumstances. Hence, make sure we override
the previous preferred session with a new session.

(cherry picked from commit da770c386f)
2015-07-24 21:30:10 -04:00
Nick Owens 7703c08ef6 sd-dhcp-lease: fix handling of multiple routers
currently if a dhcp server sends more than one router, sd-dhcp-lease
does not copy the ip because it assumes it will only ever be 4 bytes. a
dhcp server could send more than one ip in the router list, so we should
copy the first one and ignore the rest of the bytes.

(cherry picked from commit a05185279b)
2015-07-24 21:15:56 -04:00
Tom Gundersen 5e345bb5e1 basic: util - fix errorhandling in unhexmem()
We were ignoring failures from unhexchar, which meant that invalid
hex characters were being turned into garbage rather than the string
rejected.

Fix this by making unhexmem return an error code, also change the API
slightly, to return the size of the returned memory, reflecting the
fact that the memory is a binary blob,and not a string.

For convenience, still append a trailing NULL byte to the returned
memory (not included in the returned size), allowing callers to
treat it as a string without doing a second copy.

(cherry picked from commit 30494563f2)
2015-07-24 21:09:20 -04:00