[systemd-devel] [PATCH] core: add default extra dependency option

2014-02-28 Thread WaLyong Cho
systemd is already provide a special unit. If the type of unit is service then that is 'basic.target'. Additionally default extra dependency can be listed in system.conf and then other service unit will have After= dependency implicitly. In config directory /etc/systemd/default-extra-dependencies,

Re: [systemd-devel] [PATCH] core: add default extra dependency option

2014-02-28 Thread WaLyong Cho
On 02/28/2014 06:16 PM, Thomas Bächler wrote: Am 28.02.2014 10:02, schrieb WaLyong Cho: systemd is already provide a special unit. If the type of unit is service then that is 'basic.target'. Additionally default extra dependency can be listed in system.conf and then other service unit

Re: [systemd-devel] [PATCH] core: add default extra dependency option

2014-03-02 Thread WaLyong Cho
On 03/03/2014 08:40 AM, Lennart Poettering wrote: On Fri, 28.02.14 20:45, WaLyong Cho (walyong@samsung.com) wrote: On 02/28/2014 06:16 PM, Thomas Bächler wrote: Am 28.02.2014 10:02, schrieb WaLyong Cho: systemd is already provide a special unit. If the type of unit is service

[systemd-devel] [PATCH] core: add startup resource control option

2014-03-05 Thread WaLyong Cho
Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the attribute is

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-03-07 Thread WaLyong Cho
On 03/06/2014 03:40 AM, David Timothy Strauss wrote: When is startup considered over? I'd like if it meant before the WantedBy unit was started so this value still has use for arbitrary startup. Lennard suggested this idea.

Re: [systemd-devel] [PATCH] core: add default extra dependency option

2014-03-10 Thread WaLyong Cho
On 03/03/2014 11:43 PM, Lennart Poettering wrote: On Mon, 03.03.14 11:52, WaLyong Cho (walyong@samsung.com) wrote: But if you do this on an embedded system you can do DefaultDependencies=no for all services where you want this and place them manually? Almost I can. Actually I can

[systemd-devel] [PATCH 2/2] core: add startup resource control option

2014-03-12 Thread WaLyong Cho
Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the attribute is

[systemd-devel] [PATCH 1/2] manager: add system-wide enumerate state

2014-03-12 Thread WaLyong Cho
Enumerated states are added. That can have three state. startup, running and shutdown. manager is starting up with startup state and change to running if default job finish. And shutdown target is loaded then the state will be changed to shutdown. This state can also be red GetSystemState method

[systemd-devel] [PATCH] core: add startup resource control option

2014-03-17 Thread WaLyong Cho
Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup state. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the

[systemd-devel] [PATCH] core: add startup resource control option

2014-03-24 Thread WaLyong Cho
Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the attribute is

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-03-25 Thread WaLyong Cho
On 03/25/2014 05:01 AM, Lennart Poettering wrote: On Tue, 25.03.14 01:03, WaLyong Cho (walyong@samsung.com) wrote: /* Figure out which controllers we need */ -if (c-cpu_accounting || c-cpu_shares != 1024) +if (c-cpu_accounting || +c

[systemd-devel] [RFC 1/2] fileio: additional read one line function which contains specifed string

2014-03-28 Thread WaLyong Cho
--- src/shared/fileio.c | 61 +++ src/shared/fileio.h |3 +++ 2 files changed, 55 insertions(+), 9 deletions(-) diff --git a/src/shared/fileio.c b/src/shared/fileio.c index f101269..8916970 100644 --- a/src/shared/fileio.c +++

[systemd-devel] [RFC 2/2] bootchart: add cgroup option

2014-03-28 Thread WaLyong Cho
--- src/bootchart/bootchart.c|9 - src/bootchart/bootchart.conf |1 + src/bootchart/bootchart.h|2 ++ src/bootchart/store.c| 25 + src/bootchart/svg.c |5 +++-- 5 files changed, 39 insertions(+), 3 deletions(-) diff --git

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-04-21 Thread WaLyong Cho
On 03/26/2014 12:12 AM, WaLyong Cho wrote: On 03/25/2014 05:01 AM, Lennart Poettering wrote: On Tue, 25.03.14 01:03, WaLyong Cho (walyong@samsung.com) wrote: /* Figure out which controllers we need */ -if (c-cpu_accounting || c-cpu_shares != 1024) +if (c

[systemd-devel] [PATCH 1/2] bootchart: add control group option

2014-04-24 Thread WaLyong Cho
--- man/bootchart.conf.xml | 5 + man/systemd-bootchart.xml| 7 +++ src/bootchart/bootchart.c| 11 ++- src/bootchart/bootchart.conf | 1 + src/bootchart/bootchart.h| 2 ++ src/bootchart/store.c| 6 ++ src/bootchart/svg.c | 5 +++-- 7

[systemd-devel] [PATCH 2/2] bootchart: rewrite usage message more generally

2014-04-24 Thread WaLyong Cho
--- src/bootchart/bootchart.c | 33 + 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index a73418a..84497cc 100644 --- a/src/bootchart/bootchart.c +++ b/src/bootchart/bootchart.c @@ -209,22

Re: [systemd-devel] [PATCH 1/2] bootchart: add control group option

2014-04-24 Thread WaLyong Cho
On 04/25/2014 12:50 AM, WaLyong Cho wrote: --- man/bootchart.conf.xml | 5 + man/systemd-bootchart.xml| 7 +++ src/bootchart/bootchart.c| 11 ++- src/bootchart/bootchart.conf | 1 + src/bootchart/bootchart.h| 2 ++ src/bootchart/store.c| 6

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-04-24 Thread WaLyong Cho
On 04/24/2014 06:15 AM, Lennart Poettering wrote: On Wed, 26.03.14 00:12, WaLyong Cho (walyong@samsung.com) wrote: On 03/25/2014 05:01 AM, Lennart Poettering wrote: On Tue, 25.03.14 01:03, WaLyong Cho (walyong@samsung.com) wrote: /* Figure out which controllers we need

[systemd-devel] [PATCH] core: add startup resource control option

2014-05-15 Thread WaLyong Cho
Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares= or BlockIOWeight= be specified, then the attribute is

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-05-15 Thread WaLyong Cho
On 05/16/2014 12:09 AM, WaLyong Cho wrote: Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-05-21 Thread WaLyong Cho
at 5:09 PM, WaLyong Cho walyong@samsung.com wrote: Similar to CPUShares= and BlockIOWeight= respectively. However only assign the specified weight during startup. Each control group attribute is re-assigned as weight by CPUShares=weight and BlockIOWeight=weight after startup. If not CPUShares

Re: [systemd-devel] [PATCH] core: add startup resource control option

2014-05-22 Thread WaLyong Cho
On 05/22/2014 05:01 PM, Umut Tezduyar Lindskog wrote: On Thu, May 22, 2014 at 9:07 AM, Lennart Poettering lenn...@poettering.net wrote: On Thu, 22.05.14 08:42, Umut Tezduyar Lindskog (u...@tezduyar.com) wrote: On Thu, May 22, 2014 at 2:18 AM, Lennart Poettering lenn...@poettering.net wrote:

[systemd-devel] [PATCH] unit: make unit can start without instance

2014-05-27 Thread WaLyong Cho
@.service' If can be, when this can be used? And I couldn't avoid one of strdup in manager_load_unit_prepare(). And I wasn't able to make a suit name better than instanceless. WaLyong Cho (1): unit: make unit can start without instance src/core/manager.c | 10 ++ src/shared/unit

[systemd-devel] [PATCH] unit: make unit can start without instance

2014-05-27 Thread WaLyong Cho
--- src/core/manager.c | 10 ++ src/shared/unit-name.c | 12 src/shared/unit-name.h | 1 + 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/core/manager.c b/src/core/manager.c index 0cb2044..089df43 100644 --- a/src/core/manager.c +++

Re: [systemd-devel] [PATCH] unit: make unit can start without instance

2014-06-24 Thread WaLyong Cho
On 06/25/2014 06:22 AM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, May 28, 2014 at 12:39:17AM +0900, WaLyong Cho wrote: I'm not sure this could be patch for below TODO. * enabling an instance unit creates a pointless link, and the unit will be started with getty@getty.service

[systemd-devel] [PATCH] smack: check smack cache after /sys mount

2014-07-16 Thread WaLyong Cho
use_smack_cached is capability of smack. That is not changed on runtime. So that should be a cache for performance. But the cache is updated as wrong value(maybe 0) upon calling first mount_one. At this time, until v210 /proc will be tried. After v211 /sys will be tried. But both of first trial of

Re: [systemd-devel] [PATCH] smack: check smack cache after /sys mount

2014-07-16 Thread WaLyong Cho
On 07/17/2014 04:40 AM, Zbigniew Jędrzejewski-Szmek wrote: On Thu, Jul 17, 2014 at 01:29:38AM +0900, WaLyong Cho wrote: use_smack_cached is capability of smack. That is not changed on runtime. So that should be a cache for performance. But the cache is updated as wrong value(maybe 0) upon

[systemd-devel] [PATCH 1/2] label: move selinux label APIs to its util file

2014-08-18 Thread WaLyong Cho
And add prefix selinux_ to each APIs like smack. --- src/core/main.c | 4 +- src/core/namespace.c | 4 +- src/core/selinux-setup.c | 4 +- src/core/socket.c | 12 +- src/hostname/hostnamed.c | 2 +- src/locale/localed.c | 2 +-

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

2014-08-18 Thread WaLyong Cho
If selinux is disabled and smack is only enabled, smack label is re-lable-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

Re: [systemd-devel] [PATCH 1/2] label: move selinux label APIs to its util file

2014-08-18 Thread WaLyong Cho
On 08/18/2014 10:09 PM, Lennart Poettering wrote: On Mon, 18.08.14 15:06, WaLyong Cho (walyong@samsung.com) wrote: And add prefix selinux_ to each APIs like smack. I am a bit concerned about this, as selinux_ is really the prefix the selinux libraries use for most of their newer

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

2014-08-19 Thread WaLyong Cho
If selinux is disabled and smack is only enabled, smack label is re-lable-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

[systemd-devel] [PATCH 1/2] label: rearrange security label apis

2014-08-19 Thread WaLyong Cho
use {selinux/smack}-label.ch instread of {selinux/smack}-util.ch move selinux label APIs to selinux-label.ch use label_{selinxu/smack}_ prefix --- Makefile.am | 8 +- src/core/condition.c | 4 +- src/core/execute.c| 2 +- src/core/main.c

Re: [systemd-devel] [PATCH 1/2] label: rearrange security label apis

2014-08-20 Thread WaLyong Cho
On 08/21/2014 08:05 AM, Lennart Poettering wrote: On Wed, 20.08.14 14:22, WaLyong Cho (walyong@samsung.com) wrote: use {selinux/smack}-label.ch instread of {selinux/smack}-util.ch move selinux label APIs to selinux-label.ch use label_{selinxu/smack}_ prefix Hmm, wasn't the last idea

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

2014-08-20 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 6a9788b..00ade2c

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

2014-08-20 Thread WaLyong Cho
move selinux label APIs to selinux-label.ch And label_{selinxu/smack}_ prefix are changed to mac_{selinux/smack}_ respectively. --- src/core/main.c | 4 +- src/core/namespace.c | 4 +- src/core/selinux-setup.c | 4 +- src/core/socket.c | 24 +--

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

2014-08-20 Thread WaLyong Cho
On 08/21/2014 12:58 PM, WaLyong Cho wrote: move selinux label APIs to selinux-label.ch And label_{selinxu/smack}_ prefix are changed to mac_{selinux/smack}_ Ah, sorry, label_{selinxu/smack}_ should be {selinux/smack}_label_ WaLyong respectively

[systemd-devel] [PATCH] journal: grant systemd-journal group permission

2014-08-26 Thread WaLyong Cho
There is no Bofore= or After= dependencies between systemd-journald.service and systemd-tmpfiles-setup.service. So if both /run/log/journal and /var/log/journal does not exist then those can be make as root:root and also its ids directory and journal files. To make sure, do chown systemd-journal

[systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-08-12 Thread WaLyong Cho
From: WaLyong Cho walyong@samsung.com reboot syscall can be performed with additional argument. In some of system, this functionality can be useful to ask next boot mode to bootloader. --- src/systemctl/systemctl.c | 28 +++- 1 file changed, 23 insertions(+), 5

Re: [systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-08-23 Thread WaLyong Cho
On 08/24/2013 01:47 AM, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Aug 13, 2013 at 03:01:25AM +0900, WaLyong Cho wrote: From: WaLyong Cho walyong@samsung.com reboot syscall can be performed with additional argument. In some of system, this functionality can be useful to ask next boot mode

Re: [systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-08-25 Thread WaLyong Cho
On 08/24/2013 11:38 PM, Zbigniew Jędrzejewski-Szmek wrote: On Sat, Aug 24, 2013 at 01:12:42PM +0900, WaLyong Cho wrote: On 08/24/2013 01:47 AM, Zbigniew Jędrzejewski-Szmek wrote: On Tue, Aug 13, 2013 at 03:01:25AM +0900, WaLyong Cho wrote: From: WaLyong Cho walyong@samsung.com reboot

[systemd-devel] [PATCH] SMACK: assign * label to /tmp when using SMACK.

2013-10-28 Thread WaLyong Cho
At the same reason of /run and /dev/shm, when systemd is running with SMACK, countless tasks are failed by missed privilege. To avoid, /tmp is assigned '*' label. --- Makefile.am| 10 ++ configure.ac |4 +++- units/tmp.mount| 20

Re: [systemd-devel] [PATCH] SMACK: assign * label to /tmp when using SMACK.

2013-10-29 Thread WaLyong Cho
: On Mon, 28.10.13 19:44, WaLyong Cho (walyong@samsung.com) wrote: At the same reason of /run and /dev/shm, when systemd is running with SMACK, countless tasks are failed by missed privilege. To avoid, /tmp is assigned '*' label. Won't this break if people compile systemd with SMACK enabled

Re: [systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-11-05 Thread WaLyong Cho
On 09/12/2013 02:20 AM, Lennart Poettering wrote: On Tue, 13.08.13 03:01, WaLyong Cho (fyd0...@gmail.com) wrote: From: WaLyong Cho walyong@samsung.com reboot syscall can be performed with additional argument. In some of system, this functionality can be useful to ask next boot mode

Re: [systemd-devel] [PATCH] [RFC] Make reboot to support additional command

2013-11-06 Thread WaLyong Cho
On 11/06/2013 03:53 PM, Zbigniew Jędrzejewski-Szmek wrote: On Wed, Nov 06, 2013 at 03:22:49PM +0900, WaLyong Cho wrote: On 09/12/2013 02:20 AM, Lennart Poettering wrote: On Tue, 13.08.13 03:01, WaLyong Cho (fyd0...@gmail.com) wrote: From: WaLyong Cho walyong@samsung.com reboot

[systemd-devel] [RFC][PATCH] udev: add exclusive event filter

2013-11-10 Thread WaLyong Cho
be specified. From ccf8ddd0e6e276f5c36789109ec19fed1d63e3bf Mon Sep 17 00:00:00 2001 From: WaLyong Cho walyong@samsung.com Date: Mon, 11 Nov 2013 15:07:20 +0900 Subject: [PATCH] udev: add exclusive event filter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit

[systemd-devel] [PATCH] udev: Make builtin firmware to find in subdirectories

2013-06-17 Thread WaLyong Cho
From: WaLyong Cho walyong@samsung.com We can specify firmware path using --with-firmware-path configure option. In some of system, firmware can be located in subdirectories of the firmware path. If there are many firmware directories in below specified path then we have to define those

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

2014-08-27 Thread WaLyong Cho
move selinux label APIs to selinux-label.ch. And each security label apis have mac_{selinux/smack}_ prefix. --- src/core/main.c | 4 +- src/core/namespace.c | 4 +- src/core/selinux-setup.c | 4 +- src/core/socket.c | 24 +-- src/hostname/hostnamed.c

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

2014-08-27 Thread WaLyong Cho
On 08/27/2014 04:54 AM, Lennart Poettering wrote: On Tue, 26.08.14 21:52, Lennart Poettering (lenn...@poettering.net) wrote: On Thu, 21.08.14 12:58, WaLyong Cho (walyong@samsung.com) wrote: If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix

Re: [systemd-devel] [PATCH] bootchart: only show printable processes

2014-08-27 Thread WaLyong Cho
On 08/27/2014 03:49 AM, Lennart Poettering wrote: On Tue, 26.08.14 18:11, Mantas Mikulėnas (graw...@gmail.com) wrote: On Tue, Aug 26, 2014 at 5:07 PM, WaLyong Cho walyong@samsung.com wrote: This case really shouldn't be happen. (But actually sometime that was happen.) Eeven if happened

[systemd-devel] [PATCH] journal: do server_vacuum for sigusr1

2014-08-28 Thread WaLyong Cho
runtime journal is migrated to system journal when only /run/systemd/journal/flushed exist. It's ok but according to this the system journal directory size(max use) can be over the config. If journal is not rotated during some time the journal directory can be remained as over the config(or

Re: [systemd-devel] [PATCH] journal: do server_vacuum for sigusr1

2014-08-28 Thread WaLyong Cho
On 08/28/2014 09:33 PM, WaLyong Cho wrote: runtime journal is migrated to system journal when only /run/systemd/journal/flushed exist. It's ok but according to this the system journal directory size(max use) can be over the config. If journal is not rotated during some time the journal

Re: [systemd-devel] [PATCH] journal: grant systemd-journal group permission

2014-08-29 Thread WaLyong Cho
On 08/27/2014 02:55 AM, Lennart Poettering wrote: On Tue, 26.08.14 15:43, WaLyong Cho (walyong@samsung.com) wrote: There is no Bofore= or After= dependencies between systemd-journald.service and systemd-tmpfiles-setup.service. So if both /run/log/journal and /var/log/journal does

[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

[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

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] 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

[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] 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 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

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

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-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] [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

[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

[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] 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

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

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-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

[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 @@

  1   2   >