basic + fundamental: Clean up includes

Split out of #37344.
This commit is contained in:
Daan De Meyer
2025-05-25 10:06:07 +02:00
parent e6e6131a2c
commit 0c15577abe
262 changed files with 628 additions and 1207 deletions
+4 -5
View File
@@ -1,9 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/file.h>
@@ -22,11 +19,9 @@
#include "format-util.h"
#include "lock-util.h"
#include "log.h"
#include "macro.h"
#include "mkdir.h"
#include "parse-util.h"
#include "path-util.h"
#include "random-util.h"
#include "string-util.h"
#include "strv.h"
#include "terminal-util.h"
@@ -159,6 +154,10 @@ bool is_nologin_shell(const char *shell) {
"/usr/bin/true");
}
bool shell_is_placeholder(const char *shell) {
return isempty(shell) || is_nologin_shell(shell);
}
const char* default_root_shell_at(int rfd) {
/* We want to use the preferred shell, i.e. DEFAULT_USER_SHELL, which usually
* will be /bin/bash. Fall back to /bin/sh if DEFAULT_USER_SHELL is not found,