Compare commits
No commits in common. "80cc3e3eabd2cf4e31ae3f0d6e2ac7b61d0a1832" and "c90c597ee3b6b9d30ee86410e46939ba875e467a" have entirely different histories.
80cc3e3eab
...
c90c597ee3
|
@ -192,11 +192,13 @@
|
|||
<varlistentry>
|
||||
<term><varname>ANSI_COLOR=</varname></term>
|
||||
|
||||
<listitem><para>A suggested presentation color when showing the OS name on the console. This should
|
||||
be specified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for setting
|
||||
graphical rendition. This field is optional. Example: <literal>ANSI_COLOR="0;31"</literal> for red,
|
||||
<literal>ANSI_COLOR="1;34"</literal> for light blue, or
|
||||
<literal>ANSI_COLOR="0;38;2;60;110;180"</literal> for Fedora blue.</para></listitem>
|
||||
<listitem><para>A suggested presentation color when showing
|
||||
the OS name on the console. This should be specified as string
|
||||
suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code
|
||||
for setting graphical rendition. This field is optional.
|
||||
Example: <literal>ANSI_COLOR="0;31"</literal> for red, or
|
||||
<literal>ANSI_COLOR="1;34"</literal> for light
|
||||
blue.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
|
@ -218,7 +220,7 @@
|
|||
<term><varname>BUG_REPORT_URL=</varname></term>
|
||||
<term><varname>PRIVACY_POLICY_URL=</varname></term>
|
||||
|
||||
<listitem><para>Links to resources on the Internet related to
|
||||
<listitem><para>Links to resources on the Internet related to
|
||||
the operating system.
|
||||
<varname>HOME_URL=</varname> should refer to the homepage of
|
||||
the operating system, or alternatively some homepage of the
|
||||
|
@ -345,24 +347,14 @@
|
|||
<title>Example</title>
|
||||
|
||||
<programlisting>NAME=Fedora
|
||||
VERSION="32 (Workstation Edition)"
|
||||
VERSION="17 (Beefy Miracle)"
|
||||
ID=fedora
|
||||
VERSION_ID=32
|
||||
PRETTY_NAME="Fedora 32 (Workstation Edition)"
|
||||
ANSI_COLOR="0;38;2;60;110;180"
|
||||
LOGO=fedora-logo-icon
|
||||
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
|
||||
VERSION_ID=17
|
||||
PRETTY_NAME="Fedora 17 (Beefy Miracle)"
|
||||
ANSI_COLOR="0;34"
|
||||
CPE_NAME="cpe:/o:fedoraproject:fedora:17"
|
||||
HOME_URL="https://fedoraproject.org/"
|
||||
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/"
|
||||
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
|
||||
BUG_REPORT_URL="https://bugzilla.redhat.com/"
|
||||
REDHAT_BUGZILLA_PRODUCT="Fedora"
|
||||
REDHAT_BUGZILLA_PRODUCT_VERSION=32
|
||||
REDHAT_SUPPORT_PRODUCT="Fedora"
|
||||
REDHAT_SUPPORT_PRODUCT_VERSION=32
|
||||
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
|
||||
VARIANT="Workstation Edition"
|
||||
VARIANT_ID=workstation</programlisting>
|
||||
BUG_REPORT_URL="https://bugzilla.redhat.com/"</programlisting>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
|
|
@ -167,11 +167,6 @@
|
|||
<entry><varname>wsl</varname></entry>
|
||||
<entry><ulink url="https://docs.microsoft.com/en-us/windows/wsl/about">Windows Subsystem for Linux</ulink></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry><varname>proot</varname></entry>
|
||||
<entry><ulink url="https://proot-me.github.io/">proot</ulink> userspace chroot/bind mount emulation</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
|
|
@ -1170,7 +1170,6 @@
|
|||
<literal>podman</literal>,
|
||||
<literal>rkt</literal>,
|
||||
<literal>wsl</literal>,
|
||||
<literal>proot</literal>,
|
||||
<literal>acrn</literal> to test
|
||||
against a specific implementation, or
|
||||
<literal>private-users</literal> to check whether we are running in a user namespace. See
|
||||
|
|
12
meson.build
12
meson.build
|
@ -1302,16 +1302,6 @@ conf.set('DEFAULT_DNS_OVER_TLS_MODE',
|
|||
'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper())
|
||||
substs.set('DEFAULT_DNS_OVER_TLS_MODE', default_dns_over_tls)
|
||||
|
||||
default_mdns = get_option('default-mdns')
|
||||
conf.set('DEFAULT_MDNS_MODE',
|
||||
'RESOLVE_SUPPORT_' + default_mdns.to_upper())
|
||||
substs.set('DEFAULT_MDNS_MODE', default_mdns)
|
||||
|
||||
default_llmnr = get_option('default-llmnr')
|
||||
conf.set('DEFAULT_LLMNR_MODE',
|
||||
'RESOLVE_SUPPORT_' + default_llmnr.to_upper())
|
||||
substs.set('DEFAULT_LLMNR_MODE', default_llmnr)
|
||||
|
||||
want_repart = get_option('repart')
|
||||
if want_repart != 'false'
|
||||
have = (conf.get('HAVE_OPENSSL') == 1 and
|
||||
|
@ -3364,8 +3354,6 @@ status = [
|
|||
|
||||
'default DNSSEC mode: @0@'.format(default_dnssec),
|
||||
'default DNS-over-TLS mode: @0@'.format(default_dns_over_tls),
|
||||
'default mDNS mode: @0@'.format(default_mdns),
|
||||
'default LLMNR mode: @0@'.format(default_llmnr),
|
||||
'default cgroup hierarchy: @0@'.format(default_hierarchy),
|
||||
'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
|
||||
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
|
||||
|
|
|
@ -230,14 +230,6 @@ option('default-dns-over-tls', type : 'combo',
|
|||
description : 'default DNS-over-TLS mode',
|
||||
choices : ['yes', 'opportunistic', 'no'],
|
||||
value : 'no')
|
||||
option('default-mdns', type : 'combo',
|
||||
choices : ['yes', 'resolve', 'no'],
|
||||
description : 'default MulticastDNS mode',
|
||||
value : 'yes')
|
||||
option('default-llmnr', type : 'combo',
|
||||
choices : ['yes', 'resolve', 'no'],
|
||||
description : 'default LLMNR mode',
|
||||
value : 'yes')
|
||||
option('dns-over-tls', type : 'combo', choices : ['auto', 'gnutls', 'openssl', 'true', 'false'],
|
||||
description : 'DNS-over-TLS support')
|
||||
option('dns-servers', type : 'string',
|
||||
|
|
|
@ -305,7 +305,7 @@ out:
|
|||
return (bool) cached_answer;
|
||||
}
|
||||
|
||||
bool emoji_enabled(void) {
|
||||
static bool emoji_enabled(void) {
|
||||
static int cached_emoji_enabled = -1;
|
||||
|
||||
if (cached_emoji_enabled < 0) {
|
||||
|
@ -357,7 +357,6 @@ const char *special_glyph(SpecialGlyph code) {
|
|||
[SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = ":-(",
|
||||
[SPECIAL_GLYPH_UNHAPPY_SMILEY] = ":-{",
|
||||
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = ":-[",
|
||||
[SPECIAL_GLYPH_LOCK_AND_KEY] = "o-,"
|
||||
},
|
||||
|
||||
/* UTF-8 */
|
||||
|
@ -393,15 +392,12 @@ const char *special_glyph(SpecialGlyph code) {
|
|||
[SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = "\360\237\231\201", /* 🙁 (actually called: SLIGHTLY FROWNING FACE) */
|
||||
[SPECIAL_GLYPH_UNHAPPY_SMILEY] = "\360\237\230\250", /* 😨 (actually called: FEARFUL FACE) */
|
||||
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = "\360\237\244\242", /* 🤢 (actually called: NAUSEATED FACE) */
|
||||
|
||||
/* This emoji is a single character cell glyph in Unicode, and three in ASCII */
|
||||
[SPECIAL_GLYPH_LOCK_AND_KEY] = "\360\237\224\220", /* 🔐 (actually called: CLOSED LOCK WITH KEY) */
|
||||
},
|
||||
};
|
||||
|
||||
assert(code < _SPECIAL_GLYPH_MAX);
|
||||
|
||||
return draw_table[code >= _SPECIAL_GLYPH_FIRST_EMOJI ? emoji_enabled() : is_locale_utf8()][code];
|
||||
return draw_table[code >= _SPECIAL_GLYPH_FIRST_SMILEY ? emoji_enabled() : is_locale_utf8()][code];
|
||||
}
|
||||
|
||||
void locale_variables_free(char *l[_VARIABLE_LC_MAX]) {
|
||||
|
|
|
@ -54,22 +54,19 @@ typedef enum {
|
|||
SPECIAL_GLYPH_LIGHT_SHADE,
|
||||
SPECIAL_GLYPH_DARK_SHADE,
|
||||
SPECIAL_GLYPH_SIGMA,
|
||||
_SPECIAL_GLYPH_FIRST_EMOJI,
|
||||
SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_EMOJI,
|
||||
_SPECIAL_GLYPH_FIRST_SMILEY,
|
||||
SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_SMILEY,
|
||||
SPECIAL_GLYPH_HAPPY_SMILEY,
|
||||
SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY,
|
||||
SPECIAL_GLYPH_NEUTRAL_SMILEY,
|
||||
SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY,
|
||||
SPECIAL_GLYPH_UNHAPPY_SMILEY,
|
||||
SPECIAL_GLYPH_DEPRESSED_SMILEY,
|
||||
SPECIAL_GLYPH_LOCK_AND_KEY,
|
||||
_SPECIAL_GLYPH_MAX
|
||||
} SpecialGlyph;
|
||||
|
||||
const char *special_glyph(SpecialGlyph code) _const_;
|
||||
|
||||
bool emoji_enabled(void);
|
||||
|
||||
const char* locale_variable_to_string(LocaleVariable i) _const_;
|
||||
LocaleVariable locale_variable_from_string(const char *s) _pure_;
|
||||
|
||||
|
|
|
@ -441,7 +441,6 @@ static const char *const container_table[_VIRTUALIZATION_MAX] = {
|
|||
[VIRTUALIZATION_PODMAN] = "podman",
|
||||
[VIRTUALIZATION_RKT] = "rkt",
|
||||
[VIRTUALIZATION_WSL] = "wsl",
|
||||
[VIRTUALIZATION_PROOT] = "proot",
|
||||
};
|
||||
|
||||
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(container, int);
|
||||
|
@ -450,7 +449,6 @@ int detect_container(void) {
|
|||
static thread_local int cached_found = _VIRTUALIZATION_INVALID;
|
||||
_cleanup_free_ char *m = NULL;
|
||||
_cleanup_free_ char *o = NULL;
|
||||
_cleanup_free_ char *p = NULL;
|
||||
const char *e = NULL;
|
||||
int r;
|
||||
|
||||
|
@ -474,22 +472,6 @@ int detect_container(void) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
/* proot doesn't use PID namespacing, so we can just check if we have a matching tracer for this
|
||||
* invocation without worrying about it being elsewhere.
|
||||
*/
|
||||
r = get_proc_field("/proc/self/status", "TracerPid", WHITESPACE, &p);
|
||||
if (r == 0 && !streq(p, "0")) {
|
||||
pid_t ptrace_pid;
|
||||
r = parse_pid(p, &ptrace_pid);
|
||||
if (r == 0) {
|
||||
const char *pf = procfs_file_alloca(ptrace_pid, "comm");
|
||||
_cleanup_free_ char *ptrace_comm = NULL;
|
||||
r = read_one_line_file(pf, &ptrace_comm);
|
||||
if (r >= 0 && startswith(ptrace_comm, "proot"))
|
||||
return VIRTUALIZATION_PROOT;
|
||||
}
|
||||
}
|
||||
|
||||
if (getpid_cached() == 1) {
|
||||
/* If we are PID 1 we can just check our own environment variable, and that's authoritative.
|
||||
* We distinguish three cases:
|
||||
|
@ -678,7 +660,6 @@ static const char *const virtualization_table[_VIRTUALIZATION_MAX] = {
|
|||
[VIRTUALIZATION_PODMAN] = "podman",
|
||||
[VIRTUALIZATION_RKT] = "rkt",
|
||||
[VIRTUALIZATION_WSL] = "wsl",
|
||||
[VIRTUALIZATION_PROOT] = "proot",
|
||||
[VIRTUALIZATION_CONTAINER_OTHER] = "container-other",
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,6 @@ enum {
|
|||
VIRTUALIZATION_PODMAN,
|
||||
VIRTUALIZATION_RKT,
|
||||
VIRTUALIZATION_WSL,
|
||||
VIRTUALIZATION_PROOT,
|
||||
VIRTUALIZATION_CONTAINER_OTHER,
|
||||
VIRTUALIZATION_CONTAINER_LAST = VIRTUALIZATION_CONTAINER_OTHER,
|
||||
|
||||
|
|
|
@ -581,8 +581,8 @@ int manager_new(Manager **ret) {
|
|||
.dns_stub_tcp_fd = -1,
|
||||
.hostname_fd = -1,
|
||||
|
||||
.llmnr_support = DEFAULT_LLMNR_MODE,
|
||||
.mdns_support = DEFAULT_MDNS_MODE,
|
||||
.llmnr_support = RESOLVE_SUPPORT_YES,
|
||||
.mdns_support = RESOLVE_SUPPORT_YES,
|
||||
.dnssec_mode = DEFAULT_DNSSEC_MODE,
|
||||
.dns_over_tls_mode = DEFAULT_DNS_OVER_TLS_MODE,
|
||||
.enable_cache = DNS_CACHE_MODE_YES,
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
#DNS=
|
||||
#FallbackDNS=@DNS_SERVERS@
|
||||
#Domains=
|
||||
#LLMNR=yes
|
||||
#MulticastDNS=yes
|
||||
#DNSSEC=@DEFAULT_DNSSEC_MODE@
|
||||
#DNSOverTLS=@DEFAULT_DNS_OVER_TLS_MODE@
|
||||
#MulticastDNS=@DEFAULT_MDNS_MODE@
|
||||
#LLMNR=@DEFAULT_LLMNR_MODE@
|
||||
#Cache=yes
|
||||
#DNSStubListener=yes
|
||||
#ReadEtcHosts=yes
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#include "format-util.h"
|
||||
#include "fs-util.h"
|
||||
#include "io-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "log.h"
|
||||
#include "macro.h"
|
||||
#include "memory-util.h"
|
||||
|
@ -135,12 +134,12 @@ static int add_to_keyring(const char *keyname, AskPasswordFlags flags, char **pa
|
|||
if (keyctl(KEYCTL_SET_TIMEOUT,
|
||||
(unsigned long) serial,
|
||||
(unsigned long) DIV_ROUND_UP(KEYRING_TIMEOUT_USEC, USEC_PER_SEC), 0, 0) < 0)
|
||||
log_debug_errno(errno, "Failed to adjust kernel keyring key timeout: %m");
|
||||
log_debug_errno(errno, "Failed to adjust timeout: %m");
|
||||
|
||||
/* Tell everyone to check the keyring */
|
||||
(void) touch("/run/systemd/ask-password");
|
||||
|
||||
log_debug("Added key to kernel keyring as %" PRIi32 ".", serial);
|
||||
log_debug("Added key to keyring as %" PRIi32 ".", serial);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -152,7 +151,7 @@ static int add_to_keyring_and_log(const char *keyname, AskPasswordFlags flags, c
|
|||
|
||||
r = add_to_keyring(keyname, flags, passwords);
|
||||
if (r < 0)
|
||||
return log_debug_errno(r, "Failed to add password to kernel keyring: %m");
|
||||
return log_debug_errno(r, "Failed to add password to keyring: %m");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -431,9 +430,6 @@ int ask_password_tty(
|
|||
if (!message)
|
||||
message = "Password:";
|
||||
|
||||
if (emoji_enabled())
|
||||
message = strjoina(special_glyph(SPECIAL_GLYPH_LOCK_AND_KEY), " ", message);
|
||||
|
||||
if (flag_file || ((flags & ASK_PASSWORD_ACCEPT_CACHED) && keyname)) {
|
||||
notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
|
||||
if (notify < 0)
|
||||
|
|
|
@ -67,7 +67,7 @@ static void test_keymaps(void) {
|
|||
|
||||
#define dump_glyph(x) log_info(STRINGIFY(x) ": %s", special_glyph(x))
|
||||
static void dump_special_glyphs(void) {
|
||||
assert_cc(SPECIAL_GLYPH_LOCK_AND_KEY + 1 == _SPECIAL_GLYPH_MAX);
|
||||
assert_cc(SPECIAL_GLYPH_DEPRESSED_SMILEY + 1 == _SPECIAL_GLYPH_MAX);
|
||||
|
||||
log_info("/* %s */", __func__);
|
||||
|
||||
|
@ -92,7 +92,6 @@ static void dump_special_glyphs(void) {
|
|||
dump_glyph(SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY);
|
||||
dump_glyph(SPECIAL_GLYPH_UNHAPPY_SMILEY);
|
||||
dump_glyph(SPECIAL_GLYPH_DEPRESSED_SMILEY);
|
||||
dump_glyph(SPECIAL_GLYPH_LOCK_AND_KEY);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
|
|
Loading…
Reference in New Issue