[PR #139] [MERGED] enh: install: use in-place overwrite for sudoers files #269

Closed
opened 2026-05-07 00:20:05 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/ovh/the-bastion/pull/139
Author: @speed47
Created: 2/8/2021
Status: Merged
Merged: 2/14/2021
Merged by: @speed47

Base: masterHead: sudorace2


📝 Commits (2)

  • d1fdad7 enh: install: use in-place overwrite for sudoers files
  • 3b380cd chore: ghactions: use latest freebsdvm action version

📊 Changes

5 files changed (+68 additions, -29 deletions)

View changed files

📝 .github/workflows/freebsd.yml (+2 -1)
📝 bin/admin/install (+53 -21)
📝 bin/admin/osh-sync-watcher.sh (+4 -7)
📝 bin/sudogen/generate-sudoers.sh (+8 -0)
📝 lib/shell/functions.inc (+1 -0)

📄 Description

This fixes a race condition in sudo where it would log a log of
error messages to syslog if used while we're running the install
script: files around sudoers.d/ are then moved around, and it'll
yell for each file it previously listed if the file no longer
exists when it tries to stat() it. It also deprecates the --no-wait
flag of the install script, as now the sudoers.d/ directory will
always have integrity at all times.

Signed-off-by: Stéphane Lesimple stephane.lesimple+bastion@ovhcloud.com


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ovh/the-bastion/pull/139 **Author:** [@speed47](https://github.com/speed47) **Created:** 2/8/2021 **Status:** ✅ Merged **Merged:** 2/14/2021 **Merged by:** [@speed47](https://github.com/speed47) **Base:** `master` ← **Head:** `sudorace2` --- ### 📝 Commits (2) - [`d1fdad7`](https://github.com/ovh/the-bastion/commit/d1fdad795c2701b458025272c7622aa3b2983570) enh: install: use in-place overwrite for sudoers files - [`3b380cd`](https://github.com/ovh/the-bastion/commit/3b380cdb5ffa572a50c050f6d7020d48979960be) chore: ghactions: use latest freebsdvm action version ### 📊 Changes **5 files changed** (+68 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/freebsd.yml` (+2 -1) 📝 `bin/admin/install` (+53 -21) 📝 `bin/admin/osh-sync-watcher.sh` (+4 -7) 📝 `bin/sudogen/generate-sudoers.sh` (+8 -0) 📝 `lib/shell/functions.inc` (+1 -0) </details> ### 📄 Description This fixes a race condition in sudo where it would log a log of error messages to syslog if used while we're running the install script: files around sudoers.d/ are then moved around, and it'll yell for each file it previously listed if the file no longer exists when it tries to stat() it. It also deprecates the --no-wait flag of the install script, as now the sudoers.d/ directory will always have integrity at all times. Signed-off-by: Stéphane Lesimple <stephane.lesimple+bastion@ovhcloud.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:20:05 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#269
No description provided.