Commit b81fba87 authored by Christoph Biedl's avatar Christoph Biedl Committed by Tobias Frost

Import Debian changes 3.11.0-0.1~exp1

logrotate (3.11.0-0.1~exp1) experimental; urgency=medium

  * Non-maintainer upload to experimental
  * New upstream version 3.11.0  Closes: #734688
  * Refresh patch queue
    - Now upstream:
      + datehack.patch
      + mktime-718332.patch
      + man-su-explanation-729315.patch
    - deb-config-h.patch: New way to enforce status file location
  * Update watch file. Closes: #844578
  * Update Homepage: information
  * Allow failure in the clean target
  * Fix broken test suite runner
parents 50a69c57 1e4d46c8
This diff is collapsed.
This diff is collapsed.
......@@ -2,11 +2,11 @@ The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code
2. Configure logrotate using `./autogen.sh' and `./configure'.
2. Configure logrotate using `./configure'.
3. Type `make' to compile the package.
4. Optionally, type `make test' to run any self-tests that come with
4. Optionally, type `make check' to run any self-tests that come with
the package.
5. Type `make install' to install the programs and any data files and
......@@ -19,5 +19,5 @@ The simplest way to compile this package is:
If you want to add the Access Control List (ACL) support to the program
use `./configure --with-acl=yes' at the point 2.
If you want to add the NSA Security-Enhanced Linux (SELinux) support to
If you want to add the NSA Security-Enhanced Linux (SELinux) support to
the program use `./configure --with-selinux=yes' at the point 2.
MAN = logrotate.8
MAN5 = logrotate.conf.5
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
AM_CFLAGS = -Wall -Werror
sbin_PROGRAMS = logrotate
logrotate_SOURCES = logrotate.c log.c config.c basenames.c
install-data-local:
$(AM_V_at)$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(AM_V_at)$(INSTALL) -d $(DESTDIR)$(mandir)/man5
$(AM_V_at)$(INSTALL) -m 644 @srcdir@/logrotate.8 $(DESTDIR)$(mandir)/man8
$(AM_V_at)$(INSTALL) -m 644 @srcdir@/logrotate.conf.5 $(DESTDIR)$(mandir)/man5
uninstall-local:
$(AM_V_at)rm -f $(DESTDIR)$(mandir)/man8/logrotate.8
$(AM_V_at)rm -f $(DESTDIR)$(mandir)/man5/logrotate.conf.5
SUBDIRS = test
logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
basenames.h config.h log.h logrotate.h queue.h
dist_man_MANS = logrotate.8 logrotate.conf.5
dist_noinst_DATA = logrotate.spec
EXTRA_DIST = ChangeLog.md README.md autogen.sh examples
# deprecated hard-wired Makefile, will be removed eventually
EXTRA_DIST += Makefile.legacy
# the dot ensures that logrotate is built before it is tested
SUBDIRS = . test
# for compatibility with older releases of logrotate
test: check
.PHONY: srpm rpm
rpm: srpm
rpmbuild $(RPM_FLAGS) -ta $(distdir).tar.gz
srpm: dist
rpmbuild $(RPM_FLAGS) -ts $(distdir).tar.gz
This diff is collapsed.
VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
OS_NAME = $(shell uname -s)
LFS = $(shell echo `getconf LFS_CFLAGS 2>/dev/null`)
CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" -DHAVE_STRPTIME=1 -DHAVE_QSORT -DHAVE_STRUCT_STAT_ST_BLOCKS -DHAVE_STRUCT_STAT_ST_BLKSIZE $(RPM_OPT_FLAGS) $(LFS)
CFLAGS = -Wall -D_GNU_SOURCE -D$(OS_NAME) -DVERSION=\"$(VERSION)\" -DHAVE_STRPTIME=1 -DHAVE_QSORT -DHAVE_STRUCT_STAT_ST_BLOCKS -DHAVE_STRUCT_STAT_ST_BLKSIZE -DHAVE_VSYSLOG $(RPM_OPT_FLAGS) $(LFS)
PROG = logrotate
MAN = logrotate.8
MAN5 = logrotate.conf.5
......
How to build and install logrotate on HP-UX 11.00 (these instructions should
also work on HP-UX 10.20):
1. Obtain and install the following GNU packages for HP-UX:
binutils 2.9.1
gcc 2.95.2
make 3.78.1
I used the packages at the Software Porting and Archive Centre for HP-UX
at http://hpux.cs.utah.edu/.
Obtain and install the following GNU/Linux to HP-UX Porting package:
libhplx library
See http://devresource.hp.com/LPK/index.html for downloads.
This library is needed to provide the ??? function.
2. Obtain, build, and install popt 1.4 (there doesn't seem to be a build at
the Porting Centre.)
See ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.0.x/popt-1.6.4.tar.gz
Install it into the directory of your choice (i.e.
"./configure --prefix=/opt/popt").
3. Build logrotate, telling it where to find popt and hplx installation. The
POPT_DIR defaults to /usr/local and HPLX_DIR defaults to /usr/local/hplx:
gmake POPT_DIR=/usr/local HPLX_DIR=/usr/local/hplx
4. Install logrotate into your desired directory (BASEDIR defaults to
/usr/local):
gmake install BASEDIR=/usr/local
5. Copy the configuration files into your desired location.
cp examples/logrotate-default /etc/logrotate.conf
mkdir /etc/logrotate.d
6. Set up a cron job to run logrotate daily. See examples/logrotate.cron.
7. I also recommend setting CLEAN_ADM=0 in /etc/rc.config.d/clean, and
setting up an init script to use logrotate for this instead. This way,
logrotate manages all logfile pruning.
Questions, comments, abuse to:
Paul D. Gear <citecpdg@citec.qld.gov.au>, <paulgear@bigfoot.com>
Danial M. Howard <howadani@isu.edu>, <dmhoward@byu.edu>
Steps to build and install logrotate on Solaris 2.6
1. Obtain and install the following GNU packages from http://Sunfreeware.com:
gcc 2.95.2
make 3.80
popt-1.6.3
2. Build and install logrotate:
gmake
gmake install
OBS.: If you want to use the test script on Solaris 2.6, you'll need to have
bash installed, adjust the path after the sha-bang (#!) properly and
substitute the sintax $(...) for backticks `...` in all
"test-config.?.in" files.
--
Fidelis Assis <fidelis@embratel.net.br>
# logrotate
The logrotate utility is designed to simplify the administration of log files on a system which generates a lot of log files. Logrotate allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size.
## Download
The latest release is:
* [logrotate-3.11.0](https://github.com/logrotate/logrotate/releases/download/3.11.0/logrotate-3.11.0.tar.xz) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.11.0))
Previous releases:
* [logrotate-3.10.0](https://github.com/logrotate/logrotate/releases/download/3.10.0/logrotate-3.10.0.tar.gz) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.10.0))
* [logrotate-3.9.2](https://github.com/logrotate/logrotate/releases/download/3.9.2/logrotate-3.9.2.tar.gz) ([Changelog](https://github.com/logrotate/logrotate/releases/tag/3.9.2))
* [logrotate-3.9.1](https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.9.1.tar.gz)
* [logrotate-3.9.0](https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.9.0.tar.gz)
* [logrotate-3.8.9](https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.9.tar.gz)
* [logrotate-3.8.8](https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.8.tar.gz)
* [logrotate-3.8.7](https://fedorahosted.org/releases/l/o/logrotate/logrotate-3.8.7.tar.gz)
# Patches and Questions
Open issues or pull requests on GitHub.
This diff is collapsed.
......@@ -1003,16 +1003,6 @@ initialize ( ) {
fi
done
##########################################
# make sure certain required files exist #
##########################################
for file in AUTHORS COPYING ChangeLog INSTALL NEWS README ; do
if test ! -f $file ; then
$VERBOSE_ECHO "Touching ${file} since it does not exist"
touch $file
fi
done
##################################################
# make sure certain generated files do not exist #
##################################################
......
#! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2012-10-14.11; # UTC
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
This diff is collapsed.
......@@ -8,23 +8,28 @@
#define DEFAULT_MAIL_COMMAND "/usr/bin/mailx"
#define COMPRESS_COMMAND "/usr/contrib/bin/gzip"
#define UNCOMPRESS_COMMAND "/usr/contrib/bin/gunzip"
#ifndef STATEFILE
#define STATEFILE "/var/run/logrotate.status"
#endif /* STATEFILE */
#endif
#ifdef SunOS
#define DEFAULT_MAIL_COMMAND "/usr/bin/mailx"
#define STATEFILE "/var/log/logrotate.status"
#endif
#ifdef __NetBSD__
#define DEFAULT_MAIL_COMMAND "/usr/bin/mail -s"
#define COMPRESS_COMMAND "/usr/bin/gzip"
#define UNCOMPRESS_COMMAND "/usr/bin/gunzip"
#define STATEFILE "/var/log/logrotate.status"
#endif
#if defined(__APPLE__) && defined(__MACH__)
#define COMPRESS_COMMAND "/usr/bin/gzip"
#define UNCOMPRESS_COMMAND "/usr/bin/gunzip"
#endif
/*
* Default settings for Linux - leave these last.
* Default settings (mainly for Linux) - leave these last.
*/
#ifndef DEFAULT_MAIL_COMMAND
#define DEFAULT_MAIL_COMMAND "/bin/mail"
......
This diff is collapsed.
AC_INIT([logrotate],[3.9.1])
AC_INIT([logrotate],[3.11.0])
dnl foreign: Do not require AUTHORS, ChangeLog, NEWS, and README to exist
dnl serial-tests: Do not hide standard output of our sequential test-suite
AM_INIT_AUTOMAKE([foreign serial-tests])
AM_INIT_AUTOMAKE
AC_DEFINE(_GNU_SOURCE)
AM_EXTRA_RECURSIVE_TARGETS([test])
......@@ -10,9 +13,15 @@ AC_PROG_CC_STDC
AC_STRUCT_ST_BLKSIZE
AC_STRUCT_ST_BLOCKS
dnl Use 64-bit file offsets on 32-bit systems (defines C macros if necessary)
AC_SYS_LARGEFILE
AC_CHECK_LIB([popt],[poptParseArgvString],,
AC_MSG_ERROR([libpopt required but not found]))
dnl Needed for out-of-source builds
mkdir -p test
AC_ARG_WITH([selinux],
[AS_HELP_STRING([--with-selinux],
[support handling SELinux contexts (yes,no,check) @<:@default=check@:>@])],
......@@ -37,8 +46,26 @@ AS_CASE(["$with_acl"],
AS_IF([test "$ac_cv_lib_acl_acl_get_file" = yes],
echo "1" > ./test/test.ACL;, echo "0" > ./test/test.ACL;)
AC_ARG_WITH([state-file-path],
AC_HELP_STRING([--with-state-file-path=PATH],
[path to state file (/var/lib/logrotate.status by default)]),
[
case "$withval" in
yes|no)
AC_MSG_ERROR([--with-state-file-path=PATH requires a path to be specified])
;;
*)
STATE_FILE_PATH="$withval"
;;
esac
],
[
STATE_FILE_PATH="/var/lib/logrotate.status"
])
AC_DEFINE_UNQUOTED([STATEFILE], "$STATE_FILE_PATH")
AC_SUBST(STATE_FILE_PATH)
AC_CHECK_FUNCS([strptime qsort fork vfork madvise])
AC_CHECK_FUNCS([asprintf fork madvise qsort strndup strptime vfork vsyslog])
AC_CONFIG_FILES([Makefile test/Makefile])
AC_CONFIG_FILES([Makefile test/Makefile logrotate.8 logrotate.spec])
AC_OUTPUT
logrotate (3.9.1-1~exp1) experimental; urgency=medium
* New upstream release
- Change in build system requires autoconf/autotools.
- Unfortunately it doesn't clean up correctly, so have
to add some files to debian/clean.
* Patches changed:
- manpage.patch: Most corrections adopted upstream.
* Patches dropped:
- mktime-718332.patch: Adopted upstream.
- man-su-explanation-729315.patch: Adopted upstream.
- cpp-crossbuild.patch: Upstream has moved to autoconf.
* Patches added:
- remove-makefile.patch: Make build system clean for source
format 3.0 (quilt), as upstream have left original Makefile
in tarball.
-- Paul Martin <pm@debian.org> Mon, 24 Aug 2015 16:02:17 +0100
logrotate (3.11.0-0.1~exp1) experimental; urgency=medium
* Non-maintainer upload to experimental
* New upstream version 3.11.0 Closes: #734688
* Refresh patch queue
- Now upstream:
+ datehack.patch
+ mktime-718332.patch
+ man-su-explanation-729315.patch
- deb-config-h.patch: New way to enforce status file location
* Update watch file. Closes: #844578
* Update Homepage: information
* Allow failure in the clean target
* Fix broken test suite runner
-- Christoph Biedl <debian.axhn@manchmal.in-ulm.de> Thu, 29 Dec 2016 20:51:10 +0100
logrotate (3.8.7-2) unstable; urgency=low
......
Makefile
aclocal.m4
AUTHORS
ChangeLog
compile
configure
depcomp
install-sh
Makefile.in
missing
NEWS
README
test/Makefile.in
test/test.example
test/test.ACL
test/test.SELINUX
......@@ -3,10 +3,9 @@ Section: admin
Priority: important
Maintainer: Paul Martin <pm@debian.org>
Build-Depends: libpopt-dev, debhelper (>= 9),
libselinux1-dev [linux-any], libacl1-dev [linux-any],
autoconf, automake, libtool
libselinux1-dev [linux-any], libacl1-dev [linux-any]
Vcs-Svn: http://svn.fedorahosted.org/svn/logrotate/
Homepage: https://fedorahosted.org/logrotate/
Homepage: https://github.com/logrotate/logrotate
Standards-Version: 3.9.6
Package: logrotate
......
Index: logrotate-3.7.9/config.c
===================================================================
--- logrotate-3.7.9.orig/config.c 2011-06-22 15:40:42.727459027 +0100
+++ logrotate-3.7.9/config.c 2011-06-22 15:50:46.047374110 +0100
@@ -165,7 +165,7 @@
static int checkFile(const char *fname)
{
int i;
- char pattern[PATH_MAX];
+ char *pattern;
/* Check if fname is '.' or '..'; if so, return false */
if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
@@ -173,15 +173,17 @@
/* Check if fname is ending in a taboo-extension; if so, return false */
for (i = 0; i < tabooCount; i++) {
- snprintf(pattern, sizeof(pattern), "*%s", tabooExts[i]);
+ asprintf(&pattern, "*%s", tabooExts[i]);
if (!fnmatch(pattern, fname, 0))
{
message(MESS_DEBUG, "Ignoring %s, because of %s ending\n",
fname, tabooExts[i]);
+ free(pattern);
return 0;
}
}
+ free(pattern);
/* All checks have been passed; return true */
return 1;
}
Index: logrotate-3.9.1/logrotate.c
Index: logrotate.git/logrotate.c
===================================================================
--- logrotate-3.9.1.orig/logrotate.c 2015-08-24 14:40:38.162011596 +0100
+++ logrotate-3.9.1/logrotate.c 2015-08-24 14:40:38.162011596 +0100
@@ -381,8 +381,12 @@
--- logrotate.git.orig/logrotate.c 2016-12-29 02:36:21.851158797 +0100
+++ logrotate.git/logrotate.c 2016-12-29 02:36:21.848158800 +0100
@@ -496,8 +496,12 @@
if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) {
message(MESS_ERROR, "error setting mode of %s: %s\n",
fileName, strerror(errno));
......