From 9f0edc6b4ca774564f3a23e4957079b05e8774c1 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Fri, 11 Aug 2017 18:19:32 +0200 Subject: [PATCH] Debian: Install default configuration with comments --- debian/rules | 4 ++-- etc/subauthd | 32 ++++++++++++++++++++++++++------ server/Makefile | 3 ++- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/debian/rules b/debian/rules index 6343182..721c054 100755 --- a/debian/rules +++ b/debian/rules @@ -22,6 +22,6 @@ override_dh_auto_configure: ./configure PREFIX=/usr override_dh_auto_install: - make DESTDIR=debian/subauth install-server install-client + make DESTDIR=debian/subauth INSTALL_CONFIG_DIR=/etc install-server + make DESTDIR=debian/subauth install-client make DESTDIR=debian/libpam-subauth INSTALL_LIB_DIR=/lib/$(DEB_HOST_MULTIARCH) install-pam -### make DESTDIR=debian/libapache2-mod-subauth install-apache diff --git a/etc/subauthd b/etc/subauthd index 6f92259..4e42a47 100644 --- a/etc/subauthd +++ b/etc/subauthd @@ -1,20 +1,40 @@ SubauthD { + # Path to local socket over which clients communicate with the daemon SocketPath @INSTALL_RUN_DIR@/subauthd.socket - MaxConnections 1000 + + # Path to database of users and accounts Database @INSTALL_STATE_DIR@/subauthd.db + + # An optional path to a key for signing temporary tokens. + # If it is defined, temporary tokens survive daemon restart. Otherwise, + # the daemon creates a new key on every startup. TempKeyFile @INSTALL_STATE_DIR@/subauthd-temp-key + # Maximum number of simultaneous client connections + MaxConnections 1000 + + # Authentication zones: each zone contains accounts for local users + # (at most one per user), zones are completely independent. Zone { + # Name of the zone Name mail + + # One-line description Description E-mail + + # Allow automatic creation of accounts: when a user tries to create + # a password/token in a zone where he has no account, the account is + # created. If turned off, all accounts must be created explicitly + # by the super-user. AutoCreateAcct 1 + + # Allow users to set a password AllowPasswd 1 + + # Allow users to create a token, set maximum number of tokens per user AllowTokens 16 - MaxTempValidity 3600 - } - Zone { - Name web - AllowPasswd 1 + # Allow users to create a temporary token, set maximum lifetime of such token + MaxTempValidity 3600 } } diff --git a/server/Makefile b/server/Makefile index 68f6d1b..9ce2354 100644 --- a/server/Makefile +++ b/server/Makefile @@ -10,5 +10,6 @@ $(o)/server/auth.o: CFLAGS+=$(LIBGCRYPT_CFLAGS) .PHONY: install-server install:: install-server install-server: - install -d -m 755 $(DESTDIR)$(INSTALL_SBIN_DIR) + install -d -m 755 $(DESTDIR)$(INSTALL_SBIN_DIR) $(DESTDIR)$(INSTALL_CONFIG_DIR) install -m 755 $(o)/server/subauthd $(DESTDIR)$(INSTALL_SBIN_DIR) + install -m 644 run/etc/subauthd $(DESTDIR)$(INSTALL_CONFIG_DIR) -- 2.39.2