[hackers] [PATCH] Move nologin(8) to sbase

From: Mattias Andrée <maandree_AT_kth.se>
Date: Mon, 4 Apr 2016 13:23:36 +0200

Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
---
 Makefile  |  2 --
 nologin.8 | 21 ---------------------
 nologin.c | 22 ----------------------
 3 files changed, 45 deletions(-)
 delete mode 100644 nologin.8
 delete mode 100644 nologin.c
diff --git a/Makefile b/Makefile
index 59616a4..4ab1856 100644
--- a/Makefile
+++ b/Makefile
_AT_@ -64,7 +64,6 @@ BIN = \
 	mkswap            \
 	mount             \
 	mountpoint        \
-	nologin           \
 	pagesize          \
 	passwd            \
 	pidof             \
_AT_@ -130,7 +129,6 @@ MAN8 = \
 	lsusb.8             \
 	mkswap.8            \
 	mount.8             \
-	nologin.8           \
 	pivot_root.8        \
 	readahead.8         \
 	rmmod.8             \
diff --git a/nologin.8 b/nologin.8
deleted file mode 100644
index 9ea1328..0000000
--- a/nologin.8
+++ /dev/null
_AT_@ -1,21 +0,0 @@
-.Dd March 26, 2016
-.Dt NOLOGIN 8
-.Os ubase
-.Sh NAME
-.Nm nologin
-.Nd refuse login
-.Sh SYNOPSIS
-.Nm
-.Sh DESCRIPTION
-.Nm
-prints a message informing the user that she
-is not allowed to log in. If /etc/nologin.txt
-exists, its content is printed instead of
-the default message.
-.Pp
-.Nm
-is intended to be specified as the user's
-default shell.
-.Sh EXIT STATUS
-.Nm
-returns a status code indicating failure.
diff --git a/nologin.c b/nologin.c
deleted file mode 100644
index 10b5b66..0000000
--- a/nologin.c
+++ /dev/null
_AT_@ -1,22 +0,0 @@
-/* See LICENSE file for copyright and license details. */
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-
-int
-main(void)
-{
-	int fd;
-	char buf[BUFSIZ];
-	ssize_t n;
-
-	fd = open("/etc/nologin.txt", O_RDONLY);
-	if (fd >= 0) {
-		while ((n = read(fd, buf, sizeof(buf))) > 0)
-			write(STDOUT_FILENO, buf, n);
-		close(fd);
-	} else {
-		printf("The account is currently unavailable.\n");
-	}
-	return 1;
-}
-- 
2.8.0
Received on Mon Apr 04 2016 - 13:23:36 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 04 2016 - 13:24:17 CEST