[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 7944d8e 13/14: Detect files that have an unex
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 7944d8e 13/14: Detect files that have an unexpected GID |
Date: |
Sat, 25 Apr 2020 17:43:14 -0400 (EDT) |
branch: master
commit 7944d8e933495dbfa76cc7a3bbcd8184aaee85d4
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Detect files that have an unexpected GID
---
gwc/share_git1.sh | 5 +++++
gwc/share_git2.sh | 10 ++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/gwc/share_git1.sh b/gwc/share_git1.sh
index 2eedbda..e41abf9 100755
--- a/gwc/share_git1.sh
+++ b/gwc/share_git1.sh
@@ -125,6 +125,11 @@ git -C "$inited" fsck
# shellcheck disable=SC2046
ls -ld $(find .) |sed -e'/^.....w/d' -e'/objects\/pack/d'
+# Show any files whose GID isn't "audio", expecting '.' only.
+# shellcheck disable=SC2012
+# shellcheck disable=SC2046
+ls -ld $(find .) |sed -e'/ audio /d'
+
# List all files' permissions for comparison, e.g.:
# meld /srv/chroot/bullseye0/tmp/eraseme/ls-* &
cd /tmp/eraseme/"$inited" && ls -alR >/tmp/eraseme/ls-"$inited"
diff --git a/gwc/share_git2.sh b/gwc/share_git2.sh
index 3a5c63f..eec3178 100755
--- a/gwc/share_git2.sh
+++ b/gwc/share_git2.sh
@@ -62,8 +62,9 @@ sudo --user=pulse git -C "$inited" fetch
# To emulate a non-bare git clone, generate index and worktree:
git -C "$inited" checkout master
-# ...and then fix their permissions manually--necessary despite
-# 'git init --shared' above):
+# ...and then fix their GID and permissions manually--necessary
+# despite 'git init --shared' above):
+chgrp -R audio "$inited"
chmod -R g=u "$inited"
# Second method: git-clone, then fix permissions manually--necessary
@@ -122,6 +123,11 @@ git -C "$inited" fsck
# shellcheck disable=SC2046
ls -ld $(find .) |sed -e'/^.....w/d' -e'/objects\/pack/d'
+# Show any files whose GID isn't "audio", expecting '.' only.
+# shellcheck disable=SC2012
+# shellcheck disable=SC2046
+ls -ld $(find .) |sed -e'/ audio /d'
+
# List all files' permissions for comparison, e.g.:
# meld /srv/chroot/bullseye0/tmp/eraseme/ls-* &
cd /tmp/eraseme/"$inited" && ls -alR >/tmp/eraseme/ls-"$inited"
- [lmi-commits] [lmi] master c78c9aa 06/14: Reduce differences between git scripts, (continued)
- [lmi-commits] [lmi] master c78c9aa 06/14: Reduce differences between git scripts, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 02f33b5 07/14: Don't rely on a nondefault umask, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master d432bc8 09/14: Improve documentation of git scripts, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 28dbf67 08/14: Reduce differences between git scripts, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 063d24d 04/14: Reduce differences between git scripts, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 38a6c93 12/14: Let git create its own directory, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 9f235b6 14/14: Don't mess with GID or permissions of $PWD, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 3dace32 05/14: Check permissions more thoroughly, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master aedc8d0 11/14: Detect files that aren't group writable, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 03f3b23 10/14: Reorder statements in a git script; improve documentation, Greg Chicares, 2020/04/25
- [lmi-commits] [lmi] master 7944d8e 13/14: Detect files that have an unexpected GID,
Greg Chicares <=