commit: 13715e8379eb96bab015e29b7a685b5dfd57b96b
parent df0380e16d47a5bae448a14fcd93f755ca53f55c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Sat, 8 Oct 2022 11:15:56 +0200
login.1: Add
Diffstat:
M | Makefile | 9 | +++++++++ |
A | login.1 | 50 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 59 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -7,8 +7,10 @@ CFLAGS ?= -O2 -g -Wall -Wextra -Werror=implicit-function-declaration
PREFIX ?= /usr
SYS_BINDIR ?= /bin
BINDIR ?= $(PREFIX)/bin
+MANDIR ?= $(PREFIX)/share/man
SYS_EXE = login su
+MAN1 = login.1
all: $(SYS_EXE)
@@ -31,6 +33,8 @@ install: all
cp $(SYS_EXE) $(DESTDIR)$(SYS_BINDIR)/
chmod 0755 $(DESTDIR)$(SYS_BINDIR)/login
chmod 4755 $(DESTDIR)$(SYS_BINDIR)/su
+ mkdir -p $(DESTDIR)$(MANDIR)/man1/
+ cp $(MAN1) $(DESTDIR)$(MANDIR)/man1/
C_SOURCES = *.c *.h
.PHONY: format
@@ -40,3 +44,8 @@ format:
.PHONY: clean
clean:
rm $(SYS_EXE)
+
+.PHONY: lint
+lint:
+ reuse lint
+ mandoc -Tlint -Wunsupp,error,warning $(MAN1)
diff --git a/login.1 b/login.1
@@ -0,0 +1,50 @@
+.\" SPDX-FileCopyrightText: 2022 Haelwenn (lanodan) Monnier <contact+skeud@hacktivis.me>
+.\" SPDX-License-Identifier: AGPL-3.0-only
+.Dd 2022-10-08
+.Dt LOGIN 1
+.Os
+.Sh NAME
+.Nm login
+.Nd begin session on the system
+.Sh SYNOPSIS
+.Nm
+.Op Fl p
+.Op Ar username
+.Nm
+.Op Fl p
+.Op Fl f
+.Ar username
+.Sh DESCRIPTION
+The
+.Nm
+utility logs users (and pseudo-users) into the system.
+.Pp
+If
+.Ar username
+is given
+.Nm
+skips asking for a user name.
+.Ss OPTIONS
+.Bl -tag -width Ds
+.It Fl p
+Preserve environment.
+.It Fl f Ar username
+Do not perform authentication, user is preauthenticated.
+.El
+.Sh EXIT STATUS
+If the user's shell is invoked, the exit status of
+.Nm
+shall be the exit status of the shell.
+Otherwise, the env utility shall exit with one of the following values:
+.Bl -tag -width Ds
+.It 1
+An error occured or the authentication failed
+.It 126
+User's shell was found but couldn't be invoked.
+.It 127
+User's shell wasn't found.
+.El
+.Sh STANDARDS
+N/A
+.Sh AUTHORS
+.An Haelwenn (lanodan) Monnier Aq Mt contact+skeud@hacktivis.me