Re: [systemd-devel] MemoryLimit for user unit

2017-11-12 Thread WaLyong Cho
On 2017년 11월 13일 09:53, Kai Krakow wrote: > Am Sun, 12 Nov 2017 18:14:38 +0100 > schrieb Stefan Schweter : > >> Hi systemd-users, >> >> I tried to add a memory limit for a user service unit (inspired by >> [1]), it looks like: >> >> [Service] >> # >> MemoryAccounting=true

[systemd-devel] Supporting properties(configurations) system

2016-03-06 Thread WaLyong Cho
Hi, As you may know, Android has properties. http://developer.android.com/reference/java/util/Properties.html In the desktop side, it maybe similar with configuration system such like gconf. I hope the configurations are supporting write protected(ro) and writable(rw). To control this, I think

Re: [systemd-devel] [RFC] exec: introduce StandardOutputFile/StandardErrorFile option

2015-05-18 Thread WaLyong Cho
On 2015년 05월 19일 12:53, Andrei Borzenkov wrote: В Tue, 19 May 2015 11:49:45 +0900 WaLyong Cho walyong@samsung.com пишет: On 2015년 05월 19일 11:44, WaLyong Cho wrote: To redirect stdout/stderr to file add 'file' option to StandardOutput/StandardError. And to specify the file path, add

Re: [systemd-devel] [RFC] exec: introduce StandardOutputFile/StandardErrorFile option

2015-05-18 Thread WaLyong Cho
On 2015년 05월 19일 11:44, WaLyong Cho wrote: To redirect stdout/stderr to file add 'file' option to StandardOutput/StandardError. And to specify the file path, add StandardOutputFile/StandardErrorFile option. If only set StandardOutput/StandardError to 'file' without set of StandardOutputFile

[systemd-devel] [RFC] exec: introduce StandardOutputFile/StandardErrorFile option

2015-05-18 Thread WaLyong Cho
To redirect stdout/stderr to file add 'file' option to StandardOutput/StandardError. And to specify the file path, add StandardOutputFile/StandardErrorFile option. If only set StandardOutput/StandardError to 'file' without set of StandardOutputFile/StandardErrorFile option, then it will be

[systemd-devel] How can I map PID between host and container?

2015-04-23 Thread WaLyong Cho
Hello, I'm looking for a proper way what method to map PID between host and container. In case of systemctl, if I know pid in container(let's call this pid_c) then I can find the pid in sight of host(let's call this pid_h) by using systemctl -M {container} pid_c in host shell. But I can not find

[systemd-devel] [RFC] core: introduce ExitOnIdle= and ExitOnIdleSec=

2015-04-20 Thread WaLyong Cho
If a service does not consume CPU during some time(can be configured by ExitOnIdleSec=) and set to stopped on idle state(ExitOnIdle=), the service will be stopped. This can be useful if the service provides some of activation methods. --- src/core/load-fragment-gperf.gperf.m4 | 2 +

Re: [systemd-devel] [RFC] core: introduce ExitOnIdle= and ExitOnIdleSec=

2015-04-20 Thread WaLyong Cho
On 04/21/2015 12:10 AM, Lennart Poettering wrote: On Mon, 20.04.15 23:56, WaLyong Cho (walyong@samsung.com) wrote: If a service does not consume CPU during some time(can be configured by ExitOnIdleSec=) and set to stopped on idle state(ExitOnIdle=), the service will be stopped. This can

Re: [systemd-devel] regarding to cgroup siblings mask

2015-04-08 Thread WaLyong Cho
On 2015년 04월 09일 01:48, Lennart Poettering wrote: On Tue, 24.03.15 20:29, WaLyong Cho (walyong@samsung.com) wrote: Hi, In recent systemd(from some month ago), when a unit has a mask for cpu or blockio or memory, this mask is also propagated to siblings by unit_get_target_mask

Re: [systemd-devel] [RFC] activate on DBus signal

2015-04-08 Thread WaLyong Cho
On 2015년 04월 09일 02:05, Lennart Poettering wrote: On Mon, 23.03.15 17:54, WaLyong Cho (walyong@samsung.com) wrote: Hi, Now, I'm looking for a method to a service be activated on special DBus signal. If a process is running for waiting some of DBus signal this can be useful. I already

Re: [systemd-devel] regarding to cgroup siblings mask

2015-03-30 Thread WaLyong Cho
On 03/31/2015 05:13 AM, David Timothy Strauss wrote: On Fri, Mar 27, 2015 at 7:56 PM, WaLyong Cho walyong@gmail.com wrote: Hmm, it seems not. When I added MemoryLimit= option to just one service, cgroups for every unit were generated on memory cgroup. It looks like memory_limit

[systemd-devel] [PATCH] cgroup: propagate cgroup mask only for proportional properties

2015-03-27 Thread WaLyong Cho
Some of cgroup properties does not affect to sibling cgroups. CPUShares and BlockIOWeight are only needed to be propagated. --- src/core/cgroup.c | 29 - src/core/cgroup.h | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/core/cgroup.c

Re: [systemd-devel] regarding to cgroup siblings mask

2015-03-27 Thread WaLyong Cho
On 03/28/2015 09:25 AM, David Timothy Strauss wrote: On Thu, Mar 26, 2015 at 7:33 PM, WaLyong Cho walyong@samsung.com wrote: Thanks, understood. But I think this propagation is needed only for taking weight argument such like CPUShares=weight, StartupCPUShares=weight, BlockIOWeight=weight

Re: [systemd-devel] regarding to cgroup siblings mask

2015-03-26 Thread WaLyong Cho
On 03/27/2015 05:33 AM, David Timothy Strauss wrote: On Tue, Mar 24, 2015 at 4:29 AM, WaLyong Cho walyong@samsung.com wrote: Could anyone explain why? An admin using CPUShares= or a similar proportional CGroup controller probably assumes that setting the shares to twice the default

[systemd-devel] regarding to cgroup siblings mask

2015-03-24 Thread WaLyong Cho
Hi, In recent systemd(from some month ago), when a unit has a mask for cpu or blockio or memory, this mask is also propagated to siblings by unit_get_target_mask(). According to some of comments, it seems intentional. Could anyone explain why? In our system, some of service have MemoryLimit=

[systemd-devel] [RFC] activate on DBus signal

2015-03-23 Thread WaLyong Cho
Hi, Now, I'm looking for a method to a service be activated on special DBus signal. If a process is running for waiting some of DBus signal this can be useful. I already told with Simon in DBus mailing list. see this thread: http://lists.freedesktop.org/archives/dbus/2015-March/016607.html

[systemd-devel] Needs help for on charging activation

2015-03-09 Thread WaLyong Cho
Hi, I want to find best solution on our case. Our product is mobile device. But I don't think that is only problem of mobile device. That also can be problem of laptop. So, please comment to me. We have some of services are always running after system is started up as default. They don't need to

[systemd-devel] [PATCH] bootchart: display each CPU utilization/wait

2015-02-12 Thread WaLyong Cho
--- src/bootchart/bootchart.c| 38 +- src/bootchart/bootchart.conf | 1 + src/bootchart/bootchart.h| 1 + src/bootchart/svg.c | 65 +--- 4 files changed, 70 insertions(+), 35 deletions(-) diff --git

[systemd-devel] [PATCH] unit: update unit dropin paths and time when dropin file is written.

2014-12-09 Thread WaLyong Cho
If a unit is set property by systemctl set-property, a new dropin file is generated. But the unit's dropin_paths and dropin_mtime are not updated. So the unit is shown as need daemon reload. Update unit dropin_paths and dropin_mtime also when dropin file is written. --- src/core/unit.c | 21

Re: [systemd-devel] [PATCH v7] run: introduce timer support option

2014-12-09 Thread WaLyong Cho
On 12/10/2014 02:25 AM, Lennart Poettering wrote: On Tue, 09.12.14 16:07, WaLyong Cho (walyong@samsung.com) wrote: Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec

[systemd-devel] [PATCH v5 1/4] bus: StartTransientUnit can have aux unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-manager.c | 98 +++-- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 0994d7b..5fe06f9 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -615,6

[systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
--- src/shared/time-util.c | 52 ++ src/shared/time-util.h | 1 + src/test/test-time.c | 20 +++ 3 files changed, 73 insertions(+) diff --git a/src/shared/time-util.c b/src/shared/time-util.c index d3404af..d94be7e 100644 ---

[systemd-devel] [PATCH v5 4/4] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer respectively. And OnCalendar= and WakeSystem=

[systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
--- src/shared/time-util.c | 63 ++ src/shared/time-util.h | 1 + src/test/test-time.c | 20 3 files changed, 84 insertions(+) diff --git a/src/shared/time-util.c b/src/shared/time-util.c index d3404af..a45341d 100644 ---

Re: [systemd-devel] [PATCH v5 2/4] util: introduce new sec_to_stringa()

2014-12-08 Thread WaLyong Cho
On 12/08/2014 11:41 PM, Lennart Poettering wrote: On Mon, 08.12.14 21:18, WaLyong Cho (walyong@samsung.com) wrote: +int sec_to_stringa(const char *t, usec_t usec, const char **time) { +static const struct { +const char *suffix; +usec_t usec

[systemd-devel] [PATCH v6 2/3] timer: timer can be a transient unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-timer.c | 143 ++ src/core/dbus-timer.h | 3 ++ src/core/timer.c | 4 ++ 3 files changed, 150 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..43e7852 100644 ---

[systemd-devel] [PATCH v6 1/3] bus: StartTransientUnit can have aux unit

2014-12-08 Thread WaLyong Cho
--- src/core/dbus-manager.c | 98 +++-- 1 file changed, 86 insertions(+), 12 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 0994d7b..5fe06f9 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@ -615,6

Re: [systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-08 Thread WaLyong Cho
On 12/09/2014 12:10 AM, Lennart Poettering wrote: On Mon, 08.12.14 15:32, WaLyong Cho (walyong@samsung.com) wrote: Hi, First, I'd like to ask unit property should be applied immediately when systemctl set-property is called? If yes, after systemctl set-property, why we can see

Re: [systemd-devel] [PATCH v6 3/3] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
On 12/09/2014 12:38 AM, Lennart Poettering wrote: On Tue, 09.12.14 00:03, WaLyong Cho (walyong@samsung.com) wrote: } else { log_error(Unknown assignment %s., assignment); return -EINVAL; diff --git a/src/run/run.c b/src/run/run.c index 85eb052

[systemd-devel] [PATCH v7] run: introduce timer support option

2014-12-08 Thread WaLyong Cho
Support timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec=, OnCalendar= of timer respectively. And OnCalendar= and WakeSystem=

[systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-07 Thread WaLyong Cho
Currently, unit property set apis set unit property and also make a dropin files in each dbus-xyz.c. And the dropin will set its properties again in unit_load(). So don't need to set property immediatly. That will be set next unit_load(). Just write dropin files only. --- src/core/dbus-cgroup.c

Re: [systemd-devel] [RFC] [PATCH] core: avoid duplicate unit property set

2014-12-07 Thread WaLyong Cho
operation when systemd-run is called. The first will be set by transient property set in method call handler. The second will be set by unit_load_dropin() the last actual load. What it the most proper way? WaLyong On 12/08/2014 03:12 PM, WaLyong Cho wrote: Currently, unit property set apis set unit

Re: [systemd-devel] [PATCH v4 3/4] unit: add UnitMask enum and get unit scope(mask) api from property

2014-12-04 Thread WaLyong Cho
On 12/04/2014 03:43 AM, Lennart Poettering wrote: On Tue, 02.12.14 23:29, WaLyong Cho (walyong@samsung.com) wrote: Hmm, what's the rationale for this? Can you elaborate? As you already noticed(on the 4th mail), this hash table is used to find unit can have a given property. As you said

Re: [systemd-devel] [PATCH v4] run: introduce timer support option

2014-12-04 Thread WaLyong Cho
On 12/04/2014 03:44 AM, Lennart Poettering wrote: On Tue, 02.12.14 23:35, WaLyong Cho (walyong@samsung.com) wrote: Supported timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec

[systemd-devel] [PATCH] unit: ignore generated systemd-bootchart.service

2014-12-03 Thread WaLyong Cho
--- units/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/units/.gitignore b/units/.gitignore index e12d299..3613cee 100644 --- a/units/.gitignore +++ b/units/.gitignore @@ -21,6 +21,7 @@ /systemd-ask-password-wall.service /systemd-backlight@.service /systemd-binfmt.service

Re: [systemd-devel] [PATCH v4 1/4] bus: StartTransientUnit can have aux unit

2014-12-03 Thread WaLyong Cho
On 12/04/2014 03:00 AM, Lennart Poettering wrote: On Tue, 02.12.14 23:29, WaLyong Cho (walyong@samsung.com) wrote: --- src/core/dbus-manager.c | 123 +--- 1 file changed, 105 insertions(+), 18 deletions(-) diff --git a/src/core/dbus

[systemd-devel] [PATCH v4 1/4] bus: StartTransientUnit can have aux unit

2014-12-02 Thread WaLyong Cho
--- src/core/dbus-manager.c | 123 +--- 1 file changed, 105 insertions(+), 18 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index 0994d7b..643aa8b 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@

[systemd-devel] [PATCH v4 2/4] timer: timer can be a transient unit

2014-12-02 Thread WaLyong Cho
--- src/core/dbus-timer.c | 159 ++ src/core/dbus-timer.h | 3 + src/core/timer.c | 4 ++ 3 files changed, 166 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..e916f5a 100644 ---

[systemd-devel] [PATCH v4 4/4] run: introduce timer support option

2014-12-02 Thread WaLyong Cho
Supported timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec= of timer respectively. --- man/systemd-run.xml | 42

[systemd-devel] [PATCH v4 3/4] unit: add UnitMask enum and get unit scope(mask) api from property

2014-12-02 Thread WaLyong Cho
--- Makefile.am | 7 ++ src/shared/.gitignore| 1 + src/shared/unit-name.c | 22 src/shared/unit-name.h | 26 + src/shared/unit-property-scope.gperf | 202 +++ 5 files changed, 258

[systemd-devel] [PATCH v4] run: introduce timer support option

2014-12-02 Thread WaLyong Cho
Supported timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec= of timer respectively. --- man/systemd-run.xml | 42

Re: [systemd-devel] [PATCH] bootchart: add standalone bootchart service

2014-12-02 Thread WaLyong Cho
On 12/03/2014 08:30 AM, Lennart Poettering wrote: On Sat, 15.11.14 15:42, WaLyong Cho (walyong@samsung.com) wrote: Heya, The suggested way to run boot chart is by specifying init=/usr/lib/systemd/systemd-bootchart on the kernel cmdline. What's the rationale behind making

[systemd-devel] [PATCH] add configuration for smackfs root

2014-11-26 Thread WaLyong Cho
The smackfs root was changed few month ago. But some of systems are still using old smackfs root. For compatibility, add smackfs root configure option. Default is /sys/fs/smackfs. --- Makefile.am | 1 + configure.ac| 7 +++ src/core/mount-setup.c | 2 +-

[systemd-devel] [PATCH v3] smack: introduce new SmackProcessLabel option

2014-11-24 Thread WaLyong Cho
In service file, if the file has some of special SMACK label in ExecStart= and systemd has no permission for the special SMACK label then permission error will occurred. To resolve this, systemd should be able to set its SMACK label to something accessible of ExecStart=. So introduce new

Re: [systemd-devel] [PATCH v2] smack: introduce new SmackLabelAccess option

2014-11-23 Thread WaLyong Cho
On 11/24/2014 02:36 AM, Zbigniew Jędrzejewski-Szmek wrote: On Fri, Nov 21, 2014 at 03:16:01PM +0900, WaLyong Cho wrote: In case of systemd has _ label and run as root, if a service file has User= option and the command line file has a special SMACK label then systemd will fail to access

[systemd-devel] [PATCH v2] smack: introduce new SmackLabelAccess option

2014-11-20 Thread WaLyong Cho
In case of systemd has _ label and run as root, if a service file has User= option and the command line file has a special SMACK label then systemd will fail to access to given file. SMACK label is ignored for root uid processes. But if a service has a User= then systemd will call setresuid() in

Re: [systemd-devel] Starting configurable set of services first

2014-11-19 Thread WaLyong Cho
On 10/28/2014 01:06 AM, Umut Tezduyar Lindskog wrote: On Wed, Oct 22, 2014 at 7:44 PM, Lennart Poettering lenn...@poettering.net wrote: On Tue, 02.09.14 10:06, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: Hi, I would like to start a configurable set of services first and the services

[systemd-devel] [PATCH] README: notice kernel config for CPUQuota

2014-11-18 Thread WaLyong Cho
--- README | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README b/README index aefb349..70d1105 100644 --- a/README +++ b/README @@ -82,6 +82,9 @@ REQUIREMENTS: CONFIG_CGROUP_SCHED CONFIG_FAIR_GROUP_SCHED +Required for CPUQuota in resource control unit

[systemd-devel] set rr scheduler failed with cpushares

2014-11-17 Thread WaLyong Cho
Hello, I'd made two different services. One has *CPUSchedulingPolicy=rr* and the others has *CPUShares=*. # cat foo.service [Unit] Description=foo has CPUSchedulingPolicy= [Service] RemainAfterExit=yes ExecStart=/bin/true CPUSchedulingPolicy=rr # cat bar.service [Unit] Description=bar has

[systemd-devel] [PATCH] bootchart: add standalone bootchart service

2014-11-14 Thread WaLyong Cho
--- Makefile.am| 9 + units/systemd-bootchart.service.in | 17 + 2 files changed, 26 insertions(+) create mode 100644 units/systemd-bootchart.service.in diff --git a/Makefile.am b/Makefile.am index 1aef242..b682606 100644 --- a/Makefile.am +++

[systemd-devel] [PATCH v2 2/2] bootchart: escape non printable process name

2014-11-12 Thread WaLyong Cho
--- src/bootchart/svg.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index faf377e..e5569e1 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -39,6 +39,7 @@ #include svg.h #include bootchart.h #include

[systemd-devel] [PATCH v2 1/2] utf8: intruduce utf8_escape_non_printable

2014-11-12 Thread WaLyong Cho
--- src/shared/utf8.c| 39 +++ src/shared/utf8.h| 1 + src/test/test-utf8.c | 25 + 3 files changed, 65 insertions(+) diff --git a/src/shared/utf8.c b/src/shared/utf8.c index 8702ceb..0b6c38e 100644 --- a/src/shared/utf8.c +++

[systemd-devel] [PATCH v3 3/4] unit: add UnitMask enum and get unit scope(mask) api from property

2014-11-12 Thread WaLyong Cho
--- Makefile.am | 7 ++ src/shared/.gitignore| 1 + src/shared/unit-name.c | 22 src/shared/unit-name.h | 26 + src/shared/unit-property-scope.gperf | 202 +++ 5 files changed, 258

[systemd-devel] [PATCH v3 1/4] bus: StartTransientUnit can have aux unit

2014-11-12 Thread WaLyong Cho
--- src/core/dbus-manager.c | 123 +--- 1 file changed, 105 insertions(+), 18 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index c54abd3..bba4b27 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@

[systemd-devel] [PATCH v3 2/4] timer: timer can be a transient unit

2014-11-12 Thread WaLyong Cho
--- src/core/dbus-timer.c | 159 ++ src/core/dbus-timer.h | 3 + src/core/timer.c | 4 ++ 3 files changed, 166 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..e916f5a 100644 ---

[systemd-devel] [PATCH v3 4/4] run: introduce timer support option

2014-11-12 Thread WaLyong Cho
Supported timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec= of timer respectively. --- man/systemd-run.xml | 42

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-10 Thread WaLyong Cho
On 11/10/2014 08:57 PM, Simon McVittie wrote: On 09/11/14 02:08, Casey Schaufler wrote: Thus, dbus is a fine example where SMACK64EXEC is a bad idea. Because you want a system bus and a user bus with different attributes you want it to get the Smack label at launch time, just like you do for

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-10 Thread WaLyong Cho
On 11/10/2014 10:26 PM, Lennart Poettering wrote: On Fri, 07.11.14 10:03, Casey Schaufler (ca...@schaufler-ca.com) wrote: Calling it SmackLabel= instead of SmackLabelExec= would be fine as far as I'm concerned. SmackLabel= is more consistent with SELinuxContext= and AppArmorProfile=, as you

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-10 Thread WaLyong Cho
On 11/11/2014 04:10 AM, Lennart Poettering wrote: On Tue, 11.11.14 00:43, WaLyong Cho (walyong@samsung.com) wrote: On 11/10/2014 10:26 PM, Lennart Poettering wrote: On Fri, 07.11.14 10:03, Casey Schaufler (ca...@schaufler-ca.com) wrote: Calling it SmackLabel= instead of SmackLabelExec

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-09 Thread WaLyong Cho
On 11/08/2014 01:36 AM, Lennart Poettering wrote: On Fri, 07.11.14 15:43, WaLyong Cho (walyong@samsung.com) wrote: On 11/07/2014 09:35 AM, Lennart Poettering wrote: On Fri, 07.11.14 04:17, WaLyong Cho (walyong@gmail.com) wrote: SMACK64 Used to make access control decisions

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-06 Thread WaLyong Cho
On 11/06/2014 11:54 PM, Lennart Poettering wrote: On Tue, 04.11.14 17:35, WaLyong Cho (walyong@samsung.com) wrote: In case of systemd has _ label and run as root, if a service file has User= option and the command line file has a special SMACK label then systemd will fail to execute

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-06 Thread WaLyong Cho
On 11/07/2014 03:30 AM, Lennart Poettering wrote: On Fri, 07.11.14 03:18, WaLyong Cho (walyong@gmail.com) wrote: On 11/06/2014 11:54 PM, Lennart Poettering wrote: On Tue, 04.11.14 17:35, WaLyong Cho (walyong@samsung.com) wrote: In case of systemd has _ label and run as root

Re: [systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-06 Thread WaLyong Cho
On 11/07/2014 09:35 AM, Lennart Poettering wrote: On Fri, 07.11.14 04:17, WaLyong Cho (walyong@gmail.com) wrote: SMACK64 Used to make access control decisions. In almost all cases the label given to a new filesystem object will be the label of the process that created

[systemd-devel] [PATCH] smack: introduce new SmackLabelExec option

2014-11-04 Thread WaLyong Cho
In case of systemd has _ label and run as root, if a service file has User= option and the command line file has a special SMACK label then systemd will fail to execute the command. Generally, SMACK label is ignored for the root. But if a service has a User= then systemd will call setresuid() in

[systemd-devel] [PATCH v2 1/2] utf8: intruduce utf8_escape_non_printable

2014-11-02 Thread WaLyong Cho
--- src/shared/utf8.c| 87 src/shared/utf8.h| 1 + src/test/test-utf8.c | 30 ++ 3 files changed, 118 insertions(+) diff --git a/src/shared/utf8.c b/src/shared/utf8.c index 9353559..5245604 100644 ---

[systemd-devel] [PATCH v2 2/2] bootchart: escape non printable process name

2014-11-02 Thread WaLyong Cho
--- src/bootchart/svg.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c index faf377e..e5569e1 100644 --- a/src/bootchart/svg.c +++ b/src/bootchart/svg.c @@ -39,6 +39,7 @@ #include svg.h #include bootchart.h #include

[systemd-devel] [PATCH v2 4/4] run: introduce timer support option

2014-10-30 Thread WaLyong Cho
Supported timer options --on-active=, --on-boot=, --on-startup=, --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=, OnUnitActiveSec=, OnUnitInactiveSec= of timer respectively. --- man/systemd-run.xml | 42

[systemd-devel] [PATCH v2 3/4] unit: add UnitMask enum and get unit scope(mask) api from property

2014-10-30 Thread WaLyong Cho
--- Makefile.am | 7 ++ src/shared/.gitignore| 1 + src/shared/unit-name.c | 22 src/shared/unit-name.h | 26 + src/shared/unit-property-scope.gperf | 202 +++ 5 files changed, 258

[systemd-devel] [PATCH v2 2/4] timer: timer can be a transient unit

2014-10-30 Thread WaLyong Cho
--- src/core/dbus-timer.c | 159 ++ src/core/dbus-timer.h | 3 + src/core/timer.c | 4 ++ 3 files changed, 166 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..e916f5a 100644 ---

[systemd-devel] [PATCH v2 1/4] bus: StartTransientUnit can have aux unit

2014-10-30 Thread WaLyong Cho
--- src/core/dbus-manager.c | 123 +--- 1 file changed, 105 insertions(+), 18 deletions(-) diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c index c54abd3..bba4b27 100644 --- a/src/core/dbus-manager.c +++ b/src/core/dbus-manager.c @@

[systemd-devel] [PATCH] bus: use STR_IN_SET

2014-10-30 Thread WaLyong Cho
--- src/core/dbus-unit.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c index 9b13c6e..2d1862c 100644 --- a/src/core/dbus-unit.c +++ b/src/core/dbus-unit.c @@ -859,20 +859,16 @@ static int

Re: [systemd-devel] [PATCH 3/3] run: introduce timer support option

2014-10-28 Thread WaLyong Cho
On 10/28/2014 07:22 PM, Lennart Poettering wrote: On Tue, 28.10.14 12:09, WaLyong Cho (walyong@samsung.com) wrote: The AccuracySec= and WakeSystem= stuff I think we don't need to cover with a command line argument of its own, we can cover that with --property=. Rework is almost done

Re: [systemd-devel] [PATCH 3/3] run: introduce timer support option

2014-10-27 Thread WaLyong Cho
On 10/23/2014 12:56 AM, Lennart Poettering wrote: On Tue, 07.10.14 14:20, WaLyong Cho (walyong@samsung.com) wrote: If systemd-run is called with timer option, then systemd-run call NewTransientUnit with service unit. And also call StartTransientUnit with timer unit which has same name

Re: [systemd-devel] [RFC] runtime configurable timer

2014-10-24 Thread WaLyong Cho
On 10/23/2014 12:28 AM, Lennart Poettering wrote: On Thu, 11.09.14 17:45, WaLyong Cho (walyong@samsung.com) wrote: (I will happy there is already similar method already exist.) systemd already has similar functionality systemd-run but that is only for scope or service unit. I think

Re: [systemd-devel] [PATCH 1/2] selinux: make sure selinux is using on mac_selinux_fix()

2014-10-24 Thread WaLyong Cho
On 10/24/2014 07:16 PM, Lennart Poettering wrote: On Fri, 24.10.14 13:51, WaLyong Cho (walyong@gmail.com) wrote: --- src/shared/selinux-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 1eddd17..bb27328 100644

[systemd-devel] [PATCH] mac: add mac_ prefix to distinguish origin security apis

2014-10-24 Thread WaLyong Cho
--- src/core/dbus-job.c | 2 +- src/core/dbus-manager.c | 68 +++ src/core/dbus-snapshot.c | 2 +- src/core/dbus-unit.c | 8 +++--- src/core/dbus.c | 8 +++--- src/core/main.c | 4 +-- src/core/selinux-access.c |

Re: [systemd-devel] [PATCH 2/3] timer: timer can be a transient unit

2014-10-24 Thread WaLyong Cho
On 10/23/2014 12:42 AM, Lennart Poettering wrote: On Tue, 07.10.14 14:20, WaLyong Cho (walyong@samsung.com) wrote: +assert(message); + +if (streq(name, OnActiveSec) || +streq(name, OnBootSec) || +streq(name, OnStartupSec) || +streq

Re: [systemd-devel] [PATCH 3/3] run: introduce timer support option

2014-10-23 Thread WaLyong Cho
On 10/23/2014 12:56 AM, Lennart Poettering wrote: On Tue, 07.10.14 14:20, WaLyong Cho (walyong@samsung.com) wrote: If systemd-run is called with timer option, then systemd-run call NewTransientUnit with service unit. And also call StartTransientUnit with timer unit which has same name

Re: [systemd-devel] [PATCH 2/3] mac: rename apis with mac_{selinux/smack}_ prefix

2014-10-23 Thread WaLyong Cho
On 10/23/2014 06:12 AM, Lennart Poettering wrote: On Thu, 16.10.14 16:59, WaLyong Cho (walyong@samsung.com) wrote: -if (smack_label_ip_in_fd(fd, s-smack_ip_in) 0) -log_error_unit(UNIT(s)-id, smack_label_ip_in_fd: %m

Re: [systemd-devel] [PATCH 3/3] udev: do NOT re-label smack

2014-10-23 Thread WaLyong Cho
On 10/23/2014 06:13 AM, Lennart Poettering wrote: On Thu, 16.10.14 16:59, WaLyong Cho (walyong@samsung.com) wrote: If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux. --- src/udev/udev-node.c | 4 ++-- 1

[systemd-devel] [PATCH 1/2] label: rearrange mandatory access control(MAC) apis

2014-10-23 Thread WaLyong Cho
From: WaLyong Cho walyong@samsung.com move label apis to selinux-util.ch or smack-util.ch appropriately. --- src/shared/label.c| 554 -- src/shared/label.h| 31 +-- src/shared/mkdir-label.c | 26 +++ src/shared/mkdir.h

[systemd-devel] [PATCH 2/2] mac: rename apis with mac_{selinux/smack}_ prefix

2014-10-23 Thread WaLyong Cho
From: WaLyong Cho walyong@samsung.com --- src/core/execute.c| 2 +- src/core/main.c | 4 ++-- src/core/namespace.c | 4 ++-- src/core/selinux-setup.c | 4 ++-- src/core/socket.c | 26 +- src/hostname/hostnamed.c

[systemd-devel] [RFC] tmpfiles.d with mac_label

2014-10-23 Thread WaLyong Cho
As we know we can make a direcory or link or file or some others by using tmpfiles.d. But we can not apply mac_label on there when after that is genreated. How about add mac_label field on tmpfiles.d? Actually, now we can not assign a mac_label to newly generated directory. So we make a script

Re: [systemd-devel] [RFC] tmpfiles.d with mac_label

2014-10-23 Thread WaLyong Cho
On 10/23/2014 05:34 PM, WaLyong Cho wrote: As we know we can make a direcory or link or file or some others by using tmpfiles.d. But we can not apply mac_label on there when after that is genreated. How about add mac_label field on tmpfiles.d? Actually, now we can not assign a mac_label

Re: [systemd-devel] [PATCH 2/2] mac: rename apis with mac_{selinux/smack}_ prefix

2014-10-23 Thread WaLyong Cho
On 10/24/2014 07:56 AM, Lennart Poettering wrote: On Thu, 23.10.14 17:23, WaLyong Cho (walyong@gmail.com) wrote: Heya! I merged both patches now! Thanks! After merging I reworked quite a bit more code to make the selinux and smack bits work more similar to each. I cannot test

Re: [systemd-devel] [PATCH 3/3] udev: do NOT re-label smack

2014-10-23 Thread WaLyong Cho
On 10/23/2014 06:13 AM, Lennart Poettering wrote: On Thu, 16.10.14 16:59, WaLyong Cho (walyong@samsung.com) wrote: If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux. --- src/udev/udev-node.c | 4 ++-- 1

[systemd-devel] [PATCH 2/2] udev: do NOT re-label smack

2014-10-23 Thread WaLyong Cho
From: WaLyong Cho walyong@samsung.com If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux. --- src/udev/udev-node.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/udev/udev-node.c b/src

[systemd-devel] [PATCH 1/2] selinux: make sure selinux is using on mac_selinux_fix()

2014-10-23 Thread WaLyong Cho
--- src/shared/selinux-util.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 1eddd17..bb27328 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -128,6 +128,9 @@ int mac_selinux_fix(const char *path, bool

[systemd-devel] [PATCH 2/3] mac: rename apis with mac_{selinux/smack}_ prefix

2014-10-16 Thread WaLyong Cho
--- src/core/execute.c| 2 +- src/core/main.c | 4 ++-- src/core/namespace.c | 4 ++-- src/core/selinux-setup.c | 4 ++-- src/core/socket.c | 26 +- src/hostname/hostnamed.c | 2 +-

[systemd-devel] [PATCH 3/3] udev: do NOT re-label smack

2014-10-16 Thread WaLyong Cho
If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux. --- src/udev/udev-node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index 9796672..6dd4e74

[systemd-devel] [PATCH 1/3] label: rearrange mandatory access control(MAC) apis

2014-10-16 Thread WaLyong Cho
move label apis to selinux-util.ch or smack-util.ch appropriately. --- src/shared/label.c| 554 -- src/shared/label.h| 31 +-- src/shared/mkdir-label.c | 26 +++ src/shared/mkdir.h| 2 +- src/shared/selinux-util.c | 481

[systemd-devel] [PATCH] resolve: suppress warning

2014-10-15 Thread WaLyong Cho
--- src/resolve/resolved.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resolve/resolved.c b/src/resolve/resolved.c index ef416e5..d612938 100644 --- a/src/resolve/resolved.c +++ b/src/resolve/resolved.c @@ -26,6 +26,7 @@ #include resolved-manager.h #include resolved-conf.h

[systemd-devel] [PATCH 1/3] dbus: introduce new method call NewTransientUnit

2014-10-06 Thread WaLyong Cho
It similar with StartTransientUnit but the NewTransientUnit does not start the unit immediately. Newly generated transient unit can be activated by systemctl start. --- src/core/dbus-manager.c| 99 +- src/core/org.freedesktop.systemd1.conf | 4 ++

[systemd-devel] [PATCH 3/3] run: introduce timer support option

2014-10-06 Thread WaLyong Cho
If systemd-run is called with timer option, then systemd-run call NewTransientUnit with service unit. And also call StartTransientUnit with timer unit which has same name with the service. So actually, two method call is coming and two transient unit is generated. One is service and the other is

[systemd-devel] [PATCH 2/3] timer: timer can be a transient unit

2014-10-06 Thread WaLyong Cho
--- src/core/dbus-timer.c | 140 ++ src/core/dbus-timer.h | 3 ++ src/core/timer.c | 10 3 files changed, 153 insertions(+) diff --git a/src/core/dbus-timer.c b/src/core/dbus-timer.c index f1f8c54..5f0b80e 100644 ---

[systemd-devel] [PATCH] label: suppress warning on without selinux

2014-09-23 Thread WaLyong Cho
--- src/shared/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/label.c b/src/shared/label.c index 02b41f0..b6af38d 100644 --- a/src/shared/label.c +++ b/src/shared/label.c @@ -252,9 +252,10 @@ fail: int label_get_our_label(char **label) { int r

Re: [systemd-devel] [RFC] runtime configurable timer

2014-09-17 Thread WaLyong Cho
On 09/12/2014 12:54 AM, David Herrmann wrote: Hi On Thu, Sep 11, 2014 at 10:45 AM, WaLyong Cho walyong@samsung.com wrote: (I will happy there is already similar method already exist.) systemd already has similar functionality systemd-run but that is only for scope or service unit. I

[systemd-devel] [PATCH 2/2] udev: do NOT re-label smack

2014-09-16 Thread WaLyong Cho
If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux. --- src/udev/udev-node.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index f46638f..3c49482

[systemd-devel] [PATCH 0/2] label: rearrange mandatory access control(MAC) apis

2014-09-16 Thread WaLyong Cho
rebased again. It make a conflict by long pending. WaLyong Cho (2): label: rearrange mandatory access control(MAC) apis udev: do NOT re-label smack src/core/main.c | 4 +- src/core/namespace.c | 4 +- src/core/selinux-setup.c | 4 +- src/core/socket.c

[systemd-devel] [RFC] runtime configurable timer

2014-09-11 Thread WaLyong Cho
(I will happy there is already similar method already exist.) systemd already has similar functionality systemd-run but that is only for scope or service unit. I think that is useful run a service without unit file on permanent storage. As a similar method, is it possible to generate or

  1   2   >