mirror of
https://github.com/systemd/systemd
synced 2026-04-11 09:34:51 +02:00
Compare commits
6 Commits
a9cab9f5cf
...
743814d7a2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
743814d7a2 | ||
|
|
2ef28d054d | ||
|
|
d2c3f14fed | ||
|
|
de27f4c8b8 | ||
|
|
a75a4148a8 | ||
|
|
367649ee66 |
@ -997,6 +997,9 @@ else
|
||||
# Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
|
||||
# (like clang-10/llvm-strip-10)
|
||||
clang_bin = cc.get_id() == 'clang' ? cc.cmd_array()[0] : 'clang'
|
||||
if clang_bin.contains('afl-clang') or clang_bin.contains('hfuzz-clang')
|
||||
clang_bin = 'clang'
|
||||
endif
|
||||
clang = find_program(clang_bin, required : bpf_framework_required)
|
||||
if clang.found()
|
||||
llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
|
||||
|
||||
@ -225,6 +225,7 @@ efi_cflags = cc.get_supported_arguments(
|
||||
'-std=gnu99',
|
||||
'-ffreestanding',
|
||||
'-fshort-wchar',
|
||||
'-fvisibility=hidden',
|
||||
'-isystem', efi_incdir,
|
||||
'-isystem', efi_incdir / efi_arch[1],
|
||||
'-I', fundamental_path,
|
||||
@ -281,7 +282,7 @@ efi_ldflags = [
|
||||
efi_crt0,
|
||||
]
|
||||
if efi_arch[1] in ['aarch64', 'arm', 'riscv64']
|
||||
efi_ldflags += ['-shared', '-fwhole-program']
|
||||
efi_ldflags += ['-shared']
|
||||
# Aarch64, ARM32 and 64bit RISC-V don't have an EFI capable objcopy.
|
||||
# Use 'binary' instead, and add required symbols manually.
|
||||
efi_ldflags += ['-Wl,--defsym=EFI_SUBSYSTEM=0xa']
|
||||
|
||||
@ -383,7 +383,7 @@ static int handle_generic_user_record_error(
|
||||
|
||||
else if (sd_bus_error_has_name(error, BUS_ERROR_AUTHENTICATION_LIMIT_HIT))
|
||||
return log_error_errno(SYNTHETIC_ERRNO(ETOOMANYREFS),
|
||||
"Too frequent unsuccessful login attempts for user %s, try again later.", user_name);
|
||||
"Too frequent login attempts for user %s, try again later.", user_name);
|
||||
|
||||
else if (sd_bus_error_has_name(error, BUS_ERROR_BAD_PASSWORD)) {
|
||||
|
||||
|
||||
@ -293,7 +293,7 @@ static int handle_generic_user_record_error(
|
||||
return PAM_PERM_DENIED;
|
||||
|
||||
} else if (sd_bus_error_has_name(error, BUS_ERROR_AUTHENTICATION_LIMIT_HIT)) {
|
||||
(void) pam_prompt(handle, PAM_ERROR_MSG, NULL, "Too frequent unsuccessful login attempts for user %s, try again later.", user_name);
|
||||
(void) pam_prompt(handle, PAM_ERROR_MSG, NULL, "Too frequent login attempts for user %s, try again later.", user_name);
|
||||
pam_syslog(handle, LOG_ERR, "Failed to acquire home for user %s: %s", user_name, bus_error_message(error, ret));
|
||||
return PAM_MAXTRIES;
|
||||
|
||||
|
||||
@ -26,6 +26,13 @@ inspect() {
|
||||
homectl inspect --json=pretty "$USERNAME"
|
||||
}
|
||||
|
||||
wait_for_state() {
|
||||
for ((i=0;i<10;i++)) ; do
|
||||
homectl inspect "$1" | grep -qF "State: $2" && break
|
||||
sleep .5
|
||||
done
|
||||
}
|
||||
|
||||
systemd-analyze log-level debug
|
||||
systemd-analyze log-target console
|
||||
systemctl service-log-level systemd-homed debug
|
||||
@ -146,18 +153,33 @@ if ! systemd-detect-virt -cq ; then
|
||||
inspect test-user2
|
||||
fi
|
||||
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test ! -f /home/test-user/xyz
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz \
|
||||
&& { echo 'unexpected success'; exit 1; }
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- touch /home/test-user/xyz
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- rm /home/test-user/xyz
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test ! -f /home/test-user/xyz
|
||||
wait_for_state test-user inactive
|
||||
PASSWORD=xEhErW0ndafV4s homectl with test-user -- test -f /home/test-user/xyz \
|
||||
&& { echo 'unexpected success'; exit 1; }
|
||||
|
||||
wait_for_state test-user inactive
|
||||
homectl remove test-user
|
||||
|
||||
if ! systemd-detect-virt -cq ; then
|
||||
wait_for_state test-user2 active
|
||||
homectl deactivate test-user2
|
||||
wait_for_state test-user2 inactive
|
||||
homectl remove test-user2
|
||||
fi
|
||||
|
||||
systemd-analyze log-level info
|
||||
|
||||
echo OK >/testok
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user