bwcreate
Package: WA2L/edrc 1.5.57
Section: Maintenance Commands (1m)
Updated: 17 May 2007
Index
Return to Main Contents
NAME
bwcreate - create a BarbedWire file
SYNOPSIS
edrc/bin/bwcreate
[
-h
]
bwcreate
-s
[
-f
] [
-p profile
] [
-c config_file
] [
-o outputfile
]
AVAILABILITY
WA2L/edrc
DESCRIPTION
Create a BarbedWire file that contains file properties and checksum of files on
filesystems defined in the
bwcreate.cfg(4)
file. The BarbedWire file is used to track changes on (operating system) files.
The intention is to create a BarbedWire file for a system files in regular intervals.
Doing this it is possible to track for files whose credentials changed. This might
help to detect system intrusion or to find causes of system problems.
bwcreate
saves all information in a compressed format to the BarbedWire file. The contents of the
BarbedWire file can be listed using the
lscomp(1),
llcomp(1)
and
catcomp(1)
commands.
OPTIONS
- -h
-
usage message.
- -s
-
start BarbedWire file creation
- -f
-
force overwriting of output file
- -l
-
list all profiles defined in the configuration file.
- -c config_file
-
configuration file for
bwcreate.
Default configuration file is
edrc/etc/bwcreate.cfg.
- -o output_file
-
output filename, the BarbedWire file, without the
.bw
suffix.
- -p profile
-
Profile (=set of options) to be used to create the BarbedWire file. If
this option is not specified the profile with the name
default
is used.
FILE FORMAT
The BarbedWire file version 100 consists of a
HEADER
and a
FILELIST
section. Use
lscomp(1),
llcomp(1)
and
catcomp(1)
to display the contents of a BarbedWire (
.bw
) file.
HEADER
The header of the BarbedWire file consists of the entries explained below.
The fileformat is
OPTION=VALUE
. Between the
OPTION,
the
=
and the
VALUE
are no spaces.
Each
OPTION
is on a separate line. The sequence of the
OPTION
entries is as explained below, but can change without notice. Therefore, if you write
programs that resolve the
OPTION
do not rely on the
sequence.
- APPLICATION
-
Name of the application that created the file. This setting is set to
BarbedWire.
- FILEVERSION
-
Version of the BarbedWire file format.
- HOSTNAME
-
Hostname where the BarbedWire file has been created.
- PROFILE
-
Profile specified with the
-p
option.
- DESCRIPTION
-
Description text of the profile.
- CREATED
-
Date and time when the BarbedWire file has been created. The Format is:
YYYYMMDDhhmmss.
- CREATED_BY
-
Command that created the BarbedWire file. This setting is set to
bwcreate.
- ENVIRONMENT
-
Server environment where the BarbedWire file has been created. This
setting is resolved by
bwcreate
using the
server_environment
command.
- ENVIRONMENT_DESCRIPTION
-
Detail description of the
ENVIRONMENT.
This setting is resolved by
bwcreate
using the
server_environment -d
command.
- OSID
-
Osid, see
osid(3),
of the system where the BarbedWire file has been created.
- UNAME
-
System information of the system where the BarbedWire file has been created.
This setting equals to the
uname -a
command output.
- USER
-
User that created the BarbedWire file.
- CONFIGFILE
-
Configuration file used to create the BarbedWire file.
- FILESYSTEMS
-
List of filesystems whose files are resolved and part of the
FILELIST.
- OUTPUT_DIRECTORY
-
Output directory where the BarbedWire file has been written to during creation.
- OUTPUT_FILE
-
Output file name (BarbedWire file name) during creation.
FILELIST
The file list section of the Barbed Wire file consists of the lines explained below.
The first line in the
FILELIST
section is a header listing all fields that are present for all files
in the filelist separated by a
;
. All following lines are file entries. The filelist header defines the sequence
and the name of the fields. Therefore, if you write programs that resolve the
FILELIST
of a BarbedWire file use the filelist header entry to resolve the fields of the
filelist entries and do not rely on the sequence documented here, due to the fact that this
sequence can change without notice.
- TYPE
-
File type:
-
- f
-
file
- d
-
directory
- c
-
Character oriented device file (special file)
- b
-
Block oriented device file (special file)
- PERM_OWNER
-
Symbolic permission representation for the file owner.
See
chmod(1)
for more information.
- PERM_GROUP
-
Symbolic permission representation for the file group.
See
chmod(1)
for more information.
- PERM_OTHER
-
Symbolic permission representation for the others file permissions.
See
chmod(1)
or
ls(1)
for more information.
- CHECKSUM
-
MD5 checksum of the file.
See
md5sum(1)
for more information.
- INODE
-
Inode number of the file.
See
ls(1)
or
stat(1)
for more information.
- BLOCKS
-
Number of blocks on the filesystem used by the file.
See
ls(1)
or
stat(1)
for more information.
- PERM_ALL
-
Complete file permission settings of the file.
See
chmod(1)
or
ls(1)
for more information.
- REF
-
Number of references to a file.
See
ls(1)
or
stat(1)
for more information.
- OWNER
-
Owner of the file.
See
chown(1)
or
ls(1)
for more information.
- GROUP
-
Group of the file.
See
chgrp(1)
or
ls(1)
for more information.
- BITES
-
Size of the file in bytes.
See
ls(1)
or
stat(1)
for more information.
- NODE
-
Node of the file. This applies to special files only.
See
mknod(1)
or
ls(1)
for more information.
- MTIME
-
Modification time of the file.
See
ls(1)
or
stat(1)
for more information.
- FILE
-
File name.
ENVIRONMENT
-
EXIT STATUS
- 0
-
no error.
- 2
-
operating system is not supported. See
osid(3)
if you get this error.
- 3
-
profile specified in the
-p
option is not defined in the configuration file.
- 4
-
usage listed.
- 5
-
bwcreate
has been aborted pressing Ctrl+C or by issuing
kill bwcreate_pid
.
- 6
-
configuration file
edrc/etc/bwcreate.cfg
does not exist.
- 7
-
output file already exists.
- 8
-
cannot write to the logfile.
FILES
- edrc/etc/bwcreate.cfg
-
default configuration file for
bwcreate.
- edrc/var/log/
-
default logfile location of
bwcreate.
- edrc/var/barbedwire/cache/bwcreate.duration
-
record of durations of past runs of
bwcreate
to calculate the completion estimation.
- .bw
-
BarbedWire output file suffix. The content of a BarbedWire file
can be listed using
lscomp,
llcomp
and
catcomp.
EXAMPLES
- 1) display contents of a BarbedWire file
-
Display contents:
[ /dat/tmp ]
[ root@rh7mzv7t001 ][*edrc*/bash]: lscomp rh7mzv7t001.bw
HEADER
FILELIST
[ /dat/tmp ]
[ root@rh7mzv7t001 ][*edrc*/bash]: llcomp rh7mzv7t001.bw
root 2007-03-11 12:41:07 HEADER
root 2007-03-11 12:41:07 FILELIST
Display header:
[ /dat/tmp ]
[ root@rh7mzv7t001 ][*edrc*/bash]: catcomp rh7mzv7t001.bw HEADER
APPLICATION=BarbedWire
FILEVERSION=100
HOSTNAME=rh7mzv7t001
PROFILE=dvlp_serial
DESCRIPTION=Development (serial execution)
CREATED=20070311124107
CREATED_BY=bwcreate
ENVIRONMENT=EDRC_DVLP
ENVIRONMENT_DESCRIPTION=Beringen, EDRC Development
OSID=Linux
UNAME=Linux rh7mzv7t001 2.4.7-10 #1 Thu Sep 6 17:27:27 EDT 2001 i686 unknown
USER=root
CONFIGFILE=/opt/edrc/etc/bwcreate.cfg
FILESYSTEMS=/etc/gnome /tmp /usr/local/bin /usr/local/lib
OUTPUT_DIRECTORY=/dat/tmp
OUTPUT_FILE=rh7mzv7t001_20070311124107.bw
Display filelist:
[ /dat/tmp ]
[ root@rh7mzv7t001 ][*edrc*/bash]: catcomp rh7mzv7t001.bw FILELIST
TYPE;PERM_OWNER;PERM_GROUP;PERM_OTHER;CHECKSUM;INODE;BLOCKS;PERM_ALL;REF;OWNER;GROUP;BITES;NODE;MTIME;FILE
d;rwx;r-x;r-x;;114135;4;drwxr-xr-x;4;root;root;4096;;2004-05-05 12:46:48;/etc/gnome
d;rwx;r-x;r-x;;241414;4;drwxr-xr-x;2;root;root;4096;;2004-05-05 12:45:53;/etc/gnome/fonts
f;rw-;r--;r--;7afdb668ef553f5176736ff5081e3f13;241462;32;-rw-r--r--;1;root;root;30153;;2004-05-05 12:45:54;/etc/gnome/fonts/fontmap2
:
:
- 2) formatted display of BarbedWire filelist
-
[ /dat/tmp ]
[ root@rh7mzv7t001 ][*edrc*/bash]: catcomp rh7mzv7t001.bw FILELIST |\
print_list | more
TYPE PERM_OWNER PERM_GROUP PERM_OTHER CHECKSUM >>
---- ---------- ---------- ---------- ---------------------------->>
d rwx r-x r-x >>
d rwx r-x r-x >>
f rw- r-- r-- 7afdb668ef553f5176736ff5081e>>
--More--
SEE ALSO
bwcompare(1),
bwcreate.cfg(4),
catcomp(1),
chgrp(1),
chmod(1),
edrcintro(1),
ls(1),
lscomp(1),
llcomp(1),
mknod(1),
more(1),
print_list(3),
stat(1)
NOTES
-
BUGS
-
AUTHOR
bwcreate was developed by Christian Walther. Send suggestions
and bug reports to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2008
Christian Walther
This is free software; see
edrc/doc/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 00:13:55 GMT, March 08, 2025