summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/git-run (renamed from src/run)2
-rwxr-xr-xsrc/init5
-rw-r--r--src/ssh.conf2
-rw-r--r--src/version1
4 files changed, 6 insertions, 4 deletions
diff --git a/src/run b/src/git-run
index 51d912c..68d4989 100755
--- a/src/run
+++ b/src/git-run
@@ -38,7 +38,7 @@ begin
end
# info logging
- echo "$(date -Is): ALLOW user=$currentUser ip=$SSH_CONNECTION argv=$argv"
+ echo "$(date -Is): ALLOW ok user=$currentUser ip=$SSH_CONNECTION argv=$argv"
end &>>$_LOG
# execute parsed git command
diff --git a/src/init b/src/init
index 394335a..3686332 100755
--- a/src/init
+++ b/src/init
@@ -2,6 +2,7 @@
# load environment
source (dirname (status --current-filename))/env
+set VERSION (cat (dirname (status --current-filename))/version)
#
#
@@ -34,7 +35,7 @@ function createUser
# add user to sudo group
addgroup "$user" $_GIT_SUDO_GROUP
# unlock account to allow ssh logins
- passwd -u "$user"
+ passwd -u "$user" &>/dev/null
mkdir "$HOME/.ssh"
echo "$key" > "$HOME/.ssh/authorized_keys"
chown -R $user "$HOME"
@@ -124,7 +125,7 @@ function showBanner
|___/
'
echo
- echo Copyright Matthias Jaros 2025
+ echo Version $VERSION Copyright Matthias Jaros 2025
echo
end
diff --git a/src/ssh.conf b/src/ssh.conf
index 0de789c..407285d 100644
--- a/src/ssh.conf
+++ b/src/ssh.conf
@@ -18,7 +18,7 @@ SyslogFacility AUTH
LogLevel INFO
# Force run script that checks for permissions and runs sudo
-ForceCommand /usr/local/bin/run "$SSH_ORIGINAL_COMMAND"
+ForceCommand /usr/local/bin/git-run "$SSH_ORIGINAL_COMMAND"
# git user has access to EVERYTHING. no login should be possible
DenyUsers git
diff --git a/src/version b/src/version
new file mode 100644
index 0000000..9f8e9b6
--- /dev/null
+++ b/src/version
@@ -0,0 +1 @@
+1.0 \ No newline at end of file