0mp port
This commit is contained in:
651
net/samba422/Makefile
Normal file
651
net/samba422/Makefile
Normal file
@ -0,0 +1,651 @@
|
|||||||
|
PORTNAME= ${SAMBA4_BASENAME}422
|
||||||
|
PORTVERSION= ${SAMBA4_VERSION}
|
||||||
|
CATEGORIES?= net
|
||||||
|
MASTER_SITES= SAMBA/samba/stable SAMBA/samba/rc
|
||||||
|
DISTNAME= ${SAMBA4_DISTNAME}
|
||||||
|
|
||||||
|
MAINTAINER= samba@FreeBSD.org
|
||||||
|
COMMENT= Free SMB/CIFS and AD/DC server and client for Unix
|
||||||
|
WWW= https://gitlab.com/samba-freebsd/
|
||||||
|
|
||||||
|
LICENSE= GPLv3+
|
||||||
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
||||||
|
|
||||||
|
USES= cpe
|
||||||
|
|
||||||
|
CONFLICTS_INSTALL?= samba4*
|
||||||
|
|
||||||
|
EXTRA_PATCHES= \
|
||||||
|
${PATCHDIR}/0001-Compact-and-simplify-modules-build-and-config-genera.patch:-p1 \
|
||||||
|
${PATCHDIR}/0002-Adjust-abi_gen.sh-script-to-run-under-FreeBSD-with-i.patch:-p1 \
|
||||||
|
${PATCHDIR}/0003-Mask-CLang-prototype-warnings-in-kadm5-admin.h.patch:-p1 \
|
||||||
|
${PATCHDIR}/0004-On-FreeBSD-date-1-has-different-semantics-than-on-Li.patch:-p1 \
|
||||||
|
${PATCHDIR}/0005-Include-jemalloc-jemalloc.h-if-ENABLE_JEMALLOC-is-se.patch:-p1 \
|
||||||
|
${PATCHDIR}/0006-Install-nss_-modules-into-PAMMODULESDIR-path.patch:-p1 \
|
||||||
|
${PATCHDIR}/0007-Use-macro-value-as-a-default-backlog-size-for-the-li.patch:-p1 \
|
||||||
|
${PATCHDIR}/0008-Brute-force-work-around-usage-of-Linux-specific-m-fl.patch:-p1 \
|
||||||
|
${PATCHDIR}/0009-Make-sure-that-config-checks-fail-if-the-warning-is-.patch:-p1 \
|
||||||
|
${PATCHDIR}/0010-Add-option-with-pkgconfigdir-to-specify-alternative-.patch:-p1 \
|
||||||
|
${PATCHDIR}/0011-Use-provided-by-port-location-of-the-XML-catalog.patch:-p1 \
|
||||||
|
${PATCHDIR}/0012-Create-shared-libraries-according-to-the-FreeBSD-spe.patch:-p1 \
|
||||||
|
${PATCHDIR}/0014-Add-option-to-disable-CTDB-tests-failing-on-FreeBSD-.patch:-p1 \
|
||||||
|
${PATCHDIR}/0015-Add-extra-debug-class-to-trck-down-DB-locking-code.patch:-p1 \
|
||||||
|
${PATCHDIR}/0016-Make-ldb_schema_attribute_compare-a-stable-comparisi.patch:-p1 \
|
||||||
|
${PATCHDIR}/0017-Use-arc4random-when-available-to-generate-random-tal.patch:-p1 \
|
||||||
|
${PATCHDIR}/0018-Add-configuration-option-that-allows-to-choose-alter.patch:-p1 \
|
||||||
|
${PATCHDIR}/0019-From-923bc7a1afeb0b920e60e14846987ae1d2d7dca4-Mon-Se.patch:-p1 \
|
||||||
|
${PATCHDIR}/0020-FreeBSD-12-between-r336017-and-r342928-wrongfuly-ret.patch:-p1 \
|
||||||
|
${PATCHDIR}/0021-Fix-casting-warnings-in-the-nfs_quota-debug-message.patch:-p1 \
|
||||||
|
${PATCHDIR}/0022-Clean-up-UTMP-handling-code-and-add-FreeBSD-support..patch:-p1 \
|
||||||
|
${PATCHDIR}/0023-Add-cmd_get_quota-test-function-into-vfstest-to-test.patch:-p1 \
|
||||||
|
${PATCHDIR}/0025-From-d9b748869a8f4018ebee302aae8246bf29f60309-Mon-Se.patch:-p1 \
|
||||||
|
${PATCHDIR}/0028-s3-lib-system-add-FreeBSD-proc_fd_pattern.patch \
|
||||||
|
|
||||||
|
SAMBA4_BASENAME= samba
|
||||||
|
SAMBA4_PORTNAME= ${SAMBA4_BASENAME}4
|
||||||
|
SAMBA4_VERSION= 4.22.3
|
||||||
|
SAMBA4_DISTNAME= ${SAMBA4_BASENAME}-${SAMBA4_VERSION:S|.p|pre|:S|.r|rc|:S|.t|tp|:S|.a|alpha|}
|
||||||
|
|
||||||
|
WRKSRC?= ${WRKDIR}/${DISTNAME}
|
||||||
|
PLIST?= ${PKGDIR}/pkg-plist
|
||||||
|
|
||||||
|
CPE_VENDOR= samba
|
||||||
|
CPE_PRODUCT= samba
|
||||||
|
# Directories
|
||||||
|
VARDIR= ${DESTDIR}/var
|
||||||
|
SAMBA4_RUNDIR= ${VARDIR}/run/${SAMBA4_PORTNAME}
|
||||||
|
SAMBA4_LOGDIR= ${VARDIR}/log/${SAMBA4_PORTNAME}
|
||||||
|
SAMBA4_LOCKDIR= ${VARDIR}/db/${SAMBA4_PORTNAME}
|
||||||
|
SAMBA4_BINDDNSDIR= ${SAMBA4_LOCKDIR}/bind-dns
|
||||||
|
SAMBA4_PRIVATEDIR= ${SAMBA4_LOCKDIR}/private
|
||||||
|
SAMBA4_PAMDIR= ${PREFIX}/lib
|
||||||
|
SAMBA4_LIBDIR= ${PREFIX}/lib/${SAMBA4_PORTNAME}
|
||||||
|
SAMBA4_INCLUDEDIR= ${PREFIX}/include/${SAMBA4_PORTNAME}
|
||||||
|
SAMBA4_CONFDIR= ${PREFIX}/etc
|
||||||
|
SAMBA4_CONFIG= smb4.conf
|
||||||
|
SAMBA4_MODULES_CLASS= auth bind9 gensec gpext idmap ldb nss_info \
|
||||||
|
pdb perfcount process_model service vfs
|
||||||
|
|
||||||
|
CONFIGURE_ARGS= --mandir="${PREFIX}/share/man" \
|
||||||
|
--sysconfdir="${SAMBA4_CONFDIR}" \
|
||||||
|
--includedir="${SAMBA4_INCLUDEDIR}" \
|
||||||
|
--datadir="${DATADIR}" \
|
||||||
|
--libdir="${SAMBA4_LIBDIR}" \
|
||||||
|
--with-privatelibdir="${SAMBA4_LIBDIR}/private" \
|
||||||
|
--with-pammodulesdir="${SAMBA4_PAMDIR}" \
|
||||||
|
--with-modulesdir="${SAMBA4_MODULEDIR}" \
|
||||||
|
--with-pkgconfigdir="${PKGCONFIGDIR}" \
|
||||||
|
--localstatedir="${VARDIR}" \
|
||||||
|
--with-piddir="${SAMBA4_RUNDIR}" \
|
||||||
|
--with-sockets-dir="${SAMBA4_RUNDIR}" \
|
||||||
|
--with-privileged-socket-dir="${SAMBA4_RUNDIR}" \
|
||||||
|
--with-lockdir="${SAMBA4_LOCKDIR}" \
|
||||||
|
--with-statedir="${SAMBA4_LOCKDIR}" \
|
||||||
|
--with-cachedir="${SAMBA4_LOCKDIR}" \
|
||||||
|
--with-bind-dns-dir=${SAMBA4_BINDDNSDIR} \
|
||||||
|
--with-privatedir="${SAMBA4_PRIVATEDIR}" \
|
||||||
|
--with-logfilebase="${SAMBA4_LOGDIR}"
|
||||||
|
# XXX: Flags
|
||||||
|
CONFIGURE_ENV= PTHREAD_LDFLAGS="-lpthread" \
|
||||||
|
PYTHONHASHSEED=1
|
||||||
|
MAKE_ENV= PYTHONHASHSEED=1
|
||||||
|
|
||||||
|
USES= compiler:c++11-lang iconv localbase:ldflags \
|
||||||
|
perl5 pkgconfig shebangfix waf gettext-runtime
|
||||||
|
USE_PERL5= build
|
||||||
|
USE_LDCONFIG= ${SAMBA4_LIBDIR}
|
||||||
|
WAF_CMD= buildtools/bin/waf
|
||||||
|
CONFIGURE_LOG= bin/config.log
|
||||||
|
|
||||||
|
# Make sure that the right version of Python is used by the tools
|
||||||
|
# https://bugzilla.samba.org/show_bug.cgi?id=7305
|
||||||
|
SHEBANG_FILES= source3/script* source4/scripting/bin/* selftest/*
|
||||||
|
|
||||||
|
PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig
|
||||||
|
PKGCONFIGDIR_REL?= ${PKGCONFIGDIR:S,^${PREFIX}/,,}
|
||||||
|
PLIST_SUB= PKGCONFIGDIR=${PKGCONFIGDIR_REL}
|
||||||
|
SUB_LIST= PKGCONFIGDIR=${PKGCONFIGDIR_REL}
|
||||||
|
##############################################################################
|
||||||
|
OPTIONS_SUB= yes
|
||||||
|
|
||||||
|
OPTIONS_DEFINE= AD_DC ADS CLUSTER CUPS DOCS FAM LDAP GPGME \
|
||||||
|
MANPAGES PROFILE PYTHON3 QUOTAS \
|
||||||
|
SYSLOG UTMP
|
||||||
|
#OPTIONS_DEFINE+= DEVELOPER MEMORY_DEBUG
|
||||||
|
|
||||||
|
OPTIONS_GROUP= VFS
|
||||||
|
OPTIONS_GROUP_VFS= FRUIT GLUSTERFS
|
||||||
|
|
||||||
|
OPTIONS_SINGLE= GSSAPI ZEROCONF
|
||||||
|
|
||||||
|
OPTIONS_SINGLE_GSSAPI= GSSAPI_BUILTIN GSSAPI_MIT
|
||||||
|
#GSSAPI_HEIMDAL
|
||||||
|
OPTIONS_SINGLE_ZEROCONF= ZEROCONF_NONE AVAHI MDNSRESPONDER
|
||||||
|
|
||||||
|
# Make those default options
|
||||||
|
OPTIONS_DEFAULT= AD_DC ADS DOCS FAM LDAP MANPAGES \
|
||||||
|
PROFILE PYTHON3 QUOTAS SYSLOG UTMP \
|
||||||
|
FRUIT GSSAPI_BUILTIN AVAHI
|
||||||
|
##############################################################################
|
||||||
|
ADS_DESC= Active Directory client
|
||||||
|
AD_DC_DESC= Active Directory Domain Controller(implies PYTHON3)
|
||||||
|
CLUSTER_DESC= Clustering support
|
||||||
|
DEVELOPER_DESC= With developer framework
|
||||||
|
FAM_DESC= File Alteration Monitor
|
||||||
|
GPGME_DESC= GpgME support
|
||||||
|
LDAP_DESC= LDAP client
|
||||||
|
LIBZFS_DESC= LibZFS
|
||||||
|
MEMORY_DEBUG_DESC= Debug memory allocator
|
||||||
|
PICKY_DEVELOPER_DESC= Treat compiler warnings as errors(implies DEVELOPER)
|
||||||
|
PROFILE_DESC= Profiling data
|
||||||
|
QUOTAS_DESC= Disk quota support
|
||||||
|
UTMP_DESC= UTMP accounting
|
||||||
|
|
||||||
|
VFS_DESC= VFS modules
|
||||||
|
FRUIT_DESC= MacOSX and TimeMachine support
|
||||||
|
GLUSTERFS_DESC= GlusterFS support
|
||||||
|
|
||||||
|
GSSAPI_BUILTIN_DESC= GSSAPI support via bundled Heimdal
|
||||||
|
|
||||||
|
ZEROCONF_DESC= Zero configuration networking
|
||||||
|
ZEROCONF_NONE_DESC= Zeroconf support is absent
|
||||||
|
##############################################################################
|
||||||
|
# XXX: Unconditional dependencies which can't be switched off(if present in
|
||||||
|
# the system)
|
||||||
|
|
||||||
|
# Iconv(picked up unconditionaly)
|
||||||
|
LIB_DEPENDS= libiconv.so:converters/libiconv
|
||||||
|
# unwind
|
||||||
|
LIB_DEPENDS+= libunwind.so:devel/libunwind
|
||||||
|
# Readline(sponsored by Python)
|
||||||
|
# XXX: USES=readline pollutes CPPFLAGS, so we explicitly put dependency
|
||||||
|
LIB_DEPENDS+= libreadline.so:devel/readline
|
||||||
|
# popt
|
||||||
|
LIB_DEPENDS+= libpopt.so:devel/popt
|
||||||
|
# inotify
|
||||||
|
LIB_DEPENDS+= libinotify.so:devel/libinotify
|
||||||
|
# GNUTLS
|
||||||
|
LIB_DEPENDS+= libgnutls.so:security/gnutls
|
||||||
|
LIB_DEPENDS+= libgcrypt.so:security/libgcrypt
|
||||||
|
# NFSv4 ACL glue
|
||||||
|
LIB_DEPENDS+= libsunacl.so:sysutils/libsunacl
|
||||||
|
# libicu
|
||||||
|
LIB_DEPENDS+= libicui18n.so:devel/icu
|
||||||
|
LIB_DEPENDS+= libicuuc.so:devel/icu
|
||||||
|
# Jansson
|
||||||
|
BUILD_DEPENDS+= jansson>=2.10:devel/jansson
|
||||||
|
RUN_DEPENDS+= jansson>=2.10:devel/jansson
|
||||||
|
# tasn1
|
||||||
|
BUILD_DEPENDS+= libtasn1>=3.8:security/libtasn1
|
||||||
|
RUN_DEPENDS+= libtasn1>=3.8:security/libtasn1
|
||||||
|
# External Samba dependencies
|
||||||
|
# Needed for IDL compiler
|
||||||
|
BUILD_DEPENDS+= p5-Parse-Yapp>=0:devel/p5-Parse-Yapp
|
||||||
|
|
||||||
|
# Libarchive
|
||||||
|
SAMBA4_BUNDLED_LIBS= !libarchive
|
||||||
|
BUILD_DEPENDS+= libarchive>=3.1.2:archivers/libarchive
|
||||||
|
RUN_DEPENDS+= libarchive>=3.1.2:archivers/libarchive
|
||||||
|
|
||||||
|
### Bundled libraries
|
||||||
|
SAMBA4_BUNDLED_CMOCKA?= no
|
||||||
|
SAMBA4_BUNDLED_TALLOC?= no
|
||||||
|
SAMBA4_BUNDLED_TEVENT?= no
|
||||||
|
SAMBA4_BUNDLED_TDB?= no
|
||||||
|
# cmocka
|
||||||
|
.if defined(SAMBA4_BUNDLED_CMOCKA) && ${SAMBA4_BUNDLED_CMOCKA} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= cmocka
|
||||||
|
CONFLICTS_INSTALL+= cmocka-1.*
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_CMOCKA=""
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_CMOCKA=""
|
||||||
|
.else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !cmocka
|
||||||
|
BUILD_DEPENDS+= cmocka>=1.1.3:sysutils/cmocka
|
||||||
|
TEST_DEPENDS+= cmocka>=1.1.3:sysutils/cmocka
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_CMOCKA="@comment "
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_CMOCKA="@comment "
|
||||||
|
.endif
|
||||||
|
# talloc
|
||||||
|
.if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= talloc
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TALLOC=""
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TALLOC=""
|
||||||
|
.else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !talloc
|
||||||
|
BUILD_DEPENDS+= talloc243>=2.4.3:devel/talloc243
|
||||||
|
RUN_DEPENDS+= talloc243>=2.4.3:devel/talloc243
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TALLOC="@comment "
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TALLOC="@comment "
|
||||||
|
.endif
|
||||||
|
# tevent
|
||||||
|
.if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= tevent
|
||||||
|
CONFLICTS_INSTALL+= tevent-* tevent1-*
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TEVENT=""
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TEVENT=""
|
||||||
|
.else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !tevent
|
||||||
|
BUILD_DEPENDS+= tevent017>=0.17:devel/tevent017
|
||||||
|
RUN_DEPENDS+= tevent017>=0.17:devel/tevent017
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TEVENT="@comment "
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TEVENT="@comment "
|
||||||
|
.endif
|
||||||
|
# tdb
|
||||||
|
.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= tdb
|
||||||
|
CONFLICTS_INSTALL+= tdb-* tdb1-*
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TDB=""
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TDB=""
|
||||||
|
.else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !tdb
|
||||||
|
BUILD_DEPENDS+= tdb1413>=1.4.13:databases/tdb1413
|
||||||
|
RUN_DEPENDS+= tdb1413>=1.4.13:databases/tdb1413
|
||||||
|
PLIST_SUB+= SAMBA4_BUNDLED_TDB="@comment "
|
||||||
|
SUB_LIST+= SAMBA4_BUNDLED_TDB="@comment "
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if (defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes) \
|
||||||
|
|| (defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes) \
|
||||||
|
|| (defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes)
|
||||||
|
SAMBA4_BUNDLED_LIBS+= replace
|
||||||
|
.endif
|
||||||
|
# Don't use external libcom_err
|
||||||
|
SAMBA4_BUNDLED_LIBS+= com_err
|
||||||
|
|
||||||
|
### Public libraries
|
||||||
|
# ldb
|
||||||
|
SAMBA4_PRIVATE_LIBS+= !ldb
|
||||||
|
CONFLICTS_INSTALL+= ldb-* ldb2[0-9]-*
|
||||||
|
SAMBA4_MODULEDIR= ${SAMBA4_LIBDIR}/modules
|
||||||
|
|
||||||
|
# Set the test environment variables
|
||||||
|
TEST_USES= python
|
||||||
|
TEST_ENV= PYTHON="${PYTHON_CMD}" \
|
||||||
|
SHA1SUM=/sbin/sha1 \
|
||||||
|
SHA256SUM=/sbin/sha256 \
|
||||||
|
MD5SUM=/sbin/md5 \
|
||||||
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
TEST_DEPENDS= bash:shells/bash \
|
||||||
|
tshark:net/wireshark@nox11
|
||||||
|
# External Python modules
|
||||||
|
TEST_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR}
|
||||||
|
TEST_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR}
|
||||||
|
##############################################################################
|
||||||
|
CONFIGURE_ARGS+= \
|
||||||
|
--with-pam \
|
||||||
|
--with-iconv \
|
||||||
|
--with-winbind \
|
||||||
|
--with-regedit \
|
||||||
|
--disable-rpath \
|
||||||
|
--without-lttng \
|
||||||
|
--without-gettext \
|
||||||
|
--enable-pthreadpool \
|
||||||
|
--without-fake-kaserver \
|
||||||
|
--without-systemd \
|
||||||
|
--with-libarchive \
|
||||||
|
--with-acl-support \
|
||||||
|
--with-sendfile-support \
|
||||||
|
--disable-ctdb-tests \
|
||||||
|
--disable-spotlight
|
||||||
|
# ${ICONV_CONFIGURE_BASE}
|
||||||
|
##############################################################################
|
||||||
|
FRUIT_PREVENTS= ZEROCONF_NONE
|
||||||
|
FRUIT_PREVENTS_MSG= MacOSX support requires Zeroconf(AVAHI or MDNSRESPONDER)
|
||||||
|
FRUIT_VARS= SAMBA4_MODULES+=vfs_fruit
|
||||||
|
|
||||||
|
GLUSTERFS_CONFIGURE_ENABLE= glusterfs
|
||||||
|
GLUSTERFS_LIB_DEPENDS= libglusterfs.so:net/glusterfs
|
||||||
|
GLUSTERFS_VARS= SAMBA4_MODULES+=vfs_glusterfs
|
||||||
|
|
||||||
|
ZEROCONF_NONE_MAKE_ENV= ZEROCONF=none
|
||||||
|
##############################################################################
|
||||||
|
AVAHI_CONFIGURE_ENABLE= avahi
|
||||||
|
AVAHI_LIB_DEPENDS= libavahi-client.so:net/avahi-app
|
||||||
|
AVAHI_VARS= SAMBA4_SERVICES+=avahi_daemon
|
||||||
|
|
||||||
|
MDNSRESPONDER_CONFIGURE_ENABLE= dnssd
|
||||||
|
MDNSRESPONDER_LIB_DEPENDS= libdns_sd.so:net/mDNSResponder
|
||||||
|
MDNSRESPONDER_VARS= SAMBA4_SERVICES+=mdnsd
|
||||||
|
##############################################################################
|
||||||
|
MEMORY_DEBUG_IMPLIES= DEBUG
|
||||||
|
MEMORY_DEBUG_CONFIGURE_ENV= ADDITIONAL_CFLAGS="-DENABLE_JEMALLOC `pkg-config --cflags jemalloc`" ADDITIONAL_LDFLAGS="`pkg-config --libs jemalloc`"
|
||||||
|
MEMORY_DEBUG_LIB_DEPENDS= libjemalloc.so.2:devel/jemalloc
|
||||||
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194046
|
||||||
|
GDB_CMD?= ${LOCALBASE}/bin/gdb
|
||||||
|
# https://bugzilla.samba.org/show_bug.cgi?id=8969
|
||||||
|
PICKY_DEVELOPER_IMPLIES= DEVELOPER
|
||||||
|
PICKY_DEVELOPER_CONFIGURE_ON= --picky-developer
|
||||||
|
|
||||||
|
DEVELOPER_CONFIGURE_ON= --enable-developer --enable-selftest --abi-check-disable
|
||||||
|
DEVELOPER_CONFIGURE_ENV= WAF_CMD_FORMAT=string
|
||||||
|
DEVELOPER_BUILD_DEPENDS= ${SAMBA4_LMDB_DEPENDS} \
|
||||||
|
${GDB_CMD}:devel/gdb
|
||||||
|
DEVELOPER_RUN_DEPENDS= ${SAMBA4_LMDB_DEPENDS}
|
||||||
|
DEVELOPER_TEST_DEPENDS= ${GDB_CMD}:devel/gdb
|
||||||
|
DEVELOPER_VARS_OFF= GDB_CMD=true
|
||||||
|
##############################################################################
|
||||||
|
AD_DC_IMPLIES= PYTHON3
|
||||||
|
AD_DC_CONFIGURE_OFF= --without-ad-dc
|
||||||
|
AD_DC_BUILD_DEPENDS= ${SAMBA4_LMDB_DEPENDS}
|
||||||
|
AD_DC_RUN_DEPENDS= ${SAMBA4_LMDB_DEPENDS}
|
||||||
|
AD_DC_VARS= PLIST+=${PKGDIR}/pkg-plist.ad_dc
|
||||||
|
# samba-tool requires those for *upgrade
|
||||||
|
AD_DC_BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}markdown>=3.3.7:textproc/py-markdown@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}dnspython>=2.2.1:dns/py-dnspython@${PY_FLAVOR}
|
||||||
|
AD_DC_RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}markdown>=3.3.7:textproc/py-markdown@${PY_FLAVOR} \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}dnspython>=2.2.1:dns/py-dnspython@${PY_FLAVOR}
|
||||||
|
|
||||||
|
ADS_CONFIGURE_WITH= ads
|
||||||
|
|
||||||
|
CLUSTER_CONFIGURE_WITH= cluster-support
|
||||||
|
CLUSTER_VARS= PLIST+=${PKGDIR}/pkg-plist.cluster
|
||||||
|
|
||||||
|
CUPS_CONFIGURE_ENABLE= cups iprint
|
||||||
|
CUPS_LIB_DEPENDS= libcups.so:print/cups
|
||||||
|
# https://bugzilla.samba.org/show_bug.cgi?id=9545
|
||||||
|
FAM_USES= fam
|
||||||
|
FAM_CONFIGURE_WITH= fam
|
||||||
|
|
||||||
|
GPGME_CONFIGURE_WITH= gpgme
|
||||||
|
GPGME_LIB_DEPENDS= libgpgme.so:security/gpgme
|
||||||
|
GPGME_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}gpg>=2.0.0:security/py-gpg@${PY_FLAVOR}
|
||||||
|
|
||||||
|
GSSAPI_BUILTIN_USES= bison
|
||||||
|
|
||||||
|
GSSAPI_MIT_CONFIGURE_ON= --with-system-mitkrb5 ${GSSAPIBASEDIR} \
|
||||||
|
--with-system-mitkdc=${GSSAPIBASEDIR}/sbin/krb5kdc \
|
||||||
|
--with-experimental-mit-ad-dc
|
||||||
|
GSSAPI_MIT_USES= gssapi:mit
|
||||||
|
|
||||||
|
GSSAPI_HEIMDAL_CONFIGURE_ON= --with-system-heimdalkrb5 ${GSSAPIBASEDIR}
|
||||||
|
GSSAPI_HEIMDAL_USES= gssapi:heimdal
|
||||||
|
GSSAPI_HEIMDAL_PREVENTS= AD_DC
|
||||||
|
GSSAPI_HEIMDAL_PREVENTS_MSG= GSSAPI_HEIMDAL and AD_DC enable conflicting options
|
||||||
|
|
||||||
|
LDAP_CONFIGURE_WITH= ldap
|
||||||
|
LDAP_CONFIGURE_ON= --with-ldap
|
||||||
|
LDAP_CONFIGURE_OFF= --without-ldap
|
||||||
|
LDAP_USES= ldap
|
||||||
|
LDAP_VARS= SAMBA4_MODULES+=idmap_ldap
|
||||||
|
|
||||||
|
LIBZFS_CONFIGURE_WITH= libzfs
|
||||||
|
LIBZFS_VARS= SAMBA4_MODULES+=vfs_zfs_space
|
||||||
|
|
||||||
|
MANPAGES_BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
|
||||||
|
xsltproc:textproc/libxslt
|
||||||
|
MANPAGES_CONFIGURE_ENV_OFF= XSLTPROC="false"
|
||||||
|
|
||||||
|
PROFILE_CONFIGURE_WITH= profiling-data
|
||||||
|
|
||||||
|
QUOTAS_CONFIGURE_WITH= quotas
|
||||||
|
|
||||||
|
SYSLOG_CONFIGURE_WITH= syslog
|
||||||
|
|
||||||
|
UTMP_CONFIGURE_WITH= utmp
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
.include <bsd.port.options.mk>
|
||||||
|
##############################################################################
|
||||||
|
.if !${PORT_OPTIONS:MADS} && ${PORT_OPTIONS:MAD_DC}
|
||||||
|
IGNORE=To disable ADS option you also need to disable AD_DC option
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if !defined(WANT_EXP_MODULES) || empty(WANT_EXP_MODULES)
|
||||||
|
WANT_EXP_MODULES= vfs_cacheprime
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if ${WANT_EXP_MODULES:Mvfs_snapper}
|
||||||
|
# snapper needs dbus
|
||||||
|
LIB_DEPENDS+= libdbus-1.so:devel/dbus
|
||||||
|
LIB_DEPENDS+= libdbus-glib-1.so:devel/dbus-glib
|
||||||
|
.endif
|
||||||
|
|
||||||
|
SAMBA4_MODULES+= krb5_async_dns_krb5_locator krb5_winbind_krb5_locator idmap_nss idmap_autorid \
|
||||||
|
idmap_rid idmap_hash idmap_tdb idmap_tdb2 idmap_script \
|
||||||
|
nss-info_hash
|
||||||
|
# List of extra modules taken from RHEL build
|
||||||
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197320
|
||||||
|
.if ${PORT_OPTIONS:MADS}
|
||||||
|
SAMBA4_MODULES+= idmap_ad idmap_rfc2307 nss-info_template \
|
||||||
|
nss-info_rfc2307 nss-info_sfu nss-info_sfu20
|
||||||
|
.endif
|
||||||
|
# This kind of special for this distribution
|
||||||
|
SAMBA4_MODULES+= vfs_freebsd
|
||||||
|
|
||||||
|
SAMBA4_MODULES+= vfs_acl_tdb vfs_acl_xattr vfs_aio_fork vfs_aio_pthread \
|
||||||
|
vfs_audit vfs_cap vfs_catia vfs_commit vfs_crossrename \
|
||||||
|
vfs_default_quota vfs_dirsort vfs_expand_msdfs \
|
||||||
|
vfs_extd_audit vfs_fake_perms vfs_full_audit \
|
||||||
|
vfs_linux_xfs_sgid vfs_media_harmony vfs_offline \
|
||||||
|
vfs_preopen vfs_readahead vfs_readonly vfs_recycle \
|
||||||
|
vfs_shadow_copy vfs_shadow_copy2 vfs_shell_snap \
|
||||||
|
vfs_streams_depot vfs_streams_xattr vfs_syncops \
|
||||||
|
vfs_time_audit vfs_unityed_media vfs_virusfilter \
|
||||||
|
vfs_widelinks vfs_worm vfs_xattr_tdb vfs_zfsacl
|
||||||
|
|
||||||
|
.if ${PORT_OPTIONS:MDEVELOPER}
|
||||||
|
SAMBA4_MODULES+= auth_skel pdb_test gpext_security gpext_registry \
|
||||||
|
gpext_scripts perfcount_test vfs_fake_dfq \
|
||||||
|
vfs_skel_opaque vfs_skel_transparent \
|
||||||
|
vfs_shadow_copy_test vfs_fake_acls \
|
||||||
|
vfs_nfs4acl_xattr vfs_error_inject vfs_delay_inject
|
||||||
|
.endif
|
||||||
|
# Python bindings
|
||||||
|
.if ! ${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON)
|
||||||
|
USES+= python:build,test
|
||||||
|
CONFIGURE_ARGS+= --disable-python
|
||||||
|
.else
|
||||||
|
USES+= python
|
||||||
|
PLIST+= ${PKGDIR}/pkg-plist.python
|
||||||
|
# Don't cache Python modules
|
||||||
|
CONFIGURE_ARGS+= --nopycache
|
||||||
|
MAKE_ENV+= PYTHONDONTWRITEBYTECODE=1
|
||||||
|
|
||||||
|
. if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= pytalloc-util
|
||||||
|
. else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !pytalloc-util
|
||||||
|
. endif
|
||||||
|
|
||||||
|
. if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= pytevenockbuf_add_io() and LDAP_OPT_SOCKBUF for SASL and TLS support
|
||||||
|
else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !pytevent
|
||||||
|
. endif
|
||||||
|
|
||||||
|
. if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
|
||||||
|
SAMBA4_BUNDLED_LIBS+= pytdb
|
||||||
|
. else
|
||||||
|
SAMBA4_BUNDLED_LIBS+= !pytdb
|
||||||
|
. endif
|
||||||
|
|
||||||
|
SAMBA4_BUNDLED_LIBS+= pyldb pyldb-util
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if defined(WANT_EXP_MODULES) && !empty(WANT_EXP_MODULES)
|
||||||
|
SAMBA4_MODULES+= ${WANT_EXP_MODULES}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if defined(SAMBA4_PRIVATE_LIBS) && !empty(SAMBA4_PRIVATE_LIBS)
|
||||||
|
CONFIGURE_ARGS+= --private-libraries="${SAMBA4_PRIVATE_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if defined(SAMBA4_BUNDLED_LIBS) && !empty(SAMBA4_BUNDLED_LIBS)
|
||||||
|
CONFIGURE_ARGS+= --bundled-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}"
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if defined(SAMBA4_MODULES) && !empty(SAMBA4_MODULES)
|
||||||
|
CONFIGURE_ARGS+= --with-shared-modules="${SAMBA4_MODULES:C|-|_|:Q:C|(\\\\ )+|,|g:S|\\||g}"
|
||||||
|
.endif
|
||||||
|
# XXX: Hack for nss-info_* -> nss_info/* modules
|
||||||
|
# Add selected modules to the plist
|
||||||
|
.for module in ${SAMBA4_MODULES}
|
||||||
|
PLIST_FILES+= ${SAMBA4_MODULEDIR}/${module:C|_|/|:C|-|_|}.so
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.for module_class in ${SAMBA4_MODULES_CLASS}
|
||||||
|
PLIST_DIRS+= ${SAMBA4_MODULEDIR}/${module_class}
|
||||||
|
.endfor
|
||||||
|
PLIST_DIRS+= ${SAMBA4_MODULEDIR}
|
||||||
|
|
||||||
|
.if defined(WITH_DEBUG)
|
||||||
|
CONFIGURE_ARGS+= --verbose --enable-debug
|
||||||
|
MAKE_ARGS+= --verbose
|
||||||
|
DEBUG_FLAGS?= -g -ggdb3 -O0
|
||||||
|
.endif
|
||||||
|
|
||||||
|
##############################################################################
|
||||||
|
.include <bsd.port.pre.mk>
|
||||||
|
##############################################################################
|
||||||
|
# Only for 64-bit architectures
|
||||||
|
.if ${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != i386 && ${ARCH} != mips && ${ARCH} != powerpc && ${ARCH} != powerpcspe
|
||||||
|
. if (${PORT_OPTIONS:MAD_DC} || ${PORT_OPTIONS:MDEVELOPER})
|
||||||
|
# LMDB
|
||||||
|
SAMBA4_LMDB_DEPENDS= lmdb>=0.9.16:databases/lmdb
|
||||||
|
PLIST_FILES+= ${SAMBA4_LIBDIR}/private/libldb-mdb-int-private-samba.so \
|
||||||
|
${SAMBA4_MODULEDIR}/ldb/mdb.so
|
||||||
|
. endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if ${PORT_OPTIONS:MGSSAPI_MIT}
|
||||||
|
PLIST_FILES+= ${SAMBA4_MODULEDIR}/krb5/winbind_krb5_localauth.so
|
||||||
|
. if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
PLIST_FILES+= share/man/man8/winbind_krb5_localauth.8.gz
|
||||||
|
. endif
|
||||||
|
. if ${PORT_OPTIONS:MAD_DC}
|
||||||
|
PLIST_FILES+= ${SAMBA4_LIBDIR}/krb5/plugins/kdb/samba.so
|
||||||
|
. endif
|
||||||
|
.endif
|
||||||
|
.if ${PORT_OPTIONS:MFRUIT}
|
||||||
|
. if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
PLIST_FILES+= share/man/man8/vfs_fruit.8.gz
|
||||||
|
. endif
|
||||||
|
.endif
|
||||||
|
.if ${PORT_OPTIONS:MGLUSTERFS}
|
||||||
|
. if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
PLIST_FILES+= share/man/man8/vfs_glusterfs.8.gz
|
||||||
|
. endif
|
||||||
|
.endif
|
||||||
|
# for libexecinfo: (so that __builtin_frame_address() finds the top of the stack)
|
||||||
|
CFLAGS_amd64+= -fno-omit-frame-pointer
|
||||||
|
# No fancy color error messages
|
||||||
|
CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
|
||||||
|
CFLAGS_clang= -fno-color-diagnostics
|
||||||
|
CONFIGURE_ENV+= NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s'
|
||||||
|
MAKE_ENV+= NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s'
|
||||||
|
# Allow rpcgen to find proper CPP
|
||||||
|
MAKE_ENV+= RPCGEN_CPP="${CPP}"
|
||||||
|
#.if ${readline_ARGS} == port
|
||||||
|
#CFLAGS+= -D_FUNCTION_DEF
|
||||||
|
#.endif
|
||||||
|
# Some symbols in samba's linker version scripts are not defined, but since the
|
||||||
|
# scripts are generated dynamically, suppress errors with lld >= 17 due to these
|
||||||
|
# undefined symbols.
|
||||||
|
LDFLAGS+= -Wl,--undefined-version
|
||||||
|
|
||||||
|
SAMBA4_SUB= SAMBA4_LOGDIR="${SAMBA4_LOGDIR}" \
|
||||||
|
SAMBA4_RUNDIR="${SAMBA4_RUNDIR}" \
|
||||||
|
SAMBA4_LOCKDIR="${SAMBA4_LOCKDIR}" \
|
||||||
|
SAMBA4_LIBDIR="${SAMBA4_LIBDIR}" \
|
||||||
|
SAMBA4_MODULEDIR="${SAMBA4_MODULEDIR}" \
|
||||||
|
SAMBA4_BINDDNSDIR="${SAMBA4_BINDDNSDIR}" \
|
||||||
|
SAMBA4_PRIVATEDIR="${SAMBA4_PRIVATEDIR}" \
|
||||||
|
SAMBA4_CONFDIR="${SAMBA4_CONFDIR}" \
|
||||||
|
SAMBA4_CONFIG="${SAMBA4_CONFIG}" \
|
||||||
|
SAMBA4_SERVICES="${SAMBA4_SERVICES}"
|
||||||
|
|
||||||
|
PLIST_SUB+= ${SAMBA4_SUB}
|
||||||
|
SUB_LIST+= ${SAMBA4_SUB}
|
||||||
|
|
||||||
|
USE_RC_SUBR= samba_server
|
||||||
|
SUB_FILES= pkg-message README.FreeBSD
|
||||||
|
|
||||||
|
PORTDOCS= README.FreeBSD
|
||||||
|
|
||||||
|
post-extract:
|
||||||
|
@${RM} -r ${WRKSRC}/pidl/lib/Parse/Yapp
|
||||||
|
|
||||||
|
post-patch:
|
||||||
|
@${REINPLACE_CMD} -e 's|$${PKGCONFIGDIR}|${PKGCONFIGDIR}|g' \
|
||||||
|
${PATCH_WRKSRC}/buildtools/wafsamba/pkgconfig.py
|
||||||
|
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||||
|
${PATCH_WRKSRC}/buildtools/wafsamba/wafsamba.py
|
||||||
|
@${REINPLACE_CMD} -e 's|%%GDB_CMD%%|${GDB_CMD}|g' \
|
||||||
|
${PATCH_WRKSRC}/buildtools/scripts/abi_gen.sh
|
||||||
|
@${REINPLACE_CMD} -e 's|%%SAMBA4_CONFIG%%|${SAMBA4_CONFIG}|g' \
|
||||||
|
${PATCH_WRKSRC}/dynconfig/wscript
|
||||||
|
|
||||||
|
# Use threading (or multiprocessing) but not thread (renamed in python 3+).
|
||||||
|
pre-configure:
|
||||||
|
.if (!${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON)) && ${PORT_OPTIONS:MAD_DC}
|
||||||
|
@${ECHO_CMD}; \
|
||||||
|
${ECHO_MSG} "===> AD_DC option requires PYTHON3 to be set"; \
|
||||||
|
${ECHO_CMD}; \
|
||||||
|
${FALSE}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-install-rm-junk:
|
||||||
|
${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/samba/third_party
|
||||||
|
${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name __pycache__ \
|
||||||
|
-type d -print0 | ${XARGS} -0 -n 1 -t ${RM} -r
|
||||||
|
${FIND} ${STAGEDIR} -type f -empty -delete
|
||||||
|
|
||||||
|
post-install-fix-manpages:
|
||||||
|
.if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
.for f in vfs_aio_linux.8 vfs_btrfs.8 vfs_ceph.8 vfs_gpfs.8
|
||||||
|
${RM} ${STAGEDIR}${PREFIX}/share/man/man8/${f}
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
.if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes
|
||||||
|
. for f in talloc.3
|
||||||
|
${MV} ${STAGEDIR}${PREFIX}/share/man/man3/${f} ${STAGEDIR}${PREFIX}/share/man/man3/samba-${f}
|
||||||
|
. endfor
|
||||||
|
.endif
|
||||||
|
|
||||||
|
.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
|
||||||
|
. for f in tdbbackup.8 tdbdump.8 tdbrestore.8 tdbtool.8
|
||||||
|
${MV} ${STAGEDIR}${PREFIX}/share/man/man8/${f} ${STAGEDIR}${PREFIX}/share/man/man8/samba-${f}
|
||||||
|
. endfor
|
||||||
|
.endif
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-install: post-install-rm-junk post-install-fix-manpages
|
||||||
|
.if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
${LN} -sf smb.conf.5.gz ${STAGEDIR}${PREFIX}/share/man/man5/smb4.conf.5.gz
|
||||||
|
.endif
|
||||||
|
# Run post-install script
|
||||||
|
.for dir in ${SAMBA4_LOGDIR} ${SAMBA4_RUNDIR} ${SAMBA4_LOCKDIR} ${SAMBA4_MODULEDIR}
|
||||||
|
${INSTALL} -d -m 0755 "${STAGEDIR}${dir}"
|
||||||
|
.endfor
|
||||||
|
${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_BINDDNSDIR}"
|
||||||
|
${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_PRIVATEDIR}"
|
||||||
|
.for module_class in ${SAMBA4_MODULES_CLASS}
|
||||||
|
${INSTALL} -d -m 0755 "${STAGEDIR}${SAMBA4_MODULEDIR}/${module_class}"
|
||||||
|
.endfor
|
||||||
|
.if !defined(WITH_DEBUG)
|
||||||
|
-${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin ${STAGEDIR}${PREFIX}/libexec \
|
||||||
|
-type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD}
|
||||||
|
-${FIND} ${STAGEDIR}${PREFIX}/lib -name '*.so*' \
|
||||||
|
-type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD}
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-install-FRUIT-off:
|
||||||
|
${RM} ${STAGEDIR}${SAMBA4_MODULEDIR}/vfs/fruit.so
|
||||||
|
.if ${PORT_OPTIONS:MMANPAGES}
|
||||||
|
${RM} ${STAGEDIR}${PREFIX}/share/man/man8/vfs_fruit.8
|
||||||
|
.endif
|
||||||
|
|
||||||
|
post-install-DOCS-on:
|
||||||
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
||||||
|
.for doc in ${PORTDOCS}
|
||||||
|
${INSTALL_DATA} ${WRKDIR}/${doc} ${STAGEDIR}${DOCSDIR}
|
||||||
|
.endfor
|
||||||
|
|
||||||
|
post-install-CLUSTER-on:
|
||||||
|
${LN} -nfs ../../../../share/ctdb/events/legacy/00.ctdb.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/00.ctdb.script
|
||||||
|
${LN} -nfs ../../../../share/ctdb/events/legacy/10.interface.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/10.interface.script
|
||||||
|
${LN} -nfs ../../../../share/ctdb/events/legacy/05.system.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/05.system.script
|
||||||
|
${LN} -nfs ../../../../share/ctdb/events/legacy/01.reclock.script ${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/01.reclock.script
|
||||||
|
|
||||||
|
.include <bsd.port.post.mk>
|
||||||
3
net/samba422/distinfo
Normal file
3
net/samba422/distinfo
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
TIMESTAMP = 1752217501
|
||||||
|
SHA256 (samba-4.22.3.tar.gz) = 8fd7092629a3596d935cd7567d934979f94272918ec3affd0cc807934ecf22ba
|
||||||
|
SIZE (samba-4.22.3.tar.gz) = 42869744
|
||||||
@ -0,0 +1,292 @@
|
|||||||
|
From 05e3cc236406680a55e19b204202b63cdaf48ea1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 1 Aug 2022 04:15:43 +0200
|
||||||
|
Subject: [PATCH 01/28] Compact and simplify modules build and config
|
||||||
|
generation for Bind 9.x AD DLZ.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
python/samba/provision/sambadns.py | 68 ++++++++++++------------------
|
||||||
|
source4/dns_server/dlz_minimal.h | 44 +++++++++----------
|
||||||
|
source4/dns_server/wscript_build | 62 +++------------------------
|
||||||
|
source4/setup/named.conf.dlz | 25 +----------
|
||||||
|
source4/torture/dns/wscript_build | 2 +-
|
||||||
|
5 files changed, 55 insertions(+), 146 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/python/samba/provision/sambadns.py b/python/samba/provision/sambadns.py
|
||||||
|
index 404b346a885..8e5a8ba5f25 100644
|
||||||
|
--- a/python/samba/provision/sambadns.py
|
||||||
|
+++ b/python/samba/provision/sambadns.py
|
||||||
|
@@ -21,6 +21,7 @@
|
||||||
|
"""DNS-related provisioning"""
|
||||||
|
|
||||||
|
import os
|
||||||
|
+import re
|
||||||
|
import uuid
|
||||||
|
import shutil
|
||||||
|
import time
|
||||||
|
@@ -1010,52 +1011,37 @@ def create_named_conf(paths, realm, dnsdomain, dns_backend, logger):
|
||||||
|
stderr=subprocess.STDOUT,
|
||||||
|
cwd='.').communicate()[0]
|
||||||
|
bind_info = get_string(bind_info)
|
||||||
|
- bind9_8 = '#'
|
||||||
|
- bind9_9 = '#'
|
||||||
|
- bind9_10 = '#'
|
||||||
|
- bind9_11 = '#'
|
||||||
|
- bind9_12 = '#'
|
||||||
|
- bind9_14 = '#'
|
||||||
|
- bind9_16 = '#'
|
||||||
|
- bind9_18 = '#'
|
||||||
|
- if bind_info.upper().find('BIND 9.8') != -1:
|
||||||
|
- bind9_8 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.9') != -1:
|
||||||
|
- bind9_9 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.10') != -1:
|
||||||
|
- bind9_10 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.11') != -1:
|
||||||
|
- bind9_11 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.12') != -1:
|
||||||
|
- bind9_12 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.14') != -1:
|
||||||
|
- bind9_14 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.16') != -1:
|
||||||
|
- bind9_16 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.18') != -1:
|
||||||
|
- bind9_18 = ''
|
||||||
|
- elif bind_info.upper().find('BIND 9.7') != -1:
|
||||||
|
- raise ProvisioningError("DLZ option incompatible with BIND 9.7.")
|
||||||
|
- elif bind_info.upper().find('BIND_9.13') != -1:
|
||||||
|
- raise ProvisioningError("Only stable/esv releases of BIND are supported.")
|
||||||
|
- elif bind_info.upper().find('BIND_9.15') != -1:
|
||||||
|
- raise ProvisioningError("Only stable/esv releases of BIND are supported.")
|
||||||
|
- elif bind_info.upper().find('BIND_9.17') != -1:
|
||||||
|
- raise ProvisioningError("Only stable/esv releases of BIND are supported.")
|
||||||
|
+ bind9_release = re.search('BIND (9)\.(\d+)\.', bind_info, re.I)
|
||||||
|
+ if bind9_release:
|
||||||
|
+ bind9_disabled = ''
|
||||||
|
+ bind9_version = bind9_release.group(0) + "x"
|
||||||
|
+ bind9_version_major = int(bind9_release.group(1))
|
||||||
|
+ bind9_version_minor = int(bind9_release.group(2))
|
||||||
|
+ if bind9_version_minor == 7:
|
||||||
|
+ raise ProvisioningError("DLZ option incompatible with BIND 9.7.")
|
||||||
|
+ elif bind9_version_minor == 8:
|
||||||
|
+ bind9_dlz_version = "9"
|
||||||
|
+ elif bind9_version_minor in [13, 15, 17]:
|
||||||
|
+ raise ProvisioningError("Only stable/esv releases of BIND are supported.")
|
||||||
|
+ else:
|
||||||
|
+ bind9_dlz_version = "%d_%d" % (bind9_version_major, bind9_version_minor)
|
||||||
|
else:
|
||||||
|
+ bind9_disabled = '# '
|
||||||
|
+ bind9_version = "BIND z.y.x"
|
||||||
|
+ bind9_dlz_version = "z_y"
|
||||||
|
logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf)
|
||||||
|
+
|
||||||
|
+ bind9_dlz = (
|
||||||
|
+ ' # For %s\n'
|
||||||
|
+ ' %sdatabase "dlopen %s/bind9/dlz_bind%s.so";'
|
||||||
|
+ ) % (
|
||||||
|
+ bind9_version, bind9_disabled, samba.param.modules_dir(), bind9_dlz_version
|
||||||
|
+ )
|
||||||
|
setup_file(setup_path("named.conf.dlz"), paths.namedconf, {
|
||||||
|
"NAMED_CONF": paths.namedconf,
|
||||||
|
"MODULESDIR": samba.param.modules_dir(),
|
||||||
|
- "BIND9_8": bind9_8,
|
||||||
|
- "BIND9_9": bind9_9,
|
||||||
|
- "BIND9_10": bind9_10,
|
||||||
|
- "BIND9_11": bind9_11,
|
||||||
|
- "BIND9_12": bind9_12,
|
||||||
|
- "BIND9_14": bind9_14,
|
||||||
|
- "BIND9_16": bind9_16,
|
||||||
|
- "BIND9_18": bind9_18
|
||||||
|
- })
|
||||||
|
+ "BIND9_DLZ": bind9_dlz
|
||||||
|
+ })
|
||||||
|
|
||||||
|
|
||||||
|
def create_named_txt(path, realm, dnsdomain, dnsname, binddns_dir,
|
||||||
|
diff --git a/source4/dns_server/dlz_minimal.h b/source4/dns_server/dlz_minimal.h
|
||||||
|
index b7e36e7f8e6..bbdb616deb2 100644
|
||||||
|
--- a/source4/dns_server/dlz_minimal.h
|
||||||
|
+++ b/source4/dns_server/dlz_minimal.h
|
||||||
|
@@ -26,31 +26,25 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
-#if defined (BIND_VERSION_9_8)
|
||||||
|
-# error Bind 9.8 is not supported!
|
||||||
|
-#elif defined (BIND_VERSION_9_9)
|
||||||
|
-# error Bind 9.9 is not supported!
|
||||||
|
-#elif defined (BIND_VERSION_9_10)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 1
|
||||||
|
-# define ISC_BOOLEAN_AS_BOOL 0
|
||||||
|
-#elif defined (BIND_VERSION_9_11)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
-# define ISC_BOOLEAN_AS_BOOL 0
|
||||||
|
-#elif defined (BIND_VERSION_9_12)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
-# define ISC_BOOLEAN_AS_BOOL 0
|
||||||
|
-#elif defined (BIND_VERSION_9_14)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
-#elif defined (BIND_VERSION_9_16)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
-#elif defined (BIND_VERSION_9_18)
|
||||||
|
-# define DLZ_DLOPEN_VERSION 3
|
||||||
|
-# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
+#if defined (BIND_VERSION)
|
||||||
|
+# if BIND_VERSION == 908
|
||||||
|
+# error Bind 9.8 is not supported!
|
||||||
|
+# elif BIND_VERSION == 909
|
||||||
|
+# error Bind 9.9 is not supported!
|
||||||
|
+# elif BIND_VERSION == 910
|
||||||
|
+# define DLZ_DLOPEN_VERSION 3
|
||||||
|
+# define DNS_CLIENTINFO_VERSION 1
|
||||||
|
+# define ISC_BOOLEAN_AS_BOOL 0
|
||||||
|
+# elif BIND_VERSION == 911 || BIND_VERSION == 912
|
||||||
|
+# define DLZ_DLOPEN_VERSION 3
|
||||||
|
+# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
+# define ISC_BOOLEAN_AS_BOOL 0
|
||||||
|
+# elif BIND_VERSION >= 914
|
||||||
|
+# define DLZ_DLOPEN_VERSION 3
|
||||||
|
+# define DNS_CLIENTINFO_VERSION 2
|
||||||
|
+# else
|
||||||
|
+# error Unsupported BIND version
|
||||||
|
+# endif
|
||||||
|
#else
|
||||||
|
# error Unsupported BIND version
|
||||||
|
#endif
|
||||||
|
diff --git a/source4/dns_server/wscript_build b/source4/dns_server/wscript_build
|
||||||
|
index ab0a241b937..3743753504c 100644
|
||||||
|
--- a/source4/dns_server/wscript_build
|
||||||
|
+++ b/source4/dns_server/wscript_build
|
||||||
|
@@ -20,69 +20,21 @@ bld.SAMBA_MODULE('service_dns',
|
||||||
|
)
|
||||||
|
|
||||||
|
# a bind9 dlz module giving access to the Samba DNS SAM
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_10',
|
||||||
|
+for bind_version in (910, 911, 912, 914, 916, 918, 920):
|
||||||
|
+ string_version='%d_%d' % (bind_version // 100, bind_version % 100)
|
||||||
|
+ bld.SAMBA_LIBRARY('dlz_bind%s' % (string_version),
|
||||||
|
source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_10',
|
||||||
|
+ cflags='-DBIND_VERSION=%d' % bind_version,
|
||||||
|
private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_10.so',
|
||||||
|
- realname='dlz_bind9_10.so',
|
||||||
|
- install_path='${MODULESDIR}/bind9',
|
||||||
|
- deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
- enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
-
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_11',
|
||||||
|
- source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_11',
|
||||||
|
- private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_11.so',
|
||||||
|
- realname='dlz_bind9_11.so',
|
||||||
|
- install_path='${MODULESDIR}/bind9',
|
||||||
|
- deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
- enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
-
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_12',
|
||||||
|
- source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_12',
|
||||||
|
- private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_12.so',
|
||||||
|
- realname='dlz_bind9_12.so',
|
||||||
|
- install_path='${MODULESDIR}/bind9',
|
||||||
|
- deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
- enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
-
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_14',
|
||||||
|
- source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_14',
|
||||||
|
- private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_14.so',
|
||||||
|
- realname='dlz_bind9_14.so',
|
||||||
|
- install_path='${MODULESDIR}/bind9',
|
||||||
|
- deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
- enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
-
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_16',
|
||||||
|
- source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_16',
|
||||||
|
- private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_16.so',
|
||||||
|
- realname='dlz_bind9_16.so',
|
||||||
|
- install_path='${MODULESDIR}/bind9',
|
||||||
|
- deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
- enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
-
|
||||||
|
-bld.SAMBA_LIBRARY('dlz_bind9_18',
|
||||||
|
- source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_18',
|
||||||
|
- private_library=True,
|
||||||
|
- link_name='modules/bind9/dlz_bind9_18.so',
|
||||||
|
- realname='dlz_bind9_18.so',
|
||||||
|
+ link_name='modules/bind9/dlz_bind%s.so' % (string_version),
|
||||||
|
+ realname='dlz_bind%s.so' % (string_version),
|
||||||
|
install_path='${MODULESDIR}/bind9',
|
||||||
|
deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
|
||||||
|
bld.SAMBA_LIBRARY('dlz_bind9_for_torture',
|
||||||
|
source='dlz_bind9.c',
|
||||||
|
- cflags='-DBIND_VERSION_9_16',
|
||||||
|
+ cflags='-DBIND_VERSION=920',
|
||||||
|
private_library=True,
|
||||||
|
deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
|
||||||
|
enabled=bld.AD_DC_BUILD_IS_ENABLED())
|
||||||
|
diff --git a/source4/setup/named.conf.dlz b/source4/setup/named.conf.dlz
|
||||||
|
index cbe7d805f58..32672768af4 100644
|
||||||
|
--- a/source4/setup/named.conf.dlz
|
||||||
|
+++ b/source4/setup/named.conf.dlz
|
||||||
|
@@ -10,28 +10,5 @@
|
||||||
|
# Uncomment only single database line, depending on your BIND version
|
||||||
|
#
|
||||||
|
dlz "AD DNS Zone" {
|
||||||
|
- # For BIND 9.8.x
|
||||||
|
- ${BIND9_8} database "dlopen ${MODULESDIR}/bind9/dlz_bind9.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.9.x
|
||||||
|
- ${BIND9_9} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_9.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.10.x
|
||||||
|
- ${BIND9_10} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_10.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.11.x
|
||||||
|
- ${BIND9_11} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_11.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.12.x
|
||||||
|
- ${BIND9_12} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_12.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.14.x
|
||||||
|
- ${BIND9_14} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_14.so";
|
||||||
|
-
|
||||||
|
- # For BIND 9.16.x
|
||||||
|
- ${BIND9_16} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_16.so";
|
||||||
|
- #
|
||||||
|
- # For BIND 9.18.x
|
||||||
|
- ${BIND9_18} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_18.so";
|
||||||
|
+${BIND9_DLZ}
|
||||||
|
};
|
||||||
|
-
|
||||||
|
diff --git a/source4/torture/dns/wscript_build b/source4/torture/dns/wscript_build
|
||||||
|
index 0b40e03e370..bf7415ff88a 100644
|
||||||
|
--- a/source4/torture/dns/wscript_build
|
||||||
|
+++ b/source4/torture/dns/wscript_build
|
||||||
|
@@ -5,7 +5,7 @@ if bld.AD_DC_BUILD_IS_ENABLED():
|
||||||
|
source='dlz_bind9.c',
|
||||||
|
subsystem='smbtorture',
|
||||||
|
init_function='torture_bind_dns_init',
|
||||||
|
- cflags='-DBIND_VERSION_9_16',
|
||||||
|
+ cflags='-DBIND_VERSION=920',
|
||||||
|
deps='torture talloc torturemain dlz_bind9_for_torture',
|
||||||
|
internal_module=True
|
||||||
|
)
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
From 639b8d650685476016a6d5b1c996a04ac54f8a6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 04:00:08 +0200
|
||||||
|
Subject: [PATCH 02/28] Adjust abi_gen.sh script to run under FreeBSD with it's
|
||||||
|
own bintools and slightly different output of GDB.
|
||||||
|
|
||||||
|
Substitution: yes
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
buildtools/scripts/abi_gen.sh | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/buildtools/scripts/abi_gen.sh b/buildtools/scripts/abi_gen.sh
|
||||||
|
index ddb0a7cc36f..d2750705ff9 100755
|
||||||
|
--- a/buildtools/scripts/abi_gen.sh
|
||||||
|
+++ b/buildtools/scripts/abi_gen.sh
|
||||||
|
@@ -9,6 +9,7 @@ GDBSCRIPT="gdb_syms.$$"
|
||||||
|
cat <<EOF
|
||||||
|
set height 0
|
||||||
|
set width 0
|
||||||
|
+set print sevenbit-strings on
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# On older linker versions _init|_fini symbols are not hidden.
|
||||||
|
@@ -22,5 +23,5 @@ done
|
||||||
|
) > $GDBSCRIPT
|
||||||
|
|
||||||
|
# forcing the terminal avoids a problem on Fedora12
|
||||||
|
-TERM=none gdb -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
|
||||||
|
+TERM=none %%GDB_CMD%% -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
|
||||||
|
rm -f $GDBSCRIPT
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
From 382c3edc95a1747e0a6edd05c76adc0ec21a66c7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:50:17 +0200
|
||||||
|
Subject: [PATCH 03/28] Mask CLang prototype warnings in kadm5/admin.h
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source4/kdc/kdc-service-mit.c | 6 +++++-
|
||||||
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/source4/kdc/kdc-service-mit.c b/source4/kdc/kdc-service-mit.c
|
||||||
|
index 22663b6ecc8..5bef125206a 100644
|
||||||
|
--- a/source4/kdc/kdc-service-mit.c
|
||||||
|
+++ b/source4/kdc/kdc-service-mit.c
|
||||||
|
@@ -36,9 +36,13 @@
|
||||||
|
#include "kdc/samba_kdc.h"
|
||||||
|
#include "kdc/kdc-server.h"
|
||||||
|
#include "kdc/kpasswd-service.h"
|
||||||
|
-#include <kadm5/admin.h>
|
||||||
|
#include <kdb.h>
|
||||||
|
|
||||||
|
+#pragma clang diagnostic push
|
||||||
|
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
|
||||||
|
+#include <kadm5/admin.h>
|
||||||
|
+#pragma clang diagnostic pop
|
||||||
|
+
|
||||||
|
#include "source4/kdc/mit_kdc_irpc.h"
|
||||||
|
|
||||||
|
/* PROTOTYPES */
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,38 @@
|
|||||||
|
From 0eb28116ceefee7bdafabac18a1763f13cb71883 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:42:31 +0200
|
||||||
|
Subject: [PATCH 04/28] On FreeBSD `date(1)` has different semantics than on
|
||||||
|
Linux. Generate call parameter accordingly.
|
||||||
|
|
||||||
|
FreeBSD: `date [[[[[cc]yy]mm]dd]HH]MM[.ss]`
|
||||||
|
Linux: `date [mmddHHMM[[cc]yy][.ss]]`
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/utils/net_time.c | 7 ++++++-
|
||||||
|
1 file changed, 6 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/source3/utils/net_time.c b/source3/utils/net_time.c
|
||||||
|
index d102f84614f..f679000a979 100644
|
||||||
|
--- a/source3/utils/net_time.c
|
||||||
|
+++ b/source3/utils/net_time.c
|
||||||
|
@@ -82,10 +82,15 @@ static const char *systime(time_t t)
|
||||||
|
if (!tm) {
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+#if defined(FREEBSD)
|
||||||
|
+ return talloc_asprintf(talloc_tos(), "%04d%02d%02d%02d%02d.%02d",
|
||||||
|
+ tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday,
|
||||||
|
+ tm->tm_hour, tm->tm_min, tm->tm_sec);
|
||||||
|
+#else
|
||||||
|
return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d",
|
||||||
|
tm->tm_mon+1, tm->tm_mday, tm->tm_hour,
|
||||||
|
tm->tm_min, tm->tm_year + 1900, tm->tm_sec);
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
int net_time_usage(struct net_context *c, int argc, const char **argv)
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
From 3cc67018c560d32b98523618d16902c1a670ed40 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:33:51 +0200
|
||||||
|
Subject: [PATCH 05/28] Include jemalloc/jemalloc.h if ENABLE_JEMALLOC is set.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/include/includes.h | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/source3/include/includes.h b/source3/include/includes.h
|
||||||
|
index 510a0b96539..94a076de11e 100644
|
||||||
|
--- a/source3/include/includes.h
|
||||||
|
+++ b/source3/include/includes.h
|
||||||
|
@@ -326,6 +326,8 @@ typedef char fstring[FSTRING_LEN];
|
||||||
|
* the *bottom* of include files so as not to conflict. */
|
||||||
|
#ifdef ENABLE_DMALLOC
|
||||||
|
# include <dmalloc.h>
|
||||||
|
+#elif ENABLE_JEMALLOC
|
||||||
|
+# include <jemalloc/jemalloc.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
From 406621efcd26d48b5e8f1e5df4082c8bf2cc8bab Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:32:21 +0200
|
||||||
|
Subject: [PATCH 06/28] Install nss_* modules into PAMMODULESDIR path.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
nsswitch/wscript_build | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/nsswitch/wscript_build b/nsswitch/wscript_build
|
||||||
|
index 3247b6c2b7c..df2fc3b97ea 100644
|
||||||
|
--- a/nsswitch/wscript_build
|
||||||
|
+++ b/nsswitch/wscript_build
|
||||||
|
@@ -54,12 +54,14 @@ elif (host_os.rfind('freebsd') > -1):
|
||||||
|
source='winbind_nss_linux.c winbind_nss_freebsd.c',
|
||||||
|
deps='wbclient',
|
||||||
|
realname='nss_winbind.so.1',
|
||||||
|
+ install_path='${PAMMODULESDIR}',
|
||||||
|
vnum='1')
|
||||||
|
|
||||||
|
bld.SAMBA3_PLUGIN('nss_wins',
|
||||||
|
source='wins.c wins_freebsd.c',
|
||||||
|
deps='''wbclient''',
|
||||||
|
realname='nss_wins.so.1',
|
||||||
|
+ install_path='${PAMMODULESDIR}',
|
||||||
|
vnum='1')
|
||||||
|
|
||||||
|
elif (host_os.rfind('netbsd') > -1):
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,105 @@
|
|||||||
|
From 75f20f8e144a926873b619e1c0918896689d39a0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:28:09 +0200
|
||||||
|
Subject: [PATCH 07/28] Use macro value as a default backlog size for the
|
||||||
|
`listen()` syscall.
|
||||||
|
|
||||||
|
Set that macro to -1 on FreeBSD, specifying maximum kernel configured
|
||||||
|
allowed backlog size.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
lib/tevent/echo_server.c | 2 +-
|
||||||
|
source3/include/local.h | 11 +++++++++++
|
||||||
|
source3/libsmb/unexpected.c | 2 +-
|
||||||
|
source3/utils/smbfilter.c | 2 +-
|
||||||
|
source3/winbindd/winbindd.c | 4 ++--
|
||||||
|
5 files changed, 16 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/tevent/echo_server.c b/lib/tevent/echo_server.c
|
||||||
|
index f93d8bcdee7..49354dbf0e5 100644
|
||||||
|
--- a/lib/tevent/echo_server.c
|
||||||
|
+++ b/lib/tevent/echo_server.c
|
||||||
|
@@ -633,7 +633,7 @@ int main(int argc, const char **argv)
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = listen(listen_sock, 5);
|
||||||
|
+ ret = listen(listen_sock, DEFAULT_LISTEN_BACKLOG);
|
||||||
|
if (ret == -1) {
|
||||||
|
perror("listen() failed");
|
||||||
|
exit(1);
|
||||||
|
diff --git a/source3/include/local.h b/source3/include/local.h
|
||||||
|
index 297e5572fdb..d85aab09f9f 100644
|
||||||
|
--- a/source3/include/local.h
|
||||||
|
+++ b/source3/include/local.h
|
||||||
|
@@ -163,7 +163,18 @@
|
||||||
|
#define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
|
||||||
|
|
||||||
|
/* size of listen() backlog in smbd */
|
||||||
|
+#if defined (FREEBSD)
|
||||||
|
+#define SMBD_LISTEN_BACKLOG -1
|
||||||
|
+#else
|
||||||
|
#define SMBD_LISTEN_BACKLOG 50
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+/* size of listen() default backlog */
|
||||||
|
+#if defined (FREEBSD)
|
||||||
|
+#define DEFAULT_LISTEN_BACKLOG -1
|
||||||
|
+#else
|
||||||
|
+#define DEFAULT_LISTEN_BACKLOG 5
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Number of microseconds to wait before a sharing violation. */
|
||||||
|
#define SHARING_VIOLATION_USEC_WAIT 950000
|
||||||
|
diff --git a/source3/libsmb/unexpected.c b/source3/libsmb/unexpected.c
|
||||||
|
index ced46969b88..317d6b1e0e2 100644
|
||||||
|
--- a/source3/libsmb/unexpected.c
|
||||||
|
+++ b/source3/libsmb/unexpected.c
|
||||||
|
@@ -95,7 +95,7 @@ NTSTATUS nb_packet_server_create(TALLOC_CTX *mem_ctx,
|
||||||
|
status = map_nt_error_from_unix(errno);
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
- rc = listen(result->listen_sock, 5);
|
||||||
|
+ rc = listen(result->listen_sock, DEFAULT_LISTEN_BACKLOG);
|
||||||
|
if (rc < 0) {
|
||||||
|
status = map_nt_error_from_unix(errno);
|
||||||
|
goto fail;
|
||||||
|
diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c
|
||||||
|
index 3fbd63975c9..b2d90f993fc 100644
|
||||||
|
--- a/source3/utils/smbfilter.c
|
||||||
|
+++ b/source3/utils/smbfilter.c
|
||||||
|
@@ -291,7 +291,7 @@ static void start_filter(char *desthost)
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (listen(s, 5) == -1) {
|
||||||
|
+ if (listen(s, DEFAULT_LISTEN_BACKLOG) == -1) {
|
||||||
|
d_printf("listen failed\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
|
||||||
|
index 0f9c6449a5a..c2df0c92372 100644
|
||||||
|
--- a/source3/winbindd/winbindd.c
|
||||||
|
+++ b/source3/winbindd/winbindd.c
|
||||||
|
@@ -1312,7 +1312,7 @@ static bool winbindd_setup_listeners(void)
|
||||||
|
if (pub_state->fd == -1) {
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
- rc = listen(pub_state->fd, 5);
|
||||||
|
+ rc = listen(pub_state->fd, DEFAULT_LISTEN_BACKLOG);
|
||||||
|
if (rc < 0) {
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
@@ -1344,7 +1344,7 @@ static bool winbindd_setup_listeners(void)
|
||||||
|
if (priv_state->fd == -1) {
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
- rc = listen(priv_state->fd, 5);
|
||||||
|
+ rc = listen(priv_state->fd, DEFAULT_LISTEN_BACKLOG);
|
||||||
|
if (rc < 0) {
|
||||||
|
goto failed;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
From 29d0b3479f61f33356d6cc82099085b5c412f949 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:24:48 +0200
|
||||||
|
Subject: [PATCH 08/28] Brute force work around usage of Linux-specific `%m`
|
||||||
|
flag in `sscanf()`.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
libcli/http/http.c | 36 ++++++++++++++++++++++++++-----
|
||||||
|
source4/libcli/ldap/ldap_client.c | 12 +++++++++++
|
||||||
|
2 files changed, 43 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/libcli/http/http.c b/libcli/http/http.c
|
||||||
|
index d20fc25f9e2..a28caca0045 100644
|
||||||
|
--- a/libcli/http/http.c
|
||||||
|
+++ b/libcli/http/http.c
|
||||||
|
@@ -142,7 +142,19 @@ static enum http_read_status http_parse_headers(struct http_read_response_state
|
||||||
|
return HTTP_ALL_DATA_READ;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef FREEBSD
|
||||||
|
+ int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0;
|
||||||
|
+ n = sscanf(line, "%n%*[^:]%n: %n%*[^\r\n]%n\r\n", &s0, &s1, &s2, &s3);
|
||||||
|
+
|
||||||
|
+ if(n >= 0) {
|
||||||
|
+ key = calloc(sizeof(char), s1-s0+1);
|
||||||
|
+ value = calloc(sizeof(char), s3-s2+1);
|
||||||
|
+
|
||||||
|
+ n = sscanf(line, "%[^:]: %[^\r\n]\r\n", key, value);
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
n = sscanf(line, "%m[^:]: %m[^\r\n]\r\n", &key, &value);
|
||||||
|
+#endif
|
||||||
|
if (n != 2) {
|
||||||
|
DEBUG(0, ("%s: Error parsing header '%s'\n", __func__, line));
|
||||||
|
status = HTTP_DATA_CORRUPTED;
|
||||||
|
@@ -168,7 +180,7 @@ error:
|
||||||
|
static bool http_parse_response_line(struct http_read_response_state *state)
|
||||||
|
{
|
||||||
|
bool status = true;
|
||||||
|
- char *protocol;
|
||||||
|
+ char *protocol = NULL;
|
||||||
|
char *msg = NULL;
|
||||||
|
char major;
|
||||||
|
char minor;
|
||||||
|
@@ -188,12 +200,22 @@ static bool http_parse_response_line(struct http_read_response_state *state)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef FREEBSD
|
||||||
|
+ int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0;
|
||||||
|
+ n = sscanf(line, "%n%*[^/]%n/%c.%c %d %n%*[^\r\n]%n\r\n",
|
||||||
|
+ &s0, &s1, &major, &minor, &code, &s2, &s3);
|
||||||
|
+
|
||||||
|
+ if(n == 3) {
|
||||||
|
+ protocol = calloc(sizeof(char), s1-s0+1);
|
||||||
|
+ msg = calloc(sizeof(char), s3-s2+1);
|
||||||
|
+
|
||||||
|
+ n = sscanf(line, "%[^/]/%c.%c %d %[^\r\n]\r\n",
|
||||||
|
+ protocol, &major, &minor, &code, msg);
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
n = sscanf(line, "%m[^/]/%c.%c %d %m[^\r\n]\r\n",
|
||||||
|
&protocol, &major, &minor, &code, &msg);
|
||||||
|
-
|
||||||
|
- DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, "
|
||||||
|
- "code->%d, message->%s\n", __func__, n, protocol, major, minor,
|
||||||
|
- code, msg));
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (n != 5) {
|
||||||
|
DEBUG(0, ("%s: Error parsing header\n", __func__));
|
||||||
|
@@ -201,6 +223,10 @@ static bool http_parse_response_line(struct http_read_response_state *state)
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, "
|
||||||
|
+ "code->%d, message->%s\n", __func__, n, protocol, major, minor,
|
||||||
|
+ code, msg));
|
||||||
|
+
|
||||||
|
if (major != '1') {
|
||||||
|
DEBUG(0, ("%s: Bad HTTP major number '%c'\n", __func__, major));
|
||||||
|
status = false;
|
||||||
|
diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c
|
||||||
|
index 8614ccdfd54..2630d3c8859 100644
|
||||||
|
--- a/source4/libcli/ldap/ldap_client.c
|
||||||
|
+++ b/source4/libcli/ldap/ldap_client.c
|
||||||
|
@@ -402,8 +402,20 @@ static int ldap_parse_basic_url(
|
||||||
|
*pport = port;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+#ifdef FREEBSD
|
||||||
|
+ int s0, s1; s0 = s1 = 0;
|
||||||
|
+ ret = sscanf(url, "%n%*[^:/]%n:%d", &s0, &s1, &port);
|
||||||
|
|
||||||
|
+ if(ret >= 0) {
|
||||||
|
+ host = calloc(sizeof(char), s1 - s0 + 1);
|
||||||
|
+ if (host == NULL) {
|
||||||
|
+ return ENOMEM;
|
||||||
|
+ }
|
||||||
|
+ ret = sscanf(url, "%[^:/]:%d", host, &port);
|
||||||
|
+ }
|
||||||
|
+#else
|
||||||
|
ret = sscanf(url, "%m[^:/]:%d", &host, &port);
|
||||||
|
+#endif
|
||||||
|
if (ret < 1) {
|
||||||
|
return EINVAL;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
From 3189d57e9c6cf8d5d25566f2760cfa4f822d7a2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:21:19 +0200
|
||||||
|
Subject: [PATCH 09/28] Make sure that config checks fail if the warning is
|
||||||
|
raised, by adding -Werror flag to the CFLAGS(WERROR_CFLAGS)
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
buildtools/wafsamba/samba_autoconf.py | 2 +-
|
||||||
|
lib/replace/wscript | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py
|
||||||
|
index 78927d85193..cf87c8bb9ff 100644
|
||||||
|
--- a/buildtools/wafsamba/samba_autoconf.py
|
||||||
|
+++ b/buildtools/wafsamba/samba_autoconf.py
|
||||||
|
@@ -987,5 +987,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
|
||||||
|
conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
|
||||||
|
|
||||||
|
if (conf.env.undefined_ignore_ldflags == [] and
|
||||||
|
- conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])):
|
||||||
|
+ conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)):
|
||||||
|
conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
|
||||||
|
diff --git a/lib/replace/wscript b/lib/replace/wscript
|
||||||
|
index 0db93d8caf1..1f9806f1dd7 100644
|
||||||
|
--- a/lib/replace/wscript
|
||||||
|
+++ b/lib/replace/wscript
|
||||||
|
@@ -122,7 +122,7 @@ def configure(conf):
|
||||||
|
conf.CHECK_HEADERS('sys/atomic.h stdatomic.h')
|
||||||
|
conf.CHECK_HEADERS('libgen.h')
|
||||||
|
|
||||||
|
- if conf.CHECK_CFLAGS('-Wno-format-truncation'):
|
||||||
|
+ if conf.CHECK_CFLAGS(['-Wno-format-truncation'] + conf.env.WERROR_CFLAGS):
|
||||||
|
conf.define('HAVE_WNO_FORMAT_TRUNCATION', '1')
|
||||||
|
|
||||||
|
if conf.CHECK_CFLAGS('-Wno-unused-function'):
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
From 5b0d17a5b7849f40f59fb0daedd62e8f5a1b0fba Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 03:16:37 +0200
|
||||||
|
Subject: [PATCH 10/28] Add option --with-pkgconfigdir, to specify alternative
|
||||||
|
location.
|
||||||
|
|
||||||
|
Override name of the config file.
|
||||||
|
|
||||||
|
Remove code that doesn't allow direct install into /usr
|
||||||
|
|
||||||
|
Substitution: yes
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
dynconfig/wscript | 9 ++++-----
|
||||||
|
1 file changed, 4 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/dynconfig/wscript b/dynconfig/wscript
|
||||||
|
index c62afa25399..29cacf1b92c 100644
|
||||||
|
--- a/dynconfig/wscript
|
||||||
|
+++ b/dynconfig/wscript
|
||||||
|
@@ -151,6 +151,8 @@ dynconfig = {
|
||||||
|
'PKGCONFIGDIR' : {
|
||||||
|
'STD-PATH': '${LIBDIR}/pkgconfig',
|
||||||
|
'FHS-PATH': '${LIBDIR}/pkgconfig',
|
||||||
|
+ 'OPTION': '--with-pkgconfigdir',
|
||||||
|
+ 'HELPTEXT': 'Where to put .pc files',
|
||||||
|
},
|
||||||
|
'CODEPAGEDIR' : {
|
||||||
|
'STD-PATH': '${DATADIR}/codepages',
|
||||||
|
@@ -257,8 +259,8 @@ dynconfig = {
|
||||||
|
'DELAY': True,
|
||||||
|
},
|
||||||
|
'CONFIGFILE' : {
|
||||||
|
- 'STD-PATH': '${CONFIGDIR}/smb.conf',
|
||||||
|
- 'FHS-PATH': '${CONFIGDIR}/smb.conf',
|
||||||
|
+ 'STD-PATH': '${CONFIGDIR}/%%SAMBA4_CONFIG%%',
|
||||||
|
+ 'FHS-PATH': '${CONFIGDIR}/%%SAMBA4_CONFIG%%',
|
||||||
|
'DELAY': True,
|
||||||
|
},
|
||||||
|
'LMHOSTSFILE' : {
|
||||||
|
@@ -317,9 +319,6 @@ def configure(conf):
|
||||||
|
flavor = 'FHS-PATH'
|
||||||
|
else:
|
||||||
|
flavor = 'STD-PATH'
|
||||||
|
- if conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local':
|
||||||
|
- Logs.error("Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)")
|
||||||
|
- raise Errors.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))
|
||||||
|
|
||||||
|
explicit_set ={}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
From 6c68907dcd9abd82cc95c842380a8e817b8f0e7f Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 02:54:28 +0200
|
||||||
|
Subject: [PATCH 11/28] Use provided by port location of the XML catalog.
|
||||||
|
|
||||||
|
Substitution: yes
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
buildtools/wafsamba/wafsamba.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/buildtools/wafsamba/wafsamba.py b/buildtools/wafsamba/wafsamba.py
|
||||||
|
index 7885ee720be..c42a021bc01 100644
|
||||||
|
--- a/buildtools/wafsamba/wafsamba.py
|
||||||
|
+++ b/buildtools/wafsamba/wafsamba.py
|
||||||
|
@@ -1174,7 +1174,7 @@ def SAMBAMANPAGES(bld, manpages, extra_source=None):
|
||||||
|
bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl'
|
||||||
|
bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl'
|
||||||
|
bld.env.SAMBA_CATALOG = bld.bldnode.abspath() + '/docs-xml/build/catalog.xml'
|
||||||
|
- bld.env.SAMBA_CATALOGS = os.getenv('XML_CATALOG_FILES', 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog') + ' file://' + bld.env.SAMBA_CATALOG
|
||||||
|
+ bld.env.SAMBA_CATALOGS = os.getenv('XML_CATALOG_FILES', 'file:///etc/xml/catalog file://%%LOCALBASE%%/share/xml/catalog') + ' file://' + bld.env.SAMBA_CATALOG
|
||||||
|
|
||||||
|
for m in manpages.split():
|
||||||
|
source = [m + '.xml']
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
From 9731cc810b50b6694ff931135df398a6772200ae Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sun, 30 May 2021 02:51:47 +0200
|
||||||
|
Subject: [PATCH 12/28] Create shared libraries according to the
|
||||||
|
FreeBSD-specific naming schema, where only major.minor versions are used.
|
||||||
|
|
||||||
|
https://docs.freebsd.org/en/books/developers-handbook/policies/#policies-shlib
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
buildtools/wafsamba/samba_install.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/buildtools/wafsamba/samba_install.py b/buildtools/wafsamba/samba_install.py
|
||||||
|
index 2957e16c3da..82abbf893e2 100644
|
||||||
|
--- a/buildtools/wafsamba/samba_install.py
|
||||||
|
+++ b/buildtools/wafsamba/samba_install.py
|
||||||
|
@@ -115,7 +115,7 @@ def install_library(self):
|
||||||
|
inst_name = bld.make_libname(t.target)
|
||||||
|
elif self.vnum:
|
||||||
|
vnum_base = self.vnum.split('.')[0]
|
||||||
|
- install_name = bld.make_libname(target_name, version=self.vnum)
|
||||||
|
+ install_name = bld.make_libname(target_name, version=vnum_base)
|
||||||
|
install_link = bld.make_libname(target_name, version=vnum_base)
|
||||||
|
inst_name = bld.make_libname(t.target)
|
||||||
|
if not self.private_library or not t.env.SONAME_ST:
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,77 @@
|
|||||||
|
From 2f16c17b683655fe318a1e6d45aaad3857d1a512 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 00:35:36 +0200
|
||||||
|
Subject: [PATCH 14/28] Add option to disable CTDB tests - failing on FreeBSD
|
||||||
|
right now in too many places.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
ctdb/wscript | 24 ++++++++++++++++++------
|
||||||
|
1 file changed, 18 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/ctdb/wscript b/ctdb/wscript
|
||||||
|
index a9fef9241aa..c89c6decdd7 100644
|
||||||
|
--- a/ctdb/wscript
|
||||||
|
+++ b/ctdb/wscript
|
||||||
|
@@ -106,6 +106,9 @@ def options(opt):
|
||||||
|
opt.add_option('--enable-ceph-reclock',
|
||||||
|
help=("Enable Ceph CTDB recovery lock helper (default=no)"),
|
||||||
|
action="store_true", dest='ctdb_ceph_reclock', default=False)
|
||||||
|
+ opt.add_option('--disable-ctdb-tests',
|
||||||
|
+ help=("Disable CTDB tests (default=no)"),
|
||||||
|
+ action="store_true", dest='ctdb_no_tests', default=False)
|
||||||
|
|
||||||
|
opt.add_option('--with-logdir',
|
||||||
|
help=("Path to log directory"),
|
||||||
|
@@ -278,7 +281,7 @@ def configure(conf):
|
||||||
|
|
||||||
|
if Options.options.ctdb_ceph_reclock:
|
||||||
|
if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
|
||||||
|
- conf.CHECK_LIB('rados', shlib=True)):
|
||||||
|
+ conf.CHECK_LIB('rados', shlib=True)):
|
||||||
|
Logs.info('Building with Ceph librados recovery lock support')
|
||||||
|
conf.define('HAVE_LIBRADOS', 1)
|
||||||
|
else:
|
||||||
|
@@ -317,8 +320,14 @@ def configure(conf):
|
||||||
|
conf.env.CTDB_VARDIR,
|
||||||
|
conf.env.CTDB_RUNDIR))
|
||||||
|
|
||||||
|
- conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
|
||||||
|
- conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
|
||||||
|
+ if Options.options.ctdb_no_tests:
|
||||||
|
+ conf.env.ctdb_tests = False
|
||||||
|
+ else:
|
||||||
|
+ conf.env.ctdb_tests = True
|
||||||
|
+
|
||||||
|
+ if conf.env.ctdb_tests:
|
||||||
|
+ conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
|
||||||
|
+ conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
|
||||||
|
|
||||||
|
# Allow unified compilation and separate compilation of utilities
|
||||||
|
# to find includes
|
||||||
|
@@ -706,9 +715,9 @@ def build(bld):
|
||||||
|
if bld.env.HAVE_LIBRADOS:
|
||||||
|
bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
|
||||||
|
source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
|
||||||
|
- deps='talloc tevent rados',
|
||||||
|
- includes='include',
|
||||||
|
- install_path='${CTDB_HELPER_BINDIR}')
|
||||||
|
+ deps='talloc tevent rados',
|
||||||
|
+ includes='include',
|
||||||
|
+ install_path='${CTDB_HELPER_BINDIR}')
|
||||||
|
|
||||||
|
sed_expr1 = 's|/usr/local/var/lib/ctdb|%s|g' % (bld.env.CTDB_VARDIR)
|
||||||
|
sed_expr2 = 's|/usr/local/etc/ctdb|%s|g' % (bld.env.CTDB_ETCDIR)
|
||||||
|
@@ -885,6 +894,9 @@ def build(bld):
|
||||||
|
for d in ['volatile', 'persistent', 'state']:
|
||||||
|
bld.INSTALL_DIR(os.path.join(bld.env.CTDB_VARDIR, d))
|
||||||
|
|
||||||
|
+ if not bld.env.ctdb_tests:
|
||||||
|
+ return
|
||||||
|
+
|
||||||
|
#
|
||||||
|
# Test-only below this point
|
||||||
|
#
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,132 @@
|
|||||||
|
From 08e648c899e5023f337d2fa56e4e758f62f31ec4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 00:38:38 +0200
|
||||||
|
Subject: [PATCH 15/28] Add extra debug class to trck down DB locking code.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
lib/dbwrap/dbwrap.c | 3 +++
|
||||||
|
lib/dbwrap/dbwrap_local_open.c | 3 +++
|
||||||
|
lib/dbwrap/dbwrap_rbt.c | 3 +++
|
||||||
|
lib/dbwrap/dbwrap_tdb.c | 3 +++
|
||||||
|
lib/dbwrap/dbwrap_util.c | 3 +++
|
||||||
|
source3/lib/dbwrap/dbwrap_ctdb.c | 3 +++
|
||||||
|
source3/lib/dbwrap/dbwrap_open.c | 3 +++
|
||||||
|
source3/lib/dbwrap/dbwrap_watch.c | 3 +++
|
||||||
|
8 files changed, 24 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/dbwrap/dbwrap.c b/lib/dbwrap/dbwrap.c
|
||||||
|
index 7555efaa3ab..51f58fea851 100644
|
||||||
|
--- a/lib/dbwrap/dbwrap.c
|
||||||
|
+++ b/lib/dbwrap/dbwrap.c
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
#include "lib/util/util_tdb.h"
|
||||||
|
#include "lib/util/tevent_ntstatus.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Fall back using fetch if no genuine exists operation is provided
|
||||||
|
*/
|
||||||
|
diff --git a/lib/dbwrap/dbwrap_local_open.c b/lib/dbwrap/dbwrap_local_open.c
|
||||||
|
index 20c5fa0e1d2..b834bbd0e41 100644
|
||||||
|
--- a/lib/dbwrap/dbwrap_local_open.c
|
||||||
|
+++ b/lib/dbwrap/dbwrap_local_open.c
|
||||||
|
@@ -23,6 +23,9 @@
|
||||||
|
#include "dbwrap/dbwrap_tdb.h"
|
||||||
|
#include "tdb.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
|
||||||
|
const char *name,
|
||||||
|
int hash_size, int tdb_flags,
|
||||||
|
diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
|
||||||
|
index db456dfffba..483558a6dc7 100644
|
||||||
|
--- a/lib/dbwrap/dbwrap_rbt.c
|
||||||
|
+++ b/lib/dbwrap/dbwrap_rbt.c
|
||||||
|
@@ -24,6 +24,9 @@
|
||||||
|
#include "../lib/util/rbtree.h"
|
||||||
|
#include "../lib/util/dlinklist.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
#define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
|
||||||
|
|
||||||
|
struct db_rbt_ctx {
|
||||||
|
diff --git a/lib/dbwrap/dbwrap_tdb.c b/lib/dbwrap/dbwrap_tdb.c
|
||||||
|
index 6cd95fa25ad..4a75cd80256 100644
|
||||||
|
--- a/lib/dbwrap/dbwrap_tdb.c
|
||||||
|
+++ b/lib/dbwrap/dbwrap_tdb.c
|
||||||
|
@@ -29,6 +29,9 @@
|
||||||
|
#include "lib/param/param.h"
|
||||||
|
#include "libcli/util/error.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
struct db_tdb_ctx {
|
||||||
|
struct tdb_wrap *wtdb;
|
||||||
|
|
||||||
|
diff --git a/lib/dbwrap/dbwrap_util.c b/lib/dbwrap/dbwrap_util.c
|
||||||
|
index df6dea40097..465814f0952 100644
|
||||||
|
--- a/lib/dbwrap/dbwrap_util.c
|
||||||
|
+++ b/lib/dbwrap/dbwrap_util.c
|
||||||
|
@@ -26,6 +26,9 @@
|
||||||
|
#include "dbwrap.h"
|
||||||
|
#include "lib/util/util_tdb.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
struct dbwrap_fetch_int32_state {
|
||||||
|
NTSTATUS status;
|
||||||
|
int32_t result;
|
||||||
|
diff --git a/source3/lib/dbwrap/dbwrap_ctdb.c b/source3/lib/dbwrap/dbwrap_ctdb.c
|
||||||
|
index 0907089164a..9fc771d1217 100644
|
||||||
|
--- a/source3/lib/dbwrap/dbwrap_ctdb.c
|
||||||
|
+++ b/source3/lib/dbwrap/dbwrap_ctdb.c
|
||||||
|
@@ -38,6 +38,9 @@
|
||||||
|
#include "lib/cluster_support.h"
|
||||||
|
#include "lib/util/tevent_ntstatus.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
struct db_ctdb_transaction_handle {
|
||||||
|
struct db_ctdb_ctx *ctx;
|
||||||
|
/*
|
||||||
|
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
|
||||||
|
index 52c8a94aeff..caefb579058 100644
|
||||||
|
--- a/source3/lib/dbwrap/dbwrap_open.c
|
||||||
|
+++ b/source3/lib/dbwrap/dbwrap_open.c
|
||||||
|
@@ -31,6 +31,9 @@
|
||||||
|
#include "ctdbd_conn.h"
|
||||||
|
#include "global_contexts.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
bool db_is_local(const char *name)
|
||||||
|
{
|
||||||
|
const char *sockname = lp_ctdbd_socket();
|
||||||
|
diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c
|
||||||
|
index 17a52de37cc..77f7b178229 100644
|
||||||
|
--- a/source3/lib/dbwrap/dbwrap_watch.c
|
||||||
|
+++ b/source3/lib/dbwrap/dbwrap_watch.c
|
||||||
|
@@ -28,6 +28,9 @@
|
||||||
|
#include "server_id_watch.h"
|
||||||
|
#include "lib/dbwrap/dbwrap_private.h"
|
||||||
|
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS DBGC_LOCKING
|
||||||
|
+
|
||||||
|
struct dbwrap_watcher {
|
||||||
|
/*
|
||||||
|
* Process watching this record
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
From 2b3ee747cdf83b80d07aaf1b261956bc9894ff36 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Thu, 8 Sep 2022 00:06:37 +0200
|
||||||
|
Subject: [PATCH 16/28] Make ldb_schema_attribute_compare() a stable
|
||||||
|
comparision function.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
lib/ldb/ldb_key_value/ldb_kv_cache.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/ldb/ldb_key_value/ldb_kv_cache.c b/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
||||||
|
index 4a3c9f29020..cb200aeb9ba 100644
|
||||||
|
--- a/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
||||||
|
+++ b/lib/ldb/ldb_key_value/ldb_kv_cache.c
|
||||||
|
@@ -92,7 +92,9 @@ static int ldb_schema_attribute_compare(const void *p1, const void *p2)
|
||||||
|
{
|
||||||
|
const struct ldb_schema_attribute *sa1 = (const struct ldb_schema_attribute *)p1;
|
||||||
|
const struct ldb_schema_attribute *sa2 = (const struct ldb_schema_attribute *)p2;
|
||||||
|
- return ldb_attr_cmp(sa1->name, sa2->name);
|
||||||
|
+ int res = ldb_attr_cmp(sa1->name, sa2->name);
|
||||||
|
+
|
||||||
|
+ return (res) ? res : (sa1->flags > sa2->flags) ? 1 : (sa1->flags < sa2->flags) ? -1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
From 42c9490dd346ee2f4369cbed4c37cb43f06e5d19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Wed, 7 Sep 2022 23:52:43 +0200
|
||||||
|
Subject: [PATCH 17/28] Use arc4random() when available to generate random
|
||||||
|
talloc slab signature.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
lib/talloc/talloc.c | 4 ++++
|
||||||
|
lib/talloc/wscript | 1 +
|
||||||
|
2 files changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
|
||||||
|
index 29da190880a..79c76fd9e35 100644
|
||||||
|
--- a/lib/talloc/talloc.c
|
||||||
|
+++ b/lib/talloc/talloc.c
|
||||||
|
@@ -397,6 +397,9 @@ void talloc_lib_init(void) CONSTRUCTOR;
|
||||||
|
void talloc_lib_init(void)
|
||||||
|
{
|
||||||
|
uint32_t random_value;
|
||||||
|
+#if defined(HAVE_ARC4RANDOM)
|
||||||
|
+ random_value = arc4random();
|
||||||
|
+#else
|
||||||
|
#if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM)
|
||||||
|
uint8_t *p;
|
||||||
|
/*
|
||||||
|
@@ -430,6 +433,7 @@ void talloc_lib_init(void)
|
||||||
|
*/
|
||||||
|
random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF);
|
||||||
|
}
|
||||||
|
+#endif /* HAVE_ARC4RANDOM */
|
||||||
|
talloc_magic = random_value & ~TALLOC_FLAG_MASK;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
|
||||||
|
index f0c266a7878..c75ec0505df 100644
|
||||||
|
--- a/lib/talloc/wscript
|
||||||
|
+++ b/lib/talloc/wscript
|
||||||
|
@@ -52,6 +52,7 @@ def configure(conf):
|
||||||
|
|
||||||
|
conf.CHECK_HEADERS('sys/auxv.h')
|
||||||
|
conf.CHECK_FUNCS('getauxval')
|
||||||
|
+ conf.CHECK_FUNCS('arc4random')
|
||||||
|
|
||||||
|
conf.SAMBA_CONFIG_H()
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
From b81d399aa6d9e2bdbb9db0efa8109c41aad4d025 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 02:49:20 +0200
|
||||||
|
Subject: [PATCH 18/28] Add configuration option that allows to choose
|
||||||
|
alternative mDNS implementation dns_sd library.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/wscript | 12 ++++++++++++
|
||||||
|
source3/wscript_build | 2 ++
|
||||||
|
2 files changed, 14 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/source3/wscript b/source3/wscript
|
||||||
|
index 2121b8b6510..6209472c6c8 100644
|
||||||
|
--- a/source3/wscript
|
||||||
|
+++ b/source3/wscript
|
||||||
|
@@ -70,6 +70,7 @@ def options(opt):
|
||||||
|
opt.samba_add_onoff_option('sendfile-support', default=None)
|
||||||
|
opt.samba_add_onoff_option('utmp')
|
||||||
|
opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
|
||||||
|
+ opt.samba_add_onoff_option('dnssd', with_name="enable", without_name="disable")
|
||||||
|
opt.samba_add_onoff_option('iconv')
|
||||||
|
opt.samba_add_onoff_option('acl-support')
|
||||||
|
opt.samba_add_onoff_option('syslog')
|
||||||
|
@@ -855,6 +856,17 @@ msg.msg_accrightslen = sizeof(fd);
|
||||||
|
conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
|
||||||
|
conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
|
||||||
|
|
||||||
|
+ if Options.options.with_dnssd:
|
||||||
|
+ conf.env.with_dnssd = True
|
||||||
|
+ if not conf.CHECK_HEADERS('dns_sd.h'):
|
||||||
|
+ conf.env.with_dnssd = False
|
||||||
|
+ if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'):
|
||||||
|
+ conf.env.with_dnssd = False
|
||||||
|
+ if conf.env.with_dnssd:
|
||||||
|
+ conf.DEFINE('WITH_DNSSD_SUPPORT', 1)
|
||||||
|
+ else:
|
||||||
|
+ conf.SET_TARGET_TYPE('dns_sd', 'EMPTY')
|
||||||
|
+
|
||||||
|
if Options.options.with_iconv:
|
||||||
|
conf.env.with_iconv = True
|
||||||
|
if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
|
||||||
|
diff --git a/source3/wscript_build b/source3/wscript_build
|
||||||
|
index 5cf965dc45d..edd7985e648 100644
|
||||||
|
--- a/source3/wscript_build
|
||||||
|
+++ b/source3/wscript_build
|
||||||
|
@@ -709,6 +709,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
|
||||||
|
samba3core
|
||||||
|
param_service
|
||||||
|
AVAHI
|
||||||
|
+ dns_sd
|
||||||
|
PROFILE
|
||||||
|
LOCKING
|
||||||
|
LIBADS_SERVER
|
||||||
|
@@ -1128,6 +1129,7 @@ bld.SAMBA3_BINARY('client/smbclient',
|
||||||
|
msrpc3
|
||||||
|
RPC_NDR_SRVSVC
|
||||||
|
cli_smb_common
|
||||||
|
+ dns_sd
|
||||||
|
archive
|
||||||
|
''')
|
||||||
|
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,544 @@
|
|||||||
|
From 5aabf82dfaf325bf682db85d80476224e7005a41 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 00:46:16 +0200
|
||||||
|
Subject: [PATCH 19/28] From 923bc7a1afeb0b920e60e14846987ae1d2d7dca4 Mon Sep
|
||||||
|
17 00:00:00 2001 From: John Hixson <john@ixsystems.com> Date: Thu, 7 Dec 2017
|
||||||
|
09:36:32 -0500 Subject: [PATCH] Freenas/master mdns fixes (#22)
|
||||||
|
|
||||||
|
* mDNS fixes for Samba (work in progress).
|
||||||
|
* Fix mDNS - Can advertise on individual interfaces
|
||||||
|
* Fix mDNS browsing in smbclient
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/client/dnsbrowse.c | 19 +-
|
||||||
|
source3/smbd/dnsregister.c | 354 ++++++++++++++++++++++++++++++-------
|
||||||
|
2 files changed, 299 insertions(+), 74 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/source3/client/dnsbrowse.c b/source3/client/dnsbrowse.c
|
||||||
|
index be6eb881cf1..83aef966d2a 100644
|
||||||
|
--- a/source3/client/dnsbrowse.c
|
||||||
|
+++ b/source3/client/dnsbrowse.c
|
||||||
|
@@ -39,6 +39,7 @@ struct mdns_smbsrv_result
|
||||||
|
struct mdns_browse_state
|
||||||
|
{
|
||||||
|
struct mdns_smbsrv_result *listhead; /* Browse result list head */
|
||||||
|
+ TALLOC_CTX * ctx;
|
||||||
|
int browseDone;
|
||||||
|
|
||||||
|
};
|
||||||
|
@@ -64,7 +65,7 @@ static void do_smb_resolve(struct mdns_smbsrv_result *browsesrv)
|
||||||
|
struct timeval tv;
|
||||||
|
DNSServiceErrorType err;
|
||||||
|
|
||||||
|
- TALLOC_CTX * ctx = talloc_tos();
|
||||||
|
+ TALLOC_CTX * ctx = talloc_new(NULL);
|
||||||
|
|
||||||
|
err = DNSServiceResolve(&mdns_conn_sdref, 0 /* flags */,
|
||||||
|
browsesrv->ifIndex,
|
||||||
|
@@ -91,7 +92,7 @@ static void do_smb_resolve(struct mdns_smbsrv_result *browsesrv)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- TALLOC_FREE(fdset);
|
||||||
|
+ TALLOC_FREE(ctx);
|
||||||
|
DNSServiceRefDeallocate(mdns_conn_sdref);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -124,18 +125,19 @@ do_smb_browse_reply(DNSServiceRef sdRef, DNSServiceFlags flags,
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- bresult = talloc_array(talloc_tos(), struct mdns_smbsrv_result, 1);
|
||||||
|
+ bresult = talloc_array(bstatep->ctx, struct mdns_smbsrv_result, 1);
|
||||||
|
if (bresult == NULL) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ bresult->nextResult = NULL;
|
||||||
|
if (bstatep->listhead != NULL) {
|
||||||
|
bresult->nextResult = bstatep->listhead;
|
||||||
|
}
|
||||||
|
|
||||||
|
- bresult->serviceName = talloc_strdup(talloc_tos(), serviceName);
|
||||||
|
- bresult->regType = talloc_strdup(talloc_tos(), regtype);
|
||||||
|
- bresult->domain = talloc_strdup(talloc_tos(), replyDomain);
|
||||||
|
+ bresult->serviceName = talloc_strdup(bstatep->ctx, serviceName);
|
||||||
|
+ bresult->regType = talloc_strdup(bstatep->ctx, regtype);
|
||||||
|
+ bresult->domain = talloc_strdup(bstatep->ctx, replyDomain);
|
||||||
|
bresult->ifIndex = interfaceIndex;
|
||||||
|
bstatep->listhead = bresult;
|
||||||
|
}
|
||||||
|
@@ -151,10 +153,13 @@ int do_smb_browse(void)
|
||||||
|
DNSServiceRef mdns_conn_sdref = NULL;
|
||||||
|
DNSServiceErrorType err;
|
||||||
|
|
||||||
|
- TALLOC_CTX * ctx = talloc_stackframe();
|
||||||
|
+ TALLOC_CTX * ctx = talloc_new(NULL);
|
||||||
|
|
||||||
|
ZERO_STRUCT(bstate);
|
||||||
|
|
||||||
|
+ bstate.ctx = ctx;
|
||||||
|
+ bstate.listhead = NULL;
|
||||||
|
+
|
||||||
|
err = DNSServiceBrowse(&mdns_conn_sdref, 0, 0, "_smb._tcp", "",
|
||||||
|
do_smb_browse_reply, &bstate);
|
||||||
|
|
||||||
|
diff --git a/source3/smbd/dnsregister.c b/source3/smbd/dnsregister.c
|
||||||
|
index df189001a09..389a4278f64 100644
|
||||||
|
--- a/source3/smbd/dnsregister.c
|
||||||
|
+++ b/source3/smbd/dnsregister.c
|
||||||
|
@@ -29,6 +29,29 @@
|
||||||
|
* browse for advertised SMB services.
|
||||||
|
*/
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ * Time Machine Errata:
|
||||||
|
+ * sys=adVF=0x100 -- this is required when ._adisk._tcp is present on device. When it is
|
||||||
|
+ * set, the MacOS client will send a NetShareEnumAll IOCTL and shares will be visible.
|
||||||
|
+ * Otherwise, Finder will only see the Time Machine share. In the absence of ._adisk._tcp
|
||||||
|
+ * MacOS will _always_ send NetShareEnumAll IOCTL.
|
||||||
|
+ *
|
||||||
|
+ * waMa=0 -- MacOS server uses waMa=0, while embedded devices have it set to their Mac Address.
|
||||||
|
+ * Speculation in Samba-Technical indicates that this stands for "Wireless AirDisk Mac Address".
|
||||||
|
+ *
|
||||||
|
+ * adVU -- AirDisk Volume UUID. Mac OS servers generate a UUID. Time machine over SMB works without one
|
||||||
|
+ * set. Netatalk generates a UUID and stores it persistently in afp_voluuid.conf. This can be
|
||||||
|
+ * set by adding the share parameter "fruit:volume_uuid = "
|
||||||
|
+ *
|
||||||
|
+ * dk(n)=adVF=
|
||||||
|
+ * 0xa1, 0x81 - AFP support
|
||||||
|
+ * 0xa2, 0x82 - SMB support
|
||||||
|
+ * 0xa3, 0x83 - AFP and SMB support
|
||||||
|
+ *
|
||||||
|
+ * adVN -- AirDisk Volume Name. We set this to the share name.
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
#define DNS_REG_RETRY_INTERVAL (5*60) /* in seconds */
|
||||||
|
|
||||||
|
#ifdef WITH_DNSSD_SUPPORT
|
||||||
|
@@ -36,85 +59,177 @@
|
||||||
|
#include <dns_sd.h>
|
||||||
|
|
||||||
|
struct dns_reg_state {
|
||||||
|
- struct tevent_context *event_ctx;
|
||||||
|
- uint16_t port;
|
||||||
|
- DNSServiceRef srv_ref;
|
||||||
|
- struct tevent_timer *te;
|
||||||
|
- int fd;
|
||||||
|
- struct tevent_fd *fde;
|
||||||
|
+ int count;
|
||||||
|
+ struct reg_state {
|
||||||
|
+ DNSServiceRef srv_ref;
|
||||||
|
+ TALLOC_CTX *mem_ctx;
|
||||||
|
+ struct tevent_context *event_ctx;
|
||||||
|
+ struct tevent_timer *te;
|
||||||
|
+ struct tevent_fd *fde;
|
||||||
|
+ uint16_t port;
|
||||||
|
+ int if_index;
|
||||||
|
+ int fd;
|
||||||
|
+ } *drs;
|
||||||
|
};
|
||||||
|
|
||||||
|
-static int dns_reg_state_destructor(struct dns_reg_state *dns_state)
|
||||||
|
+static void dns_register_smbd_retry(struct tevent_context *ctx,
|
||||||
|
+ struct tevent_timer *te,
|
||||||
|
+ struct timeval now,
|
||||||
|
+ void *private_data);
|
||||||
|
+static void dns_register_smbd_fde_handler(struct tevent_context *ev,
|
||||||
|
+ struct tevent_fd *fde,
|
||||||
|
+ uint16_t flags,
|
||||||
|
+ void *private_data);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int reg_state_destructor(struct reg_state *state)
|
||||||
|
{
|
||||||
|
- if (dns_state->srv_ref != NULL) {
|
||||||
|
+ if (state == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (state->srv_ref != NULL) {
|
||||||
|
/* Close connection to the mDNS daemon */
|
||||||
|
- DNSServiceRefDeallocate(dns_state->srv_ref);
|
||||||
|
- dns_state->srv_ref = NULL;
|
||||||
|
+ DNSServiceRefDeallocate(state->srv_ref);
|
||||||
|
+ state->srv_ref = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Clear event handler */
|
||||||
|
- TALLOC_FREE(dns_state->te);
|
||||||
|
- TALLOC_FREE(dns_state->fde);
|
||||||
|
- dns_state->fd = -1;
|
||||||
|
+ TALLOC_FREE(state->te);
|
||||||
|
+ TALLOC_FREE(state->fde);
|
||||||
|
+ state->fd = -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static void dns_register_smbd_retry(struct tevent_context *ctx,
|
||||||
|
- struct tevent_timer *te,
|
||||||
|
- struct timeval now,
|
||||||
|
- void *private_data);
|
||||||
|
-static void dns_register_smbd_fde_handler(struct tevent_context *ev,
|
||||||
|
- struct tevent_fd *fde,
|
||||||
|
- uint16_t flags,
|
||||||
|
- void *private_data);
|
||||||
|
+int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... )
|
||||||
|
+{
|
||||||
|
+ int ret = 0;
|
||||||
|
+ char *str;
|
||||||
|
+ va_list ap;
|
||||||
|
+ va_start( ap, fmt );
|
||||||
|
+
|
||||||
|
+ if( 0 > vasprintf(&str, fmt, ap ) ) {
|
||||||
|
+ va_end(ap);
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ va_end(ap);
|
||||||
|
+
|
||||||
|
+ if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) {
|
||||||
|
+ ret = -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ free(str);
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...)
|
||||||
|
+{
|
||||||
|
+ int ret = 0;
|
||||||
|
+ char *key = NULL, *str = NULL;
|
||||||
|
+ va_list ap;
|
||||||
|
+
|
||||||
|
+ if( 0 > asprintf(&key, key_fmt, key_var)) {
|
||||||
|
+ DEBUG(1, ("Failed in asprintf\n"));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
-static bool dns_register_smbd_schedule(struct dns_reg_state *dns_state,
|
||||||
|
+ va_start( ap, fmt );
|
||||||
|
+ if( 0 > vasprintf(&str, fmt, ap )) {
|
||||||
|
+ va_end(ap);
|
||||||
|
+ DEBUG(1, ("Failed in vasprintf\n"));
|
||||||
|
+ ret = -1;
|
||||||
|
+ goto exit;
|
||||||
|
+ }
|
||||||
|
+ va_end(ap);
|
||||||
|
+
|
||||||
|
+ if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) {
|
||||||
|
+ DEBUG(1, ("Failed in TXTRecordSetValuen"));
|
||||||
|
+ ret = -1;
|
||||||
|
+ goto exit;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ exit:
|
||||||
|
+ if (str)
|
||||||
|
+ free(str);
|
||||||
|
+ if (key)
|
||||||
|
+ free(key);
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static bool dns_register_smbd_schedule(struct reg_state *state,
|
||||||
|
struct timeval tval)
|
||||||
|
{
|
||||||
|
- dns_reg_state_destructor(dns_state);
|
||||||
|
+ reg_state_destructor(state);
|
||||||
|
|
||||||
|
- dns_state->te = tevent_add_timer(dns_state->event_ctx,
|
||||||
|
- dns_state,
|
||||||
|
+ state->te = tevent_add_timer(state->event_ctx,
|
||||||
|
+ state->mem_ctx,
|
||||||
|
tval,
|
||||||
|
dns_register_smbd_retry,
|
||||||
|
- dns_state);
|
||||||
|
- if (!dns_state->te) {
|
||||||
|
+ state);
|
||||||
|
+ if (!state->te) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static void dns_register_smbd_callback(DNSServiceRef service,
|
||||||
|
+ DNSServiceFlags flags,
|
||||||
|
+ DNSServiceErrorType errorCode,
|
||||||
|
+ const char *name,
|
||||||
|
+ const char *type,
|
||||||
|
+ const char *domain,
|
||||||
|
+ void *context)
|
||||||
|
+{
|
||||||
|
+ if (errorCode != kDNSServiceErr_NoError) {
|
||||||
|
+ DEBUG(6, ("error=%d\n", errorCode));
|
||||||
|
+ } else {
|
||||||
|
+ DEBUG(6, ("%-15s %s.%s%s\n", "REGISTER", name, type, domain));
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void dns_register_smbd_retry(struct tevent_context *ctx,
|
||||||
|
struct tevent_timer *te,
|
||||||
|
struct timeval now,
|
||||||
|
void *private_data)
|
||||||
|
{
|
||||||
|
- struct dns_reg_state *dns_state = talloc_get_type_abort(private_data,
|
||||||
|
- struct dns_reg_state);
|
||||||
|
+ struct reg_state *state = (struct reg_state *)private_data;
|
||||||
|
DNSServiceErrorType err;
|
||||||
|
+ int snum;
|
||||||
|
+ size_t dk = 0;
|
||||||
|
+ bool sys_txt_created = false;
|
||||||
|
+ TXTRecordRef txt_adisk;
|
||||||
|
+ TXTRecordRef txt_devinfo;
|
||||||
|
+ char *servname;
|
||||||
|
+ char *v_uuid;
|
||||||
|
+ int num_services = lp_numservices();
|
||||||
|
+
|
||||||
|
+ reg_state_destructor(state);
|
||||||
|
|
||||||
|
- dns_reg_state_destructor(dns_state);
|
||||||
|
+ TXTRecordCreate(&txt_adisk, 0, NULL);
|
||||||
|
|
||||||
|
- DEBUG(6, ("registering _smb._tcp service on port %d\n",
|
||||||
|
- dns_state->port));
|
||||||
|
+ DEBUG(6, ("registering _smb._tcp service on port %d index %d\n",
|
||||||
|
+ state->port, state->if_index));
|
||||||
|
|
||||||
|
/* Register service with DNS. Connects with the mDNS
|
||||||
|
* daemon running on the local system to perform DNS
|
||||||
|
* service registration.
|
||||||
|
*/
|
||||||
|
- err = DNSServiceRegister(&dns_state->srv_ref, 0 /* flags */,
|
||||||
|
- kDNSServiceInterfaceIndexAny,
|
||||||
|
- NULL /* service name */,
|
||||||
|
- "_smb._tcp" /* service type */,
|
||||||
|
- NULL /* domain */,
|
||||||
|
- "" /* SRV target host name */,
|
||||||
|
- htons(dns_state->port),
|
||||||
|
- 0 /* TXT record len */,
|
||||||
|
- NULL /* TXT record data */,
|
||||||
|
- NULL /* callback func */,
|
||||||
|
- NULL /* callback context */);
|
||||||
|
+ err = DNSServiceRegister(&state->srv_ref,
|
||||||
|
+ 0 /* flags */,
|
||||||
|
+ state->if_index /* interface index */,
|
||||||
|
+ NULL /* service name */,
|
||||||
|
+ "_smb._tcp" /* service type */,
|
||||||
|
+ NULL /* domain */,
|
||||||
|
+ "" /* SRV target host name */,
|
||||||
|
+ htons(state->port) /* port */,
|
||||||
|
+ 0 /* TXT record len */,
|
||||||
|
+ NULL /* TXT record data */,
|
||||||
|
+ dns_register_smbd_callback /* callback func */,
|
||||||
|
+ NULL /* callback context */);
|
||||||
|
+
|
||||||
|
|
||||||
|
if (err != kDNSServiceErr_NoError) {
|
||||||
|
/* Failed to register service. Schedule a re-try attempt.
|
||||||
|
@@ -123,24 +238,96 @@ static void dns_register_smbd_retry(struct tevent_context *ctx,
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
|
- dns_state->fd = DNSServiceRefSockFD(dns_state->srv_ref);
|
||||||
|
- if (dns_state->fd == -1) {
|
||||||
|
+ /*
|
||||||
|
+ * Check for services that are configured as Time Machine targets
|
||||||
|
+ *
|
||||||
|
+ */
|
||||||
|
+ for (snum = 0; snum < num_services; snum++) {
|
||||||
|
+ if (lp_snum_ok(snum) && lp_parm_bool(snum, "fruit", "time machine", false))
|
||||||
|
+ {
|
||||||
|
+ if (!sys_txt_created) {
|
||||||
|
+ if( 0 > TXTRecordPrintf(&txt_adisk, "sys", "adVF=0x100") ) {
|
||||||
|
+ DEBUG(1, ("Failed to create Zeroconf TXTRecord for sys") );
|
||||||
|
+ goto retry;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ sys_txt_created = true;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ v_uuid = lp_parm_const_string(snum, "fruit", "volume_uuid", NULL);
|
||||||
|
+ servname = lp_const_servicename(snum);
|
||||||
|
+ DEBUG(1, ("Registering volume %s for TimeMachine\n", servname));
|
||||||
|
+ if (v_uuid) {
|
||||||
|
+ if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82,adVU=%s",
|
||||||
|
+ servname, v_uuid) ) {
|
||||||
|
+ DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk));
|
||||||
|
+ goto retry;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(1, ("Registering TimeMachine with the following TXT parameters: "
|
||||||
|
+ "dk%zu,adVN=%s,adVF=0x82,adVU=%s\n", dk, servname, v_uuid) );
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82",
|
||||||
|
+ servname) ) {
|
||||||
|
+ DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk));
|
||||||
|
+ goto retry;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(1, ("Registering TimeMachine with the following TXT parameters: "
|
||||||
|
+ "dk%zu,adVN=%s,adVF=0x82\n", dk, servname) );
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (dk) {
|
||||||
|
+ err = DNSServiceRegister(&state->srv_ref,
|
||||||
|
+ 0 /* flags */,
|
||||||
|
+ state->if_index /* interface index */,
|
||||||
|
+ NULL /* service name */,
|
||||||
|
+ "_adisk._tcp" /* service type */,
|
||||||
|
+ NULL /* domain */,
|
||||||
|
+ "" /* SRV target host name */,
|
||||||
|
+ /*
|
||||||
|
+ * We would probably use port 0 zero, but we can't, from man DNSServiceRegister:
|
||||||
|
+ * "A value of 0 for a port is passed to register placeholder services.
|
||||||
|
+ * Place holder services are not found when browsing, but other
|
||||||
|
+ * clients cannot register with the same name as the placeholder service."
|
||||||
|
+ * We therefor use port 9 which is used by the adisk service type.
|
||||||
|
+ */
|
||||||
|
+ htons(9) /* port */,
|
||||||
|
+ TXTRecordGetLength(&txt_adisk) /* TXT record len */,
|
||||||
|
+ TXTRecordGetBytesPtr(&txt_adisk) /* TXT record data */,
|
||||||
|
+ dns_register_smbd_callback /* callback func */,
|
||||||
|
+ NULL /* callback context */);
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ if (err != kDNSServiceErr_NoError) {
|
||||||
|
+ /* Failed to register service. Schedule a re-try attempt.
|
||||||
|
+ */
|
||||||
|
+ DEBUG(1, ("unable to register with mDNS (err %d)\n", err));
|
||||||
|
+ goto retry;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ state->fd = DNSServiceRefSockFD(state->srv_ref);
|
||||||
|
+ if (state->fd == -1) {
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
|
- dns_state->fde = tevent_add_fd(dns_state->event_ctx,
|
||||||
|
- dns_state,
|
||||||
|
- dns_state->fd,
|
||||||
|
- TEVENT_FD_READ,
|
||||||
|
- dns_register_smbd_fde_handler,
|
||||||
|
- dns_state);
|
||||||
|
- if (!dns_state->fde) {
|
||||||
|
+ state->fde = tevent_add_fd(state->event_ctx,
|
||||||
|
+ state->mem_ctx,
|
||||||
|
+ state->fd,
|
||||||
|
+ TEVENT_FD_READ,
|
||||||
|
+ dns_register_smbd_fde_handler,
|
||||||
|
+ state);
|
||||||
|
+ if (!state->fde) {
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
retry:
|
||||||
|
- dns_register_smbd_schedule(dns_state,
|
||||||
|
+ dns_register_smbd_schedule(state,
|
||||||
|
timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -150,44 +337,77 @@ static void dns_register_smbd_fde_handler(struct tevent_context *ev,
|
||||||
|
uint16_t flags,
|
||||||
|
void *private_data)
|
||||||
|
{
|
||||||
|
- struct dns_reg_state *dns_state = talloc_get_type_abort(private_data,
|
||||||
|
- struct dns_reg_state);
|
||||||
|
+ struct reg_state *state = (struct reg_state *)private_data;
|
||||||
|
DNSServiceErrorType err;
|
||||||
|
|
||||||
|
- err = DNSServiceProcessResult(dns_state->srv_ref);
|
||||||
|
+ err = DNSServiceProcessResult(state->srv_ref);
|
||||||
|
if (err != kDNSServiceErr_NoError) {
|
||||||
|
- DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n",
|
||||||
|
- err));
|
||||||
|
+ DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n", err));
|
||||||
|
goto retry;
|
||||||
|
}
|
||||||
|
|
||||||
|
- talloc_free(dns_state);
|
||||||
|
return;
|
||||||
|
|
||||||
|
retry:
|
||||||
|
- dns_register_smbd_schedule(dns_state,
|
||||||
|
- timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0));
|
||||||
|
+ dns_register_smbd_schedule(state, timeval_zero());
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int dns_reg_state_destructor(struct dns_reg_state *state)
|
||||||
|
+{
|
||||||
|
+ if (state != NULL) {
|
||||||
|
+ talloc_free(state);
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
bool smbd_setup_mdns_registration(struct tevent_context *ev,
|
||||||
|
TALLOC_CTX *mem_ctx,
|
||||||
|
uint16_t port)
|
||||||
|
{
|
||||||
|
struct dns_reg_state *dns_state;
|
||||||
|
+ bool bind_all = true;
|
||||||
|
+ int i;
|
||||||
|
|
||||||
|
dns_state = talloc_zero(mem_ctx, struct dns_reg_state);
|
||||||
|
- if (dns_state == NULL) {
|
||||||
|
+ if (dns_state == NULL)
|
||||||
|
+ return false;
|
||||||
|
+
|
||||||
|
+ if (lp_interfaces() && lp_bind_interfaces_only())
|
||||||
|
+ bind_all = false;
|
||||||
|
+
|
||||||
|
+ dns_state->count = iface_count();
|
||||||
|
+ if (dns_state->count <= 0 || bind_all == true)
|
||||||
|
+ dns_state->count = 1;
|
||||||
|
+
|
||||||
|
+ dns_state->drs = talloc_array(mem_ctx, struct reg_state, dns_state->count);
|
||||||
|
+ if (dns_state->drs == NULL) {
|
||||||
|
+ talloc_free(dns_state);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
- dns_state->event_ctx = ev;
|
||||||
|
- dns_state->port = port;
|
||||||
|
- dns_state->fd = -1;
|
||||||
|
|
||||||
|
- talloc_set_destructor(dns_state, dns_reg_state_destructor);
|
||||||
|
+ for (i = 0; i < dns_state->count; i++) {
|
||||||
|
+ struct interface *iface = get_interface(i);
|
||||||
|
+ struct reg_state *state = &dns_state->drs[i];
|
||||||
|
+
|
||||||
|
+ state->mem_ctx = mem_ctx;
|
||||||
|
+ state->srv_ref = NULL;
|
||||||
|
+ state->event_ctx = ev;
|
||||||
|
+ state->te = NULL;
|
||||||
|
+ state->fde = NULL;
|
||||||
|
+ state->port = port;
|
||||||
|
+ state->fd = -1;
|
||||||
|
|
||||||
|
- return dns_register_smbd_schedule(dns_state, timeval_zero());
|
||||||
|
+ state->if_index = bind_all ? kDNSServiceInterfaceIndexAny : iface->if_index;
|
||||||
|
+
|
||||||
|
+ dns_register_smbd_schedule(&dns_state->drs[i], timeval_zero());
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ talloc_set_destructor(dns_state, dns_reg_state_destructor);
|
||||||
|
+ return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
#else /* WITH_DNSSD_SUPPORT */
|
||||||
|
|
||||||
|
bool smbd_setup_mdns_registration(struct tevent_context *ev,
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,35 @@
|
|||||||
|
From 02b599cc740490fa6f433b0c455fe458fdc1db61 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 02:45:11 +0200
|
||||||
|
Subject: [PATCH 20/28] FreeBSD 12 between r336017 and r342928 wrongfuly return
|
||||||
|
ENOENT for the not enabled qoutas on ZFS. Wrap relevant error code check with
|
||||||
|
the versioning ifdef's.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/lib/sysquotas_4B.c | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/source3/lib/sysquotas_4B.c b/source3/lib/sysquotas_4B.c
|
||||||
|
index d9beb924ad9..c41cac02e5f 100644
|
||||||
|
--- a/source3/lib/sysquotas_4B.c
|
||||||
|
+++ b/source3/lib/sysquotas_4B.c
|
||||||
|
@@ -140,7 +140,14 @@ static int sys_quotactl_4B(const char * path, int cmd,
|
||||||
|
/* ENOTSUP means quota support is not compiled in. EINVAL
|
||||||
|
* means that quotas are not configured (commonly).
|
||||||
|
*/
|
||||||
|
- if (errno != ENOTSUP && errno != EINVAL) {
|
||||||
|
+ if (errno != ENOTSUP && errno != EINVAL
|
||||||
|
+/*
|
||||||
|
+ * FreeBSD 12 between r336017 and r342928 wrongfuly return ENOENT for the not enabled qoutas on ZFS.
|
||||||
|
+ */
|
||||||
|
+#if defined(__FreeBSD__) && ((__FreeBSD_version >= 1102503 && __FreeBSD_version <= 1102506) || (__FreeBSD_version >= 1200072 && __FreeBSD_version <= 1200503) || (__FreeBSD_version >= 1300000 && __FreeBSD_version <= 1300009))
|
||||||
|
+ && errno != ENOENT
|
||||||
|
+#endif
|
||||||
|
+ ) {
|
||||||
|
DEBUG(5, ("failed to %s quota for %s ID %u on %s: %s\n",
|
||||||
|
(cmd & QCMD(Q_GETQUOTA, 0)) ? "get" : "set",
|
||||||
|
(cmd & QCMD(0, GRPQUOTA)) ? "group" : "user",
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
From 46f5b54aa5761541a16108d66764d662f37f04d2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 02:41:48 +0200
|
||||||
|
Subject: [PATCH 21/28] Fix casting warnings in the nfs_quota debug message.
|
||||||
|
|
||||||
|
Initialize quota structure with zeros.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/smbd/quotas.c | 3 ++-
|
||||||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/source3/smbd/quotas.c b/source3/smbd/quotas.c
|
||||||
|
index 604631f81d6..c23fa49b3b0 100644
|
||||||
|
--- a/source3/smbd/quotas.c
|
||||||
|
+++ b/source3/smbd/quotas.c
|
||||||
|
@@ -125,6 +125,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
|
||||||
|
if (!cutstr)
|
||||||
|
return False;
|
||||||
|
|
||||||
|
+ memset(&D, '\0', sizeof(D));
|
||||||
|
memset(cutstr, '\0', len+1);
|
||||||
|
host = strncat(cutstr,mnttype, sizeof(char) * len );
|
||||||
|
DEBUG(5,("nfs_quotas: looking for mount on \"%s\"\n", cutstr));
|
||||||
|
@@ -133,7 +134,7 @@ static bool nfs_quotas(char *nfspath, uid_t euser_id, uint64_t *bsize, uint64_t
|
||||||
|
args.gqa_pathp = testpath+1;
|
||||||
|
args.gqa_uid = uid;
|
||||||
|
|
||||||
|
- DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%i\" rpcvers \"%i\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
|
||||||
|
+ DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%lu\" rpcvers \"%lu\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
|
||||||
|
|
||||||
|
if ((clnt = clnt_create(host, RQUOTAPROG, RQUOTAVERS, "udp")) == NULL) {
|
||||||
|
ret = False;
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,332 @@
|
|||||||
|
From 5019ad026f106d51dc2bb4c410a05b2f63b56cd0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 01:43:13 +0200
|
||||||
|
Subject: [PATCH 22/28] Clean up UTMP handling code and add FreeBSD support.
|
||||||
|
Some really legacy platforms may have been dropped as a result.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/smbd/utmp.c | 152 +++++++++++-------------------------------
|
||||||
|
source3/wscript | 36 +++++----
|
||||||
|
2 files changed, 60 insertions(+), 128 deletions(-)
|
||||||
|
|
||||||
|
diff -Naurp a/source3/smbd/utmp.c b/source3/smbd/utmp.c
|
||||||
|
--- a/source3/smbd/utmp.c 2024-02-02 04:33:51.316490200 -0500
|
||||||
|
+++ b/source3/smbd/utmp.c 2024-08-05 12:50:57.691687000 -0400
|
||||||
|
@@ -257,7 +257,7 @@ static char *uw_pathname(TALLOC_CTX *ctx,
|
||||||
|
Update utmp file directly. No subroutine interface: probably a BSD system.
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
-static void pututline_my(const char *uname, struct utmp *u, bool claim)
|
||||||
|
+static void pututline_my(const char *uname, STRUCT_UTMP *u, bool claim)
|
||||||
|
{
|
||||||
|
DEBUG(1,("pututline_my: not yet implemented\n"));
|
||||||
|
/* BSD implementor: may want to consider (or not) adjusting "lastlog" */
|
||||||
|
@@ -271,7 +271,7 @@ static void pututline_my(const char *uname, struct utm
|
||||||
|
Credit: Michail Vidiassov <master@iaas.msu.ru>
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
-static void updwtmp_my(const char *wname, struct utmp *u, bool claim)
|
||||||
|
+static void updwtmp_my(const char *wname, STRUCT_UTMP *u, bool claim)
|
||||||
|
{
|
||||||
|
int fd;
|
||||||
|
struct stat buf;
|
||||||
|
@@ -303,7 +303,7 @@ static void updwtmp_my(const char *wname, struct utmp
|
||||||
|
if ((fd = open(wname, O_WRONLY|O_APPEND, 0)) < 0)
|
||||||
|
return;
|
||||||
|
if (fstat(fd, &buf) == 0) {
|
||||||
|
- if (write(fd, (char *)u, sizeof(struct utmp)) != sizeof(struct utmp))
|
||||||
|
+ if (write(fd, (char *)u, sizeof(STRUCT_UTMP)) != sizeof(STRUCT_UTMP))
|
||||||
|
(void) ftruncate(fd, buf.st_size);
|
||||||
|
}
|
||||||
|
(void) close(fd);
|
||||||
|
@@ -314,12 +314,12 @@ static void updwtmp_my(const char *wname, struct utmp
|
||||||
|
Update via utmp/wtmp (not utmpx/wtmpx).
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
-static void utmp_nox_update(struct utmp *u, bool claim)
|
||||||
|
+static void utmp_nox_update(STRUCT_UTMP *u, bool claim)
|
||||||
|
{
|
||||||
|
char *uname = NULL;
|
||||||
|
char *wname = NULL;
|
||||||
|
#if defined(PUTUTLINE_RETURNS_UTMP)
|
||||||
|
- struct utmp *urc;
|
||||||
|
+ STRUCT_UTMP *urc;
|
||||||
|
#endif /* PUTUTLINE_RETURNS_UTMP */
|
||||||
|
|
||||||
|
uname = uw_pathname(talloc_tos(), "utmp", ut_pathname);
|
||||||
|
@@ -376,127 +376,52 @@ static void utmp_nox_update(struct utmp *u, bool claim
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
-/****************************************************************************
|
||||||
|
- Copy a string in the utmp structure.
|
||||||
|
-****************************************************************************/
|
||||||
|
|
||||||
|
-static void utmp_strcpy(char *dest, const char *src, size_t n)
|
||||||
|
-{
|
||||||
|
- size_t len = 0;
|
||||||
|
|
||||||
|
- memset(dest, '\0', n);
|
||||||
|
- if (src)
|
||||||
|
- len = strlen(src);
|
||||||
|
- if (len >= n) {
|
||||||
|
- memcpy(dest, src, n);
|
||||||
|
- } else {
|
||||||
|
- if (len)
|
||||||
|
- memcpy(dest, src, len);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
|
||||||
|
+
|
||||||
|
/****************************************************************************
|
||||||
|
Update via utmpx/wtmpx (preferred) or via utmp/wtmp.
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
-static void sys_utmp_update(struct utmp *u, const char *hostname, bool claim)
|
||||||
|
+static void sys_utmp_update(STRUCT_UTMP *u, const char *hostname, bool claim)
|
||||||
|
{
|
||||||
|
-#if !defined(HAVE_UTMPX_H)
|
||||||
|
- /* No utmpx stuff. Drop to non-x stuff */
|
||||||
|
- utmp_nox_update(u, claim);
|
||||||
|
-#elif !defined(HAVE_PUTUTXLINE)
|
||||||
|
- /* Odd. Have utmpx.h but no "pututxline()". Drop to non-x stuff */
|
||||||
|
- DEBUG(1,("utmp_update: have utmpx.h but no pututxline() function\n"));
|
||||||
|
- utmp_nox_update(u, claim);
|
||||||
|
-#elif !defined(HAVE_GETUTMPX)
|
||||||
|
- /* Odd. Have utmpx.h but no "getutmpx()". Drop to non-x stuff */
|
||||||
|
- DEBUG(1,("utmp_update: have utmpx.h but no getutmpx() function\n"));
|
||||||
|
- utmp_nox_update(u, claim);
|
||||||
|
-#elif !defined(HAVE_UPDWTMPX)
|
||||||
|
- /* Have utmpx.h but no "updwtmpx()". Drop to non-x stuff */
|
||||||
|
- DEBUG(1,("utmp_update: have utmpx.h but no updwtmpx() function\n"));
|
||||||
|
- utmp_nox_update(u, claim);
|
||||||
|
-#else
|
||||||
|
- char *uname = NULL;
|
||||||
|
- char *wname = NULL;
|
||||||
|
- struct utmpx ux, *uxrc;
|
||||||
|
+ STRUCT_UTMP *urc;
|
||||||
|
|
||||||
|
- getutmpx(u, &ux);
|
||||||
|
-
|
||||||
|
-#if defined(HAVE_UX_UT_SYSLEN)
|
||||||
|
- if (hostname)
|
||||||
|
- ux.ut_syslen = strlen(hostname) + 1; /* include end NULL */
|
||||||
|
- else
|
||||||
|
- ux.ut_syslen = 0;
|
||||||
|
-#endif
|
||||||
|
-#if defined(HAVE_UX_UT_HOST)
|
||||||
|
- utmp_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host));
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
- uname = uw_pathname(talloc_tos(), "utmpx", ux_pathname);
|
||||||
|
- wname = uw_pathname(talloc_tos(), "wtmpx", wx_pathname);
|
||||||
|
- if (uname && wname) {
|
||||||
|
- DEBUG(2,("utmp_update: uname:%s wname:%s\n", uname, wname));
|
||||||
|
+ setutxent();
|
||||||
|
+ urc = pututxline(u);
|
||||||
|
+ endutxent();
|
||||||
|
+ if (urc == NULL) {
|
||||||
|
+ DEBUG(2,("utmp_update: pututxline() failed\n"));
|
||||||
|
+ return;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- /*
|
||||||
|
- * Check for either uname or wname being empty.
|
||||||
|
- * Some systems, such as Redhat 6, have a "utmpx.h" which doesn't
|
||||||
|
- * define default filenames.
|
||||||
|
- * Also, our local installation has not provided an override.
|
||||||
|
- * Drop to non-x method. (E.g. RH6 has good defaults in "utmp.h".)
|
||||||
|
- */
|
||||||
|
- if (!uname || !wname || (strlen(uname) == 0) || (strlen(wname) == 0)) {
|
||||||
|
- utmp_nox_update(u, claim);
|
||||||
|
- } else {
|
||||||
|
- utmpxname(uname);
|
||||||
|
- setutxent();
|
||||||
|
- uxrc = pututxline(&ux);
|
||||||
|
- endutxent();
|
||||||
|
- if (uxrc == NULL) {
|
||||||
|
- DEBUG(2,("utmp_update: pututxline() failed\n"));
|
||||||
|
- return;
|
||||||
|
- }
|
||||||
|
- updwtmpx(wname, &ux);
|
||||||
|
- }
|
||||||
|
-#endif /* HAVE_UTMPX_H */
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_UT_UT_ID)
|
||||||
|
/****************************************************************************
|
||||||
|
Encode the unique connection number into "ut_id".
|
||||||
|
****************************************************************************/
|
||||||
|
-
|
||||||
|
-static int ut_id_encode(int i, char *fourbyte)
|
||||||
|
+static void ut_id_encode(char *buf, int id, size_t buf_size)
|
||||||
|
{
|
||||||
|
- int nbase;
|
||||||
|
- const char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
+ const char ut_id_encstr[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||||
|
|
||||||
|
-/*
|
||||||
|
- * 'ut_id_encstr' is the character set on which modulo arithmetic is done.
|
||||||
|
- * Example: digits would produce the base-10 numbers from '001'.
|
||||||
|
- */
|
||||||
|
- nbase = strlen(ut_id_encstr);
|
||||||
|
+ int nbase = sizeof(ut_id_encstr) - 1;
|
||||||
|
+ /*
|
||||||
|
+ * 'ut_id_encstr' is the character set on which modulo arithmetic is done.
|
||||||
|
+ * Example: digits would produce the base-10 numbers from '001'.
|
||||||
|
+ */
|
||||||
|
|
||||||
|
- fourbyte[0] = ut_id_encstr[i % nbase];
|
||||||
|
- i /= nbase;
|
||||||
|
- fourbyte[1] = ut_id_encstr[i % nbase];
|
||||||
|
- i /= nbase;
|
||||||
|
- fourbyte[3] = ut_id_encstr[i % nbase];
|
||||||
|
- i /= nbase;
|
||||||
|
- fourbyte[2] = ut_id_encstr[i % nbase];
|
||||||
|
- i /= nbase;
|
||||||
|
-
|
||||||
|
- /* we do not care about overflows as i is a random number */
|
||||||
|
- return 0;
|
||||||
|
+ for(int i = 0; i < buf_size; i++) {
|
||||||
|
+ buf[i] = ut_id_encstr[id % nbase];
|
||||||
|
+ id /= nbase;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
#endif /* defined(HAVE_UT_UT_ID) */
|
||||||
|
|
||||||
|
-
|
||||||
|
/*
|
||||||
|
fill a system utmp structure given all the info we can gather
|
||||||
|
*/
|
||||||
|
-static bool sys_utmp_fill(struct utmp *u,
|
||||||
|
+static bool sys_utmp_fill(STRUCT_UTMP *u,
|
||||||
|
const char *username, const char *hostname,
|
||||||
|
const char *id_str, int id_num)
|
||||||
|
{
|
||||||
|
@@ -509,16 +434,16 @@ static bool sys_utmp_fill(struct utmp *u,
|
||||||
|
* rather than to try to detect and optimise.
|
||||||
|
*/
|
||||||
|
#if defined(HAVE_UT_UT_USER)
|
||||||
|
- utmp_strcpy(u->ut_user, username, sizeof(u->ut_user));
|
||||||
|
+ strncpy(u->ut_user, username, sizeof(u->ut_user));
|
||||||
|
#elif defined(HAVE_UT_UT_NAME)
|
||||||
|
- utmp_strcpy(u->ut_name, username, sizeof(u->ut_name));
|
||||||
|
+ strncpy(u->ut_name, username, sizeof(u->ut_name));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ut_line:
|
||||||
|
* If size limit proves troublesome, then perhaps use "ut_id_encode()".
|
||||||
|
*/
|
||||||
|
- utmp_strcpy(u->ut_line, id_str, sizeof(u->ut_line));
|
||||||
|
+ strncpy(u->ut_line, id_str, sizeof(u->ut_line));
|
||||||
|
|
||||||
|
#if defined(HAVE_UT_UT_PID)
|
||||||
|
u->ut_pid = getpid();
|
||||||
|
@@ -535,20 +460,23 @@ static bool sys_utmp_fill(struct utmp *u,
|
||||||
|
u->ut_time = timeval.tv_sec;
|
||||||
|
#elif defined(HAVE_UT_UT_TV)
|
||||||
|
GetTimeOfDay(&timeval);
|
||||||
|
- u->ut_tv = timeval;
|
||||||
|
+ u->ut_tv.tv_sec = timeval.tv_sec;
|
||||||
|
+ u->ut_tv.tv_usec = timeval.tv_usec;
|
||||||
|
#else
|
||||||
|
#error "with-utmp must have UT_TIME or UT_TV"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_UT_UT_HOST)
|
||||||
|
- utmp_strcpy(u->ut_host, hostname, sizeof(u->ut_host));
|
||||||
|
+ if(hostname != NULL) {
|
||||||
|
+ strncpy(u->ut_host, hostname, sizeof(u->ut_host));
|
||||||
|
+#if defined(HAVE_UT_UT_SYSLEN)
|
||||||
|
+ u->ut_syslen = strlen(hostname) + 1; /* include trailing NULL */
|
||||||
|
#endif
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_UT_UT_ID)
|
||||||
|
- if (ut_id_encode(id_num, u->ut_id) != 0) {
|
||||||
|
- DEBUG(1,("utmp_fill: cannot encode id %d\n", id_num));
|
||||||
|
- return False;
|
||||||
|
- }
|
||||||
|
+ ut_id_encode(u->ut_id, id_num, sizeof(u->ut_id));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
return True;
|
||||||
|
@@ -561,7 +489,7 @@ void sys_utmp_yield(const char *username, const char *
|
||||||
|
void sys_utmp_yield(const char *username, const char *hostname,
|
||||||
|
const char *id_str, int id_num)
|
||||||
|
{
|
||||||
|
- struct utmp u;
|
||||||
|
+ STRUCT_UTMP u;
|
||||||
|
|
||||||
|
ZERO_STRUCT(u);
|
||||||
|
|
||||||
|
@@ -587,7 +515,7 @@ void sys_utmp_claim(const char *username, const char *
|
||||||
|
void sys_utmp_claim(const char *username, const char *hostname,
|
||||||
|
const char *id_str, int id_num)
|
||||||
|
{
|
||||||
|
- struct utmp u;
|
||||||
|
+ STRUCT_UTMP u;
|
||||||
|
|
||||||
|
ZERO_STRUCT(u);
|
||||||
|
|
||||||
|
diff -Naurp a/source3/wscript b/source3/wscript
|
||||||
|
--- a/source3/wscript 2024-08-05 12:50:16.286549000 -0400
|
||||||
|
+++ b/source3/wscript 2024-08-05 13:02:31.909769000 -0400
|
||||||
|
@@ -804,34 +804,38 @@ msg.msg_accrightslen = sizeof(fd);
|
||||||
|
|
||||||
|
if Options.options.with_utmp:
|
||||||
|
conf.env.with_utmp = True
|
||||||
|
- if not conf.CHECK_HEADERS('utmp.h'): conf.env.with_utmp = False
|
||||||
|
- conf.CHECK_FUNCS('pututline pututxline updwtmp updwtmpx getutmpx')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_name', headers='utmp.h',
|
||||||
|
+ if not conf.CHECK_HEADERS('utmpx.h') and not conf.CHECK_HEADERS('utmp.h'):
|
||||||
|
+ conf.env.with_utmp = False
|
||||||
|
+ if conf.CONFIG_SET('HAVE_UTMPX_H'):
|
||||||
|
+ conf.DEFINE('STRUCT_UTMP', 'struct utmpx')
|
||||||
|
+ elif conf.CONFIG_SET('HAVE_UTMP_H'):
|
||||||
|
+ conf.DEFINE('STRUCT_UTMP', 'struct utmp')
|
||||||
|
+ conf.CHECK_FUNCS('pututxline getutxid getutxline updwtmpx getutmpx setutxent endutxent')
|
||||||
|
+ conf.CHECK_FUNCS('pututline getutid getutline updwtmp getutmp setutent endutent')
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_name', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_NAME')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_user', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_user', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_USER')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_id', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_id', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_ID')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_host', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_host', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_HOST')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_time', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_time', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_TIME')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_tv', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_tv', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_TV')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_type', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_type', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_TYPE')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_pid', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_pid', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_PID')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_exit.e_exit', headers='utmp.h',
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_exit.e_exit', headers='utmpx.h utmp.h',
|
||||||
|
define='HAVE_UT_UT_EXIT')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_syslen', headers='utmpx.h',
|
||||||
|
- define='HAVE_UX_UT_SYSLEN')
|
||||||
|
- conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_host', headers='utmpx.h',
|
||||||
|
- define='HAVE_UX_UT_HOST')
|
||||||
|
+ conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_syslen', headers='utmpx.h utmp.h',
|
||||||
|
+ define='HAVE_UT_UT_SYSLEN')
|
||||||
|
conf.CHECK_CODE('struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);',
|
||||||
|
'PUTUTLINE_RETURNS_UTMP', headers='utmp.h',
|
||||||
|
msg="Checking whether pututline returns pointer")
|
||||||
|
- conf.CHECK_SIZEOF(['((struct utmp *)NULL)->ut_line'], headers='utmp.h',
|
||||||
|
+ conf.CHECK_SIZEOF(['((STRUCT_UTMP *)NULL)->ut_line'], headers='utmpx.h utmp.h',
|
||||||
|
define='SIZEOF_UTMP_UT_LINE', critical=False)
|
||||||
|
if not conf.CONFIG_SET('SIZEOF_UTMP_UT_LINE'):
|
||||||
|
conf.env.with_utmp = False
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
From 2e927425e04d65027db5348b3e89a69a5e447556 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 03:07:40 +0200
|
||||||
|
Subject: [PATCH 23/28] Add `cmd_get_quota()` test function into vfstest, to
|
||||||
|
test disk quota interface.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/torture/cmd_vfs.c | 78 +++++++++++++++++++++++++++++++++++
|
||||||
|
source3/torture/wscript_build | 2 +-
|
||||||
|
2 files changed, 79 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c
|
||||||
|
index 38ce0dc4ff6..1bc4639d2a2 100644
|
||||||
|
--- a/source3/torture/cmd_vfs.c
|
||||||
|
+++ b/source3/torture/cmd_vfs.c
|
||||||
|
@@ -145,6 +145,83 @@ static NTSTATUS cmd_disk_free(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int ar
|
||||||
|
return NT_STATUS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static NTSTATUS cmd_get_quota(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
|
||||||
|
+{
|
||||||
|
+ struct smb_filename *smb_fname = NULL;
|
||||||
|
+ uint64_t bsize, dfree, dsize;
|
||||||
|
+ enum SMB_QUOTA_TYPE qtype;
|
||||||
|
+ SMB_DISK_QUOTA D;
|
||||||
|
+ unid_t id;
|
||||||
|
+ int r;
|
||||||
|
+
|
||||||
|
+ if (argc != 4) {
|
||||||
|
+ printf("Usage: get_quota <path> [user|group] id\n");
|
||||||
|
+ return NT_STATUS_OK;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ smb_fname = synthetic_smb_fname(talloc_tos(),
|
||||||
|
+ argv[1],
|
||||||
|
+ NULL,
|
||||||
|
+ NULL,
|
||||||
|
+ 0,
|
||||||
|
+ ssf_flags());
|
||||||
|
+ if (smb_fname == NULL) {
|
||||||
|
+ return NT_STATUS_NO_MEMORY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(strcmp(argv[2], "user") == 0) {
|
||||||
|
+ qtype = SMB_USER_FS_QUOTA_TYPE;
|
||||||
|
+ }
|
||||||
|
+ else if(strcmp(argv[2], "group") == 0) {
|
||||||
|
+ qtype = SMB_GROUP_FS_QUOTA_TYPE;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ printf("Usage: get_quota <path> [user|group] id\n");
|
||||||
|
+ return NT_STATUS_OK;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ id.uid = atoi(argv[3]);
|
||||||
|
+
|
||||||
|
+ ZERO_STRUCT(D);
|
||||||
|
+
|
||||||
|
+ r = SMB_VFS_GET_QUOTA(vfs->conn, smb_fname, qtype, id, &D);
|
||||||
|
+
|
||||||
|
+ if (r == -1 && errno != ENOSYS) {
|
||||||
|
+ return NT_STATUS_UNSUCCESSFUL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (r == 0 && (D.qflags & QUOTAS_DENY_DISK) == 0) {
|
||||||
|
+ return NT_STATUS_UNSUCCESSFUL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ bsize = D.bsize;
|
||||||
|
+ /* Use softlimit to determine disk space, except when it has been exceeded */
|
||||||
|
+ if (
|
||||||
|
+ (D.softlimit && D.curblocks >= D.softlimit) ||
|
||||||
|
+ (D.hardlimit && D.curblocks >= D.hardlimit) ||
|
||||||
|
+ (D.isoftlimit && D.curinodes >= D.isoftlimit) ||
|
||||||
|
+ (D.ihardlimit && D.curinodes>=D.ihardlimit)
|
||||||
|
+ ) {
|
||||||
|
+ dfree = 0;
|
||||||
|
+ dsize = D.curblocks;
|
||||||
|
+ } else if (D.softlimit==0 && D.hardlimit==0) {
|
||||||
|
+ return NT_STATUS_UNSUCCESSFUL;
|
||||||
|
+ } else {
|
||||||
|
+ if (D.softlimit == 0) {
|
||||||
|
+ D.softlimit = D.hardlimit;
|
||||||
|
+ }
|
||||||
|
+ dfree = D.softlimit - D.curblocks;
|
||||||
|
+ dsize = D.softlimit;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ printf("get_quota: bsize = %lu, dfree = %lu, dsize = %lu\n",
|
||||||
|
+ (unsigned long)bsize,
|
||||||
|
+ (unsigned long)dfree,
|
||||||
|
+ (unsigned long)dsize);
|
||||||
|
+
|
||||||
|
+ return NT_STATUS_OK;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
|
||||||
|
static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
|
||||||
|
{
|
||||||
|
@@ -2257,6 +2334,7 @@ struct cmd_set vfs_commands[] = {
|
||||||
|
{ "connect", cmd_connect, "VFS connect()", "connect" },
|
||||||
|
{ "disconnect", cmd_disconnect, "VFS disconnect()", "disconnect" },
|
||||||
|
{ "disk_free", cmd_disk_free, "VFS disk_free()", "disk_free <path>" },
|
||||||
|
+ { "get_quota", cmd_get_quota, "VFS get_quota()", "get_quota <path> [user|group] id" },
|
||||||
|
{ "opendir", cmd_opendir, "VFS opendir()", "opendir <fname>" },
|
||||||
|
{ "readdir", cmd_readdir, "VFS readdir()", "readdir" },
|
||||||
|
{ "mkdir", cmd_mkdir, "VFS mkdir()", "mkdir <path>" },
|
||||||
|
diff --git a/source3/torture/wscript_build b/source3/torture/wscript_build
|
||||||
|
index 0c4275de795..f75c4bfe2be 100644
|
||||||
|
--- a/source3/torture/wscript_build
|
||||||
|
+++ b/source3/torture/wscript_build
|
||||||
|
@@ -124,4 +124,4 @@ bld.SAMBA3_BINARY('vfstest',
|
||||||
|
smbconf
|
||||||
|
SMBREADLINE
|
||||||
|
''',
|
||||||
|
- for_selftest=True)
|
||||||
|
+ install=True)
|
||||||
|
--
|
||||||
|
2.37.1
|
||||||
|
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
From 6e79023af14210a6435ab18ada8097253b8b16b6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Mon, 31 May 2021 01:38:49 +0200
|
||||||
|
Subject: [PATCH 25/28] From d9b748869a8f4018ebee302aae8246bf29f60309 Mon Sep
|
||||||
|
17 00:00:00 2001 From: "Timur I. Bakeyev" <timur@iXsystems.com> Date: Fri, 1
|
||||||
|
Jun 2018 01:35:08 +0800 Subject: [PATCH] vfs_fruit: allow broken
|
||||||
|
AFP_Signature where the first byte is 0
|
||||||
|
|
||||||
|
FreeBSD bug ... caused the first byte of the AFP_AfpInfo xattr to be 0
|
||||||
|
instead of 'A'. This hack allows such broken AFP_AfpInfo blobs to be
|
||||||
|
parsed by afpinfo_unpack().
|
||||||
|
|
||||||
|
FreeBSD Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228462
|
||||||
|
|
||||||
|
Signed-off-by: Ralph Boehme <slow@samba.org>
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
source3/lib/adouble.c | 19 +++++++++++++++----
|
||||||
|
source3/modules/vfs_fruit.c | 19 ++++++++++++++++++-
|
||||||
|
2 files changed, 33 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff -Naurp a/source3/lib/adouble.c b/source3/lib/adouble.c
|
||||||
|
--- a/source3/lib/adouble.c 2024-02-02 04:33:51.172489400 -0500
|
||||||
|
+++ b/source3/lib/adouble.c 2024-08-05 13:53:43.952688000 -0400
|
||||||
|
@@ -2821,6 +2821,8 @@ ssize_t afpinfo_pack(const AfpInfo *ai, char *buf)
|
||||||
|
return AFP_INFO_SIZE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define BROKEN_FREEBSD_AFP_Signature 0x00465000
|
||||||
|
+
|
||||||
|
/**
|
||||||
|
* Unpack a buffer into a AfpInfo structure
|
||||||
|
*
|
||||||
|
@@ -2841,11 +2843,20 @@ AfpInfo *afpinfo_unpack(TALLOC_CTX *ctx, const void *d
|
||||||
|
sizeof(ai->afpi_FinderInfo));
|
||||||
|
|
||||||
|
if (validate) {
|
||||||
|
- if (ai->afpi_Signature != AFP_Signature
|
||||||
|
- || ai->afpi_Version != AFP_Version)
|
||||||
|
- {
|
||||||
|
- DEBUG(1, ("Bad AfpInfo signature or version\n"));
|
||||||
|
+ if (ai->afpi_Signature != AFP_Signature) {
|
||||||
|
+ DBG_WARNING("Bad AFP signature [%x]\n", ai->afpi_Signature);
|
||||||
|
+
|
||||||
|
+ if (ai->afpi_Signature != BROKEN_FREEBSD_AFP_Signature) {
|
||||||
|
+ DBG_ERR("Bad AfpInfo signature\n");
|
||||||
|
+ TALLOC_FREE(ai);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (ai->afpi_Version != AFP_Version) {
|
||||||
|
+ DBG_ERR("Bad AfpInfo version\n");
|
||||||
|
TALLOC_FREE(ai);
|
||||||
|
+ return NULL;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ai->afpi_Signature = AFP_Signature;
|
||||||
|
diff -Naurp a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c
|
||||||
|
--- a/source3/modules/vfs_fruit.c 2024-02-02 04:33:51.228489600 -0500
|
||||||
|
+++ b/source3/modules/vfs_fruit.c 2024-08-05 13:12:29.220129000 -0400
|
||||||
|
@@ -2305,6 +2305,7 @@ static ssize_t fruit_pread_meta_stream(vfs_handle_stru
|
||||||
|
size_t n, off_t offset)
|
||||||
|
{
|
||||||
|
struct fio *fio = fruit_get_complete_fio(handle, fsp);
|
||||||
|
+ char *p = (char *)data;
|
||||||
|
ssize_t nread;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
@@ -2313,7 +2314,23 @@ static ssize_t fruit_pread_meta_stream(vfs_handle_stru
|
||||||
|
}
|
||||||
|
|
||||||
|
nread = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
|
||||||
|
- if (nread == -1 || nread == n) {
|
||||||
|
+ if (nread <= 0) {
|
||||||
|
+ /*
|
||||||
|
+ * fruit_meta_open_stream() removes O_CREAT flag
|
||||||
|
+ * from xattr open. This results in vfs_streams_xattr
|
||||||
|
+ * not generating an FSP extension for the files_struct
|
||||||
|
+ * and causes subsequent pread() of stream to return
|
||||||
|
+ * nread=0 if pread() occurs before pwrite().
|
||||||
|
+ */
|
||||||
|
+ return nread;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (nread == n) {
|
||||||
|
+ if (offset == 0 && nread > 3 && p[0] == 0 && p[1] == 'F' && p[2] == 'P') {
|
||||||
|
+ DBG_NOTICE("Fixing AFP_Info of [%s]\n",
|
||||||
|
+ fsp_str_dbg(fsp));
|
||||||
|
+ p[0] = 'A';
|
||||||
|
+ }
|
||||||
|
return nread;
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,335 @@
|
|||||||
|
From 2d73ccb27ffcdf419d569260fcca6e9ee3b9538a Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Thu, 29 Sep 2022 03:24:26 +0200
|
||||||
|
Subject: [PATCH 26/28] vfs: add a compatibility option to the
|
||||||
|
vfs_streams_xattr
|
||||||
|
|
||||||
|
When enabled, the module does not append a trailing 0
|
||||||
|
byte to the end of the extended attribute data.
|
||||||
|
|
||||||
|
This is primarily a consideration when the administrator
|
||||||
|
wishes to expose extended attributes that have been written
|
||||||
|
by another application as alternate data streams via
|
||||||
|
Samba.
|
||||||
|
|
||||||
|
An example where this parameter may be required is when
|
||||||
|
migrating a netatalk share to Samba. See manpage for
|
||||||
|
vfs_fruit for additional considerations regarding
|
||||||
|
Netatalk and Samba compatibility.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
---
|
||||||
|
docs-xml/manpages/vfs_streams_xattr.8.xml | 25 ++++++
|
||||||
|
source3/modules/vfs_streams_xattr.c | 95 +++++++++++++++++------
|
||||||
|
2 files changed, 97 insertions(+), 23 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/docs-xml/manpages/vfs_streams_xattr.8.xml b/docs-xml/manpages/vfs_streams_xattr.8.xml
|
||||||
|
index 6645928c016..0f38d510a82 100644
|
||||||
|
--- a/docs-xml/manpages/vfs_streams_xattr.8.xml
|
||||||
|
+++ b/docs-xml/manpages/vfs_streams_xattr.8.xml
|
||||||
|
@@ -71,6 +71,31 @@
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
+ <varlistentry>
|
||||||
|
+ <term>streams_xattr:xattr_compat = [yes|no]</term>
|
||||||
|
+ <listitem>
|
||||||
|
+ <para>When enabled, the module does not append a trailing 0
|
||||||
|
+ byte to the end of the extended attribute data. This parameter
|
||||||
|
+ must not be changed once data has been written to the share
|
||||||
|
+ since it may result in dropping the last byte from xattr data.
|
||||||
|
+
|
||||||
|
+ This is primarily a consideration when the administrator
|
||||||
|
+ wishes to expose extended attributes that have been written
|
||||||
|
+ by another application as alternate data streams via
|
||||||
|
+ Samba.
|
||||||
|
+
|
||||||
|
+ An example where this parameter may be required is when
|
||||||
|
+ migrating a netatalk share to Samba. See manpage for
|
||||||
|
+ vfs_fruit for additional considerations regarding
|
||||||
|
+ Netatalk and Samba compatibility.
|
||||||
|
+
|
||||||
|
+ WARNING: this parameter must not be changed on existing
|
||||||
|
+ Samba shares or new shares that export paths currently
|
||||||
|
+ or previously have been shared by Samba.
|
||||||
|
+ The default is <command>yes</command>.</para>
|
||||||
|
+ </listitem>
|
||||||
|
+ </varlistentry>
|
||||||
|
+
|
||||||
|
</variablelist>
|
||||||
|
|
||||||
|
</refsect1>
|
||||||
|
diff --git a/source3/modules/vfs_streams_xattr.c b/source3/modules/vfs_streams_xattr.c
|
||||||
|
index b69a4f342f5..070111e3ee9 100644
|
||||||
|
--- a/source3/modules/vfs_streams_xattr.c
|
||||||
|
+++ b/source3/modules/vfs_streams_xattr.c
|
||||||
|
@@ -35,6 +35,7 @@ struct streams_xattr_config {
|
||||||
|
const char *prefix;
|
||||||
|
size_t prefix_len;
|
||||||
|
bool store_stream_type;
|
||||||
|
+ int xattr_compat_bytes;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct stream_io {
|
||||||
|
@@ -45,22 +46,28 @@ struct stream_io {
|
||||||
|
vfs_handle_struct *handle;
|
||||||
|
};
|
||||||
|
|
||||||
|
-static ssize_t get_xattr_size_fsp(struct files_struct *fsp,
|
||||||
|
+static ssize_t get_xattr_size_fsp(vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
const char *xattr_name)
|
||||||
|
{
|
||||||
|
NTSTATUS status;
|
||||||
|
struct ea_struct ea;
|
||||||
|
ssize_t result;
|
||||||
|
+ struct streams_xattr_config *config = NULL;
|
||||||
|
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
status = get_ea_value_fsp(talloc_tos(),
|
||||||
|
fsp,
|
||||||
|
xattr_name,
|
||||||
|
&ea);
|
||||||
|
+
|
||||||
|
if (!NT_STATUS_IS_OK(status)) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- result = ea.value.length-1;
|
||||||
|
+ result = ea.value.length - config->xattr_compat_bytes;
|
||||||
|
TALLOC_FREE(ea.value.data);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@@ -197,7 +204,8 @@ static int streams_xattr_fstat(vfs_handle_struct *hand
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- sbuf->st_ex_size = get_xattr_size_fsp(fsp->base_fsp,
|
||||||
|
+ sbuf->st_ex_size = get_xattr_size_fsp(handle,
|
||||||
|
+ fsp->base_fsp,
|
||||||
|
io->xattr_name);
|
||||||
|
if (sbuf->st_ex_size == -1) {
|
||||||
|
SET_STAT_INVALID(*sbuf);
|
||||||
|
@@ -273,7 +281,7 @@ static int streams_xattr_stat(vfs_handle_struct *handl
|
||||||
|
fsp = fsp->base_fsp;
|
||||||
|
}
|
||||||
|
|
||||||
|
- smb_fname->st.st_ex_size = get_xattr_size_fsp(fsp,
|
||||||
|
+ smb_fname->st.st_ex_size = get_xattr_size_fsp(handle, fsp,
|
||||||
|
xattr_name);
|
||||||
|
if (smb_fname->st.st_ex_size == -1) {
|
||||||
|
TALLOC_FREE(xattr_name);
|
||||||
|
@@ -308,6 +316,7 @@ static int streams_xattr_lstat(vfs_handle_struct *hand
|
||||||
|
errno = ENOENT;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
return SMB_VFS_NEXT_LSTAT(handle, smb_fname);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -341,6 +350,12 @@ static int streams_xattr_openat(struct vfs_handle_stru
|
||||||
|
how);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#ifdef O_EMPTY_PATH
|
||||||
|
+ if (how->flags & O_EMPTY_PATH) {
|
||||||
|
+ return vfs_fake_fd();
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
if (how->resolve != 0) {
|
||||||
|
errno = ENOSYS;
|
||||||
|
return -1;
|
||||||
|
@@ -356,6 +371,8 @@ static int streams_xattr_openat(struct vfs_handle_stru
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ fsp->fsp_flags.have_proc_fds = fsp->conn->have_proc_fds;
|
||||||
|
+
|
||||||
|
status = get_ea_value_fsp(talloc_tos(),
|
||||||
|
fsp->base_fsp,
|
||||||
|
xattr_name,
|
||||||
|
@@ -394,7 +411,8 @@ static int streams_xattr_openat(struct vfs_handle_stru
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
- * Darn, xattrs need at least 1 byte
|
||||||
|
+ * If xattr_compat_bytes is set we need to
|
||||||
|
+ * provide one extra trailing byte
|
||||||
|
*/
|
||||||
|
char null = '\0';
|
||||||
|
|
||||||
|
@@ -403,7 +421,8 @@ static int streams_xattr_openat(struct vfs_handle_stru
|
||||||
|
|
||||||
|
ret = SMB_VFS_FSETXATTR(fsp->base_fsp,
|
||||||
|
xattr_name,
|
||||||
|
- &null, sizeof(null),
|
||||||
|
+ (config->xattr_compat_bytes) ? &null : NULL,
|
||||||
|
+ (config->xattr_compat_bytes) ? sizeof(null) : 0,
|
||||||
|
how->flags & O_EXCL ? XATTR_CREATE : 0);
|
||||||
|
if (ret != 0) {
|
||||||
|
goto fail;
|
||||||
|
@@ -412,13 +431,13 @@ static int streams_xattr_openat(struct vfs_handle_stru
|
||||||
|
|
||||||
|
fakefd = vfs_fake_fd();
|
||||||
|
|
||||||
|
- sio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct stream_io, NULL);
|
||||||
|
- if (sio == NULL) {
|
||||||
|
- errno = ENOMEM;
|
||||||
|
- goto fail;
|
||||||
|
- }
|
||||||
|
+ sio = VFS_ADD_FSP_EXTENSION(handle, fsp, struct stream_io, NULL);
|
||||||
|
+ if (sio == NULL) {
|
||||||
|
+ errno = ENOMEM;
|
||||||
|
+ goto fail;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
|
||||||
|
+ sio->xattr_name = talloc_strdup(VFS_MEMCTX_FSP_EXTENSION(handle, fsp),
|
||||||
|
xattr_name);
|
||||||
|
if (sio->xattr_name == NULL) {
|
||||||
|
errno = ENOMEM;
|
||||||
|
@@ -808,12 +827,16 @@ static bool collect_one_stream(struct ea_struct *ea, v
|
||||||
|
{
|
||||||
|
struct streaminfo_state *state =
|
||||||
|
(struct streaminfo_state *)private_data;
|
||||||
|
+ struct streams_xattr_config *config = NULL;
|
||||||
|
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(state->handle, config, struct streams_xattr_config,
|
||||||
|
+ return false);
|
||||||
|
+
|
||||||
|
if (!add_one_stream(state->mem_ctx,
|
||||||
|
&state->num_streams, &state->streams,
|
||||||
|
- ea->name, ea->value.length-1,
|
||||||
|
+ ea->name, ea->value.length - config->xattr_compat_bytes,
|
||||||
|
smb_roundup(state->handle->conn,
|
||||||
|
- ea->value.length-1))) {
|
||||||
|
+ ea->value.length - config->xattr_compat_bytes))) {
|
||||||
|
state->status = NT_STATUS_NO_MEMORY;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@@ -875,6 +898,7 @@ static int streams_xattr_connect(vfs_handle_struct *ha
|
||||||
|
const char *default_prefix = SAMBA_XATTR_DOSSTREAM_PREFIX;
|
||||||
|
const char *prefix;
|
||||||
|
int rc;
|
||||||
|
+ bool xattr_compat;
|
||||||
|
|
||||||
|
rc = SMB_VFS_NEXT_CONNECT(handle, service, user);
|
||||||
|
if (rc != 0) {
|
||||||
|
@@ -905,6 +929,13 @@ static int streams_xattr_connect(vfs_handle_struct *ha
|
||||||
|
"store_stream_type",
|
||||||
|
true);
|
||||||
|
|
||||||
|
+ xattr_compat = lp_parm_bool(SNUM(handle->conn),
|
||||||
|
+ "streams_xattr",
|
||||||
|
+ "xattr_compat",
|
||||||
|
+ true);
|
||||||
|
+
|
||||||
|
+ config->xattr_compat_bytes = xattr_compat ? 0 : 1;
|
||||||
|
+
|
||||||
|
SMB_VFS_HANDLE_SET_DATA(handle, config,
|
||||||
|
NULL, struct stream_xattr_config,
|
||||||
|
return -1);
|
||||||
|
@@ -921,6 +952,7 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct
|
||||||
|
struct ea_struct ea;
|
||||||
|
NTSTATUS status;
|
||||||
|
int ret;
|
||||||
|
+ struct streams_xattr_config *config = NULL;
|
||||||
|
|
||||||
|
DEBUG(10, ("streams_xattr_pwrite called for %d bytes\n", (int)n));
|
||||||
|
|
||||||
|
@@ -932,6 +964,9 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
if ((offset + n) >= lp_smbd_max_xattr_size(SNUM(handle->conn))) {
|
||||||
|
/*
|
||||||
|
* Requested write is beyond what can be read based on
|
||||||
|
@@ -961,11 +996,11 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ((offset + n) > ea.value.length-1) {
|
||||||
|
+ if ((offset + n) > ea.value.length - config->xattr_compat_bytes) {
|
||||||
|
uint8_t *tmp;
|
||||||
|
|
||||||
|
tmp = talloc_realloc(talloc_tos(), ea.value.data, uint8_t,
|
||||||
|
- offset + n + 1);
|
||||||
|
+ offset + n + config->xattr_compat_bytes);
|
||||||
|
|
||||||
|
if (tmp == NULL) {
|
||||||
|
TALLOC_FREE(ea.value.data);
|
||||||
|
@@ -973,8 +1008,10 @@ static ssize_t streams_xattr_pwrite(vfs_handle_struct
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
ea.value.data = tmp;
|
||||||
|
- ea.value.length = offset + n + 1;
|
||||||
|
- ea.value.data[offset+n] = 0;
|
||||||
|
+ ea.value.length = offset + n + config->xattr_compat_bytes;
|
||||||
|
+ if (config->xattr_compat_bytes) {
|
||||||
|
+ ea.value.data[offset+n] = 0;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(ea.value.data + offset, data, n);
|
||||||
|
@@ -1002,7 +1039,12 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *
|
||||||
|
struct ea_struct ea;
|
||||||
|
NTSTATUS status;
|
||||||
|
size_t length, overlap;
|
||||||
|
+ struct smb_filename *smb_fname_base = NULL;
|
||||||
|
+ struct streams_xattr_config *config = NULL;
|
||||||
|
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
DEBUG(10, ("streams_xattr_pread: offset=%d, size=%d\n",
|
||||||
|
(int)offset, (int)n));
|
||||||
|
|
||||||
|
@@ -1022,7 +1064,7 @@ static ssize_t streams_xattr_pread(vfs_handle_struct *
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- length = ea.value.length-1;
|
||||||
|
+ length = ea.value.length - config->xattr_compat_bytes;
|
||||||
|
|
||||||
|
DBG_DEBUG("get_ea_value_fsp returned %d bytes\n",
|
||||||
|
(int)length);
|
||||||
|
@@ -1210,6 +1252,12 @@ static int streams_xattr_ftruncate(struct vfs_handle_s
|
||||||
|
struct stream_io *sio =
|
||||||
|
(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
|
||||||
|
|
||||||
|
+ struct smb_filename *smb_fname_base = NULL;
|
||||||
|
+ struct streams_xattr_config *config = NULL;
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
DEBUG(10, ("streams_xattr_ftruncate called for file %s offset %.0f\n",
|
||||||
|
fsp_str_dbg(fsp), (double)offset));
|
||||||
|
|
||||||
|
@@ -1239,14 +1287,16 @@ static int streams_xattr_ftruncate(struct vfs_handle_s
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Did we expand ? */
|
||||||
|
- if (ea.value.length < offset + 1) {
|
||||||
|
+ if (ea.value.length < offset + config->xattr_compat_bytes) {
|
||||||
|
memset(&tmp[ea.value.length], '\0',
|
||||||
|
- offset + 1 - ea.value.length);
|
||||||
|
+ offset + config->xattr_compat_bytes - ea.value.length);
|
||||||
|
}
|
||||||
|
|
||||||
|
ea.value.data = tmp;
|
||||||
|
- ea.value.length = offset + 1;
|
||||||
|
- ea.value.data[offset] = 0;
|
||||||
|
+ ea.value.length = offset + config->xattr_compat_bytes;
|
||||||
|
+ if (config->xattr_compat_bytes) {
|
||||||
|
+ ea.value.data[offset] = 0;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
ret = SMB_VFS_FSETXATTR(fsp->base_fsp,
|
||||||
|
sio->xattr_name,
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
From 584c69e77abb537a7345222648a397a9963c01b7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Timur I. Bakeyev" <timur@FreeBSD.org>
|
||||||
|
Date: Sat, 15 Oct 2022 04:02:43 +0200
|
||||||
|
Subject: [PATCH 28/28] s3:lib:system - add FreeBSD proc_fd_pattern
|
||||||
|
|
||||||
|
Add support for FreeBSD equivalent of /proc/self/fd through a special
|
||||||
|
fdescfs mount with option "nodup". This filesystem should be mounted
|
||||||
|
either to the private $PIDDIR/fd/ directory or to /dev/fd in order to
|
||||||
|
provide security and performance characteristics similar to Linux.
|
||||||
|
|
||||||
|
Signed-off-by: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
|
Adapted for Samba 4.20 by: Andrea venturoli <ml@netfence.it>
|
||||||
|
---
|
||||||
|
--- source3/lib/system.c.orig 2025-06-27 15:05:05 UTC
|
||||||
|
+++ source3/lib/system.c
|
||||||
|
@@ -1047,6 +1047,68 @@ int sys_get_number_of_cores(void)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+static bool freebsd_fdesc_check(const char *pattern)
|
||||||
|
+{
|
||||||
|
+ char fdesc_path[PATH_MAX];
|
||||||
|
+ int fd, fd2;
|
||||||
|
+
|
||||||
|
+ fd = open(lp_pid_directory(), O_DIRECTORY);
|
||||||
|
+ if (fd == -1) {
|
||||||
|
+ DBG_ERR("%s: failed to open pid directory: %s\n",
|
||||||
|
+ lp_pid_directory(), strerror(errno));
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ snprintf(fdesc_path, sizeof(fdesc_path), pattern, fd);
|
||||||
|
+
|
||||||
|
+ fd2 = open(fdesc_path, O_DIRECTORY);
|
||||||
|
+ if (fd2 == -1) {
|
||||||
|
+ /*
|
||||||
|
+ * Setting O_DIRECTORY on open of fdescfs mount
|
||||||
|
+ * without 'nodup' option will fail with ENOTDIR.
|
||||||
|
+ */
|
||||||
|
+ if (errno == ENOTDIR) {
|
||||||
|
+ DBG_ERR("%s: fdescfs filesystem is not mounted with "
|
||||||
|
+ "'nodup' option. This specific mount option is "
|
||||||
|
+ "required in order to enable race-free handling "
|
||||||
|
+ "of paths.\n"
|
||||||
|
+ "See documentation for Samba's New VFS' "
|
||||||
|
+ "for more details. The 'nodup' mount option was "
|
||||||
|
+ "introduced in FreeBSD 13.\n", fdesc_path);
|
||||||
|
+ close(fd);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ DBG_ERR("%s: failed to open fdescfs path: %s\n",
|
||||||
|
+ fdesc_path, strerror(errno));
|
||||||
|
+ close(fd);
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ close(fd);
|
||||||
|
+ close(fd2);
|
||||||
|
+
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static char* freebsd_pattern(char *buf, size_t bufsize) {
|
||||||
|
+ const char** base;
|
||||||
|
+ const char* base_dir[] = {
|
||||||
|
+ lp_pid_directory(), /* This is a preferred location */
|
||||||
|
+ "/dev",
|
||||||
|
+ NULL
|
||||||
|
+ };
|
||||||
|
+
|
||||||
|
+ for(base = &base_dir[0]; *base != NULL; base++) {
|
||||||
|
+ snprintf(buf, bufsize, "%s/fd/%%lu", *base);
|
||||||
|
+ if(freebsd_fdesc_check(buf)) {
|
||||||
|
+ return buf;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static char proc_fd_pattern_buf[PATH_MAX];
|
||||||
|
+static const char *proc_fd_pattern = NULL;
|
||||||
|
+
|
||||||
|
bool sys_have_proc_fds(void)
|
||||||
|
{
|
||||||
|
static bool checked = false;
|
||||||
|
@@ -1058,8 +1078,12 @@ bool sys_have_proc_fds(void)
|
||||||
|
return have_proc_fds;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = stat("/proc/self/fd/0", &sb);
|
||||||
|
- have_proc_fds = (ret == 0);
|
||||||
|
+ if (freebsd_pattern(proc_fd_pattern_buf, sizeof(proc_fd_pattern_buf)) != NULL) {
|
||||||
|
+ have_proc_fds = true;
|
||||||
|
+ proc_fd_pattern = proc_fd_pattern_buf;
|
||||||
|
+ } else
|
||||||
|
+ have_proc_fds = false;
|
||||||
|
+
|
||||||
|
checked = true;
|
||||||
|
|
||||||
|
return have_proc_fds;
|
||||||
|
@@ -1067,10 +1091,18 @@ char *sys_proc_fd_path(int fd, struct sys_proc_fd_path
|
||||||
|
|
||||||
|
char *sys_proc_fd_path(int fd, struct sys_proc_fd_path_buf *buf)
|
||||||
|
{
|
||||||
|
+ bool have_proc_fds = sys_have_proc_fds();
|
||||||
|
+ SMB_ASSERT(have_proc_fds);
|
||||||
|
+#if defined(__clang__)
|
||||||
|
+#pragma clang diagnostic push
|
||||||
|
+#pragma clang diagnostic ignored "-Wformat-nonliteral"
|
||||||
|
+#endif
|
||||||
|
int written =
|
||||||
|
- snprintf(buf->buf, sizeof(buf->buf), "/proc/self/fd/%d", fd);
|
||||||
|
-
|
||||||
|
- SMB_ASSERT(sys_have_proc_fds() && (written >= 0));
|
||||||
|
+ snprintf(buf->buf, sizeof(buf->buf), proc_fd_pattern, fd);
|
||||||
|
+#if defined(__clang__)
|
||||||
|
+#pragma clang diagnostic pop
|
||||||
|
+#endif
|
||||||
|
+ SMB_ASSERT(written >= 0);
|
||||||
|
|
||||||
|
return buf->buf;
|
||||||
|
}
|
||||||
94
net/samba422/files/README.FreeBSD.in
Normal file
94
net/samba422/files/README.FreeBSD.in
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
!!! Please read before runing any tools !!!
|
||||||
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
Documentation
|
||||||
|
=============
|
||||||
|
|
||||||
|
o https://wiki.samba.org/index.php/Samba4/HOWTO
|
||||||
|
|
||||||
|
o https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO
|
||||||
|
|
||||||
|
o https://wiki.samba.org/index.php/Samba4/samba-tool/domain/classicupgrade/HOWTO
|
||||||
|
|
||||||
|
FreeBSD specific information
|
||||||
|
============================
|
||||||
|
|
||||||
|
* Your configuration is in: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
|
||||||
|
|
||||||
|
* All the logs are under: %%SAMBA4_LOGDIR%%
|
||||||
|
|
||||||
|
* All the relevant databases are under: %%SAMBA4_LOCKDIR%%
|
||||||
|
|
||||||
|
* Provisioning script is: %%PREFIX%%/bin/samba-tool
|
||||||
|
|
||||||
|
Samba4 provisioning requires file system(s) with the ACLs support. On
|
||||||
|
UFS2 you need to enable POSIX ACLs by adding 'acls' option to the mount
|
||||||
|
flags, on ZFS you need to use NFSv4 ACLs and `zfsacl` VFS module to get
|
||||||
|
provisioning work.
|
||||||
|
|
||||||
|
There is a hack in the code, that makes provisioning work on UFS2 and in
|
||||||
|
the jails on the price of using USER extattr(2) namespace, which is less
|
||||||
|
secure than SYSTEM namespace, as can be edited not only by root user, but
|
||||||
|
also by the owner of the file.
|
||||||
|
|
||||||
|
For the provisioning on ZFS you need to use additional parameters to the
|
||||||
|
samba-tool, that would explicitly add `zfsacl` to the default `vfs objects`:
|
||||||
|
|
||||||
|
# samba-tool domain provision --interactive \
|
||||||
|
--option="vfs objects"="dfs_samba4 zfsacl"
|
||||||
|
|
||||||
|
To run this port you need to perform the following steps:
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
|
0. If you had Samba3 port installed before, please, *take backups* of
|
||||||
|
all the relevant files. That includes 'smb.conf' file and all the
|
||||||
|
content of the '/var/db/samba/' directory.
|
||||||
|
|
||||||
|
1a. Create new '%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%' file by running:
|
||||||
|
|
||||||
|
# samba-tool domain provision
|
||||||
|
|
||||||
|
1b. Or upgrade from the Samba3 'smb.conf' file by running:
|
||||||
|
|
||||||
|
# samba-tool domain classicupgrade
|
||||||
|
|
||||||
|
%%AC_DC%%1c. You will need to specify location of the 'nsupdate' command in the
|
||||||
|
%%AC_DC%%'%%SAMBA4_CONFIG%%' file:
|
||||||
|
%%AC_DC%%
|
||||||
|
%%AC_DC%% nsupdate command = %%PREFIX%%/bin/samba-nsupdate -g
|
||||||
|
%%AC_DC%%
|
||||||
|
2. Put string 'samba_server_enable="YES"' into your /etc/rc.conf.
|
||||||
|
|
||||||
|
3. Make sure that your server doesn't run Samba3, OpenLDAP and named.
|
||||||
|
Stop them, if necessary.
|
||||||
|
|
||||||
|
4. Run '%%PREFIX%%/etc/rc.d/samba_server start' or reboot.
|
||||||
|
|
||||||
|
Please, check archives of samba@lists.samba.org and ask there for help,
|
||||||
|
if necessary:
|
||||||
|
|
||||||
|
https://lists.samba.org/archive/samba/
|
||||||
|
|
||||||
|
Port related bugs can be reported to the FreeBSD Bugzilla or directly to:
|
||||||
|
|
||||||
|
https://gitlab.com/samba-freebsd/ports/-/issues
|
||||||
|
|
||||||
|
In case you found a bug which is clearly not related to the port build
|
||||||
|
process itself, plese file a bug report at:
|
||||||
|
|
||||||
|
https://bugzilla.samba.org/
|
||||||
|
|
||||||
|
And add me to CC list.
|
||||||
|
|
||||||
|
You may find those tools helpful:
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
Microsoft Remote Server Administration Tools (RSAT) for:
|
||||||
|
|
||||||
|
* Vista: http://www.microsoft.com/en-us/download/details.aspx?id=21090
|
||||||
|
* Windows 7: http://www.microsoft.com/en-us/download/details.aspx?id=7887
|
||||||
|
|
||||||
|
|
||||||
|
FreeBSD Samba4 port maintainer: Timur I. Bakeyev <timur@FreeBSD.org>
|
||||||
172
net/samba422/files/patch-docs-xml_manpages_vfs__freebsd.8.xml
Normal file
172
net/samba422/files/patch-docs-xml_manpages_vfs__freebsd.8.xml
Normal file
@ -0,0 +1,172 @@
|
|||||||
|
--- docs-xml/manpages/vfs_freebsd.8.xml.orig 2025-07-11 10:55:41 UTC
|
||||||
|
+++ docs-xml/manpages/vfs_freebsd.8.xml
|
||||||
|
@@ -0,0 +1,169 @@
|
||||||
|
+<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
|
||||||
|
+<refentry id="vfs_freebsd.8">
|
||||||
|
+
|
||||||
|
+<refmeta>
|
||||||
|
+ <refentrytitle>vfs_freebsd</refentrytitle>
|
||||||
|
+ <manvolnum>8</manvolnum>
|
||||||
|
+ <refmiscinfo class="source">Samba</refmiscinfo>
|
||||||
|
+ <refmiscinfo class="manual">System Administration tools</refmiscinfo>
|
||||||
|
+ <refmiscinfo class="version">&doc.version;</refmiscinfo>
|
||||||
|
+</refmeta>
|
||||||
|
+
|
||||||
|
+<refnamediv>
|
||||||
|
+ <refname>vfs_freebsd</refname>
|
||||||
|
+ <refpurpose>FreeBSD-specific VFS functions</refpurpose>
|
||||||
|
+</refnamediv>
|
||||||
|
+
|
||||||
|
+<refsynopsisdiv>
|
||||||
|
+ <cmdsynopsis>
|
||||||
|
+ <command>vfs objects = freebsd</command>
|
||||||
|
+ </cmdsynopsis>
|
||||||
|
+</refsynopsisdiv>
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <title>DESCRIPTION</title>
|
||||||
|
+
|
||||||
|
+ <para>This VFS module is part of the <citerefentry><refentrytitle>samba</refentrytitle>
|
||||||
|
+ <manvolnum>7</manvolnum></citerefentry> suite.</para>
|
||||||
|
+
|
||||||
|
+ <para>The <command>vfs_freebsd</command> module implements some of the FreeBSD-specific VFS functions.</para>
|
||||||
|
+
|
||||||
|
+ <para>This module is stackable.</para>
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <title>OPTIONS</title>
|
||||||
|
+
|
||||||
|
+ <variablelist>
|
||||||
|
+
|
||||||
|
+ <varlistentry>
|
||||||
|
+ <term>freebsd:extattr mode=[legacy|compat|secure]</term>
|
||||||
|
+ <listitem>
|
||||||
|
+ <para>This parameter defines how the emulation of the Linux attr(5) extended attributes
|
||||||
|
+ is performed through the FreeBSD native extattr(9) system calls.</para>
|
||||||
|
+
|
||||||
|
+ <para>Currently the <emphasis>security</emphasis>, <emphasis>system</emphasis>,
|
||||||
|
+ <emphasis>trusted</emphasis> and <emphasis>user</emphasis> extended attribute(xattr)
|
||||||
|
+ classes are defined in Linux. Contrary FreeBSD has only <emphasis>USER</emphasis>
|
||||||
|
+ and <emphasis>SYSTEM</emphasis> extended attribute(extattr) namespaces, so mapping
|
||||||
|
+ of one set into another isn't straightforward and can be done in different ways.</para>
|
||||||
|
+
|
||||||
|
+ <para>Historically the Samba(7) built-in xattr mapping implementation simply converted
|
||||||
|
+ <emphasis>system</emphasis> and <emphasis>user</emphasis> xattr into corresponding
|
||||||
|
+ <emphasis>SYSTEM</emphasis> and <emphasis>USER</emphasis> extattr namespaces, dropping
|
||||||
|
+ the class prefix name with the separating dot and using attribute name only within the
|
||||||
|
+ mapped namespace. It also rejected any other xattr classes, like <emphasis>security</emphasis>
|
||||||
|
+ and <emphasis>trusted</emphasis> as invalid. Such behavior in particular broke AD
|
||||||
|
+ provisioning on UFS2 file systems as essential <emphasis>security.NTACL</emphasis>
|
||||||
|
+ xattr was rejected as invalid.</para>
|
||||||
|
+
|
||||||
|
+ <para>This module tries to address this problem and provide secure, where it's possible,
|
||||||
|
+ way to map Linux xattr into FreeBSD's extattr.</para>
|
||||||
|
+
|
||||||
|
+ <para>When <emphasis>mode</emphasis> is set to the <emphasis>legacy (default)</emphasis>
|
||||||
|
+ then modified version of built-in mapping is used, where <emphasis>system</emphasis> xattr
|
||||||
|
+ is mapped into SYSTEM namespace, while <emphasis>secure</emphasis>, <emphasis>trusted</emphasis>
|
||||||
|
+ and <emphasis>user</emphasis> xattr are all mapped into the USER namespace, dropping class
|
||||||
|
+ prefixes and mix them all together. This is the way how Samba FreeBSD ports were patched
|
||||||
|
+ up to the 4.9 version and that created multiple potential security issues. This mode is aimed for
|
||||||
|
+ the compatibility with the legacy installations only and should be avoided in new setups.</para>
|
||||||
|
+
|
||||||
|
+ <para>The <emphasis>compat</emphasis> mode is mostly designed for the jailed environments,
|
||||||
|
+ where it's not possible to write extattrs into the secure SYSTEM namespace, so all four
|
||||||
|
+ classes are mapped into the USER namespace. To preserve information about origin of the
|
||||||
|
+ extended attribute it is stored together with the class preffix in the <emphasis>class.attribute</emphasis>
|
||||||
|
+ format.</para>
|
||||||
|
+
|
||||||
|
+ <para>The <emphasis>secure</emphasis> mode is meant for storing extended attributes in a secure
|
||||||
|
+ manner, so that <emphasis>security</emphasis>, <emphasis>system</emphasis> and <emphasis>trusted</emphasis>
|
||||||
|
+ are stored in the SYSTEM namespace, which can be modified only by root.
|
||||||
|
+ </para>
|
||||||
|
+ </listitem>
|
||||||
|
+ </varlistentry>
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+ </variablelist>
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <table frame="all" rowheader="firstcol">
|
||||||
|
+ <title>Attributes mapping</title>
|
||||||
|
+ <tgroup cols='5' align='left' colsep='1' rowsep='1'>
|
||||||
|
+ <thead>
|
||||||
|
+ <row>
|
||||||
|
+ <entry> </entry>
|
||||||
|
+ <entry>built-in</entry>
|
||||||
|
+ <entry>legacy</entry>
|
||||||
|
+ <entry>compat/jail</entry>
|
||||||
|
+ <entry>secure</entry>
|
||||||
|
+ </row>
|
||||||
|
+ </thead>
|
||||||
|
+ <tbody>
|
||||||
|
+ <row>
|
||||||
|
+ <entry>user</entry>
|
||||||
|
+ <entry>USER; attribute</entry>
|
||||||
|
+ <entry>USER; attribute</entry>
|
||||||
|
+ <entry>USER; user.attribute</entry>
|
||||||
|
+ <entry>USER; user.attribute</entry>
|
||||||
|
+ </row>
|
||||||
|
+ <row>
|
||||||
|
+ <entry>system</entry>
|
||||||
|
+ <entry>SYSTEM; attribute</entry>
|
||||||
|
+ <entry>SYSTEM; attribute</entry>
|
||||||
|
+ <entry>USER; system.attribute</entry>
|
||||||
|
+ <entry>SYSTEM; system.attribute</entry>
|
||||||
|
+ </row>
|
||||||
|
+ <row>
|
||||||
|
+ <entry>trusted</entry>
|
||||||
|
+ <entry>FAIL</entry>
|
||||||
|
+ <entry>USER; attribute</entry>
|
||||||
|
+ <entry>USER; trusted.attribute</entry>
|
||||||
|
+ <entry>SYSTEM; trusted.attribute</entry>
|
||||||
|
+ </row>
|
||||||
|
+ <row>
|
||||||
|
+ <entry>security</entry>
|
||||||
|
+ <entry>FAIL</entry>
|
||||||
|
+ <entry>USER; attribute</entry>
|
||||||
|
+ <entry>USER; security.attribute</entry>
|
||||||
|
+ <entry>SYSTEM; security.attribute</entry>
|
||||||
|
+ </row>
|
||||||
|
+ </tbody>
|
||||||
|
+ </tgroup>
|
||||||
|
+ </table>
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <title>EXAMPLES</title>
|
||||||
|
+
|
||||||
|
+ <para>Use secure method of setting extended attributes on the share:</para>
|
||||||
|
+
|
||||||
|
+<programlisting>
|
||||||
|
+ <smbconfsection name="[sysvol]"/>
|
||||||
|
+ <smbconfoption name="vfs objects">freebsd</smbconfoption>
|
||||||
|
+ <smbconfoption name="freebsd:extattr mode">secure</smbconfoption>
|
||||||
|
+</programlisting>
|
||||||
|
+
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <title>VERSION</title>
|
||||||
|
+
|
||||||
|
+ <para>This man page is part of version &doc.version; of the Samba suite.
|
||||||
|
+ </para>
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+<refsect1>
|
||||||
|
+ <title>AUTHOR</title>
|
||||||
|
+
|
||||||
|
+ <para>The original Samba software and related utilities
|
||||||
|
+ were created by Andrew Tridgell. Samba is now developed
|
||||||
|
+ by the Samba Team as an Open Source project similar
|
||||||
|
+ to the way the Linux kernel is developed.</para>
|
||||||
|
+
|
||||||
|
+ <para>This module was written by Timur I. Bakeyev</para>
|
||||||
|
+
|
||||||
|
+</refsect1>
|
||||||
|
+
|
||||||
|
+</refentry>
|
||||||
10
net/samba422/files/patch-docs-xml_wscript__build
Normal file
10
net/samba422/files/patch-docs-xml_wscript__build
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- docs-xml/wscript_build.orig 2025-02-06 10:31:53 UTC
|
||||||
|
+++ docs-xml/wscript_build
|
||||||
|
@@ -88,6 +88,7 @@ vfs_module_manpages = ['vfs_acl_tdb',
|
||||||
|
'vfs_extd_audit',
|
||||||
|
'vfs_fake_perms',
|
||||||
|
'vfs_fileid',
|
||||||
|
+ 'vfs_freebsd',
|
||||||
|
'vfs_fruit',
|
||||||
|
'vfs_full_audit',
|
||||||
|
'vfs_glusterfs',
|
||||||
11
net/samba422/files/patch-examples_pdb_wscript__build
Normal file
11
net/samba422/files/patch-examples_pdb_wscript__build
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- examples/pdb/wscript_build.orig 2019-01-15 10:07:00 UTC
|
||||||
|
+++ examples/pdb/wscript_build
|
||||||
|
@@ -3,7 +3,7 @@
|
||||||
|
bld.SAMBA3_MODULE('pdb_test',
|
||||||
|
subsystem='pdb',
|
||||||
|
source='test.c',
|
||||||
|
- deps='samba-util',
|
||||||
|
+ deps='samba-util samba-debug',
|
||||||
|
init_function='',
|
||||||
|
internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_test'),
|
||||||
|
enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_test'))
|
||||||
11
net/samba422/files/patch-lib_talloc_wscript
Normal file
11
net/samba422/files/patch-lib_talloc_wscript
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- lib/talloc/wscript.orig 2024-01-23 10:24:15.072250000 +0100
|
||||||
|
+++ lib/talloc/wscript 2024-01-23 10:26:17.242921000 +0100
|
||||||
|
@@ -45,7 +45,7 @@ def configure(conf):
|
||||||
|
conf.env.TALLOC_COMPAT1 = False
|
||||||
|
if conf.env.standalone_talloc:
|
||||||
|
conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
|
||||||
|
- conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
|
||||||
|
+ conf.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
|
||||||
|
conf.env.TALLOC_VERSION = VERSION
|
||||||
|
|
||||||
|
conf.CHECK_XSLTPROC_MANPAGES()
|
||||||
15
net/samba422/files/patch-lib_util_util_crypt_c
Normal file
15
net/samba422/files/patch-lib_util_util_crypt_c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Index: lib/util/util_crypt.c
|
||||||
|
--- lib/util/util_crypt.c.orig
|
||||||
|
+++ lib/util/util_crypt.c
|
||||||
|
@@ -2,7 +2,11 @@
|
||||||
|
#include "data_blob.h"
|
||||||
|
#include "discard.h"
|
||||||
|
#include <talloc.h>
|
||||||
|
+#ifdef __FreeBSD__
|
||||||
|
+#include <unistd.h>
|
||||||
|
+#else
|
||||||
|
#include <crypt.h>
|
||||||
|
+#endif
|
||||||
|
#include "util_crypt.h"
|
||||||
|
|
||||||
|
|
||||||
11
net/samba422/files/patch-python_samba_join.py
Normal file
11
net/samba422/files/patch-python_samba_join.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- python/samba/join.py.orig 2025-02-06 10:31:54 UTC
|
||||||
|
+++ python/samba/join.py
|
||||||
|
@@ -917,7 +917,7 @@ class DCJoinContext(object):
|
||||||
|
secrets_ldb = Ldb(ctx.paths.secrets, session_info=system_session(), lp=ctx.lp)
|
||||||
|
|
||||||
|
provision_fill(ctx.local_samdb, secrets_ldb,
|
||||||
|
- ctx.logger, ctx.names, ctx.paths,
|
||||||
|
+ ctx.logger, ctx.names, ctx.targetdir, ctx.paths,
|
||||||
|
dom_for_fun_level=ctx.behavior_version,
|
||||||
|
samdb_fill=FILL_SUBDOMAIN,
|
||||||
|
machinepass=ctx.acct_pass, serverrole="active directory domain controller",
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
--- python/samba/provision/__init__.py.orig 2025-02-06 10:31:54 UTC
|
||||||
|
+++ python/samba/provision/__init__.py
|
||||||
|
@@ -1671,19 +1671,25 @@ def setsysvolacl(samdb, sysvol, uid, gid, domainsid, d
|
||||||
|
s3conf = s3param.get_context()
|
||||||
|
s3conf.load(lp.configfile)
|
||||||
|
|
||||||
|
- file = tempfile.NamedTemporaryFile(dir=os.path.abspath(sysvol))
|
||||||
|
+ sysvol_dir = os.path.abspath(sysvol)
|
||||||
|
+
|
||||||
|
+ set_simple_acl = smbd.set_simple_acl
|
||||||
|
+ if smbd.has_nfsv4_acls(sysvol_dir):
|
||||||
|
+ set_simple_acl = smbd.set_simple_nfsv4_acl
|
||||||
|
+
|
||||||
|
+ file = tempfile.NamedTemporaryFile(dir=sysvol_dir)
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
- smbd.set_simple_acl(file.name, 0o755, system_session_unix(), gid)
|
||||||
|
+ set_simple_acl(file.name, 0o755, system_session_unix(), gid)
|
||||||
|
except OSError:
|
||||||
|
- if not smbd.have_posix_acls():
|
||||||
|
+ if not smbd.have_posix_acls() and not smbd.have_nfsv4_acls():
|
||||||
|
# This clue is only strictly correct for RPM and
|
||||||
|
# Debian-like Linux systems, but hopefully other users
|
||||||
|
# will get enough clue from it.
|
||||||
|
- raise ProvisioningError("Samba was compiled without the posix ACL support that s3fs requires. "
|
||||||
|
+ raise ProvisioningError("Samba was compiled without the ACL support that s3fs requires. "
|
||||||
|
"Try installing libacl1-dev or libacl-devel, then re-run configure and make.")
|
||||||
|
|
||||||
|
- raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires. "
|
||||||
|
+ raise ProvisioningError("Your filesystem or build does not support ACLs, which s3fs requires. "
|
||||||
|
"Try the mounting the filesystem with the 'acl' option.")
|
||||||
|
try:
|
||||||
|
smbd.chown(file.name, uid, gid, system_session_unix())
|
||||||
|
@@ -1906,7 +1912,7 @@ def interface_ips_v6(lp):
|
||||||
|
return ret
|
||||||
|
|
||||||
|
|
||||||
|
-def provision_fill(samdb, secrets_ldb, logger, names, paths,
|
||||||
|
+def provision_fill(samdb, secrets_ldb, logger, names, paths, targetdir,
|
||||||
|
schema=None,
|
||||||
|
samdb_fill=FILL_FULL,
|
||||||
|
hostip=None, hostip6=None,
|
||||||
|
@@ -1965,6 +1971,9 @@ def provision_fill(samdb, secrets_ldb, logger, names,
|
||||||
|
samdb.transaction_commit()
|
||||||
|
|
||||||
|
if serverrole == "active directory domain controller":
|
||||||
|
+ if targetdir and smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(targetdir):
|
||||||
|
+ smbd.set_nfsv4_defaults()
|
||||||
|
+
|
||||||
|
# Continue setting up sysvol for GPO. This appears to require being
|
||||||
|
# outside a transaction.
|
||||||
|
if not skip_sysvolacl:
|
||||||
|
@@ -2341,6 +2350,9 @@ def provision(logger, session_info, smbconf=None,
|
||||||
|
if not os.path.isdir(paths.netlogon):
|
||||||
|
os.makedirs(paths.netlogon, 0o755)
|
||||||
|
|
||||||
|
+ if smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(paths.sysvol):
|
||||||
|
+ smbd.set_nfsv4_defaults()
|
||||||
|
+
|
||||||
|
if adminpass is None:
|
||||||
|
adminpass = samba.generate_random_password(12, 32)
|
||||||
|
adminpass_generated = True
|
||||||
|
@@ -2350,7 +2362,7 @@ def provision(logger, session_info, smbconf=None,
|
||||||
|
adminpass_generated = False
|
||||||
|
|
||||||
|
if samdb_fill == FILL_FULL:
|
||||||
|
- provision_fill(samdb, secrets_ldb, logger, names, paths,
|
||||||
|
+ provision_fill(samdb, secrets_ldb, logger, names, paths, targetdir,
|
||||||
|
schema=schema, samdb_fill=samdb_fill,
|
||||||
|
hostip=hostip, hostip6=hostip6,
|
||||||
|
next_rid=next_rid, dc_rid=dc_rid, adminpass=adminpass,
|
||||||
19
net/samba422/files/patch-source3_lib_sysacls.c
Normal file
19
net/samba422/files/patch-source3_lib_sysacls.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
--- source3/lib/sysacls.c.orig 2025-02-06 10:31:54 UTC
|
||||||
|
+++ source3/lib/sysacls.c
|
||||||
|
@@ -38,6 +38,16 @@
|
||||||
|
#include "modules/vfs_aixacl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/*
|
||||||
|
+ * NFSv4 ACL's should be understood and a first class citizen. Work
|
||||||
|
+ * needs to be done in librpc/idl/smb_acl.idl for this to occur.
|
||||||
|
+ */
|
||||||
|
+#if defined(HAVE_LIBSUNACL) && defined(FREEBSD)
|
||||||
|
+#if 0
|
||||||
|
+#include "modules/nfs4_acls.h"
|
||||||
|
+#endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#undef DBGC_CLASS
|
||||||
|
#define DBGC_CLASS DBGC_ACLS
|
||||||
|
|
||||||
14
net/samba422/files/patch-source3_lib_util.c
Normal file
14
net/samba422/files/patch-source3_lib_util.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
--- source3/lib/util.c.orig 2019-05-07 08:38:21 UTC
|
||||||
|
+++ source3/lib/util.c
|
||||||
|
@@ -1916,7 +1916,10 @@ bool any_nt_status_not_ok(NTSTATUS err1,
|
||||||
|
|
||||||
|
int timeval_to_msec(struct timeval t)
|
||||||
|
{
|
||||||
|
- return t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
|
||||||
|
+ unsigned long result;
|
||||||
|
+
|
||||||
|
+ result = t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
|
||||||
|
+ return result > INT_MAX ? INT_MAX : result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
16
net/samba422/files/patch-source3_librpc_crypto_gse.c
Normal file
16
net/samba422/files/patch-source3_librpc_crypto_gse.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- source3/librpc/crypto/gse.c.orig 2019-01-15 10:07:00 UTC
|
||||||
|
+++ source3/librpc/crypto/gse.c
|
||||||
|
@@ -621,11 +621,12 @@ static NTSTATUS gse_get_server_auth_toke
|
||||||
|
struct gse_context *gse_ctx =
|
||||||
|
talloc_get_type_abort(gensec_security->private_data,
|
||||||
|
struct gse_context);
|
||||||
|
- OM_uint32 gss_maj, gss_min;
|
||||||
|
+ OM_uint32 gss_min;
|
||||||
|
gss_buffer_desc in_data;
|
||||||
|
gss_buffer_desc out_data;
|
||||||
|
DATA_BLOB blob = data_blob_null;
|
||||||
|
NTSTATUS status;
|
||||||
|
+ OM_uint32 gss_maj = -1;
|
||||||
|
OM_uint32 time_rec = 0;
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
702
net/samba422/files/patch-source3_modules_vfs__freebsd.c
Normal file
702
net/samba422/files/patch-source3_modules_vfs__freebsd.c
Normal file
@ -0,0 +1,702 @@
|
|||||||
|
--- source3/modules/vfs_freebsd.c.orig 2025-07-11 10:55:17 UTC
|
||||||
|
+++ source3/modules/vfs_freebsd.c
|
||||||
|
@@ -0,0 +1,699 @@
|
||||||
|
+/*
|
||||||
|
+ * This module implements VFS calls specific to FreeBSD
|
||||||
|
+ *
|
||||||
|
+ * Copyright (C) Timur I. Bakeyev, 2018
|
||||||
|
+ *
|
||||||
|
+ * 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 3 of the License, 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/>.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#include "includes.h"
|
||||||
|
+
|
||||||
|
+#include "lib/util/tevent_unix.h"
|
||||||
|
+#include "lib/util/tevent_ntstatus.h"
|
||||||
|
+#include "system/filesys.h"
|
||||||
|
+#include "smbd/smbd.h"
|
||||||
|
+
|
||||||
|
+#include <sys/sysctl.h>
|
||||||
|
+
|
||||||
|
+static int vfs_freebsd_debug_level = DBGC_VFS;
|
||||||
|
+
|
||||||
|
+#undef DBGC_CLASS
|
||||||
|
+#define DBGC_CLASS vfs_freebsd_debug_level
|
||||||
|
+
|
||||||
|
+#ifndef EXTATTR_MAXNAMELEN
|
||||||
|
+#define EXTATTR_MAXNAMELEN UINT8_MAX
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#define EXTATTR_NAMESPACE(NS) EXTATTR_NAMESPACE_ ## NS, \
|
||||||
|
+ EXTATTR_NAMESPACE_ ## NS ## _STRING ".", \
|
||||||
|
+ .data.len = (sizeof(EXTATTR_NAMESPACE_ ## NS ## _STRING ".") - 1)
|
||||||
|
+
|
||||||
|
+#define EXTATTR_EMPTY 0x00
|
||||||
|
+#define EXTATTR_USER 0x01
|
||||||
|
+#define EXTATTR_SYSTEM 0x02
|
||||||
|
+#define EXTATTR_SECURITY 0x03
|
||||||
|
+#define EXTATTR_TRUSTED 0x04
|
||||||
|
+
|
||||||
|
+enum extattr_mode {
|
||||||
|
+ FREEBSD_EXTATTR_SECURE,
|
||||||
|
+ FREEBSD_EXTATTR_COMPAT,
|
||||||
|
+ FREEBSD_EXTATTR_LEGACY
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+struct freebsd_handle_data {
|
||||||
|
+ enum extattr_mode extattr_mode;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+typedef struct {
|
||||||
|
+ int namespace;
|
||||||
|
+ char name[EXTATTR_MAXNAMELEN+1];
|
||||||
|
+ union {
|
||||||
|
+ uint16_t len;
|
||||||
|
+ uint16_t flags;
|
||||||
|
+ } data;
|
||||||
|
+} extattr_attr;
|
||||||
|
+
|
||||||
|
+static const struct enum_list extattr_mode_param[] = {
|
||||||
|
+ { FREEBSD_EXTATTR_SECURE, "secure" }, /* */
|
||||||
|
+ { FREEBSD_EXTATTR_COMPAT, "compat" }, /* */
|
||||||
|
+ { FREEBSD_EXTATTR_LEGACY, "legacy" }, /* */
|
||||||
|
+ { -1, NULL }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+/* XXX: This order doesn't match namespace ids order! */
|
||||||
|
+static extattr_attr extattr[] = {
|
||||||
|
+ { EXTATTR_NAMESPACE(EMPTY) },
|
||||||
|
+ { EXTATTR_NAMESPACE(SYSTEM) },
|
||||||
|
+ { EXTATTR_NAMESPACE(USER) },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static bool freebsd_in_jail(void) {
|
||||||
|
+ int val = 0;
|
||||||
|
+ size_t val_len = sizeof(val);
|
||||||
|
+
|
||||||
|
+ if((sysctlbyname("security.jail.jailed", &val, &val_len, NULL, 0) != -1) && val == 1) {
|
||||||
|
+ return true;
|
||||||
|
+ }
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static uint16_t freebsd_map_attrname(const char *name)
|
||||||
|
+{
|
||||||
|
+ if(name == NULL || name[0] == '\0') {
|
||||||
|
+ return EXTATTR_EMPTY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ switch(name[0]) {
|
||||||
|
+ case 'u':
|
||||||
|
+ if(strncmp(name, "user.", 5) == 0)
|
||||||
|
+ return EXTATTR_USER;
|
||||||
|
+ break;
|
||||||
|
+ case 't':
|
||||||
|
+ if(strncmp(name, "trusted.", 8) == 0)
|
||||||
|
+ return EXTATTR_TRUSTED;
|
||||||
|
+ break;
|
||||||
|
+ case 's':
|
||||||
|
+ /* name[1] could be any character, including '\0' */
|
||||||
|
+ switch(name[1]) {
|
||||||
|
+ case 'e':
|
||||||
|
+ if(strncmp(name, "security.", 9) == 0)
|
||||||
|
+ return EXTATTR_SECURITY;
|
||||||
|
+ break;
|
||||||
|
+ case 'y':
|
||||||
|
+ if(strncmp(name, "system.", 7) == 0)
|
||||||
|
+ return EXTATTR_SYSTEM;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ return EXTATTR_USER;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+/* security, system, trusted or user */
|
||||||
|
+static extattr_attr* freebsd_map_xattr(enum extattr_mode extattr_mode, const char *name, extattr_attr *attr)
|
||||||
|
+{
|
||||||
|
+ int attrnamespace = EXTATTR_NAMESPACE_EMPTY;
|
||||||
|
+ const char *p, *attrname = name;
|
||||||
|
+
|
||||||
|
+ if(name == NULL || name[0] == '\0') {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(attr == NULL) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ uint16_t flags = freebsd_map_attrname(name);
|
||||||
|
+
|
||||||
|
+ switch(flags) {
|
||||||
|
+ case EXTATTR_SECURITY:
|
||||||
|
+ case EXTATTR_TRUSTED:
|
||||||
|
+ case EXTATTR_SYSTEM:
|
||||||
|
+ attrnamespace = (extattr_mode == FREEBSD_EXTATTR_SECURE) ?
|
||||||
|
+ EXTATTR_NAMESPACE_SYSTEM :
|
||||||
|
+ EXTATTR_NAMESPACE_USER;
|
||||||
|
+ break;
|
||||||
|
+ case EXTATTR_USER:
|
||||||
|
+ attrnamespace = EXTATTR_NAMESPACE_USER;
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ /* Default to "user" namespace if nothing else was specified */
|
||||||
|
+ attrnamespace = EXTATTR_NAMESPACE_USER;
|
||||||
|
+ flags = EXTATTR_USER;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (extattr_mode == FREEBSD_EXTATTR_LEGACY) {
|
||||||
|
+ switch(flags) {
|
||||||
|
+ case EXTATTR_SECURITY:
|
||||||
|
+ attrname = name + 9;
|
||||||
|
+ break;
|
||||||
|
+ case EXTATTR_TRUSTED:
|
||||||
|
+ attrname = name + 8;
|
||||||
|
+ break;
|
||||||
|
+ case EXTATTR_SYSTEM:
|
||||||
|
+ attrname = name + 7;
|
||||||
|
+ break;
|
||||||
|
+ case EXTATTR_USER:
|
||||||
|
+ attrname = name + 5;
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ attrname = ((p=strchr(name, '.')) != NULL) ? p + 1 : name;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ attr->namespace = attrnamespace;
|
||||||
|
+ attr->data.flags = flags;
|
||||||
|
+ strlcpy(attr->name, attrname, EXTATTR_MAXNAMELEN + 1);
|
||||||
|
+
|
||||||
|
+ return attr;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static ssize_t extattr_size(struct files_struct *fsp, extattr_attr *attr)
|
||||||
|
+{
|
||||||
|
+ ssize_t result;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ int fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+
|
||||||
|
+ if (fsp->fsp_flags.is_pathref) {
|
||||||
|
+ const char *path = fsp->fsp_name->base_name;
|
||||||
|
+ if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ char buf[PATH_MAX];
|
||||||
|
+ path = sys_proc_fd_path(fd, &buf);
|
||||||
|
+ if (path == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ * This is no longer a handle based call.
|
||||||
|
+ */
|
||||||
|
+ return extattr_get_file(path, attr->namespace, attr->name, NULL, 0);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ return extattr_get_fd(fd, attr->namespace, attr->name, NULL, 0);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+ * The list of names is returned as an unordered array of NULL-terminated
|
||||||
|
+ * character strings (attribute names are separated by NULL characters),
|
||||||
|
+ * like this:
|
||||||
|
+ * user.name1\0system.name1\0user.name2\0
|
||||||
|
+ *
|
||||||
|
+ * Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using
|
||||||
|
+ * extended attributes, might return a list like this:
|
||||||
|
+ * system.posix_acl_access\0system.posix_acl_default\0
|
||||||
|
+ */
|
||||||
|
+/*
|
||||||
|
+ * The extattr_list_file() returns a list of attributes present in the
|
||||||
|
+ * requested namespace. Each list entry consists of a single byte containing
|
||||||
|
+ * the length of the attribute name, followed by the attribute name. The
|
||||||
|
+ * attribute name is not terminated by ASCII 0 (nul).
|
||||||
|
+*/
|
||||||
|
+static ssize_t freebsd_extattr_list(struct files_struct *fsp, enum extattr_mode extattr_mode, char *list, size_t size)
|
||||||
|
+{
|
||||||
|
+ ssize_t list_size, total_size = 0;
|
||||||
|
+ char *p, *q, *list_end;
|
||||||
|
+ int len;
|
||||||
|
+ /*
|
||||||
|
+ Ignore all but user namespace when we are not root or in jail
|
||||||
|
+ See: https://bugzilla.samba.org/show_bug.cgi?id=10247
|
||||||
|
+ */
|
||||||
|
+ bool as_root = (geteuid() == 0);
|
||||||
|
+
|
||||||
|
+ int ns = (extattr_mode == FREEBSD_EXTATTR_SECURE && as_root) ? 1 : 2;
|
||||||
|
+
|
||||||
|
+ int fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+
|
||||||
|
+ /* Iterate through extattr(2) namespaces */
|
||||||
|
+ for(; ns < ARRAY_SIZE(extattr); ns++) {
|
||||||
|
+ list_size = -1;
|
||||||
|
+
|
||||||
|
+ if (fsp->fsp_flags.is_pathref) {
|
||||||
|
+ const char *path = fsp->fsp_name->base_name;
|
||||||
|
+ if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ char buf[PATH_MAX];
|
||||||
|
+ path = sys_proc_fd_path(fd, &buf);
|
||||||
|
+ if (path == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ * This is no longer a handle based call.
|
||||||
|
+ */
|
||||||
|
+ list_size = extattr_list_file(path, extattr[ns].namespace, list, size);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ list_size = extattr_list_fd(fd, extattr[ns].namespace, list, size);
|
||||||
|
+ }
|
||||||
|
+ /* Some error happend. Errno should be set by the previous call */
|
||||||
|
+ if(list_size < 0)
|
||||||
|
+ return -1;
|
||||||
|
+ /* No attributes in this namespace */
|
||||||
|
+ if(list_size == 0)
|
||||||
|
+ continue;
|
||||||
|
+ /*
|
||||||
|
+ Call with an empty buffer may be used to calculate
|
||||||
|
+ necessary buffer size.
|
||||||
|
+ */
|
||||||
|
+ if(list == NULL) {
|
||||||
|
+ /*
|
||||||
|
+ XXX: Unfortunately, we can't say, how many attributes were
|
||||||
|
+ returned, so here is the potential problem with the emulation.
|
||||||
|
+ */
|
||||||
|
+ if(extattr_mode == FREEBSD_EXTATTR_LEGACY) {
|
||||||
|
+ /*
|
||||||
|
+ Take the worse case of one char attribute names -
|
||||||
|
+ two bytes per name plus one more for sanity.
|
||||||
|
+ */
|
||||||
|
+ total_size += list_size + (list_size/2 + 1)*extattr[ns].data.len;
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ total_size += list_size;
|
||||||
|
+ }
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(extattr_mode == FREEBSD_EXTATTR_LEGACY) {
|
||||||
|
+ /* Count necessary offset to fit namespace prefixes */
|
||||||
|
+ int extra_len = 0;
|
||||||
|
+ uint16_t flags;
|
||||||
|
+ list_end = list + list_size;
|
||||||
|
+ for(list_size = 0, p = q = list; p < list_end; p += len) {
|
||||||
|
+ len = p[0] + 1;
|
||||||
|
+ (void)strlcpy(q, p + 1, len);
|
||||||
|
+ flags = freebsd_map_attrname(q);
|
||||||
|
+ /* Skip secure attributes for non-root user */
|
||||||
|
+ if(extattr_mode != FREEBSD_EXTATTR_SECURE && !as_root && flags > EXTATTR_USER) {
|
||||||
|
+ continue;
|
||||||
|
+ }
|
||||||
|
+ if(flags <= EXTATTR_USER) {
|
||||||
|
+ /* Don't count trailing '\0' */
|
||||||
|
+ extra_len += extattr[ns].data.len;
|
||||||
|
+ }
|
||||||
|
+ list_size += len;
|
||||||
|
+ q += len;
|
||||||
|
+ }
|
||||||
|
+ total_size += list_size + extra_len;
|
||||||
|
+ /* Buffer is too small to fit the results */
|
||||||
|
+ if(total_size > size) {
|
||||||
|
+ errno = ERANGE;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ /* Shift results backwards, so we can prepend prefixes */
|
||||||
|
+ list_end = list + extra_len;
|
||||||
|
+ p = (char*)memmove(list_end, list, list_size);
|
||||||
|
+ /*
|
||||||
|
+ We enter the loop with `p` pointing to the shifted list and
|
||||||
|
+ `extra_len` having the total margin between `list` and `p`
|
||||||
|
+ */
|
||||||
|
+ for(list_end += list_size; p < list_end; p += len) {
|
||||||
|
+ len = strlen(p) + 1;
|
||||||
|
+ flags = freebsd_map_attrname(p);
|
||||||
|
+ if(flags <= EXTATTR_USER) {
|
||||||
|
+ /* Add namespace prefix */
|
||||||
|
+ (void)strncpy(list, extattr[ns].name, extattr[ns].data.len);
|
||||||
|
+ list += extattr[ns].data.len;
|
||||||
|
+ }
|
||||||
|
+ /* Append attribute name */
|
||||||
|
+ (void)strlcpy(list, p, len);
|
||||||
|
+ list += len;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ /* Convert UCSD strings into nul-terminated strings */
|
||||||
|
+ for(list_end = list + list_size; list < list_end; list += len) {
|
||||||
|
+ len = list[0] + 1;
|
||||||
|
+ (void)strlcpy(list, list + 1, len);
|
||||||
|
+ }
|
||||||
|
+ total_size += list_size;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ return total_size;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
+static ssize_t freebsd_fgetxattr_size(struct vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
+ const char *name)
|
||||||
|
+{
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+ extattr_attr attr;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, data,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
|
||||||
|
+ errno = EINVAL;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
|
||||||
|
+ errno = ENOATTR;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return extattr_size(fsp, &attr);
|
||||||
|
+}
|
||||||
|
+*/
|
||||||
|
+
|
||||||
|
+/* VFS entries */
|
||||||
|
+static ssize_t freebsd_fgetxattr(struct vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
+ const char *name,
|
||||||
|
+ void *value,
|
||||||
|
+ size_t size)
|
||||||
|
+{
|
||||||
|
+#if defined(HAVE_XATTR_EXTATTR)
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+ extattr_attr attr;
|
||||||
|
+ ssize_t res;
|
||||||
|
+ int fd;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, data,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
|
||||||
|
+ errno = EINVAL;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Filter out 'secure' entries */
|
||||||
|
+ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
|
||||||
|
+ errno = ENOATTR;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * The BSD implementation has a nasty habit of silently truncating
|
||||||
|
+ * the returned value to the size of the buffer, so we have to check
|
||||||
|
+ * that the buffer is large enough to fit the returned value.
|
||||||
|
+ */
|
||||||
|
+ if((res=extattr_size(fsp, &attr)) < 0) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (size == 0) {
|
||||||
|
+ return res;
|
||||||
|
+ }
|
||||||
|
+ else if (res > size) {
|
||||||
|
+ errno = ERANGE;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+
|
||||||
|
+ if (fsp->fsp_flags.is_pathref) {
|
||||||
|
+ const char *path = fsp->fsp_name->base_name;
|
||||||
|
+ if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ char buf[PATH_MAX];
|
||||||
|
+ path = sys_proc_fd_path(fd, &buf);
|
||||||
|
+ if (path == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ * This is no longer a handle based call.
|
||||||
|
+ */
|
||||||
|
+ return extattr_get_file(path, attr.namespace, attr.name, value, size);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ return extattr_get_fd(fd, attr.namespace, attr.name, value, size);
|
||||||
|
+ }
|
||||||
|
+ return -1;
|
||||||
|
+#else
|
||||||
|
+ errno = ENOSYS;
|
||||||
|
+ return -1;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static ssize_t freebsd_flistxattr(struct vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
+ char *list,
|
||||||
|
+ size_t size)
|
||||||
|
+{
|
||||||
|
+#if defined(HAVE_XATTR_EXTATTR)
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, data,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ return freebsd_extattr_list(fsp, data->extattr_mode, list, size);
|
||||||
|
+#else
|
||||||
|
+ errno = ENOSYS;
|
||||||
|
+ return -1;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int freebsd_fremovexattr(struct vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
+ const char *name)
|
||||||
|
+{
|
||||||
|
+#if defined(HAVE_XATTR_EXTATTR)
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+ extattr_attr attr;
|
||||||
|
+ int fd;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, data,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
|
||||||
|
+ errno = EINVAL;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Filter out 'secure' entries */
|
||||||
|
+ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
|
||||||
|
+ errno = ENOATTR;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+
|
||||||
|
+ if (fsp->fsp_flags.is_pathref) {
|
||||||
|
+ const char *path = fsp->fsp_name->base_name;
|
||||||
|
+ if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ char buf[PATH_MAX];
|
||||||
|
+ path = sys_proc_fd_path(fd, &buf);
|
||||||
|
+ if (path == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ * This is no longer a handle based call.
|
||||||
|
+ */
|
||||||
|
+ return extattr_delete_file(path, attr.namespace, attr.name);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ return extattr_delete_fd(fd, attr.namespace, attr.name);
|
||||||
|
+ }
|
||||||
|
+ return -1;
|
||||||
|
+#else
|
||||||
|
+ errno = ENOSYS;
|
||||||
|
+ return -1;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int freebsd_fsetxattr(struct vfs_handle_struct *handle,
|
||||||
|
+ struct files_struct *fsp,
|
||||||
|
+ const char *name,
|
||||||
|
+ const void *value,
|
||||||
|
+ size_t size,
|
||||||
|
+ int flags)
|
||||||
|
+{
|
||||||
|
+#if defined(HAVE_XATTR_EXTATTR)
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+ extattr_attr attr;
|
||||||
|
+ ssize_t res;
|
||||||
|
+ int fd;
|
||||||
|
+
|
||||||
|
+ SMB_ASSERT(!fsp_is_alternate_stream(fsp));
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_GET_DATA(handle, data,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
|
||||||
|
+ errno = EINVAL;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Filter out 'secure' entries */
|
||||||
|
+ if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
|
||||||
|
+ errno = ENOATTR;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (flags) {
|
||||||
|
+ /* Check attribute existence */
|
||||||
|
+ res = extattr_size(fsp, &attr);
|
||||||
|
+ if (res < 0) {
|
||||||
|
+ /* REPLACE attribute, that doesn't exist */
|
||||||
|
+ if ((flags & XATTR_REPLACE) && errno == ENOATTR) {
|
||||||
|
+ errno = ENOATTR;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ /* Ignore other errors */
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ /* CREATE attribute, that already exists */
|
||||||
|
+ if (flags & XATTR_CREATE) {
|
||||||
|
+ errno = EEXIST;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+
|
||||||
|
+ if (fsp->fsp_flags.is_pathref) {
|
||||||
|
+ const char *path = fsp->fsp_name->base_name;
|
||||||
|
+ if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ char buf[PATH_MAX];
|
||||||
|
+ path = sys_proc_fd_path(fd, &buf);
|
||||||
|
+ if (path == NULL) {
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ /*
|
||||||
|
+ * This is no longer a handle based call.
|
||||||
|
+ */
|
||||||
|
+ res = extattr_set_file(path, attr.namespace, attr.name, value, size);
|
||||||
|
+ }
|
||||||
|
+ else {
|
||||||
|
+ res = extattr_set_fd(fd, attr.namespace, attr.name, value, size);
|
||||||
|
+ }
|
||||||
|
+ return (res >= 0) ? 0 : -1;
|
||||||
|
+#else
|
||||||
|
+ errno = ENOSYS;
|
||||||
|
+ return -1;
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static int freebsd_connect(struct vfs_handle_struct *handle,
|
||||||
|
+ const char *service,
|
||||||
|
+ const char *user)
|
||||||
|
+{
|
||||||
|
+ struct freebsd_handle_data *data;
|
||||||
|
+ int enumval, saved_errno;
|
||||||
|
+
|
||||||
|
+ int ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
|
||||||
|
+
|
||||||
|
+ if (ret < 0) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ data = talloc_zero(handle->conn, struct freebsd_handle_data);
|
||||||
|
+ if (!data) {
|
||||||
|
+ saved_errno = errno;
|
||||||
|
+ SMB_VFS_NEXT_DISCONNECT(handle);
|
||||||
|
+ DEBUG(0, ("talloc_zero() failed\n"));
|
||||||
|
+ errno = saved_errno;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ enumval = lp_parm_enum(SNUM(handle->conn), "freebsd",
|
||||||
|
+ "extattr mode", extattr_mode_param, FREEBSD_EXTATTR_LEGACY);
|
||||||
|
+ if (enumval == -1) {
|
||||||
|
+ saved_errno = errno;
|
||||||
|
+ SMB_VFS_NEXT_DISCONNECT(handle);
|
||||||
|
+ DBG_DEBUG("value for freebsd: 'extattr mode' is unknown\n");
|
||||||
|
+ errno = saved_errno;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(freebsd_in_jail()) {
|
||||||
|
+ enumval = FREEBSD_EXTATTR_COMPAT;
|
||||||
|
+ DBG_WARNING("running in jail, enforcing 'compat' mode\n");
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ data->extattr_mode = (enum extattr_mode)enumval;
|
||||||
|
+
|
||||||
|
+ SMB_VFS_HANDLE_SET_DATA(handle, data, NULL,
|
||||||
|
+ struct freebsd_handle_data,
|
||||||
|
+ return -1);
|
||||||
|
+
|
||||||
|
+ DBG_DEBUG("connect to service[%s] with '%s' extattr mode\n",
|
||||||
|
+ service, extattr_mode_param[data->extattr_mode].name);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static void freebsd_disconnect(vfs_handle_struct *handle)
|
||||||
|
+{
|
||||||
|
+ SMB_VFS_NEXT_DISCONNECT(handle);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/* VFS operations structure */
|
||||||
|
+
|
||||||
|
+struct vfs_fn_pointers freebsd_fns = {
|
||||||
|
+ /* Disk operations */
|
||||||
|
+ .connect_fn = freebsd_connect,
|
||||||
|
+ .disconnect_fn = freebsd_disconnect,
|
||||||
|
+
|
||||||
|
+ /* EA operations. */
|
||||||
|
+ .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
|
||||||
|
+ .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
|
||||||
|
+ .fgetxattr_fn = freebsd_fgetxattr,
|
||||||
|
+ .flistxattr_fn = freebsd_flistxattr,
|
||||||
|
+ .fremovexattr_fn = freebsd_fremovexattr,
|
||||||
|
+ .fsetxattr_fn = freebsd_fsetxattr,
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static_decl_vfs;
|
||||||
|
+NTSTATUS vfs_freebsd_init(TALLOC_CTX *ctx)
|
||||||
|
+{
|
||||||
|
+ NTSTATUS ret;
|
||||||
|
+
|
||||||
|
+ ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "freebsd",
|
||||||
|
+ &freebsd_fns);
|
||||||
|
+
|
||||||
|
+ if (!NT_STATUS_IS_OK(ret)) {
|
||||||
|
+ return ret;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ vfs_freebsd_debug_level = debug_add_class("freebsd");
|
||||||
|
+ if (vfs_freebsd_debug_level == -1) {
|
||||||
|
+ vfs_freebsd_debug_level = DBGC_VFS;
|
||||||
|
+ DEBUG(0, ("vfs_freebsd: Couldn't register custom debugging class!\n"));
|
||||||
|
+ } else {
|
||||||
|
+ DEBUG(10, ("vfs_freebsd: Debug class number of 'fileid': %d\n", vfs_freebsd_debug_level));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
@ -0,0 +1,36 @@
|
|||||||
|
--- source3/modules/vfs_virusfilter_utils.c.orig 2019-01-15 10:07:00 UTC
|
||||||
|
+++ source3/modules/vfs_virusfilter_utils.c
|
||||||
|
@@ -392,6 +392,10 @@ bool virusfilter_io_writel(
|
||||||
|
|
||||||
|
bool virusfilter_io_writefl(
|
||||||
|
struct virusfilter_io_handle *io_h,
|
||||||
|
+ const char *data_fmt, ...) PRINTF_ATTRIBUTE(2, 3);
|
||||||
|
+
|
||||||
|
+bool virusfilter_io_writefl(
|
||||||
|
+ struct virusfilter_io_handle *io_h,
|
||||||
|
const char *data_fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
@@ -415,6 +419,10 @@ bool virusfilter_io_writefl(
|
||||||
|
|
||||||
|
bool virusfilter_io_vwritefl(
|
||||||
|
struct virusfilter_io_handle *io_h,
|
||||||
|
+ const char *data_fmt, va_list ap) PRINTF_ATTRIBUTE(2, 0);
|
||||||
|
+
|
||||||
|
+bool virusfilter_io_vwritefl(
|
||||||
|
+ struct virusfilter_io_handle *io_h,
|
||||||
|
const char *data_fmt, va_list ap)
|
||||||
|
{
|
||||||
|
char data[VIRUSFILTER_IO_BUFFER_SIZE + VIRUSFILTER_IO_EOL_SIZE];
|
||||||
|
@@ -666,6 +674,11 @@ bool virusfilter_io_readl(TALLOC_CTX *ct
|
||||||
|
bool virusfilter_io_writefl_readl(
|
||||||
|
struct virusfilter_io_handle *io_h,
|
||||||
|
char **read_line,
|
||||||
|
+ const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
|
||||||
|
+
|
||||||
|
+bool virusfilter_io_writefl_readl(
|
||||||
|
+ struct virusfilter_io_handle *io_h,
|
||||||
|
+ char **read_line,
|
||||||
|
const char *fmt, ...)
|
||||||
|
{
|
||||||
|
bool ok;
|
||||||
182
net/samba422/files/patch-source3_modules_vfs__zfsacl.c
Normal file
182
net/samba422/files/patch-source3_modules_vfs__zfsacl.c
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
--- source3/modules/vfs_zfsacl.c 2024-07-29 11:03:15.390630700 +0200
|
||||||
|
+++ source3/modules/vfs_zfsacl.c 2025-01-07 15:56:32.048227000 +0100
|
||||||
|
@@ -169,6 +169,7 @@
|
||||||
|
bool must_add_empty_ace = false;
|
||||||
|
struct zfsacl_config_data *config = NULL;
|
||||||
|
int fd;
|
||||||
|
+ struct sys_proc_fd_path_buf buf;
|
||||||
|
|
||||||
|
SMB_VFS_HANDLE_GET_DATA(handle, config,
|
||||||
|
struct zfsacl_config_data,
|
||||||
|
@@ -235,24 +236,52 @@
|
||||||
|
SMB_ASSERT(i == naces);
|
||||||
|
|
||||||
|
/* store acl */
|
||||||
|
- fd = fsp_get_pathref_fd(fsp);
|
||||||
|
- if (fd == -1) {
|
||||||
|
+
|
||||||
|
+ if (!fsp->fsp_flags.is_pathref) {
|
||||||
|
+ fd = fsp_get_io_fd(fsp);
|
||||||
|
+
|
||||||
|
+ rv = facl(fd, ACE_SETACL, naces, acebuf);
|
||||||
|
+ if (rv != 0) {
|
||||||
|
+ DEBUG(8, ("zfs_process_smbacl(%s): Not PATHREF: facl(ACE_SETACL, %d): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ strerror(errno)));
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("zfs_process_smbacl(%s): Not PATHREF: facl(ACE_SETACL, %d) -> %d\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ rv));
|
||||||
|
+
|
||||||
|
+ } else if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+ if (fd == -1) {
|
||||||
|
+ DEBUG(8, ("zfs_process_smbacl(%s): PATHREF(proc_fd): fsp_get_pathref_fd=-1: %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
errno = EBADF;
|
||||||
|
return false;
|
||||||
|
- }
|
||||||
|
- rv = facl(fd, ACE_SETACL, naces, acebuf);
|
||||||
|
- if (rv != 0) {
|
||||||
|
- if(errno == ENOSYS) {
|
||||||
|
- DEBUG(9, ("acl(ACE_SETACL, %s): Operation is not "
|
||||||
|
- "supported on the filesystem where the file "
|
||||||
|
- "resides\n", fsp_str_dbg(fsp)));
|
||||||
|
- } else {
|
||||||
|
- DEBUG(9, ("acl(ACE_SETACL, %s): %s\n", fsp_str_dbg(fsp),
|
||||||
|
- strerror(errno)));
|
||||||
|
- }
|
||||||
|
+ }
|
||||||
|
+ rv = acl(sys_proc_fd_path(fd, &buf), ACE_SETACL, naces, acebuf);
|
||||||
|
+ if (rv != 0) {
|
||||||
|
+ DEBUG(8, ("zfs_process_smbacl(%s): acl(ACE_SETACL, %d): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ strerror(errno)));
|
||||||
|
return false;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("zfs_process_smbacl(%s): PATHREF(proc_fd): acl(ACE_SETACL, %d) -> %d\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ rv));
|
||||||
|
+ } else {
|
||||||
|
+ rv = acl(fsp->fsp_name->base_name, ACE_SETACL, naces, acebuf);
|
||||||
|
+ if (rv != 0) {
|
||||||
|
+ DEBUG(8, ("zfs_process_smbacl(%s): PATHREF(base_name): acl(ACE_SETACL, %d): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ strerror(errno)));
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("zfs_process_smbacl(%s): PATHREF(base_name): facl(ACE_SETACL, %d) -> %d\n",
|
||||||
|
+ fsp_str_dbg(fsp), naces,
|
||||||
|
+ rv));
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
return True;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -282,25 +311,46 @@
|
||||||
|
struct files_struct *fsp,
|
||||||
|
ace_t **outbuf)
|
||||||
|
{
|
||||||
|
- int naces, rv;
|
||||||
|
+ int naces, rv = -1, fd = -1;
|
||||||
|
ace_t *acebuf = NULL;
|
||||||
|
- int fd;
|
||||||
|
+ struct sys_proc_fd_path_buf buf;
|
||||||
|
|
||||||
|
- fd = fsp_get_pathref_fd(fsp);
|
||||||
|
- if (fd == -1) {
|
||||||
|
+
|
||||||
|
+ if (!fsp->fsp_flags.is_pathref) {
|
||||||
|
+ fd = fsp_get_io_fd(fsp);
|
||||||
|
+ if (fd == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): Not PATHREF: fsp_get_io_fd=-1: %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
errno = EBADF;
|
||||||
|
return -1;
|
||||||
|
- }
|
||||||
|
- naces = facl(fd, ACE_GETACLCNT, 0, NULL);
|
||||||
|
- if (naces == -1) {
|
||||||
|
- int dbg_level = 10;
|
||||||
|
-
|
||||||
|
- if (errno == ENOSYS) {
|
||||||
|
- dbg_level = 1;
|
||||||
|
- }
|
||||||
|
- DEBUG(dbg_level, ("facl(ACE_GETACLCNT, %s): %s\n",
|
||||||
|
+ }
|
||||||
|
+ naces = facl(fd, ACE_GETACLCNT, 0, NULL);
|
||||||
|
+ if (naces == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): Not PATHREF: facl(ACE_GETACLCNT): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ } else if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ fd = fsp_get_pathref_fd(fsp);
|
||||||
|
+ if (fd == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): PATHREF(proc_fd): fsp_get_pathref_fd=-1: %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
+ errno = EBADF;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ naces = acl(sys_proc_fd_path(fd, &buf), ACE_GETACLCNT, 0, NULL);
|
||||||
|
+ if (naces == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): PATHREF(proc_fd): acl(ACE_GETACLCNT): %s\n",
|
||||||
|
fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
- return naces;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ naces = acl(fsp->fsp_name->base_name, ACE_GETACLCNT, 0, NULL);
|
||||||
|
+ if (naces == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): PATHREF(base_name): acl(ACE_GETACLCNT): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
acebuf = talloc_size(mem_ctx, sizeof(ace_t)*naces);
|
||||||
|
@@ -309,15 +359,37 @@
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- rv = facl(fd, ACE_GETACL, naces, acebuf);
|
||||||
|
- if (rv == -1) {
|
||||||
|
- DBG_DEBUG("acl(ACE_GETACL, %s): %s\n",
|
||||||
|
- fsp_str_dbg(fsp), strerror(errno));
|
||||||
|
+ if (!fsp->fsp_flags.is_pathref) {
|
||||||
|
+ rv = facl(fd, ACE_GETACL, naces, acebuf);
|
||||||
|
+ if (rv == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): Not PATHREF: facl(ACE_GETACL): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
return -1;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("fget_zfsacl(%s): Not PATHREF: facl(ACE_GETACL) -> %d entries\n",
|
||||||
|
+ fsp_str_dbg(fsp), rv));
|
||||||
|
+ } else if (fsp->fsp_flags.have_proc_fds) {
|
||||||
|
+ rv = acl(sys_proc_fd_path(fd, &buf), ACE_GETACL, naces, acebuf);
|
||||||
|
+ if (rv == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): PATHREF(proc_fd): acl(ACE_GETACL): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("fget_zfsacl(%s): PATHREF(proc_fd): acl(ACE_GETACL) -> %d entries\n",
|
||||||
|
+ fsp_str_dbg(fsp), rv));
|
||||||
|
+ } else {
|
||||||
|
+ rv = acl(fsp->fsp_name->base_name, ACE_GETACL, naces, acebuf);
|
||||||
|
+ if (rv == -1) {
|
||||||
|
+ DEBUG(8, ("fget_zfsacl(%s): PATHREF(base_name): acl(ACE_GETACL): %s\n",
|
||||||
|
+ fsp_str_dbg(fsp), strerror(errno)));
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ DEBUG(10, ("fget_zfsacl(%s): PATHREF(base_name): acl(ACE_GETACL) -> %d entries\n",
|
||||||
|
+ fsp_str_dbg(fsp), rv));
|
||||||
|
}
|
||||||
|
-
|
||||||
|
+
|
||||||
|
*outbuf = acebuf;
|
||||||
|
- return naces;
|
||||||
|
+ return rv;
|
||||||
|
}
|
||||||
|
|
||||||
|
static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle,
|
||||||
16
net/samba422/files/patch-source3_modules_wscript__build
Normal file
16
net/samba422/files/patch-source3_modules_wscript__build
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- source3/modules/wscript_build.orig 2025-02-06 10:31:54 UTC
|
||||||
|
+++ source3/modules/wscript_build
|
||||||
|
@@ -641,6 +641,13 @@ bld.SAMBA3_MODULE('vfs_delay_inject',
|
||||||
|
enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_delay_inject'),
|
||||||
|
install=False)
|
||||||
|
|
||||||
|
+bld.SAMBA3_MODULE('vfs_freebsd',
|
||||||
|
+ subsystem='vfs',
|
||||||
|
+ source='vfs_freebsd.c',
|
||||||
|
+ init_function='',
|
||||||
|
+ internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_freebsd'),
|
||||||
|
+ enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_freebsd'))
|
||||||
|
+
|
||||||
|
bld.SAMBA3_MODULE('vfs_widelinks',
|
||||||
|
subsystem='vfs',
|
||||||
|
source='vfs_widelinks.c',
|
||||||
32
net/samba422/files/patch-source3_param_loadparm.c
Normal file
32
net/samba422/files/patch-source3_param_loadparm.c
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
--- source3/param/loadparm.c.orig 2025-02-06 10:31:54 UTC
|
||||||
|
+++ source3/param/loadparm.c
|
||||||
|
@@ -2890,9 +2890,29 @@ static void init_locals(void)
|
||||||
|
} else {
|
||||||
|
if (lp_parm_const_string(-1, "xattr_tdb", "file", NULL)) {
|
||||||
|
lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr xattr_tdb");
|
||||||
|
+ /*
|
||||||
|
+ * By default, the samba sysvol is located in the statedir. Provisioning will fail in setntacl
|
||||||
|
+ * unless we have zfacl enabled. Unfortunately, at this point the smb.conf has not been generated.
|
||||||
|
+ * This workaround is freebsd-specific.
|
||||||
|
+ */
|
||||||
|
+#if defined(_PC_ACL_EXTENDED)
|
||||||
|
+ } else if (pathconf(lp_state_directory(), _PC_ACL_EXTENDED) == 1) {
|
||||||
|
+ lp_do_parameter(-1, "vfs objects", "dfs_samba4 freebsd");
|
||||||
|
+#endif
|
||||||
|
+#if defined(_PC_ACL_NFS4)
|
||||||
|
+ } else if (pathconf(lp_state_directory(), _PC_ACL_NFS4) == 1) {
|
||||||
|
+ lp_do_parameter(-1, "vfs objects", "dfs_samba4 zfsacl");
|
||||||
|
+#endif
|
||||||
|
} else if (lp_parm_const_string(-1, "posix", "eadb", NULL)) {
|
||||||
|
lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr posix_eadb");
|
||||||
|
} else {
|
||||||
|
+ /*
|
||||||
|
+ * This should only set dfs_samba4 and leave acl_xattr
|
||||||
|
+ * to be set later (or zfsacl). The only reason the decision
|
||||||
|
+ * can't be made here to load acl_xattr or zfsacl is
|
||||||
|
+ * that we don't have access to what the target
|
||||||
|
+ * directory is.
|
||||||
|
+ */
|
||||||
|
lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
--- source3/registry/tests/test_regfio.c.orig 2019-05-07 08:38:21 UTC
|
||||||
|
+++ source3/registry/tests/test_regfio.c
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
+#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
230
net/samba422/files/patch-source3_smbd_pysmbd.c
Normal file
230
net/samba422/files/patch-source3_smbd_pysmbd.c
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
--- source3/smbd/pysmbd.c.orig 2025-02-20 12:58:50 UTC
|
||||||
|
+++ source3/smbd/pysmbd.c
|
||||||
|
@@ -507,6 +507,20 @@ static SMB_ACL_T make_simple_acl(TALLOC_CTX *mem_ctx,
|
||||||
|
return acl;
|
||||||
|
}
|
||||||
|
|
||||||
|
+static SMB_ACL_T make_simple_nfsv4_acl(TALLOC_CTX *mem_ctx,
|
||||||
|
+ gid_t gid,
|
||||||
|
+ mode_t chmod_mode)
|
||||||
|
+{
|
||||||
|
+ /*
|
||||||
|
+ * This function needs to create an NFSv4 ACL. Currently, the only way
|
||||||
|
+ * to do so is to use the operating system interface, or to use the
|
||||||
|
+ * functions in source3/modules/nfs4_acls.c. These seems ugly and
|
||||||
|
+ * hacky. NFSv4 ACL's should be a first class citizen and
|
||||||
|
+ * librpc/idl/smb_acl.idl should be modified accordingly.
|
||||||
|
+ */
|
||||||
|
+ return NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
set a simple ACL on a file, as a test
|
||||||
|
*/
|
||||||
|
@@ -579,7 +593,85 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
+ set a simple NFSv4 ACL on a file, as a test
|
||||||
|
+ */
|
||||||
|
+static PyObject *py_smbd_set_simple_nfsv4_acl(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
+{
|
||||||
|
+ const char * const kwnames[] = {
|
||||||
|
+ "fname",
|
||||||
|
+ "mode",
|
||||||
|
+ "session_info",
|
||||||
|
+ "gid",
|
||||||
|
+ "service",
|
||||||
|
+ NULL
|
||||||
|
+ };
|
||||||
|
+ char *fname, *service = NULL;
|
||||||
|
+ PyObject *py_session = Py_None;
|
||||||
|
+ struct auth_session_info *session_info = NULL;
|
||||||
|
+ int ret;
|
||||||
|
+ int mode, gid = -1;
|
||||||
|
+ SMB_ACL_T acl;
|
||||||
|
+ TALLOC_CTX *frame;
|
||||||
|
+ connection_struct *conn;
|
||||||
|
+
|
||||||
|
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "siO|iz",
|
||||||
|
+ discard_const_p(char *, kwnames),
|
||||||
|
+ &fname,
|
||||||
|
+ &mode,
|
||||||
|
+ &py_session,
|
||||||
|
+ &gid,
|
||||||
|
+ &service))
|
||||||
|
+ return NULL;
|
||||||
|
+
|
||||||
|
+ if (!py_check_dcerpc_type(py_session,
|
||||||
|
+ "samba.dcerpc.auth",
|
||||||
|
+ "session_info")) {
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+ session_info = pytalloc_get_type(py_session,
|
||||||
|
+ struct auth_session_info);
|
||||||
|
+ if (session_info == NULL) {
|
||||||
|
+ PyErr_Format(PyExc_TypeError,
|
||||||
|
+ "Expected auth_session_info for session_info argument got %s",
|
||||||
|
+ pytalloc_get_name(py_session));
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ frame = talloc_stackframe();
|
||||||
|
+
|
||||||
|
+ acl = make_simple_nfsv4_acl(frame, gid, mode);
|
||||||
|
+ if (acl == NULL) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ Py_RETURN_NONE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ conn = get_conn_tos(service, session_info);
|
||||||
|
+ if (!conn) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ Py_RETURN_NONE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * SMB_ACL_TYPE_ACCESS -> ACL_TYPE_ACCESS -> Not valid for NFSv4 ACL
|
||||||
|
+ */
|
||||||
|
+ ret = 0;
|
||||||
|
+
|
||||||
|
+ /* ret = set_sys_acl_conn(fname, SMB_ACL_TYPE_ACCESS, acl, conn); */
|
||||||
|
+
|
||||||
|
+ if (ret != 0) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ errno = ret;
|
||||||
|
+ return PyErr_SetFromErrno(PyExc_OSError);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+
|
||||||
|
+ Py_RETURN_NONE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
chown a file
|
||||||
|
*/
|
||||||
|
static PyObject *py_smbd_chown(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
@@ -767,7 +859,7 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObje
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
- check if we have ACL support
|
||||||
|
+ check if we have POSIX.1e ACL support
|
||||||
|
*/
|
||||||
|
static PyObject *py_smbd_have_posix_acls(PyObject *self,
|
||||||
|
PyObject *Py_UNUSED(ignored))
|
||||||
|
@@ -779,7 +871,84 @@ static PyObject *py_smbd_have_posix_acls(PyObject *sel
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+static PyObject *py_smbd_has_posix_acls(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
+{
|
||||||
|
+ const char * const kwnames[] = { "path", NULL };
|
||||||
|
+ char *path = NULL;
|
||||||
|
+ TALLOC_CTX *frame;
|
||||||
|
+ struct statfs fs;
|
||||||
|
+ int ret = false;
|
||||||
|
+
|
||||||
|
+ frame = talloc_stackframe();
|
||||||
|
+
|
||||||
|
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z",
|
||||||
|
+ discard_const_p(char *, kwnames), &path)) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (statfs(path, &fs) != 0) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (fs.f_flags & MNT_ACLS)
|
||||||
|
+ ret = true;
|
||||||
|
+
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return PyBool_FromLong(ret);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
+ check if we have NFSv4 ACL support
|
||||||
|
+ */
|
||||||
|
+static PyObject *py_smbd_have_nfsv4_acls(PyObject *self)
|
||||||
|
+{
|
||||||
|
+#ifdef HAVE_LIBSUNACL
|
||||||
|
+ return PyBool_FromLong(true);
|
||||||
|
+#else
|
||||||
|
+ return PyBool_FromLong(false);
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static PyObject *py_smbd_has_nfsv4_acls(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
+{
|
||||||
|
+ const char * const kwnames[] = { "path", NULL };
|
||||||
|
+ char *path = NULL;
|
||||||
|
+ TALLOC_CTX *frame;
|
||||||
|
+ struct statfs fs;
|
||||||
|
+ int ret = false;
|
||||||
|
+
|
||||||
|
+ frame = talloc_stackframe();
|
||||||
|
+
|
||||||
|
+ if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z",
|
||||||
|
+ discard_const_p(char *, kwnames), &path)) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (statfs(path, &fs) != 0) {
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if (fs.f_flags & MNT_NFS4ACLS)
|
||||||
|
+ ret = true;
|
||||||
|
+
|
||||||
|
+ TALLOC_FREE(frame);
|
||||||
|
+ return PyBool_FromLong(ret);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+static PyObject *py_smbd_set_nfsv4_defaults(PyObject *self)
|
||||||
|
+{
|
||||||
|
+ /*
|
||||||
|
+ * It is really be done in source3/param/loadparm.c
|
||||||
|
+ */
|
||||||
|
+ Py_RETURN_NONE;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+/*
|
||||||
|
set the NT ACL on a file
|
||||||
|
*/
|
||||||
|
static PyObject *py_smbd_set_nt_acl(PyObject *self, PyObject *args, PyObject *kwargs)
|
||||||
|
@@ -1284,8 +1453,26 @@ static PyMethodDef py_smbd_methods[] = {
|
||||||
|
{ "have_posix_acls",
|
||||||
|
(PyCFunction)py_smbd_have_posix_acls, METH_NOARGS,
|
||||||
|
NULL },
|
||||||
|
+ { "has_posix_acls",
|
||||||
|
+ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_posix_acls),
|
||||||
|
+ METH_VARARGS|METH_KEYWORDS,
|
||||||
|
+ NULL },
|
||||||
|
+ { "have_nfsv4_acls",
|
||||||
|
+ (PyCFunction)py_smbd_have_nfsv4_acls, METH_NOARGS,
|
||||||
|
+ NULL },
|
||||||
|
+ { "has_nfsv4_acls",
|
||||||
|
+ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_nfsv4_acls),
|
||||||
|
+ METH_VARARGS|METH_KEYWORDS,
|
||||||
|
+ NULL },
|
||||||
|
+ { "set_nfsv4_defaults",
|
||||||
|
+ (PyCFunction)py_smbd_set_nfsv4_defaults, METH_NOARGS,
|
||||||
|
+ NULL },
|
||||||
|
{ "set_simple_acl",
|
||||||
|
PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_acl),
|
||||||
|
+ METH_VARARGS|METH_KEYWORDS,
|
||||||
|
+ NULL },
|
||||||
|
+ { "set_simple_nfsv4_acl",
|
||||||
|
+ PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_nfsv4_acl),
|
||||||
|
METH_VARARGS|METH_KEYWORDS,
|
||||||
|
NULL },
|
||||||
|
{ "set_nt_acl",
|
||||||
11
net/samba422/files/patch-source3_winbindd_wscript__build
Normal file
11
net/samba422/files/patch-source3_winbindd_wscript__build
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- source3/winbindd/wscript_build.orig 2019-01-15 10:07:00 UTC
|
||||||
|
+++ source3/winbindd/wscript_build
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
bld.SAMBA3_LIBRARY('idmap',
|
||||||
|
source='idmap.c idmap_util.c',
|
||||||
|
- deps='samba-util pdb',
|
||||||
|
+ deps='pdb samba-modules secrets3',
|
||||||
|
allow_undefined_symbols=True,
|
||||||
|
private_library=True)
|
||||||
|
|
||||||
31
net/samba422/files/pkg-message.in
Normal file
31
net/samba422/files/pkg-message.in
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
[
|
||||||
|
{ type: install
|
||||||
|
message: <<EOM
|
||||||
|
How to start: http://wiki.samba.org/index.php/Samba4/HOWTO
|
||||||
|
|
||||||
|
* Your configuration is: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
|
||||||
|
|
||||||
|
* All the relevant databases are under: %%SAMBA4_LOCKDIR%%
|
||||||
|
|
||||||
|
* All the logs are under: %%SAMBA4_LOGDIR%%
|
||||||
|
|
||||||
|
%%AD_DC%%* Provisioning script is: %%PREFIX%%/bin/samba-tool
|
||||||
|
%%AD_DC%%
|
||||||
|
%%AD_DC%%For the working DNS updates you will need to either build dns/bind9*
|
||||||
|
%%AD_DC%%with the enabled GSSAPI(GSSAPI_MIT5 is recommended) or install
|
||||||
|
%%AD_DC%%dns/samba-nsupdate package, which is preconfigured with such a support.
|
||||||
|
%%AD_DC%%
|
||||||
|
%%AD_DC%%You will need to specify location of the 'nsupdate' command in the
|
||||||
|
%%AD_DC%%%%SAMBA4_CONFIG%% file:
|
||||||
|
%%AD_DC%%
|
||||||
|
%%AD_DC%% nsupdate command = %%PREFIX%%/bin/samba-nsupdate -g
|
||||||
|
%%AD_DC%%
|
||||||
|
%%AD_DC%%For additional documentation check: https://wiki.samba.org/index.php/User_Documentation
|
||||||
|
|
||||||
|
Port related bug reports can go to the https://gitlab.com/samba-freebsd/ports/-/issues or
|
||||||
|
to the FreeBSD Bugzilla https://bugs.freebsd.org/
|
||||||
|
|
||||||
|
All Samba related bug reports should go to the: https://bugzilla.samba.org/
|
||||||
|
EOM
|
||||||
|
}
|
||||||
|
]
|
||||||
253
net/samba422/files/samba_server.in
Normal file
253
net/samba422/files/samba_server.in
Normal file
@ -0,0 +1,253 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# PROVIDE: samba_server
|
||||||
|
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv ntpd %%SAMBA4_SERVICES%%
|
||||||
|
# BEFORE: LOGIN
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
|
||||||
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||||
|
# to enable this service:
|
||||||
|
#
|
||||||
|
#samba_server_enable=YES
|
||||||
|
#
|
||||||
|
# You can disable/enable any of the Samba daemons by specifying:
|
||||||
|
#samba_enable=NO
|
||||||
|
#nmbd_enable=NO
|
||||||
|
#smbd_enable=NO
|
||||||
|
# You need to enable winbindd separately, by adding:
|
||||||
|
#winbindd_enable=YES
|
||||||
|
# Configuration file can be set with:
|
||||||
|
#samba_server_config=%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
|
||||||
|
#
|
||||||
|
# shellcheck disable=SC2034,SC2086,SC3043
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name=samba_server
|
||||||
|
rcvar=samba_server_enable
|
||||||
|
desc="Samba4 server startup script"
|
||||||
|
|
||||||
|
# Load configuration
|
||||||
|
load_rc_config "${name}"
|
||||||
|
|
||||||
|
# Custom commands
|
||||||
|
extra_commands="reload status configtest"
|
||||||
|
|
||||||
|
start_precmd=samba_server_prestart
|
||||||
|
restart_precmd=samba_server_checkconfig
|
||||||
|
reload_precmd=samba_server_checkconfig
|
||||||
|
start_cmd=samba_server_cmd
|
||||||
|
stop_cmd=samba_server_cmd
|
||||||
|
status_cmd=samba_server_cmd
|
||||||
|
configtest_cmd=samba_server_checkconfig
|
||||||
|
reload_cmd=samba_server_reload_cmd
|
||||||
|
rcvar_cmd=samba_server_rcvar_cmd
|
||||||
|
stop_postcmd=samba_server_poststop
|
||||||
|
# Defaults
|
||||||
|
samba_server_config_default=%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
|
||||||
|
smbcontrol_command=%%PREFIX%%/bin/smbcontrol
|
||||||
|
|
||||||
|
samba_server_checkconfig()
|
||||||
|
{
|
||||||
|
printf "Performing sanity check on Samba configuration: "
|
||||||
|
if ${testparm_command} >/dev/null 2>&1; then
|
||||||
|
echo "OK"
|
||||||
|
else
|
||||||
|
echo "FAILED"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_prestart()
|
||||||
|
{
|
||||||
|
samba_server_checkconfig
|
||||||
|
# Make sure we have our RUNDIR, even if it's on a tmpfs
|
||||||
|
if [ -d "${samba_server_piddir}" ] || [ ! -e "${samba_server_piddir}" ]; then
|
||||||
|
install -d -m 0755 "${samba_server_piddir}"
|
||||||
|
fi
|
||||||
|
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200186
|
||||||
|
if [ -d "${samba_server_privatedir}" ] || [ ! -e "${samba_server_privatedir}" ]; then
|
||||||
|
install -d -m 0700 "${samba_server_privatedir}"
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
if ! df -t fdescfs -T "${samba_server_piddir}/fd" >/dev/null 2>&1; then
|
||||||
|
install -d -m 0555 "${samba_server_piddir}/fd"
|
||||||
|
if can_mount fdescfs; then
|
||||||
|
mount -t fdescfs -o nodup none "${samba_server_piddir}/fd"
|
||||||
|
else
|
||||||
|
warn "${name}: cannot fdescfs mount to ${samba_server_piddir}/fd"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_poststop()
|
||||||
|
{
|
||||||
|
if df -t fdescfs -T "${samba_server_piddir}/fd" >/dev/null 2>&1; then
|
||||||
|
if can_mount fdescfs; then
|
||||||
|
umount "${samba_server_piddir}/fd"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_rcvar_cmd()
|
||||||
|
{
|
||||||
|
local name rcvar desc
|
||||||
|
rcvar=${name}_enable
|
||||||
|
# Prevent recursive calling
|
||||||
|
unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
|
||||||
|
# Check master variable
|
||||||
|
run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
|
||||||
|
# Check dependent variables
|
||||||
|
#unset desc
|
||||||
|
for name in ${samba_daemons}; do
|
||||||
|
# reset loop vars
|
||||||
|
rcvars=''; v=''
|
||||||
|
rcvar=${name}_enable
|
||||||
|
eval "desc=\${${name}_desc}"
|
||||||
|
run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_reload_cmd()
|
||||||
|
{
|
||||||
|
local name rcvar command pidfile force_run
|
||||||
|
# Prevent recursive calling
|
||||||
|
unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
|
||||||
|
# Ignore rcvar and run command
|
||||||
|
if [ -n "${_rc_prefix}" ] && [ "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
|
||||||
|
force_run=yes
|
||||||
|
fi
|
||||||
|
# Apply to all daemons
|
||||||
|
for name in ${samba_daemons}; do
|
||||||
|
rcvar=${name}_enable
|
||||||
|
command="%%PREFIX%%/sbin/${name}"
|
||||||
|
pidfile="${samba_server_piddir}/${name}.pid"
|
||||||
|
# Daemon should be enabled and running
|
||||||
|
if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
|
||||||
|
if [ -n "$(check_pidfile "${pidfile}" "${command}")" ]; then
|
||||||
|
debug "reloading ${name} configuration"
|
||||||
|
echo "Reloading ${name}."
|
||||||
|
${smbcontrol_command} "${name}" 'reload-config' ${command_args} >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_cmd()
|
||||||
|
{
|
||||||
|
local name rcvar rcvars v command pidfile samba_daemons samba_postcmd result force_run
|
||||||
|
# Stop processes in the reverse order
|
||||||
|
if [ "${rc_arg}" = "stop" ] ; then
|
||||||
|
samba_daemons=$(reverse_list ${samba_daemons})
|
||||||
|
fi
|
||||||
|
# Within the cmd itself we operate with the global _precmd, _cmd and _postcmd
|
||||||
|
samba_postcmd=$_postcmd
|
||||||
|
# Prevent recursive calling
|
||||||
|
unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
|
||||||
|
# Ignore rcvar and run command
|
||||||
|
if [ -n "${_rc_prefix}" ] && [ "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
|
||||||
|
force_run=yes
|
||||||
|
fi
|
||||||
|
# Assume success
|
||||||
|
result=0
|
||||||
|
# Apply to all daemons
|
||||||
|
for name in ${samba_daemons}; do
|
||||||
|
# XXX
|
||||||
|
#rcvars=''; v=''
|
||||||
|
rcvar=${name}_enable
|
||||||
|
command="%%PREFIX%%/sbin/${name}"
|
||||||
|
pidfile="${samba_server_piddir}/${name}.pid"
|
||||||
|
# Daemon should be enabled and running
|
||||||
|
if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
|
||||||
|
run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
|
||||||
|
# If any of the commands failed, take it as a global result
|
||||||
|
result=$((result || $?))
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "${samba_postcmd}" ]; then
|
||||||
|
eval "_postcmd=${samba_postcmd}"
|
||||||
|
fi
|
||||||
|
return $result
|
||||||
|
}
|
||||||
|
|
||||||
|
samba_server_config_init()
|
||||||
|
{
|
||||||
|
local name
|
||||||
|
# Defaults
|
||||||
|
samba_server_enable=${samba_server_enable:=NO}
|
||||||
|
samba_server_config=${samba_server_config=${samba_server_config_default}}
|
||||||
|
samba_server_configfile_arg=${samba_server_config:+--configfile="${samba_server_config}"} #"
|
||||||
|
#testparm_command="%%PREFIX%%/bin/samba-tool testparm --suppress-prompt --verbose ${samba_server_configfile_arg}"
|
||||||
|
testparm_command="%%PREFIX%%/bin/testparm --suppress-prompt --verbose ${samba_server_config}"
|
||||||
|
# Determine what daemons are necessary to run Samba in the current role
|
||||||
|
samba_server_role=$(${testparm_command} --parameter-name='server role' 2>/dev/null)
|
||||||
|
case "${samba_server_role}" in
|
||||||
|
active\ directory\ domain\ controller)
|
||||||
|
samba_daemons="samba"
|
||||||
|
;;
|
||||||
|
auto|*)
|
||||||
|
samba_daemons="nmbd smbd winbindd"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
# Load daemons configuration
|
||||||
|
for name in ${samba_daemons}; do
|
||||||
|
load_rc_config "${name}"
|
||||||
|
# If samba_server_enable is 'YES'
|
||||||
|
if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
|
||||||
|
if [ "${name}" != "winbindd" ]; then
|
||||||
|
# Set variable to 'YES' only if it is unset
|
||||||
|
eval "${name}_enable=\${${name}_enable-YES}"
|
||||||
|
else
|
||||||
|
# Winbindd
|
||||||
|
samba_server_idmap=$(${testparm_command} --parameter-name='idmap uid' 2>/dev/null)
|
||||||
|
if [ -n "${samba_server_idmap}" ]; then
|
||||||
|
winbindd_enable="YES"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# If variable is empty, set it to 'NO'
|
||||||
|
eval "${name}_enable=\${${name}_enable:-NO}"
|
||||||
|
done
|
||||||
|
# Fetch parameters from configuration file
|
||||||
|
samba_server_lockdir="$(${testparm_command} --parameter-name='lock directory' 2>/dev/null)"
|
||||||
|
samba_server_lockdir=${samba_server_lockdir:=%%SAMBA4_LOCKDIR%%}
|
||||||
|
samba_server_piddir="$(${testparm_command} --parameter-name='pid directory' 2>/dev/null)"
|
||||||
|
samba_server_piddir=${samba_server_piddir:=%%SAMBA4_RUNDIR%%}
|
||||||
|
samba_server_privatedir="$(${testparm_command} --parameter-name='private dir' 2>/dev/null)"
|
||||||
|
samba_server_privatedir=${samba_server_privatedir:=%%SAMBA4_PRIVATEDIR%%}
|
||||||
|
}
|
||||||
|
|
||||||
|
can_mount()
|
||||||
|
{
|
||||||
|
local kld
|
||||||
|
kld=$1
|
||||||
|
if ! load_kld $kld; then
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
if [ $(${SYSCTL_N} security.jail.jailed) -eq 0 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
if [ $(${SYSCTL_N} security.jail.mount_allowed) -eq 1 ] &&
|
||||||
|
[ $(${SYSCTL_N} security.jail.mount_${kld}_allowed) -eq 1 ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Load configuration variables
|
||||||
|
samba_server_config_init
|
||||||
|
nmbd_desc="NetBIOS name server"
|
||||||
|
smbd_desc="SMB/CIFS services server"
|
||||||
|
winbindd_desc="Name Service Switch server"
|
||||||
|
# Common flags
|
||||||
|
command_args=${samba_server_configfile_arg}
|
||||||
|
samba_flags=${samba_flags="--daemon"}
|
||||||
|
nmbd_flags=${nmbd_flags="--daemon"}
|
||||||
|
smbd_flags=${smbd_flags="--daemon"}
|
||||||
|
winbindd_flags=${winbindd_flags="--daemon"}
|
||||||
|
# Requirements
|
||||||
|
required_files="${samba_server_config}"
|
||||||
|
required_dirs="${samba_server_lockdir}"
|
||||||
|
|
||||||
|
run_rc_command "$1"
|
||||||
6
net/samba422/pkg-descr
Normal file
6
net/samba422/pkg-descr
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
Samba4 is an attempt to implement an Active Directory compatible Domain
|
||||||
|
Controller.
|
||||||
|
|
||||||
|
In short, you can join a WinNT, Win2000, WinXP or Win 2003 - 2016 member
|
||||||
|
server to a Samba4 domain, and it will behave much as it does in AD,
|
||||||
|
including Kerberos domain logins where applicable.
|
||||||
485
net/samba422/pkg-plist
Normal file
485
net/samba422/pkg-plist
Normal file
@ -0,0 +1,485 @@
|
|||||||
|
bin/cifsdd
|
||||||
|
bin/dbwrap_tool
|
||||||
|
bin/dumpmscat
|
||||||
|
bin/gentest
|
||||||
|
bin/locktest
|
||||||
|
bin/masktest
|
||||||
|
bin/mdsearch
|
||||||
|
bin/mvxattr
|
||||||
|
bin/ndrdump
|
||||||
|
bin/net
|
||||||
|
bin/nmblookup
|
||||||
|
bin/ntlm_auth
|
||||||
|
bin/oLschema2ldif
|
||||||
|
bin/pdbedit
|
||||||
|
bin/profiles
|
||||||
|
bin/regdiff
|
||||||
|
bin/regpatch
|
||||||
|
bin/regshell
|
||||||
|
bin/regtree
|
||||||
|
bin/rpcclient
|
||||||
|
bin/samba-log-parser
|
||||||
|
bin/samba-regedit
|
||||||
|
%%ADS%%bin/samba-tool
|
||||||
|
bin/sharesec
|
||||||
|
bin/smbcacls
|
||||||
|
bin/smbclient
|
||||||
|
bin/smbcontrol
|
||||||
|
bin/smbcquotas
|
||||||
|
bin/smbget
|
||||||
|
bin/smbpasswd
|
||||||
|
bin/smbspool
|
||||||
|
bin/smbstatus
|
||||||
|
bin/smbtar
|
||||||
|
bin/smbtree
|
||||||
|
bin/testparm
|
||||||
|
bin/vfstest
|
||||||
|
bin/wbinfo
|
||||||
|
bin/wspsearch
|
||||||
|
sbin/eventlogadm
|
||||||
|
sbin/nmbd
|
||||||
|
sbin/smbd
|
||||||
|
sbin/winbindd
|
||||||
|
include/samba4/credentials.h
|
||||||
|
include/samba4/dcerpc.h
|
||||||
|
include/samba4/dcerpc_server.h
|
||||||
|
include/samba4/gen_ndr/ndr_samr_c.h
|
||||||
|
include/samba4/ldb.h
|
||||||
|
include/samba4/ldb_errors.h
|
||||||
|
include/samba4/ldb_handlers.h
|
||||||
|
include/samba4/ldb_module.h
|
||||||
|
include/samba4/ldb_version.h
|
||||||
|
include/samba4/param.h
|
||||||
|
include/samba4/policy.h
|
||||||
|
include/samba4/util/tevent_ntstatus.h
|
||||||
|
include/samba4/util/tevent_unix.h
|
||||||
|
include/samba4/util/tevent_werror.h
|
||||||
|
include/samba4/charset.h
|
||||||
|
include/samba4/core/doserr.h
|
||||||
|
include/samba4/core/error.h
|
||||||
|
include/samba4/core/hresult.h
|
||||||
|
include/samba4/core/ntstatus_gen.h
|
||||||
|
include/samba4/core/ntstatus.h
|
||||||
|
include/samba4/core/werror_gen.h
|
||||||
|
include/samba4/core/werror.h
|
||||||
|
%%LDAP%%include/samba4/smb_ldap.h
|
||||||
|
%%LDAP%%include/samba4/smbldap.h
|
||||||
|
include/samba4/dcesrv_core.h
|
||||||
|
include/samba4/domain_credentials.h
|
||||||
|
include/samba4/gen_ndr/atsvc.h
|
||||||
|
include/samba4/gen_ndr/auth.h
|
||||||
|
include/samba4/gen_ndr/claims.h
|
||||||
|
include/samba4/gen_ndr/dcerpc.h
|
||||||
|
include/samba4/gen_ndr/drsblobs.h
|
||||||
|
include/samba4/gen_ndr/drsuapi.h
|
||||||
|
include/samba4/gen_ndr/krb5pac.h
|
||||||
|
include/samba4/gen_ndr/lsa.h
|
||||||
|
include/samba4/gen_ndr/misc.h
|
||||||
|
include/samba4/gen_ndr/nbt.h
|
||||||
|
include/samba4/gen_ndr/ndr_atsvc.h
|
||||||
|
include/samba4/gen_ndr/ndr_dcerpc.h
|
||||||
|
include/samba4/gen_ndr/ndr_drsblobs.h
|
||||||
|
include/samba4/gen_ndr/ndr_drsuapi.h
|
||||||
|
include/samba4/gen_ndr/ndr_krb5pac.h
|
||||||
|
include/samba4/gen_ndr/ndr_misc.h
|
||||||
|
include/samba4/gen_ndr/ndr_nbt.h
|
||||||
|
include/samba4/gen_ndr/ndr_samr.h
|
||||||
|
include/samba4/gen_ndr/ndr_svcctl_c.h
|
||||||
|
include/samba4/gen_ndr/ndr_svcctl.h
|
||||||
|
include/samba4/gen_ndr/netlogon.h
|
||||||
|
include/samba4/gen_ndr/samr.h
|
||||||
|
include/samba4/gen_ndr/security.h
|
||||||
|
include/samba4/gen_ndr/server_id.h
|
||||||
|
include/samba4/gen_ndr/svcctl.h
|
||||||
|
include/samba4/ldb_wrap.h
|
||||||
|
include/samba4/libsmbclient.h
|
||||||
|
include/samba4/lookup_sid.h
|
||||||
|
include/samba4/machine_sid.h
|
||||||
|
include/samba4/ndr.h
|
||||||
|
include/samba4/ndr/ndr_dcerpc.h
|
||||||
|
include/samba4/ndr/ndr_drsblobs.h
|
||||||
|
include/samba4/ndr/ndr_drsuapi.h
|
||||||
|
include/samba4/ndr/ndr_krb5pac.h
|
||||||
|
include/samba4/ndr/ndr_nbt.h
|
||||||
|
include/samba4/ndr/ndr_svcctl.h
|
||||||
|
include/samba4/netapi.h
|
||||||
|
include/samba4/passdb.h
|
||||||
|
include/samba4/rpc_common.h
|
||||||
|
include/samba4/samba/session.h
|
||||||
|
include/samba4/samba/version.h
|
||||||
|
include/samba4/share.h
|
||||||
|
include/samba4/smb2_lease_struct.h
|
||||||
|
include/samba4/smb3posix.h
|
||||||
|
include/samba4/smbconf.h
|
||||||
|
include/samba4/tdr.h
|
||||||
|
include/samba4/tsocket_internal.h
|
||||||
|
include/samba4/tsocket.h
|
||||||
|
include/samba4/util_ldb.h
|
||||||
|
include/samba4/util/attr.h
|
||||||
|
include/samba4/util/blocking.h
|
||||||
|
include/samba4/util/data_blob.h
|
||||||
|
include/samba4/util/debug.h
|
||||||
|
include/samba4/util/discard.h
|
||||||
|
include/samba4/util/fault.h
|
||||||
|
include/samba4/util/genrand.h
|
||||||
|
include/samba4/util/idtree_random.h
|
||||||
|
include/samba4/util/idtree.h
|
||||||
|
include/samba4/util/signal.h
|
||||||
|
include/samba4/util/substitute.h
|
||||||
|
include/samba4/util/tfork.h
|
||||||
|
include/samba4/util/time.h
|
||||||
|
include/samba4/wbclient.h
|
||||||
|
@dir include/samba4/util
|
||||||
|
@dir include/samba4/samba
|
||||||
|
@dir include/samba4/ndr
|
||||||
|
@dir include/samba4/gen_ndr
|
||||||
|
@dir include/samba4/core
|
||||||
|
@dir include/samba4
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-samr.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-samr.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-server.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-server.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libldb.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libldb.so.2
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-credentials.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-credentials.so.1
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-hostconfig.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-hostconfig.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-policy.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-policy.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamdb.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamdb.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libtevent-util.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libtevent-util.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-binding.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-binding.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-server-core.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libdcerpc-server-core.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-krb5pac.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-krb5pac.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-nbt.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-nbt.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-standard.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr-standard.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libndr.so.6
|
||||||
|
%%SAMBA4_LIBDIR%%/libnetapi.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libnetapi.so.1
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-errors.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-errors.so.1
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-passdb.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-passdb.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-util.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsamba-util.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libsmbclient.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsmbclient.so.0
|
||||||
|
%%SAMBA4_LIBDIR%%/libsmbconf.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libsmbconf.so.0
|
||||||
|
%%LDAP%%%%SAMBA4_LIBDIR%%/libsmbldap.so
|
||||||
|
%%LDAP%%%%SAMBA4_LIBDIR%%/libsmbldap.so.2
|
||||||
|
%%SAMBA4_LIBDIR%%/libwbclient.so
|
||||||
|
%%SAMBA4_LIBDIR%%/libwbclient.so.0
|
||||||
|
lib/nss_winbind.so.1
|
||||||
|
lib/nss_wins.so.1
|
||||||
|
lib/pam_winbind.so
|
||||||
|
%%CUPS%%libexec/samba/smbspool_krb5_wrapper
|
||||||
|
libexec/samba/rpcd_classic
|
||||||
|
libexec/samba/rpcd_epmapper
|
||||||
|
libexec/samba/rpcd_fsrvp
|
||||||
|
libexec/samba/rpcd_lsad
|
||||||
|
libexec/samba/rpcd_mdssvc
|
||||||
|
libexec/samba/rpcd_spoolss
|
||||||
|
libexec/samba/rpcd_winreg
|
||||||
|
libexec/samba/samba-bgqd
|
||||||
|
libexec/samba/samba-dcerpcd
|
||||||
|
%%LDAP%%%%SAMBA4_LIBDIR%%/private/libsmbldaphelper-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libaddns-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libads-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libasn1-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libasn1util-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libauth-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libauth-unix-token-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libauth4-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libauthkrb5-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libCHARSET3-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-cldap-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-ldap-common-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-ldap-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-nbt-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-smb-common-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcli-spoolss-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcliauth-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libclidns-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcluster-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcmdline-contexts-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcmdline-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libcom-err-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libcommon-auth-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdbwrap-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libutil-crypt-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdcerpc-pkt-auth-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdcerpc-samba-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdcerpc-samba4-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdnsserver-common-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdsdb-module-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libevents-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libflag-mapping-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libgenrand-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libgensec-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libgpext-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libgpo-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libgse-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libgss-preauth-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libgssapi-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhcrypto-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhdb-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libheimbase-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libheimntlm-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libhttp-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhx509-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libidmap-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libinterfaces-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libiov-buf-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libkdc-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libkrb5-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libkrb5samba-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libldbsamba-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/liblibcli-lsa3-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/liblibcli-netlogon3-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/liblibsmb-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libLIBWBCLIENT-OLD-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libmessages-dgm-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libmessages-util-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libMESSAGING-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libMESSAGING-SEND-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libmscat-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libmsghdr-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libmsrpc3-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libndr-samba-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libndr-samba4-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libnet-keytab-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libnetif-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libnpa-tstream-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libnss-info-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libposix-eadb-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libprinter-driver-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libprinting-migrate-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libREG-FULL-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libregistry-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libreplace-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libroken-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libRPC-SERVER-LOOP-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libRPC-WORKER-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamdb-common-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsecrets3-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libserver-id-db-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libserver-role-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libshares-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsmb-transport-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsmbclient-raw-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsmbd-base-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsmbd-shim-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsmbpasswdparser-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsocket-blocking-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libstable-sort-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsys-rw-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libtalloc-report-printf-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libtalloc-report-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libtdb-wrap-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libtime-basic-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libtorture-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libutil-reg-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libutil-setid-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libutil-tdb-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libwind-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libxattr-tdb-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-cluster-support-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-debug-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-modules-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-net-join%%PYTHON_TAG%%-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-net-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-security-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba-sockets-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libsamba3-util-private-samba.so
|
||||||
|
@dir %%SAMBA4_LIBDIR%%/private
|
||||||
|
@dir %%SAMBA4_LIBDIR%%
|
||||||
|
%%PKGCONFIGDIR%%/ndr.pc
|
||||||
|
%%PKGCONFIGDIR%%/ndr_krb5pac.pc
|
||||||
|
%%PKGCONFIGDIR%%/ndr_nbt.pc
|
||||||
|
%%PKGCONFIGDIR%%/ndr_standard.pc
|
||||||
|
%%PKGCONFIGDIR%%/netapi.pc
|
||||||
|
%%PKGCONFIGDIR%%/samba-util.pc
|
||||||
|
%%PKGCONFIGDIR%%/smbclient.pc
|
||||||
|
%%PKGCONFIGDIR%%/wbclient.pc
|
||||||
|
%%PKGCONFIGDIR%%/dcerpc.pc
|
||||||
|
%%PKGCONFIGDIR%%/dcerpc_samr.pc
|
||||||
|
%%PKGCONFIGDIR%%/dcerpc_server.pc
|
||||||
|
%%PKGCONFIGDIR%%/ldb.pc
|
||||||
|
%%PKGCONFIGDIR%%/samba-credentials.pc
|
||||||
|
%%PKGCONFIGDIR%%/samba-hostconfig.pc
|
||||||
|
%%PKGCONFIGDIR%%/samba-policy.pc
|
||||||
|
%%PKGCONFIGDIR%%/samdb.pc
|
||||||
|
@comment Setup files
|
||||||
|
@comment Man pages
|
||||||
|
%%MANPAGES%%share/man/man1/dbwrap_tool.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/gentest.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/locktest.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/log2pcap.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/masktest.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/mdsearch.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/mvxattr.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ndrdump.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/nmblookup.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ntlm_auth.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/oLschema2ldif.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/profiles.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/regdiff.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/regpatch.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/regshell.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/regtree.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/rpcclient.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/samba-log-parser.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/sharesec.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbcacls.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbclient.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbcontrol.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbcquotas.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbget.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbstatus.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbtar.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/smbtree.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/testparm.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/wbinfo.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/wspsearch.1.gz
|
||||||
|
%%MANPAGES%%share/man/man5/lmhosts.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/pam_winbind.conf.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/smb.conf.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/smb4.conf.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/smbpasswd.5.gz
|
||||||
|
%%MANPAGES%%share/man/man7/libsmbclient.7.gz
|
||||||
|
%%MANPAGES%%share/man/man7/samba.7.gz
|
||||||
|
%%MANPAGES%%share/man/man7/traffic_learner.7.gz
|
||||||
|
%%MANPAGES%%share/man/man7/traffic_replay.7.gz
|
||||||
|
%%MANPAGES%%share/man/man8/cifsdd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/eventlogadm.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_ad.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_autorid.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_hash.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_ldap.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_nss.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_rfc2307.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_rid.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_script.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_tdb.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/idmap_tdb2.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/net.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/nmbd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/pam_winbind.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/pdbedit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba-bgqd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba-dcerpcd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba-regedit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba-tool.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba_downgrade_db.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/smbd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/smbpasswd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/smbspool.8.gz
|
||||||
|
%%MANPAGES%%%%CUPS%%share/man/man8/smbspool_krb5_wrapper.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_acl_tdb.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_acl_xattr.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_aio_fork.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_aio_pthread.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_audit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_cacheprime.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_cap.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_catia.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_commit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_crossrename.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_default_quota.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_dirsort.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_expand_msdfs.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_extd_audit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_fake_perms.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_freebsd.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_full_audit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_linux_xfs_sgid.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_media_harmony.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_offline.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_preopen.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_readahead.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_readonly.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_recycle.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_shadow_copy.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_shadow_copy2.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_shell_snap.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_streams_depot.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_streams_xattr.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_syncops.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_time_audit.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_unityed_media.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_virusfilter.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_widelinks.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_worm.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_xattr_tdb.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/vfs_zfsacl.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/winbind_krb5_locator.8.gz
|
||||||
|
%%MANPAGES%%share/man/man8/winbindd.8.gz
|
||||||
|
@dir %%SAMBA4_RUNDIR%%
|
||||||
|
@dir %%SAMBA4_LOGDIR%%
|
||||||
|
@dir %%SAMBA4_LOCKDIR%%
|
||||||
|
@dir %%SAMBA4_PRIVATEDIR%%
|
||||||
|
@dir %%SAMBA4_BINDDNSDIR%%
|
||||||
|
@comment Use bundled libraries
|
||||||
|
%%SAMBA4_BUNDLED_CMOCKA%%%%SAMBA4_LIBDIR%%/private/libcmocka-private-samba.so
|
||||||
|
%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_ldb_text.py
|
||||||
|
%%PYTHON3%%%%PYTHON_SITELIBDIR%%/ldb%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON3%%%%SAMBA4_LIBDIR%%/private/libpyldb-util%%PYTHON_TAG%%-private-samba.so
|
||||||
|
bin/ldbadd
|
||||||
|
bin/ldbdel
|
||||||
|
bin/ldbedit
|
||||||
|
bin/ldbmodify
|
||||||
|
bin/ldbrename
|
||||||
|
bin/ldbsearch
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libldb-cmdline-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libldb-key-value-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libldb-tdb-err-map-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libldb-tdb-int-private-samba.so
|
||||||
|
%%AD_DC%%%%SAMBA4_MODULEDIR%%/ldb/count_attrs.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/asq.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/ildap.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/ldb.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/ldbsamba_extensions.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/paged_searches.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/rdn_name.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/sample.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/server_sort.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/skel.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/tdb.so
|
||||||
|
%%MANPAGES%%share/man/man3/ldb.3.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbadd.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbdel.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbedit.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbmodify.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbrename.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ldbsearch.1.gz
|
||||||
|
%%MANPAGES%%%%SAMBA4_BUNDLED_TDB%%share/man/man8/tdbbackup.8.gz
|
||||||
|
%%MANPAGES%%%%SAMBA4_BUNDLED_TDB%%share/man/man8/tdbdump.8.gz
|
||||||
|
%%MANPAGES%%%%SAMBA4_BUNDLED_TDB%%share/man/man8/tdbrestore.8.gz
|
||||||
|
%%MANPAGES%%%%SAMBA4_BUNDLED_TDB%%share/man/man8/tdbtool.8.gz
|
||||||
|
%%SAMBA4_BUNDLED_TALLOC%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/talloc%%PYTHON_TAG%%.so
|
||||||
|
%%SAMBA4_BUNDLED_TALLOC%%%%PYTHON3%%%%SAMBA4_LIBDIR%%/private/libpytalloc-util%%PYTHON_TAG%%-private-samba.so
|
||||||
|
%%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_LIBDIR%%/private/libtalloc-private-samba.so
|
||||||
|
%%SAMBA4_BUNDLED_TALLOC%%share/man/man3/samba-talloc.3.gz
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_tdb_text.py
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/tdb%%PYTHON_TAG%%.so
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%bin/tdbbackup
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%bin/tdbdump
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%bin/tdbrestore
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%bin/tdbtool
|
||||||
|
%%SAMBA4_BUNDLED_TDB%%%%SAMBA4_LIBDIR%%/private/libtdb-private-samba.so
|
||||||
|
%%SAMBA4_BUNDLED_TEVENT%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_tevent%%PYTHON_TAG%%.so
|
||||||
|
%%SAMBA4_BUNDLED_TEVENT%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/tevent.py
|
||||||
|
%%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_LIBDIR%%/private/libtevent-private-samba.so
|
||||||
177
net/samba422/pkg-plist.ad_dc
Normal file
177
net/samba422/pkg-plist.ad_dc
Normal file
@ -0,0 +1,177 @@
|
|||||||
|
sbin/samba_downgrade_db
|
||||||
|
sbin/samba
|
||||||
|
sbin/samba_dnsupdate
|
||||||
|
sbin/samba_kcc
|
||||||
|
sbin/samba_spnupdate
|
||||||
|
sbin/samba_upgradedns
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libad-claims-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libauthn-policy-util-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdlz-bind9-for-torture-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libprocess-model-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libservice-private-samba.so
|
||||||
|
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libHDB-SAMBA4-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdb-glue-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdfs-server-ad-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libdsdb-garbage-collect-tombstones-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libpac-private-samba.so
|
||||||
|
%%SAMBA4_LIBDIR%%/private/libscavenge-dns-records-private-samba.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_10.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_11.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_12.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_14.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_16.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_18.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_20.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/gensec/krb5.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/acl.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/aclread.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/anr.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/audit_log.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/descriptor.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/dirsync.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/dns_notify.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/dsdb_notification.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/encrypted_secrets.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_in.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_out.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_store.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/group_audit_log.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/instancetype.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/lazy_commit.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/ldap.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/linked_attributes.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/new_partition.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/objectclass_attrs.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/objectclass.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/objectguid.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/operational.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/paged_results.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/partition.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/password_hash.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/ranged_results.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/repl_meta_data.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/resolve_oids.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/rootdse.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/samba_dsdb.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/samba_secrets.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/samba3sam.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/samba3sid.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/samldb.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/schema_data.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/schema_load.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/secrets_tdb_sync.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/show_deleted.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/subtree_delete.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/subtree_rename.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/tombstone_reanimate.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/unique_object_sids.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/update_keytab.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/vlv.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/ldb/wins_ldb.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/process_model/prefork.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/process_model/standard.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/cldap.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/dcerpc.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/dns_update.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/dns.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/drepl.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/kcc.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/kdc.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/ldap.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/nbtd.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/ntp_signd.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/s3fs.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/winbindd.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/service/wrepl.so
|
||||||
|
%%SAMBA4_MODULEDIR%%/vfs/posix_eadb.so
|
||||||
|
%%DATADIR%%/samba/admx/GNOME_Settings.admx
|
||||||
|
%%DATADIR%%/samba/admx/en-US/GNOME_Settings.adml
|
||||||
|
%%DATADIR%%/samba/admx/en-US/samba.adml
|
||||||
|
%%DATADIR%%/samba/admx/ru-RU/GNOME_Settings.adml
|
||||||
|
%%DATADIR%%/samba/admx/samba.admx
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes_Windows_Server_v1903.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes__Windows_Server_2012_R2.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes__Windows_Server_2016.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes__Windows_Server_v1803.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Classes_Windows_Server_v1903.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Classes__Windows_Server_2012_R2.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Classes__Windows_Server_2016.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/AD_DS_Classes__Windows_Server_v1803.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/Attributes_for_AD_DS__Windows_Server_2008_R2.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/Attributes_for_AD_DS__Windows_Server_2012.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/Classes_for_AD_DS__Windows_Server_2008_R2.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/Classes_for_AD_DS__Windows_Server_2012.ldf
|
||||||
|
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_Attributes.txt
|
||||||
|
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_Classes.txt
|
||||||
|
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt
|
||||||
|
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_R2_Classes.txt
|
||||||
|
%%DATADIR%%/setup/ad-schema/licence.txt
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Forest-Wide-Updates.md
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch49.ldf.diff
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch50.ldf.diff
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch51.ldf.diff
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch57.ldf.diff
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch59.ldf.diff
|
||||||
|
%%DATADIR%%/setup/adprep/WindowsServerDocs/Schema-Updates.md
|
||||||
|
%%DATADIR%%/setup/adprep/fix-forest-rev.ldf
|
||||||
|
%%DATADIR%%/setup/aggregate_schema.ldif
|
||||||
|
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k0.txt
|
||||||
|
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k3.txt
|
||||||
|
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k3R2.txt
|
||||||
|
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k8.txt
|
||||||
|
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k8R2.txt
|
||||||
|
%%DATADIR%%/setup/dns_update_list
|
||||||
|
%%DATADIR%%/setup/extended-rights.ldif
|
||||||
|
%%DATADIR%%/setup/idmap_init.ldif
|
||||||
|
%%DATADIR%%/setup/krb5.conf
|
||||||
|
%%DATADIR%%/setup/named.conf
|
||||||
|
%%DATADIR%%/setup/named.conf.dlz
|
||||||
|
%%DATADIR%%/setup/named.conf.update
|
||||||
|
%%DATADIR%%/setup/named.txt
|
||||||
|
%%DATADIR%%/setup/prefixMap.txt
|
||||||
|
%%DATADIR%%/setup/provision.ldif
|
||||||
|
%%DATADIR%%/setup/provision.reg
|
||||||
|
%%DATADIR%%/setup/provision.zone
|
||||||
|
%%DATADIR%%/setup/provision_basedn.ldif
|
||||||
|
%%DATADIR%%/setup/provision_basedn_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_basedn_options.ldif
|
||||||
|
%%DATADIR%%/setup/provision_basedn_references.ldif
|
||||||
|
%%DATADIR%%/setup/provision_computers_add.ldif
|
||||||
|
%%DATADIR%%/setup/provision_computers_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_configuration.ldif
|
||||||
|
%%DATADIR%%/setup/provision_configuration_basedn.ldif
|
||||||
|
%%DATADIR%%/setup/provision_configuration_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_configuration_references.ldif
|
||||||
|
%%DATADIR%%/setup/provision_dns_accounts_add.ldif
|
||||||
|
%%DATADIR%%/setup/provision_dns_add_samba.ldif
|
||||||
|
%%DATADIR%%/setup/provision_dnszones_add.ldif
|
||||||
|
%%DATADIR%%/setup/provision_dnszones_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_dnszones_partitions.ldif
|
||||||
|
%%DATADIR%%/setup/provision_group_policy.ldif
|
||||||
|
%%DATADIR%%/setup/provision_init.ldif
|
||||||
|
%%DATADIR%%/setup/provision_partitions.ldif
|
||||||
|
%%DATADIR%%/setup/provision_privilege.ldif
|
||||||
|
%%DATADIR%%/setup/provision_rootdse_add.ldif
|
||||||
|
%%DATADIR%%/setup/provision_rootdse_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_schema_basedn.ldif
|
||||||
|
%%DATADIR%%/setup/provision_schema_basedn_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_self_join.ldif
|
||||||
|
%%DATADIR%%/setup/provision_self_join_config.ldif
|
||||||
|
%%DATADIR%%/setup/provision_self_join_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_self_join_modify_config.ldif
|
||||||
|
%%DATADIR%%/setup/provision_self_join_modify_schema.ldif
|
||||||
|
%%DATADIR%%/setup/provision_users.ldif
|
||||||
|
%%DATADIR%%/setup/provision_users_add.ldif
|
||||||
|
%%DATADIR%%/setup/provision_users_modify.ldif
|
||||||
|
%%DATADIR%%/setup/provision_well_known_sec_princ.ldif
|
||||||
|
%%DATADIR%%/setup/schema_samba4.ldif
|
||||||
|
%%DATADIR%%/setup/secrets.ldif
|
||||||
|
%%DATADIR%%/setup/secrets_dns.ldif
|
||||||
|
%%DATADIR%%/setup/secrets_init.ldif
|
||||||
|
%%DATADIR%%/setup/share.ldif
|
||||||
|
%%DATADIR%%/setup/spn_update_list
|
||||||
|
%%DATADIR%%/setup/ypServ30.ldif
|
||||||
|
@dir %%DATADIR%%/setup/display-specifiers
|
||||||
|
@dir %%DATADIR%%/setup/ad-schema
|
||||||
|
@dir %%DATADIR%%/setup
|
||||||
|
@dir %%DATADIR%%
|
||||||
76
net/samba422/pkg-plist.cluster
Normal file
76
net/samba422/pkg-plist.cluster
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
@comment Cluster
|
||||||
|
bin/ctdb
|
||||||
|
bin/ctdb_diagnostics
|
||||||
|
bin/ltdbtool
|
||||||
|
bin/onnode
|
||||||
|
bin/ping_pong
|
||||||
|
etc/ctdb/ctdb-crash-cleanup.sh
|
||||||
|
etc/ctdb/debug_locks.sh
|
||||||
|
etc/ctdb/debug-hung-script.sh
|
||||||
|
etc/ctdb/events/legacy/00.ctdb.script
|
||||||
|
etc/ctdb/events/legacy/01.reclock.script
|
||||||
|
etc/ctdb/events/legacy/05.system.script
|
||||||
|
etc/ctdb/events/legacy/10.interface.script
|
||||||
|
etc/ctdb/events/notification/README
|
||||||
|
etc/ctdb/functions
|
||||||
|
etc/ctdb/nfs-checks.d/00.portmapper.check
|
||||||
|
etc/ctdb/nfs-checks.d/10.status.check
|
||||||
|
etc/ctdb/nfs-checks.d/20.nfs.check
|
||||||
|
etc/ctdb/nfs-checks.d/30.nlockmgr.check
|
||||||
|
etc/ctdb/nfs-checks.d/40.mountd.check
|
||||||
|
etc/ctdb/nfs-checks.d/50.rquotad.check
|
||||||
|
etc/ctdb/nfs-checks.d/README
|
||||||
|
etc/ctdb/nfs-linux-kernel-callout
|
||||||
|
etc/ctdb/notify.sh
|
||||||
|
etc/ctdb/statd-callout
|
||||||
|
etc/sudoers.d/ctdb
|
||||||
|
lib/samba4/private/libctdb-event-client-private-samba.so
|
||||||
|
libexec/ctdb/ctdb_killtcp
|
||||||
|
libexec/ctdb/ctdb_lock_helper
|
||||||
|
libexec/ctdb/ctdb_lvs
|
||||||
|
libexec/ctdb/ctdb_mutex_fcntl_helper
|
||||||
|
libexec/ctdb/ctdb_natgw
|
||||||
|
libexec/ctdb/ctdb_recovery_helper
|
||||||
|
libexec/ctdb/ctdb_takeover_helper
|
||||||
|
libexec/ctdb/ctdb-config
|
||||||
|
libexec/ctdb/ctdb-event
|
||||||
|
libexec/ctdb/ctdb-eventd
|
||||||
|
libexec/ctdb/ctdb-path
|
||||||
|
libexec/ctdb/smnotify
|
||||||
|
%%MANPAGES%%share/man/man1/ctdb_diagnostics.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ctdb.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ctdbd.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ltdbtool.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/onnode.1.gz
|
||||||
|
%%MANPAGES%%share/man/man1/ping_pong.1.gz
|
||||||
|
%%MANPAGES%%share/man/man5/ctdb-script.options.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/ctdb.conf.5.gz
|
||||||
|
%%MANPAGES%%share/man/man5/ctdb.sysconfig.5.gz
|
||||||
|
%%MANPAGES%%share/man/man7/ctdb-statistics.7.gz
|
||||||
|
%%MANPAGES%%share/man/man7/ctdb-tunables.7.gz
|
||||||
|
%%MANPAGES%%share/man/man7/ctdb.7.gz
|
||||||
|
sbin/ctdbd
|
||||||
|
share/ctdb/events/legacy/00.ctdb.script
|
||||||
|
share/ctdb/events/legacy/01.reclock.script
|
||||||
|
share/ctdb/events/legacy/05.system.script
|
||||||
|
share/ctdb/events/legacy/06.nfs.script
|
||||||
|
share/ctdb/events/legacy/10.interface.script
|
||||||
|
share/ctdb/events/legacy/11.natgw.script
|
||||||
|
share/ctdb/events/legacy/11.routing.script
|
||||||
|
share/ctdb/events/legacy/13.per_ip_routing.script
|
||||||
|
share/ctdb/events/legacy/20.multipathd.script
|
||||||
|
share/ctdb/events/legacy/31.clamd.script
|
||||||
|
share/ctdb/events/legacy/40.vsftpd.script
|
||||||
|
share/ctdb/events/legacy/41.httpd.script
|
||||||
|
share/ctdb/events/legacy/48.netbios.script
|
||||||
|
share/ctdb/events/legacy/49.winbind.script
|
||||||
|
share/ctdb/events/legacy/50.samba.script
|
||||||
|
share/ctdb/events/legacy/60.nfs.script
|
||||||
|
share/ctdb/events/legacy/70.iscsi.script
|
||||||
|
share/ctdb/events/legacy/91.lvs.script
|
||||||
|
@dir /var/lib/ctdb/volatile
|
||||||
|
@dir /var/lib/ctdb/state
|
||||||
|
@dir /var/lib/ctdb/persistent
|
||||||
|
@dir /var/lib/ctdb
|
||||||
|
@dir /var/lib
|
||||||
|
@dir /var/run/ctdb
|
||||||
595
net/samba422/pkg-plist.python
Normal file
595
net/samba422/pkg-plist.python
Normal file
@ -0,0 +1,595 @@
|
|||||||
|
bin/smbtorture
|
||||||
|
sbin/samba-gpupdate
|
||||||
|
%%MANPAGES%%share/man/man1/smbtorture.1.gz
|
||||||
|
%%MANPAGES%%share/man/man8/samba-gpupdate.8.gz
|
||||||
|
lib/samba4/private/libsamba-python%%PYTHON_TAG%%-private-samba.so
|
||||||
|
@comment Python block
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dckeytab%%PYTHON_TAG%%.so
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/posix_eadb%%PYTHON_TAG%%.so
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/xattr_native%%PYTHON_TAG%%.so
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/xattr_tdb%%PYTHON_TAG%%.so
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dsdb_dns%%PYTHON_TAG%%.so
|
||||||
|
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dsdb%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/_glue%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/_ldb%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/auth%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/auth_util.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/colour.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/compression%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/credentials%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/crypto%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dbchecker.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/atsvc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/auth%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/base%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/claims%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/conditional_ace%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dcerpc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dfs%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dns%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dnsp%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dnsserver%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/drsblobs%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/drsuapi%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/echo%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/epmapper%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/gkdi%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/gmsa%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/idmap%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/initshutdown%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/irpc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/krb5ccache%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/krb5pac%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/lsa%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/mdssvc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/messaging%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/mgmt%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/misc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/nbt%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/netlogon%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/ntlmssp%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/preg%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/samr%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/schannel%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/security%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/server_id%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/smb3posix%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/smbXsrv%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/smb_acl%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/spoolss%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/srvsvc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/svcctl%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/unixinfo%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winbind%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/windows_event_ids%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winreg%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winspool%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/witness%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/wkssvc%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dcerpc/xattr%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/auth_policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/auth_silo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/claim_type.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/computer.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/constants.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/container.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/exceptions.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/fields.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/gmsa.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/group.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/model.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/org.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/person.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/query.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/registry.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/schema.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/site.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/subnet.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/types.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/user.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain/models/value_type.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/descriptor.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dnsresolver.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/dnsserver.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/domain_update.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/drs_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/emulate/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/emulate/traffic.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/emulate/traffic_packets.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/forest_update.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/functional_level.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gensec%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/getopt.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gkdi.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_centrify_crontab_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_centrify_sudoers_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_cert_auto_enroll_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_chromium_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_drive_maps_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_ext_loader.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_firefox_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_firewalld_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_gnome_settings_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_msgs_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_scripts_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_sec_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_smb_conf_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gp_sudoers_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/gpclass.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/util/logging.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_access_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_files_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_issue_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_motd_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_openssh_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_startup_scripts_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_sudoers_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp/vgp_symlink_ext.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_aas.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_csv.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_inf.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_ini.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_pol.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/gpo%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/graph.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/hostconfig.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/hresult%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/idmap.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/debug.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/graph.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/graph_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/kcc_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/kcc/ldif_import_export.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/logger.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/lsa_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/mdb_util.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/messaging%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ms_display_specifiers.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ms_forest_updates_markdown.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ms_schema.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ms_schema_markdown.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ndr.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/net%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/net_s3%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netbios%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/computer.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/contact.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/dbcheck.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/delegation.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/dns.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/computer_allowed_to_authenticate_to.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/service_allowed_to_authenticate_from.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/service_allowed_to_authenticate_to.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/user_allowed_to_authenticate_from.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/policy/user_allowed_to_authenticate_to.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/silo/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/silo/member.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/auth/silo/silo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/kds/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/kds/root_key.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/backup.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/claim/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/claim/claim_type.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/claim/value_type.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/classicupgrade.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/dcpromo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/demote.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/functional_prep.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/info.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/keytab.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/leave.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/level.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/passwordsettings.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/provision.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/samba3upgrade.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/schemaupgrade.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/service_account/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/service_account/group_msa_membership.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/service_account/service_account.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/tombstones.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain/trust.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/drs.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/dsacl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/encoders.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/forest.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/fsmo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/gpcommon.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/gpo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/group.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/ldapcmp.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/main.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/nettime.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/ntacl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/ou.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/processes.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/pso.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/rodc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/schema.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/shell.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/sites.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/spn.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/testparm.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/add.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/add_unix_attrs.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/auth/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/auth/policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/auth/silo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/delete.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/disable.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/edit.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/enable.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/getgroups.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/list.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/move.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/password.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/get_kerberos_ticket.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/getpassword.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/show.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords/syncpasswords.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/rename.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/sensitive.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/setexpiry.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/setpassword.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/setprimarygroup.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/user/unlock.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/validators.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/netcmd/visualize.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/nt_time.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ntacls.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/ntstatus%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/param%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/policies.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/policy%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/backend.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/kerberos.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/kerberos_implementation.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/provision/sambadns.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/registry%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/remove_dc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/reparse_symlink%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/safe_tarfile.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/libsmb_samba_cwrapper%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/libsmb_samba_internal.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/mdscli%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/param%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/passdb%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/smbconf%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samba3/smbd%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/samdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/schema.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/sd_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/security%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/sites.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/smbconf%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/subnets.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/subunit/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/subunit/run.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tdb_util.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_dsdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_pass_change.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_ncalrpc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_netlogon.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_netlogon_bad_creds.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_pass_change.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_samlogon.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_winbind.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/bug13653.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/check_output.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/claims.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/downgradedatabase.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/gmsa.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/http_chunk.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/http_content.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/mdsearch.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/misc_dfs_widelink.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/ndrdump.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/netads_dns.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/netads_json.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/rpcd_witness_samba_only.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/samba_dnsupdate.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls_basic.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls_dfs_propagate_inherit.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls_propagate_inhertance.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls_save_restore.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcontrol.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcontrol_process.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_learner.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_replay.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_summary.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/common.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/complex_expressions.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/compression.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/conditional_ace_assembler.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/conditional_ace_bytes.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/conditional_ace_claims.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/core.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/cred_opt.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/credentials.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/array.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/bare.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/binding.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/dnsserver.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/integer.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/lsa.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/lsa_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/mdssvc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/misc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/raw_protocol.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/raw_testcase.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/registry.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/rpc_talloc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/rpcecho.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/sam.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/samr_change_password.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/srvsvc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/string_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/testrpc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/unix.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dckeytab.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_aging.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_forwarder.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_forwarder_helpers/server.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_invalid.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_packet.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_tkey.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dns_wildcard.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/docs.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/domain_backup.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/domain_backup_offline.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_api.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_dns.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_lock.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_quiet_env_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_quiet_provision_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_schema_attributes.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/traffic.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/traffic_packet.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/encrypted_secrets.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/gensec.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/get_opt.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/getdcname.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/gkdi.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/glue.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/gpo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/gpo_member.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/graph.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/group_audit.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/hostconfig.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/imports.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/graph.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/graph_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/kcc_utils.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/ldif_import_export.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/alias_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/as_canonicalization_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/as_req_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/authn_policy_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/claims_in_pac.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/claims_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/compatability_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/conditional_ace_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/device_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/etype_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/fast_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/gkdi_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/gmsa_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/group_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kcrypto.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_base_test.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_tgs_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_tgt_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kpasswd_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/lockout_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/netlogon.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/nt_hash_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/pac_align_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/pkinit_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/protected_users_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/raw_testcase.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rfc4120_constants.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rfc4120_pyasn1.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rfc4120_pyasn1_generated.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rodc_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/s4u_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/salt_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/simple_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/spn_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_ccache.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_idmap_nss.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_ldap.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_min_domain_uid.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_rpc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_smb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/xrealm_tests.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/krb5_credentials.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_raw.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_referrals.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_spn.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_upn_sam_account.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_whoami.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/libsmb-basic.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/libsmb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/loadparm.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/logfiles.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/lsa_string.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/messaging.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ndr/gkdi.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ndr/gmsa.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ndr/wbint.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/net_join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/net_join_no_spnego.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/netbios.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/netcmd.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/netlogonsvc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ndr/sd.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntacls.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntacls_backup.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth_krb5.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/ntlmdisabled.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind_chauthtok.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind_setcred.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind_warn_pwd_expire.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/param.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_fl2003.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_fl2008.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_gpgme.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_ldap.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_quality.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/password_test.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/posixacl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/prefork_restart.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/process_limits.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/provision.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/pso.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/py_credentials.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/registry.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/reparsepoints.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/rust.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3_net_join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3idmapdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3param.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3passdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3registry.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/s3windb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/safe_tarfile.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba3sam.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_startup_fl_change.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/__init__.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/computer.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/contact.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/demote.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/dnscmd.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/domain_auth_policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/domain_auth_silo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/domain_claim.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/domain_kds_root_key.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/domain_models.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/drs_clone_dc_data_lmdb_size.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/dsacl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/forest.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/fsmo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/gpo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/gpo_exts.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/group.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/help.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/join.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/join_lmdb_size.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/join_member.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/ntacl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/ou.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/passwordsettings.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/processes.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/promote_dc_lmdb_size.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/provision_lmdb_size.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/provision_password_check.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/provision_userPassword_crypt.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/rodc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/schema.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/service_account.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/silo_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/sites.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/timecmd.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_auth_policy.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_auth_silo.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_check_password_script.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_get_kerberos_ticket.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_getpassword_gmsa.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_gpg.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_userPassword.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_wdigest.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/visualize.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/visualize_drs.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samba_upgradedns_lmdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samdb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/samdb_api.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/sddl.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/sddl_conditional_ace.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/security.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/security_descriptors.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/segfault.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/sid_strings.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smb-notify.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smb.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smb1posix.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smb2symlink.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smb3unix.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smbconf.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smbd_base.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/smbd_fuzztest.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/source.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/source_chars.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/strings.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/subunitrun.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/tdb_util.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/token_factory.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/upgrade.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/upgradeprovision.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/upgradeprovisionneeddc.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/usage.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/tests/xattr.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/upgrade.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/upgradehelpers.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/uptodateness.py
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/werror%%PYTHON_TAG%%.so
|
||||||
|
%%PYTHON_SITELIBDIR%%/samba/xattr.py
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/tests/samba_tool
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/tests/ndr
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/tests/dcerpc
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/tests/blackbox
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/tests
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/samba3
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/provision
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/netcmd/user/readpasswords
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/netcmd/user/auth
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/netcmd/user
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/netcmd
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba/dcerpc
|
||||||
|
@dir %%PYTHON_SITELIBDIR%%/samba
|
||||||
Reference in New Issue
Block a user