mirror of
https://github.com/systemd/systemd
synced 2026-03-15 01:24:51 +01:00
Compare commits
7 Commits
a346a34f7f
...
cbec0bfa5d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbec0bfa5d | ||
|
|
aa67e45b4b | ||
|
|
708274eef3 | ||
|
|
40fb3503f4 | ||
|
|
58dbf4c925 | ||
|
|
c96a301213 | ||
|
|
59092877b3 |
@ -663,6 +663,11 @@ sensor:modalias:acpi:SMO8500*:dmi:bvnAmericanMegatrendsInc.:bvr5.6.5:bd07/25/201
|
|||||||
sensor:modalias:acpi:BOSC0200*:dmi:*svnONE-NETBOOKTECHNOLOGYCO*:pnOne-Mix3Pro:*
|
sensor:modalias:acpi:BOSC0200*:dmi:*svnONE-NETBOOKTECHNOLOGYCO*:pnOne-Mix3Pro:*
|
||||||
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
||||||
|
|
||||||
|
# One-netbook OneMix 3s
|
||||||
|
# OneMix 3s has no product name filled, matching entire dmi-alias
|
||||||
|
sensor:modalias:acpi:BOSC0200*:dmi:bvnAmericanMegatrendsInc.:bvr5.12:bd07/17/2019:br5.12:svnDefaultstring:pnDefaultstring:pvrDefaultstring:rvnDefaultstring:rnDefaultstring:rvrDefaultstring:cvnDefaultstring:ct3:cvrDefaultstring:*
|
||||||
|
ACCEL_MOUNT_MATRIX=-1, 0, 0; 0, 1, 0; 0, 0, 1
|
||||||
|
|
||||||
#########################################
|
#########################################
|
||||||
# Peaq
|
# Peaq
|
||||||
#########################################
|
#########################################
|
||||||
|
|||||||
@ -39,7 +39,10 @@
|
|||||||
url="https://systemd.io/USER_RECORD">JSON User Records</ulink> and <ulink
|
url="https://systemd.io/USER_RECORD">JSON User Records</ulink> and <ulink
|
||||||
url="https://systemd.io/GROUP_RECORD">JSON Group Records</ulink> definitions), and classic UNIX NSS/glibc
|
url="https://systemd.io/GROUP_RECORD">JSON Group Records</ulink> definitions), and classic UNIX NSS/glibc
|
||||||
user and group records. This tool is primarily a client to the <ulink
|
user and group records. This tool is primarily a client to the <ulink
|
||||||
url="https://systemd.io/USER_GROUP_API">User/Group Record Lookup API via Varlink</ulink>.</para>
|
url="https://systemd.io/USER_GROUP_API">User/Group Record Lookup API via Varlink</ulink>, and may also
|
||||||
|
pick up drop-in JSON user and group records from <filename>/etc/userdb/</filename>,
|
||||||
|
<filename>/run/userdb/</filename>, <filename>/run/host/userdb/</filename>,
|
||||||
|
<filename>/use/lib/userdb/</filename>.</para>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
<refsect1>
|
<refsect1>
|
||||||
@ -86,6 +89,27 @@
|
|||||||
are included in the output (which is the default).</para></listitem>
|
are included in the output (which is the default).</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--with-varlink=</option><replaceable>BOOL</replaceable></term>
|
||||||
|
|
||||||
|
<listitem><para>Controls whether to include Varlink user/group lookups in the output, i.e. those done
|
||||||
|
via the <ulink url="https://systemd.io/USER_GROUP_API">User/Group Record Lookup API via
|
||||||
|
Varlink</ulink>. If <option>--with-varlink=no</option> is used any attempts to resolve or enumerate
|
||||||
|
users/groups provided only via Varlink are suppressed. If <option>--with-varlink=yes</option> is
|
||||||
|
specified such users/groups are included in the output (which is the default).</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><option>--with-dropin=</option><replaceable>BOOL</replaceable></term>
|
||||||
|
|
||||||
|
<listitem><para>Controls whether to include user/group lookups in the output that are defined using
|
||||||
|
drop-in files in <filename>/etc/userdb/</filename>, <filename>/run/userdb/</filename>,
|
||||||
|
<filename>/run/host/userdb/</filename>, <filename>/use/lib/userdb/</filename>. If
|
||||||
|
<option>--with-dropin=no</option> is used these records are suppressed. If
|
||||||
|
<option>--with-dropin=yes</option> is specified such users/groups are included in the output (which
|
||||||
|
is the default).</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><option>--synthesize=</option><replaceable>BOOL</replaceable></term>
|
<term><option>--synthesize=</option><replaceable>BOOL</replaceable></term>
|
||||||
|
|
||||||
@ -228,6 +252,17 @@
|
|||||||
data, however the NSS/glibc APIs necessarily expose a more reduced set of fields
|
data, however the NSS/glibc APIs necessarily expose a more reduced set of fields
|
||||||
only.</para></listitem>
|
only.</para></listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><constant>io.systemd.DropIn</constant></term>
|
||||||
|
|
||||||
|
<listitem><para>This service is (also) provided by
|
||||||
|
<citerefentry><refentrytitle>systemd-userdbd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||||
|
and picks up JSON user/group records from <filename>/etc/userdb/</filename>,
|
||||||
|
<filename>/run/userdb/</filename>, <filename>/run/host/userdb/</filename>,
|
||||||
|
<filename>/use/lib/userdb/</filename>.</para></listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>Note that <command>userdbctl</command> has internal support for NSS-based lookups too. This means
|
<para>Note that <command>userdbctl</command> has internal support for NSS-based lookups too. This means
|
||||||
|
|||||||
@ -114,6 +114,8 @@ static UserDBIterator* userdb_iterator_new(LookupWhat what, UserDBFlags flags) {
|
|||||||
*i = (UserDBIterator) {
|
*i = (UserDBIterator) {
|
||||||
.what = what,
|
.what = what,
|
||||||
.flags = flags,
|
.flags = flags,
|
||||||
|
.synthesize_root = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE),
|
||||||
|
.synthesize_nobody = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE),
|
||||||
};
|
};
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
@ -510,7 +512,7 @@ static int userdb_start_query(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (set_isempty(iterator->links))
|
if (set_isempty(iterator->links))
|
||||||
return ret; /* propagate last error we saw if we couldn't connect to anything. */
|
return ret < 0 ? ret : -ESRCH; /* propagate last error we saw if we couldn't connect to anything. */
|
||||||
|
|
||||||
/* We connected to some services, in this case, ignore the ones we failed on */
|
/* We connected to some services, in this case, ignore the ones we failed on */
|
||||||
return 0;
|
return 0;
|
||||||
@ -730,8 +732,6 @@ int userdb_all(UserDBFlags flags, UserDBIterator **ret) {
|
|||||||
if (!iterator)
|
if (!iterator)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
iterator->synthesize_root = iterator->synthesize_nobody = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE);
|
|
||||||
|
|
||||||
qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", true, NULL, flags);
|
qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetUserRecord", true, NULL, flags);
|
||||||
|
|
||||||
if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) {
|
if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) {
|
||||||
@ -1002,8 +1002,6 @@ int groupdb_all(UserDBFlags flags, UserDBIterator **ret) {
|
|||||||
if (!iterator)
|
if (!iterator)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
iterator->synthesize_root = iterator->synthesize_nobody = !FLAGS_SET(flags, USERDB_DONT_SYNTHESIZE);
|
|
||||||
|
|
||||||
qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetGroupRecord", true, NULL, flags);
|
qr = userdb_start_query(iterator, "io.systemd.UserDatabase.GetGroupRecord", true, NULL, flags);
|
||||||
|
|
||||||
if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) {
|
if (!FLAGS_SET(flags, USERDB_EXCLUDE_NSS) && (qr < 0 || !iterator->nss_covered)) {
|
||||||
|
|||||||
@ -601,6 +601,8 @@ static int help(int argc, char *argv[], void *userdata) {
|
|||||||
" -N Do not synthesize or include glibc NSS data\n"
|
" -N Do not synthesize or include glibc NSS data\n"
|
||||||
" (Same as --synthesize=no --with-nss=no)\n"
|
" (Same as --synthesize=no --with-nss=no)\n"
|
||||||
" --synthesize=BOOL Synthesize root/nobody user\n"
|
" --synthesize=BOOL Synthesize root/nobody user\n"
|
||||||
|
" --with-dropin=BOOL Control whether to include drop-in records\n"
|
||||||
|
" --with-varlink=BOOL Control whether to talk to services at all\n"
|
||||||
"\nSee the %s for details.\n",
|
"\nSee the %s for details.\n",
|
||||||
program_invocation_short_name,
|
program_invocation_short_name,
|
||||||
ansi_highlight(),
|
ansi_highlight(),
|
||||||
@ -618,6 +620,8 @@ static int parse_argv(int argc, char *argv[]) {
|
|||||||
ARG_NO_LEGEND,
|
ARG_NO_LEGEND,
|
||||||
ARG_OUTPUT,
|
ARG_OUTPUT,
|
||||||
ARG_WITH_NSS,
|
ARG_WITH_NSS,
|
||||||
|
ARG_WITH_DROPIN,
|
||||||
|
ARG_WITH_VARLINK,
|
||||||
ARG_SYNTHESIZE,
|
ARG_SYNTHESIZE,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -629,6 +633,8 @@ static int parse_argv(int argc, char *argv[]) {
|
|||||||
{ "output", required_argument, NULL, ARG_OUTPUT },
|
{ "output", required_argument, NULL, ARG_OUTPUT },
|
||||||
{ "service", required_argument, NULL, 's' },
|
{ "service", required_argument, NULL, 's' },
|
||||||
{ "with-nss", required_argument, NULL, ARG_WITH_NSS },
|
{ "with-nss", required_argument, NULL, ARG_WITH_NSS },
|
||||||
|
{ "with-dropin", required_argument, NULL, ARG_WITH_DROPIN },
|
||||||
|
{ "with-varlink", required_argument, NULL, ARG_WITH_VARLINK },
|
||||||
{ "synthesize", required_argument, NULL, ARG_SYNTHESIZE },
|
{ "synthesize", required_argument, NULL, ARG_SYNTHESIZE },
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
@ -728,6 +734,22 @@ static int parse_argv(int argc, char *argv[]) {
|
|||||||
SET_FLAG(arg_userdb_flags, USERDB_EXCLUDE_NSS, !r);
|
SET_FLAG(arg_userdb_flags, USERDB_EXCLUDE_NSS, !r);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ARG_WITH_DROPIN:
|
||||||
|
r = parse_boolean_argument("--with-dropin=", optarg, NULL);
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
SET_FLAG(arg_userdb_flags, USERDB_EXCLUDE_DROPIN, !r);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ARG_WITH_VARLINK:
|
||||||
|
r = parse_boolean_argument("--with-varlink=", optarg, NULL);
|
||||||
|
if (r < 0)
|
||||||
|
return r;
|
||||||
|
|
||||||
|
SET_FLAG(arg_userdb_flags, USERDB_EXCLUDE_VARLINK, !r);
|
||||||
|
break;
|
||||||
|
|
||||||
case ARG_SYNTHESIZE:
|
case ARG_SYNTHESIZE:
|
||||||
r = parse_boolean_argument("--synthesize=", optarg, NULL);
|
r = parse_boolean_argument("--synthesize=", optarg, NULL);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user