|
|
|
@@ -1,46 +1,45 @@
|
|
|
|
|
From be9783fd1ba5f5150fef1c95349192271942a478 Mon Sep 17 00:00:00 2001
|
|
|
|
|
From 5c454a3ac32943ddd867cd0955bead955f38fd6d Mon Sep 17 00:00:00 2001
|
|
|
|
|
From: =?UTF-8?q?Klaus=20K=C3=A4mpf?= <kkaempf@suse.de>
|
|
|
|
|
Date: Tue, 3 Jul 2018 09:18:08 +0200
|
|
|
|
|
Subject: [PATCH 3/3] Reduce string truncation warnings
|
|
|
|
|
Subject: [PATCH 2/3] Reduce string truncation warnings
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
cf-agent/verify_databases.c | 18 ++++++-------
|
|
|
|
|
cf-agent/verify_exec.c | 4 +--
|
|
|
|
|
cf-agent/verify_databases.c | 18 +++++++-------
|
|
|
|
|
cf-agent/verify_exec.c | 4 ++--
|
|
|
|
|
cf-agent/verify_packages.c | 2 +-
|
|
|
|
|
cf-execd/cf-execd-runner.c | 4 +--
|
|
|
|
|
cf-monitord/env_monitor.c | 8 +++---
|
|
|
|
|
cf-execd/cf-execd-runner.c | 4 ++--
|
|
|
|
|
cf-monitord/env_monitor.c | 8 +++----
|
|
|
|
|
cf-monitord/mon_network_sniffer.c | 6 ++---
|
|
|
|
|
cf-runagent/cf-runagent.c | 6 ++---
|
|
|
|
|
cf-serverd/server_common.c | 18 ++++++-------
|
|
|
|
|
cf-serverd/server_common.c | 18 +++++++-------
|
|
|
|
|
libcfnet/client_protocol.c | 2 +-
|
|
|
|
|
libenv/sysinfo.c | 45 ++++++++++++++++---------------
|
|
|
|
|
libenv/sysinfo.c | 40 +++++++++++++++----------------
|
|
|
|
|
libpromises/cf3globals.c | 2 +-
|
|
|
|
|
libpromises/cf3lex.l | 6 ++---
|
|
|
|
|
libpromises/cf3parse.y | 2 +-
|
|
|
|
|
libpromises/eval_context.c | 4 +--
|
|
|
|
|
libpromises/eval_context.c | 4 ++--
|
|
|
|
|
libpromises/evalfunction.c | 2 +-
|
|
|
|
|
libpromises/expand.c | 2 +-
|
|
|
|
|
libpromises/keyring.c | 4 +--
|
|
|
|
|
libpromises/syslog_client.c | 2 +-
|
|
|
|
|
libpromises/keyring.c | 4 ++--
|
|
|
|
|
tests/unit/logging_test.c | 2 +-
|
|
|
|
|
tests/unit/set_domainname_test.c | 2 +-
|
|
|
|
|
20 files changed, 71 insertions(+), 70 deletions(-)
|
|
|
|
|
19 files changed, 66 insertions(+), 68 deletions(-)
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-agent/verify_databases.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
@@ -221,7 +221,7 @@ static PromiseResult VerifySQLPromise(Ev
|
|
|
|
|
diff --git a/cf-agent/verify_databases.c b/cf-agent/verify_databases.c
|
|
|
|
|
index be8ed98bbc15..c55da6a890d5 100644
|
|
|
|
|
--- a/cf-agent/verify_databases.c
|
|
|
|
|
+++ b/cf-agent/verify_databases.c
|
|
|
|
|
@@ -221,7 +221,7 @@ static PromiseResult VerifySQLPromise(EvalContext *ctx, const Attributes *a, con
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
- snprintf(query, CF_MAXVARSIZE - 1, "%s.%s", database, table);
|
|
|
|
|
+ snprintf(query, sizeof(query) - 1, "%s.%s", database, table);
|
|
|
|
|
|
|
|
|
|
if (VerifyTablePromise(ctx, &cfdb, query, a.database.columns, a, pp, &result))
|
|
|
|
|
if (VerifyTablePromise(ctx, &cfdb, query, a->database.columns, a, pp, &result))
|
|
|
|
|
{
|
|
|
|
|
@@ -300,7 +300,7 @@ static int VerifyDatabasePromise(CfdbCon
|
|
|
|
|
if (((a.transaction.action) != cfa_warn) && (!DONTDO))
|
|
|
|
|
@@ -301,7 +301,7 @@ static int VerifyDatabasePromise(CfdbConn *cfdb, char *database, const Attribute
|
|
|
|
|
if (((a->transaction.action) != cfa_warn) && (!DONTDO))
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "Attempting to delete the database '%s'", database);
|
|
|
|
|
- snprintf(query, CF_MAXVARSIZE - 1, "drop database %s", database);
|
|
|
|
@@ -48,8 +47,8 @@ Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
CfVoidQueryDB(cfdb, query);
|
|
|
|
|
return cfdb->result;
|
|
|
|
|
}
|
|
|
|
|
@@ -316,7 +316,7 @@ static int VerifyDatabasePromise(CfdbCon
|
|
|
|
|
if (((a.transaction.action) != cfa_warn) && (!DONTDO))
|
|
|
|
|
@@ -317,7 +317,7 @@ static int VerifyDatabasePromise(CfdbConn *cfdb, char *database, const Attribute
|
|
|
|
|
if (((a->transaction.action) != cfa_warn) && (!DONTDO))
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "Attempting to create the database '%s'", database);
|
|
|
|
|
- snprintf(query, CF_MAXVARSIZE - 1, "create database %s", database);
|
|
|
|
@@ -57,16 +56,16 @@ Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
CfVoidQueryDB(cfdb, query);
|
|
|
|
|
return cfdb->result;
|
|
|
|
|
}
|
|
|
|
|
@@ -499,7 +499,7 @@ static int ValidateRegistryPromiser(char
|
|
|
|
|
static int VerifyTablePromise(EvalContext *ctx, CfdbConn *cfdb, char *table_path, Rlist *columns, Attributes a,
|
|
|
|
|
@@ -506,7 +506,7 @@ static bool VerifyTablePromise(EvalContext *ctx, CfdbConn *cfdb, char *table_pat
|
|
|
|
|
const Promise *pp, PromiseResult *result)
|
|
|
|
|
{
|
|
|
|
|
assert(a != NULL);
|
|
|
|
|
- char name[CF_MAXVARSIZE], type[CF_MAXVARSIZE], query[CF_MAXVARSIZE], table[CF_MAXVARSIZE], db[CF_MAXVARSIZE];
|
|
|
|
|
+ char name[CF_MAXVARSIZE], type[CF_MAXVARSIZE], query[CF_BUFSIZE], table[CF_MAXVARSIZE], db[CF_MAXVARSIZE];
|
|
|
|
|
int i, count, size, no_of_cols, *size_table, *done, identified, retval = true;
|
|
|
|
|
int i, count, size, no_of_cols, *size_table, *done, identified;
|
|
|
|
|
bool retval = true;
|
|
|
|
|
char **name_table, **type_table;
|
|
|
|
|
|
|
|
|
|
@@ -670,12 +670,12 @@ static int VerifyTablePromise(EvalContex
|
|
|
|
|
@@ -678,12 +678,12 @@ static bool VerifyTablePromise(EvalContext *ctx, CfdbConn *cfdb, char *table_pat
|
|
|
|
|
{
|
|
|
|
|
if (size_table[i] > 0)
|
|
|
|
|
{
|
|
|
|
@@ -81,7 +80,7 @@ Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
type_table[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -742,7 +742,7 @@ static int CreateTableColumns(CfdbConn *
|
|
|
|
|
@@ -750,7 +750,7 @@ static bool CreateTableColumns(CfdbConn *cfdb, char *table, Rlist *columns)
|
|
|
|
|
|
|
|
|
|
if (no_of_cols > 0)
|
|
|
|
|
{
|
|
|
|
@@ -90,7 +89,7 @@ Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
|
|
|
|
|
for (i = 0; i < no_of_cols; i++)
|
|
|
|
|
{
|
|
|
|
|
@@ -781,7 +781,7 @@ static int CreateTableColumns(CfdbConn *
|
|
|
|
|
@@ -789,7 +789,7 @@ static bool CreateTableColumns(CfdbConn *cfdb, char *table, Rlist *columns)
|
|
|
|
|
static Rlist *GetSQLTables(CfdbConn *cfdb)
|
|
|
|
|
{
|
|
|
|
|
Rlist *list = NULL;
|
|
|
|
@@ -99,21 +98,21 @@ Index: cfengine-3.12.1/cf-agent/verify_databases.c
|
|
|
|
|
|
|
|
|
|
ListTables(cfdb->type, query);
|
|
|
|
|
|
|
|
|
|
@@ -870,7 +870,7 @@ static int ValidateSQLTableName(char *ta
|
|
|
|
|
@@ -878,7 +878,7 @@ static bool ValidateSQLTableName(char *table_path, char *db, char *table)
|
|
|
|
|
|
|
|
|
|
static void QueryTableColumns(char *s, char *db, char *table)
|
|
|
|
|
{
|
|
|
|
|
- snprintf(s, CF_MAXVARSIZE - 1,
|
|
|
|
|
+ snprintf(s, CF_BUFSIZE - 1,
|
|
|
|
|
"SELECT column_name,data_type,character_maximum_length FROM information_schema.columns WHERE table_name ='%s' AND table_schema = '%s'",
|
|
|
|
|
"SELECT column_name,data_type,character_maximum_length FROM information_schema->columns WHERE table_name ='%s' AND table_schema = '%s'",
|
|
|
|
|
table, db);
|
|
|
|
|
}
|
|
|
|
|
Index: cfengine-3.12.1/cf-agent/verify_exec.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-agent/verify_exec.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-agent/verify_exec.c
|
|
|
|
|
@@ -203,7 +203,7 @@ static char *GetLockNameExec(Attributes
|
|
|
|
|
static ActionResult RepairExec(EvalContext *ctx, Attributes a,
|
|
|
|
|
diff --git a/cf-agent/verify_exec.c b/cf-agent/verify_exec.c
|
|
|
|
|
index fae286563eb3..941645aee991 100644
|
|
|
|
|
--- a/cf-agent/verify_exec.c
|
|
|
|
|
+++ b/cf-agent/verify_exec.c
|
|
|
|
|
@@ -207,7 +207,7 @@ static char *GetLockNameExec(const Attributes *a, const Promise *pp)
|
|
|
|
|
static ActionResult RepairExec(EvalContext *ctx, const Attributes *a,
|
|
|
|
|
const Promise *pp, PromiseResult *result)
|
|
|
|
|
{
|
|
|
|
|
- char eventname[CF_BUFSIZE];
|
|
|
|
@@ -121,7 +120,7 @@ Index: cfengine-3.12.1/cf-agent/verify_exec.c
|
|
|
|
|
char cmdline[CF_BUFSIZE];
|
|
|
|
|
char comm[20];
|
|
|
|
|
int outsourced, count = 0;
|
|
|
|
|
@@ -456,7 +456,7 @@ static ActionResult RepairExec(EvalConte
|
|
|
|
|
@@ -460,7 +460,7 @@ static ActionResult RepairExec(EvalContext *ctx, const Attributes *a,
|
|
|
|
|
umask(maskval);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@@ -129,12 +128,12 @@ Index: cfengine-3.12.1/cf-agent/verify_exec.c
|
|
|
|
|
+ snprintf(eventname, CF_BUFSIZE*2 - 1, "Exec(%s)", cmdline);
|
|
|
|
|
|
|
|
|
|
#ifndef __MINGW32__
|
|
|
|
|
if ((a.transaction.background) && outsourced)
|
|
|
|
|
Index: cfengine-3.12.1/cf-agent/verify_packages.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-agent/verify_packages.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-agent/verify_packages.c
|
|
|
|
|
@@ -3176,7 +3176,7 @@ static void DeletePackageManagers(Packag
|
|
|
|
|
if ((a->transaction.background) && outsourced)
|
|
|
|
|
diff --git a/cf-agent/verify_packages.c b/cf-agent/verify_packages.c
|
|
|
|
|
index c3ffded995f0..e291858a71e9 100644
|
|
|
|
|
--- a/cf-agent/verify_packages.c
|
|
|
|
|
+++ b/cf-agent/verify_packages.c
|
|
|
|
|
@@ -3233,7 +3233,7 @@ static void DeletePackageManagers(PackageManager *np)
|
|
|
|
|
|
|
|
|
|
const char *PrefixLocalRepository(const Rlist *repositories, const char *package)
|
|
|
|
|
{
|
|
|
|
@@ -143,10 +142,10 @@ Index: cfengine-3.12.1/cf-agent/verify_packages.c
|
|
|
|
|
struct stat sb;
|
|
|
|
|
char path[CF_BUFSIZE];
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/cf-execd/cf-execd-runner.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-execd/cf-execd-runner.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-execd/cf-execd-runner.c
|
|
|
|
|
diff --git a/cf-execd/cf-execd-runner.c b/cf-execd/cf-execd-runner.c
|
|
|
|
|
index 1e743b4d09da..dfde122ba84c 100644
|
|
|
|
|
--- a/cf-execd/cf-execd-runner.c
|
|
|
|
|
+++ b/cf-execd/cf-execd-runner.c
|
|
|
|
|
@@ -195,7 +195,7 @@ void LocalExec(const ExecConfig *config)
|
|
|
|
|
strlcpy(esc_command, MapName(cmd), CF_BUFSIZE);
|
|
|
|
|
|
|
|
|
@@ -165,11 +164,11 @@ Index: cfengine-3.12.1/cf-execd/cf-execd-runner.c
|
|
|
|
|
GetWorkDir(), canonified_fq_name, line, thread_name);
|
|
|
|
|
|
|
|
|
|
MapName(filename);
|
|
|
|
|
Index: cfengine-3.12.1/cf-monitord/env_monitor.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-monitord/env_monitor.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-monitord/env_monitor.c
|
|
|
|
|
@@ -943,7 +943,7 @@ static double SetClasses(EvalContext *ct
|
|
|
|
|
diff --git a/cf-monitord/env_monitor.c b/cf-monitord/env_monitor.c
|
|
|
|
|
index 472e4c2c3d3e..866aa18dacec 100644
|
|
|
|
|
--- a/cf-monitord/env_monitor.c
|
|
|
|
|
+++ b/cf-monitord/env_monitor.c
|
|
|
|
|
@@ -938,7 +938,7 @@ static double SetClasses(EvalContext *ctx, char *name, double variable, double a
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_DEBUG, "No sigma variation .. can't measure class");
|
|
|
|
|
|
|
|
|
@@ -178,7 +177,7 @@ Index: cfengine-3.12.1/cf-monitord/env_monitor.c
|
|
|
|
|
MonEntropyPurgeUnused(buffer);
|
|
|
|
|
|
|
|
|
|
return sig;
|
|
|
|
|
@@ -1051,13 +1051,13 @@ static void SetVariable(char *name, doub
|
|
|
|
|
@@ -1046,13 +1046,13 @@ static void SetVariable(char *name, double value, double average, double stddev,
|
|
|
|
|
{
|
|
|
|
|
char var[CF_BUFSIZE];
|
|
|
|
|
|
|
|
|
@@ -195,11 +194,11 @@ Index: cfengine-3.12.1/cf-monitord/env_monitor.c
|
|
|
|
|
AppendItem(classlist, var, "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
@@ -210,7 +210,7 @@ static void IncrementCounter(Item **list
|
|
|
|
|
diff --git a/cf-monitord/mon_network_sniffer.c b/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
index 4ec8f3c79124..7466d94fcb70 100644
|
|
|
|
|
--- a/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
+++ b/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
@@ -210,7 +210,7 @@ static void IncrementCounter(Item **list, char *name)
|
|
|
|
|
|
|
|
|
|
static void AnalyzeArrival(Item *ip_addresses, long iteration, char *arrival, double *cf_this)
|
|
|
|
|
{
|
|
|
|
@@ -208,7 +207,7 @@ Index: cfengine-3.12.1/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
int isme_dest, isme_src;
|
|
|
|
|
|
|
|
|
|
src[0] = dest[0] = '\0';
|
|
|
|
|
@@ -387,11 +387,11 @@ static void AnalyzeArrival(Item *ip_addr
|
|
|
|
|
@@ -399,11 +399,11 @@ static void AnalyzeArrival(Item *ip_addresses, long iteration, char *arrival, do
|
|
|
|
|
|
|
|
|
|
if (strstr(arrival, ".138"))
|
|
|
|
|
{
|
|
|
|
@@ -222,11 +221,11 @@ Index: cfengine-3.12.1/cf-monitord/mon_network_sniffer.c
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Index: cfengine-3.12.1/cf-runagent/cf-runagent.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-runagent/cf-runagent.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-runagent/cf-runagent.c
|
|
|
|
|
@@ -796,15 +796,15 @@ static void HailExec(AgentConnection *co
|
|
|
|
|
diff --git a/cf-runagent/cf-runagent.c b/cf-runagent/cf-runagent.c
|
|
|
|
|
index 6c546acd55e2..5e9b74d5d3e9 100644
|
|
|
|
|
--- a/cf-runagent/cf-runagent.c
|
|
|
|
|
+++ b/cf-runagent/cf-runagent.c
|
|
|
|
|
@@ -796,15 +796,15 @@ static void HailExec(AgentConnection *conn, char *peer)
|
|
|
|
|
static FILE *NewStream(char *name)
|
|
|
|
|
{
|
|
|
|
|
FILE *fp;
|
|
|
|
@@ -245,11 +244,11 @@ Index: cfengine-3.12.1/cf-runagent/cf-runagent.c
|
|
|
|
|
GetWorkDir(), FILE_SEPARATOR, FILE_SEPARATOR, name);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/cf-serverd/server_common.c
|
|
|
|
|
+++ cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
@@ -370,8 +370,8 @@ static void AbortTransfer(ConnectionInfo
|
|
|
|
|
diff --git a/cf-serverd/server_common.c b/cf-serverd/server_common.c
|
|
|
|
|
index 77ac6c4dfd43..31d71ab4a742 100644
|
|
|
|
|
--- a/cf-serverd/server_common.c
|
|
|
|
|
+++ b/cf-serverd/server_common.c
|
|
|
|
|
@@ -372,8 +372,8 @@ static void AbortTransfer(ConnectionInfo *connection, char *filename)
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "Aborting transfer of file due to source changes");
|
|
|
|
|
|
|
|
|
@@ -260,7 +259,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
CF_CHANGEDSTR1, CF_CHANGEDSTR2, filename);
|
|
|
|
|
|
|
|
|
|
if (SendTransaction(connection, sendbuffer, 0, CF_DONE) == -1)
|
|
|
|
|
@@ -385,9 +385,9 @@ static void FailedTransfer(ConnectionInf
|
|
|
|
|
@@ -387,9 +387,9 @@ static void FailedTransfer(ConnectionInfo *connection)
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "Transfer failure");
|
|
|
|
|
|
|
|
|
@@ -272,7 +271,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
|
|
|
|
|
if (SendTransaction(connection, sendbuffer, 0, CF_DONE) == -1)
|
|
|
|
|
{
|
|
|
|
|
@@ -419,7 +419,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
@@ -421,7 +421,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_INFO, "REFUSE access to file: %s", filename);
|
|
|
|
|
RefuseAccess(args->conn, args->replyfile);
|
|
|
|
@@ -281,7 +280,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
if (ConnectionInfoProtocolVersion(conn_info) == CF_PROTOCOL_CLASSIC)
|
|
|
|
|
{
|
|
|
|
|
SendSocketStream(ConnectionInfoSocket(conn_info), sendbuffer, args->buf_size);
|
|
|
|
|
@@ -437,7 +437,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
@@ -439,7 +439,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
{
|
|
|
|
|
Log(LOG_LEVEL_ERR, "Open error of file '%s'. (open: %s)",
|
|
|
|
|
filename, GetErrorStr());
|
|
|
|
@@ -290,7 +289,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
if (ConnectionInfoProtocolVersion(conn_info) == CF_PROTOCOL_CLASSIC)
|
|
|
|
|
{
|
|
|
|
|
SendSocketStream(ConnectionInfoSocket(conn_info), sendbuffer, args->buf_size);
|
|
|
|
|
@@ -458,7 +458,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
@@ -460,7 +460,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
@@ -299,7 +298,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
|
|
|
|
|
Log(LOG_LEVEL_DEBUG, "Now reading from disk...");
|
|
|
|
|
|
|
|
|
|
@@ -490,7 +490,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
@@ -492,7 +492,7 @@ void CfGetFile(ServerFileGetState *args)
|
|
|
|
|
|
|
|
|
|
if (sb.st_size != savedlen)
|
|
|
|
|
{
|
|
|
|
@@ -308,7 +307,7 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
|
|
|
|
|
if (ConnectionInfoProtocolVersion(conn_info) == CF_PROTOCOL_CLASSIC)
|
|
|
|
|
{
|
|
|
|
|
@@ -606,7 +606,7 @@ void CfEncryptGetFile(ServerFileGetState
|
|
|
|
|
@@ -608,7 +608,7 @@ void CfEncryptGetFile(ServerFileGetState *args)
|
|
|
|
|
|
|
|
|
|
while (true)
|
|
|
|
|
{
|
|
|
|
@@ -317,24 +316,24 @@ Index: cfengine-3.12.1/cf-serverd/server_common.c
|
|
|
|
|
|
|
|
|
|
if ((n_read = read(fd, sendbuffer, blocksize)) == -1)
|
|
|
|
|
{
|
|
|
|
|
Index: cfengine-3.12.1/libcfnet/client_protocol.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libcfnet/client_protocol.c
|
|
|
|
|
+++ cfengine-3.12.1/libcfnet/client_protocol.c
|
|
|
|
|
diff --git a/libcfnet/client_protocol.c b/libcfnet/client_protocol.c
|
|
|
|
|
index 2f4668882f6a..54cfda95e4d3 100644
|
|
|
|
|
--- a/libcfnet/client_protocol.c
|
|
|
|
|
+++ b/libcfnet/client_protocol.c
|
|
|
|
|
@@ -63,7 +63,7 @@ void SetSkipIdentify(bool enabled)
|
|
|
|
|
|
|
|
|
|
int IdentifyAgent(ConnectionInfo *conn_info)
|
|
|
|
|
bool IdentifyAgent(ConnectionInfo *conn_info)
|
|
|
|
|
{
|
|
|
|
|
- char uname[CF_BUFSIZE], sendbuff[CF_BUFSIZE];
|
|
|
|
|
+ char uname[CF_MAXVARSIZE], sendbuff[CF_BUFSIZE];
|
|
|
|
|
char dnsname[CF_MAXVARSIZE], localip[CF_MAX_IP_LEN];
|
|
|
|
|
int ret;
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libenv/sysinfo.c
|
|
|
|
|
+++ cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
@@ -443,7 +443,7 @@ static void GetNameInfo3(EvalContext *ct
|
|
|
|
|
diff --git a/libenv/sysinfo.c b/libenv/sysinfo.c
|
|
|
|
|
index a6b1618c6a70..20c92996eed7 100644
|
|
|
|
|
--- a/libenv/sysinfo.c
|
|
|
|
|
+++ b/libenv/sysinfo.c
|
|
|
|
|
@@ -444,7 +444,7 @@ static void GetNameInfo3(EvalContext *ctx)
|
|
|
|
|
};
|
|
|
|
|
int have_component[COMPONENTS_SIZE];
|
|
|
|
|
struct stat sb;
|
|
|
|
@@ -343,7 +342,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
|
|
|
|
|
if (uname(&VSYSNAME) == -1)
|
|
|
|
|
{
|
|
|
|
|
@@ -2064,7 +2064,7 @@ static int Linux_Suse_Version(EvalContex
|
|
|
|
|
@@ -2073,7 +2073,7 @@ static int Linux_Suse_Version(EvalContext *ctx)
|
|
|
|
|
strncpy(classbuf, vendor, CF_MAXVARSIZE);
|
|
|
|
|
EvalContextClassPutHard(ctx, classbuf, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
snprintf(classbuf + strlen(classbuf), CF_MAXVARSIZE - strlen(classbuf), "_%d", major);
|
|
|
|
@@ -352,7 +351,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
if (minor != -1)
|
|
|
|
|
{
|
|
|
|
|
snprintf(classbuf + strlen(classbuf), CF_MAXVARSIZE - strlen(classbuf), "_%d", minor);
|
|
|
|
|
@@ -2177,7 +2177,7 @@ static void LinuxDebianSanitizeIssue(cha
|
|
|
|
|
@@ -2186,7 +2186,7 @@ static void LinuxDebianSanitizeIssue(char *buffer)
|
|
|
|
|
|
|
|
|
|
static int Linux_Misc_Version(EvalContext *ctx)
|
|
|
|
|
{
|
|
|
|
@@ -361,7 +360,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
char version[CF_MAXVARSIZE];
|
|
|
|
|
char os[CF_MAXVARSIZE];
|
|
|
|
|
char buffer[CF_BUFSIZE];
|
|
|
|
|
@@ -2218,7 +2218,7 @@ static int Linux_Misc_Version(EvalContex
|
|
|
|
|
@@ -2227,7 +2227,7 @@ static int Linux_Misc_Version(EvalContext *ctx)
|
|
|
|
|
|
|
|
|
|
if (*os && *version)
|
|
|
|
|
{
|
|
|
|
@@ -370,7 +369,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
SetFlavor(ctx, flavor);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
@@ -2233,7 +2233,7 @@ static int Linux_Debian_Version(EvalCont
|
|
|
|
|
@@ -2242,7 +2242,7 @@ static int Linux_Debian_Version(EvalContext *ctx)
|
|
|
|
|
int major = -1;
|
|
|
|
|
int release = -1;
|
|
|
|
|
int result;
|
|
|
|
@@ -378,18 +377,8 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
+ char classname[CF_BUFSIZE], buffer[CF_BUFSIZE], os[CF_MAXVARSIZE], version[CF_MAXVARSIZE];
|
|
|
|
|
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "This appears to be a debian system.");
|
|
|
|
|
EvalContextClassPutHard(ctx, "debian", "inventory,attribute_name=none,source=agent");
|
|
|
|
|
@@ -2253,15 +2253,15 @@ static int Linux_Debian_Version(EvalCont
|
|
|
|
|
{
|
|
|
|
|
case 2:
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "This appears to be a Debian %u.%u system.", major, release);
|
|
|
|
|
- snprintf(classname, CF_MAXVARSIZE, "debian_%u_%u", major, release);
|
|
|
|
|
+ snprintf(classname, CF_BUFSIZE, "debian_%u_%u", major, release);
|
|
|
|
|
EvalContextClassPutHard(ctx, classname, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
- snprintf(classname, CF_MAXVARSIZE, "debian_%u", major);
|
|
|
|
|
+ snprintf(classname, CF_BUFSIZE, "debian_%u", major);
|
|
|
|
|
SetFlavor(ctx, classname);
|
|
|
|
|
break;
|
|
|
|
|
EvalContextClassPutHard(
|
|
|
|
|
@@ -2276,7 +2276,7 @@ static int Linux_Debian_Version(EvalContext *ctx)
|
|
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
|
Log(LOG_LEVEL_VERBOSE, "This appears to be a Debian %u system.", major);
|
|
|
|
@@ -398,40 +387,21 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
SetFlavor(ctx, classname);
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
@@ -2270,7 +2270,7 @@ static int Linux_Debian_Version(EvalCont
|
|
|
|
|
@@ -2285,11 +2285,8 @@ static int Linux_Debian_Version(EvalContext *ctx)
|
|
|
|
|
sscanf(buffer, "%25[^/]", version);
|
|
|
|
|
if (strlen(version) > 0)
|
|
|
|
|
{
|
|
|
|
|
- snprintf(classname, CF_MAXVARSIZE, "debian_%s", version);
|
|
|
|
|
- EvalContextClassPutHard(
|
|
|
|
|
- ctx,
|
|
|
|
|
- classname,
|
|
|
|
|
- "inventory,attribute_name=none,source=agent,derived-from-file="DEBIAN_VERSION_FILENAME);
|
|
|
|
|
+ snprintf(classname, CF_BUFSIZE, "debian_%s", version);
|
|
|
|
|
EvalContextClassPutHard(ctx, classname, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
+ EvalContextClassPutHard(ctx, classname, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
@@ -2288,7 +2288,7 @@ static int Linux_Debian_Version(EvalCont
|
|
|
|
|
{
|
|
|
|
|
LinuxDebianSanitizeIssue(buffer);
|
|
|
|
|
sscanf(buffer, "%*s %*s %[^./]", version);
|
|
|
|
|
- snprintf(buffer, CF_MAXVARSIZE, "debian_%s", version);
|
|
|
|
|
+ snprintf(buffer, CF_BUFSIZE, "debian_%s", version);
|
|
|
|
|
EvalContextClassPutHard(ctx, "debian", "inventory,attribute_name=none,source=agent");
|
|
|
|
|
SetFlavor(ctx, buffer);
|
|
|
|
|
}
|
|
|
|
|
@@ -2296,12 +2296,12 @@ static int Linux_Debian_Version(EvalCont
|
|
|
|
|
{
|
|
|
|
|
LinuxDebianSanitizeIssue(buffer);
|
|
|
|
|
sscanf(buffer, "%*s %[^.].%d", version, &release);
|
|
|
|
|
- snprintf(buffer, CF_MAXVARSIZE, "ubuntu_%s", version);
|
|
|
|
|
+ snprintf(buffer, CF_BUFSIZE, "ubuntu_%s", version);
|
|
|
|
|
SetFlavor(ctx, buffer);
|
|
|
|
|
EvalContextClassPutHard(ctx, "ubuntu", "inventory,attribute_name=none,source=agent");
|
|
|
|
|
if (release >= 0)
|
|
|
|
|
{
|
|
|
|
|
- snprintf(buffer, CF_MAXVARSIZE, "ubuntu_%s_%d", version, release);
|
|
|
|
|
+ snprintf(buffer, CF_BUFSIZE, "ubuntu_%s_%d", version, release);
|
|
|
|
|
EvalContextClassPutHard(ctx, buffer, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -2515,13 +2515,13 @@ static int EOS_Version(EvalContext *ctx)
|
|
|
|
|
@@ -2543,13 +2540,13 @@ static int EOS_Version(EvalContext *ctx)
|
|
|
|
|
{
|
|
|
|
|
if (strstr(buffer, "EOS"))
|
|
|
|
|
{
|
|
|
|
@@ -447,7 +417,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
EvalContextClassPutHard(ctx, class, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
@@ -2541,14 +2541,14 @@ static int MiscOS(EvalContext *ctx)
|
|
|
|
|
@@ -2569,14 +2566,14 @@ static int MiscOS(EvalContext *ctx)
|
|
|
|
|
{
|
|
|
|
|
if (strstr(buffer, "BIG-IP"))
|
|
|
|
|
{
|
|
|
|
@@ -465,7 +435,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
EvalContextClassPutHard(ctx, class, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
SetFlavor(ctx, "BIG-IP");
|
|
|
|
|
}
|
|
|
|
|
@@ -2561,7 +2561,8 @@ static int MiscOS(EvalContext *ctx)
|
|
|
|
|
@@ -2589,7 +2586,8 @@ static int MiscOS(EvalContext *ctx)
|
|
|
|
|
|
|
|
|
|
static int VM_Version(EvalContext *ctx)
|
|
|
|
|
{
|
|
|
|
@@ -475,7 +445,7 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
int major, minor, bug;
|
|
|
|
|
int sufficient = 0;
|
|
|
|
|
|
|
|
|
|
@@ -2573,17 +2574,17 @@ static int VM_Version(EvalContext *ctx)
|
|
|
|
|
@@ -2601,17 +2599,17 @@ static int VM_Version(EvalContext *ctx)
|
|
|
|
|
{
|
|
|
|
|
if (sscanf(buffer, "VMware ESX Server %d.%d.%d", &major, &minor, &bug) > 0)
|
|
|
|
|
{
|
|
|
|
@@ -497,11 +467,11 @@ Index: cfengine-3.12.1/libenv/sysinfo.c
|
|
|
|
|
EvalContextClassPutHard(ctx, classbuf, "inventory,attribute_name=none,source=agent");
|
|
|
|
|
sufficient = 1;
|
|
|
|
|
}
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/cf3globals.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/cf3globals.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/cf3globals.c
|
|
|
|
|
@@ -55,7 +55,7 @@ long LASTSEENEXPIREAFTER = SECONDS_PER_W
|
|
|
|
|
diff --git a/libpromises/cf3globals.c b/libpromises/cf3globals.c
|
|
|
|
|
index 7915affc07fc..932dd62456f9 100644
|
|
|
|
|
--- a/libpromises/cf3globals.c
|
|
|
|
|
+++ b/libpromises/cf3globals.c
|
|
|
|
|
@@ -55,7 +55,7 @@ long LASTSEENEXPIREAFTER = SECONDS_PER_WEEK; /* GLOBAL_P */
|
|
|
|
|
bool DONTDO = false; /* GLOBAL_A */
|
|
|
|
|
|
|
|
|
|
/* NB! Check use before changing sizes */
|
|
|
|
@@ -510,10 +480,10 @@ Index: cfengine-3.12.1/libpromises/cf3globals.c
|
|
|
|
|
char VUQNAME[CF_MAXVARSIZE] = ""; /* GLOBAL_E */
|
|
|
|
|
char VDOMAIN[CF_MAXVARSIZE] = ""; /* GLOBAL_E GLOBAL_P */
|
|
|
|
|
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/cf3lex.l
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/cf3lex.l
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/cf3lex.l
|
|
|
|
|
diff --git a/libpromises/cf3lex.l b/libpromises/cf3lex.l
|
|
|
|
|
index c28c4302a74a..766fe3fd7896 100644
|
|
|
|
|
--- a/libpromises/cf3lex.l
|
|
|
|
|
+++ b/libpromises/cf3lex.l
|
|
|
|
|
@@ -334,7 +334,7 @@ promise_type [a-zA-Z_]+:
|
|
|
|
|
{
|
|
|
|
|
yyerror("identifier too long");
|
|
|
|
@@ -541,11 +511,11 @@ Index: cfengine-3.12.1/libpromises/cf3lex.l
|
|
|
|
|
|
|
|
|
|
if (P.currentclasses != NULL)
|
|
|
|
|
{
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/cf3parse.y
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/cf3parse.y
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/cf3parse.y
|
|
|
|
|
@@ -1134,7 +1134,7 @@ functionid: IDSYNTAX
|
|
|
|
|
diff --git a/libpromises/cf3parse.y b/libpromises/cf3parse.y
|
|
|
|
|
index 9fea664a9874..5e5268d9f372 100644
|
|
|
|
|
--- a/libpromises/cf3parse.y
|
|
|
|
|
+++ b/libpromises/cf3parse.y
|
|
|
|
|
@@ -1142,7 +1142,7 @@ functionid: IDSYNTAX
|
|
|
|
|
| NAKEDVAR
|
|
|
|
|
{
|
|
|
|
|
ParserDebug("\tP:%s:%s:%s:%s function nakedvar = %s\n", P.block, P.blocktype, P.blockid, P.currentclasses ? P.currentclasses : "any", P.currentstring);
|
|
|
|
@@ -554,11 +524,11 @@ Index: cfengine-3.12.1/libpromises/cf3parse.y
|
|
|
|
|
free(P.currentstring);
|
|
|
|
|
P.currentstring = NULL;
|
|
|
|
|
}
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/eval_context.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/eval_context.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/eval_context.c
|
|
|
|
|
@@ -1569,7 +1569,7 @@ Class *EvalContextClassMatch(const EvalC
|
|
|
|
|
diff --git a/libpromises/eval_context.c b/libpromises/eval_context.c
|
|
|
|
|
index 7c7ffd069e3e..497ea48874c3 100644
|
|
|
|
|
--- a/libpromises/eval_context.c
|
|
|
|
|
+++ b/libpromises/eval_context.c
|
|
|
|
|
@@ -1571,7 +1571,7 @@ Class *EvalContextClassMatch(const EvalContext *ctx, const char *regex)
|
|
|
|
|
static bool EvalContextClassPut(EvalContext *ctx, const char *ns, const char *name, bool is_soft, ContextScope scope, const char *tags)
|
|
|
|
|
{
|
|
|
|
|
{
|
|
|
|
@@ -567,7 +537,7 @@ Index: cfengine-3.12.1/libpromises/eval_context.c
|
|
|
|
|
char canonified_context[CF_MAXVARSIZE];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1592,7 +1592,7 @@ static bool EvalContextClassPut(EvalCont
|
|
|
|
|
@@ -1594,7 +1594,7 @@ static bool EvalContextClassPut(EvalContext *ctx, const char *ns, const char *na
|
|
|
|
|
|
|
|
|
|
if (ns && strcmp(ns, "default") != 0)
|
|
|
|
|
{
|
|
|
|
@@ -576,11 +546,11 @@ Index: cfengine-3.12.1/libpromises/eval_context.c
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/evalfunction.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/evalfunction.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/evalfunction.c
|
|
|
|
|
@@ -496,7 +496,7 @@ static Rlist *GetHostsFromLastseenDB(Ite
|
|
|
|
|
diff --git a/libpromises/evalfunction.c b/libpromises/evalfunction.c
|
|
|
|
|
index 505a2e6d140b..6fb0f261fafc 100644
|
|
|
|
|
--- a/libpromises/evalfunction.c
|
|
|
|
|
+++ b/libpromises/evalfunction.c
|
|
|
|
|
@@ -496,7 +496,7 @@ static Rlist *GetHostsFromLastseenDB(Item *addresses, time_t horizon, bool retur
|
|
|
|
|
Item *ip;
|
|
|
|
|
time_t now = time(NULL);
|
|
|
|
|
double entrytime;
|
|
|
|
@@ -589,11 +559,11 @@ Index: cfengine-3.12.1/libpromises/evalfunction.c
|
|
|
|
|
|
|
|
|
|
for (ip = addresses; ip != NULL; ip = ip->next)
|
|
|
|
|
{
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/expand.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/expand.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/expand.c
|
|
|
|
|
@@ -870,7 +870,7 @@ static void ResolveControlBody(EvalConte
|
|
|
|
|
diff --git a/libpromises/expand.c b/libpromises/expand.c
|
|
|
|
|
index 37da303b189e..0494a3c1be29 100644
|
|
|
|
|
--- a/libpromises/expand.c
|
|
|
|
|
+++ b/libpromises/expand.c
|
|
|
|
|
@@ -870,7 +870,7 @@ static void ResolveControlBody(EvalContext *ctx, GenericAgentConfig *config,
|
|
|
|
|
|
|
|
|
|
EvalContextVariableRemoveSpecial(ctx, SPECIAL_SCOPE_SYS, "domain");
|
|
|
|
|
EvalContextVariableRemoveSpecial(ctx, SPECIAL_SCOPE_SYS, "fqhost");
|
|
|
|
@@ -602,10 +572,10 @@ Index: cfengine-3.12.1/libpromises/expand.c
|
|
|
|
|
EvalContextVariablePutSpecial(ctx, SPECIAL_SCOPE_SYS, "fqhost",
|
|
|
|
|
VFQNAME, CF_DATA_TYPE_STRING,
|
|
|
|
|
"inventory,source=agent,attribute_name=Host name");
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/keyring.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/keyring.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/keyring.c
|
|
|
|
|
diff --git a/libpromises/keyring.c b/libpromises/keyring.c
|
|
|
|
|
index a8e4f2c8c640..55e52c28a358 100644
|
|
|
|
|
--- a/libpromises/keyring.c
|
|
|
|
|
+++ b/libpromises/keyring.c
|
|
|
|
|
@@ -83,9 +83,9 @@ int RemovePublicKey(const char *id)
|
|
|
|
|
|
|
|
|
|
if (c && c[strlen(suffix)] == '\0') /* dirp->d_name ends with suffix */
|
|
|
|
@@ -618,22 +588,10 @@ Index: cfengine-3.12.1/libpromises/keyring.c
|
|
|
|
|
MapName(keyfilename);
|
|
|
|
|
|
|
|
|
|
if (unlink(keyfilename) < 0)
|
|
|
|
|
Index: cfengine-3.12.1/libpromises/syslog_client.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/libpromises/syslog_client.c
|
|
|
|
|
+++ cfengine-3.12.1/libpromises/syslog_client.c
|
|
|
|
|
@@ -112,6 +112,7 @@ void RemoteSysLog(int log_priority, cons
|
|
|
|
|
char timebuffer[26];
|
|
|
|
|
pid_t pid = getpid();
|
|
|
|
|
|
|
|
|
|
+ // rfc3164_len is WAY too small
|
|
|
|
|
snprintf(
|
|
|
|
|
message,
|
|
|
|
|
sizeof(message),
|
|
|
|
|
Index: cfengine-3.12.1/tests/unit/logging_test.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/tests/unit/logging_test.c
|
|
|
|
|
+++ cfengine-3.12.1/tests/unit/logging_test.c
|
|
|
|
|
diff --git a/tests/unit/logging_test.c b/tests/unit/logging_test.c
|
|
|
|
|
index e625e2b8c945..dc6ee2451a88 100644
|
|
|
|
|
--- a/tests/unit/logging_test.c
|
|
|
|
|
+++ b/tests/unit/logging_test.c
|
|
|
|
|
@@ -6,7 +6,7 @@
|
|
|
|
|
#include <syslog_client.h>
|
|
|
|
|
#include <string_lib.h>
|
|
|
|
@@ -643,10 +601,10 @@ Index: cfengine-3.12.1/tests/unit/logging_test.c
|
|
|
|
|
char VPREFIX[CF_MAXVARSIZE];
|
|
|
|
|
|
|
|
|
|
static struct sockaddr *got_address;
|
|
|
|
|
Index: cfengine-3.12.1/tests/unit/set_domainname_test.c
|
|
|
|
|
===================================================================
|
|
|
|
|
--- cfengine-3.12.1.orig/tests/unit/set_domainname_test.c
|
|
|
|
|
+++ cfengine-3.12.1/tests/unit/set_domainname_test.c
|
|
|
|
|
diff --git a/tests/unit/set_domainname_test.c b/tests/unit/set_domainname_test.c
|
|
|
|
|
index 55cd05c17463..87a9dace0d68 100644
|
|
|
|
|
--- a/tests/unit/set_domainname_test.c
|
|
|
|
|
+++ b/tests/unit/set_domainname_test.c
|
|
|
|
|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
|
|
|
|
/* Global variables we care about */
|
|
|
|
@@ -656,3 +614,6 @@ Index: cfengine-3.12.1/tests/unit/set_domainname_test.c
|
|
|
|
|
char VUQNAME[CF_MAXVARSIZE];
|
|
|
|
|
char VDOMAIN[CF_MAXVARSIZE];
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
2.24.0
|
|
|
|
|
|