Commit Graph

7 Commits

Author SHA1 Message Date
Mikhail Dmitrichenko
9b4484739f systemd: fix negative number conversion
convertNumber() strips the sign before parsing the numeric value and then
applies it back via a multiplier.  The negative case uses -11 instead of
-1, causing negative values to be converted incorrectly.

This is visible for any caller using the signed result directly, and can
also produce surprising results for unsigned callers if the multiplication
overflows.

Use -1 for the negative multiplier.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko00@bk.ru>
2026-06-25 18:33:10 +03:00
Jan Rodák
cf6404f387 Fix Quadlet Lookup() stripping unmatched quotes
Fixes: https://github.com/containers/podman/issues/28409

Signed-off-by: Jan Rodák <hony.com@seznam.cz>
2026-03-31 10:27:39 +02:00
Matt Souza
090304a054 lint: reenable revive unused-parameter check
Signed-off-by: Matt Souza <medsouz99@gmail.com>
2025-10-01 10:42:08 -04:00
Ahmed Moalla
75b4a1b2aa add support to ; for comments in unit files as per systemd documentation
Signed-off-by: Ahmed Moalla <ahmed.moalla@gmail.com>
2025-01-13 14:20:24 +01:00
Giuseppe Scrivano
64e94efb95 systemd: simplify parser and fix infinite loop
This commit simplifies the systemd parser logic, and it solves an
infinite loop when using a continuation line.

Closes: https://github.com/containers/podman/issues/24810

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2024-12-12 20:45:23 +01:00
benniekiss
3c52ef43f5 Expand drop-in search paths
* top-level (pod.d)
* truncated (unit-.container.d)

Signed-off-by: Bennie Milburn-Town <63211101+benniekiss@users.noreply.github.com>
2024-07-17 17:43:02 -04:00
Valentin Rothberg
b4374f2bd9 move quadlet packages into pkg/systemd
Reduce the number of top-level packages in ./pkg by moving quadlet
packages under ./pkg/systemd.

[NO NEW TESTS NEEDED] - no functional change.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-10-19 13:38:27 +02:00