|
From: <gi...@ba...> - 2012-10-10 15:23:13
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Bacula Community source".
The branch, Branch-5.2 has been updated
via 8da9b14bbf06de05b8c4b93247c373c1a80cf04f (commit)
via e038efee17a82749943b2f6c8a4d0e3f585b36d2 (commit)
from a71e3a7fb7c38a6067ed27337b23eef9558da321 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 8da9b14bbf06de05b8c4b93247c373c1a80cf04f
Author: Marco van Wieringen <mv...@pl...>
Date: Wed Oct 10 16:15:28 2012 +0200
Recompile configure.in
commit e038efee17a82749943b2f6c8a4d0e3f585b36d2
Author: Marco van Wieringen <mv...@pl...>
Date: Wed Oct 10 16:13:25 2012 +0200
Implement feature request #1939
ACL and XATTR support for GNU/Hurd and autoconf support for
detecting GNU Hurd and setting the correct DISTNAME etc. and
proper platform support for GNU hurd.
-----------------------------------------------------------------------
Summary of changes:
diff --git a/bacula/autoconf/acconfig.h b/bacula/autoconf/acconfig.h
index 40a91d7..4c5f8dd 100644
--- a/bacula/autoconf/acconfig.h
+++ b/bacula/autoconf/acconfig.h
@@ -143,6 +143,7 @@
#undef HAVE_CYGWIN
#undef HAVE_OSF1_OS
#undef HAVE_DARWIN_OS
+#undef HAVE_HURD_OS
/* Set to correct scanf value for long long int */
#undef lld
diff --git a/bacula/autoconf/bacula-macros/os.m4 b/bacula/autoconf/bacula-macros/os.m4
index 2833e4d..1af4f90 100644
--- a/bacula/autoconf/bacula-macros/os.m4
+++ b/bacula/autoconf/bacula-macros/os.m4
@@ -62,6 +62,14 @@ else
BA_CONDITIONAL(HAVE_SUN_OS, $FALSEPRG)
fi
+if test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+ BA_CONDITIONAL(HAVE_HURD_OS, $TRUEPRG)
+ AC_DEFINE(HAVE_HURD_OS)
+else
+ BA_CONDITIONAL(HAVE_HURD_OS, $FALSEPRG)
+fi
+
if test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
then
BA_CONDITIONAL(HAVE_OSF1_OS, $TRUEPRG)
@@ -168,6 +176,9 @@ then
elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
then
DISTNAME=solaris
+elif test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+ DISTNAME=hurd
elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
then
DISTNAME=freebsd
diff --git a/bacula/autoconf/config.h.in b/bacula/autoconf/config.h.in
index 731ca0a..4ce9ed2 100644
--- a/bacula/autoconf/config.h.in
+++ b/bacula/autoconf/config.h.in
@@ -143,6 +143,7 @@
#undef HAVE_CYGWIN
#undef HAVE_OSF1_OS
#undef HAVE_DARWIN_OS
+#undef HAVE_HURD_OS
/* Set to correct scanf value for long long int */
#undef lld
diff --git a/bacula/autoconf/configure.in b/bacula/autoconf/configure.in
index 7931835..de09194 100644
--- a/bacula/autoconf/configure.in
+++ b/bacula/autoconf/configure.in
@@ -3152,6 +3152,16 @@ freebsd)
platforms/freebsd/bacula-dir"
largefile_support="yes"
;;
+hurd)
+ DISTVER=`uname -r`
+ TAPEDRIVE="/dev/nst0"
+ PSCMD="ps -e -o pid,command"
+ PFILES="${PFILES} \
+ platforms/hurd/Makefile \
+ platforms/hurd/bacula-fd \
+ platforms/hurd/bacula-sd \
+ platforms/hurd/bacula-dir"
+ ;;
hpux)
PSCMD="UNIX95=1; ps -e -o pid,comm"
CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
diff --git a/bacula/configure b/bacula/configure
index 32109ee..9b14d32 100755
--- a/bacula/configure
+++ b/bacula/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for bacula 5.2.11.
+# Generated by GNU Autoconf 2.68 for bacula 5.2.12.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -567,8 +567,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='bacula'
PACKAGE_TARNAME='bacula'
-PACKAGE_VERSION='5.2.11'
-PACKAGE_STRING='bacula 5.2.11'
+PACKAGE_VERSION='5.2.12'
+PACKAGE_STRING='bacula 5.2.12'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -771,6 +771,8 @@ HAVE_AIX_OS_FALSE
HAVE_AIX_OS_TRUE
HAVE_OSF1_OS_FALSE
HAVE_OSF1_OS_TRUE
+HAVE_HURD_OS_FALSE
+HAVE_HURD_OS_TRUE
HAVE_SUN_OS_FALSE
HAVE_SUN_OS_TRUE
INCLUDE_UNINSTALL_TARGET
@@ -1559,7 +1561,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures bacula 5.2.11 to adapt to many kinds of systems.
+\`configure' configures bacula 5.2.12 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1628,7 +1630,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of bacula 5.2.11:";;
+ short | recursive ) echo "Configuration of bacula 5.2.12:";;
esac
cat <<\_ACEOF
@@ -1831,7 +1833,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-bacula configure 5.2.11
+bacula configure 5.2.12
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2761,7 +2763,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by bacula $as_me 5.2.11, which was
+It was created by bacula $as_me 5.2.12, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -16794,6 +16796,31 @@ else
fi
fi
+if test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+
+
+if $TRUEPRG; then
+ HAVE_HURD_OS_TRUE=
+ HAVE_HURD_OS_FALSE='#'
+else
+ HAVE_HURD_OS_TRUE='#'
+ HAVE_HURD_OS_FALSE=
+fi
+ $as_echo "#define HAVE_HURD_OS 1" >>confdefs.h
+
+else
+
+
+if $FALSEPRG; then
+ HAVE_HURD_OS_TRUE=
+ HAVE_HURD_OS_FALSE='#'
+else
+ HAVE_HURD_OS_TRUE='#'
+ HAVE_HURD_OS_FALSE=
+fi
+fi
+
if test $HAVE_UNAME=yes -a x`uname -s` = xOSF1
then
@@ -17087,6 +17114,9 @@ then
elif test $HAVE_UNAME=yes -a x`uname -s` = xSunOS
then
DISTNAME=solaris
+elif test $HAVE_UNAME=yes -a x`uname -s` = xGNU
+then
+ DISTNAME=hurd
elif test $HAVE_UNAME=yes -a x`uname -s` = xFreeBSD
then
DISTNAME=freebsd
@@ -30697,6 +30727,16 @@ freebsd)
platforms/freebsd/bacula-dir"
largefile_support="yes"
;;
+hurd)
+ DISTVER=`uname -r`
+ TAPEDRIVE="/dev/nst0"
+ PSCMD="ps -e -o pid,command"
+ PFILES="${PFILES} \
+ platforms/hurd/Makefile \
+ platforms/hurd/bacula-fd \
+ platforms/hurd/bacula-sd \
+ platforms/hurd/bacula-dir"
+ ;;
hpux)
PSCMD="UNIX95=1; ps -e -o pid,comm"
CFLAGS="${CFLAGS} -D_XOPEN_SOURCE_EXTENDED=1"
@@ -31455,7 +31495,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by bacula $as_me 5.2.11, which was
+This file was extended by bacula $as_me 5.2.12, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -31521,7 +31561,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-bacula config.status 5.2.11
+bacula config.status 5.2.12
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/bacula/platforms/Makefile.in b/bacula/platforms/Makefile.in
index bba619b..fedcde3 100644
--- a/bacula/platforms/Makefile.in
+++ b/bacula/platforms/Makefile.in
@@ -11,7 +11,7 @@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL = @INSTALL@
-SUBDIRS = freebsd redhat solaris unknown openbsd osx irix gentoo \
+SUBDIRS = hurd freebsd redhat solaris unknown openbsd osx irix gentoo \
debian darwin aix bsdi mandrake slackware alpha ubuntu systemd
MAKE = make
diff --git a/bacula/platforms/hurd/Makefile.in b/bacula/platforms/hurd/Makefile.in
new file mode 100644
index 0000000..c8f392e
--- /dev/null
+++ b/bacula/platforms/hurd/Makefile.in
@@ -0,0 +1,88 @@
+#
+# This file is used as the template to create the
+# Makefile for the Debian GNU Hurd specific installation.
+#
+# 21 March 2008 -- Kern Sibbald
+#
+# for Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ -m 754
+
+nothing:
+
+install: install-autostart
+
+install-autostart: install-autostart-fd install-autostart-sd install-autostart-dir
+
+install_logrotate:
+ @$(INSTALL_PROGRAM) ../../scripts/logrotate $(DESTDIR)/etc/logrotate.d/bacula
+
+install-autostart-fd: uninstall-autostart-fd
+ @echo "Installing bacula-fd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-fd $(DESTDIR)/etc/init.d/bacula-fd
+ @echo "Installing bacula-fd symlinks ..."
+ @if test x$(DESTDIR) = x ; then \
+ /usr/sbin/update-rc.d bacula-fd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-sd: uninstall-autostart-sd
+ @echo "Installing bacula-sd boot script ..."
+ @$(INSTALL_PROGRAM) bacula-sd $(DESTDIR)/etc/init.d/bacula-sd
+ @echo "Installing bacula-sd symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-sd start 91 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+install-autostart-dir: uninstall-autostart-dir
+ @echo "Installing bacula-dir boot script ..."
+ @$(INSTALL_PROGRAM) bacula-dir $(DESTDIR)/etc/init.d/bacula-dir
+ @echo "Installing bacula-dir symlinks ..."
+ @if test "x$(DESTDIR)" = "x" ; then \
+ /usr/sbin/update-rc.d bacula-dir start 90 2 3 4 5 . stop 9 0 1 6 .; \
+ fi
+
+
+uninstall: uninstall-autostart
+
+uninstall-autostart: uninstall-autostart-fd uninstall-autostart-sd uninstall-autostart-dir
+
+uninstall-logrotate:
+ @rm -f $(DESTDIR)/etc/logrotate.d/bacula
+
+uninstall-autostart-fd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-fd; then \
+ /etc/init.d/bacula-fd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-fd; \
+ /usr/sbin/update-rc.d bacula-fd remove; \
+ fi
+
+
+uninstall-autostart-sd:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-sd; then \
+ /etc/init.d/bacula-sd stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-sd; \
+ /usr/sbin/update-rc.d bacula-sd remove; \
+ fi
+
+uninstall-autostart-dir:
+ @if test "x$(DESTDIR)" = "x" -a -f /etc/init.d/bacula-dir; then \
+ /etc/init.d/bacula-dir stop; \
+ rm -f $(DESTDIR)/etc/init.d/bacula-dir; \
+ /usr/sbin/update-rc.d bacula-dir remove; \
+ fi
+ @rm -f $(DESTDIR)/etc/init.d/bacula-dir
+
+clean:
+ @rm -f 1 2 3
+
+distclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
+
+devclean: clean
+ @rm -f Makefile
+ @rm -f bacula-sd bacula-fd bacula-dir
diff --git a/bacula/platforms/hurd/bacula-dir.in b/bacula/platforms/hurd/bacula-dir.in
new file mode 100644
index 0000000..88c13a3
--- /dev/null
+++ b/bacula/platforms/hurd/bacula-dir.in
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-dir
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Director daemon at boot time
+# Description: Enable @BACULA@ Director.
+### END INIT INFO
+#
+
+NAME="bacula-dir"
+DESC="@BACULA@ Director"
+DAEMON=@sbindir@/${NAME}
+BUSER=@dir_user@
+BGROUP=@dir_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@dir_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
diff --git a/bacula/platforms/hurd/bacula-fd.in b/bacula/platforms/hurd/bacula-fd.in
new file mode 100644
index 0000000..270950a
--- /dev/null
+++ b/bacula/platforms/hurd/bacula-fd.in
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-fd
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Client daemon at boot time
+# Description: Enable @BACULA@ Client.
+### END INIT INFO
+
+
+NAME="bacula-fd"
+DESC="@BACULA@ File Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@fd_user@
+BGROUP=@fd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@fd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
diff --git a/bacula/platforms/hurd/bacula-sd.in b/bacula/platforms/hurd/bacula-sd.in
new file mode 100644
index 0000000..ff1ad29
--- /dev/null
+++ b/bacula/platforms/hurd/bacula-sd.in
@@ -0,0 +1,73 @@
+#! /bin/sh
+#
+# bacula This shell script takes care of starting and stopping
+# the bacula Director daemon on Debian GNU Hurd systems.
+#
+# Kern E. Sibbald - 21 March 2008
+#
+# For Bacula release @VERSION@ (@DATE@) -- @DISTNAME@
+#
+### BEGIN INIT INFO
+# Provides: bacula-sd
+# Required-Start: $network
+# Required-Stop: $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Start @BACULA@ Storage daemon at boot time
+# Description: Enable @BACULA@ Storage daemon.
+### END INIT INFO
+
+
+NAME="bacula-sd"
+DESC="@BACULA@ Storage Daemon"
+DAEMON=@sbindir@/${NAME}
+BUSER=@sd_user@
+BGROUP=@sd_group@
+BOPTIONS="-c @sysconfdir@/${NAME}.conf"
+BPORT=@sd_port@
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+test -f $DAEMON || exit 0
+
+if [ -n "`getent services ${NAME}`" ]; then
+ BPORT=`getent services ${NAME} | awk '{ gsub("/tcp","",$2); print $2; }'`
+fi
+
+if [ -f /etc/default/$NAME ]; then
+ . /etc/default/$NAME
+fi
+
+PIDFILE=@piddir@/${NAME}.${BPORT}.pid
+
+if [ "x${BUSER}" != "x" ]; then
+ USERGRP="--chuid ${BUSER}"
+ if [ "x${BGROUP}" != "x" ]; then
+ USERGRP="${USERGRP}:${BGROUP}"
+ fi
+fi
+
+case "$1" in
+ start)
+ echo -n "Starting ${DESC}: "
+ start-stop-daemon --start --quiet --pidfile ${PIDFILE} ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ stop)
+ echo -n "Stopping ${DESC}: "
+ start-stop-daemon --oknodo --stop --quiet ${USERGRP} --exec ${DAEMON} -- ${BOPTIONS}
+ RETVAL=$?
+ echo "${NAME}"
+ ;;
+ restart|force-reload)
+ $0 stop
+ sleep 5
+ $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/${NAME} {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+exit $RETVAL
diff --git a/bacula/src/filed/acl.c b/bacula/src/filed/acl.c
index b83bd7a..59eac94 100644
--- a/bacula/src/filed/acl.c
+++ b/bacula/src/filed/acl.c
@@ -32,6 +32,7 @@
* - AIX (pre-5.3 and post 5.3 acls, acl_get and aclx_get interface)
* - Darwin
* - FreeBSD (POSIX and NFSv4/ZFS acls)
+ * - GNU Hurd
* - HPUX
* - IRIX
* - Linux
@@ -543,7 +544,8 @@ static bacl_exit_code (*os_parse_acl_streams)
defined(HAVE_FREEBSD_OS) || \
defined(HAVE_IRIX_OS) || \
defined(HAVE_OSF1_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
#include <sys/types.h>
@@ -642,7 +644,8 @@ static int acl_count_entries(acl_t acl)
{
int count = 0;
#if defined(HAVE_FREEBSD_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
acl_entry_t ace;
int entry_available;
@@ -684,7 +687,8 @@ static bool acl_is_trivial(acl_t acl)
acl_entry_t ace;
acl_tag_t tag;
#if defined(HAVE_FREEBSD_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
int entry_available;
entry_available = acl_get_entry(acl, ACL_FIRST_ENTRY, &ace);
@@ -1275,7 +1279,8 @@ static bacl_exit_code (*os_parse_acl_streams)
freebsd_parse_acl_streams;
#elif defined(HAVE_IRIX_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
/*
* Define the supported ACL streams for these OSes
*/
@@ -1293,6 +1298,13 @@ static int os_access_acl_streams[1] = {
static int os_default_acl_streams[1] = {
STREAM_ACL_LINUX_DEFAULT_ACL
};
+#elif defined(HAVE_HURD_OS)
+static int os_access_acl_streams[1] = {
+ STREAM_ACL_HURD_ACCESS_ACL
+};
+static int os_default_acl_streams[1] = {
+ STREAM_ACL_HURD_DEFAULT_ACL
+};
#endif
static bacl_exit_code generic_build_acl_streams(JCR *jcr, FF_PKT *ff_pkt)
diff --git a/bacula/src/filed/xattr.c b/bacula/src/filed/xattr.c
index faf86d5..21a6365 100644
--- a/bacula/src/filed/xattr.c
+++ b/bacula/src/filed/xattr.c
@@ -35,6 +35,7 @@
* - AIX (Extended Attributes)
* - Darwin (Extended Attributes)
* - FreeBSD (Extended Attributes)
+ * - GNU HURD (Extended Attributes)
* - IRIX (Extended Attributes)
* - Linux (Extended Attributes)
* - NetBSD (Extended Attributes)
@@ -1035,7 +1036,8 @@ static bxattr_exit_code (*os_parse_xattr_streams)
irix_parse_xattr_streams;
#elif defined(HAVE_DARWIN_OS) || \
- defined(HAVE_LINUX_OS)
+ defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HURD_OS)
#if (!defined(HAVE_LISTXATTR) && !defined(HAVE_LLISTXATTR)) || \
(!defined(HAVE_GETXATTR) && !defined(HAVE_LGETXATTR)) || \
@@ -1077,6 +1079,16 @@ static const char *xattr_acl_skiplist[3] = {
static const char *xattr_skiplist[1] = {
NULL
};
+#elif defined(HAVE_HURD_OS)
+static int os_default_xattr_streams[1] = {
+ STREAM_XATTR_HURD
+};
+static const char *xattr_acl_skiplist[1] = {
+ NULL
+};
+static const char *xattr_skiplist[1] = {
+ NULL
+};
#endif
/*
diff --git a/bacula/src/filed/xattr.h b/bacula/src/filed/xattr.h
index cb1c68e..b61ec11 100644
--- a/bacula/src/filed/xattr.h
+++ b/bacula/src/filed/xattr.h
@@ -33,6 +33,8 @@
#define BXATTR_ENOTSUP EOPNOTSUPP
#elif defined(HAVE_DARWIN_OS)
#define BXATTR_ENOTSUP ENOTSUP
+#elif defined(HAVE_HURD_OS)
+#define BXATTR_ENOTSUP ENOTSUP
#endif
/*
diff --git a/bacula/src/lib/mntent_cache.c b/bacula/src/lib/mntent_cache.c
index c30cc91..ca2c8a8 100644
--- a/bacula/src/lib/mntent_cache.c
+++ b/bacula/src/lib/mntent_cache.c
@@ -68,10 +68,15 @@
#include <sys/stat.h>
#if defined(HAVE_GETMNTENT)
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_AIX_OS)
+#if defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HPUX_OS) || \
+ defined(HAVE_AIX_OS)
#include <mntent.h>
#elif defined(HAVE_SUN_OS)
#include <sys/mnttab.h>
+#elif defined(HAVE_HURD_OS)
+#include <hurd/paths.h>
+#include <mntent.h>
#endif /* HAVE_GETMNTENT */
#elif defined(HAVE_GETMNTINFO)
#if defined(HAVE_OPENBSD_OS)
@@ -181,7 +186,11 @@ static void refresh_mount_cache(void)
#if defined(HAVE_GETMNTENT)
FILE *fp;
struct stat st;
-#if defined(HAVE_LINUX_OS) || defined(HAVE_HPUX_OS) || defined(HAVE_IRIX_OS) || defined(HAVE_AIX_OS)
+#if defined(HAVE_LINUX_OS) || \
+ defined(HAVE_HPUX_OS) || \
+ defined(HAVE_IRIX_OS) || \
+ defined(HAVE_AIX_OS) || \
+ defined(HAVE_HURD_OS)
struct mntent *mnt;
#if defined(HAVE_LINUX_OS)
@@ -202,6 +211,10 @@ static void refresh_mount_cache(void)
if ((fp = setmntent(MNTTAB, "r")) == (FILE *)NULL) {
return;
}
+#elif defined(HAVE_HURD_OS)
+ if ((fp = setmntent(_PATH_MNTTAB, "r")) == (FILE *)NULL) {
+ return;
+ }
#endif
while ((mnt = getmntent(fp)) != (struct mntent *)NULL) {
diff --git a/bacula/src/streams.h b/bacula/src/streams.h
index 1fc8c82..78b1e68 100644
--- a/bacula/src/streams.h
+++ b/bacula/src/streams.h
@@ -169,6 +169,13 @@
#define STREAM_ACL_FREEBSD_NFS4_ACL 1017 /* FreeBSD specific acl_t string representation
* from acl_to_text (NFSv4 or ZFS acl)
*/
+#define STREAM_ACL_HURD_DEFAULT_ACL 1018 /* GNU HURD specific acl_t string representation
+ * from acl_to_text (POSIX acl) for default acls.
+ */
+#define STREAM_ACL_HURD_ACCESS_ACL 1019 /* GNU HURD specific acl_t string representation
+ * from acl_to_text (POSIX acl) for access acls.
+ */
+#define STREAM_XATTR_HURD 1989 /* GNU HURD specific extended attributes */
#define STREAM_XATTR_IRIX 1990 /* IRIX specific extended attributes */
#define STREAM_XATTR_TRU64 1991 /* TRU64 specific extended attributes */
#define STREAM_XATTR_AIX 1992 /* AIX specific extended attributes */
hooks/post-receive
--
Bacula Community source
|