summaryrefslogtreecommitdiff
path: root/legacy/busybox/nologin.c
diff options
context:
space:
mode:
authorZach van Rijn <me@zv.io>2021-10-16 01:12:16 +0000
committerZach van Rijn <me@zv.io>2021-10-16 01:12:16 +0000
commit6ca2ba5c92a7b0679a552725678a40ed5eb4ded5 (patch)
treeddc300a108dc4d10ed5ed0188175f54452e8bb0e /legacy/busybox/nologin.c
parentaa90e62ce757fa863685f44ce23f129f56b3225f (diff)
parentc0f3f757abe6ea39579119b99e9996c4e2bf0e11 (diff)
downloadpackages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.gz
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.bz2
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.tar.xz
packages-6ca2ba5c92a7b0679a552725678a40ed5eb4ded5.zip
Merge branch 'master' into 'awilfox/bump/2021-09-system-abipreserve'
# Conflicts: # system/curl/APKBUILD
Diffstat (limited to 'legacy/busybox/nologin.c')
-rw-r--r--legacy/busybox/nologin.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/legacy/busybox/nologin.c b/legacy/busybox/nologin.c
deleted file mode 100644
index 75ad89eda..000000000
--- a/legacy/busybox/nologin.c
+++ /dev/null
@@ -1,38 +0,0 @@
-/* vi: set sw=4 ts=4: */
-/*
- * nologin implementation for busybox
- *
- * Licensed under GPLv2 or later, see file LICENSE in this source tree.
- */
-
-//config:config NOLOGIN
-//config: bool "nologin"
-//config: default n
-//config: help
-//config: nologin is a tool that is supposed to be the shell for user accounts
-//config: that are not supposed to login.
-
-//applet:IF_NOLOGIN(APPLET(nologin, BB_DIR_SBIN, BB_SUID_DROP))
-//kbuild:lib-$(CONFIG_NOLOGIN) += nologin.o
-
-//usage:#define nologin_trivial_usage
-//usage: ""
-//usage:#define nologin_full_usage "\n\n"
-//usage: "politely refuse a login\n"
-
-#include "libbb.h"
-#include <syslog.h>
-
-#define _NOLOGIN_TXT "/etc/nologin.txt"
-
-int nologin_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int nologin_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
-{
- int fd;
- fd = open(_NOLOGIN_TXT, O_RDONLY);
- if (bb_copyfd_eof(fd, STDOUT_FILENO) == -1)
- bb_error_msg_and_die("this account is not available");
- close(fd);
- return 1;
-}
-