commit: a99bca3f23bf4f4297bd26aaab76ad52b4e11573
parent b97316b2e42ca7945b3d2516f65621fb73485c14
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 4 Dec 2025 08:55:19 +0100
Make suc(1) opt-in
Diffstat:
2 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
@@ -12,9 +12,9 @@ MANDIR ?= $(PREFIX)/share/man
# Dynamically linked executables are unsupported
LDSTATIC = -static
-SYS_EXE = login su suc
+SYS_EXE = login su
TEST_EXE = common_test
-MAN1 = login.1 suc.1
+MAN1 = login.1
all: $(SYS_EXE)
@@ -48,10 +48,16 @@ install: all
cp $(SYS_EXE) $(DESTDIR)$(SYS_BINDIR)/
chmod 0755 $(DESTDIR)$(SYS_BINDIR)/login
chmod 4755 $(DESTDIR)$(SYS_BINDIR)/su
- chmod 4755 $(DESTDIR)$(SYS_BINDIR)/suc
mkdir -p $(DESTDIR)$(MANDIR)/man1/
cp $(MAN1) $(DESTDIR)$(MANDIR)/man1/
+install-suc: suc
+ mkdir -p $(DESTDIR)$(SYS_BINDIR)/
+ cp suc $(DESTDIR)$(SYS_BINDIR)/
+ chmod 4755 $(DESTDIR)$(SYS_BINDIR)/suc
+ mkdir -p $(DESTDIR)$(MANDIR)/man1/
+ cp suc.1 $(DESTDIR)$(MANDIR)/man1/
+
C_SOURCES = *.c *.h
.PHONY: format
format:
diff --git a/README.md b/README.md
@@ -14,6 +14,15 @@ Status: Experimental, enough done to work but needs thorough review.
- `initgroups()` C interface in `<grp.h>` or `<unistd.h>`
- (lint-only) [mandoc](https://mdocml.bsd.lv/)
+## Installation
+- The usual ``make && make install`` is supported, along with `DESTDIR`
+
+Also depending on your security policy, you might want `suc(1)`,
+which was made opt-in due to it ignoring the target's shell entry
+when arguments are given.
+
+To still compile & install it: ``make suc && make suc-install``
+
## Unsupported
- Broken authentication systems like PAM and [nsswitch](https://skarnet.org/software/nsss/nsswitch.html)
- Remote host arguments (believed to be legacy)