Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (8de2036647893146c067f7eb042b0197afa4a4d5)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (8de2036647893146c067f7eb042b0197afa4a4d5)
  • Date: Mon, 24 Oct 2016 21:34:33 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

smgl/epoch/HISTORY | 3 +++
smgl/epoch/PRE_BUILD | 3 +++
smgl/epoch/setgid.patch | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 43 insertions(+)

New commits:
commit 8de2036647893146c067f7eb042b0197afa4a4d5
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

smgl/epoch: fixed setting of a process' group

diff --git a/smgl/epoch/HISTORY b/smgl/epoch/HISTORY
index 9bb7d49..4d642c3 100644
--- a/smgl/epoch/HISTORY
+++ b/smgl/epoch/HISTORY
@@ -1,3 +1,6 @@
+2016-10-24 Pavel Vinogradov <public AT sourcemage.org>
+ * PRE_BUILD, setgid.patch: added to fix setting a process' group
+
2015-06-23 Pavel Vinogradov <public AT sourcemage.org>
* DETAILS: updated spell to 1.3.0

diff --git a/smgl/epoch/PRE_BUILD b/smgl/epoch/PRE_BUILD
new file mode 100755
index 0000000..c6e7ced
--- /dev/null
+++ b/smgl/epoch/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd ${SOURCE_DIRECTORY} &&
+patch -p1 < ${SPELL_DIRECTORY}/setgid.patch
diff --git a/smgl/epoch/setgid.patch b/smgl/epoch/setgid.patch
new file mode 100644
index 0000000..6cc7880
--- /dev/null
+++ b/smgl/epoch/setgid.patch
@@ -0,0 +1,37 @@
+From 4dc9218c6b3cd5611ee0bc387029711dc0f614fd Mon Sep 17 00:00:00 2001
+From: Pavel Vinogradov <vin.public AT gmail.com>
+Date: Mon, 4 Jul 2016 21:22:56 -0400
+Subject: [PATCH] Quite trivial fix of issue #21
+
+---
+ src/parse.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/parse.c b/src/parse.c
+index 84d97b9..1f9fe4e 100644
+--- a/src/parse.c
++++ b/src/parse.c
+@@ -271,6 +271,8 @@ static ReturnCode ExecuteConfigObject(ObjTable *InObj,
const char *CurCmd)
+ if (CurCmd == InObj->ObjectStartCommand)
+ { /*Set user and group if desired.*/
+
++ if (InObj->GroupID != 0) setgid(InObj->GroupID);
++
+ if (InObj->UserID != 0)
+ {
+ struct passwd *UserStruct =
getpwuid(InObj->UserID);
+@@ -290,10 +292,9 @@ static ReturnCode ExecuteConfigObject(ObjTable *InObj,
const char *CurCmd)
+
+ if (!InObj->ObjectWorkingDirectory)
chdir(UserStruct->pw_dir);
+
+-
++
+ }
+
+- if (InObj->GroupID != 0) setgid(InObj->GroupID);
+ }
+
+ #ifndef NOSHELL
+--
+2.10.1
+



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (8de2036647893146c067f7eb042b0197afa4a4d5), Pavel Vinogradov, 10/24/2016

Archive powered by MHonArc 2.6.24.

Top of Page