aboutsummaryrefslogtreecommitdiff
path: root/loginutils
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2016-01-02 00:20:39 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-04-13 12:39:03 +0200
commit517a82c5b6b5e279f3e96a6774445a2952ca312b (patch)
tree5eff7ec6bb69bceedcea35fce37cf0e4380fea82 /loginutils
parentc054822027a4a6895bc95979c6c10ff5763c7c7e (diff)
downloadbusybox-517a82c5b6b5e279f3e96a6774445a2952ca312b.tar.gz
login: move check_securetty to libbb
Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'loginutils')
-rw-r--r--loginutils/login.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/loginutils/login.c b/loginutils/login.c
index d1757a65d..661a87448 100644
--- a/loginutils/login.c
+++ b/loginutils/login.c
@@ -175,25 +175,6 @@ static void die_if_nologin(void)
# define die_if_nologin() ((void)0)
#endif
-#if ENABLE_FEATURE_SECURETTY && !ENABLE_PAM
-static int check_securetty(const char *short_tty)
-{
- char *buf = (char*)"/etc/securetty"; /* any non-NULL is ok */
- parser_t *parser = config_open2("/etc/securetty", fopen_for_read);
- while (config_read(parser, &buf, 1, 1, "# \t", PARSE_NORMAL)) {
- if (strcmp(buf, short_tty) == 0)
- break;
- buf = NULL;
- }
- config_close(parser);
- /* buf != NULL here if config file was not found, empty
- * or line was found which equals short_tty */
- return buf != NULL;
-}
-#else
-static ALWAYS_INLINE int check_securetty(const char *short_tty UNUSED_PARAM) { return 1; }
-#endif
-
#if ENABLE_SELINUX
static void initselinux(char *username, char *full_tty,
security_context_t *user_sid)