opnsense-ports/security/softether/files/patch-piddir
Franco Fichtner 3698b0d949 security/softether: sync with upstream
Taken from: HardenedBSD
2019-02-28 22:10:50 +01:00

29 lines
954 B
Text

--- src/Mayaqua/Unix.c.orig 2019-02-28 08:10:54 UTC
+++ src/Mayaqua/Unix.c
@@ -927,7 +927,7 @@ void *UnixNewSingleInstance(char *instance_name)
GetExeDir(dir, sizeof(dir));
// File name generation
- Format(name, sizeof(name), "%s/.%s", dir, tmp);
+ Format(name, sizeof(name), "%%SE_DBDIR%%/.%s", tmp);
fd = open(name, O_WRONLY);
if (fd == -1)
@@ -2385,7 +2385,7 @@ void UnixGenPidFileName(char *name, UINT size)
Hash(hash, exe_name, StrLen(exe_name), false);
BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
- Format(name, size, "%s/.pid_%s", dir, tmp1);
+ Format(name, size, "%%SE_DBDIR%%/.pid_%s", tmp1);
}
// Delete the PID file
@@ -2430,7 +2430,7 @@ void UnixGenCtlFileName(char *name, UINT size)
Hash(hash, exe_name, StrLen(exe_name), false);
BinToStr(tmp1, sizeof(tmp1), hash, sizeof(hash));
- Format(name, size, "%s/.ctl_%s", dir, tmp1);
+ Format(name, size, "%%SE_DBDIR%%/.ctl_%s", tmp1);
}
// Write the CTL file