summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoru <u@billy>2023-05-29 07:39:55 -0400
committeru <u@billy>2023-05-29 07:46:50 -0400
commitd7a855170d5c11b080ba62d74e583903b708ef37 (patch)
tree6d4ccb89f380d633125a269655502ef5f0aa3458 /src
parent3f7ac1f42b1ae91ec7ea07c0fae562cccd794e0b (diff)
Remove references to user "u". Uses $SUDO_USER.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/AuthorizedKeysCommand8
-rw-r--r--src/fossil-user.conf3
-rw-r--r--src/fossil-user.socket4
3 files changed, 9 insertions, 6 deletions
diff --git a/src/AuthorizedKeysCommand b/src/AuthorizedKeysCommand
index 6bf0ec9..de0732a 100755
--- a/src/AuthorizedKeysCommand
+++ b/src/AuthorizedKeysCommand
@@ -1,7 +1,11 @@
1#!/bin/sh 1#!/bin/sh
2cmd=/etc/ssh/user-d.AnonymousForceCommand 2username=$1
3shift
4
5[ "$username" ]
6cmd=/etc/ssh/user-$username.AnonymousForceCommand
3[ -x "$cmd" ] || exit 7[ -x "$cmd" ] || exit
4 8
5key=$1 9key=$1
6shift 10shift
7printf 'restrict,pty,command="%s" %s\n' "$cmd $*" "$key" 11printf 'restrict,pty,command="%s" %s\n' "$cmd" "$key"
diff --git a/src/fossil-user.conf b/src/fossil-user.conf
index f4296fd..86387e7 100644
--- a/src/fossil-user.conf
+++ b/src/fossil-user.conf
@@ -1,4 +1,3 @@
1Match User d
2ExposeAuthInfo=yes 1ExposeAuthInfo=yes
3AuthorizedKeysCommandUser=root 2AuthorizedKeysCommandUser=root
4AuthorizedKeysCommand=/etc/ssh/user-d.AuthorizedKeysCommand "%t %k" "%f" 3AuthorizedKeysCommand=/etc/ssh/AuthorizedKeysCommand "%u" "%t %k"
diff --git a/src/fossil-user.socket b/src/fossil-user.socket
index eab5a51..38914e6 100644
--- a/src/fossil-user.socket
+++ b/src/fossil-user.socket
@@ -1,5 +1,5 @@
1[Socket] 1[Socket]
2Accept = yes 2Accept = yes
3ListenStream = /run/fossil-user.S 3ListenStream = /run/fossil-user.S
4SocketUser = d 4SocketUser = root
5SocketMode = 0600 5SocketMode = 0666