loadfont,setfont: make them NOEXEC
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
5cb907fffc
commit
1b280e4652
@ -194,7 +194,7 @@ linux32 - noexec. spawner
|
|||||||
linux64 - noexec. spawner
|
linux64 - noexec. spawner
|
||||||
linuxrc - daemon
|
linuxrc - daemon
|
||||||
ln - noexec
|
ln - noexec
|
||||||
loadfont - leaks: config_open+bb_error_msg_and_die("map format")
|
loadfont - noexec. leaks: config_open+bb_error_msg_and_die("map format")
|
||||||
loadkmap - noexec. leaks: get_console_fd_or_die() may open a new fd, or return one of stdio fds
|
loadkmap - noexec. leaks: get_console_fd_or_die() may open a new fd, or return one of stdio fds
|
||||||
logger - runner
|
logger - runner
|
||||||
login - suid, interactive, longterm
|
login - suid, interactive, longterm
|
||||||
@ -306,7 +306,7 @@ sendmail - runner
|
|||||||
seq - noexec. runner
|
seq - noexec. runner
|
||||||
setarch - noexec. spawner
|
setarch - noexec. spawner
|
||||||
setconsole - noexec
|
setconsole - noexec
|
||||||
setfont
|
setfont - noexec. leaks a lot of stuff
|
||||||
setkeycodes - noexec
|
setkeycodes - noexec
|
||||||
setlogcons - noexec
|
setlogcons - noexec
|
||||||
setpriv - spawner, changes state, let's play safe and not be noexec
|
setpriv - spawner, changes state, let's play safe and not be noexec
|
||||||
|
@ -51,31 +51,12 @@
|
|||||||
//config: default y
|
//config: default y
|
||||||
//config: depends on LOADFONT || SETFONT
|
//config: depends on LOADFONT || SETFONT
|
||||||
|
|
||||||
//applet:IF_LOADFONT(APPLET(loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
//applet:IF_LOADFONT(APPLET_NOEXEC(loadfont, loadfont, BB_DIR_USR_SBIN, BB_SUID_DROP, loadfont))
|
||||||
//applet:IF_SETFONT(APPLET(setfont, BB_DIR_USR_SBIN, BB_SUID_DROP))
|
//applet:IF_SETFONT(APPLET_NOEXEC(setfont, setfont, BB_DIR_USR_SBIN, BB_SUID_DROP, setfont))
|
||||||
|
|
||||||
//kbuild:lib-$(CONFIG_LOADFONT) += loadfont.o
|
//kbuild:lib-$(CONFIG_LOADFONT) += loadfont.o
|
||||||
//kbuild:lib-$(CONFIG_SETFONT) += loadfont.o
|
//kbuild:lib-$(CONFIG_SETFONT) += loadfont.o
|
||||||
|
|
||||||
//usage:#define loadfont_trivial_usage
|
|
||||||
//usage: "< font"
|
|
||||||
//usage:#define loadfont_full_usage "\n\n"
|
|
||||||
//usage: "Load a console font from stdin"
|
|
||||||
/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
|
|
||||||
//usage:
|
|
||||||
//usage:#define loadfont_example_usage
|
|
||||||
//usage: "$ loadfont < /etc/i18n/fontname\n"
|
|
||||||
//usage:
|
|
||||||
//usage:#define setfont_trivial_usage
|
|
||||||
//usage: "FONT [-m MAPFILE] [-C TTY]"
|
|
||||||
//usage:#define setfont_full_usage "\n\n"
|
|
||||||
//usage: "Load a console font\n"
|
|
||||||
//usage: "\n -m MAPFILE Load console screen map"
|
|
||||||
//usage: "\n -C TTY Affect TTY instead of /dev/tty"
|
|
||||||
//usage:
|
|
||||||
//usage:#define setfont_example_usage
|
|
||||||
//usage: "$ setfont -m koi8-r /etc/i18n/fontname\n"
|
|
||||||
|
|
||||||
#include "libbb.h"
|
#include "libbb.h"
|
||||||
#include <sys/kd.h>
|
#include <sys/kd.h>
|
||||||
|
|
||||||
@ -352,6 +333,14 @@ static void do_load(int fd, unsigned char *buffer, size_t len)
|
|||||||
|
|
||||||
|
|
||||||
#if ENABLE_LOADFONT
|
#if ENABLE_LOADFONT
|
||||||
|
//usage:#define loadfont_trivial_usage
|
||||||
|
//usage: "< font"
|
||||||
|
//usage:#define loadfont_full_usage "\n\n"
|
||||||
|
//usage: "Load a console font from stdin"
|
||||||
|
/* //usage: "\n -C TTY Affect TTY instead of /dev/tty" */
|
||||||
|
//usage:
|
||||||
|
//usage:#define loadfont_example_usage
|
||||||
|
//usage: "$ loadfont < /etc/i18n/fontname\n"
|
||||||
int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
int loadfont_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
|
||||||
int loadfont_main(int argc UNUSED_PARAM, char **argv)
|
int loadfont_main(int argc UNUSED_PARAM, char **argv)
|
||||||
{
|
{
|
||||||
@ -380,11 +369,9 @@ int loadfont_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if ENABLE_SETFONT
|
#if ENABLE_SETFONT
|
||||||
|
/* kbd-1.12:
|
||||||
/*
|
|
||||||
kbd-1.12:
|
|
||||||
|
|
||||||
setfont [-O font+umap.orig] [-o font.orig] [-om cmap.orig]
|
setfont [-O font+umap.orig] [-o font.orig] [-om cmap.orig]
|
||||||
[-ou umap.orig] [-N] [font.new ...] [-m cmap] [-u umap] [-C console]
|
[-ou umap.orig] [-N] [font.new ...] [-m cmap] [-u umap] [-C console]
|
||||||
[-hNN] [-v] [-V]
|
[-hNN] [-v] [-V]
|
||||||
@ -414,6 +401,15 @@ setfont [-O font+umap.orig] [-o font.orig] [-om cmap.orig]
|
|||||||
-v Verbose
|
-v Verbose
|
||||||
-V Version
|
-V Version
|
||||||
*/
|
*/
|
||||||
|
//usage:#define setfont_trivial_usage
|
||||||
|
//usage: "FONT [-m MAPFILE] [-C TTY]"
|
||||||
|
//usage:#define setfont_full_usage "\n\n"
|
||||||
|
//usage: "Load a console font\n"
|
||||||
|
//usage: "\n -m MAPFILE Load console screen map"
|
||||||
|
//usage: "\n -C TTY Affect TTY instead of /dev/tty"
|
||||||
|
//usage:
|
||||||
|
//usage:#define setfont_example_usage
|
||||||
|
//usage: "$ setfont -m koi8-r /etc/i18n/fontname\n"
|
||||||
|
|
||||||
# if ENABLE_FEATURE_SETFONT_TEXTUAL_MAP
|
# if ENABLE_FEATURE_SETFONT_TEXTUAL_MAP
|
||||||
static int ctoi(char *s)
|
static int ctoi(char *s)
|
||||||
|
Loading…
Reference in New Issue
Block a user