platform/upstream/systemd.git
6 months agoRevert "core/path: fix spurious triggering of PathExists= on restart/reload"
INSUN PYO [Mon, 18 May 2020 09:21:13 +0000 (18:21 +0900)]
Revert "core/path: fix spurious triggering of PathExists= on restart/reload"

This reverts commit d7cf8c24d4ef6ed4c9d711ee82ba57a529baad34.

Change-Id: Ice828460a04862ad41495826566c0be1485bce63

6 months agoFix delayed.target
Youngjae Cho [Wed, 6 May 2020 06:39:03 +0000 (15:39 +0900)]
Fix delayed.target

Add binary wait-target-done.c for waiting creation of *.done file.

Change-Id: I0d87c574086073b28aa52dccca3e760914e2abbd
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
6 months agoDelayed target: check interval is changed from 1 second to 0.2 seconds.
INSUN PYO [Tue, 21 Apr 2020 07:11:15 +0000 (16:11 +0900)]
Delayed target: check interval is changed from 1 second to 0.2 seconds.

Change-Id: I2206ada9509d503ac02733d0cb0c1539d932b184
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
6 months agospec: fix indent in systemd.spec
INSUN PYO [Thu, 16 Apr 2020 00:04:39 +0000 (09:04 +0900)]
spec: fix indent in systemd.spec

Change-Id: I7b48f4cd8e66e3c52a23305d48466c75e5443845
Signed-off-by: INSUN PYO <insun.pyo@samsung.com>
6 months agotest-bus-async-match: remove unused variables
Adrian Szyndela [Thu, 16 Apr 2020 08:52:54 +0000 (10:52 +0200)]
test-bus-async-match: remove unused variables

Change-Id: I0b900a9b0b04767123110ebcb88174d45fdc8ca3

6 months agosdbus: kdbus tests: improve mt-safety
Maciej Slodczyk [Tue, 14 Apr 2020 10:54:12 +0000 (12:54 +0200)]
sdbus: kdbus tests: improve mt-safety

Change-Id: I09d0eea89920d3af549f2e10b2a1dbdd7a9b4cf2
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 months agosdbus: kdbus tests: make sure all variables are initialized
Maciej Slodczyk [Tue, 14 Apr 2020 09:02:12 +0000 (11:02 +0200)]
sdbus: kdbus tests: make sure all variables are initialized

Change-Id: Ide45b79c33bf0c15346801c36bd8695ca4ea2ec6
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 months agosdbus: kdbus tests: fix indent in tests
Maciej Slodczyk [Tue, 14 Apr 2020 12:49:54 +0000 (14:49 +0200)]
sdbus: kdbus tests: fix indent in tests

Change-Id: I143ce8edf571a2a4a6899319c16b99dcafaff9b6
Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 months agoChange file permission of org.tizen.system.conf to 644.
INSUN PYO [Thu, 9 Apr 2020 05:17:05 +0000 (14:17 +0900)]
Change file permission of org.tizen.system.conf to 644.

Change-Id: Ibdf905f96c6f72951db4e90b761462e05a956232

6 months agodelayed: replace dbus-send with a dedicated program
Adrian Szyndela [Mon, 6 Apr 2020 10:14:04 +0000 (12:14 +0200)]
delayed: replace dbus-send with a dedicated program

In release versions there can be no helper programs for sending
any messages over D-Bus. Thus, dbus-send, busctl etc. are removed.

This commit replaces dbus-send use cases with a specialized little
tool, which does what dbus-send did in those cases.

Change-Id: I54e51fc3fe563961f18b953215cee41c3bf4510e

6 months agologind: add SmackProcessLabel=System::Privileged to user-runtime-dir@.service
INSUN PYO [Fri, 3 Apr 2020 01:37:48 +0000 (10:37 +0900)]
logind: add SmackProcessLabel=System::Privileged to user-runtime-dir@.service

To change smack label /run/user/5001/system_share to "*", we need System::Privileged.

Change-Id: Icd1e8c7794236670575df68d1fe35c35584f24f2

6 months agosocket: fix printing of size_t value
Adrian Szyndela [Thu, 2 Apr 2020 12:32:02 +0000 (14:32 +0200)]
socket: fix printing of size_t value

Change-Id: I9a6fa9f3a15c091fdda0e738de96dcebca8ee1c3

6 months agoMerge upgrade-to-244 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 14:14:39 +0000 (15:14 +0100)]
Merge upgrade-to-244 into tizen

Change-Id: Id141f6a5f624ba6a4a24b0bf85a20b7e51878781
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agomeson.build: set a proper path for building in Tizen
Adrian Szyndela [Mon, 30 Mar 2020 11:16:30 +0000 (13:16 +0200)]
meson.build: set a proper path for building in Tizen

6 months agotest-copy: allow copy from symlinked dir
Adrian Szyndela [Mon, 30 Mar 2020 07:26:14 +0000 (09:26 +0200)]
test-copy: allow copy from symlinked dir

6 months agotests: make tests pass with non-utf8 locale
Adrian Szyndela [Fri, 27 Mar 2020 15:29:24 +0000 (16:29 +0100)]
tests: make tests pass with non-utf8 locale

6 months agoMerge v244 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 13:04:43 +0000 (14:04 +0100)]
Merge v244 into tizen

Change-Id: I3fbcd0c82a6b3470c5b348726bb7a28445096256
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agosdbus: kdbus: add test for adding async signal match
Maciej Slodczyk [Mon, 30 Mar 2020 13:09:14 +0000 (15:09 +0200)]
sdbus: kdbus: add test for adding async signal match

Signed-off-by: Maciej Slodczyk <m.slodczyk2@partner.samsung.com>
6 months agoudevd: add missing attr in SECLABEL rules parsing
Adrian Szyndela [Thu, 19 Mar 2020 06:57:09 +0000 (07:57 +0100)]
udevd: add missing attr in SECLABEL rules parsing

This caused failure of udevd workers, when they tried to execute
rules. When parsing, 'attr' was always passed as NULL, despite being
checked for non-emptiness. When executing, NULL was passed
unconditionally to strdup, and it caused segmentation fault.

6 months agomeson: workaround for lack of realpath
Adrian Szyndela [Fri, 6 Mar 2020 16:01:47 +0000 (17:01 +0100)]
meson: workaround for lack of realpath

Change-Id: I2472bcf422e6c3ccef1522c6f8733961b6556c0a

6 months agoMerge v243 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:50:43 +0000 (13:50 +0100)]
Merge v243 into tizen

Change-Id: Id093d7d6c6b167ecbceba07ceb3bce69a7a285fa
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months ago(backport) linux: also import l2tp.h from kernel-5.0
Yu Watanabe [Sat, 13 Apr 2019 09:35:15 +0000 (18:35 +0900)]
(backport) linux: also import l2tp.h from kernel-5.0

The L2TP_ATTR_UDP_ZERO_CSUM6_{TX,RX} attributes are introduced by
6b649feafe10b293f4bd5a74aca95faf625ae525, which is included in
kernel-3.16. To support older kernel, let's import the header.

Fixes #12300.

Change-Id: I6153d93adaeb7ed21c9956125eac6d8928153bfa

6 months agoMerge v242 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:38:58 +0000 (13:38 +0100)]
Merge v242 into tizen

Change-Id: I6ce1712eb0f06cfa50cda3d157cfc678f6a6ac41
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agoMerge v241 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:36:56 +0000 (13:36 +0100)]
Merge v241 into tizen

Change-Id: I1cc222a91c023e90a70d44d3fc655ce28dc6cd65
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agobus-message: fix gvariant array elements alignment computing
Adrian Szyndela [Mon, 16 Mar 2020 11:08:04 +0000 (12:08 +0100)]
bus-message: fix gvariant array elements alignment computing

Commit f88214cf9d66c93f4d22c4c8980de9ee3ff45bab introduced correction
of computing of variable sized elements of arrays. However,
alignment was taken from outer signature instead of type of elements
in the array. For example, for signature "a(sasbttttuii)"
the alignment of elements of the inner array ("as"; should be 1) was computed
from the alignment of "sasbttttuii" (which is 8).

This commit corrects the alignment source.

6 months ago(backport) udev: do logging before setting variables to NULL
Zbigniew Jędrzejewski-Szmek [Tue, 15 Jan 2019 07:17:44 +0000 (08:17 +0100)]
(backport) udev: do logging before setting variables to NULL

gcc-9 diagnoses this as an error.
Reported by Jeff Law.

Change-Id: I737247b391a5ea6f2ef581bc32d99716782ce659

6 months ago(backport) capability: fix build without PR_CAP_AMBIENT
Fabrice Fontaine [Fri, 11 Jan 2019 15:07:00 +0000 (16:07 +0100)]
(backport) capability: fix build without PR_CAP_AMBIENT

systemd fails to build on kernel without PR_CAP_AMBIENT (< 4.3) since
https://github.com/systemd/systemd/commit/2a03bb3e65327c73008f1db485ffc75c432dc6b2

To fix this error, include missing_prctl.h in all files using
PR_CAP_AMBIENT

Fixes:
 - http://autobuild.buildroot.org/results/699c078aa078240c6741da4dbd0871450ceeca92

Change-Id: I4b0f0af732fbb0e15d129c5fe8538c0785261415
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
6 months ago(backport) linux: also import linux/in.h and in6.h from kernel-5.0
Yu Watanabe [Sat, 13 Apr 2019 09:46:40 +0000 (18:46 +0900)]
(backport) linux: also import linux/in.h and in6.h from kernel-5.0

Now linux/in.h has better conflict detection with glibc's
netinet/in.h. So, let's import the headers.

Note that our code already have many workarounds for the conflict,
but in this commit does not drop them. Let's do that in the later
commits if this really helps.

Change-Id: I8ddd8197a29cac1a0e0690d64c76aa240f9d2d3d

6 months ago(backport) tree-wide: drop several missing_*.h and import relevant headers from kerne...
Yu Watanabe [Wed, 10 Apr 2019 10:55:53 +0000 (19:55 +0900)]
(backport) tree-wide: drop several missing_*.h and import relevant headers from kernel-5.0

Change-Id: Icc04a53c32aa56a716feeeb783c12fb556652bb8

6 months agotree-wide: replace realpath with readlink -f
Adrian Szyndela [Thu, 5 Mar 2020 08:12:59 +0000 (09:12 +0100)]
tree-wide: replace realpath with readlink -f

Tizen's coreutils doesn't include 'realpath' utility, which was
introduced in coreutils 8.15. However, Tizen's coreutils includes 'readlink'
utility, which is very close to 'realpath' if called with '-f' param.

Change-Id: I08b6ed68fc6bf0c384b599f4de3724724345d5c7

6 months agoRevert "units: drop units/user/busnames.target"
Adrian Szyndela [Thu, 5 Mar 2020 08:30:26 +0000 (09:30 +0100)]
Revert "units: drop units/user/busnames.target"

This reverts commit df134443395f6e043e0cd2a45ab529583df96e4e.

6 months agoRevert "units: remove unused busnames.target"
Adrian Szyndela [Thu, 5 Mar 2020 08:28:16 +0000 (09:28 +0100)]
Revert "units: remove unused busnames.target"

This reverts commit 0ba89873372c3ab508852b4e0071da0719bcea0a.

6 months agoMerge v240 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:33:54 +0000 (13:33 +0100)]
Merge v240 into tizen

Change-Id: Ia2dfd9e161b43fa5509250a59c1b1159d7555f04
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months ago(backport) core: remove JoinControllers= configuration setting
Lennart Poettering [Thu, 15 Nov 2018 20:07:43 +0000 (21:07 +0100)]
(backport) core: remove JoinControllers= configuration setting

This removes the ability to configure which cgroup controllers to mount
together. Instead, we'll now hardcode that "cpu" and "cpuacct" are
mounted together as well as "net_cls" and "net_prio".

The concept of mounting controllers together has no future as it does
not exist to cgroupsv2. Moreover, the current logic is systematically
broken, as revealed by the discussions in #10507. Also, we surveyed Red
Hat customers and couldn't find a single user of the concept (which
isn't particularly surprising, as it is broken...)

This reduced the (already way too complex) cgroup handling for us, since
we now know whenever we make a change to a cgroup for one controller to
which other controllers it applies.

Change-Id: I0eadd5f685980bd006134991310c0688ba7a86c5

6 months ago(backport) fs-util: make symlink_idempotent() optionally create relative link
Yu Watanabe [Sun, 23 Sep 2018 07:17:03 +0000 (16:17 +0900)]
(backport) fs-util: make symlink_idempotent() optionally create relative link

Change-Id: I24d38ca9a7e0f63095cd8fdf33b9686206ebf6a5

6 months ago(backport) nspawn: Move cgroup mount stuff from nspawn-mount.c to nspawn-cgroup.c
Luke Shumaker [Fri, 7 Jul 2017 22:57:08 +0000 (18:57 -0400)]
(backport) nspawn: Move cgroup mount stuff from nspawn-mount.c to nspawn-cgroup.c

Change-Id: Iaf44ed696c287b1cc0aa7a8c79773095a3c1ecc6

6 months ago(backport) nspawn: Simplify tmpfs_patch_options() usage, and trickle that up
Luke Shumaker [Tue, 13 Jun 2017 22:06:09 +0000 (18:06 -0400)]
(backport) nspawn: Simplify tmpfs_patch_options() usage, and trickle that up

One of the things that tmpfs_patch_options does is take an (optional) UID,
and insert "uid=${UID},gid=${UID}" into the options string.  So we need a
uid_t argument, and a way of telling if we should use it.  Fortunately,
that is built in to the uid_t type by having UID_INVALID as a possible
value.

So this is really a feature that requires one argument.  Yet, it is somehow
taking 4!  That is absurd.  Simplify it to only take one argument, and have
that trickle all the way up to mount_all()'s usage.

Now, in may of the uses, the argument becomes

    uid_shift == 0 ? UID_INVALID : uid_shift

because it used to treat uid_shift=0 as invalid unless the patch_ids flag
was also set.  This keeps the behavior the same.  Note that in all cases
where it is invoked, if !use_userns (sometimes called !userns), then
uid_shift is 0; we don't have to add any checks for that.

That said, I'm pretty sure that "uid=0" and not setting "uid=" are the
same, but Christian Brauner seemed to not think so when implementing the
cgns support.  https://github.com/systemd/systemd/pull/3589

Change-Id: I1b44d4415c10611b89423145f90b83e0d72eb4bc

6 months agoMerge v239 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:29:38 +0000 (13:29 +0100)]
Merge v239 into tizen

Change-Id: I00bc78f85b2944c74f89baea47bd1be803c1d4d5
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agosd-bus: fix fcntl flag for duplicating fd
Adrian Szyndela [Thu, 26 Mar 2020 10:19:37 +0000 (11:19 +0100)]
sd-bus: fix fcntl flag for duplicating fd

6 months ago(backport) meson: unify linux/stat.h check with other checks and use _GNU_SOURCE
Zbigniew Jędrzejewski-Szmek [Wed, 18 Jul 2018 15:26:17 +0000 (17:26 +0200)]
(backport) meson: unify linux/stat.h check with other checks and use _GNU_SOURCE

Using _GNU_SOURCE is better because that's how we include the headers in the
actual build, and some headers define different stuff when it is defined.
sys/stat.h for example defines 'struct statx' conditionally.

Change-Id: I7cb80dc4339aa05d1a5dbebf483168c7dcce84d9

6 months ago(backport) build-sys: Detect whether struct statx is defined in sys/stat.h
Filipe Brandenburger [Mon, 16 Jul 2018 05:43:35 +0000 (22:43 -0700)]
(backport) build-sys: Detect whether struct statx is defined in sys/stat.h

Starting with glibc 2.27.9000-36.fc29, include file sys/stat.h will have a
definition for struct statx, in which case include file linux/stat.h should be
avoided, in order to prevent a duplicate definition.

    In file included from ../src/basic/missing.h:18,
     from ../src/basic/util.h:28,
     from ../src/basic/hashmap.h:10,
     from ../src/shared/bus-util.h:12,
     from ../src/libsystemd/sd-bus/bus-creds.c:11:
    /usr/include/linux/stat.h:99:8: error: redefinition of ‘struct statx’
     struct statx {
    ^~~~~
    In file included from /usr/include/sys/stat.h:446,
     from ../src/basic/util.h:19,
     from ../src/basic/hashmap.h:10,
     from ../src/shared/bus-util.h:12,
     from ../src/libsystemd/sd-bus/bus-creds.c:11:
    /usr/include/bits/statx.h:36:8: note: originally defined here
     struct statx
    ^~~~~

Extend our meson.build to look for struct statx when only sys/stat.h is
included and, in that case, do not include linux/stat.h anymore.

Tested that systemd builds correctly when using a glibc version that includes a
definition for struct statx.

glibc Fedora RPM update:
https://src.fedoraproject.org/rpms/glibc/c/28cb5d31fc1e5887912283c889689c47076278ae

glibc upstream commit:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=fd70af45528d59a00eb3190ef6706cb299488fcd

Change-Id: I830760b930f8ebe51198b0e9bdb00d7049b395a8

6 months agoMerge v238 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:26:26 +0000 (13:26 +0100)]
Merge v238 into tizen

Change-Id: I261f8d0cfeadd74ee404b13a5d9b4b46db486d26
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agobus: optionally call a callbacks for cleanup
Zbigniew Jędrzejewski-Szmek [Wed, 6 Jun 2018 09:07:02 +0000 (11:07 +0200)]
bus: optionally call a callbacks for cleanup

This adds a function sd_bus_slot_set_destroy_callback() to set a function
which can free userdata or perform other cleanups.

sd_bus_slot_get_destory_callback() queries the callback, and is included
for completeness.

Without something like this, for floating asynchronous callbacks, which might
be called or not, depending on the sequence of events, it's hard to perform
resource cleanup. The alternative would be to always perform the cleanup from
the caller too, but that requires more coordination and keeping of some shared
state. It's nicer to keep the cleanup contained between the callback and the
function that requests the callback.

6 months agoMerge v237 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:17:01 +0000 (13:17 +0100)]
Merge v237 into tizen

Change-Id: I0e849c25b44125aee499a2c9a356618e8844de5e
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agoMerge v236 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 12:07:22 +0000 (13:07 +0100)]
Merge v236 into tizen

Change-Id: I912b2d8f996d147ffef5dc7337f7958dc2141300
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agoMerge v235 into tizen
Łukasz Stelmach [Thu, 25 Jan 2024 11:23:41 +0000 (12:23 +0100)]
Merge v235 into tizen

Change-Id: I74295635332c605e79c74050881fb6848b0879a7
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months ago(backport) strv: rework FOREACH_STRING() macro
Lennart Poettering [Tue, 15 Jan 2019 23:13:38 +0000 (00:13 +0100)]
(backport) strv: rework FOREACH_STRING() macro

So it's apparently problematic that we use STRV_MAKE() (i.e. a compound
initializer) outside of the {} block we use it in (and that includes
outside of the ({}) block, too). Hence, let's rework the macro to not
need that.

This also makes the macro shorter, which is definitely a good and more
readable. Moreover, it will now complain if the iterator is a "char*"
instead of a "const char*", which is good too.

Fixes: #11394
Change-Id: Ibc21cdd5583c3b6a079b8691bbac5e076819432a

6 months ago(backport) sysctl: Don't pass null directive argument to '%s'
Khem Raj [Mon, 17 Dec 2018 04:53:38 +0000 (20:53 -0800)]
(backport) sysctl: Don't pass null directive argument to '%s'

value pointer here is always NULL but  subsequent use of that pointer
with a %s format will always be NULL, printing p instead would be a
valid string

Change-Id: Ib74f46d69eaf5e3d149523d53beef1f060a5fc16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 months ago(backport) Fix format-truncation compile failure by typecasting USB IDs (#8250)
Patrick Uiterwijk [Thu, 22 Feb 2018 18:41:30 +0000 (19:41 +0100)]
(backport) Fix format-truncation compile failure by typecasting USB IDs (#8250)

This patch adds safe_atoux16 for parsing an unsigned hexadecimal 16bit int, and
uses that for parsing USB device and vendor IDs.

This fixes a compile error with gcc-8 because while we know that USB IDs are 2 bytes,
the compiler does not know that.

../src/udev/udev-builtin-hwdb.c:80:38: error: '%04X' directive output may be
truncated writing between 4 and 8 bytes into a region of size between 2 and 6
[-Werror=format-truncation=]

Change-Id: I40b2eb8b424c57ba430b217ebead2fc5d67bbb14
Signed-off-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
6 months ago(backport) udev/net-id: check all snprintf return values
Zbigniew Jędrzejewski-Szmek [Fri, 23 Feb 2018 10:12:19 +0000 (11:12 +0100)]
(backport) udev/net-id: check all snprintf return values

gcc-8 throws an error if it knows snprintf might truncate output and the
return value is ignored:
../src/udev/udev-builtin-net_id.c: In function 'dev_pci_slot':
../src/udev/udev-builtin-net_id.c:297:47: error: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 4095 [-Werror=format-truncation=]
                 snprintf(str, sizeof str, "%s/%s/address", slots, dent->d_name);
                                               ^~
../src/udev/udev-builtin-net_id.c:297:17: note: 'snprintf' output between 10 and 4360 bytes into a destination of size 4096
                 snprintf(str, sizeof str, "%s/%s/address", slots, dent->d_name);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

Let's check all return values. This actually makes the code better, because there's
no point in trying to open a file when the name has been truncated, etc.

Change-Id: I52c289a5e4d660c999383ee628c596e00c30af21

6 months ago(backport) core: Fix use after free case in load_from_path()
Khem Raj [Mon, 17 Dec 2018 04:58:35 +0000 (20:58 -0800)]
(backport) core: Fix use after free case in load_from_path()

ensure that mfree() on filename is called after the logging function
which uses the string pointed by filename

Change-Id: I126ff9068ff62ab658cafb80f0c8c12398e321ba
Signed-off-by: Khem Raj <raj.khem@gmail.com>
6 months ago(backport) sd-radv: avoid redefinition of struct in6_addr
Hans-Christian Noren Egtvedt [Mon, 25 Sep 2017 14:39:32 +0000 (16:39 +0200)]
(backport) sd-radv: avoid redefinition of struct in6_addr

Both netinet/icmp6.h and linux/in6.h will define struct in6_addr, and in
user space we want to use the netinet/icmp6.h variant.

Fixes build problem:
In file included from src/libsystemd-network/sd-radv.c:23:0:
/home/hegtvedt/work/os/product/sunrise/root/_build/v2/include/linux/in6.h:30:8:
error: redefinition of 'struct in6_addr'

Change-Id: I5e36d3a8a2f73681241436ab02fec4440a6a1902

6 months ago(backport) meson: rename -Ddebug to -Ddebug-extra
Zbigniew Jędrzejewski-Szmek [Sun, 19 Aug 2018 17:11:30 +0000 (19:11 +0200)]
(backport) meson: rename -Ddebug to -Ddebug-extra

Meson added -Doptimization and -Ddebug options, which obviously causes
a conflict with our -Ddebug options. Let's rename it.

Fixes #9883.

Change-Id: Ie9b822d6b18b551c56158447cc042faceb805842

6 months ago(backport) meson: allow systemd.directives and .index to be built if -Dman=false
Zbigniew Jędrzejewski-Szmek [Sun, 8 Jul 2018 13:14:46 +0000 (15:14 +0200)]
(backport) meson: allow systemd.directives and .index to be built if -Dman=false

See 559d215b6733bb46533a52080522a7feca183aa8 for justification.

Change-Id: I1355f202ffc0492203b28fa23fe33601fc6c31cb

6 months ago(backport) meson: restore building of man pages on demand even if -Dman=false
Zbigniew Jędrzejewski-Szmek [Fri, 24 Nov 2017 13:00:29 +0000 (14:00 +0100)]
(backport) meson: restore building of man pages on demand even if -Dman=false

I want to configure -Dman=false for speed, but be able to build a specific
man page sometimes to check my edits. Commit 5b316b9ea6c broke this by mistake.
Let's adjust the condition to better match the logic of disabling tests only
if xsltproc is really not found.

Change-Id: Ife24351843f33a8e9da503fdba437e7acf513ad6

6 months agoMerge v234 into tizen
Łukasz Stelmach [Wed, 10 Jan 2024 22:30:39 +0000 (23:30 +0100)]
Merge v234 into tizen

Change-Id: I1d9ddc87c40adffae7aaf5cd93a16d2d31309073
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
6 months agotests: correct test-bus-benchmark test name
Adrian Szyndela [Tue, 25 Feb 2020 15:51:26 +0000 (16:51 +0100)]
tests: correct test-bus-benchmark test name

Additionally, move the entry to the alphabetically correct position after
the name change.

Change-Id: I348bae84a948eb35cfcb9858465156c66b6f01eb

6 months agoIncrease the max number of INotify instances per real user ID
Hyotaek Shim [Mon, 17 Feb 2020 04:54:18 +0000 (13:54 +0900)]
Increase the max number of INotify instances per real user ID

Change-Id: I49a2ed1881d03def82be5a83ae5b6eb0db01ce6c
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agoExclude systemd-remount-fs.service
INSUN PYO [Wed, 22 Jan 2020 02:21:43 +0000 (11:21 +0900)]
Exclude systemd-remount-fs.service

Change-Id: I653420164edb44a7a941f5c98887dc3ee6d4852e

6 months agoApply priv_keygrab:r ACL rule to /dev/input
Hyotaek Shim [Thu, 9 Jan 2020 09:23:18 +0000 (18:23 +0900)]
Apply priv_keygrab:r ACL rule to /dev/input

Change-Id: I8174ccd81aa3970a76a6f3680234dae77d920429
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agomissing_syscall: when adding syscall replacements, use different names (#8229)
Zbigniew Jędrzejewski-Szmek [Wed, 21 Feb 2018 13:04:50 +0000 (14:04 +0100)]
missing_syscall: when adding syscall replacements, use different names (#8229)

In meson.build we check that functions are available using:
    meson.get_compiler('c').has_function('foo')
which checks the following:
- if __stub_foo or __stub___foo are defined, return false
- if foo is declared (a pointer to the function can be taken), return true
- otherwise check for __builtin_memfd_create

_stub is documented by glibc as
   It defines a symbol '__stub_FUNCTION' for each function
   in the C library which is a stub, meaning it will fail
   every time called, usually setting errno to ENOSYS.

So if __stub is defined, we know we don't want to use the glibc version, but
this doesn't tell us if the name itself is defined or not. If it _is_ defined,
and we define our replacement as an inline static function, we get an error:

In file included from ../src/basic/missing.h:1358:0,
                 from ../src/basic/util.h:47,
                 from ../src/basic/calendarspec.h:29,
                 from ../src/basic/calendarspec.c:34:
../src/basic/missing_syscall.h:65:19: error: static declaration of 'memfd_create' follows non-static declaration
 static inline int memfd_create(const char *name, unsigned int flags) {
                   ^~~~~~~~~~~~
.../usr/include/bits/mman-shared.h:46:5: note: previous declaration of 'memfd_create' was here
 int memfd_create (const char *__name, unsigned int __flags) __THROW;
     ^~~~~~~~~~~~

To avoid this problem, call our inline functions different than glibc,
and use a #define to map the official name to our replacement.

Fixes #8099.

v2:
- use "missing_" as the prefix instead of "_"

v3:
- rebase and update for statx()

  Unfortunately "statx" is also present in "struct statx", so the define
  causes issues. Work around this by using a typedef.

I checked that systemd compiles with current glibc
(glibc-devel-2.26-24.fc27.x86_64) if HAVE_MEMFD_CREATE, HAVE_GETTID,
HAVE_PIVOT_ROOT, HAVE_SETNS, HAVE_RENAMEAT2, HAVE_KCMP, HAVE_KEYCTL,
HAVE_COPY_FILE_RANGE, HAVE_BPF, HAVE_STATX are forced to 0.

Setting HAVE_NAME_TO_HANDLE_AT to 0 causes an issue, but it's not because of
the define, but because of struct file_handle.

(backported from commit 5187dd2c403caf92d09f3491e41f1ceb3f10491f)

Change-Id: I46ed455f1d0a7c6eacd69b04f22deb756cc7590f

6 months agofix includes
Matija Skala [Wed, 15 Mar 2017 12:21:10 +0000 (13:21 +0100)]
fix includes

linux/sockios.h is needed for the SIOCGSTAMPNS macro

xlocale.h is included indirectly in glibc and doesn't even exist in
other libcs

(cherry picked from commit 284d1cd0a12cad96a5ea61d1afb0dd677dbd147e)

Change-Id: I4c0c42b0a58fb79b165ac168a9ced6bca8e07152

6 months agonss-util: silence warning about deprecated RES_USE_INET6
Zbigniew Jędrzejewski-Szmek [Wed, 1 Feb 2017 00:55:33 +0000 (19:55 -0500)]
nss-util: silence warning about deprecated RES_USE_INET6

src/nss-resolve/nss-resolve.c: In function ‘_nss_resolve_gethostbyname_r’:
src/nss-resolve/nss-resolve.c:680:13: warning: RES_USE_INET6 is deprecated
 NSS_GETHOSTBYNAME_FALLBACKS(resolve);
             ^~~~~~~~~~~~~~~~~~~~~~~~~

In glibc bz #19582, RES_USE_INET6 was deprecated. This might make sense for
clients, but they didn't take into account nss module implementations which
*must* continue to support the option. glibc internally defines
DEPRECATED_RES_USE_INET6 which can be used without emitting a warning, but
it's not exported publicly. Let's do the same, and just copy the definition
to our header.

(cherry picked from commit 6154d33de3f15bbd5d5df718103af9c37ba0a768)

Change-Id: Ib3c91b6752800385429c51a95572a3b2b1d31ad3

6 months agocore: be stricter when handling PID files and MAINPID sd_notify() messages
Mateusz Moscicki [Mon, 18 Nov 2019 13:39:07 +0000 (14:39 +0100)]
core: be stricter when handling PID files and MAINPID sd_notify() messages

Let's be more restrictive when validating PID files and MAINPID=
messages: don't accept PIDs that make no sense, and if the configuration
source is not trusted, don't accept out-of-cgroup PIDs. A configuratin
source is considered trusted when the PID file is owned by root, or the
message was received from root.

This should lock things down a bit, in case service authors write out
PID files from unprivileged code or use NotifyAccess=all with
unprivileged code. Note that doing so was always problematic, just now
it's a bit less problematic.

When we open the PID file we'll now use the CHASE_SAFE chase_symlinks()
logic, to ensure that we won't follow an unpriviled-owned symlink to a
privileged-owned file thinking this was a valid privileged PID file,
even though it really isn't.

Fixes: #6632
(cherry picked from commit db256aab13d8a89d583ecd2bacf0aca87c66effc)

Resolves: #1663143

Change-Id: Id91df4fb9e46224a12dc6c260a1c3b8a9e4cc553

6 months agonotify: add new --uid= command
Mateusz Moscicki [Mon, 18 Nov 2019 12:23:52 +0000 (13:23 +0100)]
notify: add new --uid= command

The new --uid= switch allows selecting the UID from which the
notificaiton messages shall originate.

This is primarily useful for testing purposes, but might have other
uses.

(cherry picked from commit: 65c6b99094580afa186199d8091cd7536900526c)

Change-Id: I1531bb34818ef8daa3eb8a7c8e973ef9d4aa1ba1

6 months agosd-dameon: also sent ucred when our UID differs from EUID
Mateusz Moscicki [Mon, 18 Nov 2019 11:42:23 +0000 (12:42 +0100)]
sd-dameon: also sent ucred when our UID differs from EUID

Let's be explicit, and always send the messages from our UID and never
our EUID. Previously this behaviour was conditionalized only on whether
the PID was specified, which made this non-obvious.

(cherry picked from commit 9e1d021ee3f147486c5cfac69b3cbf6f4b36eb79)

Change-Id: I732ce2169e00f2f5fe8e7f7403d6f31dc66842a2

6 months agofs-util: add new chase_symlinks() flag CHASE_OPEN
Mateusz Moscicki [Wed, 20 Nov 2019 13:52:46 +0000 (14:52 +0100)]
fs-util: add new chase_symlinks() flag CHASE_OPEN

The new flag returns the O_PATH fd of the final component, which may be
converted into a proper fd by open()ing it again through the
/proc/self/fd/xyz path.

Together with O_SAFE this provides us with a somewhat safe way to open()
files in directories potentially owned by unprivileged code, where we
want to refuse operation if any symlink tricks are played pointing to
privileged files.

(cherry picked from commit 1ed34d75d4f21d2335c5625261954c848d176ae6)

Change-Id: I5e5ce0affec97e4d19483b4f534db99f4f950f89
Related: #1663143

6 months agofs-util: add new CHASE_SAFE flag to chase_symlinks()
Mateusz Moscicki [Wed, 20 Nov 2019 13:34:23 +0000 (14:34 +0100)]
fs-util: add new CHASE_SAFE flag to chase_symlinks()

When the flag is specified we won't transition to a privilege-owned
file or directory from an unprivileged-owned one. This is useful when
privileged code wants to load data from a file unprivileged users have
write access to, and validates the ownership, but want's to make sure
that no symlink games are played to read a root-owned system file
belonging to a different context.

(cherry picked from commit f14f1806e329fe92d01f15c22a384702f0cb4ae0)

Change-Id: I86dfede53114a23d708744a9c47abc9eaf05a8d1
Related: #1663143

6 months agobackport chase_symlinks
Mateusz Moscicki [Wed, 13 Nov 2019 15:32:24 +0000 (16:32 +0100)]
backport chase_symlinks

Related: #1663143

Change-Id: I57d945a208ade174c89ea2736357d8bce541a46f

6 months agopid1: process zero-length notification messages again
Zbigniew Jędrzejewski-Szmek [Thu, 29 Sep 2016 14:06:02 +0000 (16:06 +0200)]
pid1: process zero-length notification messages again

This undoes 531ac2b234. I acked that patch without looking at the code
carefully enough. There are two problems:
- we want to process the fds anyway
- in principle empty notification messages are valid, and we should
  process them as usual, including logging using log_unit_debug().

CVE-2016-7795

Change-Id: I1dfb10c7a3ffeb7a5ed9d0ace4a94bee36c846b4

6 months agologind: change the power key to disabled
INSUN PYO [Tue, 5 Nov 2019 02:51:19 +0000 (11:51 +0900)]
logind: change the power key to disabled

Tizen does not support power off without deviced.
So, you need to turn off the power key function in logind.

1. Disable TAG+="power-switch" uevent rules because logind uses "power-switch" uevent to recognize the power key.
2. Change default behavior for power key to ignore.

Change-Id: I0523d4cc46ce2edd05e479e9101c6d20f70b4296

6 months agoRemove the smack exec label of busctl
Hyotaek Shim [Mon, 7 Oct 2019 11:43:04 +0000 (20:43 +0900)]
Remove the smack exec label of busctl

Change-Id: Iaab47bd04b0c480fa2c2e9e5deeeded9d461c4b4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agoChange smack label of /dev/full from '_' to '*'
Hyungju Lee [Tue, 10 Sep 2019 02:06:08 +0000 (11:06 +0900)]
Change smack label of /dev/full from '_' to '*'

Change-Id: I706f14f7e8d767b0d7904a08e793f424c47e001b

6 months agoAdd dbus policy for org.tizen.system.BootingDone
Hyotaek Shim [Thu, 22 Aug 2019 11:46:11 +0000 (20:46 +0900)]
Add dbus policy for org.tizen.system.BootingDone

Change-Id: I8f0bd7887b5f1cbd7637c00e03240e4d5e09e4c7
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agoUse separate udev tag for devices in user session
Paweł Szewczyk [Fri, 26 Jul 2019 08:48:24 +0000 (10:48 +0200)]
Use separate udev tag for devices in user session

The system-user tag can be used to mark devices that will be enumerated by
systemd in 'systemd --user' instance.

Change-Id: I5889f50df6c329de36c2544ee5cf1ba1c52ad433
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 months agoRework delayed.target
INSUN PYO [Fri, 19 Jul 2019 08:23:57 +0000 (17:23 +0900)]
Rework delayed.target

start delayed.service --> finish default.target --> start all of delayed.service -->
finish delayed.target --> StartupFinished

Change-Id: I2f291ea8b5f535157eec4f105f2c37b0cea448c9

6 months agoChange the config value of the "RemainAfterExit=" ("true" -> "yes")
INSUN PYO [Wed, 26 Jun 2019 00:12:45 +0000 (09:12 +0900)]
Change the config value of the "RemainAfterExit=" ("true" -> "yes")

Change-Id: I56db28be6f0cecd0562ba8db6bb1d4af0b1a3b7b

6 months agoAdd delayed target
INSUN PYO [Fri, 7 Jun 2019 06:30:41 +0000 (15:30 +0900)]
Add delayed target

Change-Id: I0527d1387500c699be0fbc319c702a77d9ae587b

6 months agoChange the default smack label of /dev
Hyotaek Shim [Wed, 8 May 2019 11:55:31 +0000 (20:55 +0900)]
Change the default smack label of /dev

(Before)
smack access label: *
default access label: _

(After)
smack access label: *
default access label: *

Change-Id: Iffd4793655a8080501388d40a2f812269b8613cb
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agoAdd SECLABEL for /dev/net/tun
Cheoleun Moon [Fri, 19 Apr 2019 07:31:03 +0000 (16:31 +0900)]
Add SECLABEL for /dev/net/tun

Change smack label of /dev/net/tun to *

Change-Id: Ie3c7d4e908a077064cb4d5ba5e4e082a7409da64
Signed-off-by: Cheoleun Moon <chleun.moon@samsung.com>
6 months agoRevert "core: fix the CGROUP spawning error as a workaround"
INSUN PYO [Tue, 16 Apr 2019 04:25:07 +0000 (13:25 +0900)]
Revert "core: fix the CGROUP spawning error as a workaround"

This reverts commit adce88455e758166ad4f2103724cd34c11c5f141.

Change-Id: Ie76d6183f8f5966fa9187666a5777c1c50926353

6 months agoFixed an incorrect parameter passing to the log function.
INSUN PYO [Mon, 15 Apr 2019 11:13:25 +0000 (20:13 +0900)]
Fixed an incorrect parameter passing to the log function.

Change-Id: I5274fd466e79b7773c4903fcfc17f89b3e5cad53

6 months agoEnable stack protection option, -fstack-clash-protection
Hyotaek Shim [Mon, 15 Apr 2019 07:08:10 +0000 (16:08 +0900)]
Enable stack protection option, -fstack-clash-protection

http://suprem.sec.samsung.net/jira/browse/SATIZENVUL-1930
http://suprem.sec.samsung.net/jira/browse/SATIZENVUL-1933

Change-Id: I0c3292fd0d7fdd69a1aa902a1e9d8b75a6f11d87
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agojournal: do not remove multiple spaces after identifier in syslog message
Yu Watanabe [Fri, 10 Aug 2018 02:07:54 +0000 (11:07 +0900)]
journal: do not remove multiple spaces after identifier in syslog message

Single space is used as separator.
C.f. discussions in #156.

Fixes #9839 introduced by a6aadf4ae0bae185dc4c414d492a4a781c80ffe5.

Change-Id: I2cabac6e0d99634aeb148b4d7698a67d84b546dd

6 months agojournal: fix syslog_parse_identifier()
Yu Watanabe [Wed, 8 Aug 2018 06:06:36 +0000 (15:06 +0900)]
journal: fix syslog_parse_identifier()

Fixes #9829.

Change-Id: I6d48464ad02397990973c93153cdbf2e0a6e26cd

6 months agobusctl: set execute label as 'System'
sanghyeok.oh [Tue, 29 Jan 2019 07:19:49 +0000 (16:19 +0900)]
busctl: set execute label as 'System'

Change-Id: Id76f4cc5c2ab52c61355033fb4bcf8681d2cedbf
Signed-off-by: sanghyeok.oh <sanghyeok.oh@samsung.com>
6 months agoMinor fix regarding "update-alternatives --remove systemd-shutdown.."
Hyotaek Shim [Fri, 25 Jan 2019 08:50:42 +0000 (17:50 +0900)]
Minor fix regarding "update-alternatives --remove systemd-shutdown.."

Change-Id: I33510d36510a468c9fa67265f3ba3e73934080a0
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agotizen: Allow replacing systemd-shutdown
Karol Lewandowski [Wed, 9 Jan 2019 15:16:19 +0000 (16:16 +0100)]
tizen: Allow replacing systemd-shutdown

This will be used by deviced to install custom shutdown handler.

Change-Id: I1f921fbae7d05f9ba937bb68cfa997a310407484

6 months agofd-util: Fix error handling in safe_fclose
Paweł Szewczyk [Fri, 30 Nov 2018 11:35:23 +0000 (12:35 +0100)]
fd-util: Fix error handling in safe_fclose

Function fclose_nointr returns negative value on error.

Change-Id: I881469ed78037d531d73e41c77b57aab004a713a
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 months agotizen: All logins should use User::Shell smack label
Karol Lewandowski [Thu, 15 Nov 2018 13:02:51 +0000 (14:02 +0100)]
tizen: All logins should use User::Shell smack label

Change-Id: I8c0e7de59689aa83bd0273af4a66dd7a8f823ec9

6 months agoRemove kdbus interface header
Michal Bloch [Mon, 5 Nov 2018 14:26:39 +0000 (15:26 +0100)]
Remove kdbus interface header

kdbus.h is now provided with other linux kernel headers.

Change-Id: Ida7d06aa1f27d88040f949fffd73f0d6cfd5f23e
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
6 months agocore: don't drop timer expired but not yet processed when system date is changed
Hyotaek Shim [Thu, 1 Nov 2018 04:38:43 +0000 (13:38 +0900)]
core: don't drop timer expired but not yet processed when system date is changed

There is difference between time set by the user and real elapsed time because of accuracy feature.
If you change the system date(or time) between these times, the timer drops.

You can easily reproduce it with the following command.
-----------------------------------------------------------
$ systemd-run --on-active=3s ls; sleep 3; date -s "`date`"
-----------------------------------------------------------

In the following command, the problem is rarely reproduced. But it exists.
---------------------------------------------------------------------------------------------
$ systemd-run --on-active=3s --timer-property=AccuracySec=1us ls ; sleep 1; date -s "`date`"
---------------------------------------------------------------------------------------------

Note : Global AccuracySec value.
----------------------------------------------------------------------
$ cat /etc/systemd/system.conf
DefaultTimerAccuracySec=1min
----------------------------------------------------------------------

Origin source: https://github.com/systemd/systemd/commit/fee04d7f3ab810e99b97535ca5fda2f9517acda9

Change-Id: Ibaaa89bec9c55f43336388ee85f07b89c1a50ea4
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agosocket: Serialize auxiliary file descriptors
Paweł Szewczyk [Fri, 5 Oct 2018 12:48:39 +0000 (14:48 +0200)]
socket: Serialize auxiliary file descriptors

When socket is serialized/deserialized it's important to keep all file
descriptors. This commit adds the serialization of auxiliary fds.

For now, only ffs sockets are using auxiliary descriptors.

Change-Id: I5fea0152fee51560e160fe5df4806b55a5b369d6
Signed-off-by: Paweł Szewczyk <p.szewczyk@samsung.com>
6 months agoD-Bus policy configs: fixed rules
Adrian Szyndela [Fri, 21 Sep 2018 14:11:05 +0000 (16:11 +0200)]
D-Bus policy configs: fixed rules

Removed duplicate rules in all three configs, and specified proper sender
for receiving ActivationRequest signal in org.freedesktop.systemd1.conf.

Change-Id: I550c07ede30a0bb70a9bb3ca00d5771e1722826b

6 months agoRemove build warnings
pr.jung [Mon, 17 Sep 2018 06:39:43 +0000 (15:39 +0900)]
Remove build warnings

- Add TIZEN_JOURNALD_KMSG
- Print kmsg log on dlogutil because journald is heavier than dlogutil

Change-Id: I763cfccbb0d877c52d8448de4a50966a33c84981
Signed-off-by: pr.jung <pr.jung@samsung.com>
6 months agoSet the smack label of executable binary tools
Hyotaek Shim [Wed, 5 Sep 2018 09:23:10 +0000 (18:23 +0900)]
Set the smack label of executable binary tools

Apps (3rd party and even in-house Apps) are not permitted to run systemd tools directly.
User System::Tools rx
User::Shell System::Tools rx
System::TEF System::Tools rx
System::Privileged System::Tools rx
System System::Tools rx

Change-Id: I55a9b00a6ec0583d4673d9a41cdda7fbd9e23310
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agoautomount: ack automount requests even when already mounted
Anchor Cat [Wed, 10 May 2017 11:23:58 +0000 (21:23 +1000)]
automount: ack automount requests even when already mounted

If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started:

  systemd forks and execs mount             ...
            ...                     access autofs, blocks
  mount exits                               ...
  systemd receives SIGCHLD                  ...
            ...                     kernel sends request
  systemd receives request                  ...

systemd needs to respond to this request, otherwise the kernel will
continue to block access to the mount point.

Cherry-picked from https://github.com/systemd/systemd/commit/e7d54bf58789545a9eb0b3964233defa0b007318
Change-Id: Ibacc2c0ffee32846321864987324763214648732
(cherry picked from commit 5ccd5b2efc60d9f775a812878528f06b01189da5)

6 months agoRevert "resolved: apply epoch to system time from PID 1"
Hyotaek Shim [Wed, 27 Jun 2018 10:47:30 +0000 (19:47 +0900)]
Revert "resolved: apply epoch to system time from PID 1"

This reverts commit 021dd87bc055a5bfb2dcef83fc868fe24648b959.

In Tizen Watch products, users can set the RTC as they want, even to the past.
Here, it has been observed that the system clock is reset every booting.

For instance,
1) After a boot, Kernel RTC is 2018-01-02.

2) Since the system clock initialized by RTC is 2018-01-02 is less than 2018-06-27 (TIME_EPOCH_USEC),
Systemd resets the system clock as TIME_EPOCH_USEC, but does not modify RTC.
Although the system clock shown to users is not an intended value, the time goes by to 2018-06-28.

3) After another reboot, the system clock is restored to 2018-06-27 (TIME_EPOCH_USEC)
because RTC is still less than TIME_EPOCH_USEC.

Change-Id: Ib2c61e9b1fd9d4b0d33f99868dda1daaec21878d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 months agospec: configure rpmmacrosdir instead of manually installing rpm macros
Łukasz Stelmach [Fri, 31 Mar 2017 11:05:09 +0000 (13:05 +0200)]
spec: configure rpmmacrosdir instead of manually installing rpm macros

Change-Id: Iec5f938f97695f8eafcfc4f3b0b120d5fe77a54e

6 months agoinstall: fix disable when /etc/systemd/system is a symlink
Lukas Nykryn [Tue, 30 Aug 2016 13:04:07 +0000 (15:04 +0200)]
install: fix disable when /etc/systemd/system is a symlink

Change-Id: I1bafa3e4bfea556e2abceee33b2b2bc6ab97b137
Origin: https://github.com/systemd/systemd/commit/67852d08e6a35d34b428e8be64efdb3f003f4697