The section in man (8) mount for overlay is missing nine options which
aren't documented elsewhere either and are useful features to be aware
of and use.
Fixes#1350.
1. the test incorrectly used AC_COMPILE_IFELSE instead of
AC_LINK_IFELSE, defeating the purpose of checking -lcrypt.
2. the test did not properly restore LIBS, causing later checks to all
fail if libcrypt wasn't found.
3. HAVE_LIBCRYPT only controls whether to use -lcrypt, it is not
needed or used in any source files.
[kzak@redhat.com: - improve commit message
- use UL_{SET,RESTORE}_FLAGS() rather than directly
modify $LIBS]
Signed-off-by: Karel Zak <kzak@redhat.com>
According to POSIX, readlink() makes no effort to null-terminate buffer
with the result. It seems better to hide this disadvantage in the
ul_path_...() API rather than assume buf[sz] = '\0' everywhere.
Reported-by: Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The rule is pretty simple, always use setgid() before setuid().
Reported-by: Jan Pazdziora <jpazdziora@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
In the arm platform, we do not have the "CPU family" as X86.
In the linux kernel, it is hardcode to set the "CPU architecuture:8"
which should be changed for arm v9 in future.
This patch adds "bios_family" field, which we can get from the DMI table.
In the ampere Altra platform, we can get the new lscpu output:
----------------------------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
BIOS Vendor ID: Ampere(R)
Model name: Neoverse-N1
BIOS Model name: Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
BIOS CPU family: 257
Model: 1
Thread(s) per core: 1
----------------------------------------------------------------
[kzak@redhat.com: - s/sprintf/snprintf/]
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
The patch :367c85c47286 ("lscpu: use SMBIOS tables on ARM for lscpu")
relies on the existence of "/sys/firmware/dmi/entries/4-0/raw",
which may not exist in standard linux kernel.
But "/sys/firmware/dmi/tables/DMI" should exist and can provide the required
processor information.
This patch uses "/sys/firmware/dmi/tables/DMI"
to get the processor information:
Before this patch, in Ampere Altra platform, the lscpu output is:
---------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
Model name: Neoverse-N1
Model: 1
Thread(s) per core: 1
Core(s) per socket: 80
Socket(s): 2
........................................
---------------------------------------------
After this patch, we can use get the lscpu output
in Ampere Altra platform:
---------------------------------------------
Architecture: aarch64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 160
On-line CPU(s) list: 0-159
Vendor ID: ARM
BIOS Vendor ID: Ampere(R)
Model name: Neoverse-N1
BIOS Model name: Ampere(R) Altra(R) Processor Q00-00 CPU @ 3.0GHz
Model: 1
Thread(s) per core: 1
Core(s) per socket: 80
Socket(s): 2
........................................
---------------------------------------------
[kzak@redhat.com: - s/sprintf/snprintf/]
Signed-off-by: Huang Shijie <shijie@os.amperecomputing.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
* Don't use 'size_t len' variable for utf8_encoded_valid_unichar()
return code as it returns negative numbers on invalid utf8 sequence.
* Don't rely only on \0, but check the current position against output
buffer size.
* Accept hex encoding like the original version.
* Use else-if to avoid unnecessary 'continue'.
Signed-off-by: Karel Zak <kzak@redhat.com>
Let's make it possible to use the function to normalize the string
between two buffers (from source to destination).
Signed-off-by: Karel Zak <kzak@redhat.com>
Using mount flag `nosuid` also affects SELinux domain transitions but
this has not been documented well.
Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
Double-semicolon at the end of the option line results in description
being indented extra tab to the right. Replacing them with double-colons
allows all options to be displayed at the same indent level.
libblkid/src/probe.c:1012:22: error: ‘BLKGETZONESZ’ undeclared (first use in this function)
1012 | if (!ioctl(pr->fd, BLKGETZONESZ, &zone_size_sector))
| ^~~~~~~~~~~~
Signed-off-by: Karel Zak <kzak@redhat.com>
The code was changed to use ':' in getopt_long() but these were left
over by mistake causing weird random errors when using these options
depending on the order they were fed.
Signed-off-by: Qais Yousef <qais.yousef@arm.com>
The bare array ({[...]}) for top level list of entries is invalid. It
seems better to print empty string than nothing. This is workaround
for broken utils, better is to define a table name.
Addresses: https://github.com/karelzak/util-linux/issues/1339
Signed-off-by: Karel Zak <kzak@redhat.com>
We need to ignore man-pages at all if not available (not generated
yet), but asciidoctor is not installed.
Fix: https://github.com/karelzak/util-linux/issues/1334
Signed-off-by: Karel Zak <kzak@redhat.com>
* 'lscpu-json-types' of https://github.com/t-8ch/util-linux:
lscpu: use optional json values
libsmartcols: add support for optional boolean values
lscpu: use json types
* next: (26 commits)
build-sys: add script to compare config.h from meson and autotools
meson: add missing header files check
docs: update TODO
tests: update lscpu outputs
lscpu: read MHZ from /sys/.../cpufreq/scaling_cur_freq
lscpu: use locale-independent strtod() when read from kernel
lib/c_strtod; add locale independent strtod()
tests: update lscpu output
lscpu: use MHZ as number to be locale sensitive
lscpu: add SCALMHZ% and "CPU scaling MHz:"
sulogin: fix whitespace error
sulogin: ignore none-existing console devices
lsns: fix old error message
lsns: fix copy & past in man page
lsns: fill UID and USER columns for interpolated namespaces
fixup! lsns: interpolate missing namespaces for converting forests to a tree
lsns: interpolate missing namespaces for converting forests to a tree
lsns: reorganize members specifying other namespaces in lsns_namespace
lsns: make namespace having no process printable
libblkid: support zone reset for wipefs
...