hfingerd

hhvn.uk:79
Log | Files | Refs | LICENSE

commit dd8ab03c7685498c22ab2833b742004014588696
parent 112a21533721c7a7e85873c9dd131956c507d350
Author: hhvn <dev@hhvn.uk>
Date:   Sun,  6 Jun 2021 00:34:03 +0100

hfingerd.8 makefile: add manpage

Diffstat:
Ahfingerd.8 | 46++++++++++++++++++++++++++++++++++++++++++++++
Mmakefile | 5+++++
2 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/hfingerd.8 b/hfingerd.8 @@ -0,0 +1,46 @@ +.Dd COMMIT +.Dt hfingerd 8 +.Os +.Sh NAME +.Nm hfingerd +.Nd hhvn's finger daemon +.Sh SYNOPSIS +.Nm +.Op Fl Cc +.Op Fl h Ar host +.Op Fl p Ar port +.Op Fl f Ar planfile +.Sh OPTIONS +.Bl -tag -width "-f planfile" +.It Fl C +Turn off CGI +.It Fl c +Turn on CGI +.It Fl h Ar host +Set hostname to bind to +.It Fl p Ar port +Set port to bind to +.It Fl f Ar planfile +Look for +.Ar planfile +in user's home directory, instead of +.Ar .plan +.El +.Sh DESCRIPTION +.Nm +is a finger protocol server. +It provides arbitrary user specified data to any connecting clients. +If it receives an empty request, it will list the users that have a +.Ar plan +file. +.Sh CGI +A user's +.Ar plan +file will normally be served as raw text. +If the file is marked executable, and CGI is enabled, then +.Nm +will run the file (with dropped priviledges) and serve the output. +.Sh SEE ALSO +RFC1288 +.Sh AUTHOR +.An hhvn Aq Mt dev@hhvn.uk diff --git a/makefile b/makefile @@ -2,6 +2,7 @@ PREFIX = /usr/local CC ?= cc OBJ = main.o handler.o BIN = hfingerd +COMMIT = `git log HEAD...HEAD~1 --pretty=format:%h` $(BIN): $(OBJ) $(CC) -g $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) @@ -14,6 +15,10 @@ clean: install: install -m0755 $(BIN) $(PREFIX)/bin/$(BIN) + sed "s/COMMIT/$(COMMIT)/" \ + < $(BIN).8 \ + > $(PREFIX)/share/man/man8/$(BIN).8 uninstall: -rm $(PREFIX)/bin/$(BIN) + -rm $(PREFIX)/share/man/man8/$(BIN).8