1. Tizen does not support continer and vm.
2. Resolving Smack error.
==========================================================================================
Jan 01 09:00:19 localhost audit[591]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=591 comm="systemd" name="sched" dev="proc" ino=12322
Jan 01 09:00:19 localhost audit[591]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=591 comm="systemd" name="sched" dev="proc" ino=12322
Jan 01 09:00:19 localhost audit[591]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=591 comm="systemd" name="sched" dev="proc" ino=12322
Jan 01 09:00:19 localhost audit[535]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=535 comm="tlm-sessiond" name="environ" dev="proc" ino=12572
Jan 01 09:00:19 localhost audit[535]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=535 comm="tlm-sessiond" name="sched" dev="proc" ino=12322
Jan 01 09:00:30 localhost audit[949]: AVC lsm=SMACK fn=smack_inode_permission action=denied subject="User" object="System::Privileged" requested=r pid=949 comm="systemctl" name="sched" dev="proc" ino=12322
==========================================================================================
Change-Id: I8b947a0de6c030fa7dd4f8d8b080b1f7783a4010
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
'tpm',
'userdb',
'utmp',
+ 'virt',
'vconsole',
'xdg-autostart']
have = get_option(term)
['fexecve'],
['standalone-binaries', get_option('standalone-binaries')],
['coverage', get_option('b_coverage')],
+ ['virt'],
]
if tuple.length() >= 2
option('efi-color-edit', type : 'string', value : 'black,lightgray',
description : 'boot loader color for option line edit')
+option('virt', type : 'boolean',
+ description : 'virtualization support')
+
option('bashcompletiondir', type : 'string',
description : 'directory for bash completion scripts ["no" disables]')
option('zshcompletiondir', type : 'string',
['systemd-cgls', ''],
['systemd-cgtop', ''],
['systemd-delta', ''],
- ['systemd-detect-virt', ''],
+ ['systemd-detect-virt', 'ENABLE_VIRT'],
['systemd-id128', ''],
['systemd-nspawn', ''],
['systemd-path', ''],
/* Returns a short identifier for the various VM implementations */
Virtualization detect_vm(void) {
+#if ENABLE_VIRT
static thread_local Virtualization cached_found = _VIRTUALIZATION_INVALID;
bool other = false;
int xen_dom0 = 0;
cached_found = v;
log_debug("Found VM virtualization %s", virtualization_to_string(v));
return v;
+#else
+ return VIRTUALIZATION_NONE;
+#endif
}
static const char *const container_table[_VIRTUALIZATION_MAX] = {
}
Virtualization detect_container(void) {
+#if ENABLE_VIRT
static thread_local Virtualization cached_found = _VIRTUALIZATION_INVALID;
_cleanup_free_ char *m = NULL, *o = NULL, *p = NULL;
const char *e = NULL;
log_debug("Found container virtualization %s.", virtualization_to_string(v));
cached_found = v;
return v;
+#else
+ return VIRTUALIZATION_NONE;
+#endif
}
Virtualization detect_virtualization(void) {
# SPDX-License-Identifier: LGPL-2.1-or-later
-executables += [
- executable_template + {
- 'name' : 'systemd-detect-virt',
- 'public' : true,
- 'sources' : files('detect-virt.c'),
- },
-]
+if conf.get('ENABLE_VIRT') == 1
+ executables += [
+ executable_template + {
+ 'name' : 'systemd-detect-virt',
+ 'public' : true,
+ 'sources' : files('detect-virt.c'),
+ },
+ ]
+endif