Initial import of radmind 1.3.0
A suite of Unix command-line tools and a server designed to remotely administer the file systems of multiple Unix machines. At its core, radmind operates as a tripwire. It is able to detect changes to any managed filesystem object, e.g. files, directories, links, etc. However, radmind goes further than just integrity checking: once a change is detected, radmind can optionally reverse the change. WWW: http://rsug.itd.umich.edu/software/radmind/ from William Yodlowsky <bsd at openbsd.rutgers.edu>
This commit is contained in:
parent
5b6f8b28cc
commit
a3134d3b4e
26
sysutils/radmind/Makefile
Normal file
26
sysutils/radmind/Makefile
Normal file
@ -0,0 +1,26 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
|
||||
COMMENT= "remote administration software"
|
||||
|
||||
DISTNAME= radmind-1.3.0
|
||||
CATEGORIES= sysutils
|
||||
|
||||
HOMEPAGE= http://rsug.itd.umich.edu/software/radmind/
|
||||
|
||||
MAINTAINER= William Yodlowsky <bsd@openbsd.rutgers.edu>
|
||||
|
||||
# License: BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
MASTER_SITES= http://rsug.itd.umich.edu/software/radmind/files/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
CONFIGURE_STYLE=gnu dest
|
||||
CONFIGURE_ARGS+=--with-radminddir='$${${DESTDIRNAME}}/var/radmind'
|
||||
|
||||
ALL_TARGET= all man
|
||||
|
||||
.include <bsd.port.mk>
|
3
sysutils/radmind/distinfo
Normal file
3
sysutils/radmind/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (radmind-1.3.0.tgz) = 46ef7b08d8e5304751db9d2e45e2488c
|
||||
RMD160 (radmind-1.3.0.tgz) = 284e8bbd65958231aeb9731662a7a19cc3102629
|
||||
SHA1 (radmind-1.3.0.tgz) = bfb45136b6e818ae7b3931bcebed105a93f45994
|
12
sysutils/radmind/patches/patch-Makefile_in
Normal file
12
sysutils/radmind/patches/patch-Makefile_in
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-Makefile_in,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- Makefile.in.orig Mon Mar 15 09:51:43 2004
|
||||
+++ Makefile.in Sat Jun 26 12:49:04 2004
|
||||
@@ -209,7 +209,7 @@ man : FRC
|
||||
${srcdir}/man/$$i > tmp/man/$$i; \
|
||||
done
|
||||
|
||||
-install : all man
|
||||
+install : all
|
||||
-mkdir -p ${exec_prefix}
|
||||
-mkdir -p ${SBINDIR}
|
||||
${INSTALL} -m 0755 -c radmind ${SBINDIR}/
|
140
sysutils/radmind/patches/patch-command_c
Normal file
140
sysutils/radmind/patches/patch-command_c
Normal file
@ -0,0 +1,140 @@
|
||||
$OpenBSD: patch-command_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- command.c.orig 2004-03-15 11:11:55.000000000 -0500
|
||||
+++ command.c 2004-06-08 23:09:17.000000000 -0400
|
||||
@@ -302,7 +302,7 @@ f_retr( sn, ac, av )
|
||||
|
||||
switch ( keyword( ac, av )) {
|
||||
case K_COMMAND:
|
||||
- sprintf( path, "%s", command_file );
|
||||
+ (void)snprintf( path, sizeof( path ), "%s", command_file );
|
||||
break;
|
||||
|
||||
case K_TRANSCRIPT:
|
||||
@@ -324,7 +324,7 @@ f_retr( sn, ac, av )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
- sprintf( path, "transcript/%s", d_tran );
|
||||
+ (void)snprintf( path, sizeof( path ), "transcript/%s", d_tran );
|
||||
break;
|
||||
|
||||
case K_SPECIAL:
|
||||
@@ -334,7 +334,7 @@ f_retr( sn, ac, av )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
- sprintf( path, "%s/%s", special_dir, d_path );
|
||||
+ (void)snprintf( path, sizeof( path ), "%s/%s", special_dir, d_path );
|
||||
break;
|
||||
|
||||
case K_FILE:
|
||||
@@ -366,7 +366,7 @@ f_retr( sn, ac, av )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
- sprintf( path, "file/%s/%s", d_tran, d_path );
|
||||
+ (void)snprintf( path, sizeof( path ), "file/%s/%s", d_tran, d_path );
|
||||
free( d_path );
|
||||
break;
|
||||
|
||||
@@ -478,7 +478,7 @@ f_stat( SNET *sn, int ac, char *av[] )
|
||||
|
||||
switch ( key = keyword( ac, av )) {
|
||||
case K_COMMAND:
|
||||
- sprintf( path, "%s", command_file );
|
||||
+ (void)snprintf( path, sizeof( path ), "%s", command_file );
|
||||
break;
|
||||
|
||||
case K_TRANSCRIPT:
|
||||
@@ -500,7 +500,7 @@ f_stat( SNET *sn, int ac, char *av[] )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
- sprintf( path, "transcript/%s", d_tran );
|
||||
+ (void)snprintf( path, sizeof( path ), "transcript/%s", d_tran );
|
||||
break;
|
||||
|
||||
case K_SPECIAL:
|
||||
@@ -510,7 +510,7 @@ f_stat( SNET *sn, int ac, char *av[] )
|
||||
return( 1 );
|
||||
}
|
||||
|
||||
- sprintf( path, "%s/%s", special_dir, d_path);
|
||||
+ (void)snprintf( path, sizeof( path ), "%s/%s", special_dir, d_path);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -578,7 +578,7 @@ f_stat( SNET *sn, int ac, char *av[] )
|
||||
|
||||
/* if allowable, check for transcript in the special file directory */
|
||||
|
||||
- strcat( path, ".T" );
|
||||
+ (void)strlcat( path, ".T", sizeof( path ) );
|
||||
|
||||
/* store value of av[ 2 ], because argcargv will be called
|
||||
* from special_t(), and that will blow away the current values
|
||||
@@ -647,13 +647,13 @@ f_stor( SNET *sn, int ac, char *av[] )
|
||||
switch ( keyword( ac, av )) {
|
||||
|
||||
case K_TRANSCRIPT:
|
||||
- sprintf( xscriptdir, "tmp/file/%s", d_tran );
|
||||
- sprintf( upload, "tmp/transcript/%s", d_tran );
|
||||
+ (void)snprintf( xscriptdir, sizeof( xscriptdir ), "tmp/file/%s", d_tran );
|
||||
+ (void)snprintf( upload, sizeof( upload ), "tmp/transcript/%s", d_tran );
|
||||
|
||||
/* keep encoded transcript name, since it will just be
|
||||
* used later to compare in a stor file.
|
||||
*/
|
||||
- strcpy( upload_xscript, av[ 2 ] );
|
||||
+ (void)strlcpy( upload_xscript, av[ 2 ], sizeof( upload_xscript ) );
|
||||
|
||||
/* make the directory for the files of this xscript to live in. */
|
||||
if ( mkdir( xscriptdir, 0777 ) < 0 ) {
|
||||
@@ -688,9 +688,9 @@ f_stor( SNET *sn, int ac, char *av[] )
|
||||
}
|
||||
|
||||
if ( d_path[ 0 ] == '/' ) {
|
||||
- sprintf( upload, "tmp/file/%s%s", d_tran, d_path );
|
||||
+ (void)snprintf( upload, sizeof( upload ), "tmp/file/%s%s", d_tran, d_path );
|
||||
} else {
|
||||
- sprintf( upload, "tmp/file/%s/%s", d_tran, d_path );
|
||||
+ (void)snprintf( upload, sizeof( upload ), "tmp/file/%s/%s", d_tran, d_path );
|
||||
}
|
||||
free( d_path );
|
||||
free( d_tran );
|
||||
@@ -1044,7 +1044,7 @@ command_k( char *path_config )
|
||||
}
|
||||
|
||||
if (( p = strrchr( av[ 1 ], '/' )) == NULL ) {
|
||||
- sprintf( special_dir, "special" );
|
||||
+ (void)snprintf( special_dir, sizeof( special_dir ), "special" );
|
||||
} else {
|
||||
*p = '\0';
|
||||
if ( snprintf( special_dir, MAXPATHLEN, "special/%s", av[ 1 ] )
|
||||
@@ -1057,7 +1057,7 @@ command_k( char *path_config )
|
||||
}
|
||||
|
||||
if (( remote_cn != NULL ) && wildcard( av[ 0 ], remote_cn )) {
|
||||
- sprintf( command_file, "command/%s", av[ 1 ] );
|
||||
+ (void)snprintf( command_file, sizeof( command_file ), "command/%s", av[ 1 ] );
|
||||
if ( snprintf( special_dir, MAXPATHLEN, "%s/%s", special_dir,
|
||||
remote_cn ) > MAXPATHLEN - 1 ) {
|
||||
syslog( LOG_ERR, "config file: line %d: special dir too long\n",
|
||||
@@ -1067,7 +1067,7 @@ command_k( char *path_config )
|
||||
return( 0 );
|
||||
}
|
||||
if ( wildcard( av[ 0 ], remote_host )) {
|
||||
- sprintf( command_file, "command/%s", av[ 1 ] );
|
||||
+ (void)snprintf( command_file, sizeof( command_file ), "command/%s", av[ 1 ] );
|
||||
if ( snprintf( special_dir, MAXPATHLEN, "%s/%s", special_dir,
|
||||
remote_host ) > MAXPATHLEN - 1 ) {
|
||||
syslog( LOG_ERR, "config file: line %d: special dir too long\n",
|
||||
@@ -1077,7 +1077,7 @@ command_k( char *path_config )
|
||||
return( 0 );
|
||||
}
|
||||
if ( wildcard( av[ 0 ], remote_addr )) {
|
||||
- sprintf( command_file, "command/%s", av[ 1 ] );
|
||||
+ (void)snprintf( command_file, sizeof( command_file ), "command/%s", av[ 1 ] );
|
||||
if ( snprintf( special_dir, MAXPATHLEN, "%s/%s", special_dir,
|
||||
remote_addr ) > MAXPATHLEN - 1 ) {
|
||||
syslog( LOG_ERR, "config file: line %d: special dir too long\n",
|
18
sysutils/radmind/patches/patch-fsdiff_c
Normal file
18
sysutils/radmind/patches/patch-fsdiff_c
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-fsdiff_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- fsdiff.c.orig 2004-03-11 14:43:58.000000000 -0500
|
||||
+++ fsdiff.c 2004-06-08 15:52:01.000000000 -0400
|
||||
@@ -60,13 +60,7 @@ fs_walk( char *path, int start, int fini
|
||||
}
|
||||
|
||||
if ( ischild( tran->t_pinfo.pi_name, path )) {
|
||||
- /*
|
||||
- * XXX
|
||||
- * This strcpy() is not itself dangerous, because pi_name
|
||||
- * is a MAXPATHLEN-sized buffer. However, it does not appear
|
||||
- * that copies into pi_name are carefully checked.
|
||||
- */
|
||||
- strcpy( temp, tran->t_pinfo.pi_name );
|
||||
+ (void)strlcpy( temp, tran->t_pinfo.pi_name, sizeof( temp ) );
|
||||
fs_walk( temp, start, finish );
|
||||
} else {
|
||||
return;
|
28
sysutils/radmind/patches/patch-hardlink_c
Normal file
28
sysutils/radmind/patches/patch-hardlink_c
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-hardlink_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- hardlink.c.orig 2003-05-20 18:23:11.000000000 -0400
|
||||
+++ hardlink.c 2004-06-12 23:03:23.000000000 -0400
|
||||
@@ -79,6 +79,7 @@ d_insert( struct devlist **dev_head, str
|
||||
i_insert( struct devlist *dev_head, struct pathinfo *pinfo )
|
||||
{
|
||||
struct inolist *new, **cur;
|
||||
+ size_t buflen;
|
||||
|
||||
for ( cur = &dev_head->d_ilist; *cur != NULL; cur = &(*cur)->i_next ) {
|
||||
if ( pinfo->pi_stat.st_ino <= (*cur)->i_ino ) {
|
||||
@@ -96,13 +97,14 @@ i_insert( struct devlist *dev_head, stru
|
||||
exit( 2 );
|
||||
}
|
||||
|
||||
- if (( new->i_name = ( char * ) malloc( strlen( pinfo->pi_name ) + 1 ))
|
||||
+ buflen = strlen( pinfo->pi_name ) + 1;
|
||||
+ if (( new->i_name = ( char * ) malloc( buflen ))
|
||||
== NULL ) {
|
||||
perror( "i_insert malloc" );
|
||||
exit( 2 );
|
||||
}
|
||||
|
||||
- strcpy( new->i_name, pinfo->pi_name );
|
||||
+ (void)strlcpy( new->i_name, pinfo->pi_name, buflen );
|
||||
new->i_ino = pinfo->pi_stat.st_ino;
|
||||
new->i_flag = 0;
|
||||
|
48
sysutils/radmind/patches/patch-lapply_c
Normal file
48
sysutils/radmind/patches/patch-lapply_c
Normal file
@ -0,0 +1,48 @@
|
||||
$OpenBSD: patch-lapply_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- lapply.c.orig 2004-02-12 14:35:52.000000000 -0500
|
||||
+++ lapply.c 2004-06-08 16:21:37.000000000 -0400
|
||||
@@ -72,7 +72,7 @@ create_node( char *path, char *tline )
|
||||
new_node = (struct node *) malloc( sizeof( struct node ));
|
||||
new_node->path = strdup( path );
|
||||
if ( tline != NULL ) {
|
||||
- sprintf( new_node->tline, "%s", tline );
|
||||
+ (void)snprintf( new_node->tline, sizeof( new_node->tline ), "%s", tline );
|
||||
new_node->doline = 1;
|
||||
} else {
|
||||
new_node->doline = 0;
|
||||
@@ -123,7 +123,7 @@ do_line( char *tline, int present, struc
|
||||
fprintf( stderr, "line %d: too long\n", linenum );
|
||||
return( 1 );
|
||||
}
|
||||
- strcpy( path, d_path );
|
||||
+ (void)strlcpy( path, d_path, sizeof( path ) );
|
||||
|
||||
/* DOWNLOAD */
|
||||
if ( *command == '+' ) {
|
||||
@@ -132,7 +132,7 @@ do_line( char *tline, int present, struc
|
||||
linenum, *targv[ 0 ] );
|
||||
return( 1 );
|
||||
}
|
||||
- strcpy( cksum_b64, targv[ 7 ] );
|
||||
+ (void)strlcpy( cksum_b64, targv[ 7 ], sizeof( cksum_b64 ) );
|
||||
|
||||
if ( special ) {
|
||||
if ( snprintf( pathdesc, MAXPATHLEN * 2, "SPECIAL %s",
|
||||
@@ -409,7 +409,7 @@ main( int argc, char **argv )
|
||||
}
|
||||
|
||||
if ( tac == 1 ) {
|
||||
- strcpy( transcript, targv[ 0 ] );
|
||||
+ (void)strlcpy( transcript, targv[ 0 ], sizeof( transcript ) );
|
||||
len = strlen( transcript );
|
||||
if ( transcript[ len - 1 ] != ':' ) {
|
||||
fprintf( stderr, "%s: line %d: invalid transcript name\n",
|
||||
@@ -451,7 +451,7 @@ main( int argc, char **argv )
|
||||
fprintf( stderr, "line %d: too long\n", linenum );
|
||||
return( 1 );
|
||||
}
|
||||
- strcpy( path, d_path );
|
||||
+ (void)strlcpy( path, d_path, sizeof( path ) );
|
||||
|
||||
/* Check transcript order */
|
||||
if ( prepath != 0 ) {
|
12
sysutils/radmind/patches/patch-lcksum_c
Normal file
12
sysutils/radmind/patches/patch-lcksum_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-lcksum_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- lcksum.c.orig Sat Jun 26 12:17:00 2004
|
||||
+++ lcksum.c Sat Jun 26 12:17:47 2004
|
||||
@@ -345,7 +345,7 @@ main( int argc, char **argv )
|
||||
fprintf( ufs, "%s %-37s %4s %5s %5s %9ld "
|
||||
"%7" PRIofft "d %s\n",
|
||||
targv[ 0 ], targv[ 1 ], targv[ 2 ], targv[ 3 ],
|
||||
- targv[ 4 ], st.st_mtime, st.st_size, lcksum );
|
||||
+ targv[ 4 ], (long)st.st_mtime, st.st_size, lcksum );
|
||||
} else {
|
||||
/* use mtime from transcript */
|
||||
fprintf( ufs, "%s %-37s %4s %5s %5s %9s "
|
21
sysutils/radmind/patches/patch-libsnet_Makefile_in
Normal file
21
sysutils/radmind/patches/patch-libsnet_Makefile_in
Normal file
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-libsnet_Makefile_in,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- libsnet/Makefile.in.orig Sat Jun 26 12:30:45 2004
|
||||
+++ libsnet/Makefile.in Sat Jun 26 12:34:54 2004
|
||||
@@ -14,7 +14,7 @@ LOBJ = snet.lo
|
||||
INCPATH= @CPPFLAGS@ -I.
|
||||
DEFS=
|
||||
OPTOPTS= @OPTOPTS@
|
||||
-CFLAGS= ${DEFS} ${OPTOPTS} ${INCPATH}
|
||||
+CFLAGS= ${DEFS} ${OPTOPTS} @CFLAGS@ ${INCPATH}
|
||||
PROFILED= @PROFILED@
|
||||
CC= @CC@
|
||||
|
||||
@@ -50,7 +50,7 @@ all: libsnet.la
|
||||
|
||||
libsnet.la: $(OBJ) $(LOBJ)
|
||||
$(LIBTOOL) --mode=link \
|
||||
- $(CC) -o libsnet.la $(LOBJ) -rpath $(libdir) -version-info 0:0:0
|
||||
+ $(CC) -o libsnet.la $(LOBJ) -version-info 0:0:0
|
||||
@if test x_$(PROFILED) = x_true ; then echo "building profiled $@" ; \
|
||||
( cd profiled ; ../$(LIBTOOL) --mode=link \
|
||||
$(CC) -o libsnet_p.la $(LOBJ) -rpath $(libdir) \
|
56
sysutils/radmind/patches/patch-libsnet_ltmain_sh
Normal file
56
sysutils/radmind/patches/patch-libsnet_ltmain_sh
Normal file
@ -0,0 +1,56 @@
|
||||
$OpenBSD: patch-libsnet_ltmain_sh,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- libsnet/ltmain.sh.orig Sat Jun 26 12:15:19 2004
|
||||
+++ libsnet/ltmain.sh Sat Jun 26 12:15:53 2004
|
||||
@@ -1756,11 +1756,6 @@ compiler."
|
||||
continue
|
||||
fi
|
||||
|
||||
- if test "$installed" = no; then
|
||||
- notinst_deplibs="$notinst_deplibs $lib"
|
||||
- need_relink=yes
|
||||
- fi
|
||||
-
|
||||
if test -n "$old_archive_from_expsyms_cmds"; then
|
||||
# figure out the soname
|
||||
set dummy $library_names
|
||||
@@ -4528,40 +4523,6 @@ relink_command=\"$relink_command\""
|
||||
# Exit here if they wanted silent mode.
|
||||
test "$show" = ":" && exit 0
|
||||
|
||||
- echo "----------------------------------------------------------------------"
|
||||
- echo "Libraries have been installed in:"
|
||||
- for libdir in $libdirs; do
|
||||
- echo " $libdir"
|
||||
- done
|
||||
- echo
|
||||
- echo "If you ever happen to want to link against installed libraries"
|
||||
- echo "in a given directory, LIBDIR, you must either use libtool, and"
|
||||
- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
|
||||
- echo "flag during linking and do at least one of the following:"
|
||||
- if test -n "$shlibpath_var"; then
|
||||
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
|
||||
- echo " during execution"
|
||||
- fi
|
||||
- if test -n "$runpath_var"; then
|
||||
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
|
||||
- echo " during linking"
|
||||
- fi
|
||||
- if test -n "$hardcode_libdir_flag_spec"; then
|
||||
- libdir=LIBDIR
|
||||
- eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
-
|
||||
- echo " - use the \`$flag' linker flag"
|
||||
- fi
|
||||
- if test -n "$admincmds"; then
|
||||
- echo " - have your system administrator run these commands:$admincmds"
|
||||
- fi
|
||||
- if test -f /etc/ld.so.conf; then
|
||||
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
|
||||
- fi
|
||||
- echo
|
||||
- echo "See any operating system documentation about shared libraries for"
|
||||
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
|
||||
- echo "----------------------------------------------------------------------"
|
||||
exit 0
|
||||
;;
|
||||
|
17
sysutils/radmind/patches/patch-libsnet_snet_c
Normal file
17
sysutils/radmind/patches/patch-libsnet_snet_c
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-libsnet_snet_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- libsnet/snet.c.orig 2004-06-16 15:43:18.000000000 -0400
|
||||
+++ libsnet/snet.c 2004-06-16 15:54:07.000000000 -0400
|
||||
@@ -217,8 +217,11 @@ modifier:
|
||||
p = va_arg( vl, char * );
|
||||
len = strlen( p );
|
||||
SNET_WBUFGROW( len );
|
||||
- strcpy( cur, p );
|
||||
- cur += strlen( p );
|
||||
+ if (strlcpy( cur, p, end - cur ) > (end - cur)) {
|
||||
+ cur += end - cur;
|
||||
+ } else {
|
||||
+ cur += strlen( p );
|
||||
+ }
|
||||
break;
|
||||
|
||||
case 'c' :
|
12
sysutils/radmind/patches/patch-llist_c
Normal file
12
sysutils/radmind/patches/patch-llist_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-llist_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- llist.c.orig 2004-02-11 15:27:31.000000000 -0500
|
||||
+++ llist.c 2004-06-08 15:52:01.000000000 -0400
|
||||
@@ -27,7 +27,7 @@ ll_allocate( char *name )
|
||||
}
|
||||
|
||||
/* copy info into new item */
|
||||
- strcpy( new->ll_name, name );
|
||||
+ (void)strlcpy( new->ll_name, name, sizeof( new->ll_name ) );
|
||||
new->ll_next = NULL;
|
||||
|
||||
return new;
|
15
sysutils/radmind/patches/patch-lsort_c
Normal file
15
sysutils/radmind/patches/patch-lsort_c
Normal file
@ -0,0 +1,15 @@
|
||||
$OpenBSD: patch-lsort_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- lsort.c.orig 2003-09-11 10:20:03.000000000 -0400
|
||||
+++ lsort.c 2004-06-08 15:52:01.000000000 -0400
|
||||
@@ -90,9 +90,9 @@ save_it(buffer, pathname)
|
||||
struct save_line *sp;
|
||||
sp = malloc(sizeof *sp + strlen(buffer) + strlen(pathname) + 4);
|
||||
sp->key = (char*) (sp+1);
|
||||
- strcpy(sp->key, pathname);
|
||||
+ (void)strlcpy(sp->key, pathname, sizeof(sp->key));
|
||||
sp->data = (sp->key + strlen(sp->key) + 1);
|
||||
- strcpy(sp->data, buffer);
|
||||
+ (void)strlcpy(sp->data, buffer, sizeof(sp->data));
|
||||
sp->next = lines;
|
||||
lines = sp;
|
||||
++linecount;
|
14
sysutils/radmind/patches/patch-root_c
Normal file
14
sysutils/radmind/patches/patch-root_c
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-root_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- root.c.orig 2004-03-08 12:52:35.000000000 -0500
|
||||
+++ root.c 2004-06-12 23:05:03.000000000 -0400
|
||||
@@ -80,8 +80,8 @@ get_root( char *path, char *file_root, c
|
||||
return( -1 );
|
||||
}
|
||||
} else {
|
||||
- sprintf( file_root, "%s/../file", real_path );
|
||||
- sprintf( tran_root, "%s", real_path );
|
||||
+ (void)snprintf( file_root, MAXPATHLEN, "%s/../file", real_path );
|
||||
+ (void)snprintf( tran_root, MAXPATHLEN, "%s", real_path );
|
||||
}
|
||||
}
|
||||
|
18
sysutils/radmind/patches/patch-stor_c
Normal file
18
sysutils/radmind/patches/patch-stor_c
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-stor_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- stor.c.orig 2004-06-08 16:21:48.000000000 -0400
|
||||
+++ stor.c 2004-06-08 16:41:13.000000000 -0400
|
||||
@@ -449,11 +449,13 @@ n_stor_applefile( SNET *sn, char *pathde
|
||||
struct timeval tv;
|
||||
struct applefileinfo afinfo;
|
||||
off_t size;
|
||||
+ size_t len;
|
||||
|
||||
/* Setup fake apple file info */
|
||||
/* Finder Info */
|
||||
memset( &afinfo, 0, sizeof( afinfo ));
|
||||
- sprintf( afinfo.ai.ai_data + FI_CREATOR_OFFSET, "%s", "RDMD" );
|
||||
+ len = sizeof( afinfo.ai.ai_data );
|
||||
+ (void)snprintf( afinfo.ai.ai_data + FI_CREATOR_OFFSET, len - FI_CREATOR_OFFSET, "%s", "RDMD" );
|
||||
afinfo.as_ents[AS_FIE].ae_id = ASEID_FINFO;
|
||||
afinfo.as_ents[AS_FIE].ae_offset = AS_HEADERLEN +
|
||||
( 3 * sizeof( struct as_entry )); /* 62 */
|
89
sysutils/radmind/patches/patch-transcript_c
Normal file
89
sysutils/radmind/patches/patch-transcript_c
Normal file
@ -0,0 +1,89 @@
|
||||
$OpenBSD: patch-transcript_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- transcript.c.orig 2004-03-25 12:45:41.000000000 -0500
|
||||
+++ transcript.c 2004-06-08 16:29:21.000000000 -0400
|
||||
@@ -92,7 +92,7 @@ transcript_parse( struct transcript *tra
|
||||
exit( 2 );
|
||||
}
|
||||
|
||||
- strcpy( tran->t_pinfo.pi_name, epath );
|
||||
+ (void)strlcpy( tran->t_pinfo.pi_name, epath, sizeof( tran->t_pinfo.pi_name ) );
|
||||
|
||||
/* reading and parsing the line */
|
||||
switch( *argv[ 0 ] ) {
|
||||
@@ -162,7 +162,7 @@ transcript_parse( struct transcript *tra
|
||||
tran->t_fullname, tran->t_linenum );
|
||||
exit( 2 );
|
||||
}
|
||||
- strcpy( tran->t_pinfo.pi_link, epath );
|
||||
+ (void)strlcpy( tran->t_pinfo.pi_link, epath, sizeof( tran->t_pinfo.pi_link ) );
|
||||
break;
|
||||
|
||||
case 'a': /* hfs applefile */
|
||||
@@ -184,7 +184,7 @@ transcript_parse( struct transcript *tra
|
||||
exit( 2 );
|
||||
}
|
||||
}
|
||||
- strcpy( tran->t_pinfo.pi_cksum_b64, argv[ 7 ] );
|
||||
+ (void)strlcpy( tran->t_pinfo.pi_cksum_b64, argv[ 7 ], sizeof( tran->t_pinfo.pi_cksum_b64 ) );
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -581,17 +581,17 @@ transcript( char *path )
|
||||
}
|
||||
}
|
||||
|
||||
- strcpy( pi.pi_name, path );
|
||||
+ (void)strlcpy( pi.pi_name, path, sizeof( pi.pi_name ) );
|
||||
|
||||
/* if it's multiply referenced, check if it's a hardlink */
|
||||
if ( !S_ISDIR( pi.pi_stat.st_mode ) && ( pi.pi_stat.st_nlink > 1 ) &&
|
||||
(( linkpath = hardlink( &pi )) != NULL )) {
|
||||
pi.pi_type = 'h';
|
||||
- strcpy( pi.pi_link, linkpath );
|
||||
+ (void)strlcpy( pi.pi_link, linkpath, sizeof( pi.pi_link ) );
|
||||
} else if ( S_ISLNK( pi.pi_stat.st_mode )) {
|
||||
len = readlink( pi.pi_name, epath, MAXPATHLEN );
|
||||
epath[ len ] = '\0';
|
||||
- strcpy( pi.pi_link, epath );
|
||||
+ (void)strlcpy( pi.pi_link, epath, sizeof( pi.pi_link ) );
|
||||
}
|
||||
|
||||
/* By default, go into directories */
|
||||
@@ -602,7 +602,7 @@ transcript( char *path )
|
||||
}
|
||||
|
||||
/* initialize cksum field. */
|
||||
- strcpy( pi.pi_cksum_b64, "-" );
|
||||
+ (void)strlcpy( pi.pi_cksum_b64, "-", sizeof( pi.pi_cksum_b64 ) );
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
@@ -651,8 +651,8 @@ t_new( int type, char *fullname, char *s
|
||||
} else {
|
||||
new->t_eof = 0;
|
||||
new->t_linenum = 0;
|
||||
- strcpy( new->t_shortname, shortname );
|
||||
- strcpy( new->t_fullname, fullname );
|
||||
+ (void)strlcpy( new->t_shortname, shortname, sizeof( new->t_shortname ) );
|
||||
+ (void)strlcpy( new->t_fullname, fullname, sizeof( new->t_fullname ) );
|
||||
if (( new->t_in = fopen( fullname, "r" )) == NULL ) {
|
||||
perror( fullname );
|
||||
exit( 2 );
|
||||
@@ -735,7 +735,7 @@ transcript_init( char *kfile, int kfilem
|
||||
linenum, kdir, av[ 1 ] );
|
||||
exit( 2 );
|
||||
}
|
||||
- sprintf( fullpath, "%s%s", kdir, av[ 1 ] );
|
||||
+ (void)snprintf( fullpath, sizeof( fullpath ), "%s%s", kdir, av[ 1 ] );
|
||||
|
||||
switch( *av[ 0 ] ) {
|
||||
case 'p': /* positive */
|
||||
@@ -763,7 +763,7 @@ transcript_init( char *kfile, int kfilem
|
||||
"special path too long: %s%s\n", kdir, special );
|
||||
exit( 2 );
|
||||
}
|
||||
- sprintf( fullpath, "%s%s", kdir, special );
|
||||
+ (void)snprintf( fullpath, sizeof( fullpath ), "%s%s", kdir, special );
|
||||
t_new( T_SPECIAL, fullpath, special );
|
||||
}
|
||||
|
12
sysutils/radmind/patches/patch-twhich_c
Normal file
12
sysutils/radmind/patches/patch-twhich_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-twhich_c,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
--- twhich.c.orig 2004-06-08 16:29:27.000000000 -0400
|
||||
+++ twhich.c 2004-06-08 16:29:40.000000000 -0400
|
||||
@@ -239,7 +239,7 @@ main( int argc, char **argv )
|
||||
}
|
||||
|
||||
linenum = 0;
|
||||
- sprintf( prepath, "%s", "" );
|
||||
+ (void)snprintf( prepath, sizeof( prepath ), "%s", "" );
|
||||
|
||||
while( fgets( line, sizeof( line ), f ) != NULL ) {
|
||||
remove = 0;
|
22
sysutils/radmind/pkg/DEINSTALL
Normal file
22
sysutils/radmind/pkg/DEINSTALL
Normal file
@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
# $OpenBSD: DEINSTALL,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin
|
||||
PREFIX=${PKG_PREFIX:-/usr/local}
|
||||
CONFIG_DIR=/var/radmind
|
||||
|
||||
if [ "$PKG_DELETE_EXTRA" != Yes -a -d $CONFIG_DIR ]; then
|
||||
echo
|
||||
echo "+------------"
|
||||
echo "| To completely deinstall the $1 package you need to perform"
|
||||
echo "| this step as root:"
|
||||
echo "|"
|
||||
echo "| rm -rf $CONFIG_DIR"
|
||||
echo "|"
|
||||
echo "| Do not do this if you plan on re-installing $1"
|
||||
echo "| at some future time."
|
||||
echo "+------------"
|
||||
echo
|
||||
fi
|
||||
|
||||
exit 0
|
9
sysutils/radmind/pkg/DESCR
Normal file
9
sysutils/radmind/pkg/DESCR
Normal file
@ -0,0 +1,9 @@
|
||||
A suite of Unix command-line tools and a server designed to remotely
|
||||
administer the file systems of multiple Unix machines.
|
||||
|
||||
At its core, radmind operates as a tripwire. It is able to detect
|
||||
changes to any managed filesystem object, e.g. files, directories,
|
||||
links, etc. However, radmind goes further than just integrity
|
||||
checking: once a change is detected, radmind can optionally reverse
|
||||
the change.
|
||||
|
22
sysutils/radmind/pkg/PLIST
Normal file
22
sysutils/radmind/pkg/PLIST
Normal file
@ -0,0 +1,22 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2004/06/26 19:00:48 sturm Exp $
|
||||
bin/fsdiff
|
||||
bin/ktcheck
|
||||
bin/lapply
|
||||
bin/lcksum
|
||||
bin/lcreate
|
||||
bin/lfdiff
|
||||
bin/lmerge
|
||||
bin/twhich
|
||||
man/man1/fsdiff.1
|
||||
man/man1/ktcheck.1
|
||||
man/man1/lapply.1
|
||||
man/man1/lcksum.1
|
||||
man/man1/lcreate.1
|
||||
man/man1/lfdiff.1
|
||||
man/man1/lmerge.1
|
||||
man/man1/twhich.1
|
||||
man/man5/applefile.5
|
||||
man/man8/radmind.8
|
||||
sbin/radmind
|
||||
@exec mkdir -p /var/radmind/cert
|
||||
@extraunexec rm -fr /var/radmind
|
Loading…
x
Reference in New Issue
Block a user