update to 2.1.16, removing sbin/vicf which seems to have a security

problem but is not used anywhere and will probably be removed from
cfengine

from maintainer William Yodlowsky <bsd at openbsd.rutgers.edu>
This commit is contained in:
sturm 2005-10-27 21:47:28 +00:00
parent 430fb160d2
commit fec479ae4c
28 changed files with 1012 additions and 346 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.23 2005/07/21 15:16:46 aanriot Exp $
# $OpenBSD: Makefile,v 1.24 2005/10/27 21:47:28 sturm Exp $
COMMENT= "GNU system administration tool for networks"
V= 2.1.15
V= 2.1.16
DISTNAME= cfengine-${V}
CATEGORIES= sysutils

View File

@ -1,4 +1,4 @@
MD5 (cfengine-2.1.15.tar.gz) = f03de82709f84c3d6d916b6e557321f9
RMD160 (cfengine-2.1.15.tar.gz) = a7cc0d301ed6fa7d7a7352b99423fb35f0e3293d
SHA1 (cfengine-2.1.15.tar.gz) = 4a86034df637de914b9f1a23875d407e3c09e20c
SIZE (cfengine-2.1.15.tar.gz) = 3555495
MD5 (cfengine-2.1.16.tar.gz) = 1b009dcc2ab27c205e72b536c67ae173
RMD160 (cfengine-2.1.16.tar.gz) = 3b875fbd6144e76114f19f3ea1f40b559f06f453
SHA1 (cfengine-2.1.16.tar.gz) = 11a591cb2e806fe58532a5c4a90d7bf64ed9c63c
SIZE (cfengine-2.1.16.tar.gz) = 3606067

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-configure,v 1.3 2005/07/21 15:16:46 aanriot Exp $
--- configure.orig Fri Jun 10 16:01:44 2005
+++ configure Tue Jul 19 11:19:58 2005
$OpenBSD: patch-configure,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- configure.orig Sat Oct 1 08:32:10 2005
+++ configure Fri Oct 21 16:35:54 2005
@@ -9135,6 +9135,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
@ -14,7 +14,7 @@ $OpenBSD: patch-configure,v 1.3 2005/07/21 15:16:46 aanriot Exp $
- GCC_CFLAG="-g -O2 -Wreturn-type -Wmissing-prototypes -Wuninitialized"
+ GCC_CFLAG="";
+ GCC_CFLAG=""
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-contrib_Makefile_in,v 1.1 2005/10/27 21:47:28 sturm Exp $
vicf has security issues
--- contrib/Makefile.in.orig Tue Oct 25 10:59:38 2005
+++ contrib/Makefile.in Tue Oct 25 10:59:40 2005
@@ -170,7 +170,7 @@ target_os = @target_os@
target_vendor = @target_vendor@
s1 = cfdoc
s2 = cfengine.el
-sbin_SCRIPTS = vicf $(s1)
+sbin_SCRIPTS = $(s1)
pkgdata_SCRIPTS = $(s2)
EXTRA_DIST = README README.vicf $(s1) $(s2)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/cfagent.c.orig Thu Apr 7 15:29:49 2005
+++ src/cfagent.c Fri Jul 15 12:24:00 2005
@@ -206,7 +206,7 @@ void Initialize(int argc,char *argv[])
$OpenBSD: patch-src_cfagent_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/cfagent.c.orig Wed Sep 21 16:06:14 2005
+++ src/cfagent.c Fri Oct 21 16:35:54 2005
@@ -205,7 +205,7 @@ void Initialize(int argc,char *argv[])
unsigned char s[16];
char ebuff[CF_EXPANDSIZE];
@ -10,7 +10,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
PreLockState();
@@ -219,7 +219,7 @@ VMAILSERVER[0] = '\0';
@@ -218,7 +218,7 @@ VMAILSERVER[0] = '\0';
ALLCLASSBUFFER[0] = '\0';
VREPOSITORY = strdup("\0");
@ -19,7 +19,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
METHODREPLYTO[0] = '\0';
METHODFOR[0] = '\0';
@@ -227,8 +227,8 @@ METHODFOR[0] = '\0';
@@ -226,8 +226,8 @@ METHODFOR[0] = '\0';
re_syntax_options |= RE_INTERVALS;
#endif
@ -30,7 +30,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
IDClasses();
@@ -271,27 +271,28 @@ for (i = 1; i < argc; i++)
@@ -270,27 +270,28 @@ for (i = 1; i < argc; i++)
/* XXX Initialize workdir for non privileged users */
@ -65,7 +65,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
@@ -324,8 +325,8 @@ if (NOPRECONFIG)
@@ -323,8 +324,8 @@ if (NOPRECONFIG)
return;
}
@ -76,7 +76,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if ((sp=getenv(CF_INPUTSVAR)) != NULL)
{
@@ -618,8 +619,8 @@ if (strlen(ebuff) != 0)
@@ -617,8 +618,8 @@ if (strlen(ebuff) != 0)
}
else
{
@ -87,7 +87,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
p2 = SortItemListNames(VHEAP);
@@ -766,7 +767,7 @@ if (VACTIONSEQ == NULL)
@@ -765,7 +766,7 @@ if (VACTIONSEQ == NULL)
Warning("perhaps cfagent.conf/update.conf have not yet been set up?");
}
@ -96,7 +96,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (VACCESSLIST != NULL && !IsItemIn(VACCESSLIST,id))
{
@@ -921,7 +922,7 @@ if (OptionIs(CONTEXTID,"DryRun",true))
@@ -920,7 +921,7 @@ if (OptionIs(CONTEXTID,"DryRun",true))
if (GetMacroValue(CONTEXTID,"BinaryPaddingChar"))
{
@ -105,16 +105,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (ebuff[0] == '\\')
{
@@ -1106,7 +1107,7 @@ if ((tloc = time((time_t *)NULL)) == -1)
CFSTARTTIME = tloc;
-snprintf(vbuff,CF_BUFSIZE,"%s",ctime(&tloc));
+snprintf(vbuff,CF_MAXVARSIZE,"%s",ctime(&tloc));
Verbose("Reference time set to %s\n",ctime(&tloc));
@@ -1491,7 +1492,7 @@ while (*sp != '\0')
@@ -1520,7 +1521,7 @@ while (*sp != '\0')
{
VIFELAPSED = VDEFAULTIFELAPSED;
VEXPIREAFTER = VDEFAULTEXPIREAFTER;
@ -123,7 +114,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
continue;
}
else
@@ -1926,8 +1927,8 @@ for (ip = VHEAP; ip != NULL; ip=ip->next
@@ -1861,8 +1862,8 @@ for (ip = VHEAP; ip != NULL; ip=ip->next
else
{
size++; /* Allow for : separator */
@ -134,7 +125,7 @@ $OpenBSD: patch-src_cfagent_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
fprintf(fp,"%s\n",ip->name);
@@ -1946,8 +1947,8 @@ for (ip = VHEAP; ip != NULL; ip=ip->next
@@ -1881,8 +1882,8 @@ for (ip = VHEAP; ip != NULL; ip=ip->next
else
{
size++; /* Allow for : separator */

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/cfenvd.c.orig Wed May 25 07:38:54 2005
+++ src/cfenvd.c Fri Jul 15 12:24:00 2005
$OpenBSD: patch-src_cfenvd_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/cfenvd.c.orig Fri Jul 15 11:16:04 2005
+++ src/cfenvd.c Fri Oct 21 16:35:54 2005
@@ -187,10 +187,10 @@ void CheckOptsAndInit(int argc,char **ar
int c, i,j,k;
@ -14,7 +14,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
IGNORELOCK = false;
OUTPUT[0] = '\0';
@@ -243,30 +243,30 @@ LOGGING = true; /* Do
@@ -247,30 +247,30 @@ SetSignals();
/* XXX Initialize workdir for non privileged users */
@ -52,7 +52,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CreateEmptyFile(VBUFF);
}
@@ -276,7 +276,7 @@ for (i = 0; i < CF_NETATTR; i++)
@@ -280,7 +280,7 @@ for (i = 0; i < CF_NETATTR; i++)
NETOUT_DIST[i] = NULL;
}
@ -61,7 +61,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CreateEmptyFile(VBUFF);
snprintf(AVDB,CF_MAXVARSIZE,"%s/state/%s",CFWORKDIR,CF_AVDB_FILE);
@@ -284,6 +284,7 @@ snprintf(STATELOG,CF_BUFSIZE,"%s/state/%
@@ -288,6 +288,7 @@ snprintf(STATELOG,CF_BUFSIZE,"%s/state/%
snprintf(ENV_NEW,CF_BUFSIZE,"%s/state/%s",CFWORKDIR,CF_ENVNEW_FILE);
snprintf(ENV,CF_BUFSIZE,"%s/state/%s",CFWORKDIR,CF_ENV_FILE);
@ -69,7 +69,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (!BATCH_MODE)
{
GetDatabaseAge();
@@ -472,7 +473,7 @@ void StartServer(int argc,char **argv)
@@ -476,7 +477,7 @@ void StartServer(int argc,char **argv)
if ((!NO_FORK) && (fork() != 0))
{
@ -78,7 +78,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cfinform,OUTPUT,"");
exit(0);
}
@@ -646,7 +647,7 @@ if ((now = time((time_t *)NULL)) == -1)
@@ -650,7 +651,7 @@ if ((now = time((time_t *)NULL)) == -1)
exit(1);
}
@ -87,7 +87,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return ConvTimeKey(str);
}
@@ -812,14 +813,14 @@ SetVariable("loadavg",LOADAVG,av.expect_
@@ -816,14 +817,14 @@ SetVariable("loadavg",LOADAVG,av.expect_
for (i = 0; i < ATTR; i++)
{
char name[256];
@ -106,7 +106,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
sig = SetClasses(name,OUTGOING[i],av.expect_outgoing[i],av.var_outgoing[i],LOCALAV.expect_outgoing[i],LOCALAV.var_outgoing[i],&classlist,timekey);
SetVariable(name,OUTGOING[i],av.expect_outgoing[i],sig,&classlist);
@@ -839,13 +840,13 @@ for (i = 0; i < PH_LIMIT; i++)
@@ -843,13 +844,13 @@ for (i = 0; i < PH_LIMIT; i++)
for (i = 0; i < CF_NETATTR; i++)
{
char name[256];
@ -124,7 +124,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
sig = SetClasses(name,NETOUT[i],av.expect_netout[i],av.var_netout[i],LOCALAV.expect_netout[i],LOCALAV.var_netout[i],&classlist,timekey);
SetVariable(name,NETOUT[i],av.expect_netout[i],sig,&classlist);
}
@@ -1162,7 +1163,7 @@ if (ALL_OUTGOING != NULL)
@@ -1166,7 +1167,7 @@ if (ALL_OUTGOING != NULL)
sscanf(VNETSTAT[VSYSTEMHARDCLASS],"%s",comm);
@ -133,7 +133,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if ((pp = cfpopen(comm,"r")) == NULL)
{
@@ -1491,7 +1492,7 @@ struct Averages *GetCurrentAverages(char
@@ -1495,7 +1496,7 @@ struct Averages *GetCurrentAverages(char
if ((errno = db_create(&dbp,NULL,0)) != 0)
{
@ -142,7 +142,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return NULL;
}
@@ -1502,7 +1503,7 @@ if ((errno = dbp->open(dbp,AVDB,NULL,DB_
@@ -1506,7 +1507,7 @@ if ((errno = dbp->open(dbp,AVDB,NULL,DB_
if ((errno = dbp->open(dbp,NULL,AVDB,NULL,DB_BTREE,DB_CREATE,0644)) != 0)
#endif
{
@ -151,7 +151,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return NULL;
}
@@ -1552,7 +1553,7 @@ void UpdateAverages(char *timekey,struct
@@ -1556,7 +1557,7 @@ void UpdateAverages(char *timekey,struct
if ((errno = db_create(&dbp,NULL,0)) != 0)
{
@ -160,7 +160,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return;
}
@@ -1563,7 +1564,7 @@ if ((errno = dbp->open(dbp,AVDB,NULL,DB_
@@ -1567,7 +1568,7 @@ if ((errno = dbp->open(dbp,AVDB,NULL,DB_
if ((errno = dbp->open(dbp,NULL,AVDB,NULL,DB_BTREE,DB_CREATE,0644)) != 0)
#endif
{
@ -169,7 +169,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return;
}
@@ -1790,27 +1791,27 @@ if (fabs(delta) < cf_noise_threshold) /*
@@ -1794,27 +1795,27 @@ if (fabs(delta) < cf_noise_threshold) /*
Debug(" Sensitivity too high ..\n");
buffer[0] = '\0';
@ -203,7 +203,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
AppendItem(classlist,buffer2,"2");
AddPersistentClass(buffer2,40,cfpreserve);
}
@@ -1820,33 +1821,33 @@ if (fabs(delta) < cf_noise_threshold) /*
@@ -1824,33 +1825,33 @@ if (fabs(delta) < cf_noise_threshold) /*
else
{
buffer[0] = '\0';
@ -245,7 +245,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
AppendItem(classlist,buffer2,"0");
}
@@ -1856,16 +1857,16 @@ if (fabs(delta) < cf_noise_threshold) /*
@@ -1860,16 +1861,16 @@ if (fabs(delta) < cf_noise_threshold) /*
if (dev > 2.0*sqrt(2.0))
{
@ -266,7 +266,7 @@ $OpenBSD: patch-src_cfenvd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
AppendItem(classlist,buffer2,"3");
AddPersistentClass(buffer2,40,cfpreserve);
}
@@ -1880,13 +1881,13 @@ void SetVariable(char *name,double value
@@ -1884,13 +1885,13 @@ void SetVariable(char *name,double value
{ char var[CF_BUFSIZE];

View File

@ -0,0 +1,498 @@
$OpenBSD: patch-src_cfetool_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
--- src/cfetool.c.orig Thu Jun 30 03:53:06 2005
+++ src/cfetool.c Fri Oct 21 16:35:55 2005
@@ -326,7 +326,7 @@ void parse_create_opts(int argc, char **
case 'f':
BATCH_MODE = true;
- strcpy(BATCHFILE, optarg);
+ (void)strlcpy(BATCHFILE, optarg, sizeof(BATCHFILE));
break;
case 'v':
@@ -338,7 +338,7 @@ void parse_create_opts(int argc, char **
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 's':
@@ -420,7 +420,7 @@ void parse_update_opts(int argc, char **
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 't':
@@ -522,7 +522,7 @@ void parse_check_opts(int argc, char **a
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 't':
@@ -603,7 +603,7 @@ void parse_info_opts(int argc, char **ar
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 'E':
@@ -675,7 +675,7 @@ void parse_dump_opts(int argc, char **ar
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 'Y':
@@ -687,7 +687,7 @@ void parse_dump_opts(int argc, char **ar
break;
case 'f':
- strcpy(DUMPFILE, optarg);
+ (void)strlcpy(DUMPFILE, optarg, sizeof(DUMPFILE));
break;
case 'd':
@@ -772,7 +772,7 @@ void parse_import_opts(int argc, char **
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 'v':
@@ -780,7 +780,7 @@ void parse_import_opts(int argc, char **
break;
case 'f':
- strcpy(IMPORTFILE, optarg);
+ (void)strlcpy(IMPORTFILE, optarg, sizeof(IMPORTFILE));
break;
case 'd':
@@ -851,22 +851,22 @@ void Create(int step, int dbtype)
if(getcwd(current_dir, cwdbufsize) == NULL)
perror("getcwd");
if(PATHNAME[0] == '\0')
- sprintf(LOCATION, "%s/%s", current_dir, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", current_dir, NAME);
else if(PATHNAME[0] == '/')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "%s/%s/%s", current_dir, PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s/%s", current_dir, PATHNAME, NAME);
switch(dbtype)
{
case DAILY:
- sprintf(AVDB, "%s/daily.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
break;
case YEARLY:
- sprintf(AVDB, "%s/yearly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
break;
default: /* weekly */
- sprintf(AVDB, "%s/weekly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
break;
}
Verbose("Creating new database: %s\n", AVDB);
@@ -989,20 +989,20 @@ int Update(double value, time_t u_time,
VALUE = value;
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
switch(dbtype)
{
case DAILY:
- sprintf(AVDB, "%s/daily.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
break;
case YEARLY:
- sprintf(AVDB, "%s/yearly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
break;
default: /* weekly */
- sprintf(AVDB, "%s/weekly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
break;
}
@@ -1049,20 +1049,20 @@ int Check(double value, time_t u_time, i
VALUE = value;
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
switch(dbtype)
{
case DAILY:
- sprintf(AVDB, "%s/daily.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
break;
case YEARLY:
- sprintf(AVDB, "%s/yearly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
break;
default: /* weekly */
- sprintf(AVDB, "%s/weekly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
break;
}
@@ -1113,23 +1113,23 @@ void Info(int dbtype)
Verbose("Gathering database info...\n");
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
switch(dbtype)
{
case DAILY:
- sprintf(AVDB, "%s/daily.db", LOCATION);
- sprintf(histfile, "%s/daily.hist", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
+ (void)snprintf(histfile, sizeof(histfile), "%s/daily.hist", LOCATION);
break;
case YEARLY:
- sprintf(AVDB, "%s/yearly.db", LOCATION);
- sprintf(histfile, "%s/yearly.hist", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
+ (void)snprintf(histfile, sizeof(histfile), "%s/yearly.hist", LOCATION);
break;
default: /* weekly */
- sprintf(AVDB, "%s/weekly.db", LOCATION);
- sprintf(histfile, "%s/weekly.hist", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
+ (void)snprintf(histfile, sizeof(histfile), "%s/weekly.hist", LOCATION);
break;
}
@@ -1231,25 +1231,25 @@ void Dump(FILE * fp, int dbtype)
int begin_time;
int total_time;
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
memset(str, 0, 256);
switch(dbtype)
{
case DAILY:
- sprintf(AVDB, "%s/daily.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
begin_time = MONDAY_MORNING;
total_time = ONE_DAY;
break;
case YEARLY:
- sprintf(AVDB, "%s/yearly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
begin_time = JANUARY_FIRST;
total_time = ONE_YEAR;
break;
default: /* weekly */
- sprintf(AVDB, "%s/weekly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
begin_time = MONDAY_MORNING;
total_time = ONE_WEEK;
break;
@@ -1365,7 +1365,7 @@ void Dump(FILE * fp, int dbtype)
for (NOW = begin_time; NOW < begin_time + total_time;
NOW += INTERVAL)
{
- sprintf(str, "%s", ctime(&NOW));
+ (void)snprintf(str, sizeof(str), "%s", ctime(&NOW));
timekey = ConvTimeKey2(str, dbtype);
memset(&value, 0, sizeof(value));
@@ -1423,9 +1423,9 @@ void Import(FILE * fp, int dbtype)
char begincommand[128], endcommand[128];
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
LOCALAV.expect = 0.0;
LOCALAV.var = 0.0;
@@ -1439,19 +1439,19 @@ void Import(FILE * fp, int dbtype)
{
case DAILY:
dumpcommand = "dailydump";
- sprintf(AVDB, "%s/daily.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/daily.db", LOCATION);
break;
case YEARLY:
dumpcommand = "yearlydump";
- sprintf(AVDB, "%s/yearly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/yearly.db", LOCATION);
break;
default: /* weekly */
dumpcommand = "weeklydump";
- sprintf(AVDB, "%s/weekly.db", LOCATION);
+ (void)snprintf(AVDB, CF_MAXVARSIZE-1, "%s/weekly.db", LOCATION);
break;
}
- sprintf(begincommand, "<%s>", dumpcommand);
- sprintf(endcommand, "/%s", dumpcommand);
+ (void)snprintf(begincommand, sizeof(begincommand), "<%s>", dumpcommand);
+ (void)snprintf(endcommand, sizeof(endcommand), "/%s", dumpcommand);
Verbose("Importing to database: %s\n", AVDB);
@@ -1561,7 +1561,7 @@ void Import(FILE * fp, int dbtype)
exit(1);
}
skip(&buffer);
- sprintf(temp, "</%s>", command);
+ (void)snprintf(temp, sizeof(temp), "</%s>", command);
if (strncmp(buffer, temp, strlen(temp)) != 0)
{
fprintf(stderr, "Couldn't find </%s>!\n", command);
@@ -1727,7 +1727,7 @@ void parse_entry(char **buffer)
exit(1);
}
skip(buffer);
- sprintf(temp, "</%s>", command);
+ (void)snprintf(temp, sizeof(temp), "</%s>", command);
if (strncmp(*buffer, temp, strlen(temp)) != 0)
{
fprintf(stderr, "Couldn't find </%s>!\n", command);
@@ -2044,7 +2044,7 @@ struct Average *GetCurrentAverage(char *
Debug("No previous value for time index %s\n", timekey);
}
- sprintf(str, "%s", ctime(&last_time));
+ (void)snprintf(str, sizeof(str), "%s", ctime(&last_time));
Verbose("time key for last update was %s\n", ConvTimeKey2(str, dbtype));
Verbose("comparing to current timekey %s\n", timekey);
if (strcmp(ConvTimeKey2(str, dbtype), timekey) != 0)
@@ -2438,12 +2438,12 @@ int ArmClasses(struct Average av, char *
if(cfenvd_compatible)
{
unlink(ENV_NEW);
- strcpy(temp1, NAME);
- strcat(temp1, "_");
+ (void)strlcpy(temp1, NAME, sizeof(temp1));
+ (void)strlcat(temp1, "_", sizeof(temp1));
temp2[0] = '_';
temp2[1] = '\0';
- strcat(temp2, NAME);
- strcat(temp2, "=");
+ (void)strlcat(temp2, NAME, sizeof(temp2));
+ (void)strlcat(temp2, "=", sizeof(temp2));
for (i=0; i<10; i++)
{
@@ -2518,21 +2518,21 @@ int SetClasses(char *name, double variab
Debug(" Sensitivity too high ..\n");
buffer[0] = '\0';
- strcpy(buffer, name);
+ (void)strlcpy(buffer, name, sizeof(buffer));
if ((delta > 0) && (ldelta > 0))
{
- strcat(buffer, "_high");
+ (void)strlcat(buffer, "_high", sizeof(buffer));
*code = -6;
}
else if ((delta < 0) && (ldelta < 0))
{
- strcat(buffer, "_low");
+ (void)strlcat(buffer, "_low", sizeof(buffer));
*code = -4;
}
else
{
- strcat(buffer, "_normal");
+ (void)strlcat(buffer, "_normal", sizeof(buffer));
*code = -5;
}
@@ -2542,8 +2542,8 @@ int SetClasses(char *name, double variab
if (dev > 2.0 * sqrt(2.0))
{
- strcpy(buffer2, buffer);
- strcat(buffer2, "_microanomaly");
+ (void)strlcpy(buffer2, buffer, sizeof(buffer2));
+ (void)strlcat(buffer2, "_microanomaly", sizeof(buffer2));
Debugging2("!! %s !!\n", buffer2);
*code += -10;
AppendItem(classlist,buffer2,"2");
@@ -2553,21 +2553,21 @@ int SetClasses(char *name, double variab
else
{
buffer[0] = '\0';
- strcpy(buffer, name);
+ (void)strlcpy(buffer, name, sizeof(buffer));
if ((delta > 0) && (ldelta > 0))
{
- strcat(buffer, "_high");
+ (void)strlcat(buffer, "_high", sizeof(buffer));
*code = -6;
}
else if ((delta < 0) && (ldelta < 0))
{
- strcat(buffer, "_low");
+ (void)strlcat(buffer, "_low", sizeof(buffer));
*code = -4;
}
else
{
- strcat(buffer, "_normal");
+ (void)strlcat(buffer, "_normal", sizeof(buffer));
*code = -5;
}
@@ -2577,16 +2577,16 @@ int SetClasses(char *name, double variab
if (dev <= sqrt(2.0))
{
- strcpy(buffer2, buffer);
- strcat(buffer2, "_normal");
+ (void)strlcpy(buffer2, buffer, sizeof(buffer2));
+ (void)strlcat(buffer2, "_normal", sizeof(buffer2));
Debugging2("!! %s !!\n", buffer2);
*code += -20;
AppendItem(classlist,buffer2,"0");
}
else
{
- strcpy(buffer2, buffer);
- strcat(buffer2, "_dev1");
+ (void)strlcpy(buffer2, buffer, sizeof(buffer2));
+ (void)strlcat(buffer2, "_dev1", sizeof(buffer2));
Debugging2("!! %s !!\n", buffer2);
*code += -30;
AppendItem(classlist,buffer2,"0");
@@ -2594,8 +2594,8 @@ int SetClasses(char *name, double variab
if (dev > 2.0*sqrt(2.0))
{
- strcpy(buffer2, buffer);
- strcat(buffer2, "_dev2");
+ (void)strlcpy(buffer2, buffer, sizeof(buffer2));
+ (void)strlcat(buffer2, "_dev2", sizeof(buffer2));
Debugging2("!! %s !!\n", buffer2);
*code += -10;
AppendItem(classlist,buffer2,"2");
@@ -2604,8 +2604,8 @@ int SetClasses(char *name, double variab
if (dev > 3.0*sqrt(2.0))
{
- strcpy(buffer2, buffer);
- strcat(buffer2, "_anomaly");
+ (void)strlcpy(buffer2, buffer, sizeof(buffer2));
+ (void)strlcat(buffer2, "_anomaly", sizeof(buffer2));
Debugging2("!! %s !!\n", buffer2);
*code += -10;
AppendItem(classlist,buffer2,"3");
@@ -2625,13 +2625,13 @@ void SetVariable(char *name,double value
{
char var[CF_BUFSIZE];
- sprintf(var,"value_%s=%d",name,(int)value);
+ (void)snprintf(var,sizeof(var),"value_%s=%d",name,(int)value);
AppendItem(classlist,var,"");
- sprintf(var,"average_%s=%1.1f",name,average);
+ (void)snprintf(var,sizeof(var),"average_%s=%1.1f",name,average);
AppendItem(classlist,var,"");
- sprintf(var,"stddev_%s=%1.1f",name,stddev);
+ (void)snprintf(var,sizeof(var),"stddev_%s=%1.1f",name,stddev);
AppendItem(classlist,var,"");
}
@@ -2762,11 +2762,11 @@ void DoBatch(int dbtype)
} else {
update_time = (time_t) timeint;
}
- strcpy(timebuf, ctime(&update_time));
+ (void)strlcpy(timebuf, ctime(&update_time), sizeof(timebuf));
Debug("- Time converted to %s, ", timebuf);
if(strcmp(timekey, ConvTimeKey2(timebuf, dbtype)) != 0)
k++;
- strcpy(timekey, ConvTimeKey2(timebuf, dbtype));
+ (void)strlcpy(timekey, ConvTimeKey2(timebuf, dbtype), sizeof(timekey));
Debug("then to %s\n", timekey);
if (feof(fp))
@@ -2961,7 +2961,7 @@ int OpenDatabase(int create)
char *GenTimeKey2(time_t now, int dbtype)
{
char str[64];
- sprintf(str, "%s", ctime(&now));
+ (void)snprintf(str, sizeof(str), "%s", ctime(&now));
return ConvTimeKey2(str, dbtype);
}
@@ -2986,10 +2986,10 @@ char *ConvTimeKey2(char *str, int dbtype
case DAILY:
break;
case YEARLY:
- sprintf(timekey, "%s%s:", buf2, buf3);
+ (void)snprintf(timekey, (64 * sizeof(char)), "%s%s:", buf2, buf3);
break;
default: /* weekly */
- sprintf(timekey, "%s:", buf1);
+ (void)snprintf(timekey, (64 * sizeof(char)), "%s:", buf1);
break;
}
@@ -2999,15 +2999,15 @@ char *ConvTimeKey2(char *str, int dbtype
timeinmins = 60*hr + min;
if(STEP == 1)
- sprintf(minbuf, "%04d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%04d", timeinmins / STEP );
else if (STEP < 15)
- sprintf(minbuf, "%03d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%03d", timeinmins / STEP );
else if (STEP < 145)
- sprintf(minbuf, "%02d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%02d", timeinmins / STEP );
else
- sprintf(minbuf, "%d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%d", timeinmins / STEP );
- strcat(timekey, minbuf);
+ (void)strlcat(timekey, minbuf, (64 * sizeof(char)));
return timekey;
}

View File

@ -0,0 +1,173 @@
$OpenBSD: patch-src_cfetoolgraph_c,v 1.1 2005/10/27 21:47:28 sturm Exp $
--- src/cfetoolgraph.c.orig Thu Jun 30 03:53:06 2005
+++ src/cfetoolgraph.c Fri Oct 21 16:35:55 2005
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
break;
case 'p':
- strcpy(PATHNAME,optarg);
+ (void)strlcpy(PATHNAME,optarg,sizeof(PATHNAME));
break;
case 'd':
@@ -161,9 +161,9 @@ int main(int argc, char **argv)
}
if(PATHNAME[0] != '\0')
- sprintf(LOCATION, "%s/%s", PATHNAME, NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "%s/%s", PATHNAME, NAME);
else
- sprintf(LOCATION, "./%s", NAME);
+ (void)snprintf(LOCATION, sizeof(LOCATION), "./%s", NAME);
if(daily) {
snprintf(FILENAME, CF_BUFSIZE, "%s/daily.db", LOCATION);
@@ -277,7 +277,7 @@ void ReadAverages(int dbtype)
memset(&value, 0, sizeof(value));
memset(&ENTRY, 0, sizeof(ENTRY));
- strcpy(TIMEKEY, GenTimeKey2(NOW, dbtype));
+ (void)strlcpy(TIMEKEY, GenTimeKey2(NOW, dbtype), sizeof(TIMEKEY));
key.data = TIMEKEY;
key.size = strlen(TIMEKEY) + 1;
@@ -397,13 +397,13 @@ void WriteGraphFiles(int dbtype)
switch(dbtype)
{
case DAILY:
- sprintf(DIRNAME, "%s/daily-%s", LOCATION, ctime(&NOW));
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/daily-%s", LOCATION, ctime(&NOW));
break;
case YEARLY:
- sprintf(DIRNAME, "%s/yearly-%s", LOCATION, ctime(&NOW));
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/yearly-%s", LOCATION, ctime(&NOW));
break;
default: /* weekly */
- sprintf(DIRNAME, "%s/weekly-%s", LOCATION, ctime(&NOW));
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/weekly-%s", LOCATION, ctime(&NOW));
break;
}
@@ -420,13 +420,13 @@ void WriteGraphFiles(int dbtype)
switch(dbtype)
{
case DAILY:
- sprintf(DIRNAME, "%s/daily-snapshot", LOCATION);
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/daily-snapshot", LOCATION);
break;
case YEARLY:
- sprintf(DIRNAME, "%s/yearly-snapshot", LOCATION);
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/yearly-snapshot", LOCATION);
break;
default: /* weekly */
- sprintf(DIRNAME, "%s/weekly-snapshot", LOCATION);
+ (void)snprintf(DIRNAME, sizeof(DIRNAME), "%s/weekly-snapshot", LOCATION);
break;
}
}
@@ -444,7 +444,7 @@ void WriteGraphFiles(int dbtype)
printf("Writing data to directory %s\n ", DIRNAME);
- sprintf(FLNAME, "%s/average", DIRNAME);
+ (void)snprintf(FLNAME, sizeof(FLNAME), "%s/average", DIRNAME);
if ((FPAV = fopen(FLNAME, "w")) == NULL)
{
@@ -452,7 +452,7 @@ void WriteGraphFiles(int dbtype)
exit(1);
}
- sprintf(FLNAME, "%s/stddev", DIRNAME);
+ (void)snprintf(FLNAME, sizeof(FLNAME), "%s/stddev", DIRNAME);
if ((FPVAR = fopen(FLNAME, "w")) == NULL)
{
@@ -460,7 +460,7 @@ void WriteGraphFiles(int dbtype)
exit(1);
}
- sprintf(FLNAME,"%s/graph", DIRNAME);
+ (void)snprintf(FLNAME,sizeof(FLNAME),"%s/graph", DIRNAME);
if ((FP = fopen(FLNAME,"w")) == NULL)
{
@@ -488,7 +488,7 @@ void WriteGraphFiles(int dbtype)
memset(&key, 0, sizeof(key));
memset(&value, 0, sizeof(value));
- strcpy(TIMEKEY, GenTimeKey2(NOW, dbtype));
+ (void)strlcpy(TIMEKEY, GenTimeKey2(NOW, dbtype), sizeof(TIMEKEY));
key.data = TIMEKEY;
key.size = strlen(TIMEKEY) + 1;
@@ -628,7 +628,7 @@ void WriteHistogram(int dbtype)
}
}
- sprintf(FLNAME, "%s/distr", DIRNAME);
+ (void)snprintf(FLNAME, sizeof(FLNAME), "%s/distr", DIRNAME);
if ((FPHIST = fopen(FLNAME, "w")) == NULL)
{
perror("fopen");
@@ -712,7 +712,7 @@ char *CanonifyName(char *str)
char *sp;
memset(buffer, 0, CF_BUFSIZE);
- strcpy(buffer, str);
+ (void)strlcpy(buffer, str, sizeof(buffer));
for (sp = buffer; *sp != '\0'; sp++)
{
@@ -786,7 +786,7 @@ struct Average FindHurstFunction(int sam
memset(&value, 0, sizeof(value));
memset(&ENTRY, 0, sizeof(ENTRY));
- strcpy(TIMEKEY, GenTimeKey2(NOW, dbtype));
+ (void)strlcpy(TIMEKEY, GenTimeKey2(NOW, dbtype), sizeof(TIMEKEY));
key.data = TIMEKEY;
key.size = strlen(TIMEKEY) + 1;
@@ -871,7 +871,7 @@ char *GenTimeKey2(time_t now, int dbtype
{
char str[64];
- sprintf(str, "%s", ctime(&now));
+ (void)snprintf(str, sizeof(str), "%s", ctime(&now));
return ConvTimeKey2(str, dbtype);
}
@@ -897,10 +897,10 @@ char *ConvTimeKey2(char *str, int dbtype
case DAILY:
break;
case YEARLY:
- sprintf(timekey, "%s%s:", buf2, buf3);
+ (void)snprintf(timekey, (64 * sizeof(char)), "%s%s:", buf2, buf3);
break;
default: /* weekly */
- sprintf(timekey, "%s:", buf1);
+ (void)snprintf(timekey, (64 * sizeof(char)), "%s:", buf1);
break;
}
@@ -910,15 +910,15 @@ char *ConvTimeKey2(char *str, int dbtype
timeinmins = 60*hr + min;
if(STEP == 1)
- sprintf(minbuf, "%04d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%04d", timeinmins / STEP );
else if (STEP < 15)
- sprintf(minbuf, "%03d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%03d", timeinmins / STEP );
else if (STEP < 145)
- sprintf(minbuf, "%02d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%02d", timeinmins / STEP );
else
- sprintf(minbuf, "%d", timeinmins / STEP );
+ (void)snprintf(minbuf, sizeof(minbuf), "%d", timeinmins / STEP );
- strcat(timekey, minbuf);
+ (void)strlcat(timekey, minbuf, (64 * sizeof(char)));
return timekey;
}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/cfexecd.c.orig Wed May 25 03:52:26 2005
+++ src/cfexecd.c Fri Jul 15 12:24:00 2005
$OpenBSD: patch-src_cfexecd_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/cfexecd.c.orig Wed Aug 10 13:25:08 2005
+++ src/cfexecd.c Fri Oct 21 16:35:55 2005
@@ -147,7 +147,7 @@ Banner("Check options");
NOSPLAY = false;
@ -38,7 +38,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
MAILTO[0] = '\0';
MAILFROM[0] = '\0';
@@ -555,7 +555,7 @@ for (ip = SCHEDULE; ip != NULL; ip = ip-
@@ -564,7 +564,7 @@ for (ip = SCHEDULE; ip != NULL; ip = ip-
DeleteItemList(VHEAP);
VHEAP = NULL;
GetNameInfo();
@ -47,7 +47,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return true;
}
}
@@ -563,7 +563,7 @@ for (ip = SCHEDULE; ip != NULL; ip = ip-
@@ -572,7 +572,7 @@ for (ip = SCHEDULE; ip != NULL; ip = ip-
DeleteItemList(VHEAP);
VHEAP = NULL;
GetNameInfo();
@ -56,7 +56,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return false;
}
@@ -971,7 +971,7 @@ if (!Dialogue(sd,NULL))
@@ -980,7 +980,7 @@ if (!Dialogue(sd,NULL))
goto mail_err;
}
@ -65,7 +65,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
if (!Dialogue(sd,VBUFF))
@@ -981,7 +981,7 @@ if (!Dialogue(sd,VBUFF))
@@ -990,7 +990,7 @@ if (!Dialogue(sd,VBUFF))
if (strlen(MAILFROM) > 0)
{
@ -74,7 +74,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
}
else
@@ -991,12 +991,12 @@ else
@@ -1000,12 +1000,12 @@ else
if (strlen(domain) > 0)
{
@ -89,7 +89,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
}
}
@@ -1006,7 +1006,7 @@ if (!Dialogue(sd,VBUFF))
@@ -1015,7 +1015,7 @@ if (!Dialogue(sd,VBUFF))
goto mail_err;
}
@ -98,7 +98,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
if (!Dialogue(sd,VBUFF))
@@ -1021,12 +1021,12 @@ if (!Dialogue(sd,"DATA\r\n"))
@@ -1030,12 +1030,12 @@ if (!Dialogue(sd,"DATA\r\n"))
if (anomaly)
{
@ -113,7 +113,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
}
@@ -1042,18 +1042,18 @@ sent=send(sd,VBUFF,strlen(VBUFF),0);
@@ -1051,18 +1051,18 @@ sent=send(sd,VBUFF,strlen(VBUFF),0);
if (strlen(MAILFROM) == 0)
{
@ -123,8 +123,8 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
else
{
- sprintf(VBUFF,"From: cfengine@%s\r\n",VFQNAME);
+ (void)snprintf(VBUFF,sizeof(VBUFF),"From: cfengine@%s\r\n",VFQNAME);
- sprintf(VBUFF,"From: %s\r\n",MAILFROM);
+ (void)snprintf(VBUFF,sizeof(VBUFF),"From: %s\r\n",MAILFROM);
Debug("%s",VBUFF);
}
@ -135,7 +135,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
Debug("%s",VBUFF);
sent=send(sd,VBUFF,strlen(VBUFF),0);
@@ -1066,14 +1066,14 @@ while(!feof(fp))
@@ -1075,14 +1075,14 @@ while(!feof(fp))
if (strlen(VBUFF) > 0)
{
VBUFF[strlen(VBUFF)-1] = '\r';
@ -152,7 +152,7 @@ $OpenBSD: patch-src_cfexecd_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
sent=send(sd,VBUFF,strlen(VBUFF),0);
break;
}
@@ -1095,7 +1095,7 @@ mail_err:
@@ -1104,7 +1104,7 @@ mail_err:
fclose(fp);
close(sd);

View File

@ -0,0 +1,39 @@
$OpenBSD: patch-src_cflex_l,v 1.1 2005/10/27 21:47:28 sturm Exp $
--- src/cflex.l.orig Sat Oct 1 08:34:22 2005
+++ src/cflex.l Fri Oct 21 16:35:55 2005
@@ -235,7 +235,7 @@ editfiles: {
{lforcearrow} {
Debug1("LFARROW %s\n",yytext);
- strcpy(LINKFROM,CURRENTOBJECT);
+ (void)strlcpy(LINKFROM,CURRENTOBJECT,CF_BUFSIZE);
ACTION_IS_LINKCHILDREN = true;
FORCELINK='y';
return LARROW;
@@ -244,7 +244,7 @@ editfiles: {
{forcearrow} {
Debug1("FARROW %s\n",yytext);
- strcpy(LINKFROM,CURRENTOBJECT);
+ (void)strlcpy(LINKFROM,CURRENTOBJECT,CF_BUFSIZE);
ACTION_IS_LINK = true;
FORCELINK='y';
return ARROW;
@@ -252,7 +252,7 @@ editfiles: {
{arrow} {
Debug1("ARROW %s\n",yytext);
- strcpy(LINKFROM,CURRENTOBJECT);
+ (void)strlcpy(LINKFROM,CURRENTOBJECT,CF_BUFSIZE);
ACTION_IS_LINK = true;
FORCELINK='n';
return ARROW;
@@ -261,7 +261,7 @@ editfiles: {
{larrow} {
Debug1("LARROW %s\n",yytext);
- strcpy(LINKFROM,CURRENTOBJECT);
+ (void)strlcpy(LINKFROM,CURRENTOBJECT,CF_BUFSIZE);
ACTION_IS_LINKCHILDREN = true;
FORCELINK='n';
return LARROW;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
--- src/cfrun.c.orig Tue Feb 8 06:50:01 2005
+++ src/cfrun.c Fri Jul 15 12:24:01 2005
@@ -233,7 +233,7 @@ for (i = 1; i < argc; i++)
$OpenBSD: patch-src_cfrun_c,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- src/cfrun.c.orig Wed Aug 10 05:01:17 2005
+++ src/cfrun.c Thu Oct 27 23:06:44 2005
@@ -234,7 +234,7 @@ for (i = 1; i < argc; i++)
/* XXX Initialize workdir for non privileged users */
@ -10,7 +10,7 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
if (getuid() > 0)
{
@@ -241,7 +241,7 @@ for (i = 1; i < argc; i++)
@@ -242,7 +242,7 @@ for (i = 1; i < argc; i++)
if ((homedir = getenv("HOME")) != NULL)
{
strncpy(CFWORKDIR,homedir,CF_BUFSIZE-16);
@ -19,7 +19,7 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
}
}
@@ -254,14 +254,15 @@ for (i = 1; i < argc; i++)
@@ -255,14 +255,15 @@ for (i = 1; i < argc; i++)
Debug("FQNAME = %s, WORKDIR = %s\n",VFQNAME,WORKDIR);
@ -38,7 +38,7 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
OpenSSL_add_all_algorithms();
ERR_load_crypto_strings();
@@ -295,7 +296,7 @@ CONN = NewAgentConn();
@@ -296,7 +297,7 @@ CONN = NewAgentConn();
if (storeinfile)
{
@ -64,12 +64,21 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
}
}
-strcat(filename,VCFRUNHOSTS);
+(void)strlcat(filename,VCFRUNHOSTS,sizeof(filename));
-strcat(filename,cfg_fic);
+(void)strlcat(filename,cfg_fic,sizeof(filename));
if ((fp = fopen(filename,"r")) == NULL) /* Open root file */
{
@@ -705,8 +706,8 @@ while (!feof(fp))
@@ -603,7 +604,7 @@ while (!feof(fp))
if (strncmp(line,"hostnamekeys",6) == 0)
{
- char buf[16];
+ char buf[296];
buf[0] = '\0';
sscanf(line,"hostnamekeys = %295[^# \n]",buf);
Verbose("Hostname keys\n");
@@ -714,8 +715,8 @@ while (!feof(fp))
if ((!strstr(buffer,".")) && (strlen(VDOMAIN) > 0))
{
@ -80,7 +89,7 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
}
if (!IsItemIn(VCFRUNHOSTLIST,buffer))
@@ -764,8 +765,8 @@ for (ip = VCFRUNCLASSES; ip != NULL; ip
@@ -773,8 +774,8 @@ for (ip = VCFRUNCLASSES; ip != NULL; ip
memset(sendbuffer,0,CF_BUFSIZE);
}
@ -91,7 +100,7 @@ $OpenBSD: patch-src_cfrun_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
sp += strlen(ip->name)+1;
used += strlen(ip->name)+1;
@@ -784,7 +785,7 @@ if (used + strlen(CFD_TERMINATOR) +2 > C
@@ -793,7 +794,7 @@ if (used + strlen(CFD_TERMINATOR) +2 > C
memset(sendbuffer,0,CF_BUFSIZE);
}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
--- src/cfservd.c.orig Wed May 25 09:58:03 2005
+++ src/cfservd.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_cfservd_c,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- src/cfservd.c.orig Thu Sep 22 15:57:18 2005
+++ src/cfservd.c Fri Oct 21 16:35:55 2005
@@ -171,10 +171,10 @@ void CheckOptsAndInit(int argc,char **ar
int c;
@ -43,7 +43,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
VCANONICALFILE = strdup(CanonifyName(VINPUTFILE));
VREPOSITORY = strdup("\0");
@@ -1047,7 +1047,7 @@ if (CFDSTARTTIME < newstat.st_mtime)
@@ -1057,7 +1057,7 @@ if (CFDSTARTTIME < newstat.st_mtime)
DeleteItemList(VIMPORT);
DeleteAuthList(VADMIT);
DeleteAuthList(VDENY);
@ -52,7 +52,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
VADMIT = VADMITTOP = NULL;
VDENY = VDENYTOP = NULL;
@@ -1427,7 +1427,7 @@ switch (GetCommand(recvbuffer))
@@ -1437,7 +1437,7 @@ switch (GetCommand(recvbuffer))
if ((tloc = time((time_t *)NULL)) == -1)
{
@ -61,7 +61,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
CfLog(cfinform,conn->output,"time");
SendTransaction(conn->sd_reply,"BAD: clocks out of synch",0,CF_DONE);
return true;
@@ -1492,7 +1492,7 @@ switch (GetCommand(recvbuffer))
@@ -1502,7 +1502,7 @@ switch (GetCommand(recvbuffer))
}
@ -70,7 +70,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
CfLog(cfinform,"Closing connection\n","");
return false;
@@ -1600,7 +1600,7 @@ if ((CFSTARTTIME = time((time_t *)NULL))
@@ -1610,7 +1610,7 @@ if ((CFSTARTTIME = time((time_t *)NULL))
if (GetMacroValue(CONTEXTID,"cfrunCommand") == NULL)
{
Verbose("cfservd exec request: no cfrunCommand defined\n");
@ -79,7 +79,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
return;
}
@@ -1641,8 +1641,8 @@ else
@@ -1651,8 +1651,8 @@ else
{
if ((args != NULL) & (strlen(args) > 0))
{
@ -90,7 +90,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
snprintf(sendbuffer,CF_BUFSIZE,"cfservd Executing %s\n",ebuff);
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
@@ -2551,7 +2551,7 @@ if (S_ISLNK(statbuf.st_mode))
@@ -2568,7 +2568,7 @@ if (S_ISLNK(statbuf.st_mode))
if (readlink(filename,linkbuf,CF_BUFSIZE-1) == -1)
{
@ -99,7 +99,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,sendbuffer,"readlink");
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
return -1;
@@ -2654,12 +2654,12 @@ SendTransaction(conn->sd_reply,sendbuffe
@@ -2671,12 +2671,12 @@ SendTransaction(conn->sd_reply,sendbuffe
if (cfst.cf_readlink != NULL)
{
@ -115,7 +115,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
}
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
@@ -2861,13 +2861,13 @@ memset(sendbuffer,0,CF_BUFSIZE);
@@ -2878,13 +2878,13 @@ memset(sendbuffer,0,CF_BUFSIZE);
if (ChecksumChanged(filename,digest,cfverbose,true,'m'))
{
@ -131,7 +131,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
Debug("Checksums matched ok\n");
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
}
@@ -2885,7 +2885,7 @@ Debug("CfOpenDirectory(%s)\n",dirname);
@@ -2902,7 +2902,7 @@ Debug("CfOpenDirectory(%s)\n",dirname);
if (*dirname != '/')
{
@ -140,7 +140,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
SendTransaction(conn->sd_reply,sendbuffer,0,CF_DONE);
return -1;
}
@@ -2917,7 +2917,7 @@ for (dirp = readdir(dirh); dirp != NULL;
@@ -2934,7 +2934,7 @@ for (dirp = readdir(dirh); dirp != NULL;
offset += strlen(dirp->d_name) + 1; /* + zero byte separator */
}
@ -149,7 +149,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
SendTransaction(conn->sd_reply,sendbuffer,offset+2+strlen(CFD_TERMINATOR),CF_DONE);
Debug("END CfOpenDirectory(%s)\n",dirname);
closedir(dirh);
@@ -2932,7 +2932,7 @@ void Terminate(int sd)
@@ -2949,7 +2949,7 @@ void Terminate(int sd)
memset(buffer,0,CF_BUFSIZE);
@ -158,7 +158,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
if (SendTransaction(sd,buffer,strlen(buffer)+1,CF_DONE) == -1)
{
@@ -3151,7 +3151,7 @@ Debug("Checking to see if we have seen t
@@ -3168,7 +3168,7 @@ Debug("Checking to see if we have seen t
if ((errno = db_create(&dbp,NULL,0)) != 0)
{
@ -167,7 +167,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return false;
}
@@ -3162,7 +3162,7 @@ if ((errno = dbp->open(dbp,keydb,NULL,DB
@@ -3179,7 +3179,7 @@ if ((errno = dbp->open(dbp,keydb,NULL,DB
if ((errno = dbp->open(dbp,NULL,keydb,NULL,DB_BTREE,DB_CREATE,0644)) != 0)
#endif
{
@ -176,7 +176,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return false;
}
@@ -3235,7 +3235,7 @@ if ((DHCPLIST != NULL) && IsFuzzyItemIn(
@@ -3252,7 +3252,7 @@ if ((DHCPLIST != NULL) && IsFuzzyItemIn(
if ((errno = db_create(&dbp,NULL,0)) != 0)
{
@ -185,7 +185,7 @@ $OpenBSD: patch-src_cfservd_c,v 1.3 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"db_open");
return;
}
@@ -3246,7 +3246,7 @@ if ((DHCPLIST != NULL) && IsFuzzyItemIn(
@@ -3263,7 +3263,7 @@ if ((DHCPLIST != NULL) && IsFuzzyItemIn(
if ((errno = dbp->open(dbp,NULL,keydb,NULL,DB_BTREE,DB_CREATE,0644)) != 0)
#endif
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/do.c.orig Sun May 29 06:21:19 2005
+++ src/do.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_do_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/do.c.orig Thu Sep 8 16:31:21 2005
+++ src/do.c Fri Oct 21 16:35:55 2005
@@ -76,9 +76,9 @@ for (ip = VMOUNTLIST; ip != NULL; ip=ip-
continue;
}
@ -89,7 +89,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
ExpandWildCardsAndDo(pathbuff,basename,DirectoriesWrapper,ptr);
}
@@ -634,7 +634,7 @@ if (strcmp(VDEFAULTBINSERVER.name,mailho
@@ -636,7 +636,7 @@ if (strcmp(VDEFAULTBINSERVER.name,mailho
return;
}
@ -98,7 +98,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (IsItemIn(VMOUNTED,lmailpath)) /* Remote file system mounted on */
@@ -644,9 +644,9 @@ if (IsItemIn(VMOUNTED,lmailpath))
@@ -646,9 +646,9 @@ if (IsItemIn(VMOUNTED,lmailpath))
return;
}
@ -110,7 +110,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
MakeDirectoriesFor(mailserver,'n'); /* Check directory is in place */
@@ -714,9 +714,9 @@ if (always || (strncmp(VMAILSERVER,VFQNA
@@ -716,9 +716,9 @@ if (always || (strncmp(VMAILSERVER,VFQNA
continue;
}
@ -122,7 +122,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (stat(VBUFF,&statbuf) != -1)
{
@@ -1191,9 +1191,9 @@ if (!IsPrivileged())
@@ -1194,9 +1194,9 @@ if (!IsPrivileged())
}
pathbuff[0]='\0';
basename[0]='\0';
@ -134,7 +134,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
ExpandWildCardsAndDo(pathbuff,basename,RecHomeTidyWrapper,NULL);
}
@@ -1430,6 +1430,7 @@ void GetSetuidLog()
@@ -1434,6 +1434,7 @@ void GetSetuidLog()
struct Item *ip;
FILE *fp;
char *sp;
@ -142,7 +142,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (!IsPrivileged()) /* Ignore this if not root */
{
@@ -1456,7 +1457,8 @@ else
@@ -1460,7 +1461,8 @@ else
FatalError("GetSetuidList() couldn't allocate memory #1");
}
@ -152,7 +152,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
{
perror("malloc");
FatalError("GetSetuidList() couldn't allocate memory #2");
@@ -1473,7 +1475,7 @@ else
@@ -1477,7 +1479,7 @@ else
Debug2("SETUID-LOG: %s\n",VBUFF);
@ -161,7 +161,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
ip->name = sp;
ip->next = NULL;
filetop = ip;
@@ -1762,7 +1764,7 @@ for (dp = VDISABLELIST; dp != NULL; dp=d
@@ -1768,7 +1770,7 @@ for (dp = VDISABLELIST; dp != NULL; dp=d
}
else
{
@ -170,7 +170,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
ChopLastNode(path);
AddSlash(path);
if (BufferOverflow(path,dp->destination))
@@ -1773,13 +1775,13 @@ for (dp = VDISABLELIST; dp != NULL; dp=d
@@ -1779,13 +1781,13 @@ for (dp = VDISABLELIST; dp != NULL; dp=d
ReleaseCurrentLock();
continue;
}
@ -187,7 +187,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
snprintf(OUTPUT,CF_BUFSIZE*2,"Disabling/renaming file %s to %s (pending repository move)\n",workname,path);
@@ -1907,15 +1909,15 @@ for (mp = VMOUNTABLES; mp != NULL; mp=mp
@@ -1913,15 +1915,15 @@ for (mp = VMOUNTABLES; mp != NULL; mp=mp
Debug("Mount: checking %s\n",mp->filesystem);
@ -206,7 +206,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
if (strcmp(host,VDEFAULTBINSERVER.name) == 0) /* A host never mounts itself nfs */
@@ -1927,11 +1929,11 @@ for (mp = VMOUNTABLES; mp != NULL; mp=mp
@@ -1933,11 +1935,11 @@ for (mp = VMOUNTABLES; mp != NULL; mp=mp
/* HvB: Bas van der Vlies */
if ( mp->readonly )
{
@ -220,7 +220,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
if (IsHomeDir(mountdir))
@@ -2001,15 +2003,15 @@ for (mp = VMISCMOUNT; mp != NULL; mp=mp-
@@ -2007,15 +2009,15 @@ for (mp = VMISCMOUNT; mp != NULL; mp=mp-
mp->done = 'y';
}
@ -239,7 +239,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
if (strcmp(host,VDEFAULTBINSERVER.name) == 0) /* A host never mounts itself nfs */
@@ -2163,8 +2165,8 @@ for (ptr=VUNMOUNT; ptr != NULL; ptr=ptr-
@@ -2170,8 +2172,8 @@ for (ptr=VUNMOUNT; ptr != NULL; ptr=ptr-
{
if (VSYSTEMHARDCLASS == aix)
{
@ -250,7 +250,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
item = LocateNextItemContaining(filelist,VBUFF);
@@ -2188,8 +2190,8 @@ for (ptr=VUNMOUNT; ptr != NULL; ptr=ptr-
@@ -2195,8 +2197,8 @@ for (ptr=VUNMOUNT; ptr != NULL; ptr=ptr-
if (VSYSTEMHARDCLASS == ultrx) /* ensure name is not just a substring */
{
@ -261,7 +261,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
DeleteItemContaining(&filelist,VBUFF);
}
else
@@ -2568,14 +2570,14 @@ for (ip = VTIMEZONE; ip != NULL; ip=ip->
@@ -2577,14 +2579,14 @@ for (ip = VTIMEZONE; ip != NULL; ip=ip->
#ifdef NT
tzset();
@ -278,7 +278,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
#else
@@ -2583,7 +2585,7 @@ for (ip = VTIMEZONE; ip != NULL; ip=ip->
@@ -2592,7 +2594,7 @@ for (ip = VTIMEZONE; ip != NULL; ip=ip->
{
printf("Couldn't read system clock\n\n");
}
@ -287,7 +287,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
#endif /* SUN4 */
#endif /* AOS */
@@ -2739,8 +2741,8 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->n
@@ -2750,8 +2752,8 @@ for (ptr = VPKG; ptr != NULL; ptr=ptr->n
}
/* Finally add the name to the list. */
@ -298,7 +298,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
}
@@ -2878,14 +2880,14 @@ if (S_ISDIR(statbuf.st_mode))
@@ -2890,14 +2892,14 @@ if (S_ISDIR(statbuf.st_mode))
filecount++;
@ -316,7 +316,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (lstat(buff,&localstat) == -1)
{
@@ -2913,14 +2915,14 @@ if (S_ISDIR(statbuf.st_mode))
@@ -2925,14 +2927,14 @@ if (S_ISDIR(statbuf.st_mode))
if (sizeinbytes < SENSIBLEFSSIZE)
{
@ -333,7 +333,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,OUTPUT,"");
return(false);
}
@@ -2968,7 +2970,7 @@ for (dirp = readdir(dirh); dirp != NULL;
@@ -2980,7 +2982,7 @@ for (dirp = readdir(dirh); dirp != NULL;
continue;
}
@ -342,7 +342,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
AddSlash(pcwd);
if (BufferOverflow(pcwd,dirp->d_name))
@@ -2977,7 +2979,7 @@ for (dirp = readdir(dirh); dirp != NULL;
@@ -2989,7 +2991,7 @@ for (dirp = readdir(dirh); dirp != NULL;
return true;
}
@ -351,7 +351,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (lstat(dirp->d_name,&statbuf) == -1)
{
@@ -3021,9 +3023,9 @@ void InstallMountedItem(char *host,char
@@ -3033,9 +3035,9 @@ void InstallMountedItem(char *host,char
{ char buf[CF_BUFSIZE];
@ -364,7 +364,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (IsItemIn(VMOUNTED,buf))
{
@@ -3126,16 +3128,16 @@ if (MatchStringInFstab(mountpt))
@@ -3138,16 +3140,16 @@ if (MatchStringInFstab(mountpt))
CfLog(cfinform,"---------------------------------------------------","");
/* delete current fstab entry and unmount if necessary */
@ -385,7 +385,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
/* delete current fstab entry and unmount if necessary (don't rmdir) */
cleaner.name = mountspec;
@@ -3284,14 +3286,14 @@ for (ip1 = VHOMEPATLIST; ip1 != NULL; ip
@@ -3296,14 +3298,14 @@ for (ip1 = VHOMEPATLIST; ip1 != NULL; ip
}
pathbuff[0]='\0';
basename[0]='\0';
@ -403,7 +403,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
AddSlash(pathbuff);
if (*(ptr->path+4) != '/')
@@ -3302,7 +3304,7 @@ for (ip1 = VHOMEPATLIST; ip1 != NULL; ip
@@ -3314,7 +3316,7 @@ for (ip1 = VHOMEPATLIST; ip1 != NULL; ip
}
else
{
@ -412,7 +412,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
ExpandWildCardsAndDo(pathbuff,basename,RecFileCheck,ptr);
@@ -3337,7 +3339,7 @@ void EditItemsInResolvConf(struct Item *
@@ -3349,7 +3351,7 @@ void EditItemsInResolvConf(struct Item *
}
else
{
@ -421,7 +421,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
DeleteItemMatching(list,buf); /* del+prep = move to head of list */
@@ -3409,7 +3411,7 @@ if (strlen(extract) == 0)
@@ -3421,7 +3423,7 @@ if (strlen(extract) == 0)
{
if (isdir)
{
@ -430,7 +430,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
(*function)(buffer,argptr);
return;
@@ -3417,20 +3419,20 @@ if (strlen(extract) == 0)
@@ -3429,20 +3431,20 @@ if (strlen(extract) == 0)
if (! IsWildCard(extract))
{
@ -454,7 +454,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if ((dirh=opendir(buffer)) == NULL)
{
@@ -3440,7 +3442,7 @@ else
@@ -3452,7 +3454,7 @@ else
}
count = 0;
@ -463,7 +463,7 @@ $OpenBSD: patch-src_do_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
for (dp = readdir(dirh); dp != 0; dp = readdir(dirh))
{
@@ -3450,8 +3452,8 @@ else
@@ -3462,8 +3464,8 @@ else
}
count++;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_edittools_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/edittools.c.orig Tue Feb 8 06:50:01 2005
+++ src/edittools.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_edittools_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/edittools.c.orig Thu Jun 30 06:05:48 2005
+++ src/edittools.c Fri Oct 21 16:35:55 2005
@@ -74,7 +74,7 @@ for (dirp = readdir(dirh); dirp != NULL;
continue;
}
@ -65,7 +65,7 @@ $OpenBSD: patch-src_edittools_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (!FileObjectFilter(realname,&statbuf2,ptr->filters,editfiles))
{
@@ -405,8 +405,8 @@ NUMBEROFEDITS = 0;
@@ -406,8 +406,8 @@ NUMBEROFEDITS = 0;
EDITVERBOSE = VERBOSE;
CURRENTLINENUMBER = 1;
CURRENTLINEPTR = filestart;
@ -76,7 +76,7 @@ $OpenBSD: patch-src_edittools_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
EDITGROUPLEVEL = 0;
SEARCHREPLACELEVEL = 0;
FOREACHLEVEL = 0;
@@ -1354,6 +1354,7 @@ return true;
@@ -1355,6 +1355,7 @@ return true;
int ReplaceEditLineWith (char *string)
{ char *sp;
@ -84,7 +84,7 @@ $OpenBSD: patch-src_edittools_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (strcmp(string,CURRENTLINEPTR->name) == 0)
{
@@ -1361,14 +1362,15 @@ if (strcmp(string,CURRENTLINEPTR->name)
@@ -1362,14 +1363,15 @@ if (strcmp(string,CURRENTLINEPTR->name)
return true;
}
@ -102,7 +102,7 @@ $OpenBSD: patch-src_edittools_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
free (CURRENTLINEPTR->name);
CURRENTLINEPTR->name = sp;
NUMBEROFEDITS++;
@@ -2077,10 +2079,10 @@ int SaveBinaryFile(char *file,off_t size
@@ -2078,10 +2080,10 @@ int SaveBinaryFile(char *file,off_t size
Debug("SaveBinaryFile(%s,%d)\n",file,size);
Verbose("Saving %s\n",file);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
--- src/functions.c.orig Sat Apr 9 11:02:50 2005
+++ src/functions.c Fri Jul 15 12:24:01 2005
@@ -221,13 +221,13 @@ switch (fn = FunctionStringToCode(name))
$OpenBSD: patch-src_functions_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/functions.c.orig Sat Aug 13 15:10:56 2005
+++ src/functions.c Fri Oct 21 16:35:55 2005
@@ -247,13 +247,13 @@ switch (fn = FunctionStringToCode(name))
{
if (strcmp(value,CF_NOCLASS) == 0)
{
@ -17,7 +17,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return value;
}
}
@@ -321,46 +321,46 @@ FunctionArgs(args,argv,1);
@@ -347,46 +347,46 @@ FunctionArgs(args,argv,1);
if (lstat(args,&statbuf) == -1)
{
@ -71,7 +71,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -375,7 +375,7 @@ if (strchr(args,','))
@@ -401,7 +401,7 @@ if (strchr(args,','))
return;
}
@ -80,7 +80,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (!FuzzyMatchParse(args))
{
@@ -390,7 +390,7 @@ for (ip = IPADDRESSES; ip != NULL; ip =
@@ -416,7 +416,7 @@ for (ip = IPADDRESSES; ip != NULL; ip =
if (FuzzySetMatch(args,ip->name) == 0)
{
Debug("IPRange Matched\n");
@ -89,7 +89,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
}
@@ -401,12 +401,12 @@ Debug("Checking IP Range against RDNS %s
@@ -427,12 +427,12 @@ Debug("Checking IP Range against RDNS %s
if (FuzzySetMatch(args,VIPADDRESS) == 0)
{
Debug("IPRange Matched\n");
@ -104,7 +104,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -419,7 +419,7 @@ Debug("SRDEBUG args=%s value=%s\n",args,
@@ -445,7 +445,7 @@ Debug("SRDEBUG args=%s value=%s\n",args,
if (!FuzzyHostParse(args))
{
@ -112,8 +112,8 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
+ (void)strlcpy(value,CF_NOCLASS,CF_EXPANDSIZE);
return;
}
/* VDEFAULTBINSERVER.name is relative domain name */
@@ -428,12 +428,12 @@ if (!FuzzyHostParse(args))
@@ -455,12 +455,12 @@ if (!FuzzyHostParse(args))
if (FuzzyHostMatch(args,VDEFAULTBINSERVER.name) == 0)
{
Debug("SRDEBUG SUCCESS!\n");
@ -128,8 +128,8 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
return;
@@ -447,7 +447,7 @@ void HandleCompareStat(enum builtin fn,c
char argv[CF_MAXFARGS][CF_MAXVARSIZE];
@@ -474,7 +474,7 @@ void HandleCompareStat(enum builtin fn,c
char argv[CF_MAXFARGS][CF_EXPANDSIZE];
FunctionArgs(args,argv,2);
-strcpy(value,CF_NOCLASS);
@ -137,7 +137,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
if (stat(argv[0],&frombuf) == -1)
{
@@ -464,7 +464,7 @@ switch(fn)
@@ -491,7 +491,7 @@ switch(fn)
case fn_newerthan:
if (frombuf.st_mtime < tobuf.st_mtime)
{
@ -146,7 +146,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
break;
@@ -472,7 +472,7 @@ switch(fn)
@@ -499,7 +499,7 @@ switch(fn)
case fn_accessedbefore:
if (frombuf.st_atime < tobuf.st_atime)
{
@ -155,7 +155,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
break;
@@ -480,13 +480,13 @@ switch(fn)
@@ -507,13 +507,13 @@ switch(fn)
case fn_changedbefore:
if (frombuf.st_ctime < tobuf.st_ctime)
{
@ -171,7 +171,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
@@ -533,7 +533,7 @@ if (*args == '/')
@@ -560,7 +560,7 @@ if (*args == '/')
if (ShellCommandReturnsZero(command))
{
@ -180,7 +180,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
}
@@ -542,7 +542,7 @@ if (*args == '/')
@@ -569,7 +569,7 @@ if (*args == '/')
yyerror("ExecResult(/command) must specify an absolute path");
}
@ -189,7 +189,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
@@ -560,11 +560,11 @@ Debug("HandleIsDefined(%s)\n",args);
@@ -587,11 +587,11 @@ Debug("HandleIsDefined(%s)\n",args);
if (GetMacroValue(CONTEXTID,args))
{
@ -203,7 +203,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -580,7 +580,7 @@ value[0] = '\0';
@@ -607,7 +607,7 @@ value[0] = '\0';
if (PARSING)
{
@ -212,7 +212,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
@@ -634,11 +634,11 @@ FunctionArgs(args,argv,2);
@@ -661,11 +661,11 @@ FunctionArgs(args,argv,2);
if (strcmp(argv[0],argv[1]) == 0)
{
@ -226,7 +226,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
}
@@ -662,11 +662,11 @@ if ((a != CF_NOVAL) && (b != CF_NOVAL))
@@ -689,11 +689,11 @@ if ((a != CF_NOVAL) && (b != CF_NOVAL))
{
if (a > b)
{
@ -240,7 +240,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
return;
}
@@ -674,11 +674,11 @@ if ((a != CF_NOVAL) && (b != CF_NOVAL))
@@ -701,11 +701,11 @@ if ((a != CF_NOVAL) && (b != CF_NOVAL))
{
if (a < b)
{
@ -254,7 +254,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
return;
}
@@ -690,22 +690,22 @@ if (strcmp(argv[0],argv[1]) > 0)
@@ -717,22 +717,22 @@ if (strcmp(argv[0],argv[1]) > 0)
{
if (ch == '+')
{
@ -281,7 +281,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
}
}
@@ -731,11 +731,11 @@ ret = LocateNextItemMatching(list,argv[0
@@ -760,11 +760,11 @@ ret = LocateNextItemMatching(list,argv[0
if (ret != NULL)
{
@ -295,7 +295,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
DeleteItemList(list);
@@ -1080,7 +1080,7 @@ first[0] = '\0';
@@ -1169,7 +1169,7 @@ first[0] = '\0';
if (psize < 2)
{
@ -304,7 +304,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,"Partitioning of size < 2 is silly","");
return;
}
@@ -1089,7 +1089,7 @@ Verbose("Searching for my peer group in
@@ -1178,7 +1178,7 @@ Verbose("Searching for my peer group in
if (!((strcmp("random",policy) == 0) || (strcmp("first",policy) == 0)))
{
@ -313,7 +313,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,"Partition leader policy is first/random only","");
return;
}
@@ -1244,7 +1244,7 @@ value[0] = '\0';
@@ -1333,7 +1333,7 @@ value[0] = '\0';
if (psize < 2)
{
@ -322,7 +322,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,"Partitioning of size < 2 is silly","");
return;
}
@@ -1253,7 +1253,7 @@ Verbose("Searching for my peer group nei
@@ -1342,7 +1342,7 @@ Verbose("Searching for my peer group nei
if (!(strcmp("random",policy) == 0 || strcmp("first",policy) == 0))
{
@ -331,7 +331,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
CfLog(cferror,"Partition leader policy is first/random only","");
return;
}
@@ -1376,7 +1376,7 @@ for (ip = SplitStringAsItemList(args,','
@@ -1465,7 +1465,7 @@ for (ip = SplitStringAsItemList(args,','
AppendItem(&METHODRETURNVARS,ip->name,CLASSBUFF);
}
@ -340,7 +340,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -1392,7 +1392,7 @@ for (ip = SplitStringAsItemList(args,','
@@ -1481,7 +1481,7 @@ for (ip = SplitStringAsItemList(args,','
AppendItem(&METHODRETURNCLASSES,args,CLASSBUFF);
}
@ -349,7 +349,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -1418,7 +1418,7 @@ Debug("ShowState(%s)\n",args);
@@ -1507,7 +1507,7 @@ Debug("ShowState(%s)\n",args);
if (PARSING)
{
@ -358,7 +358,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
@@ -1604,12 +1604,12 @@ if (stat(buffer,&statbuf) == 0)
@@ -1693,12 +1693,12 @@ if (stat(buffer,&statbuf) == 0)
printf("%s: -----------------------------------------------------------------------------------\n",VPREFIX);
snprintf(buffer,CF_BUFSIZE,"State of %s peaked at %s\n",args,ctime(&statbuf.st_mtime));
@ -373,7 +373,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
DeleteItemList(addresses);
@@ -1636,7 +1636,7 @@ FunctionArgs(args,argv,1);
@@ -1725,7 +1725,7 @@ FunctionArgs(args,argv,1);
if (PARSING)
{
@ -382,7 +382,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
return;
}
@@ -1647,7 +1647,7 @@ if (time >= 0)
@@ -1736,7 +1736,7 @@ if (time >= 0)
CheckFriendConnections(time);
}
@ -391,7 +391,7 @@ $OpenBSD: patch-src_functions_c,v 1.4 2005/07/21 15:16:46 aanriot Exp $
}
/*********************************************************************/
@@ -1721,11 +1721,11 @@ Debug("PrepModule(%s,%s)\n",argv[0],argv
@@ -1810,11 +1810,11 @@ Debug("PrepModule(%s,%s)\n",argv[0],argv
if (CheckForModule(argv[0],argv[1]))
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_ifconf_c,v 1.2 2005/07/21 15:16:46 aanriot Exp $
--- src/ifconf.c.orig Fri Mar 18 12:05:24 2005
+++ src/ifconf.c Fri Jul 15 12:35:26 2005
$OpenBSD: patch-src_ifconf_c,v 1.3 2005/10/27 21:47:28 sturm Exp $
--- src/ifconf.c.orig Thu Jun 30 04:36:09 2005
+++ src/ifconf.c Fri Oct 21 16:35:55 2005
@@ -113,7 +113,7 @@ if (vbroadcast[0] == '\0')
return;
}
@ -64,77 +64,3 @@ $OpenBSD: patch-src_ifconf_c,v 1.2 2005/07/21 15:16:46 aanriot Exp $
}
/****************************************************************/
@@ -362,7 +362,9 @@ sprintf(VNUMBROADCAST,"%u.%u.%u.%u",ba,b
void SetDefaultRoute()
{ int sk, defaultokay = 1;
+# ifndef __OpenBSD__
struct sockaddr_in sindst,singw;
+# endif /* __OpenBSD__ */
# ifdef HAVE_ORTENTRY
struct ortentry route;
@@ -474,6 +476,7 @@ if ((sk = socket(AF_INET,SOCK_RAW,0)) ==
FatalError("Error in SetDefaultRoute()");
}
+# ifndef __OpenBSD__
sindst.sin_family = AF_INET;
singw.sin_family = AF_INET;
@@ -491,6 +494,55 @@ if (! DONTDO)
CfLog(cferror,"","ioctl SIOCADDRT:");
FatalError("Software error: set default route");
}
+
+# else /* __OpenBSD__ */
+
+if (! DONTDO)
+ {
+ /* swiped from net/net-snmp/patches/patch-agent_mibgroup_mibII_route_write_c */
+
+ int s, rc;
+ struct {
+ struct rt_msghdr hdr;
+ struct sockaddr_in dst;
+ struct sockaddr_in gateway;
+ } rtmsg;
+
+ s = socket(PF_ROUTE, SOCK_RAW, 0);
+ if (s < 0) {
+ CfLog(cferror,"","socket");
+ FatalError("Software error: socket");
+ }
+
+ shutdown(s, SHUT_RD);
+
+ /* possible panic otherwise */
+ /* flags |= (RTF_UP | RTF_GATEWAY); */
+
+ bzero(&rtmsg, sizeof(rtmsg));
+
+ rtmsg.hdr.rtm_type = RTM_ADD;
+ rtmsg.hdr.rtm_version = RTM_VERSION;
+ rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY;
+ rtmsg.hdr.rtm_flags = RTF_GATEWAY;
+
+ rtmsg.dst.sin_len = sizeof(rtmsg.dst);
+ rtmsg.dst.sin_family = AF_INET;
+ rtmsg.dst.sin_addr.s_addr = htonl(INADDR_ANY);
+
+ rtmsg.gateway.sin_len = sizeof(rtmsg.gateway);
+ rtmsg.gateway.sin_family = AF_INET;
+ rtmsg.gateway.sin_addr.s_addr = htonl(inet_addr(VDEFAULTROUTE->name));
+
+ rc = sizeof(rtmsg);
+ rtmsg.hdr.rtm_msglen = rc;
+
+ if ((rc = write(s, &rtmsg, rc)) < 0) {
+ CfLog(cferror,"","writing to routing socket");
+ FatalError("Software error: writing to routing socket");
+ }
+
+# endif /* __OpenBSD__ */
CfLog(cferror,"The routing table did not contain a default route.\n","");
snprintf(OUTPUT,CF_BUFSIZE*2,"I'm setting it to %s\n",VDEFAULTROUTE->name);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/image.c.orig Sun May 29 07:04:05 2005
+++ src/image.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_image_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/image.c.orig Thu Aug 18 12:02:59 2005
+++ src/image.c Fri Oct 21 16:35:55 2005
@@ -59,8 +59,8 @@ for (ip = VRPCPEERLIST; ip != NULL; ip =
}
else
@ -23,7 +23,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
snprintf(VUIDNAME,CF_MAXVARSIZE,"%d",getuid());
snprintf(VGIDNAME,CF_MAXVARSIZE,"%d",getgid());
IMGCOMP = '>';
@@ -190,7 +190,7 @@ for (dirp = cfreaddir(dirh,ip); dirp !=
@@ -193,7 +193,7 @@ for (dirp = cfreaddir(dirh,ip); dirp !=
return;
}
@ -32,7 +32,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (TRAVLINKS || ip->linktype == 'n')
{
@@ -361,9 +361,9 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
@@ -364,9 +364,9 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
continue;
}
@ -44,7 +44,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (! IsHomeDir(homedir))
{
@@ -384,10 +384,10 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
@@ -387,10 +387,10 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
continue;
}
@ -58,7 +58,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (strlen(ip->destination) > 4)
{
@@ -400,7 +400,7 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
@@ -403,7 +403,7 @@ for (itp = VMOUNTLIST; itp != NULL; itp=
}
else
{
@ -67,7 +67,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
}
@@ -502,9 +502,9 @@ if ((ip->gid)->gid == (gid_t)-1)
@@ -505,9 +505,9 @@ if ((ip->gid)->gid == (gid_t)-1)
if (S_ISDIR(sourcestatbuf.st_mode))
{
@ -79,7 +79,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddSlash(destdir);
if ((dirh = cfopendir(sourcedir,ip)) == NULL)
@@ -536,22 +536,22 @@ if (S_ISDIR(sourcestatbuf.st_mode))
@@ -539,22 +539,22 @@ if (S_ISDIR(sourcestatbuf.st_mode))
continue;
}
@ -106,7 +106,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (cflstat(sourcefile,&sourcestatbuf,ip) == -1)
{
@@ -572,8 +572,8 @@ if (S_ISDIR(sourcestatbuf.st_mode))
@@ -575,8 +575,8 @@ if (S_ISDIR(sourcestatbuf.st_mode))
return;
}
@ -117,7 +117,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
ImageCopy(sourcefile,destfile,sourcestatbuf,ip);
(ip->uid)->uid = save_uid;
@@ -1008,7 +1008,7 @@ if (ip->linktype != 'n')
@@ -1011,7 +1011,7 @@ if (ip->linktype != 'n')
if (ip->linktype == 'a' && linkbuf[0] != '/') /* Not absolute path - must fix */
{
@ -126,7 +126,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
ChopLastNode(VBUFF);
AddSlash(VBUFF);
strncat(VBUFF,linkbuf,CF_BUFSIZE-1);
@@ -1396,7 +1396,7 @@ for (sp = ip->cache; sp != NULL; sp=sp->
@@ -1399,7 +1399,7 @@ for (sp = ip->cache; sp != NULL; sp=sp->
else
{
memset(linkbuf,0,buffsize);
@ -135,7 +135,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
return 0;
}
}
@@ -1584,13 +1584,13 @@ if (BufferOverflow(dest,CF_NEW))
@@ -1587,13 +1587,13 @@ if (BufferOverflow(dest,CF_NEW))
printf(" culprit: CopyReg\n");
return false;
}
@ -151,7 +151,7 @@ $OpenBSD: patch-src_image_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (remote)
{
@@ -1629,22 +1629,22 @@ if (IMAGEBACKUP != 'n')
@@ -1632,22 +1632,22 @@ if (IMAGEBACKUP != 'n')
time_t STAMPNOW;
STAMPNOW = time((time_t *)NULL);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/install.c.orig Sun May 29 06:34:15 2005
+++ src/install.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_install_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/install.c.orig Thu Sep 8 09:43:45 2005
+++ src/install.c Fri Oct 21 16:35:56 2005
@@ -113,7 +113,7 @@ else
FatalError("Redefinition of basic system variable");
}
@ -292,7 +292,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if (work[strlen(work)-1] != ')')
{
@@ -4848,12 +4848,12 @@ Debug1("InstallImageItem (%s) (+%o)(-%o)
@@ -4857,12 +4857,12 @@ Debug1("InstallImageItem (%s) (+%o)(-%o)
if (strlen(action) == 0) /* default action */
{
@ -307,7 +307,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
yyerror(VBUFF);
return;
}
@@ -4944,7 +4944,7 @@ for (spl = Get2DListEnt(tp); spl != NULL
@@ -4953,7 +4953,7 @@ for (spl = Get2DListEnt(tp); spl != NULL
if (strlen(destination) == 0)
{
@ -316,7 +316,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -5275,11 +5275,11 @@ if (strlen(CURRENTITEM) != 0)
@@ -5284,11 +5284,11 @@ if (strlen(CURRENTITEM) != 0)
if (strcmp(value,"link") == 0 || strcmp(value,"links") == 0)
{
@ -330,7 +330,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -5398,7 +5398,7 @@ void HandleNetmask(char *value)
@@ -5407,7 +5407,7 @@ void HandleNetmask(char *value)
{
if (strlen(DESTINATION) == 0)
{
@ -339,7 +339,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -5413,7 +5413,7 @@ void HandleIPAddress(char *value)
@@ -5422,7 +5422,7 @@ void HandleIPAddress(char *value)
{
if (strlen(LINKTO) == 0)
{
@ -348,7 +348,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -5434,19 +5434,19 @@ if (strlen(CURRENTOBJECT) != 0)
@@ -5443,19 +5443,19 @@ if (strlen(CURRENTOBJECT) != 0)
if (strcmp("ones",value) == 0)
{
@ -371,7 +371,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
return;
}
@@ -5459,6 +5459,7 @@ void AppendToActionSequence (char *actio
@@ -5468,6 +5468,7 @@ void AppendToActionSequence (char *actio
{ int j = 0;
char *sp,cbuff[CF_BUFSIZE],actiontxt[CF_BUFSIZE];
@ -379,7 +379,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
Debug1("Installing item (%s) in the action sequence list\n",action);
@@ -5490,8 +5491,10 @@ while (*sp != '\0')
@@ -5499,8 +5500,10 @@ while (*sp != '\0')
if (IsHardClass(cbuff))
{
@ -392,7 +392,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
yyerror(tmp);
free(tmp);
yyerror("You cannot add a reserved class!");
@@ -5500,7 +5503,7 @@ while (*sp != '\0')
@@ -5509,7 +5512,7 @@ while (*sp != '\0')
if (j == 1)
{
@ -401,7 +401,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
continue;
}
else if (!IsSpecialClass(cbuff))
@@ -5527,7 +5530,7 @@ if (isalpha((int)user[0]))
@@ -5536,7 +5539,7 @@ if (isalpha((int)user[0]))
return;
}
@ -410,7 +410,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AppendItem(&VACCESSLIST,id,NULL);
}
else
@@ -5625,7 +5628,7 @@ void HandleServer(char *value)
@@ -5634,7 +5637,7 @@ void HandleServer(char *value)
{
Debug("Server in copy set to : %s\n",value);
@ -419,7 +419,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
/*******************************************************************/
@@ -5647,7 +5650,7 @@ if (strlen(value) > CF_BUFSIZE)
@@ -5656,7 +5659,7 @@ if (strlen(value) > CF_BUFSIZE)
yyerror(OUTPUT);
}
*/
@ -428,7 +428,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
for (sp = value; *sp != '\0'; sp++)
{
@@ -5677,7 +5680,7 @@ if (strlen(value) > CF_BUFSIZE)
@@ -5686,7 +5689,7 @@ if (strlen(value) > CF_BUFSIZE)
yyerror("class list too long - can't handle it!");
}
@ -437,7 +437,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
for (sp = value; *sp != '\0'; sp++)
{
@@ -5707,7 +5710,7 @@ if (strlen(value) > CF_BUFSIZE)
@@ -5716,7 +5719,7 @@ if (strlen(value) > CF_BUFSIZE)
yyerror("class list too long - can't handle it!");
}
@ -446,7 +446,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
for (sp = value; *sp != '\0'; sp++)
{
@@ -6320,8 +6323,8 @@ switch(GetCommAttribute(attribute))
@@ -6329,8 +6332,8 @@ switch(GetCommAttribute(attribute))
{
if (strlen(copyhost)+strlen(VDOMAIN) < CF_MAXVARSIZE-2)
{
@ -457,7 +457,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -6354,6 +6357,7 @@ void PrependTidy(struct TidyPattern **li
@@ -6363,6 +6366,7 @@ void PrependTidy(struct TidyPattern **li
{ struct TidyPattern *tp;
char *spe = NULL,*sp, buffer[CF_EXPANDSIZE];
@ -465,7 +465,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
if ((tp = (struct TidyPattern *)malloc(sizeof(struct TidyPattern))) == NULL)
{
@@ -6383,10 +6387,14 @@ if ((tp->elsedef = strdup(buffer)) == NU
@@ -6392,10 +6396,14 @@ if ((tp->elsedef = strdup(buffer)) == NU
AddInstallable(tp->defines);
AddInstallable(tp->elsedef);
@ -483,7 +483,7 @@ $OpenBSD: patch-src_install_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
if (travlinks == '?')
@@ -6412,7 +6420,7 @@ tp->rmdirs =tidydirs;
@@ -6421,7 +6429,7 @@ tp->rmdirs =tidydirs;
if (classes != NULL)
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_item_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/item.c.orig Thu Feb 17 02:37:07 2005
+++ src/item.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_item_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/item.c.orig Thu Aug 11 04:22:28 2005
+++ src/item.c Fri Oct 21 16:35:56 2005
@@ -212,6 +212,7 @@ void PrependItem (struct Item **liststar
{ struct Item *ip;
@ -145,7 +145,7 @@ $OpenBSD: patch-src_item_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
ip->classes = spe;
}
else
@@ -1061,7 +1079,7 @@ char *s1, *s2;
@@ -1072,7 +1090,7 @@ char *s1, *s2;
return 1;
}
sscanf(sp,"%ld",&cmp);
@ -154,7 +154,7 @@ $OpenBSD: patch-src_item_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
/* HvB basename is */
strncpy(host_basename, s2, strlen(s2) - strlen(sp));
@@ -1110,7 +1128,7 @@ struct Item *SplitStringAsItemList(char
@@ -1121,7 +1139,7 @@ struct Item *SplitStringAsItemList(char
Debug("SplitStringAsItemList(%s,%c)\n",string,sep);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_locks_c,v 1.3 2005/07/21 15:16:47 aanriot Exp $
--- src/locks.c.orig Sun Apr 3 08:47:48 2005
+++ src/locks.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_locks_c,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- src/locks.c.orig Fri Jul 15 11:17:23 2005
+++ src/locks.c Fri Oct 21 16:35:56 2005
@@ -74,7 +74,7 @@ DB *DBP;
void PreLockState()
@ -37,7 +37,7 @@ $OpenBSD: patch-src_locks_c,v 1.3 2005/07/21 15:16:47 aanriot Exp $
}
@@ -689,7 +689,7 @@ if ((tim = time((time_t *)NULL)) == -1)
@@ -721,7 +721,7 @@ if ((tim = time((time_t *)NULL)) == -1)
Debug("Cfengine: couldn't read system clock\n");
}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_macro_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/macro.c.orig Wed May 25 09:43:58 2005
+++ src/macro.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_macro_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/macro.c.orig Mon Aug 15 10:06:46 2005
+++ src/macro.c Fri Oct 21 16:35:56 2005
@@ -200,6 +200,7 @@ void AddMacroValue(char *scope,char *nam
{ char *sp, buffer[CF_BUFSIZE],exp[CF_EXPANDSIZE];
struct cfObject *ptr;
@ -26,7 +26,7 @@ $OpenBSD: patch-src_macro_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
slot = Hash(name);
@@ -360,7 +362,7 @@ if (strstr(name,"."))
@@ -363,7 +365,7 @@ if (strstr(name,"."))
if (ptr == NULL)
{

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_methods_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/methods.c.orig Wed Mar 23 14:00:54 2005
+++ src/methods.c Fri Jul 15 12:24:01 2005
@@ -271,29 +271,29 @@ options[0] = '\0';
$OpenBSD: patch-src_methods_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/methods.c.orig Fri Sep 9 01:56:25 2005
+++ src/methods.c Fri Oct 21 16:35:56 2005
@@ -351,29 +351,29 @@ options[0] = '\0';
if (INFORM)
{
@ -38,7 +38,7 @@ $OpenBSD: patch-src_methods_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
snprintf(execstr,CF_BUFSIZE-1,"%s/bin/cfagent -f %s %s",CFWORKDIR,GetMethodFilename(ptr),options);
@@ -1066,10 +1066,10 @@ for (dirp = readdir(dirh); dirp != NULL;
@@ -1145,10 +1145,10 @@ for (dirp = readdir(dirh); dirp != NULL;
SplitMethodName(dirp->d_name,client,server,name,digeststring,extra);
Debug("This request came from %s - our reply should be sent there!\n",client);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/misc.c.orig Fri Mar 11 12:57:29 2005
+++ src/misc.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_misc_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/misc.c.orig Fri Jul 15 11:15:25 2005
+++ src/misc.c Fri Oct 21 16:35:56 2005
@@ -540,17 +540,17 @@ char *ChecksumPrint(char type,unsigned c
switch(type)
@ -22,7 +22,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
return buffer;
@@ -926,17 +926,17 @@ char strmajor[CF_MAXVARSIZE];
@@ -894,17 +894,17 @@ char strmajor[CF_MAXVARSIZE];
release += strlen(RELEASE_FLAG);
if (sscanf(release, "%d", &major) == 1)
{
@ -44,7 +44,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddClassToHeap(classbuf);
}
@@ -1094,15 +1094,15 @@ Verbose("Looking for redhat linux info i
@@ -1062,15 +1062,15 @@ Verbose("Looking for redhat linux info i
release += strlen(RELEASE_FLAG);
if (sscanf(release, "%d.%d", &major, &minor) == 2)
{
@ -63,7 +63,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
minor = -2;
};
}
@@ -1110,21 +1110,21 @@ Verbose("Looking for redhat linux info i
@@ -1078,21 +1078,21 @@ Verbose("Looking for redhat linux info i
if (major != -1 && minor != -1 && vendor != "")
{
classbuf[0] = '\0';
@ -92,7 +92,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddClassToHeap(classbuf);
}
}
@@ -1171,13 +1171,13 @@ FILE *fp;
@@ -1139,13 +1139,13 @@ FILE *fp;
if(!strncmp(relstring, SUSE_SLES8_ID, strlen(SUSE_SLES8_ID)))
{
classbuf[0] = '\0';
@ -108,7 +108,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddClassToHeap(classbuf);
}
@@ -1198,19 +1198,19 @@ FILE *fp;
@@ -1166,19 +1166,19 @@ FILE *fp;
{
release += strlen(SUSE_RELEASE_FLAG);
sscanf(release, "%d.%d", &major, &minor);
@ -135,7 +135,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddClassToHeap(classbuf);
}
@@ -1323,8 +1323,8 @@ char strminor[CF_MAXVARSIZE];
@@ -1297,8 +1297,8 @@ char strminor[CF_MAXVARSIZE];
release += strlen(RELEASE_FLAG);
if (sscanf(release, "%d.%d", &major, &minor) == 2)
{
@ -146,7 +146,7 @@ $OpenBSD: patch-src_misc_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
}
else
{
@@ -1336,15 +1336,15 @@ char strminor[CF_MAXVARSIZE];
@@ -1310,15 +1310,15 @@ char strminor[CF_MAXVARSIZE];
if (major != -1 && minor != -1 && vendor != "")
{
classbuf[0] = '\0';

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_nameinfo_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/nameinfo.c.orig Wed May 25 03:29:36 2005
+++ src/nameinfo.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_nameinfo_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/nameinfo.c.orig Tue Jul 26 08:26:33 2005
+++ src/nameinfo.c Fri Oct 21 16:35:56 2005
@@ -59,6 +59,7 @@ void GetNameInfo()
time_t tloc;
struct hostent *hp;
@ -54,7 +54,7 @@ $OpenBSD: patch-src_nameinfo_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
for (i=0; hp->h_aliases[i]!= NULL; i++)
{
@@ -411,7 +413,7 @@ for (j = 0,len = 0,ifp = list.ifc_req; l
@@ -414,7 +416,7 @@ for (j = 0,len = 0,ifp = list.ifc_req; l
}
/* Old style compat */
@ -63,7 +63,7 @@ $OpenBSD: patch-src_nameinfo_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AppendItem(&IPADDRESSES,ip,"");
for (sp = ip+strlen(ip)-1; *sp != '.'; sp--)
@@ -422,8 +424,8 @@ for (j = 0,len = 0,ifp = list.ifc_req; l
@@ -425,8 +427,8 @@ for (j = 0,len = 0,ifp = list.ifc_req; l
/* New style */
@ -74,7 +74,7 @@ $OpenBSD: patch-src_nameinfo_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
AddClassToHeap(CanonifyName(ip));
snprintf(name,CF_MAXVARSIZE-1,"ipv4[%s]",CanonifyName(ifp->ifr_name));
AddMacroValue(CONTEXTID,name,inet_ntoa(sin->sin_addr));
@@ -544,9 +546,9 @@ void AddNetworkClass(char *netmask) /* F
@@ -567,9 +569,9 @@ void AddNetworkClass(char *netmask) /* F
if ((nm.s_addr = inet_addr(netmask)) != -1 && (ip.s_addr = inet_addr(VIPADDRESS)) != -1)
{
ip.s_addr &= nm.s_addr; /* Will not work with IPv6 */
@ -86,7 +86,7 @@ $OpenBSD: patch-src_nameinfo_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
while( (sp = strrchr(nmbuf,'.')) && strcmp(sp,".0") == 0 )
{
@@ -569,22 +571,22 @@ void SetDomainName(char *sp) /
@@ -592,22 +594,22 @@ void SetDomainName(char *sp) /
if (gethostname(fqn, sizeof(fqn)) != -1)
{

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-src_parse_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
--- src/parse.c.orig Sun May 29 06:34:15 2005
+++ src/parse.c Fri Jul 15 12:24:01 2005
$OpenBSD: patch-src_parse_c,v 1.5 2005/10/27 21:47:28 sturm Exp $
--- src/parse.c.orig Fri Sep 9 01:54:30 2005
+++ src/parse.c Fri Oct 21 16:35:56 2005
@@ -258,7 +258,7 @@ SetStrategies();
Debug1("\n\n==============================BEGIN NEW ACTION %s=============\n\n",ACTIONTEXT[action]);
@ -206,7 +206,7 @@ $OpenBSD: patch-src_parse_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
return result;
}
@@ -1194,8 +1194,8 @@ void InitializeAction()
@@ -1201,8 +1201,8 @@ void InitializeAction()
HAVE_RESTART = false;
VAGE = 99999;
strncpy(FINDERTYPE,"*",CF_BUFSIZE);
@ -217,7 +217,7 @@ $OpenBSD: patch-src_parse_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
HAVE_RESTART = 0;
FILEACTION=warnall;
PIFELAPSED=-1;
@@ -1216,7 +1216,7 @@ void InitializeAction()
@@ -1223,7 +1223,7 @@ void InitializeAction()
PARSEMETHODRETURNCLASSES[0] = '\0';
METHODFORCE[0] = '\0';
CHROOT[0] = '\0';
@ -226,7 +226,7 @@ $OpenBSD: patch-src_parse_c,v 1.4 2005/07/21 15:16:47 aanriot Exp $
PTRAVLINKS = (short) '?';
IMAGEBACKUP = 'y';
ENCRYPT = 'n';
@@ -1259,7 +1259,7 @@ void InitializeAction()
@@ -1266,7 +1266,7 @@ void InitializeAction()
memset(ALLCLASSBUFFER,0,CF_BUFSIZE);
memset(ELSECLASSBUFFER,0,CF_BUFSIZE);

View File

@ -1,18 +1,25 @@
$OpenBSD: patch-src_proto_c,v 1.3 2005/07/21 15:16:47 aanriot Exp $
--- src/proto.c.orig Fri May 27 02:29:36 2005
+++ src/proto.c Fri Jul 15 12:24:01 2005
@@ -132,8 +132,8 @@ if (!SKIPIDENTIFY && (strcmp(VDOMAIN,CF_
if ((strstr(hp->h_name,".") == 0) && (strlen(VDOMAIN) > 0))
{
- strcat(dnsname,".");
- strcat(dnsname,VDOMAIN);
+ (void)strlcat(dnsname,".",sizeof(dnsname));
+ (void)strlcat(dnsname,VDOMAIN,sizeof(dnsname));
}
$OpenBSD: patch-src_proto_c,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- src/proto.c.orig Fri Jul 15 04:25:15 2005
+++ src/proto.c Fri Oct 21 16:35:56 2005
@@ -133,14 +133,14 @@ if (!SKIPIDENTIFY)
if ((strstr(hp->h_name,".") == 0) && (strlen(VDOMAIN) > 0))
{
- strcat(dnsname,".");
- strcat(dnsname,VDOMAIN);
+ (void)strlcat(dnsname,".",sizeof(dnsname));
+ (void)strlcat(dnsname,VDOMAIN,sizeof(dnsname));
}
#endif
@@ -145,19 +145,19 @@ uname = user_ptr ? user_ptr->pw_name : "
}
else
{
- strcat(dnsname,"skipident");
+ (void)strlcat(dnsname,"skipident",sizeof(dnsname));
}
user_ptr = getpwuid(getuid());
@@ -151,19 +151,19 @@ uname = user_ptr ? user_ptr->pw_name : "
if ((strlen(VDOMAIN) > 0) && !IsIPV6Address(dnsname) && !strchr(dnsname,'.'))
{
Debug("Appending domain %s to %s\n",VDOMAIN,dnsname);

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-src_prototypes_h,v 1.3 2005/07/21 15:16:47 aanriot Exp $
--- src/prototypes.h.orig Sun May 29 07:04:38 2005
+++ src/prototypes.h Fri Jul 15 12:24:01 2005
@@ -199,8 +199,8 @@ int EmbeddedWrite ARGLIST((char *new,int
$OpenBSD: patch-src_prototypes_h,v 1.4 2005/10/27 21:47:28 sturm Exp $
--- src/prototypes.h.orig Fri Sep 9 01:57:05 2005
+++ src/prototypes.h Fri Oct 21 16:35:56 2005
@@ -200,8 +200,8 @@ int EmbeddedWrite ARGLIST((char *new,int
/* dce_acl.c */

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.8 2005/07/21 15:16:47 aanriot Exp $
@comment $OpenBSD: PLIST,v 1.9 2005/10/27 21:47:28 sturm Exp $
@comment doc/
@comment doc/cfengine-${V}/
@info info/cfengine-Anomalies.info
@ -8,6 +8,13 @@
@man man/man8/cfengine.8
@man man/man8/cfenvd.8
@man man/man8/cfenvgraph.8
@man man/man8/cfetoolcheck.8
@man man/man8/cfetoolcreate.8
@man man/man8/cfetooldump.8
@man man/man8/cfetoolgraph.8
@man man/man8/cfetoolimport.8
@man man/man8/cfetoolinfo.8
@man man/man8/cfetoolupdate.8
@man man/man8/cfexecd.8
@man man/man8/cfkey.8
@man man/man8/cfrun.8
@ -17,12 +24,13 @@ sbin/cfagent
sbin/cfdoc
sbin/cfenvd
sbin/cfenvgraph
sbin/cfetool
sbin/cfetoolgraph
sbin/cfexecd
sbin/cfkey
sbin/cfrun
sbin/cfservd
sbin/cfshow
sbin/vicf
share/cfengine/
share/cfengine/ChangeLog
share/cfengine/INSTALL