Compare commits

..

No commits in common. "80cc3e3eabd2cf4e31ae3f0d6e2ac7b61d0a1832" and "c90c597ee3b6b9d30ee86410e46939ba875e467a" have entirely different histories.

13 changed files with 26 additions and 92 deletions

View File

@ -192,11 +192,13 @@
<varlistentry> <varlistentry>
<term><varname>ANSI_COLOR=</varname></term> <term><varname>ANSI_COLOR=</varname></term>
<listitem><para>A suggested presentation color when showing the OS name on the console. This should <listitem><para>A suggested presentation color when showing
be specified as string suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code for setting the OS name on the console. This should be specified as string
graphical rendition. This field is optional. Example: <literal>ANSI_COLOR="0;31"</literal> for red, suitable for inclusion in the ESC [ m ANSI/ECMA-48 escape code
<literal>ANSI_COLOR="1;34"</literal> for light blue, or for setting graphical rendition. This field is optional.
<literal>ANSI_COLOR="0;38;2;60;110;180"</literal> for Fedora blue.</para></listitem> Example: <literal>ANSI_COLOR="0;31"</literal> for red, or
<literal>ANSI_COLOR="1;34"</literal> for light
blue.</para></listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
@ -345,24 +347,14 @@
<title>Example</title> <title>Example</title>
<programlisting>NAME=Fedora <programlisting>NAME=Fedora
VERSION="32 (Workstation Edition)" VERSION="17 (Beefy Miracle)"
ID=fedora ID=fedora
VERSION_ID=32 VERSION_ID=17
PRETTY_NAME="Fedora 32 (Workstation Edition)" PRETTY_NAME="Fedora 17 (Beefy Miracle)"
ANSI_COLOR="0;38;2;60;110;180" ANSI_COLOR="0;34"
LOGO=fedora-logo-icon CPE_NAME="cpe:/o:fedoraproject:fedora:17"
CPE_NAME="cpe:/o:fedoraproject:fedora:32"
HOME_URL="https://fedoraproject.org/" HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f32/system-administrators-guide/" BUG_REPORT_URL="https://bugzilla.redhat.com/"</programlisting>
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>
</refsect1> </refsect1>
<refsect1> <refsect1>

View File

@ -167,11 +167,6 @@
<entry><varname>wsl</varname></entry> <entry><varname>wsl</varname></entry>
<entry><ulink url="https://docs.microsoft.com/en-us/windows/wsl/about">Windows Subsystem for Linux</ulink></entry> <entry><ulink url="https://docs.microsoft.com/en-us/windows/wsl/about">Windows Subsystem for Linux</ulink></entry>
</row> </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> </tbody>
</tgroup> </tgroup>
</table> </table>

View File

@ -1170,7 +1170,6 @@
<literal>podman</literal>, <literal>podman</literal>,
<literal>rkt</literal>, <literal>rkt</literal>,
<literal>wsl</literal>, <literal>wsl</literal>,
<literal>proot</literal>,
<literal>acrn</literal> to test <literal>acrn</literal> to test
against a specific implementation, or against a specific implementation, or
<literal>private-users</literal> to check whether we are running in a user namespace. See <literal>private-users</literal> to check whether we are running in a user namespace. See

View File

@ -1302,16 +1302,6 @@ conf.set('DEFAULT_DNS_OVER_TLS_MODE',
'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper()) 'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper())
substs.set('DEFAULT_DNS_OVER_TLS_MODE', default_dns_over_tls) 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') want_repart = get_option('repart')
if want_repart != 'false' if want_repart != 'false'
have = (conf.get('HAVE_OPENSSL') == 1 and have = (conf.get('HAVE_OPENSSL') == 1 and
@ -3364,8 +3354,6 @@ status = [
'default DNSSEC mode: @0@'.format(default_dnssec), 'default DNSSEC mode: @0@'.format(default_dnssec),
'default DNS-over-TLS mode: @0@'.format(default_dns_over_tls), '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 cgroup hierarchy: @0@'.format(default_hierarchy),
'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme), 'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
'default KillUserProcesses setting: @0@'.format(kill_user_processes), 'default KillUserProcesses setting: @0@'.format(kill_user_processes),

View File

@ -230,14 +230,6 @@ option('default-dns-over-tls', type : 'combo',
description : 'default DNS-over-TLS mode', description : 'default DNS-over-TLS mode',
choices : ['yes', 'opportunistic', 'no'], choices : ['yes', 'opportunistic', 'no'],
value : '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'], option('dns-over-tls', type : 'combo', choices : ['auto', 'gnutls', 'openssl', 'true', 'false'],
description : 'DNS-over-TLS support') description : 'DNS-over-TLS support')
option('dns-servers', type : 'string', option('dns-servers', type : 'string',

View File

@ -305,7 +305,7 @@ out:
return (bool) cached_answer; return (bool) cached_answer;
} }
bool emoji_enabled(void) { static bool emoji_enabled(void) {
static int cached_emoji_enabled = -1; static int cached_emoji_enabled = -1;
if (cached_emoji_enabled < 0) { if (cached_emoji_enabled < 0) {
@ -357,7 +357,6 @@ const char *special_glyph(SpecialGlyph code) {
[SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = ":-(", [SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY] = ":-(",
[SPECIAL_GLYPH_UNHAPPY_SMILEY] = ":-{", [SPECIAL_GLYPH_UNHAPPY_SMILEY] = ":-{",
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = ":-[", [SPECIAL_GLYPH_DEPRESSED_SMILEY] = ":-[",
[SPECIAL_GLYPH_LOCK_AND_KEY] = "o-,"
}, },
/* UTF-8 */ /* 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_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_UNHAPPY_SMILEY] = "\360\237\230\250", /* 😨 (actually called: FEARFUL FACE) */
[SPECIAL_GLYPH_DEPRESSED_SMILEY] = "\360\237\244\242", /* 🤢 (actually called: NAUSEATED 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); 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]) { void locale_variables_free(char *l[_VARIABLE_LC_MAX]) {

View File

@ -54,22 +54,19 @@ typedef enum {
SPECIAL_GLYPH_LIGHT_SHADE, SPECIAL_GLYPH_LIGHT_SHADE,
SPECIAL_GLYPH_DARK_SHADE, SPECIAL_GLYPH_DARK_SHADE,
SPECIAL_GLYPH_SIGMA, SPECIAL_GLYPH_SIGMA,
_SPECIAL_GLYPH_FIRST_EMOJI, _SPECIAL_GLYPH_FIRST_SMILEY,
SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_EMOJI, SPECIAL_GLYPH_ECSTATIC_SMILEY = _SPECIAL_GLYPH_FIRST_SMILEY,
SPECIAL_GLYPH_HAPPY_SMILEY, SPECIAL_GLYPH_HAPPY_SMILEY,
SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY, SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY,
SPECIAL_GLYPH_NEUTRAL_SMILEY, SPECIAL_GLYPH_NEUTRAL_SMILEY,
SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY, SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY,
SPECIAL_GLYPH_UNHAPPY_SMILEY, SPECIAL_GLYPH_UNHAPPY_SMILEY,
SPECIAL_GLYPH_DEPRESSED_SMILEY, SPECIAL_GLYPH_DEPRESSED_SMILEY,
SPECIAL_GLYPH_LOCK_AND_KEY,
_SPECIAL_GLYPH_MAX _SPECIAL_GLYPH_MAX
} SpecialGlyph; } SpecialGlyph;
const char *special_glyph(SpecialGlyph code) _const_; const char *special_glyph(SpecialGlyph code) _const_;
bool emoji_enabled(void);
const char* locale_variable_to_string(LocaleVariable i) _const_; const char* locale_variable_to_string(LocaleVariable i) _const_;
LocaleVariable locale_variable_from_string(const char *s) _pure_; LocaleVariable locale_variable_from_string(const char *s) _pure_;

View File

@ -441,7 +441,6 @@ static const char *const container_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_PODMAN] = "podman", [VIRTUALIZATION_PODMAN] = "podman",
[VIRTUALIZATION_RKT] = "rkt", [VIRTUALIZATION_RKT] = "rkt",
[VIRTUALIZATION_WSL] = "wsl", [VIRTUALIZATION_WSL] = "wsl",
[VIRTUALIZATION_PROOT] = "proot",
}; };
DEFINE_PRIVATE_STRING_TABLE_LOOKUP_FROM_STRING(container, int); 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; static thread_local int cached_found = _VIRTUALIZATION_INVALID;
_cleanup_free_ char *m = NULL; _cleanup_free_ char *m = NULL;
_cleanup_free_ char *o = NULL; _cleanup_free_ char *o = NULL;
_cleanup_free_ char *p = NULL;
const char *e = NULL; const char *e = NULL;
int r; int r;
@ -474,22 +472,6 @@ int detect_container(void) {
goto finish; 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 (getpid_cached() == 1) {
/* If we are PID 1 we can just check our own environment variable, and that's authoritative. /* If we are PID 1 we can just check our own environment variable, and that's authoritative.
* We distinguish three cases: * We distinguish three cases:
@ -678,7 +660,6 @@ static const char *const virtualization_table[_VIRTUALIZATION_MAX] = {
[VIRTUALIZATION_PODMAN] = "podman", [VIRTUALIZATION_PODMAN] = "podman",
[VIRTUALIZATION_RKT] = "rkt", [VIRTUALIZATION_RKT] = "rkt",
[VIRTUALIZATION_WSL] = "wsl", [VIRTUALIZATION_WSL] = "wsl",
[VIRTUALIZATION_PROOT] = "proot",
[VIRTUALIZATION_CONTAINER_OTHER] = "container-other", [VIRTUALIZATION_CONTAINER_OTHER] = "container-other",
}; };

View File

@ -34,7 +34,6 @@ enum {
VIRTUALIZATION_PODMAN, VIRTUALIZATION_PODMAN,
VIRTUALIZATION_RKT, VIRTUALIZATION_RKT,
VIRTUALIZATION_WSL, VIRTUALIZATION_WSL,
VIRTUALIZATION_PROOT,
VIRTUALIZATION_CONTAINER_OTHER, VIRTUALIZATION_CONTAINER_OTHER,
VIRTUALIZATION_CONTAINER_LAST = VIRTUALIZATION_CONTAINER_OTHER, VIRTUALIZATION_CONTAINER_LAST = VIRTUALIZATION_CONTAINER_OTHER,

View File

@ -581,8 +581,8 @@ int manager_new(Manager **ret) {
.dns_stub_tcp_fd = -1, .dns_stub_tcp_fd = -1,
.hostname_fd = -1, .hostname_fd = -1,
.llmnr_support = DEFAULT_LLMNR_MODE, .llmnr_support = RESOLVE_SUPPORT_YES,
.mdns_support = DEFAULT_MDNS_MODE, .mdns_support = RESOLVE_SUPPORT_YES,
.dnssec_mode = DEFAULT_DNSSEC_MODE, .dnssec_mode = DEFAULT_DNSSEC_MODE,
.dns_over_tls_mode = DEFAULT_DNS_OVER_TLS_MODE, .dns_over_tls_mode = DEFAULT_DNS_OVER_TLS_MODE,
.enable_cache = DNS_CACHE_MODE_YES, .enable_cache = DNS_CACHE_MODE_YES,

View File

@ -15,10 +15,10 @@
#DNS= #DNS=
#FallbackDNS=@DNS_SERVERS@ #FallbackDNS=@DNS_SERVERS@
#Domains= #Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=@DEFAULT_DNSSEC_MODE@ #DNSSEC=@DEFAULT_DNSSEC_MODE@
#DNSOverTLS=@DEFAULT_DNS_OVER_TLS_MODE@ #DNSOverTLS=@DEFAULT_DNS_OVER_TLS_MODE@
#MulticastDNS=@DEFAULT_MDNS_MODE@
#LLMNR=@DEFAULT_LLMNR_MODE@
#Cache=yes #Cache=yes
#DNSStubListener=yes #DNSStubListener=yes
#ReadEtcHosts=yes #ReadEtcHosts=yes

View File

@ -27,7 +27,6 @@
#include "format-util.h" #include "format-util.h"
#include "fs-util.h" #include "fs-util.h"
#include "io-util.h" #include "io-util.h"
#include "locale-util.h"
#include "log.h" #include "log.h"
#include "macro.h" #include "macro.h"
#include "memory-util.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, if (keyctl(KEYCTL_SET_TIMEOUT,
(unsigned long) serial, (unsigned long) serial,
(unsigned long) DIV_ROUND_UP(KEYRING_TIMEOUT_USEC, USEC_PER_SEC), 0, 0) < 0) (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 */ /* Tell everyone to check the keyring */
(void) touch("/run/systemd/ask-password"); (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; 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); r = add_to_keyring(keyname, flags, passwords);
if (r < 0) 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; return 0;
} }
@ -431,9 +430,6 @@ int ask_password_tty(
if (!message) if (!message)
message = "Password:"; message = "Password:";
if (emoji_enabled())
message = strjoina(special_glyph(SPECIAL_GLYPH_LOCK_AND_KEY), " ", message);
if (flag_file || ((flags & ASK_PASSWORD_ACCEPT_CACHED) && keyname)) { if (flag_file || ((flags & ASK_PASSWORD_ACCEPT_CACHED) && keyname)) {
notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK); notify = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
if (notify < 0) if (notify < 0)

View File

@ -67,7 +67,7 @@ static void test_keymaps(void) {
#define dump_glyph(x) log_info(STRINGIFY(x) ": %s", special_glyph(x)) #define dump_glyph(x) log_info(STRINGIFY(x) ": %s", special_glyph(x))
static void dump_special_glyphs(void) { 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__); 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_SLIGHTLY_UNHAPPY_SMILEY);
dump_glyph(SPECIAL_GLYPH_UNHAPPY_SMILEY); dump_glyph(SPECIAL_GLYPH_UNHAPPY_SMILEY);
dump_glyph(SPECIAL_GLYPH_DEPRESSED_SMILEY); dump_glyph(SPECIAL_GLYPH_DEPRESSED_SMILEY);
dump_glyph(SPECIAL_GLYPH_LOCK_AND_KEY);
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {