Skip to content

Commit

Permalink
v5.25 file encryption added, logrotate fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ColumPaget committed Aug 31, 2024
1 parent df6fe3f commit bb9719a
Show file tree
Hide file tree
Showing 29 changed files with 2,311 additions and 2,636 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
v5.25 (2024-08-31)
* Symmetric Encryption now supported for STREAMs
* Handle situation where logfile is rotated under an app that has it open
* Stop trying to rotate hardened logfiles. rotate is incompatible with append-only files

v5.24 (2024-08-20)
* Move namespace/container code to Containers.c and make general improvments
* Move namespace/container code to Containers.c and make general improvements
* Exit out of TerminalReadText if escape or ctrl-c entered
* Added 'l' option (list files on remote server) to SSH streams
* CHANGED ARGUMENTS TO SSHConnect AND SSHOpen
Expand Down
6 changes: 3 additions & 3 deletions Compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int zlibProcessorClose(TProcessingModule *ProcMod)
#define COMP_ZLIB 0
#define COMP_GZIP 1

int zlibProcessorInit(TProcessingModule *ProcMod, const char *Args)
int zlibProcessorInit(TProcessingModule *ProcMod, const char *Args, unsigned char **Header, int *HeadLen)
{
int result=FALSE;

Expand Down Expand Up @@ -219,7 +219,7 @@ int CompressBytes(char **Out, const char *Alg, const char *In, unsigned long Len
int result;

Tempstr=FormatStr(Tempstr,"CompressionLevel=%d",Level);
Mod=StandardDataProcessorCreate("compress",Alg,Tempstr);
Mod=StandardDataProcessorCreate("compress",Alg,Tempstr, NULL, NULL);
if (! Mod) return(-1);

val=Len *2;
Expand All @@ -239,7 +239,7 @@ int DeCompressBytes(char **Out, const char *Alg, const char *In, unsigned long L
int result;
unsigned long val;

Mod=StandardDataProcessorCreate("decompress",Alg,"");
Mod=StandardDataProcessorCreate("decompress",Alg,"",NULL, NULL);
if (! Mod) return(-1);

val=Len *2;
Expand Down
2 changes: 1 addition & 1 deletion Compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The return value of Both CompressBytes and DecompressBytes is the length of data
extern "C" {
#endif

int zlibProcessorInit(TProcessingModule *ProcMod, const char *Args);
int zlibProcessorInit(TProcessingModule *ProcMod, const char *Args, unsigned char **Header, int *HeadLen);
int CompressBytes(char **Out, const char *Alg, const char *In, unsigned long Len, int Level);
int DeCompressBytes(char **Out, const char *Alg, const char *In, unsigned long Len);

Expand Down
28 changes: 14 additions & 14 deletions Container.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#include <glob.h>

#ifdef HAVE_UNSHARE
#define _GNU_SOURCE
#include <sched.h>
#define _GNU_SOURCE
#include <sched.h>
#endif

static void InitSigHandler(int sig)
Expand Down Expand Up @@ -229,19 +229,19 @@ static void ContainerNamespace(const char *Namespace, const char *HostName, int

static void ContainerSetHostname(const char *Namespace, const char *HostName)
{
int val, result;
int val, result;

#ifdef HAVE_UNSHARE
#ifdef CLONE_NEWUTS
if (StrValid(Namespace)) ContainerJoinNamespace(Namespace, CLONE_NEWUTS);
else
{
unshare(CLONE_NEWUTS);
val=StrLen(HostName);
if (val != 0) result=sethostname(HostName, val);
else result=sethostname("container", 9);
if (result != 0) RaiseError(ERRFLAG_ERRNO, "ContainerNamespace", "Failed to sethostname for container.");
}
if (StrValid(Namespace)) ContainerJoinNamespace(Namespace, CLONE_NEWUTS);
else
{
unshare(CLONE_NEWUTS);
val=StrLen(HostName);
if (val != 0) result=sethostname(HostName, val);
else result=sethostname("container", 9);
if (result != 0) RaiseError(ERRFLAG_ERRNO, "ContainerNamespace", "Failed to sethostname for container.");
}
#endif
#else
RaiseError(0, "namespaces", "containers/unshare unavailable");
Expand Down Expand Up @@ -286,7 +286,7 @@ static pid_t ContainerLaunchInit(int Flags, const char *Dir)
child=fork();
if (child == 0)
{
setsid();
setsid();
child=fork();
if (child !=0)
{
Expand Down Expand Up @@ -428,7 +428,7 @@ int ContainerApplyConfig(const char *Config)


if (Flags & PROC_CONTAINER_PID) ContainerUnsharePID(Flags, Namespace, Dir);
if (StrValid(HostName)) ContainerSetHostname(Namespace, HostName);
if (StrValid(HostName)) ContainerSetHostname(Namespace, HostName);

//ContainerNamespace(Namespace, HostName, Flags);

Expand Down
Loading

0 comments on commit bb9719a

Please sign in to comment.