@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user