View | Details | Raw Unified | Return to bug 263874 | Differences between
and this patch

Collapse All | Expand All

(-)b/net/samba415/Makefile (+699 lines)
Added Link Here
1
# Created by: timur@FreeBSD.org
2
3
PORTNAME=			${SAMBA4_BASENAME}415
4
PORTVERSION=			${SAMBA4_VERSION}
5
PORTREVISION=			1
6
CATEGORIES?=			net
7
MASTER_SITES=			SAMBA/samba/stable SAMBA/samba/rc
8
DISTNAME=			${SAMBA4_DISTNAME}
9
10
MAINTAINER=			timur@FreeBSD.org
11
COMMENT=			Free SMB/CIFS and AD/DC server and client for Unix
12
13
LICENSE=			GPLv3+
14
LICENSE_FILE=			${WRKSRC}/COPYING
15
16
IGNORE_NONTHREAD_PYTHON=	needs port lang/python${PYTHON_SUFFIX} to be build with THREADS support
17
CONFLICTS_INSTALL?=		samba4* # bin/cifsdd bin/dbwrap_tool bin/dumpmscat bin/findsmb bin/gentest
18
19
USES=				cpe
20
21
# EXTRA_PATCHES+=			${PATCHDIR}/0001-Zfs-provision-1.patch:-p1
22
23
SAMBA4_BASENAME=		samba
24
SAMBA4_PORTNAME=		${SAMBA4_BASENAME}4
25
SAMBA4_VERSION=			4.15.7
26
SAMBA4_DISTNAME=		${SAMBA4_BASENAME}-${SAMBA4_VERSION:S|.p|pre|:S|.r|rc|:S|.t|tp|:S|.a|alpha|}
27
28
WRKSRC?=			${WRKDIR}/${DISTNAME}
29
PLIST?=				${PKGDIR}/pkg-plist
30
31
CPE_VENDOR=			samba
32
CPE_PRODUCT=			samba
33
# Directories
34
VARDIR=				${DESTDIR}/var
35
SAMBA4_RUNDIR=			${VARDIR}/run/${SAMBA4_PORTNAME}
36
SAMBA4_LOGDIR=			${VARDIR}/log/${SAMBA4_PORTNAME}
37
SAMBA4_LOCKDIR=			${VARDIR}/db/${SAMBA4_PORTNAME}
38
SAMBA4_BINDDNSDIR=		${SAMBA4_LOCKDIR}/bind-dns
39
SAMBA4_PRIVATEDIR=		${SAMBA4_LOCKDIR}/private
40
SAMBA4_PAMDIR=			${PREFIX}/lib
41
SAMBA4_LIBDIR=			${PREFIX}/lib/${SAMBA4_PORTNAME}
42
SAMBA4_INCLUDEDIR=		${PREFIX}/include/${SAMBA4_PORTNAME}
43
SAMBA4_CONFDIR=			${PREFIX}/etc
44
SAMBA4_CONFIG=			smb4.conf
45
SAMBA4_MODULES_CLASS=		auth bind9 gensec gpext idmap ldb nss_info \
46
				pdb perfcount process_model service vfs
47
48
CONFIGURE_ARGS+=		--mandir="${MANPREFIX}/man" \
49
				--sysconfdir="${SAMBA4_CONFDIR}" \
50
				--includedir="${SAMBA4_INCLUDEDIR}" \
51
				--datadir="${DATADIR}" \
52
				--libdir="${SAMBA4_LIBDIR}" \
53
				--with-privatelibdir="${SAMBA4_LIBDIR}/private" \
54
				--with-pammodulesdir="${SAMBA4_PAMDIR}" \
55
				--with-modulesdir="${SAMBA4_MODULEDIR}" \
56
				--localstatedir="${VARDIR}" \
57
				--with-piddir="${SAMBA4_RUNDIR}" \
58
				--with-sockets-dir="${SAMBA4_RUNDIR}" \
59
				--with-privileged-socket-dir="${SAMBA4_RUNDIR}" \
60
				--with-lockdir="${SAMBA4_LOCKDIR}" \
61
				--with-statedir="${SAMBA4_LOCKDIR}" \
62
				--with-cachedir="${SAMBA4_LOCKDIR}" \
63
				--with-bind-dns-dir=${SAMBA4_BINDDNSDIR} \
64
				--with-privatedir="${SAMBA4_PRIVATEDIR}" \
65
				--with-logfilebase="${SAMBA4_LOGDIR}" \
66
				--enable-fhs
67
68
# 				--with-pkgconfigdir="${PKGCONFIGDIR}" \
69
70
# XXX: Flags
71
CONFIGURE_ENV+=			PTHREAD_LDFLAGS="-lpthread"
72
MAKE_ENV+=			PYTHONHASHSEED=1
73
74
USES+=				compiler:c++11-lang iconv localbase:ldflags \
75
				perl5 pkgconfig shebangfix waf gettext-runtime
76
USE_PERL5=			build
77
USE_LDCONFIG=			${SAMBA4_LIBDIR}
78
WAF_CMD=			buildtools/bin/waf
79
CONFIGURE_LOG=			bin/config.log
80
81
PKGCONFIGDIR?=			${PREFIX}/libdata/pkgconfig
82
PKGCONFIGDIR_REL?=		${PKGCONFIGDIR:S,^${PREFIX}/,,}
83
PLIST_SUB+=			PKGCONFIGDIR=${PKGCONFIGDIR_REL}
84
SUB_LIST+=			PKGCONFIGDIR=${PKGCONFIGDIR_REL}
85
##############################################################################
86
OPTIONS_SUB=			yes
87
88
OPTIONS_DEFINE=			AD_DC ADS CLUSTER CUPS DOCS FAM GPGME \
89
				LDAP MANDOC PROFILE PYTHON3 QUOTAS \
90
				SPOTLIGHT SYSLOG UTMP
91
#OPTIONS_DEFINE+=		DEVELOPER MEMORY_DEBUG
92
93
OPTIONS_GROUP=			VFS
94
OPTIONS_GROUP_VFS=		FRUIT GLUSTERFS
95
96
OPTIONS_SINGLE=			GSSAPI ZEROCONF
97
98
OPTIONS_SINGLE_GSSAPI=		GSSAPI_BUILTIN GSSAPI_MIT
99
#GSSAPI_HEIMDAL
100
OPTIONS_SINGLE_ZEROCONF=	ZEROCONF_NONE AVAHI MDNSRESPONDER
101
102
OPTIONS_RADIO=			DNS
103
OPTIONS_RADIO_DNS=		NSUPDATE BIND911 BIND916
104
# Make those default options
105
OPTIONS_DEFAULT=		AD_DC ADS DOCS FAM LDAP \
106
				PROFILE PYTHON3 QUOTAS SYSLOG UTMP \
107
				FRUIT GSSAPI_BUILTIN AVAHI
108
##############################################################################
109
ADS_DESC=			Active Directory client(implies LDAP)
110
AD_DC_DESC=			Active Directory Domain Controller(implies PYTHON3)
111
CLUSTER_DESC=			Clustering support
112
DEVELOPER_DESC=			With developer framework
113
FAM_DESC=			File Alteration Monitor
114
GPGME_DESC=			GpgME support
115
LDAP_DESC=			LDAP client
116
LIBZFS_DESC=			LibZFS
117
SPOTLIGHT_DESC=			Spotlight server-side search support
118
MANDOC_DESC=			Build manpages from DOCBOOK templates
119
MEMORY_DEBUG_DESC=		Debug memory allocator
120
PICKY_DEVELOPER_DESC=		Treat compiler warnings as errors(implies DEVELOPER)
121
PROFILE_DESC=			Profiling data
122
QUOTAS_DESC=			Disk quota support
123
UTMP_DESC=			UTMP accounting
124
125
VFS_DESC=			VFS modules
126
GLUSTERFS_DESC=			GlusterFS support
127
FRUIT_DESC=			MacOSX and TimeMachine support
128
129
GSSAPI_BUILTIN_DESC=		GSSAPI support via bundled Heimdal
130
131
ZEROCONF_DESC=			Zero configuration networking
132
ZEROCONF_NONE_DESC=		Zeroconf support is absent
133
134
DNS_DESC=			DNS frontend
135
BIND911_DESC=			Use Bind 9.11 as AD DC DNS server frontend
136
BIND916_DESC=			Use Bind 9.16 as AD DC DNS server frontend
137
NSUPDATE_DESC=			Use samba NSUPDATE utility for AD DC
138
##############################################################################
139
# XXX: Unconditional dependencies which can't be switched off(if present in
140
# the system)
141
142
# Iconv(picked up unconditionaly)
143
LIB_DEPENDS+=			libiconv.so:converters/libiconv
144
# unwind
145
LIB_DEPENDS+=			libunwind.so:devel/libunwind
146
# Readline(sponsored by Python)
147
# XXX: USES=readline pollutes CPPFLAGS, so we explicitly put dependency
148
LIB_DEPENDS+=			libreadline.so:devel/readline
149
# popt
150
LIB_DEPENDS+=			libpopt.so:devel/popt
151
# inotify
152
LIB_DEPENDS+=			libinotify.so:devel/libinotify
153
# GNUTLS
154
LIB_DEPENDS+=			libgnutls.so:security/gnutls
155
LIB_DEPENDS+=			libgcrypt.so:security/libgcrypt
156
# NFSv4 ACL glue
157
LIB_DEPENDS+=			libsunacl.so:sysutils/libsunacl
158
# Jansson
159
BUILD_DEPENDS+=			jansson>=2.10:devel/jansson
160
RUN_DEPENDS+=			jansson>=2.10:devel/jansson
161
# Bison
162
BUILD_DEPENDS+=			bison>=3.8:devel/bison
163
# py-markdown
164
BUILD_DEPENDS+=			py38-markdown>=3.3:textproc/py-markdown
165
# py-dnspython
166
BUILD_DEPENDS+=			py38-dnspython>=2.2:dns/py-dnspython
167
168
# tasn1
169
BUILD_DEPENDS+=			libtasn1>=3.8:security/libtasn1
170
RUN_DEPENDS+=			libtasn1>=3.8:security/libtasn1
171
# External Samba dependencies
172
# Needed for IDL compiler
173
BUILD_DEPENDS+=			p5-Parse-Yapp>=0:devel/p5-Parse-Yapp
174
# Libarchive
175
SAMBA4_BUNDLED_LIBS+=		!libarchive
176
BUILD_DEPENDS+=			libarchive>=3.1.2:archivers/libarchive
177
RUN_DEPENDS+=			libarchive>=3.1.2:archivers/libarchive
178
179
### Bundled libraries
180
SAMBA4_BUNDLED_CMOCKA?=		no
181
SAMBA4_BUNDLED_TALLOC?=		no
182
SAMBA4_BUNDLED_TEVENT?=		no
183
SAMBA4_BUNDLED_TDB?=		no
184
SAMBA4_BUNDLED_LDB?=		yes
185
# cmocka
186
.if defined(SAMBA4_BUNDLED_CMOCKA) && ${SAMBA4_BUNDLED_CMOCKA} == yes
187
SAMBA4_BUNDLED_LIBS+=		cmocka
188
CONFLICTS_INSTALL+=		cmocka-1.*
189
PLIST_SUB+=			SAMBA4_BUNDLED_CMOCKA=""
190
SUB_LIST+=			SAMBA4_BUNDLED_CMOCKA=""
191
.else
192
SAMBA4_BUNDLED_LIBS+=		!cmocka
193
BUILD_DEPENDS+=			cmocka>=1.1.3:sysutils/cmocka
194
TEST_DEPENDS+=			cmocka>=1.1.3:sysutils/cmocka
195
PLIST_SUB+=			SAMBA4_BUNDLED_CMOCKA="@comment "
196
SUB_LIST+=			SAMBA4_BUNDLED_CMOCKA="@comment "
197
.endif
198
# talloc
199
.if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes
200
SAMBA4_BUNDLED_LIBS+=		talloc
201
CONFLICTS_INSTALL+=		talloc-* talloc1-*
202
PLIST_SUB+=			SAMBA4_BUNDLED_TALLOC=""
203
SUB_LIST+=			SAMBA4_BUNDLED_TALLOC=""
204
.else
205
SAMBA4_BUNDLED_LIBS+=		!talloc
206
BUILD_DEPENDS+=			talloc>=2.3.1:devel/talloc
207
RUN_DEPENDS+=			talloc>=2.3.1:devel/talloc
208
PLIST_SUB+=			SAMBA4_BUNDLED_TALLOC="@comment "
209
SUB_LIST+=			SAMBA4_BUNDLED_TALLOC="@comment "
210
.endif
211
# tevent
212
.if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes
213
SAMBA4_BUNDLED_LIBS+=		tevent
214
CONFLICTS_INSTALL+=		tevent-* tevent1-*
215
PLIST_SUB+=			SAMBA4_BUNDLED_TEVENT=""
216
SUB_LIST+=			SAMBA4_BUNDLED_TEVENT=""
217
.else
218
SAMBA4_BUNDLED_LIBS+=		!tevent
219
BUILD_DEPENDS+=			tevent>=0.10.2:devel/tevent
220
RUN_DEPENDS+=			tevent>=0.10.2:devel/tevent
221
PLIST_SUB+=			SAMBA4_BUNDLED_TEVENT="@comment "
222
SUB_LIST+=			SAMBA4_BUNDLED_TEVENT="@comment "
223
.endif
224
# tdb
225
.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
226
SAMBA4_BUNDLED_LIBS+=		tdb
227
CONFLICTS_INSTALL+=		tdb-* tdb1-*
228
PLIST_SUB+=			SAMBA4_BUNDLED_TDB=""
229
SUB_LIST+=			SAMBA4_BUNDLED_TDB=""
230
.else
231
SAMBA4_BUNDLED_LIBS+=		!tdb
232
BUILD_DEPENDS+=			tdb>=1.4.4:databases/tdb
233
RUN_DEPENDS+=			tdb>=1.4.4:databases/tdb
234
PLIST_SUB+=			SAMBA4_BUNDLED_TDB="@comment "
235
SUB_LIST+=			SAMBA4_BUNDLED_TDB="@comment "
236
.endif
237
# ldb
238
.if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes
239
SAMBA4_BUNDLED_LDB=		yes
240
SAMBA4_BUNDLED_LIBS+=		ldb
241
PLIST_SUB+=			SAMBA4_BUNDLED_LDB=""
242
SUB_LIST+=			SAMBA4_BUNDLED_LDB=""
243
SAMBA4_MODULEDIR=		${SAMBA4_LIBDIR}/modules
244
.else
245
SAMBA4_BUNDLED_LIBS+=		!ldb
246
BUILD_DEPENDS+=			ldb22>=2.2.0:databases/ldb22
247
RUN_DEPENDS+=			ldb22>=2.2.0:databases/ldb22
248
PLIST_SUB+=			SAMBA4_BUNDLED_LDB="@comment "
249
SUB_LIST+=			SAMBA4_BUNDLED_LDB="@comment "
250
SAMBA4_MODULEDIR=		${PREFIX}/lib/shared-modules
251
.endif
252
253
.if (defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes) \
254
	|| (defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes) \
255
	|| (defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes) \
256
	|| (defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes)
257
SAMBA4_BUNDLED_LIBS+=		replace
258
.endif
259
# Don't use external libcom_err
260
SAMBA4_BUNDLED_LIBS+=		com_err
261
# Set the test environment variables
262
TEST_USES=			python
263
TEST_ENV+=			PYTHON="${PYTHON_CMD}" \
264
				SHA1SUM=/sbin/sha1 \
265
				SHA256SUM=/sbin/sha256 \
266
				MD5SUM=/sbin/md5 \
267
				PYTHONDONTWRITEBYTECODE=1
268
269
TEST_DEPENDS+=			bash:shells/bash \
270
				tshark:net/tshark
271
# External Python modules
272
TEST_BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR}
273
TEST_RUN_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}iso8601>=0.1.11:devel/py-iso8601@${PY_FLAVOR}
274
##############################################################################
275
CONFIGURE_ARGS+=		\
276
				--with-pam \
277
				--with-iconv \
278
				--with-winbind \
279
				--with-regedit \
280
				--disable-rpath \
281
				--without-lttng \
282
				--without-gettext \
283
				--enable-pthreadpool \
284
				--without-fake-kaserver \
285
				--without-systemd \
286
				--with-libarchive \
287
				--with-acl-support \
288
				--with-sendfile-support
289
290
#				--disable-ctdb-tests
291
#				${ICONV_CONFIGURE_BASE}
292
293
##############################################################################
294
FRUIT_PREVENTS=			ZEROCONF_NONE
295
FRUIT_PREVENTS_MSG=		MacOSX support requires Zeroconf(AVAHI or MDNSRESPONDER)
296
FRUIT_VARS=			SAMBA4_MODULES+=vfs_fruit
297
FRUIT_PLIST_FILES=		man/man8/vfs_fruit.8.gz
298
299
GLUSTERFS_CONFIGURE_ENABLE=	glusterfs
300
GLUSTERFS_LIB_DEPENDS=		libglusterfs.so:net/glusterfs
301
GLUSTERFS_VARS=			SAMBA4_MODULES+=vfs_glusterfs
302
GLUSTERFS_PLIST_FILES=		man/man8/vfs_glusterfs.8.gz
303
304
ZEROCONF_NONE_MAKE_ENV=		ZEROCONF=none
305
##############################################################################
306
AVAHI_CONFIGURE_ENABLE=		avahi
307
AVAHI_LIB_DEPENDS=		libavahi-client.so:net/avahi-app
308
AVAHI_VARS=			SAMBA4_SERVICES+=avahi_daemon
309
310
#MDNSRESPONDER_CONFIGURE_ENABLE=	dnssd
311
#MDNSRESPONDER_LIB_DEPENDS=	libdns_sd.so:net/mDNSResponder
312
#MDNSRESPONDER_VARS=		SAMBA4_SERVICES+=mdnsd
313
##############################################################################
314
BIND911_RUN_DEPENDS=		bind911>=9.11.0.0:dns/bind911
315
BIND916_RUN_DEPENDS=		bind916>=9.16.0.0:dns/bind916
316
NSUPDATE_RUN_DEPENDS=		samba-nsupdate:dns/samba-nsupdate
317
##############################################################################
318
MEMORY_DEBUG_IMPLIES=		DEBUG
319
MEMORY_DEBUG_CONFIGURE_ENV=	ADDITIONAL_CFLAGS="-DENABLE_JEMALLOC `pkg-config --cflags jemalloc`" ADDITIONAL_LDFLAGS="`pkg-config --libs jemalloc`"
320
MEMORY_DEBUG_LIB_DEPENDS=	libjemalloc.so.2:devel/jemalloc
321
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194046
322
GDB_CMD?=			${LOCALBASE}/bin/gdb
323
# https://bugzilla.samba.org/show_bug.cgi?id=8969
324
PICKY_DEVELOPER_IMPLIES=	DEVELOPER
325
PICKY_DEVELOPER_CONFIGURE_ON=	--picky-developer
326
327
DEVELOPER_IMPLIES=
328
DEVELOPER_CONFIGURE_ON=		--enable-developer --enable-selftest --abi-check-disable
329
DEVELOPER_CONFIGURE_ENV=	WAF_CMD_FORMAT=string
330
DEVELOPER_RUN_DEPENDS=		${SAMBA4_LMDB_DEPENDS}
331
DEVELOPER_BUILD_DEPENDS=	${GDB_CMD}:devel/gdb \
332
				${SAMBA4_LMDB_DEPENDS}
333
DEVELOPER_TEST_DEPENDS=		${GDB_CMD}:devel/gdb
334
DEVELOPER_VARS_OFF=		GDB_CMD=true
335
336
##############################################################################
337
AD_DC_IMPLIES=			PYTHON3
338
AD_DC_CONFIGURE_OFF=		--without-ad-dc
339
AD_DC_BUILD_DEPENDS=		${SAMBA4_LMDB_DEPENDS}
340
AD_DC_RUN_DEPENDS=		${SAMBA4_LMDB_DEPENDS}
341
AD_DC_VARS=			PLIST+=${PKGDIR}/pkg-plist.ad_dc
342
343
ADS_IMPLIES=			LDAP
344
ADS_CONFIGURE_WITH=		ads
345
# ADS_CONFIGURE_WITH=		ads dnsupdate
346
347
CLUSTER_CONFIGURE_WITH=		cluster-support
348
CLUSTER_VARS=			PLIST+=${PKGDIR}/pkg-plist.cluster
349
350
CUPS_CONFIGURE_ENABLE=		cups iprint
351
CUPS_LIB_DEPENDS=		libcups.so:print/cups
352
# https://bugzilla.samba.org/show_bug.cgi?id=9545
353
FAM_USES=			fam
354
FAM_CONFIGURE_WITH=		fam
355
356
GPGME_CONFIGURE_WITH=		gpgme
357
GPGME_LIB_DEPENDS=		libgpgme.so:security/gpgme
358
359
GSSAPI_MIT_CONFIGURE_ON=	--with-system-mitkrb5 ${GSSAPIBASEDIR} \
360
				--with-system-mitkdc=${GSSAPIBASEDIR}/sbin/krb5kdc \
361
				--with-experimental-mit-ad-dc
362
GSSAPI_MIT_USES=		gssapi:mit
363
364
GSSAPI_HEIMDAL_CONFIGURE_ON=	--with-system-heimdalkrb5 ${GSSAPIBASEDIR}
365
GSSAPI_HEIMDAL_USES=		gssapi:heimdal
366
GSSAPI_HEIMDAL_PREVENTS=	AD_DC
367
GSSAPI_HEIMDAL_PREVENTS_MSG=	GSSAPI_HEIMDAL and AD_DC enable conflicting options
368
369
LDAP_CONFIGURE_WITH=		ldap
370
LDAP_CONFIGURE_ON=		--with-ldap
371
LDAP_USE=			OPENLDAP=yes
372
LDAP_VARS=			SAMBA4_MODULES+=idmap_ldap
373
374
LIBZFS_CONFIGURE_WITH=		libzfs
375
LIBZFS_VARS=			SAMBA4_MODULES+=vfs_zfs_space
376
377
MANDOC_BUILD_DEPENDS=		${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
378
				xsltproc:textproc/libxslt
379
MANDOC_CONFIGURE_ENV_OFF=	XSLTPROC="true"
380
381
PROFILE_CONFIGURE_WITH=		profiling-data
382
383
QUOTAS_CONFIGURE_WITH=		quotas
384
385
SPOTLIGHT_CONFIGURE_ENABLE=	spotlight
386
SPOTLIGHT_BUILD_DEPENDS=	tracker>=1.4.1:sysutils/tracker
387
SPOTLIGHT_RUN_DEPENDS=		tracker>=1.4.1:sysutils/tracker
388
# ICU
389
SPOTLIGHT_LIB_DEPENDS=		libicuuc.so:devel/icu
390
SPOTLIGHT_USES=			bison gnome
391
SPOTLIGHT_USE=			gnome=glib20
392
393
SYSLOG_CONFIGURE_WITH=		syslog
394
395
UTMP_CONFIGURE_WITH=		utmp
396
397
##############################################################################
398
.include <bsd.port.options.mk>
399
##############################################################################
400
401
.if !defined(WANT_EXP_MODULES) || empty(WANT_EXP_MODULES)
402
WANT_EXP_MODULES=		vfs_cacheprime
403
.endif
404
405
.if ${WANT_EXP_MODULES:Mvfs_snapper}
406
# snapper needs dbus
407
LIB_DEPENDS+=			libdbus-1.so:devel/dbus
408
LIB_DEPENDS+=			libdbus-glib-1.so:devel/dbus-glib
409
.endif
410
411
SAMBA4_MODULES+=		krb5_winbind_krb5_locator idmap_nss idmap_autorid \
412
				idmap_rid idmap_hash idmap_tdb idmap_tdb2 idmap_script \
413
				nss-info_hash
414
# List of extra modules taken from RHEL build
415
# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=197320
416
.if ${PORT_OPTIONS:MADS}
417
SAMBA4_MODULES+=		idmap_ad idmap_rfc2307 nss-info_template \
418
				nss-info_rfc2307 nss-info_sfu nss-info_sfu20
419
.endif
420
# This kind of special for this distribution
421
# SAMBA4_MODULES+=		vfs_freebsd
422
423
SAMBA4_MODULES+=		vfs_acl_tdb vfs_acl_xattr vfs_aio_fork vfs_aio_pthread \
424
				vfs_audit vfs_cap vfs_catia vfs_commit vfs_crossrename \
425
				vfs_default_quota vfs_dirsort vfs_expand_msdfs \
426
				vfs_extd_audit vfs_fake_perms vfs_full_audit \
427
				vfs_linux_xfs_sgid vfs_media_harmony vfs_offline \
428
				vfs_preopen vfs_readahead vfs_readonly vfs_recycle \
429
				vfs_shadow_copy vfs_shadow_copy2 vfs_shell_snap \
430
				vfs_streams_depot vfs_streams_xattr vfs_syncops \
431
				vfs_time_audit vfs_unityed_media vfs_virusfilter \
432
				vfs_widelinks vfs_worm vfs_xattr_tdb vfs_zfsacl
433
434
.if ${PORT_OPTIONS:MDEVELOPER}
435
SAMBA4_MODULES+=		auth_skel pdb_test gpext_security gpext_registry \
436
				gpext_scripts perfcount_test vfs_fake_dfq \
437
				vfs_skel_opaque vfs_skel_transparent \
438
				vfs_shadow_copy_test vfs_fake_acls \
439
				vfs_nfs4acl_xattr vfs_error_inject vfs_delay_inject
440
.endif
441
# Python bindings
442
.if ! ${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON)
443
USES+=				python:build,test
444
CONFIGURE_ARGS+=		--disable-python
445
.else
446
USES+=				python:3.6+
447
PLIST+=				${PKGDIR}/pkg-plist.python
448
# Don't cache Python modules
449
CONFIGURE_ARGS+=		--nopycache
450
MAKE_ENV+=			PYTHONDONTWRITEBYTECODE=1
451
452
.	if defined(SAMBA4_BUNDLED_TALLOC) && ${SAMBA4_BUNDLED_TALLOC} == yes
453
SAMBA4_BUNDLED_LIBS+=		pytalloc-util
454
.	else
455
SAMBA4_BUNDLED_LIBS+=		!pytalloc-util
456
.	endif
457
458
.	if defined(SAMBA4_BUNDLED_TEVENT) && ${SAMBA4_BUNDLED_TEVENT} == yes
459
SAMBA4_BUNDLED_LIBS+=		pytevent
460
.	else
461
SAMBA4_BUNDLED_LIBS+=		!pytevent
462
.	endif
463
464
.	if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
465
SAMBA4_BUNDLED_LIBS+=		pytdb
466
.	else
467
SAMBA4_BUNDLED_LIBS+=		!pytdb
468
.	endif
469
470
.	if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes
471
SAMBA4_BUNDLED_LIBS+=		pyldb pyldb-util
472
.	else
473
SAMBA4_BUNDLED_LIBS+=		!pyldb !pyldb-util
474
.	endif
475
# samba-tool requires those for *upgrade
476
.	if ${PORT_OPTIONS:MAD_DC}
477
RUN_DEPENDS+=			${PYTHON_PKGNAMEPREFIX}dnspython>=1.15.0:dns/py-dnspython@${PY_FLAVOR}
478
RUN_DEPENDS+=			${PYTHON_PKGNAMEPREFIX}markdown>=2.6.11:textproc/py-markdown@${PY_FLAVOR}
479
.		if ${PORT_OPTIONS:MGPGME}
480
RUN_DEPENDS+=			${PYTHON_PKGNAMEPREFIX}gpgme>=1.14.0:security/py-gpgme@${PY_FLAVOR}
481
.		endif
482
.	endif
483
.endif
484
485
.if defined(WANT_EXP_MODULES) && !empty(WANT_EXP_MODULES)
486
SAMBA4_MODULES+=		${WANT_EXP_MODULES}
487
.endif
488
489
.if defined(SAMBA4_BUNDLED_LIBS) && !empty(SAMBA4_BUNDLED_LIBS)
490
CONFIGURE_ARGS+=		--bundled-libraries="${SAMBA4_BUNDLED_LIBS:Q:C|(\\\\ )+|,|g:S|\\||g}"
491
.endif
492
493
.if defined(SAMBA4_MODULES) && !empty(SAMBA4_MODULES)
494
CONFIGURE_ARGS+=		--with-shared-modules="${SAMBA4_MODULES:C|-|_|:Q:C|(\\\\ )+|,|g:S|\\||g}"
495
.endif
496
# XXX: Hack for nss-info_* -> nss_info/* modules
497
# Add selected modules to the plist
498
.for module in ${SAMBA4_MODULES}
499
PLIST_FILES+=			${SAMBA4_MODULEDIR}/${module:C|_|/|:C|-|_|}.so
500
.endfor
501
502
.for module_class in ${SAMBA4_MODULES_CLASS}
503
PLIST_DIRS+=			${SAMBA4_MODULEDIR}/${module_class}
504
.endfor
505
PLIST_DIRS+=			${SAMBA4_MODULEDIR}
506
507
.if defined(WITH_DEBUG)
508
CONFIGURE_ARGS+=		--verbose --enable-debug
509
MAKE_ARGS+=			--verbose
510
DEBUG_FLAGS?=			-g -ggdb3 -O0
511
.endif
512
513
##############################################################################
514
.include <bsd.port.pre.mk>
515
##############################################################################
516
# Implemented in the gcrypt on AMD64
517
.if ${ARCH} == "amd64"
518
CONFIGURE_ARGS+=		--accel-aes=intelaesni
519
.else
520
CONFIGURE_ARGS+=		--accel-aes=none
521
.endif
522
523
# Only for 64-bit architectures
524
.if ${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != i386 && ${ARCH} != mips && ${ARCH} != powerpc && ${ARCH} != powerpcspe
525
.	if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes && (${PORT_OPTIONS:MAD_DC} || ${PORT_OPTIONS:MDEVELOPER})
526
# LMDB
527
SAMBA4_LMDB_DEPENDS=		lmdb>=0.9.16:databases/lmdb
528
PLIST_FILES+=			${SAMBA4_LIBDIR}/private/libldb-mdb-int-samba4.so \
529
				${SAMBA4_MODULEDIR}/ldb/mdb.so
530
.	endif
531
.endif
532
533
.if ${PORT_OPTIONS:MGSSAPI_MIT}
534
PLIST_FILES+=			${SAMBA4_MODULEDIR}/krb5/winbind_krb5_localauth.so \
535
				man/man8/winbind_krb5_localauth.8.gz
536
.	if ${PORT_OPTIONS:MAD_DC}
537
PLIST_FILES+=			${SAMBA4_LIBDIR}/krb5/plugins/kdb/samba.so
538
.	endif
539
.endif
540
# for libexecinfo: (so that __builtin_frame_address() finds the top of the stack)
541
CFLAGS_amd64+=			-fno-omit-frame-pointer
542
# No fancy color error messages
543
CONFIGURE_ENV+=			NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s'
544
MAKE_ENV+=			NOCOLOR=yes WAF_LOG_FORMAT='%(c1)s%(zone)s%(c2)s %(message)s'
545
.if ${CHOSEN_COMPILER_TYPE} == clang
546
CFLAGS+=			-fno-color-diagnostics
547
.endif
548
# Allow rpcgen to find proper CPP
549
MAKE_ENV+=			RPCGEN_CPP="${CPP}"
550
#.if ${readline_ARGS} == port
551
#CFLAGS+=			-D_FUNCTION_DEF
552
#.endif
553
554
# Make sure that the right version of Python is used by the tools
555
# https://bugzilla.samba.org/show_bug.cgi?id=7305
556
SHEBANG_FILES=			${PATCH_WRKSRC}/source4/scripting/bin/* ${PATCH_WRKSRC}/selftest/*
557
558
SAMBA4_SUB=			SAMBA4_LOGDIR="${SAMBA4_LOGDIR}" \
559
				SAMBA4_RUNDIR="${SAMBA4_RUNDIR}" \
560
				SAMBA4_LOCKDIR="${SAMBA4_LOCKDIR}" \
561
				SAMBA4_LIBDIR="${SAMBA4_LIBDIR}" \
562
				SAMBA4_MODULEDIR="${SAMBA4_MODULEDIR}" \
563
				SAMBA4_BINDDNSDIR="${SAMBA4_BINDDNSDIR}" \
564
				SAMBA4_PRIVATEDIR="${SAMBA4_PRIVATEDIR}" \
565
				SAMBA4_CONFDIR="${SAMBA4_CONFDIR}" \
566
				SAMBA4_CONFIG="${SAMBA4_CONFIG}" \
567
				SAMBA4_SERVICES="${SAMBA4_SERVICES}"
568
569
PLIST_SUB+=			${SAMBA4_SUB}
570
SUB_LIST+=			${SAMBA4_SUB}
571
572
USE_RC_SUBR=			samba_server
573
SUB_FILES=			pkg-message README.FreeBSD
574
575
PORTDOCS=			README.FreeBSD
576
577
post-extract:
578
				@${RM} -r ${WRKSRC}/pidl/lib/Parse/Yapp
579
580
post-patch:
581
				@${REINPLACE_CMD} -e 's|$${PKGCONFIGDIR}|${PKGCONFIGDIR}|g' \
582
					${PATCH_WRKSRC}/buildtools/wafsamba/pkgconfig.py
583
				@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
584
					${PATCH_WRKSRC}/buildtools/wafsamba/wafsamba.py
585
				@${REINPLACE_CMD} -e 's|%%GDB_CMD%%|${GDB_CMD}|g' \
586
					${PATCH_WRKSRC}/buildtools/scripts/abi_gen.sh
587
				@${REINPLACE_CMD} -e 's|%%SAMBA4_CONFIG%%|${SAMBA4_CONFIG}|g' \
588
					${PATCH_WRKSRC}/dynconfig/wscript
589
590
# Use threading (or multiprocessing) but not thread (renamed in python 3+).
591
pre-configure:
592
.if (!${PORT_OPTIONS:MPYTHON3} || defined(NO_PYTHON)) && ${PORT_OPTIONS:MAD_DC}
593
				@${ECHO_CMD}; \
594
				${ECHO_MSG} "===>  AD_DC option requires PYTHON3 to be set"; \
595
				${ECHO_CMD}; \
596
				${FALSE}
597
.endif
598
				@if ! ${PYTHON_CMD} -c "import multiprocessing;" 2>/dev/null; then \
599
					${ECHO_CMD}; \
600
					${ECHO_MSG} "===>  ${PKGNAME} "${IGNORE_NONTHREAD_PYTHON:Q}.; \
601
					${ECHO_CMD}; \
602
					${FALSE}; \
603
				fi
604
605
pre-build-MANDOC-off:
606
				${MKDIR} ${BUILD_WRKSRC}/bin/default/docs-xml/
607
				${CP} -rp ${BUILD_WRKSRC}/docs/manpages ${BUILD_WRKSRC}/bin/default/docs-xml/
608
.for man in			libcli/nbt/man/nmblookup4.1 \
609
				librpc/tools/ndrdump.1 \
610
				source4/lib/registry/man/regdiff.1 \
611
				source4/lib/registry/man/regpatch.1 \
612
				source4/lib/registry/man/regshell.1 \
613
				source4/lib/registry/man/regtree.1 \
614
				source4/scripting/man/samba-gpupdate.8 \
615
				source4/torture/man/gentest.1 \
616
				source4/torture/man/locktest.1 \
617
				source4/torture/man/masktest.1 \
618
				source4/torture/man/smbtorture.1 \
619
				source4/utils/man/ntlm_auth4.1 \
620
				source4/utils/oLschema2ldif/oLschema2ldif.1 \
621
				lib/tdb/man/tdbdump.8 \
622
				lib/tdb/man/tdbbackup.8 \
623
				lib/tdb/man/tdbtool.8 \
624
				lib/talloc/man/talloc.3 \
625
				lib/tdb/man/tdbrestore.8 \
626
				lib/ldb/man/ldbadd.1 \
627
				lib/ldb/man/ldbsearch.1 \
628
				lib/ldb/man/ldbmodify.1 \
629
				lib/ldb/man/ldbrename.1 \
630
				lib/ldb/man/ldbdel.1 \
631
				lib/ldb/man/ldbedit.1 \
632
				docs-xml/manpages/vfs_freebsd.8
633
					${MKDIR} `dirname ${BUILD_WRKSRC}/bin/default/${man}`
634
					${INSTALL_MAN} ${FILESDIR}/man/`basename ${man}` ${BUILD_WRKSRC}/bin/default/${man}
635
.endfor
636
.if ${PORT_OPTIONS:MCLUSTER}
637
				${MKDIR} ${BUILD_WRKSRC}/bin/default/ctdb/
638
.	for man in		ctdb_diagnostics.1 ctdb.1 ctdbd_wrapper.1 ctdbd.1 ltdbtool.1 onnode.1 ping_pong.1 \
639
				ctdb.conf.5 ctdb.sysconfig.5 ctdb-script.options.5 \
640
				ctdb.7 ctdb-statistics.7 ctdb-tunables.7
641
					${INSTALL_MAN} ${FILESDIR}/man/${man} ${BUILD_WRKSRC}/bin/default/ctdb/
642
.	endfor
643
.endif
644
645
post-install-rm-junk:
646
				${RM} -r ${STAGEDIR}${PYTHON_SITELIBDIR}/samba/third_party
647
				${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name __pycache__ \
648
					-type d -print0 | ${XARGS} -0 -n 1 -t ${RM} -r
649
650
post-install-fix-manpages:
651
.for f in vfs_aio_linux.8 vfs_btrfs.8 vfs_ceph.8 vfs_gpfs.8
652
				${RM} ${STAGEDIR}${PREFIX}/man/man8/${f}
653
.endfor
654
.if defined(SAMBA4_BUNDLED_LDB) && ${SAMBA4_BUNDLED_LDB} == yes
655
.	for f in ldbadd.1 ldbdel.1 ldbedit.1 ldbmodify.1 ldbrename.1 ldbsearch.1
656
				${MV} ${STAGEDIR}${PREFIX}/man/man1/${f} ${STAGEDIR}${PREFIX}/man/man1/samba-${f}
657
.	endfor
658
.endif
659
.if defined(SAMBA4_BUNDLED_TDB) && ${SAMBA4_BUNDLED_TDB} == yes
660
.	for f in tdbbackup.8 tdbdump.8 tdbrestore.8 tdbtool.8
661
				${MV} ${STAGEDIR}${PREFIX}/man/man8/${f} ${STAGEDIR}${PREFIX}/man/man8/samba-${f}
662
.	endfor
663
.endif
664
665
post-install: post-install-rm-junk post-install-fix-manpages
666
				${LN} -sf smb.conf.5.gz ${STAGEDIR}${PREFIX}/man/man5/smb4.conf.5.gz
667
# Run post-install script
668
.for dir in			${SAMBA4_LOGDIR} ${SAMBA4_RUNDIR} ${SAMBA4_LOCKDIR} ${SAMBA4_MODULEDIR}
669
					${INSTALL} -d -m 0755 "${STAGEDIR}${dir}"
670
.endfor
671
				${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_BINDDNSDIR}"
672
				${INSTALL} -d -m 0750 "${STAGEDIR}${SAMBA4_PRIVATEDIR}"
673
.for module_class in			${SAMBA4_MODULES_CLASS}
674
					${INSTALL} -d -m 0755 "${STAGEDIR}${SAMBA4_MODULEDIR}/${module_class}"
675
.endfor
676
.if !defined(WITH_DEBUG)
677
				-${FIND} ${STAGEDIR}${PREFIX}/bin ${STAGEDIR}${PREFIX}/sbin ${STAGEDIR}${PREFIX}/libexec \
678
					-type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD}
679
				-${FIND} ${STAGEDIR}${PREFIX}/lib -name '*.so*' \
680
					-type f -print0 | ${XARGS} -0 -n 1 -t ${STRIP_CMD}
681
.endif
682
683
post-install-FRUIT-off:
684
				${RM} ${STAGEDIR}${SAMBA4_MODULEDIR}/vfs/fruit.so
685
				${RM} ${STAGEDIR}${PREFIX}/man/man8/vfs_fruit.8
686
687
post-install-DOCS-on:
688
				${MKDIR} ${STAGEDIR}${DOCSDIR}
689
.for doc in			${PORTDOCS}
690
				${INSTALL_DATA} ${WRKDIR}/${doc} ${STAGEDIR}${DOCSDIR}
691
.endfor
692
693
post-install-CLUSTER-on:
694
				${LN} -nfs ../../../../share/ctdb/events/legacy/00.ctdb.script		${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/00.ctdb.script
695
				${LN} -nfs ../../../../share/ctdb/events/legacy/10.interface.script	${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/10.interface.script
696
				${LN} -nfs ../../../../share/ctdb/events/legacy/05.system.script	${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/05.system.script
697
				${LN} -nfs ../../../../share/ctdb/events/legacy/01.reclock.script	${STAGEDIR}${PREFIX}/etc/ctdb/events/legacy/01.reclock.script
698
699
.include <bsd.port.post.mk>
(-)b/net/samba415/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1655906020
2
SHA256 (samba-4.15.7.tar.gz) = 76d0096c16ed0265b337d5731f3c0b32eed3adab6fa8b7585c055b287cd05d6b
3
SIZE (samba-4.15.7.tar.gz) = 19290930
(-)b/net/samba415/files/0001-Zfs-provision-1.patch (+368 lines)
Added Link Here
1
From 2664c997587416a2c8c911a75158485a5c98b70b Mon Sep 17 00:00:00 2001
2
From: John Hixon <john@ixsystems.com>
3
Date: Sat, 20 May 2017 04:39:37 +0200
4
Subject: [PATCH] Zfs provision (#1)
5
6
Cherry-pick ZFS provisioning code by iXsystems Inc.
7
8
* Check if sysvol is on filesystem with NFSv4 ACL's
9
(cherry picked from commit ca86f52b78a7b6e7537454a69cf93e7b96210cba)
10
11
* Only check targetdir if it is defined (I had assumed it was)
12
(cherry picked from commit a29050cb2978ce23e3c04a859340dc2664c77a8a)
13
14
* Kick samba a little bit into understanding NFSv4 ACL's
15
(cherry picked from commit 1c7542ff4904b729e311e17464ee76582760c219)
16
17
Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
18
---
19
 python/samba/provision/__init__.py |  25 ++++--
20
 source3/lib/sysacls.c              |  10 +++
21
 source3/param/loadparm.c           |   7 ++
22
 source3/smbd/pysmbd.c              | 156 ++++++++++++++++++++++++++++++++++++-
23
 4 files changed, 191 insertions(+), 7 deletions(-)
24
25
diff --git a/python/samba/provision/__init__.py b/python/samba/provision/__init__.py
26
index 5de986463a5..cd3b91f41b9 100644
27
--- a/python/samba/provision/__init__.py
28
+++ b/python/samba/provision/__init__.py
29
@@ -1695,19 +1695,25 @@ def setsysvolacl(samdb, netlogon, sysvol, uid, gid, do
30
         s3conf = s3param.get_context()
31
         s3conf.load(lp.configfile)
32
33
-        file = tempfile.NamedTemporaryFile(dir=os.path.abspath(sysvol))
34
+        sysvol_dir = os.path.abspath(sysvol)
35
+
36
+        set_simple_acl = smbd.set_simple_acl
37
+        if smbd.has_nfsv4_acls(sysvol_dir):
38
+            set_simple_acl = smbd.set_simple_nfsv4_acl
39
+
40
+        file = tempfile.NamedTemporaryFile(dir=sysvol_dir)
41
         try:
42
             try:
43
-                smbd.set_simple_acl(file.name, 0o755, system_session_unix(), gid)
44
+                set_simple_acl(file.name, 0o755, system_session_unix(), gid)
45
             except OSError:
46
-                if not smbd.have_posix_acls():
47
+                if not smbd.have_posix_acls() and not smbd.have_nfsv4_acls():
48
                     # This clue is only strictly correct for RPM and
49
                     # Debian-like Linux systems, but hopefully other users
50
                     # will get enough clue from it.
51
-                    raise ProvisioningError("Samba was compiled without the posix ACL support that s3fs requires.  "
52
+                    raise ProvisioningError("Samba was compiled without the ACL support that s3fs requires.  "
53
                                             "Try installing libacl1-dev or libacl-devel, then re-run configure and make.")
54
55
-                raise ProvisioningError("Your filesystem or build does not support posix ACLs, which s3fs requires.  "
56
+                raise ProvisioningError("Your filesystem or build does not support ACLs, which s3fs requires.  "
57
                                         "Try the mounting the filesystem with the 'acl' option.")
58
             try:
59
                 smbd.chown(file.name, uid, gid, system_session_unix())
60
@@ -1984,6 +1990,9 @@ def provision_fill(samdb, secrets_ldb, logger, names,
61
         samdb.transaction_commit()
62
63
     if serverrole == "active directory domain controller":
64
+        if targetdir and smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(targetdir):
65
+            smbd.set_nfsv4_defaults()
66
+
67
         # Continue setting up sysvol for GPO. This appears to require being
68
         # outside a transaction.
69
         if not skip_sysvolacl:
70
@@ -2340,6 +2349,9 @@ def provision(logger, session_info, smbconf=None,
71
72
             if not os.path.isdir(paths.netlogon):
73
                 os.makedirs(paths.netlogon, 0o755)
74
+
75
+            if smbd.have_nfsv4_acls() and smbd.has_nfsv4_acls(paths.sysvol):
76
+                smbd.set_nfsv4_defaults()
77
78
         if adminpass is None:
79
             adminpass = samba.generate_random_password(12, 32)
80
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
81
index 0bf3c37edfa..786cd39b5bc 100644
82
--- a/source3/lib/sysacls.c
83
+++ b/source3/lib/sysacls.c
84
@@ -38,6 +38,16 @@
85
 #include "modules/vfs_hpuxacl.h"
86
 #endif
87
88
+/*
89
+ * NFSv4 ACL's should be understood and a first class citizen. Work
90
+ * needs to be done in librpc/idl/smb_acl.idl for this to occur.
91
+ */
92
+#if defined(HAVE_LIBSUNACL) && defined(FREEBSD)
93
+#if 0
94
+#include "modules/nfs4_acls.h"
95
+#endif
96
+#endif
97
+
98
 #undef  DBGC_CLASS
99
 #define DBGC_CLASS DBGC_ACLS
100
101
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
102
index a2fcc4246c9..4b676897fc1 100644
103
--- a/source3/param/loadparm.c
104
+++ b/source3/param/loadparm.c
105
@@ -2801,9 +2801,29 @@ static void init_locals(void)
106
		} else {
107
			if (lp_parm_const_string(-1, "xattr_tdb", "file", NULL)) {
108
				lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr xattr_tdb");
109
+			/*
110
+			 * By default, the samba sysvol is located in the statedir. Provisioning will fail in setntacl
111
+			 * unless we have zfacl enabled. Unfortunately, at this point the smb.conf has not been generated.
112
+			 * This workaround is freebsd-specific.
113
+			 */
114
+#if defined(_PC_ACL_EXTENDED)
115
+			} else if (pathconf(lp_state_directory(), _PC_ACL_EXTENDED) == 1) {
116
+				lp_do_parameter(-1, "vfs objects", "dfs_samba4 freebsd");
117
+#endif
118
+#if defined(_PC_ACL_NFS4)
119
+			} else if (pathconf(lp_state_directory(), _PC_ACL_NFS4) == 1) {
120
+				lp_do_parameter(-1, "vfs objects", "dfs_samba4 zfsacl");
121
+#endif
122
			} else if (lp_parm_const_string(-1, "posix", "eadb", NULL)) {
123
				lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr posix_eadb");
124
			} else {
125
+				/*
126
+				 * This should only set dfs_samba4 and leave acl_xattr
127
+				 * to be set later (or zfsacl). The only reason the decision
128
+				 * can't be made here to load acl_xattr or zfsacl is
129
+				 * that we don't have access to what the target
130
+				 * directory is.
131
+				 */
132
				lp_do_parameter(-1, "vfs objects", "dfs_samba4 acl_xattr");
133
			}
134
		}
135
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c
136
index 63fc5d68c33..f5a536ee186 100644
137
--- a/source3/smbd/pysmbd.c
138
+++ b/source3/smbd/pysmbd.c
139
@@ -419,6 +419,20 @@ static SMB_ACL_T make_simple_acl(TALLOC_CTX *mem_ctx,
140
	return acl;
141
 }
142
143
+static SMB_ACL_T make_simple_nfsv4_acl(TALLOC_CTX *mem_ctx,
144
+					gid_t gid,
145
+					mode_t chmod_mode)
146
+{
147
+	/*
148
+	 * This function needs to create an NFSv4 ACL. Currently, the only way
149
+	 * to do so is to use the operating system interface, or to use the
150
+	 * functions in source3/modules/nfs4_acls.c. These seems ugly and
151
+	 * hacky. NFSv4 ACL's should be a first class citizen and
152
+	 * librpc/idl/smb_acl.idl should be modified accordingly.
153
+	 */
154
+	return NULL;
155
+}
156
+
157
 /*
158
   set a simple ACL on a file, as a test
159
  */
160
@@ -491,7 +505,85 @@ static PyObject *py_smbd_set_simple_acl(PyObject *self
161
	Py_RETURN_NONE;
162
 }
163
164
+
165
 /*
166
+  set a simple NFSv4 ACL on a file, as a test
167
+ */
168
+static PyObject *py_smbd_set_simple_nfsv4_acl(PyObject *self, PyObject *args, PyObject *kwargs)
169
+{
170
+	const char * const kwnames[] = {
171
+		"fname",
172
+		"mode",
173
+		"session_info",
174
+		"gid",
175
+		"service",
176
+		NULL
177
+	};
178
+	char *fname, *service = NULL;
179
+	PyObject *py_session = Py_None;
180
+	struct auth_session_info *session_info = NULL;
181
+	int ret;
182
+	int mode, gid = -1;
183
+	SMB_ACL_T acl;
184
+	TALLOC_CTX *frame;
185
+	connection_struct *conn;
186
+
187
+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "siO|iz",
188
+					 discard_const_p(char *, kwnames),
189
+					 &fname,
190
+					 &mode,
191
+					 &py_session,
192
+					 &gid,
193
+					 &service))
194
+		return NULL;
195
+
196
+	if (!py_check_dcerpc_type(py_session,
197
+				  "samba.dcerpc.auth",
198
+				  "session_info")) {
199
+		return NULL;
200
+	}
201
+	session_info = pytalloc_get_type(py_session,
202
+					 struct auth_session_info);
203
+	if (session_info == NULL) {
204
+		PyErr_Format(PyExc_TypeError,
205
+			     "Expected auth_session_info for session_info argument got %s",
206
+			     pytalloc_get_name(py_session));
207
+		return NULL;
208
+	}
209
+
210
+	frame = talloc_stackframe();
211
+
212
+	acl = make_simple_nfsv4_acl(frame, gid, mode);
213
+	if (acl == NULL) {
214
+		TALLOC_FREE(frame);
215
+		Py_RETURN_NONE;
216
+	}
217
+
218
+	conn = get_conn_tos(service, session_info);
219
+	if (!conn) {
220
+		TALLOC_FREE(frame);
221
+		Py_RETURN_NONE;
222
+	}
223
+
224
+	/*
225
+	 * SMB_ACL_TYPE_ACCESS -> ACL_TYPE_ACCESS -> Not valid for NFSv4 ACL
226
+	 */
227
+	ret = 0;
228
+
229
+	/* ret = set_sys_acl_conn(fname, SMB_ACL_TYPE_ACCESS, acl, conn); */
230
+
231
+	if (ret != 0) {
232
+		TALLOC_FREE(frame);
233
+		errno = ret;
234
+		return PyErr_SetFromErrno(PyExc_OSError);
235
+	}
236
+
237
+	TALLOC_FREE(frame);
238
+
239
+	Py_RETURN_NONE;
240
+}
241
+
242
+/*
243
   chown a file
244
  */
245
 static PyObject *py_smbd_chown(PyObject *self, PyObject *args, PyObject *kwargs)
246
@@ -665,7 +757,7 @@ static PyObject *py_smbd_unlink(PyObject *self, PyObje
247
 }
248
249
 /*
250
-  check if we have ACL support
251
+  check if we have POSIX.1e ACL support
252
  */
253
 static PyObject *py_smbd_have_posix_acls(PyObject *self,
254
		PyObject *Py_UNUSED(ignored))
255
@@ -677,7 +769,84 @@ static PyObject *py_smbd_have_posix_acls(PyObject *sel
256
 #endif
257
 }
258
259
+static PyObject *py_smbd_has_posix_acls(PyObject *self, PyObject *args, PyObject *kwargs)
260
+{
261
+	const char * const kwnames[] = { "path", NULL };
262
+	char *path = NULL;
263
+	TALLOC_CTX *frame;
264
+	struct statfs fs;
265
+	int ret = false;
266
+
267
+	frame = talloc_stackframe();
268
+
269
+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z",
270
+					 discard_const_p(char *, kwnames), &path)) {
271
+		TALLOC_FREE(frame);
272
+		return NULL;
273
+	}
274
+
275
+	if (statfs(path, &fs) != 0) {
276
+		TALLOC_FREE(frame);
277
+		return NULL;
278
+	}
279
+
280
+	if (fs.f_flags & MNT_ACLS)
281
+		ret = true;
282
+
283
+	TALLOC_FREE(frame);
284
+	return PyBool_FromLong(ret);
285
+}
286
+
287
 /*
288
+  check if we have NFSv4 ACL support
289
+ */
290
+static PyObject *py_smbd_have_nfsv4_acls(PyObject *self)
291
+{
292
+#ifdef HAVE_LIBSUNACL
293
+	return PyBool_FromLong(true);
294
+#else
295
+	return PyBool_FromLong(false);
296
+#endif
297
+}
298
+
299
+static PyObject *py_smbd_has_nfsv4_acls(PyObject *self, PyObject *args, PyObject *kwargs)
300
+{
301
+	const char * const kwnames[] = { "path", NULL };
302
+	char *path = NULL;
303
+	TALLOC_CTX *frame;
304
+	struct statfs fs;
305
+	int ret = false;
306
+
307
+	frame = talloc_stackframe();
308
+
309
+	if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|z",
310
+					 discard_const_p(char *, kwnames), &path)) {
311
+		TALLOC_FREE(frame);
312
+		return NULL;
313
+	}
314
+
315
+	if (statfs(path, &fs) != 0) {
316
+		TALLOC_FREE(frame);
317
+		return NULL;
318
+	}
319
+
320
+	if (fs.f_flags & MNT_NFS4ACLS)
321
+		ret = true;
322
+
323
+	TALLOC_FREE(frame);
324
+	return PyBool_FromLong(ret);
325
+}
326
+
327
+
328
+static PyObject *py_smbd_set_nfsv4_defaults(PyObject *self)
329
+{
330
+	/*
331
+	 * It is really be done in source3/param/loadparm.c
332
+	 */
333
+	Py_RETURN_NONE;
334
+}
335
+
336
+/*
337
   set the NT ACL on a file
338
  */
339
 static PyObject *py_smbd_set_nt_acl(PyObject *self, PyObject *args, PyObject *kwargs)
340
@@ -1124,8 +1296,26 @@ static PyMethodDef py_smbd_methods[] = {
341
	{ "have_posix_acls",
342
		(PyCFunction)py_smbd_have_posix_acls, METH_NOARGS,
343
		NULL },
344
+	{ "has_posix_acls",
345
+		PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_posix_acls),
346
+		METH_VARARGS|METH_KEYWORDS,
347
+		NULL },
348
+	{ "have_nfsv4_acls",
349
+		(PyCFunction)py_smbd_have_nfsv4_acls, METH_NOARGS,
350
+		NULL },
351
+	{ "has_nfsv4_acls",
352
+		PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_has_nfsv4_acls),
353
+		METH_VARARGS|METH_KEYWORDS,
354
+		NULL },
355
+	{ "set_nfsv4_defaults",
356
+		(PyCFunction)py_smbd_set_nfsv4_defaults, METH_NOARGS,
357
+		NULL },
358
	{ "set_simple_acl",
359
		PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_acl),
360
+		METH_VARARGS|METH_KEYWORDS,
361
+		NULL },
362
+	{ "set_simple_nfsv4_acl",
363
+		PY_DISCARD_FUNC_SIG(PyCFunction, py_smbd_set_simple_nfsv4_acl),
364
		METH_VARARGS|METH_KEYWORDS,
365
		NULL },
366
	{ "set_nt_acl",
367
--
368
2.14.2
(-)b/net/samba415/files/README.FreeBSD.in (+90 lines)
Added Link Here
1
2
              !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
3
              !!! Please read before runing any tools !!!
4
              !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
5
6
Documentation
7
=============
8
9
    o https://wiki.samba.org/index.php/Samba4/HOWTO
10
11
    o https://wiki.samba.org/index.php/Samba_AD_DC_HOWTO
12
13
    o https://wiki.samba.org/index.php/Samba4/samba-tool/domain/classicupgrade/HOWTO
14
15
FreeBSD specific information
16
============================
17
18
* Your configuration is in: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
19
20
* All the logs are under: %%SAMBA4_LOGDIR%%
21
22
* All the relevant databases are under: %%SAMBA4_LOCKDIR%%
23
24
* Provisioning script is: %%PREFIX%%/bin/samba-tool
25
26
Samba4 provisioning requires file system(s) with the ACLs support. On
27
UFS2 you need to enable POSIX ACLs by adding 'acls' option to the mount
28
flags, on ZFS you need to use NFSv4 ACLs and `zfsacl` VFS module to get
29
provisioning work.
30
31
There is a hack in the code, that makes provisioning work on UFS2 and in
32
the jails on the price of using USER extattr(2) namespace, which is less
33
secure than SYSTEM namespace, as can be edited not only by root user, but
34
also by the owner of the file.
35
36
For the provisioning on ZFS you need to use additional parameters to the
37
samba-tool, that would explicitly add `zfsacl` to the default `vfs objects`:
38
39
    # samba-tool domain provision --interactive \
40
            --option="vfs objects"="dfs_samba4 zfsacl"
41
42
To run this port you need to perform the following steps:
43
---------------------------------------------------------
44
45
0. If you had Samba3 port installed before, please, *take backups* of
46
all the relevant files. That includes 'smb.conf' file and all the
47
content of the '/var/db/samba/' directory.
48
49
1a. Create new '%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%' file by running:
50
51
    # samba-tool domain provision
52
53
1b. Or upgrade from the Samba3 'smb.conf' file by running:
54
55
    # samba-tool domain classicupgrade
56
57
%%NSUPDATE%%1c. You will need to specify location of the 'nsupdate' command in the
58
%%NSUPDATE%%'%%SAMBA4_CONFIG%%' file:
59
%%NSUPDATE%%
60
%%NSUPDATE%%      nsupdate command = %%PREFIX%%/bin/samba-nsupdate -g
61
%%NSUPDATE%%
62
2. Put string 'samba_server_enable="YES"' into your /etc/rc.conf.
63
64
3. Make sure that your server doesn't run Samba3, OpenLDAP and named.
65
Stop them, if necessary.
66
67
4. Run '%%PREFIX%%/etc/rc.d/samba_server start' or reboot.
68
69
Please, check archives of samba@lists.samba.org and ask there for help,
70
if necessary:
71
72
    https://lists.samba.org/archive/samba/
73
74
In case you found a bug which is clearly not related to the port build
75
process itself, plese file a bug report at:
76
77
    https://bugzilla.samba.org/
78
79
And add me to CC list.
80
81
You may find those tools helpful:
82
---------------------------------
83
84
Microsoft Remote Server Administration Tools (RSAT) for:
85
86
* Vista: http://www.microsoft.com/en-us/download/details.aspx?id=21090
87
* Windows 7: http://www.microsoft.com/en-us/download/details.aspx?id=7887
88
89
90
FreeBSD Samba4 port maintainer: Timur I. Bakeyev <timur@FreeBSD.org>
(-)b/net/samba415/files/disabled/patch-bind (+274 lines)
Added Link Here
1
--- python/samba/provision/sambadns.py.orig	2020-11-03 14:33:19 UTC
2
+++ python/samba/provision/sambadns.py
3
@@ -27,6 +27,7 @@ import time
4
 import ldb
5
 from base64 import b64encode
6
 import subprocess
7
+import re
8
 import samba
9
 from samba.tdb_util import tdb_copy
10
 from samba.mdb_util import mdb_copy
11
@@ -957,47 +958,38 @@ def create_named_conf(paths, realm, dnsdomain, dns_bac
12
                                      stderr=subprocess.STDOUT,
13
                                      cwd='.').communicate()[0]
14
         bind_info = get_string(bind_info)
15
-        bind9_8 = '#'
16
-        bind9_9 = '#'
17
-        bind9_10 = '#'
18
-        bind9_11 = '#'
19
-        bind9_12 = '#'
20
-        bind9_14 = '#'
21
-        bind9_16 = '#'
22
-        if bind_info.upper().find('BIND 9.8') != -1:
23
-            bind9_8 = ''
24
-        elif bind_info.upper().find('BIND 9.9') != -1:
25
-            bind9_9 = ''
26
-        elif bind_info.upper().find('BIND 9.10') != -1:
27
-            bind9_10 = ''
28
-        elif bind_info.upper().find('BIND 9.11') != -1:
29
-            bind9_11 = ''
30
-        elif bind_info.upper().find('BIND 9.12') != -1:
31
-            bind9_12 = ''
32
-        elif bind_info.upper().find('BIND 9.14') != -1:
33
-            bind9_14 = ''
34
-        elif bind_info.upper().find('BIND 9.16') != -1:
35
-            bind9_16 = ''
36
-        elif bind_info.upper().find('BIND 9.7') != -1:
37
-            raise ProvisioningError("DLZ option incompatible with BIND 9.7.")
38
-        elif bind_info.upper().find('BIND_9.13') != -1:
39
-            raise ProvisioningError("Only stable/esv releases of BIND are supported.")
40
-        elif bind_info.upper().find('BIND_9.15') != -1:
41
-            raise ProvisioningError("Only stable/esv releases of BIND are supported.")
42
-        elif bind_info.upper().find('BIND_9.17') != -1:
43
-            raise ProvisioningError("Only stable/esv releases of BIND are supported.")
44
+
45
+        bind9_release = re.search('BIND (9)\.(\d+)\.', bind_info, re.I)
46
+        if bind9_release:
47
+            bind9_disabled = ''
48
+            bind9_version = bind9_release.group(0) + "x"
49
+            bind9_version_major = int(bind9_release.group(1))
50
+            bind9_version_minor = int(bind9_release.group(2))
51
+            if bind9_version_minor == 7:
52
+                raise ProvisioningError("DLZ option incompatible with BIND 9.7.")
53
+            elif bind9_version_minor == 8:
54
+                bind9_dlz_version = "9"
55
+            elif bind9_version_minor in [13, 15, 17]:
56
+                raise ProvisioningError("Only stable/esv releases of BIND are supported.")
57
+            else:
58
+                bind9_dlz_version = "%d_%d" % (bind9_version_major, bind9_version_minor)
59
         else:
60
+            bind9_disabled = '# '
61
+            bind9_version = "BIND z.y.x"
62
+            bind9_dlz_version = "z_y"
63
             logger.warning("BIND version unknown, please modify %s manually." % paths.namedconf)
64
+
65
+        bind9_dlz = (
66
+            '    # For %s\n'
67
+            '    %sdatabase "dlopen %s/bind9/dlz_bind%s.so";'
68
+        ) % (
69
+            bind9_version, bind9_disabled, samba.param.modules_dir(), bind9_dlz_version
70
+        )
71
+
72
         setup_file(setup_path("named.conf.dlz"), paths.namedconf, {
73
                     "NAMED_CONF": paths.namedconf,
74
                     "MODULESDIR": samba.param.modules_dir(),
75
-                    "BIND9_8": bind9_8,
76
-                    "BIND9_9": bind9_9,
77
-                    "BIND9_10": bind9_10,
78
-                    "BIND9_11": bind9_11,
79
-                    "BIND9_12": bind9_12,
80
-                    "BIND9_14": bind9_14,
81
-                    "BIND9_16": bind9_16
82
+                    "BIND9_DLZ": bind9_dlz
83
                     })
84
85
86
--- source4/dns_server/dlz_minimal.h.orig	2019-12-06 10:10:30 UTC
87
+++ source4/dns_server/dlz_minimal.h
88
@@ -26,32 +26,31 @@
89
 #include <stdint.h>
90
 #include <stdbool.h>
91
92
-#if defined (BIND_VERSION_9_8)
93
-# define DLZ_DLOPEN_VERSION 1
94
-#elif defined (BIND_VERSION_9_9)
95
-# define DLZ_DLOPEN_VERSION 2
96
-# define DNS_CLIENTINFO_VERSION 1
97
-# define ISC_BOOLEAN_AS_BOOL 0
98
-#elif defined (BIND_VERSION_9_10)
99
-# define DLZ_DLOPEN_VERSION 3
100
-# define DNS_CLIENTINFO_VERSION 1
101
-# define ISC_BOOLEAN_AS_BOOL 0
102
-#elif defined (BIND_VERSION_9_11)
103
-# define DLZ_DLOPEN_VERSION 3
104
-# define DNS_CLIENTINFO_VERSION 2
105
-# define ISC_BOOLEAN_AS_BOOL 0
106
-#elif defined (BIND_VERSION_9_12)
107
-# define DLZ_DLOPEN_VERSION 3
108
-# define DNS_CLIENTINFO_VERSION 2
109
-# define ISC_BOOLEAN_AS_BOOL 0
110
-#elif defined (BIND_VERSION_9_14)
111
-# define DLZ_DLOPEN_VERSION 3
112
-# define DNS_CLIENTINFO_VERSION 2
113
-#elif defined (BIND_VERSION_9_16)
114
-# define DLZ_DLOPEN_VERSION 3
115
-# define DNS_CLIENTINFO_VERSION 2
116
+#if defined (BIND_VERSION)
117
+# if BIND_VERSION == 908
118
+#  define DLZ_DLOPEN_VERSION 1
119
+# elif BIND_VERSION == 909
120
+#  define DLZ_DLOPEN_VERSION 2
121
+#  define DNS_CLIENTINFO_VERSION 1
122
+#  define ISC_BOOLEAN_AS_BOOL 0
123
+# elif BIND_VERSION == 910
124
+#  define DLZ_DLOPEN_VERSION 3
125
+#  define DNS_CLIENTINFO_VERSION 1
126
+#  define ISC_BOOLEAN_AS_BOOL 0
127
+# elif BIND_VERSION == 911 || BIND_VERSION == 912
128
+#  define DLZ_DLOPEN_VERSION 3
129
+#  define DNS_CLIENTINFO_VERSION 2
130
+#  define ISC_BOOLEAN_AS_BOOL 0
131
+# elif BIND_VERSION >= 914
132
+#  define DLZ_DLOPEN_VERSION 3
133
+#  define DNS_CLIENTINFO_VERSION 2
134
+#  define ISC_BOOLEAN_AS_BOOL 1
135
+# else
136
+#  error Unsupported BIND version
137
+# endif
138
 #else
139
 # error Unsupported BIND version
140
+# error BIND_VERSION undefined
141
 #endif
142
143
 #ifndef ISC_BOOLEAN_AS_BOOL
144
--- source4/dns_server/wscript_build.orig	2019-12-06 10:11:08 UTC
145
+++ source4/dns_server/wscript_build
146
@@ -20,7 +20,7 @@ bld.SAMBA_MODULE('service_dns',
147
 # a bind9 dlz module giving access to the Samba DNS SAM
148
 bld.SAMBA_LIBRARY('dlz_bind9',
149
                   source='dlz_bind9.c',
150
-                  cflags='-DBIND_VERSION_9_8',
151
+                  cflags='-DBIND_VERSION=908',
152
                   private_library=True,
153
                   link_name='modules/bind9/dlz_bind9.so',
154
                   realname='dlz_bind9.so',
155
@@ -28,69 +28,21 @@ bld.SAMBA_LIBRARY('dlz_bind9',
156
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
157
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
158
159
-bld.SAMBA_LIBRARY('dlz_bind9_9',
160
+for bind_version in (909, 910, 911, 912, 914, 916):
161
+    string_version='%d_%d' % (bind_version//100, bind_version % 100)
162
+    bld.SAMBA_LIBRARY('dlz_bind%s' % (string_version),
163
                   source='dlz_bind9.c',
164
-                  cflags='-DBIND_VERSION_9_9',
165
+                  cflags='-DBIND_VERSION=%d' % bind_version,
166
                   private_library=True,
167
-                  link_name='modules/bind9/dlz_bind9_9.so',
168
-                  realname='dlz_bind9_9.so',
169
+                  link_name='modules/bind9/dlz_bind%s.so' % (string_version),
170
+                  realname='dlz_bind%s.so' % (string_version),
171
                   install_path='${MODULESDIR}/bind9',
172
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
173
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
174
175
-bld.SAMBA_LIBRARY('dlz_bind9_10',
176
-                  source='dlz_bind9.c',
177
-                  cflags='-DBIND_VERSION_9_10',
178
-                  private_library=True,
179
-                  link_name='modules/bind9/dlz_bind9_10.so',
180
-                  realname='dlz_bind9_10.so',
181
-                  install_path='${MODULESDIR}/bind9',
182
-                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
183
-                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
184
-
185
-bld.SAMBA_LIBRARY('dlz_bind9_11',
186
-                  source='dlz_bind9.c',
187
-                  cflags='-DBIND_VERSION_9_11',
188
-                  private_library=True,
189
-                  link_name='modules/bind9/dlz_bind9_11.so',
190
-                  realname='dlz_bind9_11.so',
191
-                  install_path='${MODULESDIR}/bind9',
192
-                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
193
-                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
194
-
195
-bld.SAMBA_LIBRARY('dlz_bind9_12',
196
-                  source='dlz_bind9.c',
197
-                  cflags='-DBIND_VERSION_9_12',
198
-                  private_library=True,
199
-                  link_name='modules/bind9/dlz_bind9_12.so',
200
-                  realname='dlz_bind9_12.so',
201
-                  install_path='${MODULESDIR}/bind9',
202
-                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
203
-                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
204
-
205
-bld.SAMBA_LIBRARY('dlz_bind9_14',
206
-                  source='dlz_bind9.c',
207
-                  cflags='-DBIND_VERSION_9_14',
208
-                  private_library=True,
209
-                  link_name='modules/bind9/dlz_bind9_14.so',
210
-                  realname='dlz_bind9_14.so',
211
-                  install_path='${MODULESDIR}/bind9',
212
-                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
213
-                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
214
-
215
-bld.SAMBA_LIBRARY('dlz_bind9_16',
216
-                  source='dlz_bind9.c',
217
-                  cflags='-DBIND_VERSION_9_16',
218
-                  private_library=True,
219
-                  link_name='modules/bind9/dlz_bind9_16.so',
220
-                  realname='dlz_bind9_16.so',
221
-                  install_path='${MODULESDIR}/bind9',
222
-                  deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
223
-                  enabled=bld.AD_DC_BUILD_IS_ENABLED())
224
-
225
 bld.SAMBA_LIBRARY('dlz_bind9_for_torture',
226
                   source='dlz_bind9.c',
227
-                  cflags='-DBIND_VERSION_9_8',
228
+                  cflags='-DBIND_VERSION=908',
229
                   private_library=True,
230
                   deps='samba-hostconfig samdb-common gensec popt dnsserver_common',
231
                   enabled=bld.AD_DC_BUILD_IS_ENABLED())
232
--- source4/setup/named.conf.dlz.orig	2019-12-06 10:10:31 UTC
233
+++ source4/setup/named.conf.dlz
234
@@ -7,28 +7,10 @@
235
236
 #
237
 # This configures dynamically loadable zones (DLZ) from AD schema
238
-# Uncomment only single database line, depending on your BIND version
239
 #
240
 dlz "AD DNS Zone" {
241
-    # For BIND 9.8.x
242
-    ${BIND9_8} database "dlopen ${MODULESDIR}/bind9/dlz_bind9.so";
243
244
-    # For BIND 9.9.x
245
-    ${BIND9_9} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_9.so";
246
+${BIND9_DLZ}
247
248
-    # For BIND 9.10.x
249
-    ${BIND9_10} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_10.so";
250
-
251
-    # For BIND 9.11.x
252
-    ${BIND9_11} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_11.so";
253
-
254
-    # For BIND 9.12.x
255
-    ${BIND9_12} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_12.so";
256
-
257
-    # For BIND 9.14.x
258
-    ${BIND9_14} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_14.so";
259
-
260
-    # For BIND 9.16.x
261
-    ${BIND9_16} database "dlopen ${MODULESDIR}/bind9/dlz_bind9_16.so";
262
 };
263
264
--- source4/torture/dns/wscript_build.orig	2020-04-11 03:26:46 UTC
265
+++ source4/torture/dns/wscript_build
266
@@ -5,7 +5,7 @@ if bld.AD_DC_BUILD_IS_ENABLED():
267
		source='dlz_bind9.c',
268
		subsystem='smbtorture',
269
		init_function='torture_bind_dns_init',
270
-		cflags='-DBIND_VERSION_9_8',
271
+		cflags='-DBIND_VERSION=908',
272
		deps='torture talloc torturemain dlz_bind9_for_torture',
273
		internal_module=True
274
		)
(-)b/net/samba415/files/disabled/patch-buildtools_scripts_abi__gen.sh (+21 lines)
Added Link Here
1
--- buildtools/scripts/abi_gen.sh.orig	2019-01-15 10:07:00 UTC
2
+++ buildtools/scripts/abi_gen.sh
3
@@ -9,13 +9,14 @@ GDBSCRIPT="gdb_syms.$$"
4
 cat <<EOF
5
 set height 0
6
 set width 0
7
+set print sevenbit-strings on
8
 EOF
9
-nm "$SHAREDLIB" | cut -d' ' -f2- | egrep '^[BDGTRVWS]' | grep -v @ | egrep -v ' (__bss_start|_edata|_init|_fini|_end)' | cut -c3- | sort | while read s; do
10
-    echo "echo $s: "
11
-    echo p $s
12
+nm "$SHAREDLIB" | cut -d" "  -f2- | awk '/^[BDGTRVWS]/ && !/@|__bss_start|_edata|_init|_fini|_end/ { print $2 }' | sort | while read s; do
13
+    echo "echo $s:\\ "
14
+    echo whatis $s
15
 done
16
 ) > $GDBSCRIPT
17
18
 # forcing the terminal avoids a problem on Fedora12
19
-TERM=none gdb -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null
20
+TERM=none %%GDB_CMD%% -n -batch -x $GDBSCRIPT "$SHAREDLIB" < /dev/null | sed -e 's/:type =/:/g'
21
 rm -f $GDBSCRIPT
(-)b/net/samba415/files/disabled/patch-buildtools_wafsamba_samba__autoconf.py (+35 lines)
Added Link Here
1
--- buildtools/wafsamba/samba_autoconf.py.orig	2019-08-20 15:35:08 UTC
2
+++ buildtools/wafsamba/samba_autoconf.py
3
@@ -573,7 +573,7 @@ def library_flags(self, libs):
4
5
6
 @conf
7
-def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False):
8
+def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False, msg=None):
9
     '''check if a set of libraries exist as system libraries
10
11
     returns the sublist of libs that do exist as a syslib or []
12
@@ -593,11 +593,14 @@ int foo()
13
             ret.append(lib)
14
             continue
15
16
+        if msg is None:
17
+            msg = 'Checking for library %s' % lib
18
+
19
         (ccflags, ldflags, cpppath) = library_flags(conf, lib)
20
         if shlib:
21
-            res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
22
+            res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
23
         else:
24
-            res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
25
+            res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
26
27
         if not res:
28
             if mandatory:
29
@@ -949,5 +952,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(c
30
         conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
31
32
         if (conf.env.undefined_ignore_ldflags == [] and
33
-            conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])):
34
+            conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)):
35
             conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
(-)b/net/samba415/files/disabled/patch-buildtools_wafsamba_samba__install.py (+11 lines)
Added Link Here
1
--- buildtools/wafsamba/samba_install.py.orig	2019-01-15 10:07:00 UTC
2
+++ buildtools/wafsamba/samba_install.py
3
@@ -118,7 +118,7 @@ def install_library(self):
4
                 inst_name    = bld.make_libname(t.target)
5
         elif self.vnum:
6
             vnum_base    = self.vnum.split('.')[0]
7
-            install_name = bld.make_libname(target_name, version=self.vnum)
8
+            install_name = bld.make_libname(target_name, version=vnum_base)
9
             install_link = bld.make_libname(target_name, version=vnum_base)
10
             inst_name    = bld.make_libname(t.target)
11
             if not self.private_library or not t.env.SONAME_ST:
(-)b/net/samba415/files/disabled/patch-buildtools_wafsamba_wafsamba.py (+11 lines)
Added Link Here
1
--- ./buildtools/wafsamba/wafsamba.py.orig	2015-07-21 09:47:48 UTC
2
+++ ./buildtools/wafsamba/wafsamba.py
3
@@ -919,7 +919,7 @@ def SAMBAMANPAGES(bld, manpages, extra_s
4
     bld.env.SAMBA_EXPAND_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/expand-sambadoc.xsl'
5
     bld.env.SAMBA_MAN_XSL = bld.srcnode.abspath() + '/docs-xml/xslt/man.xsl'
6
     bld.env.SAMBA_CATALOG = bld.bldnode.abspath() + '/docs-xml/build/catalog.xml'
7
-    bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file:///usr/local/share/xml/catalog file://' + bld.env.SAMBA_CATALOG
8
+    bld.env.SAMBA_CATALOGS = 'file:///etc/xml/catalog file://%%LOCALBASE%%/share/xml/catalog file://' + bld.env.SAMBA_CATALOG
9
10
     for m in manpages.split():
11
         source = m + '.xml'
(-)b/net/samba415/files/disabled/patch-buildtools_wafsamba_wscript (+22 lines)
Added Link Here
1
--- buildtools/wafsamba/wscript.orig	2019-01-15 10:07:00 UTC
2
+++ buildtools/wafsamba/wscript
3
@@ -80,12 +80,17 @@ def options(opt):
4
                    help=("private library directory [PREFIX/lib/%s]" % Context.g_module.APPNAME),
5
                    action="store", dest='PRIVATELIBDIR', default=None)
6
7
+    opt.add_option('--with-openldap',
8
+                   help='additional directory to search for OpenLDAP libs',
9
+                   action='store', dest='ldap_open', default=None,
10
+                   match = ['Checking for library lber', 'Checking for library ldap'])
11
+
12
     opt.add_option('--with-libiconv',
13
                    help='additional directory to search for libiconv',
14
-                   action='store', dest='iconv_open', default='/usr/local',
15
+                   action='store', dest='iconv_open', default=None,
16
                    match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h'])
17
     opt.add_option('--without-gettext',
18
-                   help=("Disable use of gettext"),
19
+                   help=("disable use of gettext"),
20
                    action="store_true", dest='disable_gettext', default=False)
21
22
     gr = opt.option_group('developer options')
(-)b/net/samba415/files/disabled/patch-ctdb_wscript (+62 lines)
Added Link Here
1
--- ctdb/wscript.orig	2020-01-31 10:25:36 UTC
2
+++ ctdb/wscript
3
@@ -104,6 +104,9 @@ def options(opt):
4
     opt.add_option('--enable-ceph-reclock',
5
                    help=("Enable Ceph CTDB recovery lock helper (default=no)"),
6
                    action="store_true", dest='ctdb_ceph_reclock', default=False)
7
+    opt.add_option('--disable-ctdb-tests',
8
+                   help=("Disable CTDB tests (default=no)"),
9
+                   action="store_true", dest='ctdb_no_tests', default=False)
10
11
     opt.add_option('--with-logdir',
12
                    help=("Path to log directory"),
13
@@ -261,7 +264,7 @@ def configure(conf):
14
15
     if Options.options.ctdb_ceph_reclock:
16
         if (conf.CHECK_HEADERS('rados/librados.h', False, False, 'rados') and
17
-					conf.CHECK_LIB('rados', shlib=True)):
18
+                                         conf.CHECK_LIB('rados', shlib=True)):
19
             Logs.info('Building with Ceph librados recovery lock support')
20
             conf.define('HAVE_LIBRADOS', 1)
21
         else:
22
@@ -300,9 +303,15 @@ def configure(conf):
23
                     conf.env.CTDB_VARDIR,
24
                     conf.env.CTDB_RUNDIR))
25
26
-    conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
27
-    conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
28
+    if Options.options.ctdb_no_tests:
29
+        conf.env.ctdb_tests = False
30
+    else:
31
+        conf.env.ctdb_tests = True
32
33
+    if conf.env.ctdb_tests:
34
+        conf.env.CTDB_TEST_DATADIR = os.path.join(conf.env.CTDB_DATADIR, 'tests')
35
+        conf.env.CTDB_TEST_LIBEXECDIR = os.path.join(conf.env.LIBEXECDIR, 'ctdb/tests')
36
+
37
     # Allow unified compilation and separate compilation of utilities
38
     # to find includes
39
     if not conf.env.standalone_ctdb:
40
@@ -681,9 +690,9 @@ def build(bld):
41
     if bld.env.HAVE_LIBRADOS:
42
         bld.SAMBA_BINARY('ctdb_mutex_ceph_rados_helper',
43
                          source='utils/ceph/ctdb_mutex_ceph_rados_helper.c',
44
-			 deps='talloc tevent rados',
45
-			 includes='include',
46
-			 install_path='${CTDB_HELPER_BINDIR}')
47
+                         deps='talloc tevent rados',
48
+                         includes='include',
49
+                         install_path='${CTDB_HELPER_BINDIR}')
50
51
     sed_expr1 = 's|/usr/local/var/lib/ctdb|%s|g'  % (bld.env.CTDB_VARDIR)
52
     sed_expr2 = 's|/usr/local/etc/ctdb|%s|g'      % (bld.env.CTDB_ETCDIR)
53
@@ -859,6 +868,9 @@ def build(bld):
54
55
     for d in ['volatile', 'persistent', 'state']:
56
         bld.INSTALL_DIR(os.path.join(bld.env.CTDB_VARDIR, d))
57
+
58
+    if not bld.env.ctdb_tests:
59
+        return
60
61
     bld.SAMBA_BINARY('errcode',
62
                      source='tests/src/errcode.c',
(-)b/net/samba415/files/disabled/patch-dwrap (+96 lines)
Added Link Here
1
--- lib/dbwrap/dbwrap.c.orig	2019-01-15 10:07:00 UTC
2
+++ lib/dbwrap/dbwrap.c
3
@@ -28,6 +28,9 @@
4
 #include "lib/util/util_tdb.h"
5
 #include "lib/util/tevent_ntstatus.h"
6
7
+#undef DBGC_CLASS
8
+#define DBGC_CLASS DBGC_LOCKING
9
+
10
 /*
11
  * Fall back using fetch if no genuine exists operation is provided
12
  */
13
--- lib/dbwrap/dbwrap_local_open.c.orig	2019-01-15 10:07:00 UTC
14
+++ lib/dbwrap/dbwrap_local_open.c
15
@@ -23,6 +23,9 @@
16
 #include "dbwrap/dbwrap_tdb.h"
17
 #include "tdb.h"
18
19
+#undef DBGC_CLASS
20
+#define DBGC_CLASS DBGC_LOCKING
21
+
22
 struct db_context *dbwrap_local_open(TALLOC_CTX *mem_ctx,
23
				     const char *name,
24
				     int hash_size, int tdb_flags,
25
--- lib/dbwrap/dbwrap_rbt.c.orig	2019-01-15 10:07:00 UTC
26
+++ lib/dbwrap/dbwrap_rbt.c
27
@@ -24,6 +24,9 @@
28
 #include "../lib/util/rbtree.h"
29
 #include "../lib/util/dlinklist.h"
30
31
+#undef DBGC_CLASS
32
+#define DBGC_CLASS DBGC_LOCKING
33
+
34
 #define DBWRAP_RBT_ALIGN(_size_) (((_size_)+15)&~15)
35
36
 struct db_rbt_ctx {
37
--- lib/dbwrap/dbwrap_tdb.c.orig	2019-01-15 10:07:00 UTC
38
+++ lib/dbwrap/dbwrap_tdb.c
39
@@ -27,6 +27,9 @@
40
 #include "lib/param/param.h"
41
 #include "libcli/util/error.h"
42
43
+#undef DBGC_CLASS
44
+#define DBGC_CLASS DBGC_LOCKING
45
+
46
 struct db_tdb_ctx {
47
	struct tdb_wrap *wtdb;
48
49
--- lib/dbwrap/dbwrap_util.c.orig	2019-01-15 10:07:00 UTC
50
+++ lib/dbwrap/dbwrap_util.c
51
@@ -26,6 +26,9 @@
52
 #include "dbwrap.h"
53
 #include "lib/util/util_tdb.h"
54
55
+#undef DBGC_CLASS
56
+#define DBGC_CLASS DBGC_LOCKING
57
+
58
 struct dbwrap_fetch_int32_state {
59
	NTSTATUS status;
60
	int32_t result;
61
--- source3/lib/dbwrap/dbwrap_ctdb.c.orig	2019-01-15 10:07:00 UTC
62
+++ source3/lib/dbwrap/dbwrap_ctdb.c
63
@@ -38,6 +38,9 @@
64
 #include "lib/cluster_support.h"
65
 #include "lib/util/tevent_ntstatus.h"
66
67
+#undef DBGC_CLASS
68
+#define DBGC_CLASS DBGC_LOCKING
69
+
70
 struct db_ctdb_transaction_handle {
71
	struct db_ctdb_ctx *ctx;
72
	/*
73
--- source3/lib/dbwrap/dbwrap_open.c.orig	2019-01-15 10:07:00 UTC
74
+++ source3/lib/dbwrap/dbwrap_open.c
75
@@ -31,6 +31,9 @@
76
 #include "ctdbd_conn.h"
77
 #include "messages.h"
78
79
+#undef DBGC_CLASS
80
+#define DBGC_CLASS DBGC_LOCKING
81
+
82
 bool db_is_local(const char *name)
83
 {
84
	const char *sockname = lp_ctdbd_socket();
85
--- source3/lib/dbwrap/dbwrap_watch.c.orig	2019-01-15 10:07:00 UTC
86
+++ source3/lib/dbwrap/dbwrap_watch.c
87
@@ -28,6 +28,9 @@
88
 #include "server_id_watch.h"
89
 #include "lib/dbwrap/dbwrap_private.h"
90
91
+#undef DBGC_CLASS
92
+#define DBGC_CLASS DBGC_LOCKING
93
+
94
 struct dbwrap_watcher {
95
	/*
96
	 * Process watching this record
(-)b/net/samba415/files/disabled/patch-dynconfig_wscript (+31 lines)
Added Link Here
1
--- dynconfig/wscript.orig	2019-01-15 10:07:00 UTC
2
+++ dynconfig/wscript
3
@@ -141,6 +141,8 @@ dynconfig = {
4
     'PKGCONFIGDIR' : {
5
          'STD-PATH':  '${LIBDIR}/pkgconfig',
6
          'FHS-PATH':  '${LIBDIR}/pkgconfig',
7
+         'OPTION':    '--with-pkgconfigdir',
8
+         'HELPTEXT':  'Where to put .pc files',
9
     },
10
     'CODEPAGEDIR' : {
11
          'STD-PATH':  '${DATADIR}/codepages',
12
@@ -247,8 +249,8 @@ dynconfig = {
13
          'DELAY':     True,
14
     },
15
     'CONFIGFILE' : {
16
-         'STD-PATH':  '${CONFIGDIR}/smb.conf',
17
-         'FHS-PATH':  '${CONFIGDIR}/smb.conf',
18
+         'STD-PATH':  '${CONFIGDIR}/%%SAMBA4_CONFIG%%',
19
+         'FHS-PATH':  '${CONFIGDIR}/%%SAMBA4_CONFIG%%',
20
          'DELAY':     True,
21
     },
22
     'LMHOSTSFILE' : {
23
@@ -307,9 +309,6 @@ def configure(conf):
24
         flavor = 'FHS-PATH'
25
     else:
26
         flavor = 'STD-PATH'
27
-        if conf.env.PREFIX == '/usr' or conf.env.PREFIX == '/usr/local':
28
-           Logs.error("Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)")
29
-           raise Errors.WafError("ERROR: invalid --prefix=%s value" % (conf.env.PREFIX))
30
31
     explicit_set ={}
(-)b/net/samba415/files/disabled/patch-examples_pdb_wscript__build (+11 lines)
Added Link Here
1
--- examples/pdb/wscript_build.orig	2019-01-15 10:07:00 UTC
2
+++ examples/pdb/wscript_build
3
@@ -3,7 +3,7 @@
4
 bld.SAMBA3_MODULE('pdb_test',
5
                  subsystem='pdb',
6
                  source='test.c',
7
-                 deps='samba-util',
8
+                 deps='samba-util samba-debug',
9
                  init_function='',
10
                  internal_module=bld.SAMBA3_IS_STATIC_MODULE('pdb_test'),
11
                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('pdb_test'))
(-)b/net/samba415/files/disabled/patch-lib_ldb_ldb__key__value_ldb__kv__cache.c (+13 lines)
Added Link Here
1
--- lib/ldb/ldb_key_value/ldb_kv_cache.c.orig	2019-01-15 10:07:00 UTC
2
+++ lib/ldb/ldb_key_value/ldb_kv_cache.c
3
@@ -90,7 +90,9 @@ static int ldb_schema_attribute_compare(
4
 {
5
	const struct ldb_schema_attribute *sa1 = (const struct ldb_schema_attribute *)p1;
6
	const struct ldb_schema_attribute *sa2 = (const struct ldb_schema_attribute *)p2;
7
-	return ldb_attr_cmp(sa1->name, sa2->name);
8
+	int res = ldb_attr_cmp(sa1->name, sa2->name);
9
+
10
+	return (res) ? res : (sa1->flags > sa2->flags) ? 1 : (sa1->flags < sa2->flags) ? -1 : 0;
11
 }
12
13
 /*
(-)b/net/samba415/files/disabled/patch-lib_ldb_wscript (+61 lines)
Added Link Here
1
--- lib/ldb/wscript.orig	2019-07-08 12:47:51 UTC
2
+++ lib/ldb/wscript
3
@@ -207,7 +207,7 @@ def build(bld):
4
     if bld.env.standalone_ldb:
5
         if not 'PACKAGE_VERSION' in bld.env:
6
             bld.env.PACKAGE_VERSION = VERSION
7
-        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
8
+        bld.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
9
         private_library = False
10
     else:
11
         private_library = True
12
@@ -284,7 +284,6 @@ def build(bld):
13
                           pc_files='ldb.pc',
14
                           vnum=VERSION,
15
                           private_library=private_library,
16
-                          manpages='man/ldb.3',
17
                           abi_directory='ABI',
18
                           abi_match = abi_match)
19
20
@@ -437,7 +436,7 @@ def build(bld):
21
22
         LDB_TOOLS='ldbadd ldbsearch ldbdel ldbmodify ldbedit ldbrename'
23
         for t in LDB_TOOLS.split():
24
-            bld.SAMBA_BINARY(t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
25
+            bld.SAMBA_BINARY('samba-%s' % t, 'tools/%s.c' % t, deps='ldb-cmdline ldb',
26
                              manpages='man/%s.1' % t)
27
28
         # ldbtest doesn't get installed
29
@@ -449,10 +448,10 @@ def build(bld):
30
         else:
31
             lmdb_deps = ''
32
         # ldbdump doesn't get installed
33
-        bld.SAMBA_BINARY('ldbdump',
34
+        bld.SAMBA_BINARY('samba-ldbdump',
35
                          'tools/ldbdump.c',
36
                          deps='ldb-cmdline ldb' + lmdb_deps,
37
-                         install=False)
38
+                         install=True)
39
40
         bld.SAMBA_LIBRARY('ldb-cmdline',
41
                           source='tools/ldbutil.c tools/cmdline.c',
42
@@ -497,11 +496,6 @@ def build(bld):
43
                          deps='cmocka ldb',
44
                          install=False)
45
46
-        bld.SAMBA_BINARY('ldb_match_test',
47
-                         source='tests/ldb_match_test.c',
48
-                         deps='cmocka ldb',
49
-                         install=False)
50
-
51
         bld.SAMBA_BINARY('ldb_key_value_test',
52
                          source='tests/ldb_key_value_test.c',
53
                          deps='cmocka ldb ldb_tdb_err_map',
54
@@ -609,7 +603,6 @@ def test(ctx):
55
                  'ldb_msg_test',
56
                  'ldb_tdb_kv_ops_test',
57
                  'ldb_tdb_test',
58
-                 'ldb_match_test',
59
                  'ldb_key_value_test',
60
                  # we currently don't run ldb_key_value_sub_txn_tdb_test as it
61
                  # tests the nested/sub transaction handling
(-)b/net/samba415/files/disabled/patch-lib_replace_wscript (+11 lines)
Added Link Here
1
--- lib/replace/wscript.orig	2019-01-15 10:07:00 UTC
2
+++ lib/replace/wscript
3
@@ -119,7 +119,7 @@ def configure(conf):
4
     conf.CHECK_HEADERS('sys/atomic.h stdatomic.h')
5
     conf.CHECK_HEADERS('libgen.h')
6
7
-    if conf.CHECK_CFLAGS('-Wno-format-truncation'):
8
+    if conf.CHECK_CFLAGS(['-Wno-format-truncation'] + conf.env.WERROR_CFLAGS):
9
         conf.define('HAVE_WNO_FORMAT_TRUNCATION', '1')
10
11
     if conf.CHECK_CFLAGS('-Wno-unused-function'):
(-)b/net/samba415/files/disabled/patch-lib_talloc_talloc.c (+20 lines)
Added Link Here
1
--- lib/talloc/talloc.c.orig	2019-01-15 10:07:00 UTC
2
+++ lib/talloc/talloc.c
3
@@ -391,6 +391,9 @@ void talloc_lib_init(void) __attribute__
4
 void talloc_lib_init(void)
5
 {
6
	uint32_t random_value;
7
+#if defined(HAVE_ARC4RANDOM)
8
+	random_value = arc4random();
9
+#else
10
 #if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM)
11
	uint8_t *p;
12
	/*
13
@@ -424,6 +427,7 @@ void talloc_lib_init(void)
14
		 */
15
		random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF);
16
	}
17
+#endif /* HAVE_ARC4RANDOM */
18
	talloc_magic = random_value & ~TALLOC_FLAG_MASK;
19
 }
20
 #else
(-)b/net/samba415/files/disabled/patch-lib_talloc_wscript (+17 lines)
Added Link Here
1
--- lib/talloc/wscript.orig	2019-05-07 08:38:21 UTC
2
+++ lib/talloc/wscript
3
@@ -45,13 +45,14 @@ def configure(conf):
4
     conf.env.TALLOC_COMPAT1 = False
5
     if conf.env.standalone_talloc:
6
         conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
7
-        conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
8
+        conf.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
9
         conf.env.TALLOC_VERSION = VERSION
10
11
     conf.CHECK_XSLTPROC_MANPAGES()
12
13
     conf.CHECK_HEADERS('sys/auxv.h')
14
     conf.CHECK_FUNCS('getauxval')
15
+    conf.CHECK_FUNCS('arc4random')
16
17
     conf.SAMBA_CONFIG_H()
(-)b/net/samba415/files/disabled/patch-lib_tdb_wscript (+26 lines)
Added Link Here
1
--- lib/tdb/wscript.orig	2019-07-02 22:39:54 UTC
2
+++ lib/tdb/wscript
3
@@ -145,20 +145,20 @@ def build(bld):
4
                          'tdb',
5
                          install=False)
6
7
-        bld.SAMBA_BINARY('tdbrestore',
8
+        bld.SAMBA_BINARY('samba-tdbrestore',
9
                          'tools/tdbrestore.c',
10
                          'tdb', manpages='man/tdbrestore.8')
11
12
-        bld.SAMBA_BINARY('tdbdump',
13
+        bld.SAMBA_BINARY('samba-tdbdump',
14
                          'tools/tdbdump.c',
15
                          'tdb', manpages='man/tdbdump.8')
16
17
-        bld.SAMBA_BINARY('tdbbackup',
18
+        bld.SAMBA_BINARY('samba-tdbbackup',
19
                          'tools/tdbbackup.c',
20
                          'tdb',
21
                          manpages='man/tdbbackup.8')
22
23
-        bld.SAMBA_BINARY('tdbtool',
24
+        bld.SAMBA_BINARY('samba-tdbtool',
25
                          'tools/tdbtool.c',
26
                          'tdb', manpages='man/tdbtool.8')
(-)b/net/samba415/files/disabled/patch-lib_util_wscript__build (+10 lines)
Added Link Here
1
--- lib/util/wscript_build.orig	2019-05-07 08:38:21 UTC
2
+++ lib/util/wscript_build
3
@@ -151,7 +151,7 @@ else:
4
5
     bld.SAMBA_LIBRARY('samba-modules',
6
                       source='modules.c',
7
-                      deps='samba-errors samba-util',
8
+                      deps='samba-errors samba-util samba-debug',
9
                       local_include=False,
10
                       private_library=True)
(-)b/net/samba415/files/disabled/patch-linuxisms (+91 lines)
Added Link Here
1
--- libcli/http/http.c.orig	2020-07-09 13:33:56
2
+++ libcli/http/http.c
3
@@ -141,7 +141,19 @@ static enum http_read_status http_parse_headers(struct
4
		return HTTP_ALL_DATA_READ;
5
	}
6
7
+#ifdef FREEBSD
8
+	int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0;
9
+	n = sscanf(line, "%n%*[^:]%n: %n%*[^\r\n]%n\r\n", &s0, &s1, &s2, &s3);
10
+
11
+	if(n >= 0) {
12
+		key = calloc(sizeof(char), s1-s0+1);
13
+		value = calloc(sizeof(char), s3-s2+1);
14
+
15
+		n = sscanf(line, "%[^:]: %[^\r\n]\r\n", key, value);
16
+	}
17
+#else
18
	n = sscanf(line, "%m[^:]: %m[^\r\n]\r\n", &key, &value);
19
+#endif
20
	if (n != 2) {
21
		DEBUG(0, ("%s: Error parsing header '%s'\n", __func__, line));
22
		status = HTTP_DATA_CORRUPTED;
23
@@ -167,7 +179,7 @@ error:
24
 static bool http_parse_response_line(struct http_read_response_state *state)
25
 {
26
	bool	status = true;
27
-	char	*protocol;
28
+	char	*protocol = NULL;
29
	char	*msg = NULL;
30
	char	major;
31
	char	minor;
32
@@ -187,18 +199,32 @@ static bool http_parse_response_line(struct http_read_
33
		return false;
34
	}
35
36
+#ifdef FREEBSD
37
+	int s0, s1, s2, s3; s0 = s1 = s2 = s3 = 0;
38
+	n = sscanf(line, "%n%*[^/]%n/%c.%c %d %n%*[^\r\n]%n\r\n",
39
+		   &s0, &s1, &major, &minor, &code, &s2, &s3);
40
+
41
+	if(n == 3) {
42
+		protocol = calloc(sizeof(char), s1-s0+1);
43
+		msg = calloc(sizeof(char), s3-s2+1);
44
+
45
+		n = sscanf(line, "%[^/]/%c.%c %d %[^\r\n]\r\n",
46
+			protocol, &major, &minor, &code, msg);
47
+	}
48
+#else
49
	n = sscanf(line, "%m[^/]/%c.%c %d %m[^\r\n]\r\n",
50
		   &protocol, &major, &minor, &code, &msg);
51
+#endif
52
53
-	DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, "
54
-		   "code->%d, message->%s\n", __func__, n, protocol, major, minor,
55
-		   code, msg));
56
-
57
	if (n != 5) {
58
		DEBUG(0, ("%s: Error parsing header\n",	__func__));
59
		status = false;
60
		goto error;
61
	}
62
+
63
+	DEBUG(11, ("%s: Header parsed(%i): protocol->%s, major->%c, minor->%c, "
64
+		   "code->%d, message->%s\n", __func__, n, protocol, major, minor,
65
+		   code, msg));
66
67
	if (major != '1') {
68
		DEBUG(0, ("%s: Bad HTTP major number '%c'\n", __func__, major));
69
--- source4/libcli/ldap/ldap_client.c.orig	2020-07-09 13:33:56
70
+++ source4/libcli/ldap/ldap_client.c
71
@@ -402,8 +402,20 @@ static int ldap_parse_basic_url(
72
		*pport = port;
73
		return 0;
74
	}
75
+#ifdef FREEBSD
76
+	int s0, s1; s0 = s1 = 0;
77
+	ret = sscanf(url, "%n%*[^:/]%n:%d", &s0, &s1, &port);
78
79
+	if(ret >= 0) {
80
+		host = calloc(sizeof(char), s1 - s0 + 1);
81
+		if (host == NULL) {
82
+			return ENOMEM;
83
+		}
84
+		ret = sscanf(url, "%[^:/]:%d", host, &port);
85
+	}
86
+#else
87
	ret = sscanf(url, "%m[^:/]:%d", &host, &port);
88
+#endif
89
	if (ret < 1) {
90
		return EINVAL;
91
	}
(-)b/net/samba415/files/disabled/patch-listen-backlog (+94 lines)
Added Link Here
1
--- lib/tevent/echo_server.c.orig	2019-01-15 10:07:00 UTC
2
+++ lib/tevent/echo_server.c
3
@@ -633,7 +633,7 @@ int main(int argc, const char **argv)
4
		exit(1);
5
	}
6
7
-	ret = listen(listen_sock, 5);
8
+	ret = listen(listen_sock, DEFAULT_LISTEN_BACKLOG);
9
	if (ret == -1) {
10
		perror("listen() failed");
11
		exit(1);
12
--- source3/include/local.h.orig	2019-01-15 10:07:00 UTC
13
+++ source3/include/local.h
14
@@ -173,7 +173,18 @@
15
 #define WINBIND_SERVER_MUTEX_WAIT_TIME (( ((NUM_CLI_AUTH_CONNECT_RETRIES) * ((CLI_AUTH_TIMEOUT)/1000)) + 5)*2)
16
17
 /* size of listen() backlog in smbd */
18
+#if defined (FREEBSD)
19
+#define SMBD_LISTEN_BACKLOG -1
20
+#else
21
 #define SMBD_LISTEN_BACKLOG 50
22
+#endif
23
+
24
+/* size of listen() default backlog */
25
+#if defined (FREEBSD)
26
+#define DEFAULT_LISTEN_BACKLOG -1
27
+#else
28
+#define DEFAULT_LISTEN_BACKLOG 5
29
+#endif
30
31
 /* Number of microseconds to wait before a sharing violation. */
32
 #define SHARING_VIOLATION_USEC_WAIT 950000
33
--- source3/libsmb/unexpected.c.orig	2019-01-15 10:07:00 UTC
34
+++ source3/libsmb/unexpected.c
35
@@ -95,7 +95,7 @@ NTSTATUS nb_packet_server_create(TALLOC_
36
		status = map_nt_error_from_unix(errno);
37
		goto fail;
38
	}
39
-	rc = listen(result->listen_sock, 5);
40
+	rc = listen(result->listen_sock, DEFAULT_LISTEN_BACKLOG);
41
	if (rc < 0) {
42
		status = map_nt_error_from_unix(errno);
43
		goto fail;
44
--- source3/rpc_server/rpc_server.c.orig	2019-01-15 10:07:00 UTC
45
+++ source3/rpc_server/rpc_server.c
46
@@ -158,7 +158,7 @@ bool setup_named_pipe_socket(const char
47
		goto out;
48
	}
49
50
-	rc = listen(state->fd, 5);
51
+	rc = listen(state->fd, DEFAULT_LISTEN_BACKLOG);
52
	if (rc < 0) {
53
		DEBUG(0, ("Failed to listen on pipe socket %s: %s\n",
54
			  pipe_name, strerror(errno)));
55
@@ -830,7 +830,7 @@ bool setup_dcerpc_ncalrpc_socket(struct
56
		goto out;
57
	}
58
59
-	rc = listen(state->fd, 5);
60
+	rc = listen(state->fd, DEFAULT_LISTEN_BACKLOG);
61
	if (rc < 0) {
62
		DEBUG(0, ("Failed to listen on ncalrpc socket %s: %s\n",
63
			  name, strerror(errno)));
64
--- source3/utils/smbfilter.c.orig	2019-01-15 10:07:00 UTC
65
+++ source3/utils/smbfilter.c
66
@@ -291,7 +291,7 @@ static void start_filter(char *desthost)
67
		exit(1);
68
	}
69
70
-	if (listen(s, 5) == -1) {
71
+	if (listen(s, DEFAULT_LISTEN_BACKLOG) == -1) {
72
		d_printf("listen failed\n");
73
	}
74
75
--- source3/winbindd/winbindd.c.orig	2019-01-15 10:07:00 UTC
76
+++ source3/winbindd/winbindd.c
77
@@ -1317,7 +1317,7 @@ static bool winbindd_setup_listeners(voi
78
	if (pub_state->fd == -1) {
79
		goto failed;
80
	}
81
-	rc = listen(pub_state->fd, 5);
82
+	rc = listen(pub_state->fd, DEFAULT_LISTEN_BACKLOG);
83
	if (rc < 0) {
84
		goto failed;
85
	}
86
@@ -1349,7 +1349,7 @@ static bool winbindd_setup_listeners(voi
87
	if (priv_state->fd == -1) {
88
		goto failed;
89
	}
90
-	rc = listen(priv_state->fd, 5);
91
+	rc = listen(priv_state->fd, DEFAULT_LISTEN_BACKLOG);
92
	if (rc < 0) {
93
		goto failed;
94
	}
(-)b/net/samba415/files/disabled/patch-mdns (+532 lines)
Added Link Here
1
From 923bc7a1afeb0b920e60e14846987ae1d2d7dca4 Mon Sep 17 00:00:00 2001
2
From: John Hixson <john@ixsystems.com>
3
Date: Thu, 7 Dec 2017 09:36:32 -0500
4
Subject: [PATCH] Freenas/master mdns fixes (#22)
5
6
* mDNS fixes for Samba (work in progress).
7
8
* Fix mDNS - Can advertise on individual interfaces
9
10
* Fix mDNS browsing in smbclient
11
12
Signed-off-by: Timur I. Bakeyev <timur@iXsystems.com>
13
14
--- source3/client/dnsbrowse.c.orig	2019-01-15 10:07:00 UTC
15
+++ source3/client/dnsbrowse.c
16
@@ -39,6 +39,7 @@ struct mdns_smbsrv_result
17
 struct mdns_browse_state
18
 {
19
	struct mdns_smbsrv_result *listhead; /* Browse result list head */
20
+	TALLOC_CTX * ctx;
21
	int browseDone;
22
23
 };
24
@@ -64,7 +65,7 @@ static void do_smb_resolve(struct mdns_s
25
	struct timeval tv;
26
	DNSServiceErrorType err;
27
28
-	TALLOC_CTX * ctx = talloc_tos();
29
+	TALLOC_CTX * ctx = talloc_new(NULL);
30
31
	err = DNSServiceResolve(&mdns_conn_sdref, 0 /* flags */,
32
		browsesrv->ifIndex,
33
@@ -91,7 +92,7 @@ static void do_smb_resolve(struct mdns_s
34
		}
35
	}
36
37
-	TALLOC_FREE(fdset);
38
+	TALLOC_FREE(ctx);
39
	DNSServiceRefDeallocate(mdns_conn_sdref);
40
 }
41
42
@@ -124,18 +125,19 @@ do_smb_browse_reply(DNSServiceRef sdRef,
43
		return;
44
	}
45
46
-	bresult = talloc_array(talloc_tos(), struct mdns_smbsrv_result, 1);
47
+	bresult = talloc_array(bstatep->ctx, struct mdns_smbsrv_result, 1);
48
	if (bresult == NULL) {
49
		return;
50
	}
51
52
+	bresult->nextResult = NULL;
53
	if (bstatep->listhead != NULL) {
54
		bresult->nextResult = bstatep->listhead;
55
	}
56
57
-	bresult->serviceName = talloc_strdup(talloc_tos(), serviceName);
58
-	bresult->regType = talloc_strdup(talloc_tos(), regtype);
59
-	bresult->domain = talloc_strdup(talloc_tos(), replyDomain);
60
+	bresult->serviceName = talloc_strdup(bstatep->ctx, serviceName);
61
+	bresult->regType = talloc_strdup(bstatep->ctx, regtype);
62
+	bresult->domain = talloc_strdup(bstatep->ctx, replyDomain);
63
	bresult->ifIndex = interfaceIndex;
64
	bstatep->listhead = bresult;
65
 }
66
@@ -151,10 +153,13 @@ int do_smb_browse(void)
67
	DNSServiceRef mdns_conn_sdref = NULL;
68
	DNSServiceErrorType err;
69
70
-	TALLOC_CTX * ctx = talloc_stackframe();
71
+	TALLOC_CTX * ctx = talloc_new(NULL);
72
73
	ZERO_STRUCT(bstate);
74
75
+	bstate.ctx = ctx;
76
+	bstate.listhead = NULL;
77
+
78
	err = DNSServiceBrowse(&mdns_conn_sdref, 0, 0, "_smb._tcp", "",
79
			do_smb_browse_reply, &bstate);
80
81
--- source3/smbd/dnsregister.c.orig	2019-01-15 10:07:00 UTC
82
+++ source3/smbd/dnsregister.c
83
@@ -29,6 +29,29 @@
84
  * browse for advertised SMB services.
85
  */
86
87
+/*
88
+ * Time Machine Errata:
89
+ * sys=adVF=0x100 -- this is required when ._adisk._tcp is present on device. When it is
90
+ * set, the MacOS client will send a NetShareEnumAll IOCTL and shares will be visible.
91
+ * Otherwise, Finder will only see the Time Machine share. In the absence of ._adisk._tcp
92
+ * MacOS will _always_ send NetShareEnumAll IOCTL.
93
+ *
94
+ * waMa=0 -- MacOS server uses waMa=0, while embedded devices have it set to their Mac Address.
95
+ * Speculation in Samba-Technical indicates that this stands for "Wireless AirDisk Mac Address".
96
+ *
97
+ * adVU -- AirDisk Volume UUID. Mac OS servers generate a UUID. Time machine over SMB works without one
98
+ * set. Netatalk generates a UUID and stores it persistently in afp_voluuid.conf. This can be
99
+ * set by adding the share parameter "fruit:volume_uuid = "
100
+ *
101
+ * dk(n)=adVF=
102
+ *      0xa1, 0x81 - AFP support
103
+ *      0xa2, 0x82 - SMB support
104
+ *      0xa3, 0x83 - AFP and SMB support
105
+ *
106
+ * adVN -- AirDisk Volume Name. We set this to the share name.
107
+ *
108
+ */
109
+
110
 #define DNS_REG_RETRY_INTERVAL (5*60)  /* in seconds */
111
112
 #ifdef WITH_DNSSD_SUPPORT
113
@@ -36,85 +59,177 @@
114
 #include <dns_sd.h>
115
116
 struct dns_reg_state {
117
-	struct tevent_context *event_ctx;
118
-	uint16_t port;
119
-	DNSServiceRef srv_ref;
120
-	struct tevent_timer *te;
121
-	int fd;
122
-	struct tevent_fd *fde;
123
+	int count;
124
+	struct reg_state {
125
+		DNSServiceRef srv_ref;
126
+		TALLOC_CTX *mem_ctx;
127
+		struct tevent_context *event_ctx;
128
+		struct tevent_timer *te;
129
+		struct tevent_fd *fde;
130
+		uint16_t port;
131
+		int if_index;
132
+		int fd;
133
+	} *drs;
134
 };
135
136
-static int dns_reg_state_destructor(struct dns_reg_state *dns_state)
137
+static void dns_register_smbd_retry(struct tevent_context *ctx,
138
+				    struct tevent_timer *te,
139
+				    struct timeval now,
140
+				    void *private_data);
141
+static void dns_register_smbd_fde_handler(struct tevent_context *ev,
142
+					  struct tevent_fd *fde,
143
+					  uint16_t flags,
144
+					  void *private_data);
145
+
146
+
147
+static int reg_state_destructor(struct reg_state *state)
148
 {
149
-	if (dns_state->srv_ref != NULL) {
150
+	if (state == NULL) {
151
+		return -1;
152
+	}
153
+
154
+	if (state->srv_ref != NULL) {
155
		/* Close connection to the mDNS daemon */
156
-		DNSServiceRefDeallocate(dns_state->srv_ref);
157
-		dns_state->srv_ref = NULL;
158
+		DNSServiceRefDeallocate(state->srv_ref);
159
+		state->srv_ref = NULL;
160
	}
161
162
	/* Clear event handler */
163
-	TALLOC_FREE(dns_state->te);
164
-	TALLOC_FREE(dns_state->fde);
165
-	dns_state->fd = -1;
166
+	TALLOC_FREE(state->te);
167
+	TALLOC_FREE(state->fde);
168
+	state->fd = -1;
169
170
	return 0;
171
 }
172
173
-static void dns_register_smbd_retry(struct tevent_context *ctx,
174
-				    struct tevent_timer *te,
175
-				    struct timeval now,
176
-				    void *private_data);
177
-static void dns_register_smbd_fde_handler(struct tevent_context *ev,
178
-					  struct tevent_fd *fde,
179
-					  uint16_t flags,
180
-					  void *private_data);
181
+int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... )
182
+{
183
+	int ret = 0;
184
+	char *str;
185
+	va_list ap;
186
+	va_start( ap, fmt );
187
188
-static bool dns_register_smbd_schedule(struct dns_reg_state *dns_state,
189
+	if( 0 > vasprintf(&str, fmt, ap ) ) {
190
+		va_end(ap);
191
+		return -1;
192
+	}
193
+	va_end(ap);
194
+
195
+	if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) {
196
+		ret = -1;
197
+	}
198
+
199
+	free(str);
200
+	return ret;
201
+}
202
+
203
+int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...)
204
+{
205
+	int ret = 0;
206
+	char *key = NULL, *str = NULL;
207
+	va_list ap;
208
+
209
+	if( 0 > asprintf(&key, key_fmt, key_var)) {
210
+		DEBUG(1, ("Failed in asprintf\n"));
211
+		return -1;
212
+	}
213
+
214
+	va_start( ap, fmt );
215
+	if( 0 > vasprintf(&str, fmt, ap )) {
216
+		va_end(ap);
217
+		DEBUG(1, ("Failed in vasprintf\n"));
218
+		ret = -1;
219
+		goto exit;
220
+	}
221
+	va_end(ap);
222
+
223
+	if( kDNSServiceErr_NoError != TXTRecordSetValue(rec, key, strlen(str), str) ) {
224
+		DEBUG(1, ("Failed in TXTRecordSetValuen"));
225
+		ret = -1;
226
+		goto exit;
227
+	}
228
+
229
+	exit:
230
+	if (str)
231
+		free(str);
232
+	if (key)
233
+		free(key);
234
+	return ret;
235
+}
236
+
237
+
238
+static bool dns_register_smbd_schedule(struct reg_state *state,
239
				       struct timeval tval)
240
 {
241
-	dns_reg_state_destructor(dns_state);
242
+	reg_state_destructor(state);
243
244
-	dns_state->te = tevent_add_timer(dns_state->event_ctx,
245
-					 dns_state,
246
+	state->te = tevent_add_timer(state->event_ctx,
247
+					 state->mem_ctx,
248
					 tval,
249
					 dns_register_smbd_retry,
250
-					 dns_state);
251
-	if (!dns_state->te) {
252
+					 state);
253
+	if (!state->te) {
254
		return false;
255
	}
256
257
	return true;
258
 }
259
260
+static void dns_register_smbd_callback(DNSServiceRef service,
261
+				       DNSServiceFlags flags,
262
+				       DNSServiceErrorType errorCode,
263
+				       const char *name,
264
+				       const char *type,
265
+				       const char *domain,
266
+				       void *context)
267
+{
268
+	if (errorCode != kDNSServiceErr_NoError) {
269
+		DEBUG(6, ("error=%d\n", errorCode));
270
+	} else {
271
+		DEBUG(6, ("%-15s %s.%s%s\n", "REGISTER", name, type, domain));
272
+	}
273
+}
274
+
275
 static void dns_register_smbd_retry(struct tevent_context *ctx,
276
				    struct tevent_timer *te,
277
				    struct timeval now,
278
				    void *private_data)
279
 {
280
-	struct dns_reg_state *dns_state = talloc_get_type_abort(private_data,
281
-					  struct dns_reg_state);
282
+	struct reg_state *state = (struct reg_state *)private_data;
283
	DNSServiceErrorType err;
284
+	int snum;
285
+	size_t dk = 0;
286
+	bool sys_txt_created = false;
287
+	TXTRecordRef txt_adisk;
288
+	TXTRecordRef txt_devinfo;
289
+	char *servname;
290
+	char *v_uuid;
291
+	int num_services = lp_numservices();
292
293
-	dns_reg_state_destructor(dns_state);
294
+	reg_state_destructor(state);
295
296
-	DEBUG(6, ("registering _smb._tcp service on port %d\n",
297
-		  dns_state->port));
298
+	TXTRecordCreate(&txt_adisk, 0, NULL);
299
+
300
+	DEBUG(6, ("registering _smb._tcp service on port %d index %d\n",
301
+		  state->port, state->if_index));
302
303
	/* Register service with DNS. Connects with the mDNS
304
	 * daemon running on the local system to perform DNS
305
	 * service registration.
306
	 */
307
-	err = DNSServiceRegister(&dns_state->srv_ref, 0 /* flags */,
308
-			kDNSServiceInterfaceIndexAny,
309
-			NULL /* service name */,
310
-			"_smb._tcp" /* service type */,
311
-			NULL /* domain */,
312
-			"" /* SRV target host name */,
313
-			htons(dns_state->port),
314
-			0 /* TXT record len */,
315
-			NULL /* TXT record data */,
316
-			NULL /* callback func */,
317
-			NULL /* callback context */);
318
+	err = DNSServiceRegister(&state->srv_ref,
319
+			0		/* flags */,
320
+			state->if_index /* interface index */,
321
+			NULL		/* service name */,
322
+			"_smb._tcp"	/* service type */,
323
+			NULL		/* domain */,
324
+			""		/* SRV target host name */,
325
+			htons(state->port) /* port */,
326
+			0		/* TXT record len */,
327
+			NULL		/* TXT record data */,
328
+			dns_register_smbd_callback /* callback func */,
329
+			NULL		/* callback context */);
330
+
331
332
	if (err != kDNSServiceErr_NoError) {
333
		/* Failed to register service. Schedule a re-try attempt.
334
@@ -123,24 +238,96 @@ static void dns_register_smbd_retry(stru
335
		goto retry;
336
	}
337
338
-	dns_state->fd = DNSServiceRefSockFD(dns_state->srv_ref);
339
-	if (dns_state->fd == -1) {
340
+	/*
341
+	 * Check for services that are configured as Time Machine targets
342
+	 *
343
+	 */
344
+	for (snum = 0; snum < num_services; snum++) {
345
+		if (lp_snum_ok(snum) && lp_parm_bool(snum, "fruit", "time machine", false))
346
+		{
347
+			if (!sys_txt_created) {
348
+				if( 0 > TXTRecordPrintf(&txt_adisk, "sys", "adVF=0x100") ) {
349
+					DEBUG(1, ("Failed to create Zeroconf TXTRecord for sys") );
350
+					goto retry;
351
+				}
352
+				else
353
+				{
354
+					sys_txt_created = true;
355
+				}
356
+			}
357
+
358
+			v_uuid = lp_parm_const_string(snum, "fruit", "volume_uuid", NULL);
359
+			servname = lp_const_servicename(snum);
360
+			DEBUG(1, ("Registering volume %s for TimeMachine\n", servname));
361
+			if (v_uuid) {
362
+				if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82,adVU=%s",
363
+					servname, v_uuid) ) {
364
+					DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk));
365
+					goto retry;
366
+				}
367
+				DEBUG(1, ("Registering TimeMachine with the following TXT parameters: "
368
+					  "dk%zu,adVN=%s,adVF=0x82,adVU=%s\n", dk, servname, v_uuid) );
369
+			}
370
+			else {
371
+				if( 0 > TXTRecordKeyPrintf(&txt_adisk, "dk%zu", dk++, "adVN=%s,adVF=0x82",
372
+					servname) ) {
373
+					DEBUG(1, ("Could not set Zeroconf TXTRecord for dk%zu \n", dk));
374
+					goto retry;
375
+				}
376
+				DEBUG(1, ("Registering TimeMachine with the following TXT parameters: "
377
+					  "dk%zu,adVN=%s,adVF=0x82\n", dk, servname) );
378
+			}
379
+		}
380
+	}
381
+
382
+	if (dk) {
383
+		err = DNSServiceRegister(&state->srv_ref,
384
+				0		/* flags */,
385
+				state->if_index /* interface index */,
386
+				NULL		/* service name */,
387
+				"_adisk._tcp"	/* service type */,
388
+				NULL		/* domain */,
389
+				""		/* SRV target host name */,
390
+				/*
391
+				 * We would probably use port 0 zero, but we can't, from man DNSServiceRegister:
392
+				 *   "A value of 0 for a port is passed to register placeholder services.
393
+				 *    Place holder services are not found  when browsing, but other
394
+				 *    clients cannot register with the same name as the placeholder service."
395
+				 * We therefor use port 9 which is used by the adisk service type.
396
+				 */
397
+				htons(9)	/* port */,
398
+				TXTRecordGetLength(&txt_adisk)		/* TXT record len */,
399
+				TXTRecordGetBytesPtr(&txt_adisk)	/* TXT record data */,
400
+				dns_register_smbd_callback /* callback func */,
401
+				NULL		/* callback context */);
402
+
403
+
404
+		if (err != kDNSServiceErr_NoError) {
405
+			/* Failed to register service. Schedule a re-try attempt.
406
+			 */
407
+			DEBUG(1, ("unable to register with mDNS (err %d)\n", err));
408
+			goto retry;
409
+		}
410
+	}
411
+
412
+	state->fd = DNSServiceRefSockFD(state->srv_ref);
413
+	if (state->fd == -1) {
414
		goto retry;
415
	}
416
417
-	dns_state->fde = tevent_add_fd(dns_state->event_ctx,
418
-				       dns_state,
419
-				       dns_state->fd,
420
-				       TEVENT_FD_READ,
421
-				       dns_register_smbd_fde_handler,
422
-				       dns_state);
423
-	if (!dns_state->fde) {
424
+	state->fde = tevent_add_fd(state->event_ctx,
425
+				   state->mem_ctx,
426
+				   state->fd,
427
+				   TEVENT_FD_READ,
428
+				   dns_register_smbd_fde_handler,
429
+				   state);
430
+	if (!state->fde) {
431
		goto retry;
432
	}
433
434
	return;
435
  retry:
436
-	dns_register_smbd_schedule(dns_state,
437
+	dns_register_smbd_schedule(state,
438
		timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0));
439
 }
440
441
@@ -150,44 +337,77 @@ static void dns_register_smbd_fde_handle
442
					  uint16_t flags,
443
					  void *private_data)
444
 {
445
-	struct dns_reg_state *dns_state = talloc_get_type_abort(private_data,
446
-					  struct dns_reg_state);
447
+	struct reg_state *state = (struct reg_state *)private_data;
448
	DNSServiceErrorType err;
449
450
-	err = DNSServiceProcessResult(dns_state->srv_ref);
451
+	err = DNSServiceProcessResult(state->srv_ref);
452
	if (err != kDNSServiceErr_NoError) {
453
-		DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n",
454
-			    err));
455
+		DEBUG(3, ("failed to process mDNS result (err %d), re-trying\n", err));
456
		goto retry;
457
	}
458
459
-	talloc_free(dns_state);
460
	return;
461
462
  retry:
463
-	dns_register_smbd_schedule(dns_state,
464
-		timeval_current_ofs(DNS_REG_RETRY_INTERVAL, 0));
465
+	dns_register_smbd_schedule(state, timeval_zero());
466
+}
467
+
468
+static int dns_reg_state_destructor(struct dns_reg_state *state)
469
+{
470
+	if (state != NULL) {
471
+		talloc_free(state);
472
+	}
473
+	return 0;
474
 }
475
476
+
477
 bool smbd_setup_mdns_registration(struct tevent_context *ev,
478
				  TALLOC_CTX *mem_ctx,
479
				  uint16_t port)
480
 {
481
	struct dns_reg_state *dns_state;
482
+	bool bind_all = true;
483
+	int i;
484
485
	dns_state = talloc_zero(mem_ctx, struct dns_reg_state);
486
-	if (dns_state == NULL) {
487
+	if (dns_state == NULL)
488
+		return false;
489
+
490
+	if (lp_interfaces() && lp_bind_interfaces_only())
491
+		bind_all = false;
492
+
493
+	dns_state->count = iface_count();
494
+	if (dns_state->count <= 0 || bind_all == true)
495
+		dns_state->count = 1;
496
+
497
+	dns_state->drs = talloc_array(mem_ctx, struct reg_state, dns_state->count);
498
+	if (dns_state->drs == NULL) {
499
+		talloc_free(dns_state);
500
		return false;
501
	}
502
-	dns_state->event_ctx = ev;
503
-	dns_state->port = port;
504
-	dns_state->fd = -1;
505
506
-	talloc_set_destructor(dns_state, dns_reg_state_destructor);
507
+	for (i = 0; i < dns_state->count; i++) {
508
+		struct interface *iface = get_interface(i);
509
+		struct reg_state *state = &dns_state->drs[i];
510
511
-	return dns_register_smbd_schedule(dns_state, timeval_zero());
512
+		state->mem_ctx = mem_ctx;
513
+		state->srv_ref = NULL;
514
+		state->event_ctx = ev;
515
+		state->te = NULL;
516
+		state->fde = NULL;
517
+		state->port = port;
518
+		state->fd = -1;
519
+
520
+		state->if_index = bind_all ? kDNSServiceInterfaceIndexAny : iface->if_index;
521
+
522
+		dns_register_smbd_schedule(&dns_state->drs[i], timeval_zero());
523
+	}
524
+
525
+	talloc_set_destructor(dns_state, dns_reg_state_destructor);
526
+	return true;
527
 }
528
529
+
530
 #else /* WITH_DNSSD_SUPPORT */
531
532
 bool smbd_setup_mdns_registration(struct tevent_context *ev,
(-)b/net/samba415/files/disabled/patch-nsswitch_wscript__build (+17 lines)
Added Link Here
1
--- nsswitch/wscript_build.orig	2019-01-15 10:07:00 UTC
2
+++ nsswitch/wscript_build
3
@@ -61,12 +61,14 @@ elif (host_os.rfind('freebsd') > -1):
4
			  source='winbind_nss_linux.c winbind_nss_freebsd.c',
5
			  deps='winbind-client',
6
			  realname='nss_winbind.so.1',
7
+			  install_path='${PAMMODULESDIR}',
8
			  vnum='1')
9
10
	bld.SAMBA3_LIBRARY('nss_wins',
11
			  source='wins.c wins_freebsd.c',
12
			  deps='''wbclient''',
13
			  realname='nss_wins.so.1',
14
+			  install_path='${PAMMODULESDIR}',
15
			  vnum='1')
16
17
 elif (host_os.rfind('netbsd') > -1):
(-)b/net/samba415/files/disabled/patch-source3_include_includes.h (+9 lines)
Added Link Here
1
--- source3/include/includes.h.orig	2019-01-15 10:07:00 UTC
2
+++ source3/include/includes.h
3
@@ -322,6 +322,8 @@ typedef char fstring[FSTRING_LEN];
4
  * the *bottom* of include files so as not to conflict. */
5
 #ifdef ENABLE_DMALLOC
6
 #  include <dmalloc.h>
7
+#elif ENABLE_JEMALLOC
8
+#  include <jemalloc/jemalloc.h>
9
 #endif
(-)b/net/samba415/files/disabled/patch-source3_lib_sysquotas__4B.c (+18 lines)
Added Link Here
1
--- source3/lib/sysquotas_4B.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/lib/sysquotas_4B.c
3
@@ -140,7 +140,14 @@ static int sys_quotactl_4B(const char *
4
		/* ENOTSUP means quota support is not compiled in. EINVAL
5
		 * means that quotas are not configured (commonly).
6
		 */
7
-		if (errno != ENOTSUP && errno != EINVAL) {
8
+		if (errno != ENOTSUP && errno != EINVAL
9
+/*
10
+ * FreeBSD 12 between r336017 and r342928 wrongfuly return ENOENT for the not enabled qoutas on ZFS.
11
+ */
12
+#if defined(__FreeBSD__) && ((__FreeBSD_version >= 1102503 && __FreeBSD_version <= 1102506) || (__FreeBSD_version >= 1200072 && __FreeBSD_version <= 1200503) || (__FreeBSD_version >= 1300000 && __FreeBSD_version <= 1300009))
13
+			&& errno != ENOENT
14
+#endif
15
+		) {
16
			DEBUG(5, ("failed to %s quota for %s ID %u on %s: %s\n",
17
				    (cmd & QCMD(Q_GETQUOTA, 0)) ? "get" : "set",
18
				    (cmd & QCMD(0, GRPQUOTA)) ? "group" : "user",
(-)b/net/samba415/files/disabled/patch-source3_lib_util.c (+14 lines)
Added Link Here
1
--- source3/lib/util.c.orig	2019-05-07 08:38:21 UTC
2
+++ source3/lib/util.c
3
@@ -1916,7 +1916,10 @@ bool any_nt_status_not_ok(NTSTATUS err1,
4
5
 int timeval_to_msec(struct timeval t)
6
 {
7
-	return t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
8
+	unsigned long result;
9
+
10
+	result = t.tv_sec * 1000 + (t.tv_usec+999) / 1000;
11
+	return result > INT_MAX ? INT_MAX : result;
12
 }
13
14
 /*******************************************************************
(-)b/net/samba415/files/disabled/patch-source3_librpc_crypto_gse.c (+15 lines)
Added Link Here
1
--- source3/librpc/crypto/gse.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/librpc/crypto/gse.c
3
@@ -621,11 +621,12 @@ static NTSTATUS gse_get_server_auth_toke
4
	struct gse_context *gse_ctx =
5
		talloc_get_type_abort(gensec_security->private_data,
6
				      struct gse_context);
7
-	OM_uint32 gss_maj, gss_min;
8
+	OM_uint32 gss_min;
9
	gss_buffer_desc in_data;
10
	gss_buffer_desc out_data;
11
	DATA_BLOB blob = data_blob_null;
12
	NTSTATUS status;
13
+	OM_uint32 gss_maj = -1;
14
	OM_uint32 time_rec = 0;
15
	struct timeval tv;
(-)b/net/samba415/files/disabled/patch-source3_modules_vfs__fruit.c (+85 lines)
Added Link Here
1
From d9b748869a8f4018ebee302aae8246bf29f60309 Mon Sep 17 00:00:00 2001
2
From: "Timur I. Bakeyev" <timur@iXsystems.com>
3
Date: Fri, 1 Jun 2018 01:35:08 +0800
4
Subject: [PATCH] vfs_fruit: allow broken AFP_Signature where the first
5
 byte is 0
6
7
FreeBSD bug ... caused the first byte of the AFP_AfpInfo xattr to be 0
8
instead of 'A'. This hack allows such broken AFP_AfpInfo blobs to be
9
parsed by afpinfo_unpack().
10
11
FreeBSD Bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228462
12
13
Signed-off-by: Ralph Boehme <slow@samba.org>
14
15
--- source3/lib/adouble.c.orig	2020-05-08 09:30:43 UTC
16
+++ source3/lib/adouble.c
17
@@ -2662,6 +2662,8 @@ ssize_t afpinfo_pack(const AfpInfo *ai, char *buf)
18
	return AFP_INFO_SIZE;
19
 }
20
21
+#define BROKEN_FREEBSD_AFP_Signature 0x00465000
22
+
23
 /**
24
  * Unpack a buffer into a AfpInfo structure
25
  *
26
@@ -2679,12 +2681,22 @@ AfpInfo *afpinfo_unpack(TALLOC_CTX *ctx, const void *d
27
	ai->afpi_Version = RIVAL(data, 4);
28
	ai->afpi_BackupTime = RIVAL(data, 12);
29
	memcpy(ai->afpi_FinderInfo, (const char *)data + 16,
30
-	       sizeof(ai->afpi_FinderInfo));
31
+		sizeof(ai->afpi_FinderInfo));
32
33
-	if (ai->afpi_Signature != AFP_Signature
34
-	    || ai->afpi_Version != AFP_Version) {
35
-		DEBUG(1, ("Bad AfpInfo signature or version\n"));
36
+	if (ai->afpi_Signature != AFP_Signature) {
37
+		DBG_WARNING("Bad AFP signature [%x]\n", ai->afpi_Signature);
38
+
39
+		if (ai->afpi_Signature != BROKEN_FREEBSD_AFP_Signature) {
40
+			DBG_ERR("Bad AfpInfo signature\n");
41
+			TALLOC_FREE(ai);
42
+			return NULL;
43
+		}
44
+	}
45
+
46
+	if (ai->afpi_Version != AFP_Version) {
47
+		DBG_ERR("Bad AfpInfo version\n");
48
		TALLOC_FREE(ai);
49
+		return NULL;
50
	}
51
52
	return ai;
53
--- source3/modules/vfs_fruit.c.orig	2021-01-26 08:16:58 UTC
54
+++ source3/modules/vfs_fruit.c
55
@@ -2146,13 +2146,30 @@ static ssize_t fruit_pread_meta_stream(vfs_handle_stru
56
	struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
57
	ssize_t nread;
58
	int ret;
59
+	char *p = (char *)data;
60
61
	if (fio->fake_fd) {
62
		return -1;
63
	}
64
65
	nread = SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
66
-	if (nread == -1 || nread == n) {
67
+	if (nread <= 0) {
68
+		/*
69
+		 * fruit_meta_open_stream() removes O_CREAT flag
70
+		 * from xattr open. This results in vfs_streams_xattr
71
+		 * not generating an FSP extension for the files_struct
72
+		 * and causes subsequent pread() of stream to return
73
+		 * nread=0 if pread() occurs before pwrite().
74
+		 */
75
+		return nread;
76
+	}
77
+
78
+	if (nread == n) {
79
+		if (offset == 0 && nread > 3 && p[0] == 0 && p[1] == 'F' && p[2] == 'P') {
80
+			DBG_NOTICE("Fixing AFP_Info of [%s]\n",
81
+				    fsp_str_dbg(fsp));
82
+			p[0] = 'A';
83
+		}
84
		return nread;
85
	}
(-)b/net/samba415/files/disabled/patch-source3_modules_vfs__streams__xattr.c (+526 lines)
Added Link Here
1
--- source3/modules/vfs_streams_xattr.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/modules/vfs_streams_xattr.c
3
@@ -1,10 +1,10 @@
4
 /*
5
  * Store streams in xattrs
6
  *
7
- * Copyright (C) Volker Lendecke, 2008
8
+ * Copyright (C) Volker Lendecke,  2008
9
+ * Copyright (C) Timur I. Bakeyev, 2017
10
  *
11
  * Partly based on James Peach's Darwin module, which is
12
- *
13
  * Copyright (C) James Peach 2006-2007
14
  *
15
  * This program is free software; you can redistribute it and/or modify
16
@@ -79,25 +79,79 @@ static SMB_INO_T stream_inode(const SMB_
17
 }
18
19
 static ssize_t get_xattr_size(connection_struct *conn,
20
-				const struct smb_filename *smb_fname,
21
-				const char *xattr_name)
22
+			      const struct smb_filename *smb_fname,
23
+			      const char *xattr_name)
24
 {
25
-	NTSTATUS status;
26
-	struct ea_struct ea;
27
	ssize_t result;
28
29
-	status = get_ea_value(talloc_tos(), conn, NULL, smb_fname,
30
-			      xattr_name, &ea);
31
+	result = SMB_VFS_GETXATTR(conn, smb_fname, xattr_name, NULL, 0);
32
+	// ? -1
33
+	return result;
34
+}
35
36
-	if (!NT_STATUS_IS_OK(status)) {
37
-		return -1;
38
+static NTSTATUS get_xattr_value(TALLOC_CTX *mem_ctx,
39
+			connection_struct *conn,
40
+			const struct smb_filename *smb_fname,
41
+			const char *ea_name,
42
+			struct ea_struct *pea)
43
+{
44
+	ssize_t attr_size;
45
+
46
+	attr_size = get_xattr_size(conn, smb_fname, ea_name);
47
+
48
+	if (attr_size == -1) {
49
+		return map_nt_error_from_unix(errno);
50
	}
51
52
-	result = ea.value.length-1;
53
-	TALLOC_FREE(ea.value.data);
54
-	return result;
55
+	pea->value = data_blob_talloc(mem_ctx, NULL, attr_size);
56
+	/* We may have xattr of a 0 size */
57
+	if(pea->value.data == NULL && attr_size) {
58
+		DEBUG(5,
59
+			("get_xattr_value: for EA '%s' failed to allocate %lu bytes\n",
60
+			ea_name, (unsigned long)attr_size)
61
+		);
62
+		return NT_STATUS_NO_MEMORY;
63
+	}
64
+
65
+	attr_size = SMB_VFS_GETXATTR(conn, smb_fname, ea_name, pea->value.data, pea->value.length);
66
+
67
+	if (attr_size == -1) {
68
+		return map_nt_error_from_unix(errno);
69
+	}
70
+
71
+	if(pea->value.length != attr_size) {
72
+		DEBUG(5,
73
+			("get_xattr_value: for EA '%s' requested %lu, read %lu bytes\n",
74
+			ea_name, (unsigned long)pea->value.length, (unsigned long)attr_size)
75
+		);
76
+		return NT_STATUS_UNSUCCESSFUL;
77
+	}
78
+
79
+	DEBUG(10,("get_xattr_value: EA '%s' is of length %lu\n", ea_name, (unsigned long)attr_size));
80
+	/*
81
+	 * This can dump huge amount of data multiple times. For example
82
+	 * for 1Mb ADS and chunk size 64Kb the same 1Mb dump will be
83
+	 * logged 16 times!
84
+	 */
85
+	dump_data(50, (uint8_t *)pea->value.data, pea->value.length);
86
+
87
+	pea->flags = 0;
88
+	// ? user.
89
+	if (strnequal(ea_name, "user.", 5)) {
90
+		pea->name = talloc_strdup(mem_ctx, &ea_name[5]);
91
+	} else {
92
+		pea->name = talloc_strdup(mem_ctx, ea_name);
93
+	}
94
+
95
+	if (pea->name == NULL) {
96
+		data_blob_free(&pea->value);
97
+		return NT_STATUS_NO_MEMORY;
98
+	}
99
+
100
+	return NT_STATUS_OK;
101
 }
102
103
+
104
 /**
105
  * Given a stream name, populate xattr_name with the xattr name to use for
106
  * accessing the stream.
107
@@ -114,6 +168,7 @@ static NTSTATUS streams_xattr_get_name(v
108
	SMB_VFS_HANDLE_GET_DATA(handle, config, struct streams_xattr_config,
109
				return NT_STATUS_UNSUCCESSFUL);
110
111
+        // stream_name is passed as ':stream', so skip leading ':'
112
	sname = talloc_strdup(ctx, stream_name + 1);
113
	if (sname == NULL) {
114
		return NT_STATUS_NO_MEMORY;
115
@@ -125,7 +180,7 @@ static NTSTATUS streams_xattr_get_name(v
116
	 * characters from their on-the-wire Unicode Private Range
117
	 * encoding to their native ASCII representation.
118
	 *
119
-	 * As as result the name of xattrs storing the streams (via
120
+	 * As a result the name of xattrs storing the streams (via
121
	 * vfs_streams_xattr) may contain a colon, so we have to use
122
	 * strrchr_m() instead of strchr_m() for matching the stream
123
	 * type suffix.
124
@@ -157,7 +212,7 @@ static NTSTATUS streams_xattr_get_name(v
125
		return NT_STATUS_NO_MEMORY;
126
	}
127
128
-	DEBUG(10, ("xattr_name: %s, stream_name: %s\n", *xattr_name,
129
+	DEBUG(10, ("xattr_name: '%s', stream_name: '%s'\n", *xattr_name,
130
		   stream_name));
131
132
	talloc_free(sname);
133
@@ -270,8 +325,8 @@ static int streams_xattr_fstat(vfs_handl
134
		return -1;
135
	}
136
137
-	sbuf->st_ex_size = get_xattr_size(handle->conn,
138
-					smb_fname_base, io->xattr_name);
139
+	sbuf->st_ex_size = get_xattr_size(handle->conn, smb_fname_base,
140
+					  io->xattr_name);
141
	if (sbuf->st_ex_size == -1) {
142
		TALLOC_FREE(smb_fname_base);
143
		SET_STAT_INVALID(*sbuf);
144
@@ -446,10 +501,10 @@ static int streams_xattr_open(vfs_handle
145
		goto fail;
146
	}
147
148
-	status = get_ea_value(talloc_tos(), handle->conn, NULL,
149
-			      smb_fname, xattr_name, &ea);
150
+	status = get_xattr_value(talloc_tos(), handle->conn,
151
+				 smb_fname, xattr_name, &ea);
152
153
-	DEBUG(10, ("get_ea_value returned %s\n", nt_errstr(status)));
154
+	DEBUG(10, ("get_xattr_value returned %s\n", nt_errstr(status)));
155
156
	if (!NT_STATUS_IS_OK(status)) {
157
		if (!NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
158
@@ -480,19 +535,13 @@ static int streams_xattr_open(vfs_handle
159
		/*
160
		 * The attribute does not exist or needs to be truncated
161
		 */
162
-
163
-		/*
164
-		 * Darn, xattrs need at least 1 byte
165
-		 */
166
-		char null = '\0';
167
-
168
		DEBUG(10, ("creating or truncating attribute %s on file %s\n",
169
			   xattr_name, smb_fname->base_name));
170
171
		ret = SMB_VFS_SETXATTR(fsp->conn,
172
				       smb_fname,
173
				       xattr_name,
174
-				       &null, sizeof(null),
175
+				       NULL, 0,
176
				       flags & O_EXCL ? XATTR_CREATE : 0);
177
		if (ret != 0) {
178
			goto fail;
179
@@ -678,8 +727,8 @@ static int streams_xattr_rename(vfs_hand
180
	}
181
182
	/* read the old stream */
183
-	status = get_ea_value(talloc_tos(), handle->conn, NULL,
184
-			      smb_fname_src, src_xattr_name, &ea);
185
+	status = get_xattr_value(talloc_tos(), handle->conn,
186
+				 smb_fname_src, src_xattr_name, &ea);
187
	if (!NT_STATUS_IS_OK(status)) {
188
		errno = ENOENT;
189
		goto fail;
190
@@ -766,14 +815,13 @@ static NTSTATUS walk_xattr_streams(vfs_h
191
			continue;
192
		}
193
194
-		status = get_ea_value(names,
195
+		status = get_xattr_value(names,
196
					handle->conn,
197
-					NULL,
198
					smb_fname,
199
					names[i],
200
					&ea);
201
		if (!NT_STATUS_IS_OK(status)) {
202
-			DEBUG(10, ("Could not get ea %s for file %s: %s\n",
203
+			DEBUG(10, ("Could not get EA %s for file %s: %s\n",
204
				names[i],
205
				smb_fname->base_name,
206
				nt_errstr(status)));
207
@@ -835,16 +883,17 @@ struct streaminfo_state {
208
	NTSTATUS status;
209
 };
210
211
-static bool collect_one_stream(struct ea_struct *ea, void *private_data)
212
+static bool collect_one_stream(struct ea_struct *pea, void *private_data)
213
 {
214
	struct streaminfo_state *state =
215
		(struct streaminfo_state *)private_data;
216
217
+	// ? -1
218
	if (!add_one_stream(state->mem_ctx,
219
			    &state->num_streams, &state->streams,
220
-			    ea->name, ea->value.length-1,
221
+			    pea->name, pea->value.length,
222
			    smb_roundup(state->handle->conn,
223
-					ea->value.length-1))) {
224
+					pea->value.length))) {
225
		state->status = NT_STATUS_NO_MEMORY;
226
		return false;
227
	}
228
@@ -964,14 +1013,17 @@ static ssize_t streams_xattr_pwrite(vfs_
229
				    files_struct *fsp, const void *data,
230
				    size_t n, off_t offset)
231
 {
232
-        struct stream_io *sio =
233
+	struct stream_io *sio =
234
		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
235
+	struct smb_filename *smb_fname_base = NULL;
236
+	TALLOC_CTX *frame = NULL;
237
+
238
	struct ea_struct ea;
239
	NTSTATUS status;
240
-	struct smb_filename *smb_fname_base = NULL;
241
	int ret;
242
243
-	DEBUG(10, ("streams_xattr_pwrite called for %d bytes\n", (int)n));
244
+	DEBUG(10, ("streams_xattr_pwrite: offset=%lu, size=%lu\n",
245
+		   (unsigned long)offset, (unsigned long)n));
246
247
	if (sio == NULL) {
248
		return SMB_VFS_NEXT_PWRITE(handle, fsp, data, n, offset);
249
@@ -981,6 +1033,8 @@ static ssize_t streams_xattr_pwrite(vfs_
250
		return -1;
251
	}
252
253
+	frame = talloc_stackframe();
254
+
255
	/* Create an smb_filename with stream_name == NULL. */
256
	smb_fname_base = synthetic_smb_fname(talloc_tos(),
257
					sio->base,
258
@@ -988,39 +1042,55 @@ static ssize_t streams_xattr_pwrite(vfs_
259
					NULL,
260
					fsp->fsp_name->flags);
261
	if (smb_fname_base == NULL) {
262
+		TALLOC_FREE(frame);
263
		errno = ENOMEM;
264
		return -1;
265
	}
266
267
-	status = get_ea_value(talloc_tos(), handle->conn, NULL,
268
-			      smb_fname_base, sio->xattr_name, &ea);
269
-	if (!NT_STATUS_IS_OK(status)) {
270
-		return -1;
271
-	}
272
-
273
-        if ((offset + n) > ea.value.length-1) {
274
-		uint8_t *tmp;
275
+	status = get_xattr_value(talloc_tos(), handle->conn,
276
+				 smb_fname_base, sio->xattr_name, &ea);
277
278
-		tmp = talloc_realloc(talloc_tos(), ea.value.data, uint8_t,
279
-					   offset + n + 1);
280
+	if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
281
+		/*
282
+		 * This can happen if we sit behind vfs_fruit:
283
+		 * fruit_ftruncate calls UNLINK on an attribute
284
+		 * truncating the "file" to zero length. A later
285
+		 * pwrite faces a non-existing attribute, we need to
286
+		 * cope with that here.
287
+		 *
288
+		 * This might be not the last word on this.
289
+		 */
290
291
-		if (tmp == NULL) {
292
-			TALLOC_FREE(ea.value.data);
293
-                        errno = ENOMEM;
294
-                        return -1;
295
-                }
296
-		ea.value.data = tmp;
297
-		ea.value.length = offset + n + 1;
298
-		ea.value.data[offset+n] = 0;
299
-        }
300
+		ea = (struct ea_struct) {0};
301
+		ea.name = talloc_strdup(talloc_tos(), sio->xattr_name);
302
+		if (ea.name == NULL) {
303
+			TALLOC_FREE(frame);
304
+			errno = ENOMEM;
305
+			return -1;
306
+		}
307
+		status = NT_STATUS_OK;
308
+	}
309
310
-        memcpy(ea.value.data + offset, data, n);
311
+	if (!NT_STATUS_IS_OK(status)) {
312
+		TALLOC_FREE(frame);
313
+		return -1;
314
+	}
315
+	// ? -1
316
+	if ((offset + n) > ea.value.length) {
317
+		if(!data_blob_realloc(talloc_tos(), &ea.value, offset + n)) {
318
+			TALLOC_FREE(frame);
319
+			errno = ENOMEM;
320
+			return -1;
321
+		}
322
+	}
323
+	memcpy(ea.value.data + offset, data, n);
324
325
	ret = SMB_VFS_SETXATTR(fsp->conn,
326
			       fsp->fsp_name,
327
			       sio->xattr_name,
328
			       ea.value.data, ea.value.length, 0);
329
-	TALLOC_FREE(ea.value.data);
330
+
331
+	TALLOC_FREE(frame);
332
333
	if (ret == -1) {
334
		return -1;
335
@@ -1033,15 +1103,17 @@ static ssize_t streams_xattr_pread(vfs_h
336
				   files_struct *fsp, void *data,
337
				   size_t n, off_t offset)
338
 {
339
-        struct stream_io *sio =
340
+	struct stream_io *sio =
341
		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
342
+	struct smb_filename *smb_fname_base = NULL;
343
+	TALLOC_CTX *frame = NULL;
344
+
345
	struct ea_struct ea;
346
	NTSTATUS status;
347
-	size_t length, overlap;
348
-	struct smb_filename *smb_fname_base = NULL;
349
+	size_t overlap;
350
351
-	DEBUG(10, ("streams_xattr_pread: offset=%d, size=%d\n",
352
-		   (int)offset, (int)n));
353
+	DEBUG(10, ("streams_xattr_pread: offset=%lu, size=%lu\n",
354
+		   (unsigned long)offset, (unsigned long)n));
355
356
	if (sio == NULL) {
357
		return SMB_VFS_NEXT_PREAD(handle, fsp, data, n, offset);
358
@@ -1051,6 +1123,8 @@ static ssize_t streams_xattr_pread(vfs_h
359
		return -1;
360
	}
361
362
+	frame = talloc_stackframe();
363
+
364
	/* Create an smb_filename with stream_name == NULL. */
365
	smb_fname_base = synthetic_smb_fname(talloc_tos(),
366
					sio->base,
367
@@ -1058,31 +1132,35 @@ static ssize_t streams_xattr_pread(vfs_h
368
					NULL,
369
					fsp->fsp_name->flags);
370
	if (smb_fname_base == NULL) {
371
+		TALLOC_FREE(frame);
372
		errno = ENOMEM;
373
		return -1;
374
	}
375
376
-	status = get_ea_value(talloc_tos(), handle->conn, NULL,
377
-			      smb_fname_base, sio->xattr_name, &ea);
378
+	status = get_xattr_value(talloc_tos(), handle->conn,
379
+				 smb_fname_base, sio->xattr_name, &ea);
380
	if (!NT_STATUS_IS_OK(status)) {
381
+		TALLOC_FREE(frame);
382
		return -1;
383
	}
384
+	// ? -1
385
+	//length = ea.value.length-1;
386
387
-	length = ea.value.length-1;
388
+	DEBUG(10, ("streams_xattr_pread: get_xattr_value() returned %lu bytes\n",
389
+		   (unsigned long)ea.value.length));
390
391
-	DEBUG(10, ("streams_xattr_pread: get_ea_value returned %d bytes\n",
392
-		   (int)length));
393
+	/* Attempt to read past EOF. */
394
+	if (ea.value.length <= offset) {
395
+		TALLOC_FREE(frame);
396
+		return 0;
397
+	}
398
399
-        /* Attempt to read past EOF. */
400
-        if (length <= offset) {
401
-                return 0;
402
-        }
403
+	overlap = (offset + n) > ea.value.length ? (ea.value.length - offset) : n;
404
+	memcpy(data, ea.value.data + offset, overlap);
405
406
-        overlap = (offset + n) > length ? (length - offset) : n;
407
-        memcpy(data, ea.value.data + offset, overlap);
408
+	TALLOC_FREE(frame);
409
410
-	TALLOC_FREE(ea.value.data);
411
-        return overlap;
412
+	return overlap;
413
 }
414
415
 struct streams_xattr_pread_state {
416
@@ -1249,16 +1327,18 @@ static int streams_xattr_ftruncate(struc
417
					struct files_struct *fsp,
418
					off_t offset)
419
 {
420
-	int ret;
421
-	uint8_t *tmp;
422
-	struct ea_struct ea;
423
-	NTSTATUS status;
424
-        struct stream_io *sio =
425
+	struct stream_io *sio =
426
		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
427
	struct smb_filename *smb_fname_base = NULL;
428
+	TALLOC_CTX *frame = NULL;
429
430
-	DEBUG(10, ("streams_xattr_ftruncate called for file %s offset %.0f\n",
431
-		   fsp_str_dbg(fsp), (double)offset));
432
+	struct ea_struct ea;
433
+	NTSTATUS status;
434
+	size_t orig_length;
435
+	int ret;
436
+
437
+	DEBUG(10, ("streams_xattr_ftruncate: called for file '%s' with offset %lu\n",
438
+		   fsp_str_dbg(fsp), (unsigned long)offset));
439
440
	if (sio == NULL) {
441
		return SMB_VFS_NEXT_FTRUNCATE(handle, fsp, offset);
442
@@ -1268,6 +1348,8 @@ static int streams_xattr_ftruncate(struc
443
		return -1;
444
	}
445
446
+	frame = talloc_stackframe();
447
+
448
	/* Create an smb_filename with stream_name == NULL. */
449
	smb_fname_base = synthetic_smb_fname(talloc_tos(),
450
					sio->base,
451
@@ -1275,40 +1357,46 @@ static int streams_xattr_ftruncate(struc
452
					NULL,
453
					fsp->fsp_name->flags);
454
	if (smb_fname_base == NULL) {
455
+		TALLOC_FREE(frame);
456
		errno = ENOMEM;
457
		return -1;
458
	}
459
460
-	status = get_ea_value(talloc_tos(), handle->conn, NULL,
461
-			      smb_fname_base, sio->xattr_name, &ea);
462
+	status = get_xattr_value(talloc_tos(), handle->conn,
463
+				 smb_fname_base, sio->xattr_name, &ea);
464
	if (!NT_STATUS_IS_OK(status)) {
465
+		TALLOC_FREE(frame);
466
		return -1;
467
	}
468
+	orig_length = ea.value.length;
469
470
-	tmp = talloc_realloc(talloc_tos(), ea.value.data, uint8_t,
471
-				   offset + 1);
472
+	/* Requested size matches the original size */
473
+	if(orig_length == offset) {
474
+		TALLOC_FREE(frame);
475
+		return 0;
476
+	}
477
478
-	if (tmp == NULL) {
479
-		TALLOC_FREE(ea.value.data);
480
+	/* That can both shrink and expand */
481
+	/* XXX: If offset == 0 the result of talloc_realloc is NULL, but still valid */
482
+	if(offset && !data_blob_realloc(talloc_tos(), &ea.value, offset)) {
483
+		TALLOC_FREE(frame);
484
		errno = ENOMEM;
485
		return -1;
486
	}
487
488
-	/* Did we expand ? */
489
-	if (ea.value.length < offset + 1) {
490
-		memset(&tmp[ea.value.length], '\0',
491
-			offset + 1 - ea.value.length);
492
+	/* If we expanded, fill up extra space with zeros */
493
+	if (orig_length < offset) {
494
+		memset(ea.value.data + orig_length, 0,
495
+			offset - orig_length);
496
	}
497
498
-	ea.value.data = tmp;
499
-	ea.value.length = offset + 1;
500
-	ea.value.data[offset] = 0;
501
-
502
+	/* XXX: We should use ea.value.length here, but when offset == 0
503
+	   it's not reset to 0 in data_blob_realloc() */
504
	ret = SMB_VFS_SETXATTR(fsp->conn,
505
			       fsp->fsp_name,
506
			       sio->xattr_name,
507
-			       ea.value.data, ea.value.length, 0);
508
-	TALLOC_FREE(ea.value.data);
509
+			       ea.value.data, offset, 0);
510
+	TALLOC_FREE(frame);
511
512
	if (ret == -1) {
513
		return -1;
514
@@ -1326,9 +1414,9 @@ static int streams_xattr_fallocate(struc
515
         struct stream_io *sio =
516
		(struct stream_io *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
517
518
-	DEBUG(10, ("streams_xattr_fallocate called for file %s offset %.0f"
519
-		"len = %.0f\n",
520
-		fsp_str_dbg(fsp), (double)offset, (double)len));
521
+	DEBUG(10, ("streams_xattr_fallocate: called for file '%s' with offset %lu"
522
+		"len = %lu\n",
523
+		fsp_str_dbg(fsp), (unsigned long)offset, (unsigned long)len));
524
525
	if (sio == NULL) {
526
		return SMB_VFS_NEXT_FALLOCATE(handle, fsp, mode, offset, len);
(-)b/net/samba415/files/disabled/patch-source3_modules_vfs__virusfilter__utils.c (+36 lines)
Added Link Here
1
--- source3/modules/vfs_virusfilter_utils.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/modules/vfs_virusfilter_utils.c
3
@@ -392,6 +392,10 @@ bool virusfilter_io_writel(
4
5
 bool virusfilter_io_writefl(
6
	struct virusfilter_io_handle *io_h,
7
+	const char *data_fmt, ...) PRINTF_ATTRIBUTE(2, 3);
8
+
9
+bool virusfilter_io_writefl(
10
+	struct virusfilter_io_handle *io_h,
11
	const char *data_fmt, ...)
12
 {
13
	va_list ap;
14
@@ -415,6 +419,10 @@ bool virusfilter_io_writefl(
15
16
 bool virusfilter_io_vwritefl(
17
	struct virusfilter_io_handle *io_h,
18
+	const char *data_fmt, va_list ap) PRINTF_ATTRIBUTE(2, 0);
19
+
20
+bool virusfilter_io_vwritefl(
21
+	struct virusfilter_io_handle *io_h,
22
	const char *data_fmt, va_list ap)
23
 {
24
	char data[VIRUSFILTER_IO_BUFFER_SIZE + VIRUSFILTER_IO_EOL_SIZE];
25
@@ -666,6 +674,11 @@ bool virusfilter_io_readl(TALLOC_CTX *ct
26
 bool virusfilter_io_writefl_readl(
27
	struct virusfilter_io_handle *io_h,
28
	char **read_line,
29
+	const char *fmt, ...) PRINTF_ATTRIBUTE(3, 4);
30
+
31
+bool virusfilter_io_writefl_readl(
32
+	struct virusfilter_io_handle *io_h,
33
+	char **read_line,
34
	const char *fmt, ...)
35
 {
36
	bool ok;
(-)b/net/samba415/files/disabled/patch-source3_registry_tests_test__regfio.c (+10 lines)
Added Link Here
1
--- source3/registry/tests/test_regfio.c.orig	2019-05-07 08:38:21 UTC
2
+++ source3/registry/tests/test_regfio.c
3
@@ -24,6 +24,7 @@
4
5
 #include <errno.h>
6
 #include <stdlib.h>
7
+#include <unistd.h>
8
 #include <sys/types.h>
9
 #include <sys/stat.h>
10
 #include <fcntl.h>
(-)b/net/samba415/files/disabled/patch-source3_smbd_quotas.c (+19 lines)
Added Link Here
1
--- source3/smbd/quotas.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/smbd/quotas.c
3
@@ -125,6 +125,7 @@ static bool nfs_quotas(char *nfspath, ui
4
	if (!cutstr)
5
		return False;
6
7
+	memset(&D, '\0', sizeof(D));
8
	memset(cutstr, '\0', len+1);
9
	host = strncat(cutstr,mnttype, sizeof(char) * len );
10
	DEBUG(5,("nfs_quotas: looking for mount on \"%s\"\n", cutstr));
11
@@ -133,7 +134,7 @@ static bool nfs_quotas(char *nfspath, ui
12
	args.gqa_pathp = testpath+1;
13
	args.gqa_uid = uid;
14
15
-	DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%i\" rpcvers \"%i\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
16
+	DEBUG(5,("nfs_quotas: Asking for host \"%s\" rpcprog \"%lu\" rpcvers \"%lu\" network \"%s\"\n", host, RQUOTAPROG, RQUOTAVERS, "udp"));
17
18
	if ((clnt = clnt_create(host, RQUOTAPROG, RQUOTAVERS, "udp")) == NULL) {
19
		ret = False;
(-)b/net/samba415/files/disabled/patch-source3_smbd_utmp.c (+260 lines)
Added Link Here
1
--- source3/smbd/utmp.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/smbd/utmp.c
3
@@ -257,7 +257,7 @@ static char *uw_pathname(TALLOC_CTX *ctx
4
  Update utmp file directly.  No subroutine interface: probably a BSD system.
5
 ****************************************************************************/
6
7
-static void pututline_my(const char *uname, struct utmp *u, bool claim)
8
+static void pututline_my(const char *uname, STRUCT_UTMP *u, bool claim)
9
 {
10
	DEBUG(1,("pututline_my: not yet implemented\n"));
11
	/* BSD implementor: may want to consider (or not) adjusting "lastlog" */
12
@@ -271,7 +271,7 @@ static void pututline_my(const char *una
13
  Credit: Michail Vidiassov <master@iaas.msu.ru>
14
 ****************************************************************************/
15
16
-static void updwtmp_my(const char *wname, struct utmp *u, bool claim)
17
+static void updwtmp_my(const char *wname, STRUCT_UTMP *u, bool claim)
18
 {
19
	int fd;
20
	struct stat buf;
21
@@ -303,7 +303,7 @@ static void updwtmp_my(const char *wname
22
	if ((fd = open(wname, O_WRONLY|O_APPEND, 0)) < 0)
23
		return;
24
	if (fstat(fd, &buf) == 0) {
25
-		if (write(fd, (char *)u, sizeof(struct utmp)) != sizeof(struct utmp))
26
+		if (write(fd, (char *)u, sizeof(STRUCT_UTMP)) != sizeof(STRUCT_UTMP))
27
		(void) ftruncate(fd, buf.st_size);
28
	}
29
	(void) close(fd);
30
@@ -314,12 +314,12 @@ static void updwtmp_my(const char *wname
31
  Update via utmp/wtmp (not utmpx/wtmpx).
32
 ****************************************************************************/
33
34
-static void utmp_nox_update(struct utmp *u, bool claim)
35
+static void utmp_nox_update(STRUCT_UTMP *u, bool claim)
36
 {
37
	char *uname = NULL;
38
	char *wname = NULL;
39
 #if defined(PUTUTLINE_RETURNS_UTMP)
40
-	struct utmp *urc;
41
+	STRUCT_UTMP *urc;
42
 #endif /* PUTUTLINE_RETURNS_UTMP */
43
44
	uname = uw_pathname(talloc_tos(), "utmp", ut_pathname);
45
@@ -376,127 +376,52 @@ static void utmp_nox_update(struct utmp
46
	}
47
 }
48
49
-/****************************************************************************
50
- Copy a string in the utmp structure.
51
-****************************************************************************/
52
53
-static void utmp_strcpy(char *dest, const char *src, size_t n)
54
-{
55
-	size_t len = 0;
56
57
-	memset(dest, '\0', n);
58
-	if (src)
59
-		len = strlen(src);
60
-	if (len >= n) {
61
-		memcpy(dest, src, n);
62
-	} else {
63
-		if (len)
64
-			memcpy(dest, src, len);
65
-	}
66
-}
67
+
68
69
 /****************************************************************************
70
  Update via utmpx/wtmpx (preferred) or via utmp/wtmp.
71
 ****************************************************************************/
72
73
-static void sys_utmp_update(struct utmp *u, const char *hostname, bool claim)
74
+static void sys_utmp_update(STRUCT_UTMP *u, const char *hostname, bool claim)
75
 {
76
-#if !defined(HAVE_UTMPX_H)
77
-	/* No utmpx stuff.  Drop to non-x stuff */
78
-	utmp_nox_update(u, claim);
79
-#elif !defined(HAVE_PUTUTXLINE)
80
-	/* Odd.  Have utmpx.h but no "pututxline()".  Drop to non-x stuff */
81
-	DEBUG(1,("utmp_update: have utmpx.h but no pututxline() function\n"));
82
-	utmp_nox_update(u, claim);
83
-#elif !defined(HAVE_GETUTMPX)
84
-	/* Odd.  Have utmpx.h but no "getutmpx()".  Drop to non-x stuff */
85
-	DEBUG(1,("utmp_update: have utmpx.h but no getutmpx() function\n"));
86
-	utmp_nox_update(u, claim);
87
-#elif !defined(HAVE_UPDWTMPX)
88
-	/* Have utmpx.h but no "updwtmpx()".  Drop to non-x stuff */
89
-	DEBUG(1,("utmp_update: have utmpx.h but no updwtmpx() function\n"));
90
-	utmp_nox_update(u, claim);
91
-#else
92
-	char *uname = NULL;
93
-	char *wname = NULL;
94
-	struct utmpx ux, *uxrc;
95
-
96
-	getutmpx(u, &ux);
97
-
98
-#if defined(HAVE_UX_UT_SYSLEN)
99
-	if (hostname)
100
-		ux.ut_syslen = strlen(hostname) + 1;	/* include end NULL */
101
-	else
102
-		ux.ut_syslen = 0;
103
-#endif
104
-#if defined(HAVE_UX_UT_HOST)
105
-	utmp_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host));
106
-#endif
107
-
108
-	uname = uw_pathname(talloc_tos(), "utmpx", ux_pathname);
109
-	wname = uw_pathname(talloc_tos(), "wtmpx", wx_pathname);
110
-	if (uname && wname) {
111
-		DEBUG(2,("utmp_update: uname:%s wname:%s\n", uname, wname));
112
-	}
113
+	STRUCT_UTMP *urc;
114
115
-	/*
116
-	 * Check for either uname or wname being empty.
117
-	 * Some systems, such as Redhat 6, have a "utmpx.h" which doesn't
118
-	 * define default filenames.
119
-	 * Also, our local installation has not provided an override.
120
-	 * Drop to non-x method.  (E.g. RH6 has good defaults in "utmp.h".)
121
-	 */
122
-	if (!uname || !wname || (strlen(uname) == 0) || (strlen(wname) == 0)) {
123
-		utmp_nox_update(u, claim);
124
-	} else {
125
-		utmpxname(uname);
126
-		setutxent();
127
-		uxrc = pututxline(&ux);
128
-		endutxent();
129
-		if (uxrc == NULL) {
130
-			DEBUG(2,("utmp_update: pututxline() failed\n"));
131
-			return;
132
-		}
133
-		updwtmpx(wname, &ux);
134
+	setutxent();
135
+	urc = pututxline(u);
136
+	endutxent();
137
+	if (urc == NULL) {
138
+		DEBUG(2,("utmp_update: pututxline() failed\n"));
139
+		return;
140
	}
141
-#endif /* HAVE_UTMPX_H */
142
 }
143
144
 #if defined(HAVE_UT_UT_ID)
145
 /****************************************************************************
146
  Encode the unique connection number into "ut_id".
147
 ****************************************************************************/
148
-
149
-static int ut_id_encode(int i, char *fourbyte)
150
+static void ut_id_encode(char *buf, int id, size_t buf_size)
151
 {
152
-	int nbase;
153
-	const char *ut_id_encstr = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
154
-
155
-/*
156
- * 'ut_id_encstr' is the character set on which modulo arithmetic is done.
157
- * Example: digits would produce the base-10 numbers from '001'.
158
- */
159
-	nbase = strlen(ut_id_encstr);
160
+	const char ut_id_encstr[] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
161
162
-	fourbyte[0] = ut_id_encstr[i % nbase];
163
-	i /= nbase;
164
-	fourbyte[1] = ut_id_encstr[i % nbase];
165
-	i /= nbase;
166
-	fourbyte[3] = ut_id_encstr[i % nbase];
167
-	i /= nbase;
168
-	fourbyte[2] = ut_id_encstr[i % nbase];
169
-	i /= nbase;
170
+	int nbase = sizeof(ut_id_encstr) - 1;
171
+	/*
172
+	 * 'ut_id_encstr' is the character set on which modulo arithmetic is done.
173
+	 * Example: digits would produce the base-10 numbers from '001'.
174
+	 */
175
176
-	/* we do not care about overflows as i is a random number */
177
-	return 0;
178
+	for(int i = 0; i < buf_size; i++) {
179
+		buf[i] = ut_id_encstr[id % nbase];
180
+		id /= nbase;
181
+	}
182
 }
183
 #endif /* defined(HAVE_UT_UT_ID) */
184
185
-
186
 /*
187
   fill a system utmp structure given all the info we can gather
188
 */
189
-static bool sys_utmp_fill(struct utmp *u,
190
+static bool sys_utmp_fill(STRUCT_UTMP *u,
191
			const char *username, const char *hostname,
192
			const char *id_str, int id_num)
193
 {
194
@@ -509,16 +434,16 @@ static bool sys_utmp_fill(struct utmp *u
195
	 *	rather than to try to detect and optimise.
196
	 */
197
 #if defined(HAVE_UT_UT_USER)
198
-	utmp_strcpy(u->ut_user, username, sizeof(u->ut_user));
199
+	strncpy(u->ut_user, username, sizeof(u->ut_user));
200
 #elif defined(HAVE_UT_UT_NAME)
201
-	utmp_strcpy(u->ut_name, username, sizeof(u->ut_name));
202
+	strncpy(u->ut_name, username, sizeof(u->ut_name));
203
 #endif
204
205
	/*
206
	 * ut_line:
207
	 *	If size limit proves troublesome, then perhaps use "ut_id_encode()".
208
	 */
209
-	utmp_strcpy(u->ut_line, id_str, sizeof(u->ut_line));
210
+	strncpy(u->ut_line, id_str, sizeof(u->ut_line));
211
212
 #if defined(HAVE_UT_UT_PID)
213
	u->ut_pid = getpid();
214
@@ -535,20 +460,23 @@ static bool sys_utmp_fill(struct utmp *u
215
	u->ut_time = timeval.tv_sec;
216
 #elif defined(HAVE_UT_UT_TV)
217
	GetTimeOfDay(&timeval);
218
-	u->ut_tv = timeval;
219
+	u->ut_tv.tv_sec = timeval.tv_sec;
220
+	u->ut_tv.tv_usec = timeval.tv_usec;
221
 #else
222
 #error "with-utmp must have UT_TIME or UT_TV"
223
 #endif
224
225
 #if defined(HAVE_UT_UT_HOST)
226
-	utmp_strcpy(u->ut_host, hostname, sizeof(u->ut_host));
227
+	if(hostname != NULL) {
228
+		strncpy(u->ut_host, hostname, sizeof(u->ut_host));
229
+#if defined(HAVE_UT_UT_SYSLEN)
230
+		u->ut_syslen = strlen(hostname) + 1;	/* include trailing NULL */
231
+#endif
232
+	}
233
 #endif
234
235
 #if defined(HAVE_UT_UT_ID)
236
-	if (ut_id_encode(id_num, u->ut_id) != 0) {
237
-		DEBUG(1,("utmp_fill: cannot encode id %d\n", id_num));
238
-		return False;
239
-	}
240
+	ut_id_encode(u->ut_id, id_num, sizeof(u->ut_id));
241
 #endif
242
243
	return True;
244
@@ -561,7 +489,7 @@ static bool sys_utmp_fill(struct utmp *u
245
 void sys_utmp_yield(const char *username, const char *hostname,
246
		    const char *id_str, int id_num)
247
 {
248
-	struct utmp u;
249
+	STRUCT_UTMP u;
250
251
	ZERO_STRUCT(u);
252
253
@@ -587,7 +515,7 @@ void sys_utmp_yield(const char *username
254
 void sys_utmp_claim(const char *username, const char *hostname,
255
		    const char *id_str, int id_num)
256
 {
257
-	struct utmp u;
258
+	STRUCT_UTMP u;
259
260
	ZERO_STRUCT(u);
(-)b/net/samba415/files/disabled/patch-source3_torture_cmd__vfs.c (+140 lines)
Added Link Here
1
--- source3/torture/cmd_vfs.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/torture/cmd_vfs.c
3
@@ -145,7 +145,84 @@ static NTSTATUS cmd_disk_free(struct vfs_state *vfs, T
4
	return NT_STATUS_OK;
5
 }
6
7
+static NTSTATUS cmd_get_quota(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
8
+{
9
+	struct smb_filename *smb_fname = NULL;
10
+	uint64_t quota, bsize, dfree, dsize;
11
+	enum SMB_QUOTA_TYPE qtype;
12
+	SMB_DISK_QUOTA D;
13
+	unid_t id;
14
+	int r;
15
16
+	if (argc != 4) {
17
+		printf("Usage: get_quota <path> [user|group] id\n");
18
+		return NT_STATUS_OK;
19
+	}
20
+
21
+	smb_fname = synthetic_smb_fname(talloc_tos(),
22
+					argv[1],
23
+					NULL,
24
+					NULL,
25
+					0,
26
+					ssf_flags());
27
+	if (smb_fname == NULL) {
28
+		return NT_STATUS_NO_MEMORY;
29
+	}
30
+
31
+	if(strcmp(argv[2], "user") == 0) {
32
+		qtype = SMB_USER_FS_QUOTA_TYPE;
33
+	}
34
+	else if(strcmp(argv[2], "group") == 0) {
35
+		qtype = SMB_GROUP_FS_QUOTA_TYPE;
36
+	}
37
+	else {
38
+		printf("Usage: get_quota <path> [user|group] id\n");
39
+		return NT_STATUS_OK;
40
+	}
41
+
42
+	id.uid = atoi(argv[3]);
43
+
44
+	ZERO_STRUCT(D);
45
+
46
+	r = SMB_VFS_GET_QUOTA(vfs->conn, smb_fname, qtype, id, &D);
47
+
48
+	if (r == -1 && errno != ENOSYS) {
49
+		return NT_STATUS_UNSUCCESSFUL;
50
+	}
51
+
52
+	if (r == 0 && (D.qflags & QUOTAS_DENY_DISK) == 0) {
53
+		return NT_STATUS_UNSUCCESSFUL;
54
+	}
55
+
56
+	bsize = D.bsize;
57
+	/* Use softlimit to determine disk space, except when it has been exceeded */
58
+	if (
59
+		(D.softlimit && D.curblocks >= D.softlimit) ||
60
+		(D.hardlimit && D.curblocks >= D.hardlimit) ||
61
+		(D.isoftlimit && D.curinodes >= D.isoftlimit) ||
62
+		(D.ihardlimit && D.curinodes>=D.ihardlimit)
63
+	) {
64
+		dfree = 0;
65
+		dsize = D.curblocks;
66
+	} else if (D.softlimit==0 && D.hardlimit==0) {
67
+		return NT_STATUS_UNSUCCESSFUL;
68
+	} else {
69
+		if (D.softlimit == 0) {
70
+			D.softlimit = D.hardlimit;
71
+		}
72
+		dfree = D.softlimit - D.curblocks;
73
+		dsize = D.softlimit;
74
+	}
75
+
76
+	printf("get_quota: bsize = %lu, dfree = %lu, dsize = %lu\n",
77
+			(unsigned long)bsize,
78
+			(unsigned long)dfree,
79
+			(unsigned long)dsize);
80
+
81
+	return NT_STATUS_OK;
82
+}
83
+
84
+
85
 static NTSTATUS cmd_opendir(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv)
86
 {
87
	struct smb_filename *smb_fname = NULL;
88
@@ -2028,6 +2105,7 @@ struct cmd_set vfs_commands[] = {
89
	{ "connect",   cmd_connect,   "VFS connect()",    "connect" },
90
	{ "disconnect",   cmd_disconnect,   "VFS disconnect()",    "disconnect" },
91
	{ "disk_free",   cmd_disk_free,   "VFS disk_free()",    "disk_free <path>" },
92
+	{ "get_quota",   cmd_get_quota,   "VFS get_quota()",    "get_quota <path> [user|group] id" },
93
	{ "opendir",   cmd_opendir,   "VFS opendir()",    "opendir <fname>" },
94
	{ "readdir",   cmd_readdir,   "VFS readdir()",    "readdir" },
95
	{ "mkdir",   cmd_mkdir,   "VFS mkdir()",    "mkdir <path>" },
96
@@ -2057,33 +2135,22 @@ struct cmd_set vfs_commands[] = {
97
	{ "link",   cmd_link,   "VFS link()",    "link <oldpath> <newpath>" },
98
	{ "mknod",   cmd_mknod,   "VFS mknod()",    "mknod <path> <mode> <dev>" },
99
	{ "realpath",   cmd_realpath,   "VFS realpath()",    "realpath <path>" },
100
-	{ "getxattr", cmd_getxattr, "VFS getxattr()",
101
-	  "getxattr <path> <name>" },
102
-	{ "listxattr", cmd_listxattr, "VFS listxattr()",
103
-	  "listxattr <path>" },
104
-	{ "setxattr", cmd_setxattr, "VFS setxattr()",
105
-	  "setxattr <path> <name> <value> [<flags>]" },
106
-	{ "removexattr", cmd_removexattr, "VFS removexattr()",
107
-	  "removexattr <path> <name>\n" },
108
-	{ "fget_nt_acl", cmd_fget_nt_acl, "VFS fget_nt_acl()",
109
-	  "fget_nt_acl <fd>\n" },
110
-	{ "get_nt_acl", cmd_get_nt_acl, "VFS get_nt_acl()",
111
-	  "get_nt_acl <path>\n" },
112
-	{ "fset_nt_acl", cmd_fset_nt_acl, "VFS fset_nt_acl()",
113
-	  "fset_nt_acl <fd>\n" },
114
-	{ "set_nt_acl", cmd_set_nt_acl, "VFS open() and fset_nt_acl()",
115
-	  "set_nt_acl <file>\n" },
116
+	{ "getxattr", cmd_getxattr, "VFS getxattr()", "getxattr <path> <name>" },
117
+	{ "listxattr", cmd_listxattr, "VFS listxattr()", "listxattr <path>" },
118
+	{ "setxattr", cmd_setxattr, "VFS setxattr()", "setxattr <path> <name> <value> [<flags>]" },
119
+	{ "removexattr", cmd_removexattr, "VFS removexattr()", "removexattr <path> <name>\n" },
120
+	{ "fget_nt_acl", cmd_fget_nt_acl, "VFS fget_nt_acl()", "fget_nt_acl <fd>\n" },
121
+	{ "get_nt_acl", cmd_get_nt_acl, "VFS get_nt_acl()", "get_nt_acl <path>\n" },
122
+	{ "fset_nt_acl", cmd_fset_nt_acl, "VFS fset_nt_acl()", "fset_nt_acl <fd>\n" },
123
+	{ "set_nt_acl", cmd_set_nt_acl, "VFS open() and fset_nt_acl()", "set_nt_acl <file>\n" },
124
	{ "sys_acl_get_file", cmd_sys_acl_get_file, "VFS sys_acl_get_file()", "sys_acl_get_file <path>" },
125
	{ "sys_acl_get_fd", cmd_sys_acl_get_fd, "VFS sys_acl_get_fd()", "sys_acl_get_fd <fd>" },
126
-	{ "sys_acl_blob_get_file", cmd_sys_acl_blob_get_file,
127
-	  "VFS sys_acl_blob_get_file()", "sys_acl_blob_get_file <path>" },
128
-	{ "sys_acl_blob_get_fd", cmd_sys_acl_blob_get_fd,
129
-	  "VFS sys_acl_blob_get_fd()", "sys_acl_blob_get_fd <path>" },
130
+	{ "sys_acl_blob_get_file", cmd_sys_acl_blob_get_file, "VFS sys_acl_blob_get_file()", "sys_acl_blob_get_file <path>" },
131
+	{ "sys_acl_blob_get_fd", cmd_sys_acl_blob_get_fd, "VFS sys_acl_blob_get_fd()", "sys_acl_blob_get_fd <path>" },
132
	{ "sys_acl_delete_def_file", cmd_sys_acl_delete_def_file, "VFS sys_acl_delete_def_file()", "sys_acl_delete_def_file <path>" },
133
134
135
-	{ "test_chain", cmd_test_chain, "test chain code",
136
-	  "test_chain" },
137
+	{ "test_chain", cmd_test_chain, "test chain code", "test_chain" },
138
	{ "translate_name", cmd_translate_name, "VFS translate_name()", "translate_name unix_filename" },
139
	{0}
140
 };
(-)b/net/samba415/files/disabled/patch-source3_utils_net.c (+18 lines)
Added Link Here
1
--- source3/utils/net.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/utils/net.c
3
@@ -1096,8 +1096,13 @@ static void get_credentials_file(struct
4
		lp_set_cmdline("netbios name", c->opt_requester_name);
5
	}
6
7
-	if (!c->opt_user_name && getenv("LOGNAME")) {
8
-		c->opt_user_name = getenv("LOGNAME");
9
+	if (!c->opt_user_name) {
10
+		if(getenv("LOGNAME"))
11
+			c->opt_user_name = getenv("LOGNAME");
12
+		else
13
+			d_fprintf(stderr,
14
+				_("Environment LOGNAME is not defined."
15
+			          " Trying anonymous access.\n"));
16
	}
17
18
	if (!c->opt_workgroup) {
(-)b/net/samba415/files/disabled/patch-source3_utils_net__time.c (+19 lines)
Added Link Here
1
--- source3/utils/net_time.c.orig	2019-01-15 10:07:00 UTC
2
+++ source3/utils/net_time.c
3
@@ -81,10 +81,15 @@ static const char *systime(time_t t)
4
	if (!tm) {
5
		return "unknown";
6
	}
7
-
8
+#if defined(FREEBSD)
9
+	return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%02d.%02d",
10
+				tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday,
11
+				tm->tm_hour, tm->tm_min, tm->tm_sec);
12
+#else
13
	return talloc_asprintf(talloc_tos(), "%02d%02d%02d%02d%04d.%02d",
14
			       tm->tm_mon+1, tm->tm_mday, tm->tm_hour,
15
			       tm->tm_min, tm->tm_year + 1900, tm->tm_sec);
16
+#endif
17
 }
18
19
 int net_time_usage(struct net_context *c, int argc, const char **argv)
(-)b/net/samba415/files/disabled/patch-source3_winbindd_wscript__build (+10 lines)
Added Link Here
1
--- source3/winbindd/wscript_build.orig	2019-01-15 10:07:00 UTC
2
+++ source3/winbindd/wscript_build
3
@@ -2,7 +2,7 @@
4
5
 bld.SAMBA3_LIBRARY('idmap',
6
                    source='idmap.c idmap_util.c',
7
-                   deps='samba-util pdb',
8
+                   deps='pdb samba-modules secrets3',
9
                    allow_undefined_symbols=True,
10
                    private_library=True)
(-)b/net/samba415/files/disabled/patch-source3_wscript (+84 lines)
Added Link Here
1
--- source3/wscript.orig	2019-07-09 10:08:41 UTC
2
+++ source3/wscript
3
@@ -50,6 +50,7 @@ def options(opt):
4
     opt.samba_add_onoff_option('sendfile-support', default=None)
5
     opt.samba_add_onoff_option('utmp')
6
     opt.samba_add_onoff_option('avahi', with_name="enable", without_name="disable")
7
+    opt.samba_add_onoff_option('dnssd', with_name="enable", without_name="disable")
8
     opt.samba_add_onoff_option('iconv')
9
     opt.samba_add_onoff_option('acl-support')
10
     opt.samba_add_onoff_option('dnsupdate')
11
@@ -784,34 +785,39 @@ msg.msg_accrightslen = sizeof(fd);
12
13
     if Options.options.with_utmp:
14
         conf.env.with_utmp = True
15
-        if not conf.CHECK_HEADERS('utmp.h'): conf.env.with_utmp = False
16
-        conf.CHECK_FUNCS('pututline pututxline updwtmp updwtmpx getutmpx getutxent')
17
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_name', headers='utmp.h',
18
+        if not conf.CHECK_HEADERS('utmpx.h') and not conf.CHECK_HEADERS('utmp.h'):
19
+            conf.env.with_utmp = False
20
+        if conf.CONFIG_SET('HAVE_UTMPX_H'):
21
+            conf.DEFINE('STRUCT_UTMP', 'struct utmpx')
22
+        elif conf.CONFIG_SET('HAVE_UTMP_H'):
23
+            conf.DEFINE('STRUCT_UTMP', 'struct utmp')
24
+        conf.CHECK_FUNCS('pututxline getutxid getutxline updwtmpx getutmpx setutxent endutxent')
25
+        conf.CHECK_FUNCS('pututline getutid getutline updwtmp getutmp setutent endutent')
26
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_name', headers='utmpx.h utmp.h',
27
                                     define='HAVE_UT_UT_NAME')
28
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_user', headers='utmp.h',
29
+
30
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_user', headers='utmpx.h utmp.h',
31
                                     define='HAVE_UT_UT_USER')
32
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_id', headers='utmp.h',
33
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_id', headers='utmpx.h utmp.h',
34
                                     define='HAVE_UT_UT_ID')
35
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_host', headers='utmp.h',
36
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_host', headers='utmpx.h utmp.h',
37
                                     define='HAVE_UT_UT_HOST')
38
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_time', headers='utmp.h',
39
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_time', headers='utmpx.h utmp.h',
40
                                     define='HAVE_UT_UT_TIME')
41
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_tv', headers='utmp.h',
42
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_tv', headers='utmpx.h utmp.h',
43
                                     define='HAVE_UT_UT_TV')
44
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_type', headers='utmp.h',
45
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_type', headers='utmpx.h utmp.h',
46
                                     define='HAVE_UT_UT_TYPE')
47
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_pid', headers='utmp.h',
48
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_pid', headers='utmpx.h utmp.h',
49
                                     define='HAVE_UT_UT_PID')
50
-        conf.CHECK_STRUCTURE_MEMBER('struct utmp', 'ut_exit.e_exit', headers='utmp.h',
51
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_exit.e_exit', headers='utmpx.h utmp.h',
52
                                     define='HAVE_UT_UT_EXIT')
53
-        conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_syslen', headers='utmpx.h',
54
-                                    define='HAVE_UX_UT_SYSLEN')
55
-        conf.CHECK_STRUCTURE_MEMBER('struct utmpx', 'ut_host', headers='utmpx.h',
56
-                                    define='HAVE_UX_UT_HOST')
57
+        conf.CHECK_STRUCTURE_MEMBER('STRUCT_UTMP', 'ut_syslen', headers='utmpx.h utmp.h',
58
+                                    define='HAVE_UT_UT_SYSLEN')
59
         conf.CHECK_CODE('struct utmp utarg; struct utmp *utreturn; utreturn = pututline(&utarg);',
60
                         'PUTUTLINE_RETURNS_UTMP', headers='utmp.h',
61
                         msg="Checking whether pututline returns pointer")
62
-        conf.CHECK_SIZEOF(['((struct utmp *)NULL)->ut_line'], headers='utmp.h',
63
+        conf.CHECK_SIZEOF(['((STRUCT_UTMP *)NULL)->ut_line'], headers='utmpx.h utmp.h',
64
                           define='SIZEOF_UTMP_UT_LINE', critical=False)
65
         if not conf.CONFIG_SET('SIZEOF_UTMP_UT_LINE'):
66
             conf.env.with_utmp = False
67
@@ -833,6 +839,17 @@ msg.msg_accrightslen = sizeof(fd);
68
         conf.SET_TARGET_TYPE('avahi-common', 'EMPTY')
69
         conf.SET_TARGET_TYPE('avahi-client', 'EMPTY')
70
71
+    if Options.options.with_dnssd:
72
+        conf.env.with_dnssd = True
73
+        if not conf.CHECK_HEADERS('dns_sd.h'):
74
+            conf.env.with_dnssd = False
75
+        if not conf.CHECK_FUNCS_IN('DNSServiceRegister', 'dns_sd'):
76
+            conf.env.with_dnssd = False
77
+        if conf.env.with_dnssd:
78
+            conf.DEFINE('WITH_DNSSD_SUPPORT', 1)
79
+    else:
80
+        conf.SET_TARGET_TYPE('dns_sd', 'EMPTY')
81
+
82
     if Options.options.with_iconv:
83
         conf.env.with_iconv = True
84
         if not conf.CHECK_FUNCS_IN('iconv_open', 'iconv', headers='iconv.h'):
(-)b/net/samba415/files/disabled/patch-source3_wscript__build (+60 lines)
Added Link Here
1
--- source3/wscript_build.orig	2020-07-09 13:33:56 UTC
2
+++ source3/wscript_build
3
@@ -233,11 +233,9 @@ bld.SAMBA3_SUBSYSTEM('SMBREGISTRY',
4
                         talloc
5
                         replace
6
                         util_reg
7
-                        samba-util
8
-                        samba-security
9
                         errors3
10
                         dbwrap
11
-                        samba3-util
12
+                        samba3util
13
                         ''')
14
15
 # Do not link against this use 'smbconf'
16
@@ -495,7 +493,7 @@ bld.SAMBA3_LIBRARY('secrets3',
17
18
 bld.SAMBA3_LIBRARY('smbldap',
19
                     source='lib/smbldap.c',
20
-                    deps='ldap lber samba-util smbconf',
21
+                    deps='ldap lber samba3util smbd_shim samba-debug smbconf',
22
                     enabled=bld.CONFIG_SET("HAVE_LDAP"),
23
                     private_library=False,
24
                     abi_directory='lib/ABI',
25
@@ -721,6 +719,7 @@ bld.SAMBA3_LIBRARY('smbd_base',
26
                         smbd_conn
27
                         param_service
28
                         AVAHI
29
+                        dns_sd
30
                         PRINTBASE
31
                         PROFILE
32
                         LOCKING
33
@@ -1129,6 +1128,7 @@ bld.SAMBA3_BINARY('client/smbclient',
34
                       msrpc3
35
                       RPC_NDR_SRVSVC
36
                       cli_smb_common
37
+                      dns_sd
38
                       archive
39
                       ''')
40
41
@@ -1153,8 +1153,8 @@ bld.SAMBA3_BINARY('smbspool_krb5_wrapper',
42
                  enabled=bld.CONFIG_SET('HAVE_CUPS'))
43
44
 bld.SAMBA3_BINARY('smbspool_argv_wrapper',
45
-		  source='script/tests/smbspool_argv_wrapper.c',
46
-		  for_selftest=True)
47
+                  source='script/tests/smbspool_argv_wrapper.c',
48
+                  for_selftest=True)
49
50
 bld.SAMBA3_BINARY('locktest2',
51
                  source='torture/locktest2.c',
52
@@ -1303,7 +1303,7 @@ bld.SAMBA3_BINARY('vfstest',
53
                       smbconf
54
                       SMBREADLINE
55
                       ''',
56
-                 for_selftest=True)
57
+                 install=True)
58
59
 bld.SAMBA3_BINARY('versiontest',
60
                  source='lib/version_test.c',
(-)b/net/samba415/files/disabled/patch-source4_heimdal_lib_roken_rand.c (+10 lines)
Added Link Here
1
--- source4/heimdal/lib/roken/rand.c.orig	2019-01-15 10:07:00 UTC
2
+++ source4/heimdal/lib/roken/rand.c
3
@@ -37,7 +37,6 @@ void ROKEN_LIB_FUNCTION
4
 rk_random_init(void)
5
 {
6
 #if defined(HAVE_ARC4RANDOM)
7
-    arc4random_stir();
8
 #elif defined(HAVE_SRANDOMDEV)
9
     srandomdev();
10
 #elif defined(HAVE_RANDOM)
(-)b/net/samba415/files/disabled/patch-source4_kdc_kdc-service-mit.c (+17 lines)
Added Link Here
1
--- source4/kdc/kdc-service-mit.c.orig	2019-01-15 10:07:00 UTC
2
+++ source4/kdc/kdc-service-mit.c
3
@@ -36,9 +36,13 @@
4
 #include "kdc/samba_kdc.h"
5
 #include "kdc/kdc-server.h"
6
 #include "kdc/kpasswd-service.h"
7
-#include <kadm5/admin.h>
8
 #include <kdb.h>
9
10
+#pragma clang diagnostic push
11
+#pragma clang diagnostic ignored "-Wstrict-prototypes"
12
+#include <kadm5/admin.h>
13
+#pragma clang diagnostic pop
14
+
15
 #include "source4/kdc/mit_kdc_irpc.h"
16
17
 /* PROTOTYPES */
(-)b/net/samba415/files/disabled/patch-third__party_wscript (+8 lines)
Added Link Here
1
--- third_party/wscript.orig	2020-09-15 22:45:54 UTC
2
+++ third_party/wscript
3
@@ -7,7 +7,6 @@ from waflib import Options, Errors
4
5
 # work out what python external libraries we need to install
6
 external_pkgs = {
7
-    "iso8601": "pyiso8601/iso8601",
8
     }
(-)b/net/samba415/files/disabled/patch-vfs_freebsd (+1002 lines)
Added Link Here
1
--- docs-xml/wscript_build.orig	2019-06-25 00:52:38 UTC
2
+++ docs-xml/wscript_build
3
@@ -79,6 +79,7 @@ vfs_module_manpages = ['vfs_acl_tdb',
4
                        'vfs_extd_audit',
5
                        'vfs_fake_perms',
6
                        'vfs_fileid',
7
+                       'vfs_freebsd',
8
                        'vfs_fruit',
9
                        'vfs_full_audit',
10
                        'vfs_glusterfs',
11
--- source3/modules/wscript_build.orig	2019-05-07 08:38:21 UTC
12
+++ source3/modules/wscript_build
13
@@ -630,6 +630,14 @@ bld.SAMBA3_MODULE('vfs_delay_inject',
14
                  enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_delay_inject'),
15
                  install=False)
16
17
+bld.SAMBA3_MODULE('vfs_freebsd',
18
+                 subsystem='vfs',
19
+                 source='vfs_freebsd.c',
20
+                 deps='samba-util',
21
+                 init_function='',
22
+                 internal_module=bld.SAMBA3_IS_STATIC_MODULE('vfs_freebsd'),
23
+                 enabled=bld.SAMBA3_IS_ENABLED_MODULE('vfs_freebsd'))
24
+
25
 bld.SAMBA3_MODULE('vfs_widelinks',
26
                  subsystem='vfs',
27
                  source='vfs_widelinks.c',
28
--- source3/modules/vfs_freebsd.c.orig	2019-06-22 11:56:57 UTC
29
+++ source3/modules/vfs_freebsd.c
30
@@ -0,0 +1,800 @@
31
+/*
32
+ * This module implements VFS calls specific to FreeBSD
33
+ *
34
+ * Copyright (C) Timur I. Bakeyev, 2018
35
+ *
36
+ * This program is free software; you can redistribute it and/or modify
37
+ * it under the terms of the GNU General Public License as published by
38
+ * the Free Software Foundation; either version 3 of the License, or
39
+ * (at your option) any later version.
40
+ *
41
+ * This program is distributed in the hope that it will be useful,
42
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
43
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
44
+ * GNU General Public License for more details.
45
+ *
46
+ * You should have received a copy of the GNU General Public License
47
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
48
+ */
49
+
50
+#include "includes.h"
51
+
52
+#include "lib/util/tevent_unix.h"
53
+#include "lib/util/tevent_ntstatus.h"
54
+#include "system/filesys.h"
55
+
56
+#include <sys/sysctl.h>
57
+
58
+static int vfs_freebsd_debug_level = DBGC_VFS;
59
+
60
+#undef DBGC_CLASS
61
+#define DBGC_CLASS vfs_freebsd_debug_level
62
+
63
+#ifndef EXTATTR_MAXNAMELEN
64
+#define EXTATTR_MAXNAMELEN		UINT8_MAX
65
+#endif
66
+
67
+#define EXTATTR_NAMESPACE(NS)		EXTATTR_NAMESPACE_ ## NS, \
68
+					EXTATTR_NAMESPACE_ ## NS ## _STRING ".", \
69
+					.data.len = (sizeof(EXTATTR_NAMESPACE_ ## NS ## _STRING ".") - 1)
70
+
71
+#define EXTATTR_EMPTY			0x00
72
+#define EXTATTR_USER			0x01
73
+#define EXTATTR_SYSTEM			0x02
74
+#define EXTATTR_SECURITY		0x03
75
+#define EXTATTR_TRUSTED			0x04
76
+
77
+enum extattr_mode {
78
+	FREEBSD_EXTATTR_SECURE,
79
+	FREEBSD_EXTATTR_COMPAT,
80
+	FREEBSD_EXTATTR_LEGACY
81
+};
82
+
83
+typedef struct {
84
+	int namespace;
85
+	char name[EXTATTR_MAXNAMELEN+1];
86
+	union {
87
+		uint16_t len;
88
+		uint16_t flags;
89
+	} data;
90
+} extattr_attr;
91
+
92
+typedef struct {
93
+	enum {
94
+		EXTATTR_FILE, EXTATTR_LINK, EXTATTR_FDES
95
+	} method;
96
+	union {
97
+		const char *path;
98
+		int filedes;
99
+	} param;
100
+} extattr_arg;
101
+
102
+static const struct enum_list extattr_mode_param[] = {
103
+	{ FREEBSD_EXTATTR_SECURE, "secure" },		/*  */
104
+	{ FREEBSD_EXTATTR_COMPAT, "compat" },		/*  */
105
+	{ FREEBSD_EXTATTR_LEGACY, "legacy" },		/*  */
106
+	{ -1, NULL }
107
+};
108
+
109
+
110
+/* */
111
+struct freebsd_handle_data {
112
+	enum extattr_mode extattr_mode;
113
+};
114
+
115
+
116
+/* XXX: This order doesn't match namespace ids order! */
117
+static extattr_attr extattr[] = {
118
+	{ EXTATTR_NAMESPACE(EMPTY) },
119
+	{ EXTATTR_NAMESPACE(SYSTEM) },
120
+	{ EXTATTR_NAMESPACE(USER) },
121
+};
122
+
123
+
124
+static bool freebsd_in_jail(void) {
125
+	int val = 0;
126
+	size_t val_len = sizeof(val);
127
+
128
+	if((sysctlbyname("security.jail.jailed", &val, &val_len, NULL, 0) != -1) && val == 1) {
129
+		return true;
130
+	}
131
+	return false;
132
+}
133
+
134
+static uint16_t freebsd_map_attrname(const char *name)
135
+{
136
+	if(name == NULL || name[0] == '\0') {
137
+		return EXTATTR_EMPTY;
138
+	}
139
+
140
+	switch(name[0]) {
141
+		case 'u':
142
+			if(strncmp(name, "user.", 5) == 0)
143
+				return EXTATTR_USER;
144
+			break;
145
+		case 't':
146
+			if(strncmp(name, "trusted.", 8) == 0)
147
+				return EXTATTR_TRUSTED;
148
+			break;
149
+		case 's':
150
+			/* name[1] could be any character, including '\0' */
151
+			switch(name[1]) {
152
+				case 'e':
153
+					if(strncmp(name, "security.", 9) == 0)
154
+						return EXTATTR_SECURITY;
155
+					break;
156
+				case 'y':
157
+					if(strncmp(name, "system.", 7) == 0)
158
+						return EXTATTR_SYSTEM;
159
+					break;
160
+			}
161
+			break;
162
+	}
163
+	return EXTATTR_USER;
164
+}
165
+
166
+/* security, system, trusted or user */
167
+static extattr_attr* freebsd_map_xattr(enum extattr_mode extattr_mode, const char *name, extattr_attr *attr)
168
+{
169
+	int attrnamespace = EXTATTR_NAMESPACE_EMPTY;
170
+	const char *p, *attrname = name;
171
+
172
+	if(name == NULL || name[0] == '\0') {
173
+		return NULL;
174
+	}
175
+
176
+	if(attr == NULL) {
177
+		return NULL;
178
+	}
179
+
180
+	uint16_t flags = freebsd_map_attrname(name);
181
+
182
+	switch(flags) {
183
+		case EXTATTR_SECURITY:
184
+		case EXTATTR_TRUSTED:
185
+		case EXTATTR_SYSTEM:
186
+			attrnamespace = (extattr_mode == FREEBSD_EXTATTR_SECURE) ?
187
+					EXTATTR_NAMESPACE_SYSTEM :
188
+					EXTATTR_NAMESPACE_USER;
189
+			break;
190
+		case EXTATTR_USER:
191
+			attrnamespace = EXTATTR_NAMESPACE_USER;
192
+			break;
193
+		default:
194
+			/* Default to "user" namespace if nothing else was specified */
195
+			attrnamespace = EXTATTR_NAMESPACE_USER;
196
+			flags = EXTATTR_USER;
197
+			break;
198
+	}
199
+
200
+	if (extattr_mode == FREEBSD_EXTATTR_LEGACY) {
201
+		switch(flags) {
202
+			case EXTATTR_SECURITY:
203
+				attrname = name + 9;
204
+				break;
205
+			case EXTATTR_TRUSTED:
206
+				attrname = name + 8;
207
+				break;
208
+			case EXTATTR_SYSTEM:
209
+				attrname = name + 7;
210
+				break;
211
+			case EXTATTR_USER:
212
+				attrname = name + 5;
213
+				break;
214
+			default:
215
+				attrname = ((p=strchr(name, '.')) != NULL) ? p + 1 : name;
216
+				break;
217
+		}
218
+	}
219
+
220
+	attr->namespace = attrnamespace;
221
+	attr->data.flags = flags;
222
+	strlcpy(attr->name, attrname, EXTATTR_MAXNAMELEN + 1);
223
+
224
+	return attr;
225
+}
226
+
227
+static ssize_t extattr_size(extattr_arg arg, extattr_attr *attr)
228
+{
229
+	ssize_t result;
230
+
231
+	switch(arg.method) {
232
+#if defined(HAVE_XATTR_EXTATTR)
233
+		case EXTATTR_FILE:
234
+			result = extattr_get_file(arg.param.path, attr->namespace, attr->name, NULL, 0);
235
+			break;
236
+		case EXTATTR_LINK:
237
+			result = extattr_get_link(arg.param.path, attr->namespace, attr->name, NULL, 0);
238
+			break;
239
+		case EXTATTR_FDES:
240
+			result = extattr_get_fd(arg.param.filedes, attr->namespace, attr->name, NULL, 0);
241
+			break;
242
+#endif
243
+		default:
244
+			errno = ENOSYS;
245
+			return -1;
246
+	}
247
+
248
+	if(result < 0) {
249
+		errno = EINVAL;
250
+		return -1;
251
+	}
252
+
253
+	return result;
254
+}
255
+
256
+
257
+/*
258
+ * The list of names is returned as an unordered array of NULL-terminated
259
+ * character strings (attribute names are separated by NULL characters),
260
+ * like this:
261
+ *      user.name1\0system.name1\0user.name2\0
262
+ *
263
+ * Filesystems like ext2, ext3 and XFS which implement POSIX ACLs using
264
+ * extended attributes, might return a list like this:
265
+ *      system.posix_acl_access\0system.posix_acl_default\0
266
+ */
267
+/*
268
+ * The extattr_list_file() returns a list of attributes present in the
269
+ * requested namespace. Each list entry consists of a single byte containing
270
+ * the length of the attribute name, followed by the attribute name. The
271
+ * attribute name is not terminated by ASCII 0 (nul).
272
+*/
273
+
274
+static ssize_t freebsd_extattr_list(extattr_arg arg, enum extattr_mode extattr_mode, char *list, size_t size)
275
+{
276
+	ssize_t list_size, total_size = 0;
277
+	char *p, *q, *list_end;
278
+	int len;
279
+	/*
280
+	 Ignore all but user namespace when we are not root or in jail
281
+	 See: https://bugzilla.samba.org/show_bug.cgi?id=10247
282
+	*/
283
+	bool as_root = (geteuid() == 0);
284
+
285
+	int ns = (extattr_mode == FREEBSD_EXTATTR_SECURE && as_root) ? 1 : 2;
286
+
287
+	/* Iterate through extattr(2) namespaces */
288
+	for(; ns < ARRAY_SIZE(extattr); ns++) {
289
+		switch(arg.method) {
290
+#if defined(HAVE_XATTR_EXTATTR)
291
+			case EXTATTR_FILE:
292
+				list_size = extattr_list_file(arg.param.path, extattr[ns].namespace, list, size);
293
+				break;
294
+			case EXTATTR_LINK:
295
+				list_size = extattr_list_link(arg.param.path, extattr[ns].namespace, list, size);
296
+				break;
297
+			case EXTATTR_FDES:
298
+				list_size = extattr_list_fd(arg.param.filedes, extattr[ns].namespace, list, size);
299
+				break;
300
+#endif
301
+			default:
302
+				errno = ENOSYS;
303
+				return -1;
304
+		}
305
+		/* Some error happend. Errno should be set by the previous call */
306
+		if(list_size < 0)
307
+			return -1;
308
+		/* No attributes in this namespace */
309
+		if(list_size == 0)
310
+			continue;
311
+		/*
312
+		 Call with an empty buffer may be used to calculate
313
+		 necessary buffer size.
314
+		*/
315
+		if(list == NULL) {
316
+			/*
317
+			 XXX: Unfortunately, we can't say, how many attributes were
318
+			 returned, so here is the potential problem with the emulation.
319
+			*/
320
+			if(extattr_mode == FREEBSD_EXTATTR_LEGACY) {
321
+				/*
322
+				 Take the worse case of one char attribute names -
323
+				 two bytes per name plus one more for sanity.
324
+				*/
325
+				total_size += list_size + (list_size/2 + 1)*extattr[ns].data.len;
326
+			}
327
+			else {
328
+				total_size += list_size;
329
+			}
330
+			continue;
331
+		}
332
+
333
+		if(extattr_mode == FREEBSD_EXTATTR_LEGACY) {
334
+			/* Count necessary offset to fit namespace prefixes */
335
+			int extra_len = 0;
336
+			uint16_t flags;
337
+			list_end = list + list_size;
338
+			for(list_size = 0, p = q = list; p < list_end; p += len) {
339
+				len = p[0] + 1;
340
+				(void)strlcpy(q, p + 1, len);
341
+				flags = freebsd_map_attrname(q);
342
+				/* Skip secure attributes for non-root user */
343
+				if(extattr_mode != FREEBSD_EXTATTR_SECURE && !as_root && flags > EXTATTR_USER) {
344
+					continue;
345
+				}
346
+				if(flags <= EXTATTR_USER) {
347
+					/* Don't count trailing '\0' */
348
+					extra_len += extattr[ns].data.len;
349
+				}
350
+				list_size += len;
351
+				q += len;
352
+			}
353
+			total_size += list_size + extra_len;
354
+			/* Buffer is too small to fit the results */
355
+			if(total_size > size) {
356
+				errno = ERANGE;
357
+				return -1;
358
+			}
359
+			/* Shift results backwards, so we can prepend prefixes */
360
+			list_end = list + extra_len;
361
+			p = (char*)memmove(list_end, list, list_size);
362
+			/*
363
+			 We enter the loop with `p` pointing to the shifted list and
364
+			 `extra_len` having the total margin between `list` and `p`
365
+			*/
366
+			for(list_end += list_size; p < list_end; p += len) {
367
+				len = strlen(p) + 1;
368
+				flags = freebsd_map_attrname(p);
369
+				if(flags <= EXTATTR_USER) {
370
+					/* Add namespace prefix */
371
+					(void)strncpy(list, extattr[ns].name, extattr[ns].data.len);
372
+					list += extattr[ns].data.len;
373
+				}
374
+				/* Append attribute name */
375
+				(void)strlcpy(list, p, len);
376
+				list += len;
377
+			}
378
+		}
379
+		else {
380
+			/* Convert UCSD strings into nul-terminated strings */
381
+			for(list_end = list + list_size; list < list_end; list += len) {
382
+				len = list[0] + 1;
383
+				(void)strlcpy(list, list + 1, len);
384
+			}
385
+			total_size += list_size;
386
+		}
387
+	}
388
+	return total_size;
389
+}
390
+
391
+/*
392
+static ssize_t freebsd_getxattr_size(vfs_handle_struct *handle,
393
+				const struct smb_filename *smb_fname,
394
+				const char *name)
395
+{
396
+	struct freebsd_handle_data *data;
397
+	extattr_arg arg = { EXTATTR_FILE, smb_fname->base_name };
398
+	extattr_attr attr;
399
+
400
+
401
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
402
+				struct freebsd_handle_data,
403
+				return -1);
404
+
405
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
406
+		errno = EINVAL;
407
+		return -1;
408
+	}
409
+
410
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
411
+		errno = ENOATTR;
412
+		return -1;
413
+	}
414
+
415
+	return extattr_size(arg, &attr);
416
+}
417
+*/
418
+
419
+/* VFS entries */
420
+static ssize_t freebsd_getxattr(vfs_handle_struct *handle,
421
+				const struct smb_filename *smb_fname,
422
+				const char *name,
423
+				void *value,
424
+				size_t size)
425
+{
426
+#if defined(HAVE_XATTR_EXTATTR)
427
+	struct freebsd_handle_data *data;
428
+	extattr_arg arg = { EXTATTR_FILE, .param.path = smb_fname->base_name };
429
+	extattr_attr attr;
430
+	ssize_t res;
431
+
432
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
433
+				struct freebsd_handle_data,
434
+				return -1);
435
+
436
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
437
+		errno = EINVAL;
438
+		return -1;
439
+	}
440
+
441
+	/* Filter out 'secure' entries */
442
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
443
+		errno = ENOATTR;
444
+		return -1;
445
+	}
446
+
447
+	/*
448
+	 * The BSD implementation has a nasty habit of silently truncating
449
+	 * the returned value to the size of the buffer, so we have to check
450
+	 * that the buffer is large enough to fit the returned value.
451
+	 */
452
+	if((res=extattr_size(arg, &attr)) < 0) {
453
+		return -1;
454
+	}
455
+
456
+	if (size == 0) {
457
+		return res;
458
+	}
459
+	else if (res > size) {
460
+		errno = ERANGE;
461
+		return -1;
462
+	}
463
+
464
+	if((res=extattr_get_file(smb_fname->base_name, attr.namespace, attr.name, value, size)) >= 0) {
465
+		return res;
466
+	}
467
+	return -1;
468
+#else
469
+	errno = ENOSYS;
470
+	return -1;
471
+#endif
472
+}
473
+
474
+
475
+static ssize_t freebsd_fgetxattr(vfs_handle_struct *handle,
476
+			      struct files_struct *fsp, const char *name,
477
+			      void *value, size_t size)
478
+{
479
+#if defined(HAVE_XATTR_EXTATTR)
480
+	struct freebsd_handle_data *data;
481
+	extattr_arg arg = { EXTATTR_FDES, .param.filedes = fsp->fh->fd };
482
+	extattr_attr attr;
483
+	ssize_t res;
484
+
485
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
486
+				struct freebsd_handle_data,
487
+				return -1);
488
+
489
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
490
+		errno = EINVAL;
491
+		return -1;
492
+	}
493
+
494
+	/* Filter out 'secure' entries */
495
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
496
+		errno = ENOATTR;
497
+		return -1;
498
+	}
499
+
500
+	/*
501
+	 * The BSD implementation has a nasty habit of silently truncating
502
+	 * the returned value to the size of the buffer, so we have to check
503
+	 * that the buffer is large enough to fit the returned value.
504
+	 */
505
+	if((res=extattr_size(arg, &attr)) < 0) {
506
+		return -1;
507
+	}
508
+
509
+	if (size == 0) {
510
+		return res;
511
+	}
512
+	else if (res > size) {
513
+		errno = ERANGE;
514
+		return -1;
515
+	}
516
+
517
+	if((res=extattr_get_fd(fsp->fh->fd, attr.namespace, attr.name, value, size)) >= 0) {
518
+		return res;
519
+	}
520
+	return -1;
521
+#else
522
+	errno = ENOSYS;
523
+	return -1;
524
+#endif
525
+}
526
+
527
+
528
+static ssize_t freebsd_listxattr(vfs_handle_struct *handle,
529
+				const struct smb_filename *smb_fname,
530
+				char *list,
531
+				size_t size)
532
+{
533
+#if defined(HAVE_XATTR_EXTATTR)
534
+	struct freebsd_handle_data *data;
535
+
536
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
537
+				struct freebsd_handle_data,
538
+				return -1);
539
+
540
+	extattr_arg arg = { EXTATTR_FILE, .param.path = smb_fname->base_name };
541
+
542
+	return freebsd_extattr_list(arg, data->extattr_mode, list, size);
543
+#else
544
+	errno = ENOSYS;
545
+	return -1;
546
+#endif
547
+}
548
+
549
+
550
+static ssize_t freebsd_flistxattr(vfs_handle_struct *handle,
551
+			       struct files_struct *fsp, char *list,
552
+			       size_t size)
553
+{
554
+#if defined(HAVE_XATTR_EXTATTR)
555
+	struct freebsd_handle_data *data;
556
+	extattr_arg arg = { EXTATTR_FDES, .param.filedes = fsp->fh->fd };
557
+
558
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
559
+				struct freebsd_handle_data,
560
+				return -1);
561
+
562
+	return freebsd_extattr_list(arg, data->extattr_mode, list, size);
563
+#else
564
+	errno = ENOSYS;
565
+	return -1;
566
+#endif
567
+}
568
+
569
+static int freebsd_removexattr(vfs_handle_struct *handle,
570
+			const struct smb_filename *smb_fname,
571
+			const char *name)
572
+{
573
+#if defined(HAVE_XATTR_EXTATTR)
574
+	struct freebsd_handle_data *data;
575
+	extattr_attr attr;
576
+
577
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
578
+				struct freebsd_handle_data,
579
+				return -1);
580
+
581
+
582
+	/* Filter out 'secure' entries */
583
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
584
+		errno = ENOATTR;
585
+		return -1;
586
+	}
587
+
588
+	return extattr_delete_file(smb_fname->base_name, attr.namespace, attr.name);
589
+#else
590
+	errno = ENOSYS;
591
+	return -1;
592
+#endif
593
+}
594
+
595
+
596
+static int freebsd_fremovexattr(vfs_handle_struct *handle,
597
+			     struct files_struct *fsp, const char *name)
598
+{
599
+#if defined(HAVE_XATTR_EXTATTR)
600
+	struct freebsd_handle_data *data;
601
+	extattr_attr attr;
602
+
603
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
604
+				struct freebsd_handle_data,
605
+				return -1);
606
+
607
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
608
+		errno = EINVAL;
609
+		return -1;
610
+	}
611
+
612
+	/* Filter out 'secure' entries */
613
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
614
+		errno = ENOATTR;
615
+		return -1;
616
+	}
617
+
618
+	return extattr_delete_fd(fsp->fh->fd, attr.namespace, attr.name);
619
+#else
620
+	errno = ENOSYS;
621
+	return -1;
622
+#endif
623
+}
624
+
625
+
626
+static int freebsd_setxattr(vfs_handle_struct *handle,
627
+			const struct smb_filename *smb_fname,
628
+			const char *name,
629
+			const void *value,
630
+			size_t size,
631
+			int flags)
632
+{
633
+#if defined(HAVE_XATTR_EXTATTR)
634
+	struct freebsd_handle_data *data;
635
+	extattr_attr attr;
636
+	ssize_t res;
637
+
638
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
639
+				struct freebsd_handle_data,
640
+				return -1);
641
+
642
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
643
+		errno = EINVAL;
644
+		return -1;
645
+	}
646
+
647
+	/* Filter out 'secure' entries */
648
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
649
+		errno = ENOATTR;
650
+		return -1;
651
+	}
652
+
653
+	if (flags) {
654
+		extattr_arg arg = { EXTATTR_FILE, .param.path = smb_fname->base_name };
655
+		/* Check attribute existence */
656
+		res = extattr_size(arg, &attr);
657
+		if (res < 0) {
658
+			/* REPLACE attribute, that doesn't exist */
659
+			if ((flags & XATTR_REPLACE) && errno == ENOATTR) {
660
+				errno = ENOATTR;
661
+				return -1;
662
+			}
663
+			/* Ignore other errors */
664
+		}
665
+		else {
666
+			/* CREATE attribute, that already exists */
667
+			if (flags & XATTR_CREATE) {
668
+				errno = EEXIST;
669
+				return -1;
670
+			}
671
+		}
672
+	}
673
+	res = extattr_set_file(smb_fname->base_name, attr.namespace, attr.name, value, size);
674
+
675
+	return (res >= 0) ? 0 : -1;
676
+#else
677
+	errno = ENOSYS;
678
+	return -1;
679
+#endif
680
+}
681
+
682
+
683
+static int freebsd_fsetxattr(vfs_handle_struct *handle, struct files_struct *fsp,
684
+			  const char *name, const void *value, size_t size,
685
+			  int flags)
686
+{
687
+#if defined(HAVE_XATTR_EXTATTR)
688
+	struct freebsd_handle_data *data;
689
+	extattr_attr attr;
690
+	ssize_t res;
691
+
692
+	SMB_VFS_HANDLE_GET_DATA(handle, data,
693
+				struct freebsd_handle_data,
694
+				return -1);
695
+
696
+	if(!freebsd_map_xattr(data->extattr_mode, name, &attr)) {
697
+		errno = EINVAL;
698
+		return -1;
699
+	}
700
+
701
+	/* Filter out 'secure' entries */
702
+	if(data->extattr_mode != FREEBSD_EXTATTR_SECURE && geteuid() != 0 && attr.data.flags > EXTATTR_USER) {
703
+		errno = ENOATTR;
704
+		return -1;
705
+	}
706
+
707
+	if (flags) {
708
+		extattr_arg arg = { EXTATTR_FDES, .param.filedes = fsp->fh->fd };
709
+		/* Check attribute existence */
710
+		res = extattr_size(arg, &attr);
711
+		if (res < 0) {
712
+			/* REPLACE attribute, that doesn't exist */
713
+			if ((flags & XATTR_REPLACE) && errno == ENOATTR) {
714
+				errno = ENOATTR;
715
+				return -1;
716
+			}
717
+			/* Ignore other errors */
718
+		}
719
+		else {
720
+			/* CREATE attribute, that already exists */
721
+			if (flags & XATTR_CREATE) {
722
+				errno = EEXIST;
723
+				return -1;
724
+			}
725
+		}
726
+	}
727
+
728
+	res = extattr_set_fd(fsp->fh->fd, attr.namespace, attr.name, value, size);
729
+
730
+	return (res >= 0) ? 0 : -1;
731
+#else
732
+	errno = ENOSYS;
733
+	return -1;
734
+#endif
735
+}
736
+
737
+static int freebsd_connect(vfs_handle_struct *handle, const char *service,
738
+			const char *user)
739
+{
740
+	struct freebsd_handle_data *data;
741
+	int enumval, saved_errno;
742
+
743
+	int ret = SMB_VFS_NEXT_CONNECT(handle, service, user);
744
+
745
+	if (ret < 0) {
746
+		return ret;
747
+	}
748
+
749
+	data = talloc_zero(handle->conn, struct freebsd_handle_data);
750
+	if (!data) {
751
+		saved_errno = errno;
752
+		SMB_VFS_NEXT_DISCONNECT(handle);
753
+		DEBUG(0, ("talloc_zero() failed\n"));
754
+		errno = saved_errno;
755
+		return -1;
756
+	}
757
+
758
+	enumval = lp_parm_enum(SNUM(handle->conn), "freebsd",
759
+			       "extattr mode", extattr_mode_param, FREEBSD_EXTATTR_LEGACY);
760
+	if (enumval == -1) {
761
+		saved_errno = errno;
762
+		SMB_VFS_NEXT_DISCONNECT(handle);
763
+		DBG_DEBUG("value for freebsd: 'extattr mode' is unknown\n");
764
+		errno = saved_errno;
765
+		return -1;
766
+	}
767
+
768
+	if(freebsd_in_jail()) {
769
+		enumval = FREEBSD_EXTATTR_COMPAT;
770
+		DBG_WARNING("running in jail, enforcing 'compat' mode\n");
771
+	}
772
+
773
+	data->extattr_mode = (enum extattr_mode)enumval;
774
+
775
+	SMB_VFS_HANDLE_SET_DATA(handle, data, NULL,
776
+				struct freebsd_handle_data,
777
+				return -1);
778
+
779
+	DBG_DEBUG("connect to service[%s] with '%s' extattr mode\n",
780
+		  service, extattr_mode_param[data->extattr_mode].name);
781
+
782
+	return 0;
783
+}
784
+
785
+static void freebsd_disconnect(vfs_handle_struct *handle)
786
+{
787
+	SMB_VFS_NEXT_DISCONNECT(handle);
788
+}
789
+
790
+/* VFS operations structure */
791
+
792
+struct vfs_fn_pointers freebsd_fns = {
793
+	/* Disk operations */
794
+
795
+	.connect_fn = freebsd_connect,
796
+	.disconnect_fn = freebsd_disconnect,
797
+
798
+	/* EA operations. */
799
+	.getxattr_fn = freebsd_getxattr,
800
+	.fgetxattr_fn = freebsd_fgetxattr,
801
+	.listxattr_fn = freebsd_listxattr,
802
+	.flistxattr_fn = freebsd_flistxattr,
803
+	.removexattr_fn = freebsd_removexattr,
804
+	.fremovexattr_fn = freebsd_fremovexattr,
805
+	.setxattr_fn = freebsd_setxattr,
806
+	.fsetxattr_fn = freebsd_fsetxattr,
807
+};
808
+
809
+static_decl_vfs;
810
+NTSTATUS vfs_freebsd_init(TALLOC_CTX *ctx)
811
+{
812
+	NTSTATUS ret;
813
+
814
+	ret = smb_register_vfs(SMB_VFS_INTERFACE_VERSION, "freebsd",
815
+				&freebsd_fns);
816
+
817
+	if (!NT_STATUS_IS_OK(ret)) {
818
+		return ret;
819
+	}
820
+
821
+	vfs_freebsd_debug_level = debug_add_class("freebsd");
822
+	if (vfs_freebsd_debug_level == -1) {
823
+		vfs_freebsd_debug_level = DBGC_VFS;
824
+		DEBUG(0, ("vfs_freebsd: Couldn't register custom debugging class!\n"));
825
+	} else {
826
+		DEBUG(10, ("vfs_freebsd: Debug class number of 'fileid': %d\n", vfs_freebsd_debug_level));
827
+	}
828
+
829
+	return ret;
830
+}
831
--- docs-xml/manpages/vfs_freebsd.8.xml.orig	2019-06-25 00:51:54 UTC
832
+++ docs-xml/manpages/vfs_freebsd.8.xml
833
@@ -0,0 +1,169 @@
834
+<?xml version="1.0" encoding="iso-8859-1"?>
835
+<!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
836
+<refentry id="vfs_freebsd.8">
837
+
838
+<refmeta>
839
+	<refentrytitle>vfs_freebsd</refentrytitle>
840
+	<manvolnum>8</manvolnum>
841
+	<refmiscinfo class="source">Samba</refmiscinfo>
842
+	<refmiscinfo class="manual">System Administration tools</refmiscinfo>
843
+	<refmiscinfo class="version">&doc.version;</refmiscinfo>
844
+</refmeta>
845
+
846
+<refnamediv>
847
+	<refname>vfs_freebsd</refname>
848
+	<refpurpose>FreeBSD-specific VFS functions</refpurpose>
849
+</refnamediv>
850
+
851
+<refsynopsisdiv>
852
+	<cmdsynopsis>
853
+		<command>vfs objects = freebsd</command>
854
+	</cmdsynopsis>
855
+</refsynopsisdiv>
856
+
857
+<refsect1>
858
+	<title>DESCRIPTION</title>
859
+
860
+	<para>This VFS module is part of the <citerefentry><refentrytitle>samba</refentrytitle>
861
+	<manvolnum>7</manvolnum></citerefentry> suite.</para>
862
+
863
+	<para>The <command>vfs_freebsd</command> module implements some of the FreeBSD-specific VFS functions.</para>
864
+
865
+	<para>This module is stackable.</para>
866
+</refsect1>
867
+
868
+
869
+<refsect1>
870
+	<title>OPTIONS</title>
871
+
872
+	<variablelist>
873
+
874
+	<varlistentry>
875
+		<term>freebsd:extattr mode=[legacy|compat|secure]</term>
876
+		<listitem>
877
+		<para>This parameter defines how the emulation of the Linux attr(5) extended attributes
878
+		is performed through the FreeBSD native extattr(9) system calls.</para>
879
+
880
+		<para>Currently the <emphasis>security</emphasis>, <emphasis>system</emphasis>,
881
+		<emphasis>trusted</emphasis> and <emphasis>user</emphasis> extended attribute(xattr)
882
+		classes are defined in Linux. Contrary FreeBSD has only <emphasis>USER</emphasis>
883
+		and <emphasis>SYSTEM</emphasis> extended attribute(extattr) namespaces, so mapping
884
+		of one set into another isn't straightforward and can be done in different ways.</para>
885
+
886
+		<para>Historically the Samba(7) built-in xattr mapping implementation simply converted
887
+		<emphasis>system</emphasis> and <emphasis>user</emphasis> xattr into corresponding
888
+		<emphasis>SYSTEM</emphasis> and <emphasis>USER</emphasis> extattr namespaces, dropping
889
+		the class prefix name with the separating dot and using attribute name only within the
890
+		mapped namespace. It also rejected any other xattr classes, like <emphasis>security</emphasis>
891
+		and <emphasis>trusted</emphasis> as invalid. Such behavior in particular broke AD
892
+		provisioning on UFS2 file systems as essential <emphasis>security.NTACL</emphasis>
893
+		xattr was rejected as invalid.</para>
894
+
895
+		<para>This module tries to address this problem and provide secure, where it's possible,
896
+		way to map Linux xattr into FreeBSD's extattr.</para>
897
+
898
+		<para>When <emphasis>mode</emphasis> is set to the <emphasis>legacy (default)</emphasis>
899
+		then modified version of built-in mapping is used, where <emphasis>system</emphasis> xattr
900
+		is mapped into SYSTEM namespace, while <emphasis>secure</emphasis>, <emphasis>trusted</emphasis>
901
+		and <emphasis>user</emphasis> xattr are all mapped into the USER namespace, dropping class
902
+		prefixes and mix them all together. This is the way how Samba FreeBSD ports were patched
903
+		up to the 4.9 version and that created multiple potential security issues. This mode is aimed for
904
+		the compatibility with the legacy installations only and should be avoided in new setups.</para>
905
+
906
+		<para>The <emphasis>compat</emphasis> mode is mostly designed for the jailed environments,
907
+		where it's not possible to write extattrs into the secure SYSTEM namespace, so all four
908
+		classes are mapped into the USER namespace. To preserve information about origin of the
909
+		extended attribute it is stored together with the class preffix in the <emphasis>class.attribute</emphasis>
910
+		format.</para>
911
+
912
+		<para>The <emphasis>secure</emphasis> mode is meant for storing extended attributes in a secure
913
+		manner, so that <emphasis>security</emphasis>, <emphasis>system</emphasis> and <emphasis>trusted</emphasis>
914
+		are stored in the SYSTEM namespace, which can be modified only by root.
915
+		</para>
916
+		</listitem>
917
+	</varlistentry>
918
+
919
+
920
+	</variablelist>
921
+</refsect1>
922
+
923
+<refsect1>
924
+	<table frame="all" rowheader="firstcol">
925
+		<title>Attributes mapping</title>
926
+		<tgroup cols='5' align='left' colsep='1' rowsep='1'>
927
+		<thead>
928
+			<row>
929
+			<entry> </entry>
930
+			<entry>built-in</entry>
931
+			<entry>legacy</entry>
932
+			<entry>compat/jail</entry>
933
+			<entry>secure</entry>
934
+			</row>
935
+		</thead>
936
+		<tbody>
937
+			<row>
938
+			<entry>user</entry>
939
+			<entry>USER; attribute</entry>
940
+			<entry>USER; attribute</entry>
941
+			<entry>USER; user.attribute</entry>
942
+			<entry>USER; user.attribute</entry>
943
+			</row>
944
+			<row>
945
+			<entry>system</entry>
946
+			<entry>SYSTEM; attribute</entry>
947
+			<entry>SYSTEM; attribute</entry>
948
+			<entry>USER; system.attribute</entry>
949
+			<entry>SYSTEM; system.attribute</entry>
950
+			</row>
951
+			<row>
952
+			<entry>trusted</entry>
953
+			<entry>FAIL</entry>
954
+			<entry>USER; attribute</entry>
955
+			<entry>USER; trusted.attribute</entry>
956
+			<entry>SYSTEM; trusted.attribute</entry>
957
+			</row>
958
+			<row>
959
+			<entry>security</entry>
960
+			<entry>FAIL</entry>
961
+			<entry>USER; attribute</entry>
962
+			<entry>USER; security.attribute</entry>
963
+			<entry>SYSTEM; security.attribute</entry>
964
+			</row>
965
+		</tbody>
966
+		</tgroup>
967
+	</table>
968
+</refsect1>
969
+
970
+<refsect1>
971
+	<title>EXAMPLES</title>
972
+
973
+	<para>Use secure method of setting extended attributes on the share:</para>
974
+
975
+<programlisting>
976
+	<smbconfsection name="[sysvol]"/>
977
+	<smbconfoption name="vfs objects">freebsd</smbconfoption>
978
+	<smbconfoption name="freebsd:extattr mode">secure</smbconfoption>
979
+</programlisting>
980
+
981
+</refsect1>
982
+
983
+<refsect1>
984
+	<title>VERSION</title>
985
+
986
+	<para>This man page is part of version &doc.version; of the Samba suite.
987
+	</para>
988
+</refsect1>
989
+
990
+<refsect1>
991
+	<title>AUTHOR</title>
992
+
993
+	<para>The original Samba software and related utilities
994
+	were created by Andrew Tridgell. Samba is now developed
995
+	by the Samba Team as an Open Source project similar
996
+	to the way the Linux kernel is developed.</para>
997
+
998
+	<para>This module was written by Timur I. Bakeyev</para>
999
+
1000
+</refsect1>
1001
+
1002
+</refentry>
(-)b/net/samba415/files/man/ctdb-script.options.5 (+558 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb-script.options
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB\-SCRIPT\&.OPTIO" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb-script.options \- CTDB scripts configuration files
32
.SH "DESCRIPTION"
33
.PP
34
Each CTDB script has 2 possible locations for its configuration options:
35
.PP
36
/usr/local/etc/ctdb/script\&.options
37
.RS 4
38
This is a catch\-all global file for general purpose scripts and for options that are used in multiple event scripts\&.
39
.RE
40
.PP
41
\fISCRIPT\fR\&.options
42
.RS 4
43
That is, options for
44
\fISCRIPT\fR
45
are placed in a file alongside the script, with a "\&.script" suffix added\&. This style is usually recommended for event scripts\&.
46
.sp
47
Options in this script\-specific file override those in the global file\&.
48
.RE
49
.PP
50
These files should include simple shell\-style variable assignments and shell\-style comments\&.
51
.SH "NETWORK CONFIGURATION"
52
.SS "10\&.interface"
53
.PP
54
This event script handles monitoring of interfaces using by public IP addresses\&.
55
.PP
56
CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no
57
.RS 4
58
Whether one or more offline interfaces should cause a monitor event to fail if there are other interfaces that are up\&. If this is "yes" and a node has some interfaces that are down then
59
\fBctdb status\fR
60
will display the node as "PARTIALLYONLINE"\&.
61
.sp
62
Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is not generally compatible with NAT gateway or LVS\&. NAT gateway relies on the interface configured by CTDB_NATGW_PUBLIC_IFACE to be up and LVS replies on CTDB_LVS_PUBLIC_IFACE to be up\&. CTDB does not check if these options are set in an incompatible way so care is needed to understand the interaction\&.
63
.sp
64
Default is "no"\&.
65
.RE
66
.SS "11\&.natgw"
67
.PP
68
Provides CTDB\*(Aqs NAT gateway functionality\&.
69
.PP
70
NAT gateway is used to configure fallback routing for nodes when they do not host any public IP addresses\&. For example, it allows unhealthy nodes to reliably communicate with external infrastructure\&. One node in a NAT gateway group will be designated as the NAT gateway master node and other (slave) nodes will be configured with fallback routes via the NAT gateway master node\&. For more information, see the
71
NAT GATEWAY
72
section in
73
\fBctdb\fR(7)\&.
74
.PP
75
CTDB_NATGW_DEFAULT_GATEWAY=\fIIPADDR\fR
76
.RS 4
77
IPADDR is an alternate network gateway to use on the NAT gateway master node\&. If set, a fallback default route is added via this network gateway\&.
78
.sp
79
No default\&. Setting this variable is optional \- if not set that no route is created on the NAT gateway master node\&.
80
.RE
81
.PP
82
CTDB_NATGW_NODES=\fIFILENAME\fR
83
.RS 4
84
FILENAME contains the list of nodes that belong to the same NAT gateway group\&.
85
.sp
86
File format:
87
.sp
88
.if n \{\
89
.RS 4
90
.\}
91
.nf
92
\fIIPADDR\fR [slave\-only]
93
94
.fi
95
.if n \{\
96
.RE
97
.\}
98
.sp
99
IPADDR is the private IP address of each node in the NAT gateway group\&.
100
.sp
101
If "slave\-only" is specified then the corresponding node can not be the NAT gateway master node\&. In this case
102
\fICTDB_NATGW_PUBLIC_IFACE\fR
103
and
104
\fICTDB_NATGW_PUBLIC_IP\fR
105
are optional and unused\&.
106
.sp
107
No default, usually
108
/usr/local/etc/ctdb/natgw_nodes
109
when enabled\&.
110
.RE
111
.PP
112
CTDB_NATGW_PRIVATE_NETWORK=\fIIPADDR/MASK\fR
113
.RS 4
114
IPADDR/MASK is the private sub\-network that is internally routed via the NAT gateway master node\&. This is usually the private network that is used for node addresses\&.
115
.sp
116
No default\&.
117
.RE
118
.PP
119
CTDB_NATGW_PUBLIC_IFACE=\fIIFACE\fR
120
.RS 4
121
IFACE is the network interface on which the CTDB_NATGW_PUBLIC_IP will be configured\&.
122
.sp
123
No default\&.
124
.RE
125
.PP
126
CTDB_NATGW_PUBLIC_IP=\fIIPADDR/MASK\fR
127
.RS 4
128
IPADDR/MASK indicates the IP address that is used for outgoing traffic (originating from CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway master node\&. This
129
\fImust not\fR
130
be a configured public IP address\&.
131
.sp
132
No default\&.
133
.RE
134
.PP
135
CTDB_NATGW_STATIC_ROUTES=\fIIPADDR/MASK[@GATEWAY]\fR \&.\&.\&.
136
.RS 4
137
Each IPADDR/MASK identifies a network or host to which NATGW should create a fallback route, instead of creating a single default route\&. This can be used when there is already a default route, via an interface that can not reach required infrastructure, that overrides the NAT gateway default route\&.
138
.sp
139
If GATEWAY is specified then the corresponding route on the NATGW master node will be via GATEWAY\&. Such routes are created even if
140
\fICTDB_NATGW_DEFAULT_GATEWAY\fR
141
is not specified\&. If GATEWAY is not specified for some networks then routes are only created on the NATGW master node for those networks if
142
\fICTDB_NATGW_DEFAULT_GATEWAY\fR
143
is specified\&.
144
.sp
145
This should be used with care to avoid causing traffic to unnecessarily double\-hop through the NAT gateway master, even when a node is hosting public IP addresses\&. Each specified network or host should probably have a corresponding automatically created link route or static route to avoid this\&.
146
.sp
147
No default\&.
148
.RE
149
.sp
150
.it 1 an-trap
151
.nr an-no-space-flag 1
152
.nr an-break-flag 1
153
.br
154
.ps +1
155
\fBExample\fR
156
.RS 4
157
.sp
158
.if n \{\
159
.RS 4
160
.\}
161
.nf
162
CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
163
CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24
164
CTDB_NATGW_DEFAULT_GATEWAY=10\&.0\&.0\&.1
165
CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24
166
CTDB_NATGW_PUBLIC_IFACE=eth0
167
168
.fi
169
.if n \{\
170
.RE
171
.\}
172
.PP
173
A variation that ensures that infrastructure (ADS, DNS, \&.\&.\&.) directly attached to the public network (10\&.0\&.0\&.0/24) is always reachable would look like this:
174
.sp
175
.if n \{\
176
.RS 4
177
.\}
178
.nf
179
CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
180
CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24
181
CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24
182
CTDB_NATGW_PUBLIC_IFACE=eth0
183
CTDB_NATGW_STATIC_ROUTES=10\&.0\&.0\&.0/24
184
185
.fi
186
.if n \{\
187
.RE
188
.\}
189
.PP
190
Note that
191
\fICTDB_NATGW_DEFAULT_GATEWAY\fR
192
is not specified\&.
193
.RE
194
.SS "13\&.per_ip_routing"
195
.PP
196
Provides CTDB\*(Aqs policy routing functionality\&.
197
.PP
198
A node running CTDB may be a component of a complex network topology\&. In particular, public addresses may be spread across several different networks (or VLANs) and it may not be possible to route packets from these public addresses via the system\*(Aqs default route\&. Therefore, CTDB has support for policy routing via the
199
13\&.per_ip_routing
200
eventscript\&. This allows routing to be specified for packets sourced from each public address\&. The routes are added and removed as CTDB moves public addresses between nodes\&.
201
.PP
202
For more information, see the
203
POLICY ROUTING
204
section in
205
\fBctdb\fR(7)\&.
206
.PP
207
CTDB_PER_IP_ROUTING_CONF=\fIFILENAME\fR
208
.RS 4
209
FILENAME contains elements for constructing the desired routes for each source address\&.
210
.sp
211
The special FILENAME value
212
\fB__auto_link_local__\fR
213
indicates that no configuration file is provided and that CTDB should generate reasonable link\-local routes for each public IP address\&.
214
.sp
215
File format:
216
.sp
217
.if n \{\
218
.RS 4
219
.\}
220
.nf
221
		\fIIPADDR\fR \fIDEST\-IPADDR/MASK\fR [\fIGATEWAY\-IPADDR\fR]
222
223
.fi
224
.if n \{\
225
.RE
226
.\}
227
.sp
228
No default, usually
229
/usr/local/etc/ctdb/policy_routing
230
when enabled\&.
231
.RE
232
.PP
233
CTDB_PER_IP_ROUTING_RULE_PREF=\fINUM\fR
234
.RS 4
235
NUM sets the priority (or preference) for the routing rules that are added by CTDB\&.
236
.sp
237
This should be (strictly) greater than 0 and (strictly) less than 32766\&. A priority of 100 is recommended, unless this conflicts with a priority already in use on the system\&. See
238
\fBip\fR(8), for more details\&.
239
.RE
240
.PP
241
CTDB_PER_IP_ROUTING_TABLE_ID_LOW=\fILOW\-NUM\fR, CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=\fIHIGH\-NUM\fR
242
.RS 4
243
CTDB determines a unique routing table number to use for the routing related to each public address\&. LOW\-NUM and HIGH\-NUM indicate the minimum and maximum routing table numbers that are used\&.
244
.sp
245
\fBip\fR(8)
246
uses some reserved routing table numbers below 255\&. Therefore, CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly) greater than 255\&.
247
.sp
248
CTDB uses the standard file
249
/etc/iproute2/rt_tables
250
to maintain a mapping between the routing table numbers and labels\&. The label for a public address
251
\fIADDR\fR
252
will look like ctdb\&.\fIaddr\fR\&. This means that the associated rules and routes are easy to read (and manipulate)\&.
253
.sp
254
No default, usually 1000 and 9000\&.
255
.RE
256
.sp
257
.it 1 an-trap
258
.nr an-no-space-flag 1
259
.nr an-break-flag 1
260
.br
261
.ps +1
262
\fBExample\fR
263
.RS 4
264
.sp
265
.if n \{\
266
.RS 4
267
.\}
268
.nf
269
CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
270
CTDB_PER_IP_ROUTING_RULE_PREF=100
271
CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
272
CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
273
274
.fi
275
.if n \{\
276
.RE
277
.\}
278
.RE
279
.SS "91\&.lvs"
280
.PP
281
Provides CTDB\*(Aqs LVS functionality\&.
282
.PP
283
For a general description see the
284
LVS
285
section in
286
\fBctdb\fR(7)\&.
287
.PP
288
CTDB_LVS_NODES=\fIFILENAME\fR
289
.RS 4
290
FILENAME contains the list of nodes that belong to the same LVS group\&.
291
.sp
292
File format:
293
.sp
294
.if n \{\
295
.RS 4
296
.\}
297
.nf
298
\fIIPADDR\fR [slave\-only]
299
300
.fi
301
.if n \{\
302
.RE
303
.\}
304
.sp
305
IPADDR is the private IP address of each node in the LVS group\&.
306
.sp
307
If "slave\-only" is specified then the corresponding node can not be the LVS master node\&. In this case
308
\fICTDB_LVS_PUBLIC_IFACE\fR
309
and
310
\fICTDB_LVS_PUBLIC_IP\fR
311
are optional and unused\&.
312
.sp
313
No default, usually
314
/usr/local/etc/ctdb/lvs_nodes
315
when enabled\&.
316
.RE
317
.PP
318
CTDB_LVS_PUBLIC_IFACE=\fIINTERFACE\fR
319
.RS 4
320
INTERFACE is the network interface that clients will use to connection to
321
\fICTDB_LVS_PUBLIC_IP\fR\&. This is optional for slave\-only nodes\&. No default\&.
322
.RE
323
.PP
324
CTDB_LVS_PUBLIC_IP=\fIIPADDR\fR
325
.RS 4
326
CTDB_LVS_PUBLIC_IP is the LVS public address\&. No default\&.
327
.RE
328
.SH "SERVICE CONFIGURATION"
329
.PP
330
CTDB can be configured to manage and/or monitor various NAS (and other) services via its eventscripts\&.
331
.PP
332
In the simplest case CTDB will manage a service\&. This means the service will be started and stopped along with CTDB, CTDB will monitor the service and CTDB will do any required reconfiguration of the service when public IP addresses are failed over\&.
333
.SS "20\&.multipathd"
334
.PP
335
Provides CTDB\*(Aqs Linux multipathd service management\&.
336
.PP
337
It can monitor multipath devices to ensure that active paths are available\&.
338
.PP
339
CTDB_MONITOR_MPDEVICES=\fIMP\-DEVICE\-LIST\fR
340
.RS 4
341
MP\-DEVICE\-LIST is a list of multipath devices for CTDB to monitor?
342
.sp
343
No default\&.
344
.RE
345
.SS "31\&.clamd"
346
.PP
347
This event script provide CTDB\*(Aqs ClamAV anti\-virus service management\&.
348
.PP
349
This eventscript is not enabled by default\&. Use
350
\fBctdb enablescript\fR
351
to enable it\&.
352
.PP
353
CTDB_CLAMD_SOCKET=\fIFILENAME\fR
354
.RS 4
355
FILENAME is the socket to monitor ClamAV\&.
356
.sp
357
No default\&.
358
.RE
359
.SS "49\&.winbind"
360
.PP
361
Provides CTDB\*(Aqs Samba winbind service management\&.
362
.PP
363
CTDB_SERVICE_WINBIND=\fISERVICE\fR
364
.RS 4
365
Distribution specific SERVICE for managing winbindd\&.
366
.sp
367
Default is "winbind"\&.
368
.RE
369
.SS "50\&.samba"
370
.PP
371
Provides the core of CTDB\*(Aqs Samba file service management\&.
372
.PP
373
CTDB_SAMBA_CHECK_PORTS=\fIPORT\-LIST\fR
374
.RS 4
375
When monitoring Samba, check TCP ports in space\-separated PORT\-LIST\&.
376
.sp
377
Default is to monitor ports that Samba is configured to listen on\&.
378
.RE
379
.PP
380
CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no
381
.RS 4
382
As part of monitoring, should CTDB skip the check for the existence of each directory configured as share in Samba\&. This may be desirable if there is a large number of shares\&.
383
.sp
384
Default is no\&.
385
.RE
386
.PP
387
CTDB_SERVICE_NMB=\fISERVICE\fR
388
.RS 4
389
Distribution specific SERVICE for managing nmbd\&.
390
.sp
391
Default is distribution\-dependant\&.
392
.RE
393
.PP
394
CTDB_SERVICE_SMB=\fISERVICE\fR
395
.RS 4
396
Distribution specific SERVICE for managing smbd\&.
397
.sp
398
Default is distribution\-dependant\&.
399
.RE
400
.SS "60\&.nfs"
401
.PP
402
This event script (along with 06\&.nfs) provides CTDB\*(Aqs NFS service management\&.
403
.PP
404
This includes parameters for the kernel NFS server\&. Alternative NFS subsystems (such as
405
\m[blue]\fBNFS\-Ganesha\fR\m[]\&\s-2\u[1]\d\s+2) can be integrated using
406
\fICTDB_NFS_CALLOUT\fR\&.
407
.PP
408
CTDB_NFS_CALLOUT=\fICOMMAND\fR
409
.RS 4
410
COMMAND specifies the path to a callout to handle interactions with the configured NFS system, including startup, shutdown, monitoring\&.
411
.sp
412
Default is the included
413
\fBnfs\-linux\-kernel\-callout\fR\&.
414
.RE
415
.PP
416
CTDB_NFS_CHECKS_DIR=\fIDIRECTORY\fR
417
.RS 4
418
Specifies the path to a DIRECTORY containing files that describe how to monitor the responsiveness of NFS RPC services\&. See the README file for this directory for an explanation of the contents of these "check" files\&.
419
.sp
420
CTDB_NFS_CHECKS_DIR can be used to point to different sets of checks for different NFS servers\&.
421
.sp
422
One way of using this is to have it point to, say,
423
/usr/local/etc/ctdb/nfs\-checks\-enabled\&.d
424
and populate it with symbolic links to the desired check files\&. This avoids duplication and is upgrade\-safe\&.
425
.sp
426
Default is
427
/usr/local/etc/ctdb/nfs\-checks\&.d, which contains NFS RPC checks suitable for Linux kernel NFS\&.
428
.RE
429
.PP
430
CTDB_NFS_SKIP_SHARE_CHECK=yes|no
431
.RS 4
432
As part of monitoring, should CTDB skip the check for the existence of each directory exported via NFS\&. This may be desirable if there is a large number of exports\&.
433
.sp
434
Default is no\&.
435
.RE
436
.PP
437
CTDB_RPCINFO_LOCALHOST=\fIIPADDR\fR|\fIHOSTNAME\fR
438
.RS 4
439
IPADDR or HOSTNAME indicates the address that
440
\fBrpcinfo\fR
441
should connect to when doing
442
\fBrpcinfo\fR
443
check on IPv4 RPC service during monitoring\&. Optimally this would be "localhost"\&. However, this can add some performance overheads\&.
444
.sp
445
Default is "127\&.0\&.0\&.1"\&.
446
.RE
447
.PP
448
CTDB_RPCINFO_LOCALHOST6=\fIIPADDR\fR|\fIHOSTNAME\fR
449
.RS 4
450
IPADDR or HOSTNAME indicates the address that
451
\fBrpcinfo\fR
452
should connect to when doing
453
\fBrpcinfo\fR
454
check on IPv6 RPC service during monitoring\&. Optimally this would be "localhost6" (or similar)\&. However, this can add some performance overheads\&.
455
.sp
456
Default is "::1"\&.
457
.RE
458
.PP
459
CTDB_NFS_STATE_FS_TYPE=\fITYPE\fR
460
.RS 4
461
The type of filesystem used for a clustered NFS\*(Aq shared state\&. No default\&.
462
.RE
463
.PP
464
CTDB_NFS_STATE_MNT=\fIDIR\fR
465
.RS 4
466
The directory where a clustered NFS\*(Aq shared state will be located\&. No default\&.
467
.RE
468
.SS "70\&.iscsi"
469
.PP
470
Provides CTDB\*(Aqs Linux iSCSI tgtd service management\&.
471
.PP
472
CTDB_START_ISCSI_SCRIPTS=\fIDIRECTORY\fR
473
.RS 4
474
DIRECTORY on shared storage containing scripts to start tgtd for each public IP address\&.
475
.sp
476
No default\&.
477
.RE
478
.SH "DATABASE SETUP"
479
.PP
480
CTDB checks the consistency of databases during startup\&.
481
.SS "00\&.ctdb"
482
.PP
483
CTDB_MAX_CORRUPT_DB_BACKUPS=\fINUM\fR
484
.RS 4
485
NUM is the maximum number of volatile TDB database backups to be kept (for each database) when a corrupt database is found during startup\&. Volatile TDBs are zeroed during startup so backups are needed to debug any corruption that occurs before a restart\&.
486
.sp
487
Default is 10\&.
488
.RE
489
.SH "SYSTEM RESOURCE MONITORING"
490
.SS "05\&.system"
491
.PP
492
Provides CTDB\*(Aqs filesystem and memory usage monitoring\&.
493
.PP
494
CTDB can experience seemingly random (performance and other) issues if system resources become too constrained\&. Options in this section can be enabled to allow certain system resources to be checked\&. They allows warnings to be logged and nodes to be marked unhealthy when system resource usage reaches the configured thresholds\&.
495
.PP
496
Some checks are enabled by default\&. It is recommended that these checks remain enabled or are augmented by extra checks\&. There is no supported way of completely disabling the checks\&.
497
.PP
498
CTDB_MONITOR_FILESYSTEM_USAGE=\fIFS\-LIMIT\-LIST\fR
499
.RS 4
500
FS\-LIMIT\-LIST is a space\-separated list of
501
\fIFILESYSTEM\fR:\fIWARN_LIMIT\fR[:\fIUNHEALTHY_LIMIT\fR]
502
triples indicating that warnings should be logged if the space used on FILESYSTEM reaches WARN_LIMIT%\&. If usage reaches UNHEALTHY_LIMIT then the node should be flagged unhealthy\&. Either WARN_LIMIT or UNHEALTHY_LIMIT may be left blank, meaning that check will be omitted\&.
503
.sp
504
Default is to warn for each filesystem containing a database directory (volatile\ \&database\ \&directory,
505
persistent\ \&database\ \&directory,
506
state\ \&database\ \&directory) with a threshold of 90%\&.
507
.RE
508
.PP
509
CTDB_MONITOR_MEMORY_USAGE=\fIMEM\-LIMITS\fR
510
.RS 4
511
MEM\-LIMITS takes the form
512
\fIWARN_LIMIT\fR[:\fIUNHEALTHY_LIMIT\fR]
513
indicating that warnings should be logged if memory usage reaches WARN_LIMIT%\&. If usage reaches UNHEALTHY_LIMIT then the node should be flagged unhealthy\&. Either WARN_LIMIT or UNHEALTHY_LIMIT may be left blank, meaning that check will be omitted\&.
514
.sp
515
Default is 80, so warnings will be logged when memory usage reaches 80%\&.
516
.RE
517
.SH "EVENT SCRIPT DEBUGGING"
518
.SS "debug\-hung\-script\&.sh"
519
.PP
520
CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=\fIREGEXP\fR
521
.RS 4
522
REGEXP specifies interesting processes for which stack traces should be logged when debugging hung eventscripts and those processes are matched in pstree output\&. REGEXP is an extended regexp so choices are separated by pipes (\*(Aq|\*(Aq)\&. However, REGEXP should not contain parentheses\&. See also the
523
\fBctdb.conf\fR(5)
524
[event] "debug\ \&script" option\&.
525
.sp
526
Default is "exportfs|rpcinfo"\&.
527
.RE
528
.SH "FILES"
529
.RS 4
530
/usr/local/etc/ctdb/script\&.options
531
.RE
532
.SH "SEE ALSO"
533
.PP
534
\fBctdbd\fR(1),
535
\fBctdb\fR(7),
536
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
537
.SH "AUTHOR"
538
.br
539
.PP
540
This documentation was written by Amitay Isaacs, Martin Schwenke
541
.SH "COPYRIGHT"
542
.br
543
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
544
.br
545
.PP
546
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\&.
547
.PP
548
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\&.
549
.PP
550
You should have received a copy of the GNU General Public License along with this program; if not, see
551
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
552
.sp
553
.SH "NOTES"
554
.IP " 1." 4
555
NFS-Ganesha
556
.RS 4
557
\%https://github.com/nfs-ganesha/nfs-ganesha/wiki
558
.RE
(-)b/net/samba415/files/man/ctdb-statistics.7 (+550 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb-statistics
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB\-STATISTICS" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb-statistics \- CTDB statistics output
32
.SH "OVERALL STATISTICS"
33
.PP
34
CTDB maintains information about various messages communicated and some of the important operations per node\&. See the
35
\fBctdb\fR(1)
36
commands
37
\fBstatistics\fR
38
and
39
\fBstatisticsreset\fR
40
for displaying statistics\&.
41
.SS "Example: ctdb statistics"
42
.sp
43
.if n \{\
44
.RS 4
45
.\}
46
.nf
47
CTDB version 1
48
Current time of statistics  :                Fri Sep 12 13:32:32 2014
49
Statistics collected since  : (000 01:49:20) Fri Sep 12 11:43:12 2014
50
 num_clients                        6
51
 frozen                             0
52
 recovering                         0
53
 num_recoveries                     2
54
 client_packets_sent           281293
55
 client_packets_recv           296317
56
 node_packets_sent             452387
57
 node_packets_recv             182394
58
 keepalive_packets_sent          3927
59
 keepalive_packets_recv          3928
60
 node
61
     req_call                   48605
62
     reply_call                     1
63
     req_dmaster                23404
64
     reply_dmaster              24917
65
     reply_error                    0
66
     req_message                  958
67
     req_control               197513
68
     reply_control             153705
69
 client
70
     req_call                  130866
71
     req_message                  770
72
     req_control               168921
73
 timeouts
74
     call                           0
75
     control                        0
76
     traverse                       0
77
 locks
78
     num_calls                    220
79
     num_current                    0
80
     num_pending                    0
81
     num_failed                     0
82
 total_calls                   130866
83
 pending_calls                      0
84
 childwrite_calls                   1
85
 pending_childwrite_calls             0
86
 memory_used                   334490
87
 max_hop_count                     18
88
 total_ro_delegations               2
89
 total_ro_revokes                   2
90
 hop_count_buckets: 42816 5464 26 1 0 0 0 0 0 0 0 0 0 0 0 0
91
 lock_buckets: 9 165 14 15 7 2 2 0 0 0 0 0 0 0 0 0
92
 locks_latency      MIN/AVG/MAX     0\&.000685/0\&.160302/6\&.369342 sec out of 214
93
 reclock_ctdbd      MIN/AVG/MAX     0\&.004940/0\&.004969/0\&.004998 sec out of 2
94
 reclock_recd       MIN/AVG/MAX     0\&.000000/0\&.000000/0\&.000000 sec out of 0
95
 call_latency       MIN/AVG/MAX     0\&.000006/0\&.000719/4\&.562991 sec out of 126626
96
 childwrite_latency MIN/AVG/MAX     0\&.014527/0\&.014527/0\&.014527 sec out of 1
97
98
.fi
99
.if n \{\
100
.RE
101
.\}
102
.SS "CTDB version"
103
.PP
104
Version of the ctdb protocol used by the node\&.
105
.SS "Current time of statistics"
106
.PP
107
Time when the statistics are generated\&.
108
.PP
109
This is useful when collecting statistics output periodically for post\-processing\&.
110
.SS "Statistics collected since"
111
.PP
112
Time when ctdb was started or the last time statistics was reset\&. The output shows the duration and the timestamp\&.
113
.SS "num_clients"
114
.PP
115
Number of processes currently connected to CTDB\*(Aqs unix socket\&. This includes recovery daemon, ctdb tool and samba processes (smbd, winbindd)\&.
116
.SS "frozen"
117
.PP
118
1 if the databases are currently frozen, 0 otherwise\&.
119
.SS "recovering"
120
.PP
121
1 if recovery is active, 0 otherwise\&.
122
.SS "num_recoveries"
123
.PP
124
Number of recoveries since the start of ctdb or since the last statistics reset\&.
125
.SS "client_packets_sent"
126
.PP
127
Number of packets sent to client processes via unix domain socket\&.
128
.SS "client_packets_recv"
129
.PP
130
Number of packets received from client processes via unix domain socket\&.
131
.SS "node_packets_sent"
132
.PP
133
Number of packets sent to the other nodes in the cluster via TCP\&.
134
.SS "node_packets_recv"
135
.PP
136
Number of packets received from the other nodes in the cluster via TCP\&.
137
.SS "keepalive_packets_sent"
138
.PP
139
Number of keepalive messages sent to other nodes\&.
140
.PP
141
CTDB periodically sends keepalive messages to other nodes\&. See
142
KeepaliveInterval
143
tunable in
144
\fBctdb-tunables\fR(7)
145
for more details\&.
146
.SS "keepalive_packets_recv"
147
.PP
148
Number of keepalive messages received from other nodes\&.
149
.SS "node"
150
.PP
151
This section lists various types of messages processed which originated from other nodes via TCP\&.
152
.sp
153
.it 1 an-trap
154
.nr an-no-space-flag 1
155
.nr an-break-flag 1
156
.br
157
.ps +1
158
\fBreq_call\fR
159
.RS 4
160
.PP
161
Number of REQ_CALL messages from the other nodes\&.
162
.RE
163
.sp
164
.it 1 an-trap
165
.nr an-no-space-flag 1
166
.nr an-break-flag 1
167
.br
168
.ps +1
169
\fBreply_call\fR
170
.RS 4
171
.PP
172
Number of REPLY_CALL messages from the other nodes\&.
173
.RE
174
.sp
175
.it 1 an-trap
176
.nr an-no-space-flag 1
177
.nr an-break-flag 1
178
.br
179
.ps +1
180
\fBreq_dmaster\fR
181
.RS 4
182
.PP
183
Number of REQ_DMASTER messages from the other nodes\&.
184
.RE
185
.sp
186
.it 1 an-trap
187
.nr an-no-space-flag 1
188
.nr an-break-flag 1
189
.br
190
.ps +1
191
\fBreply_dmaster\fR
192
.RS 4
193
.PP
194
Number of REPLY_DMASTER messages from the other nodes\&.
195
.RE
196
.sp
197
.it 1 an-trap
198
.nr an-no-space-flag 1
199
.nr an-break-flag 1
200
.br
201
.ps +1
202
\fBreply_error\fR
203
.RS 4
204
.PP
205
Number of REPLY_ERROR messages from the other nodes\&.
206
.RE
207
.sp
208
.it 1 an-trap
209
.nr an-no-space-flag 1
210
.nr an-break-flag 1
211
.br
212
.ps +1
213
\fBreq_message\fR
214
.RS 4
215
.PP
216
Number of REQ_MESSAGE messages from the other nodes\&.
217
.RE
218
.sp
219
.it 1 an-trap
220
.nr an-no-space-flag 1
221
.nr an-break-flag 1
222
.br
223
.ps +1
224
\fBreq_control\fR
225
.RS 4
226
.PP
227
Number of REQ_CONTROL messages from the other nodes\&.
228
.RE
229
.sp
230
.it 1 an-trap
231
.nr an-no-space-flag 1
232
.nr an-break-flag 1
233
.br
234
.ps +1
235
\fBreply_control\fR
236
.RS 4
237
.PP
238
Number of REPLY_CONTROL messages from the other nodes\&.
239
.RE
240
.sp
241
.it 1 an-trap
242
.nr an-no-space-flag 1
243
.nr an-break-flag 1
244
.br
245
.ps +1
246
\fBreq_tunnel\fR
247
.RS 4
248
.PP
249
Number of REQ_TUNNEL messages from the other nodes\&.
250
.RE
251
.SS "client"
252
.PP
253
This section lists various types of messages processed which originated from clients via unix domain socket\&.
254
.sp
255
.it 1 an-trap
256
.nr an-no-space-flag 1
257
.nr an-break-flag 1
258
.br
259
.ps +1
260
\fBreq_call\fR
261
.RS 4
262
.PP
263
Number of REQ_CALL messages from the clients\&.
264
.RE
265
.sp
266
.it 1 an-trap
267
.nr an-no-space-flag 1
268
.nr an-break-flag 1
269
.br
270
.ps +1
271
\fBreq_message\fR
272
.RS 4
273
.PP
274
Number of REQ_MESSAGE messages from the clients\&.
275
.RE
276
.sp
277
.it 1 an-trap
278
.nr an-no-space-flag 1
279
.nr an-break-flag 1
280
.br
281
.ps +1
282
\fBreq_control\fR
283
.RS 4
284
.PP
285
Number of REQ_CONTROL messages from the clients\&.
286
.RE
287
.sp
288
.it 1 an-trap
289
.nr an-no-space-flag 1
290
.nr an-break-flag 1
291
.br
292
.ps +1
293
\fBreq_tunnel\fR
294
.RS 4
295
.PP
296
Number of REQ_TUNNEL messages from the clients\&.
297
.RE
298
.SS "timeouts"
299
.PP
300
This section lists timeouts occurred when sending various messages\&.
301
.sp
302
.it 1 an-trap
303
.nr an-no-space-flag 1
304
.nr an-break-flag 1
305
.br
306
.ps +1
307
\fBcall\fR
308
.RS 4
309
.PP
310
Number of timeouts for REQ_CALL messages\&.
311
.RE
312
.sp
313
.it 1 an-trap
314
.nr an-no-space-flag 1
315
.nr an-break-flag 1
316
.br
317
.ps +1
318
\fBcontrol\fR
319
.RS 4
320
.PP
321
Number of timeouts for REQ_CONTROL messages\&.
322
.RE
323
.sp
324
.it 1 an-trap
325
.nr an-no-space-flag 1
326
.nr an-break-flag 1
327
.br
328
.ps +1
329
\fBtraverse\fR
330
.RS 4
331
.PP
332
Number of timeouts for database traverse operations\&.
333
.RE
334
.SS "locks"
335
.PP
336
This section lists locking statistics\&.
337
.sp
338
.it 1 an-trap
339
.nr an-no-space-flag 1
340
.nr an-break-flag 1
341
.br
342
.ps +1
343
\fBnum_calls\fR
344
.RS 4
345
.PP
346
Number of completed lock calls\&. This includes database locks and record locks\&.
347
.RE
348
.sp
349
.it 1 an-trap
350
.nr an-no-space-flag 1
351
.nr an-break-flag 1
352
.br
353
.ps +1
354
\fBnum_current\fR
355
.RS 4
356
.PP
357
Number of scheduled lock calls\&. This includes database locks and record locks\&.
358
.RE
359
.sp
360
.it 1 an-trap
361
.nr an-no-space-flag 1
362
.nr an-break-flag 1
363
.br
364
.ps +1
365
\fBnum_pending\fR
366
.RS 4
367
.PP
368
Number of queued lock calls\&. This includes database locks and record locks\&.
369
.RE
370
.sp
371
.it 1 an-trap
372
.nr an-no-space-flag 1
373
.nr an-break-flag 1
374
.br
375
.ps +1
376
\fBnum_failed\fR
377
.RS 4
378
.PP
379
Number of failed lock calls\&. This includes database locks and record locks\&.
380
.RE
381
.SS "total_calls"
382
.PP
383
Number of req_call messages processed from clients\&. This number should be same as client \-\-> req_call\&.
384
.SS "pending_calls"
385
.PP
386
Number of req_call messages which are currently being processed\&. This number indicates the number of record migrations in flight\&.
387
.SS "childwrite_calls"
388
.PP
389
Number of record update calls\&. Record update calls are used to update a record under a transaction\&.
390
.SS "pending_childwrite_calls"
391
.PP
392
Number of record update calls currently active\&.
393
.SS "memory_used"
394
.PP
395
The amount of memory in bytes currently used by CTDB using talloc\&. This includes all the memory used for CTDB\*(Aqs internal data structures\&. This does not include the memory mapped TDB databases\&.
396
.SS "max_hop_count"
397
.PP
398
The maximum number of hops required for a record migration request to obtain the record\&. High numbers indicate record contention\&.
399
.SS "total_ro_delegations"
400
.PP
401
Number of readonly delegations created\&.
402
.SS "total_ro_revokes"
403
.PP
404
Number of readonly delegations that were revoked\&. The difference between total_ro_revokes and total_ro_delegations gives the number of currently active readonly delegations\&.
405
.SS "hop_count_buckets"
406
.PP
407
Distribution of migration requests based on hop counts values\&. Buckets are 0, <\ \&2, <\ \&4, <\ \&8, <\ \&16, <\ \&32, <\ \&64, <\ \&128, <\ \&256, <\ \&512, <\ \&1024, <\ \&2048, <\ \&4096, <\ \&8192, <\ \&16384, ≥\ \&16384\&.
408
.SS "lock_buckets"
409
.PP
410
Distribution of record lock requests based on time required to obtain locks\&. Buckets are <\ \&1ms, <\ \&10ms, <\ \&100ms, <\ \&1s, <\ \&2s, <\ \&4s, <\ \&8s, <\ \&16s, <\ \&32s, <\ \&64s, ≥\ \&64s\&.
411
.SS "locks_latency"
412
.PP
413
The minimum, the average and the maximum time (in seconds) required to obtain record locks\&.
414
.SS "reclock_ctdbd"
415
.PP
416
The minimum, the average and the maximum time (in seconds) required to check if recovery lock is still held by recovery daemon when recovery mode is changed\&. This check is done in ctdb daemon\&.
417
.SS "reclock_recd"
418
.PP
419
The minimum, the average and the maximum time (in seconds) required to check if recovery lock is still held by recovery daemon during recovery\&. This check is done in recovery daemon\&.
420
.SS "call_latency"
421
.PP
422
The minimum, the average and the maximum time (in seconds) required to process a REQ_CALL message from client\&. This includes the time required to migrate a record from remote node, if the record is not available on the local node\&.
423
.SS "childwrite_latency"
424
.PP
425
Default: 0
426
.PP
427
The minimum, the average and the maximum time (in seconds) required to update records under a transaction\&.
428
.SH "DATABASE STATISTICS"
429
.PP
430
CTDB maintains per database statistics about important operations\&. See the
431
\fBctdb\fR(1)
432
command
433
\fBdbstatistics\fR
434
for displaying database statistics\&.
435
.SS "Example: ctdb dbstatistics notify_index\&.tdb"
436
.sp
437
.if n \{\
438
.RS 4
439
.\}
440
.nf
441
DB Statistics: notify_index\&.tdb
442
 ro_delegations                     0
443
 ro_revokes                         0
444
 locks
445
     total                        131
446
     failed                         0
447
     current                        0
448
     pending                        0
449
 hop_count_buckets: 9890 5454 26 1 0 0 0 0 0 0 0 0 0 0 0 0
450
 lock_buckets: 4 117 10 0 0 0 0 0 0 0 0 0 0 0 0 0
451
 locks_latency      MIN/AVG/MAX     0\&.000683/0\&.004198/0\&.014730 sec out of 131
452
 Num Hot Keys:     3
453
     Count:7 Key:2f636c75737465726673
454
     Count:18 Key:2f636c757374657266732f64617461
455
     Count:7 Key:2f636c757374657266732f646174612f636c69656e7473
456
457
.fi
458
.if n \{\
459
.RE
460
.\}
461
.SS "DB Statistics"
462
.PP
463
Name of the database\&.
464
.SS "ro_delegations"
465
.PP
466
Number of readonly delegations created in the database\&.
467
.SS "ro_revokes"
468
.PP
469
Number of readonly delegations revoked\&. The difference in ro_delegations and ro_revokes indicates the currently active readonly delegations\&.
470
.SS "locks"
471
.PP
472
This section lists locking statistics\&.
473
.sp
474
.it 1 an-trap
475
.nr an-no-space-flag 1
476
.nr an-break-flag 1
477
.br
478
.ps +1
479
\fBtotal\fR
480
.RS 4
481
.PP
482
Number of completed lock calls\&. This includes database locks and record locks\&.
483
.RE
484
.sp
485
.it 1 an-trap
486
.nr an-no-space-flag 1
487
.nr an-break-flag 1
488
.br
489
.ps +1
490
\fBfailed\fR
491
.RS 4
492
.PP
493
Number of failed lock calls\&. This includes database locks and record locks\&.
494
.RE
495
.sp
496
.it 1 an-trap
497
.nr an-no-space-flag 1
498
.nr an-break-flag 1
499
.br
500
.ps +1
501
\fBcurrent\fR
502
.RS 4
503
.PP
504
Number of scheduled lock calls\&. This includes database locks and record locks\&.
505
.RE
506
.sp
507
.it 1 an-trap
508
.nr an-no-space-flag 1
509
.nr an-break-flag 1
510
.br
511
.ps +1
512
\fBpending\fR
513
.RS 4
514
.PP
515
Number of queued lock calls\&. This includes database locks and record locks\&.
516
.RE
517
.SS "hop_count_buckets"
518
.PP
519
Distribution of migration requests based on hop counts values\&. Buckets are 0, <\ \&2, <\ \&4, <\ \&8, <\ \&16, <\ \&32, <\ \&64, <\ \&128, <\ \&256, <\ \&512, <\ \&1024, <\ \&2048, <\ \&4096, <\ \&8192, <\ \&16384, ≥\ \&16384\&.
520
.SS "lock_buckets"
521
.PP
522
Distribution of record lock requests based on time required to obtain locks\&. Buckets are <\ \&1ms, <\ \&10ms, <\ \&100ms, <\ \&1s, <\ \&2s, <\ \&4s, <\ \&8s, <\ \&16s, <\ \&32s, <\ \&64s, ≥\ \&64s\&.
523
.SS "locks_latency"
524
.PP
525
The minimum, the average and the maximum time (in seconds) required to obtain record locks\&.
526
.SS "Num Hot Keys"
527
.PP
528
Number of contended records determined by hop count\&. CTDB keeps track of top 10 hot records and the output shows hex encoded keys for the hot records\&.
529
.SH "SEE ALSO"
530
.PP
531
\fBctdb\fR(1),
532
\fBctdbd\fR(1),
533
\fBctdb-tunables\fR(7),
534
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
535
.SH "AUTHOR"
536
.br
537
.PP
538
This documentation was written by Amitay Isaacs, Martin Schwenke
539
.SH "COPYRIGHT"
540
.br
541
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
542
.br
543
.PP
544
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\&.
545
.PP
546
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\&.
547
.PP
548
You should have received a copy of the GNU General Public License along with this program; if not, see
549
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
550
.sp
(-)b/net/samba415/files/man/ctdb-tunables.7 (+406 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb-tunables
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB\-TUNABLES" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb-tunables \- CTDB tunable configuration variables
32
.SH "DESCRIPTION"
33
.PP
34
CTDB\*(Aqs behaviour can be configured by setting run\-time tunable variables\&. This lists and describes all tunables\&. See the
35
\fBctdb\fR(1)
36
\fBlistvars\fR,
37
\fBsetvar\fR
38
and
39
\fBgetvar\fR
40
commands for more details\&.
41
.PP
42
Unless otherwise stated, tunables should be set to the same value on all nodes\&. Setting tunables to different values across nodes may produce unexpected results\&. Future releases may set (some or most) tunables globally across the cluster but doing so is currently a manual process\&.
43
.PP
44
Tunables can be set at startup from the
45
/usr/local/etc/ctdb/ctdb\&.tunables
46
configuration file\&.
47
.sp
48
.if n \{\
49
.RS 4
50
.\}
51
.nf
52
\fITUNABLE\fR=\fIVALUE\fR
53
54
.fi
55
.if n \{\
56
.RE
57
.\}
58
.PP
59
For example:
60
.sp
61
.if n \{\
62
.RS 4
63
.\}
64
.nf
65
MonitorInterval=20
66
67
.fi
68
.if n \{\
69
.RE
70
.\}
71
.PP
72
The available tunable variables are listed alphabetically below\&.
73
.SS "AllowClientDBAttach"
74
.PP
75
Default: 1
76
.PP
77
When set to 0, clients are not allowed to attach to any databases\&. This can be used to temporarily block any new processes from attaching to and accessing the databases\&. This is mainly used for detaching a volatile database using \*(Aqctdb detach\*(Aq\&.
78
.SS "AllowMixedVersions"
79
.PP
80
Default: 0
81
.PP
82
CTDB will not allow incompatible versions to co\-exist in a cluster\&. If a version mismatch is found, then losing CTDB will shutdown\&. To disable the incompatible version check, set this tunable to 1\&.
83
.PP
84
For version checking, CTDB uses major and minor version\&. For example, CTDB 4\&.6\&.1 and CTDB 4\&.6\&.2 are matching versions; CTDB 4\&.5\&.x and CTDB 4\&.6\&.y do not match\&.
85
.PP
86
CTDB with version check support will lose to CTDB without version check support\&. Between two different CTDB versions with version check support, one running for less time will lose\&. If the running time for both CTDB versions with version check support is equal (to seconds), then the older version will lose\&. The losing CTDB daemon will shutdown\&.
87
.SS "AllowUnhealthyDBRead"
88
.PP
89
Default: 0
90
.PP
91
When set to 1, ctdb allows database traverses to read unhealthy databases\&. By default, ctdb does not allow reading records from unhealthy databases\&.
92
.SS "ControlTimeout"
93
.PP
94
Default: 60
95
.PP
96
This is the default setting for timeout for when sending a control message to either the local or a remote ctdb daemon\&.
97
.SS "DatabaseHashSize"
98
.PP
99
Default: 100001
100
.PP
101
Number of the hash chains for the local store of the tdbs that ctdb manages\&.
102
.SS "DatabaseMaxDead"
103
.PP
104
Default: 5
105
.PP
106
Maximum number of dead records per hash chain for the tdb databses managed by ctdb\&.
107
.SS "DBRecordCountWarn"
108
.PP
109
Default: 100000
110
.PP
111
When set to non\-zero, ctdb will log a warning during recovery if a database has more than this many records\&. This will produce a warning if a database grows uncontrollably with orphaned records\&.
112
.SS "DBRecordSizeWarn"
113
.PP
114
Default: 10000000
115
.PP
116
When set to non\-zero, ctdb will log a warning during recovery if a single record is bigger than this size\&. This will produce a warning if a database record grows uncontrollably\&.
117
.SS "DBSizeWarn"
118
.PP
119
Default: 1000000000
120
.PP
121
When set to non\-zero, ctdb will log a warning during recovery if a database size is bigger than this\&. This will produce a warning if a database grows uncontrollably\&.
122
.SS "DeferredAttachTO"
123
.PP
124
Default: 120
125
.PP
126
When databases are frozen we do not allow clients to attach to the databases\&. Instead of returning an error immediately to the client, the attach request from the client is deferred until the database becomes available again at which stage we respond to the client\&.
127
.PP
128
This timeout controls how long we will defer the request from the client before timing it out and returning an error to the client\&.
129
.SS "ElectionTimeout"
130
.PP
131
Default: 3
132
.PP
133
The number of seconds to wait for the election of recovery master to complete\&. If the election is not completed during this interval, then that round of election fails and ctdb starts a new election\&.
134
.SS "EnableBans"
135
.PP
136
Default: 1
137
.PP
138
This parameter allows ctdb to ban a node if the node is misbehaving\&.
139
.PP
140
When set to 0, this disables banning completely in the cluster and thus nodes can not get banned, even it they break\&. Don\*(Aqt set to 0 unless you know what you are doing\&.
141
.SS "EventScriptTimeout"
142
.PP
143
Default: 30
144
.PP
145
Maximum time in seconds to allow an event to run before timing out\&. This is the total time for all enabled scripts that are run for an event, not just a single event script\&.
146
.PP
147
Note that timeouts are ignored for some events ("takeip", "releaseip", "startrecovery", "recovered") and converted to success\&. The logic here is that the callers of these events implement their own additional timeout\&.
148
.SS "FetchCollapse"
149
.PP
150
Default: 1
151
.PP
152
This parameter is used to avoid multiple migration requests for the same record from a single node\&. All the record requests for the same record are queued up and processed when the record is migrated to the current node\&.
153
.PP
154
When many clients across many nodes try to access the same record at the same time this can lead to a fetch storm where the record becomes very active and bounces between nodes very fast\&. This leads to high CPU utilization of the ctdbd daemon, trying to bounce that record around very fast, and poor performance\&. This can improve performance and reduce CPU utilization for certain workloads\&.
155
.SS "HopcountMakeSticky"
156
.PP
157
Default: 50
158
.PP
159
For database(s) marked STICKY (using \*(Aqctdb setdbsticky\*(Aq), any record that is migrating so fast that hopcount exceeds this limit is marked as STICKY record for
160
\fIStickyDuration\fR
161
seconds\&. This means that after each migration the sticky record will be kept on the node
162
\fIStickyPindown\fRmilliseconds and prevented from being migrated off the node\&.
163
.PP
164
This will improve performance for certain workloads, such as locking\&.tdb if many clients are opening/closing the same file concurrently\&.
165
.SS "IPAllocAlgorithm"
166
.PP
167
Default: 2
168
.PP
169
Selects the algorithm that CTDB should use when doing public IP address allocation\&. Meaningful values are:
170
.PP
171
0
172
.RS 4
173
Deterministic IP address allocation\&.
174
.sp
175
This is a simple and fast option\&. However, it can cause unnecessary address movement during fail\-over because each address has a "home" node\&. Works badly when some nodes do not have any addresses defined\&. Should be used with care when addresses are defined across multiple networks\&.
176
.RE
177
.PP
178
1
179
.RS 4
180
Non\-deterministic IP address allocation\&.
181
.sp
182
This is a relatively fast option that attempts to do a minimise unnecessary address movements\&. Addresses do not have a "home" node\&. Rebalancing is limited but it usually adequate\&. Works badly when addresses are defined across multiple networks\&.
183
.RE
184
.PP
185
2
186
.RS 4
187
LCP2 IP address allocation\&.
188
.sp
189
Uses a heuristic to assign addresses defined across multiple networks, usually balancing addresses on each network evenly across nodes\&. Addresses do not have a "home" node\&. Minimises unnecessary address movements\&. The algorithm is complex, so is slower than other choices for a large number of addresses\&. However, it can calculate an optimal assignment of 900 addresses in under 10 seconds on modern hardware\&.
190
.RE
191
.PP
192
If the specified value is not one of these then the default will be used\&.
193
.SS "KeepaliveInterval"
194
.PP
195
Default: 5
196
.PP
197
How often in seconds should the nodes send keep\-alive packets to each other\&.
198
.SS "KeepaliveLimit"
199
.PP
200
Default: 5
201
.PP
202
After how many keepalive intervals without any traffic should a node wait until marking the peer as DISCONNECTED\&.
203
.PP
204
If a node has hung, it can take
205
\fIKeepaliveInterval\fR
206
* (\fIKeepaliveLimit\fR
207
+ 1) seconds before ctdb determines that the node is DISCONNECTED and performs a recovery\&. This limit should not be set too high to enable early detection and avoid any application timeouts (e\&.g\&. SMB1) to kick in before the fail over is completed\&.
208
.SS "LockProcessesPerDB"
209
.PP
210
Default: 200
211
.PP
212
This is the maximum number of lock helper processes ctdb will create for obtaining record locks\&. When ctdb cannot get a record lock without blocking, it creates a helper process that waits for the lock to be obtained\&.
213
.SS "LogLatencyMs"
214
.PP
215
Default: 0
216
.PP
217
When set to non\-zero, ctdb will log if certains operations take longer than this value, in milliseconds, to complete\&. These operations include "process a record request from client", "take a record or database lock", "update a persistent database record" and "vacuum a database"\&.
218
.SS "MaxQueueDropMsg"
219
.PP
220
Default: 1000000
221
.PP
222
This is the maximum number of messages to be queued up for a client before ctdb will treat the client as hung and will terminate the client connection\&.
223
.SS "MonitorInterval"
224
.PP
225
Default: 15
226
.PP
227
How often should ctdb run the \*(Aqmonitor\*(Aq event in seconds to check for a node\*(Aqs health\&.
228
.SS "MonitorTimeoutCount"
229
.PP
230
Default: 20
231
.PP
232
How many \*(Aqmonitor\*(Aq events in a row need to timeout before a node is flagged as UNHEALTHY\&. This setting is useful if scripts can not be written so that they do not hang for benign reasons\&.
233
.SS "NoIPFailback"
234
.PP
235
Default: 0
236
.PP
237
When set to 1, ctdb will not perform failback of IP addresses when a node becomes healthy\&. When a node becomes UNHEALTHY, ctdb WILL perform failover of public IP addresses, but when the node becomes HEALTHY again, ctdb will not fail the addresses back\&.
238
.PP
239
Use with caution! Normally when a node becomes available to the cluster ctdb will try to reassign public IP addresses onto the new node as a way to distribute the workload evenly across the clusternode\&. Ctdb tries to make sure that all running nodes have approximately the same number of public addresses it hosts\&.
240
.PP
241
When you enable this tunable, ctdb will no longer attempt to rebalance the cluster by failing IP addresses back to the new nodes\&. An unbalanced cluster will therefore remain unbalanced until there is manual intervention from the administrator\&. When this parameter is set, you can manually fail public IP addresses over to the new node(s) using the \*(Aqctdb moveip\*(Aq command\&.
242
.SS "NoIPTakeover"
243
.PP
244
Default: 0
245
.PP
246
When set to 1, ctdb will not allow IP addresses to be failed over to other nodes\&. Any IP addresses already hosted on healthy nodes will remain\&. Any IP addresses hosted on unhealthy nodes will be released by unhealthy nodes and will become un\-hosted\&.
247
.SS "PullDBPreallocation"
248
.PP
249
Default: 10*1024*1024
250
.PP
251
This is the size of a record buffer to pre\-allocate for sending reply to PULLDB control\&. Usually record buffer starts with size of the first record and gets reallocated every time a new record is added to the record buffer\&. For a large number of records, this can be very inefficient to grow the record buffer one record at a time\&.
252
.SS "QueueBufferSize"
253
.PP
254
Default: 1024
255
.PP
256
This is the maximum amount of data (in bytes) ctdb will read from a socket at a time\&.
257
.PP
258
For a busy setup, if ctdb is not able to process the TCP sockets fast enough (large amount of data in Recv\-Q for tcp sockets), then this tunable value should be increased\&. However, large values can keep ctdb busy processing packets and prevent ctdb from handling other events\&.
259
.SS "RecBufferSizeLimit"
260
.PP
261
Default: 1000000
262
.PP
263
This is the limit on the size of the record buffer to be sent in various controls\&. This limit is used by new controls used for recovery and controls used in vacuuming\&.
264
.SS "RecdFailCount"
265
.PP
266
Default: 10
267
.PP
268
If the recovery daemon has failed to ping the main daemon for this many consecutive intervals, the main daemon will consider the recovery daemon as hung and will try to restart it to recover\&.
269
.SS "RecdPingTimeout"
270
.PP
271
Default: 60
272
.PP
273
If the main daemon has not heard a "ping" from the recovery daemon for this many seconds, the main daemon will log a message that the recovery daemon is potentially hung\&. This also increments a counter which is checked against
274
\fIRecdFailCount\fR
275
for detection of hung recovery daemon\&.
276
.SS "RecLockLatencyMs"
277
.PP
278
Default: 1000
279
.PP
280
When using a reclock file for split brain prevention, if set to non\-zero this tunable will make the recovery daemon log a message if the fcntl() call to lock/testlock the recovery file takes longer than this number of milliseconds\&.
281
.SS "RecoverInterval"
282
.PP
283
Default: 1
284
.PP
285
How frequently in seconds should the recovery daemon perform the consistency checks to determine if it should perform a recovery\&.
286
.SS "RecoverTimeout"
287
.PP
288
Default: 120
289
.PP
290
This is the default setting for timeouts for controls when sent from the recovery daemon\&. We allow longer control timeouts from the recovery daemon than from normal use since the recovery daemon often use controls that can take a lot longer than normal controls\&.
291
.SS "RecoveryBanPeriod"
292
.PP
293
Default: 300
294
.PP
295
The duration in seconds for which a node is banned if the node fails during recovery\&. After this time has elapsed the node will automatically get unbanned and will attempt to rejoin the cluster\&.
296
.PP
297
A node usually gets banned due to real problems with the node\&. Don\*(Aqt set this value too small\&. Otherwise, a problematic node will try to re\-join cluster too soon causing unnecessary recoveries\&.
298
.SS "RecoveryDropAllIPs"
299
.PP
300
Default: 120
301
.PP
302
If a node is stuck in recovery, or stopped, or banned, for this many seconds, then ctdb will release all public addresses on that node\&.
303
.SS "RecoveryGracePeriod"
304
.PP
305
Default: 120
306
.PP
307
During recoveries, if a node has not caused recovery failures during the last grace period in seconds, any records of transgressions that the node has caused recovery failures will be forgiven\&. This resets the ban\-counter back to zero for that node\&.
308
.SS "RepackLimit"
309
.PP
310
Default: 10000
311
.PP
312
During vacuuming, if the number of freelist records are more than
313
\fIRepackLimit\fR, then the database is repacked to get rid of the freelist records to avoid fragmentation\&.
314
.SS "RerecoveryTimeout"
315
.PP
316
Default: 10
317
.PP
318
Once a recovery has completed, no additional recoveries are permitted until this timeout in seconds has expired\&.
319
.SS "SeqnumInterval"
320
.PP
321
Default: 1000
322
.PP
323
Some databases have seqnum tracking enabled, so that samba will be able to detect asynchronously when there has been updates to the database\&. Every time a database is updated its sequence number is increased\&.
324
.PP
325
This tunable is used to specify in milliseconds how frequently ctdb will send out updates to remote nodes to inform them that the sequence number is increased\&.
326
.SS "StatHistoryInterval"
327
.PP
328
Default: 1
329
.PP
330
Granularity of the statistics collected in the statistics history\&. This is reported by \*(Aqctdb stats\*(Aq command\&.
331
.SS "StickyDuration"
332
.PP
333
Default: 600
334
.PP
335
Once a record has been marked STICKY, this is the duration in seconds, the record will be flagged as a STICKY record\&.
336
.SS "StickyPindown"
337
.PP
338
Default: 200
339
.PP
340
Once a STICKY record has been migrated onto a node, it will be pinned down on that node for this number of milliseconds\&. Any request from other nodes to migrate the record off the node will be deferred\&.
341
.SS "TakeoverTimeout"
342
.PP
343
Default: 9
344
.PP
345
This is the duration in seconds in which ctdb tries to complete IP failover\&.
346
.SS "TickleUpdateInterval"
347
.PP
348
Default: 20
349
.PP
350
Every
351
\fITickleUpdateInterval\fR
352
seconds, ctdb synchronizes the client connection information across nodes\&.
353
.SS "TraverseTimeout"
354
.PP
355
Default: 20
356
.PP
357
This is the duration in seconds for which a database traverse is allowed to run\&. If the traverse does not complete during this interval, ctdb will abort the traverse\&.
358
.SS "VacuumFastPathCount"
359
.PP
360
Default: 60
361
.PP
362
During a vacuuming run, ctdb usually processes only the records marked for deletion also called the fast path vacuuming\&. After finishing
363
\fIVacuumFastPathCount\fR
364
number of fast path vacuuming runs, ctdb will trigger a scan of complete database for any empty records that need to be deleted\&.
365
.SS "VacuumInterval"
366
.PP
367
Default: 10
368
.PP
369
Periodic interval in seconds when vacuuming is triggered for volatile databases\&.
370
.SS "VacuumMaxRunTime"
371
.PP
372
Default: 120
373
.PP
374
The maximum time in seconds for which the vacuuming process is allowed to run\&. If vacuuming process takes longer than this value, then the vacuuming process is terminated\&.
375
.SS "VerboseMemoryNames"
376
.PP
377
Default: 0
378
.PP
379
When set to non\-zero, ctdb assigns verbose names for some of the talloc allocated memory objects\&. These names are visible in the talloc memory report generated by \*(Aqctdb dumpmemory\*(Aq\&.
380
.SH "FILES>"
381
.RS 4
382
/usr/local/etc/ctdb/ctdb\&.tunables
383
.RE
384
.SH "SEE ALSO"
385
.PP
386
\fBctdb\fR(1),
387
\fBctdbd\fR(1),
388
\fBctdb.conf\fR(5),
389
\fBctdb\fR(7),
390
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
391
.SH "AUTHOR"
392
.br
393
.PP
394
This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke
395
.SH "COPYRIGHT"
396
.br
397
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
398
.br
399
.PP
400
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\&.
401
.PP
402
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\&.
403
.PP
404
You should have received a copy of the GNU General Public License along with this program; if not, see
405
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
406
.sp
(-)b/net/samba415/files/man/ctdb.1 (+1526 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb \- CTDB management utility
32
.SH "SYNOPSIS"
33
.HP \w'\fBctdb\fR\ 'u
34
\fBctdb\fR [\fIOPTION\fR...] {\fICOMMAND\fR} [\fICOMMAND\-ARGS\fR]
35
.SH "DESCRIPTION"
36
.PP
37
ctdb is a utility to view and manage a CTDB cluster\&.
38
.PP
39
The following terms are used when referring to nodes in a cluster:
40
.PP
41
PNN
42
.RS 4
43
Physical Node Number\&. The physical node number is an integer that describes the node in the cluster\&. The first node has physical node number 0\&. in a cluster\&.
44
.RE
45
.PP
46
PNN\-LIST
47
.RS 4
48
This is either a single PNN, a comma\-separate list of PNNs or "all"\&.
49
.RE
50
.PP
51
Commands that reference a database use the following terms:
52
.PP
53
DB
54
.RS 4
55
This is either a database name, such as
56
locking\&.tdb
57
or a database ID such as "0x42fe72c5"\&.
58
.RE
59
.PP
60
DB\-LIST
61
.RS 4
62
A space separated list of at least one
63
\fIDB\fR\&.
64
.RE
65
.SH "OPTIONS"
66
.PP
67
\-n \fIPNN\fR
68
.RS 4
69
The node specified by PNN should be queried for the requested information\&. Default is to query the daemon running on the local host\&.
70
.RE
71
.PP
72
\-Y
73
.RS 4
74
Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq:\*(Aq\&. Not all commands support this option\&.
75
.RE
76
.PP
77
\-x \fISEPARATOR\fR
78
.RS 4
79
Use SEPARATOR to delimit fields in machine readable output\&. This implies \-Y\&.
80
.RE
81
.PP
82
\-X
83
.RS 4
84
Produce output in machine readable form for easier parsing by scripts\&. This uses a field delimiter of \*(Aq|\*(Aq\&. Not all commands support this option\&.
85
.sp
86
This is equivalent to "\-x|" and avoids some shell quoting issues\&.
87
.RE
88
.PP
89
\-t \fITIMEOUT\fR
90
.RS 4
91
Indicates that ctdb should wait up to TIMEOUT seconds for a response to most commands sent to the CTDB daemon\&. The default is 10 seconds\&.
92
.RE
93
.PP
94
\-T \fITIMELIMIT\fR
95
.RS 4
96
Indicates that TIMELIMIT is the maximum run time (in seconds) for the ctdb command\&. When TIMELIMIT is exceeded the ctdb command will terminate with an error\&. The default is 120 seconds\&.
97
.RE
98
.PP
99
\-? \-\-help
100
.RS 4
101
Print some help text to the screen\&.
102
.RE
103
.PP
104
\-\-usage
105
.RS 4
106
Print usage information to the screen\&.
107
.RE
108
.PP
109
\-d \-\-debug=\fIDEBUGLEVEL\fR
110
.RS 4
111
Change the debug level for the command\&. Default is NOTICE\&.
112
.RE
113
.SH "ADMINISTRATIVE COMMANDS"
114
.PP
115
These are commands used to monitor and administer a CTDB cluster\&.
116
.SS "pnn"
117
.PP
118
This command displays the PNN of the current node\&.
119
.SS "status"
120
.PP
121
This command shows the current status of all CTDB nodes based on information from the queried node\&.
122
.PP
123
Note: If the queried node is INACTIVE then the status might not be current\&.
124
.sp
125
.it 1 an-trap
126
.nr an-no-space-flag 1
127
.nr an-break-flag 1
128
.br
129
.ps +1
130
\fBNode status\fR
131
.RS 4
132
.PP
133
This includes the number of physical nodes and the status of each node\&. See
134
\fBctdb\fR(7)
135
for information about node states\&.
136
.RE
137
.sp
138
.it 1 an-trap
139
.nr an-no-space-flag 1
140
.nr an-break-flag 1
141
.br
142
.ps +1
143
\fBGeneration\fR
144
.RS 4
145
.PP
146
The generation id is a number that indicates the current generation of a cluster instance\&. Each time a cluster goes through a reconfiguration or a recovery its generation id will be changed\&.
147
.PP
148
This number does not have any particular meaning other than to keep track of when a cluster has gone through a recovery\&. It is a random number that represents the current instance of a ctdb cluster and its databases\&. The CTDB daemon uses this number internally to be able to tell when commands to operate on the cluster and the databases was issued in a different generation of the cluster, to ensure that commands that operate on the databases will not survive across a cluster database recovery\&. After a recovery, all old outstanding commands will automatically become invalid\&.
149
.PP
150
Sometimes this number will be shown as "INVALID"\&. This only means that the ctdbd daemon has started but it has not yet merged with the cluster through a recovery\&. All nodes start with generation "INVALID" and are not assigned a real generation id until they have successfully been merged with a cluster through a recovery\&.
151
.RE
152
.sp
153
.it 1 an-trap
154
.nr an-no-space-flag 1
155
.nr an-break-flag 1
156
.br
157
.ps +1
158
\fBVirtual Node Number (VNN) map\fR
159
.RS 4
160
.PP
161
Consists of the number of virtual nodes and mapping from virtual node numbers to physical node numbers\&. Only nodes that are participating in the VNN map can become lmaster for database records\&.
162
.RE
163
.sp
164
.it 1 an-trap
165
.nr an-no-space-flag 1
166
.nr an-break-flag 1
167
.br
168
.ps +1
169
\fBRecovery mode\fR
170
.RS 4
171
.PP
172
This is the current recovery mode of the cluster\&. There are two possible modes:
173
.PP
174
NORMAL \- The cluster is fully operational\&.
175
.PP
176
RECOVERY \- The cluster databases have all been frozen, pausing all services while the cluster awaits a recovery process to complete\&. A recovery process should finish within seconds\&. If a cluster is stuck in the RECOVERY state this would indicate a cluster malfunction which needs to be investigated\&.
177
.PP
178
Once the recovery master detects an inconsistency, for example a node becomes disconnected/connected, the recovery daemon will trigger a cluster recovery process, where all databases are remerged across the cluster\&. When this process starts, the recovery master will first "freeze" all databases to prevent applications such as samba from accessing the databases and it will also mark the recovery mode as RECOVERY\&.
179
.PP
180
When the CTDB daemon starts up, it will start in RECOVERY mode\&. Once the node has been merged into a cluster and all databases have been recovered, the node mode will change into NORMAL mode and the databases will be "thawed", allowing samba to access the databases again\&.
181
.RE
182
.sp
183
.it 1 an-trap
184
.nr an-no-space-flag 1
185
.nr an-break-flag 1
186
.br
187
.ps +1
188
\fBRecovery master\fR
189
.RS 4
190
.PP
191
This is the cluster node that is currently designated as the recovery master\&. This node is responsible of monitoring the consistency of the cluster and to perform the actual recovery process when reqired\&.
192
.PP
193
Only one node at a time can be the designated recovery master\&. Which node is designated the recovery master is decided by an election process in the recovery daemons running on each node\&.
194
.RE
195
.sp
196
.it 1 an-trap
197
.nr an-no-space-flag 1
198
.nr an-break-flag 1
199
.br
200
.ps +1
201
\fBExample\fR
202
.RS 4
203
.sp
204
.if n \{\
205
.RS 4
206
.\}
207
.nf
208
# ctdb status
209
Number of nodes:4
210
pnn:0 192\&.168\&.2\&.200       OK (THIS NODE)
211
pnn:1 192\&.168\&.2\&.201       OK
212
pnn:2 192\&.168\&.2\&.202       OK
213
pnn:3 192\&.168\&.2\&.203       OK
214
Generation:1362079228
215
Size:4
216
hash:0 lmaster:0
217
hash:1 lmaster:1
218
hash:2 lmaster:2
219
hash:3 lmaster:3
220
Recovery mode:NORMAL (0)
221
Recovery master:0
222
223
.fi
224
.if n \{\
225
.RE
226
.\}
227
.RE
228
.SS "nodestatus [\fIPNN\-LIST\fR]"
229
.PP
230
This command is similar to the
231
\fBstatus\fR
232
command\&. It displays the "node status" subset of output\&. The main differences are:
233
.sp
234
.RS 4
235
.ie n \{\
236
\h'-04'\(bu\h'+03'\c
237
.\}
238
.el \{\
239
.sp -1
240
.IP \(bu 2.3
241
.\}
242
The exit code is the bitwise\-OR of the flags for each specified node, while
243
\fBctdb status\fR
244
exits with 0 if it was able to retrieve status for all nodes\&.
245
.RE
246
.sp
247
.RS 4
248
.ie n \{\
249
\h'-04'\(bu\h'+03'\c
250
.\}
251
.el \{\
252
.sp -1
253
.IP \(bu 2.3
254
.\}
255
\fBctdb status\fR
256
provides status information for all nodes\&.
257
\fBctdb nodestatus\fR
258
defaults to providing status for only the current node\&. If PNN\-LIST is provided then status is given for the indicated node(s)\&.
259
.RE
260
.PP
261
A common invocation in scripts is
262
\fBctdb nodestatus all\fR
263
to check whether all nodes in a cluster are healthy\&.
264
.sp
265
.it 1 an-trap
266
.nr an-no-space-flag 1
267
.nr an-break-flag 1
268
.br
269
.ps +1
270
\fBExample\fR
271
.RS 4
272
.sp
273
.if n \{\
274
.RS 4
275
.\}
276
.nf
277
# ctdb nodestatus
278
pnn:0 10\&.0\&.0\&.30        OK (THIS NODE)
279
280
# ctdb nodestatus all
281
Number of nodes:2
282
pnn:0 10\&.0\&.0\&.30        OK (THIS NODE)
283
pnn:1 10\&.0\&.0\&.31        OK
284
285
.fi
286
.if n \{\
287
.RE
288
.\}
289
.RE
290
.SS "recmaster"
291
.PP
292
This command shows the pnn of the node which is currently the recmaster\&.
293
.PP
294
Note: If the queried node is INACTIVE then the status might not be current\&.
295
.SS "uptime"
296
.PP
297
This command shows the uptime for the ctdb daemon\&. When the last recovery or ip\-failover completed and how long it took\&. If the "duration" is shown as a negative number, this indicates that there is a recovery/failover in progress and it started that many seconds ago\&.
298
.sp
299
.it 1 an-trap
300
.nr an-no-space-flag 1
301
.nr an-break-flag 1
302
.br
303
.ps +1
304
\fBExample\fR
305
.RS 4
306
.sp
307
.if n \{\
308
.RS 4
309
.\}
310
.nf
311
# ctdb uptime
312
Current time of node          :                Thu Oct 29 10:38:54 2009
313
Ctdbd start time              : (000 16:54:28) Wed Oct 28 17:44:26 2009
314
Time of last recovery/failover: (000 16:53:31) Wed Oct 28 17:45:23 2009
315
Duration of last recovery/failover: 2\&.248552 seconds
316
317
.fi
318
.if n \{\
319
.RE
320
.\}
321
.RE
322
.SS "listnodes"
323
.PP
324
This command shows lists the ip addresses of all the nodes in the cluster\&.
325
.sp
326
.it 1 an-trap
327
.nr an-no-space-flag 1
328
.nr an-break-flag 1
329
.br
330
.ps +1
331
\fBExample\fR
332
.RS 4
333
.sp
334
.if n \{\
335
.RS 4
336
.\}
337
.nf
338
# ctdb listnodes
339
192\&.168\&.2\&.200
340
192\&.168\&.2\&.201
341
192\&.168\&.2\&.202
342
192\&.168\&.2\&.203
343
344
.fi
345
.if n \{\
346
.RE
347
.\}
348
.RE
349
.SS "natgw {master|list|status}"
350
.PP
351
This command shows different aspects of NAT gateway status\&. For an overview of CTDB\*(Aqs NAT gateway functionality please see the
352
NAT GATEWAY
353
section in
354
\fBctdb\fR(7)\&.
355
.PP
356
master
357
.RS 4
358
Show the PNN and private IP address of the current NAT gateway master node\&.
359
.sp
360
Example output:
361
.sp
362
.if n \{\
363
.RS 4
364
.\}
365
.nf
366
1 192\&.168\&.2\&.201
367
368
.fi
369
.if n \{\
370
.RE
371
.\}
372
.RE
373
.PP
374
list
375
.RS 4
376
List the private IP addresses of nodes in the current NAT gateway group, annotating the master node\&.
377
.sp
378
Example output:
379
.sp
380
.if n \{\
381
.RS 4
382
.\}
383
.nf
384
192\&.168\&.2\&.200
385
192\&.168\&.2\&.201	MASTER
386
192\&.168\&.2\&.202
387
192\&.168\&.2\&.203
388
389
.fi
390
.if n \{\
391
.RE
392
.\}
393
.RE
394
.PP
395
status
396
.RS 4
397
List the nodes in the current NAT gateway group and their status\&.
398
.sp
399
Example output:
400
.sp
401
.if n \{\
402
.RS 4
403
.\}
404
.nf
405
pnn:0 192\&.168\&.2\&.200       UNHEALTHY (THIS NODE)
406
pnn:1 192\&.168\&.2\&.201       OK
407
pnn:2 192\&.168\&.2\&.202       OK
408
pnn:3 192\&.168\&.2\&.203       OK
409
410
.fi
411
.if n \{\
412
.RE
413
.\}
414
.RE
415
.SS "ping"
416
.PP
417
This command will "ping" specified CTDB nodes in the cluster to verify that they are running\&.
418
.sp
419
.it 1 an-trap
420
.nr an-no-space-flag 1
421
.nr an-break-flag 1
422
.br
423
.ps +1
424
\fBExample\fR
425
.RS 4
426
.sp
427
.if n \{\
428
.RS 4
429
.\}
430
.nf
431
# ctdb ping
432
response from 0 time=0\&.000054 sec  (3 clients)
433
434
.fi
435
.if n \{\
436
.RE
437
.\}
438
.RE
439
.SS "ifaces"
440
.PP
441
This command will display the list of network interfaces, which could host public addresses, along with their status\&.
442
.sp
443
.it 1 an-trap
444
.nr an-no-space-flag 1
445
.nr an-break-flag 1
446
.br
447
.ps +1
448
\fBExample\fR
449
.RS 4
450
.sp
451
.if n \{\
452
.RS 4
453
.\}
454
.nf
455
# ctdb ifaces
456
Interfaces on node 0
457
name:eth5 link:up references:2
458
name:eth4 link:down references:0
459
name:eth3 link:up references:1
460
name:eth2 link:up references:1
461
462
# ctdb \-X ifaces
463
|Name|LinkStatus|References|
464
|eth5|1|2|
465
|eth4|0|0|
466
|eth3|1|1|
467
|eth2|1|1|
468
469
.fi
470
.if n \{\
471
.RE
472
.\}
473
.RE
474
.SS "ip"
475
.PP
476
This command will display the list of public addresses that are provided by the cluster and which physical node is currently serving this ip\&. By default this command will ONLY show those public addresses that are known to the node itself\&. To see the full list of all public ips across the cluster you must use "ctdb ip all"\&.
477
.sp
478
.it 1 an-trap
479
.nr an-no-space-flag 1
480
.nr an-break-flag 1
481
.br
482
.ps +1
483
\fBExample\fR
484
.RS 4
485
.sp
486
.if n \{\
487
.RS 4
488
.\}
489
.nf
490
# ctdb ip \-v
491
Public IPs on node 0
492
172\&.31\&.91\&.82 node[1] active[] available[eth2,eth3] configured[eth2,eth3]
493
172\&.31\&.91\&.83 node[0] active[eth3] available[eth2,eth3] configured[eth2,eth3]
494
172\&.31\&.91\&.84 node[1] active[] available[eth2,eth3] configured[eth2,eth3]
495
172\&.31\&.91\&.85 node[0] active[eth2] available[eth2,eth3] configured[eth2,eth3]
496
172\&.31\&.92\&.82 node[1] active[] available[eth5] configured[eth4,eth5]
497
172\&.31\&.92\&.83 node[0] active[eth5] available[eth5] configured[eth4,eth5]
498
172\&.31\&.92\&.84 node[1] active[] available[eth5] configured[eth4,eth5]
499
172\&.31\&.92\&.85 node[0] active[eth5] available[eth5] configured[eth4,eth5]
500
501
# ctdb \-X ip \-v
502
|Public IP|Node|ActiveInterface|AvailableInterfaces|ConfiguredInterfaces|
503
|172\&.31\&.91\&.82|1||eth2,eth3|eth2,eth3|
504
|172\&.31\&.91\&.83|0|eth3|eth2,eth3|eth2,eth3|
505
|172\&.31\&.91\&.84|1||eth2,eth3|eth2,eth3|
506
|172\&.31\&.91\&.85|0|eth2|eth2,eth3|eth2,eth3|
507
|172\&.31\&.92\&.82|1||eth5|eth4,eth5|
508
|172\&.31\&.92\&.83|0|eth5|eth5|eth4,eth5|
509
|172\&.31\&.92\&.84|1||eth5|eth4,eth5|
510
|172\&.31\&.92\&.85|0|eth5|eth5|eth4,eth5|
511
512
.fi
513
.if n \{\
514
.RE
515
.\}
516
.RE
517
.SS "ipinfo \fIIP\fR"
518
.PP
519
This command will display details about the specified public addresses\&.
520
.sp
521
.it 1 an-trap
522
.nr an-no-space-flag 1
523
.nr an-break-flag 1
524
.br
525
.ps +1
526
\fBExample\fR
527
.RS 4
528
.sp
529
.if n \{\
530
.RS 4
531
.\}
532
.nf
533
# ctdb ipinfo 172\&.31\&.92\&.85
534
Public IP[172\&.31\&.92\&.85] info on node 0
535
IP:172\&.31\&.92\&.85
536
CurrentNode:0
537
NumInterfaces:2
538
Interface[1]: Name:eth4 Link:down References:0
539
Interface[2]: Name:eth5 Link:up References:2 (active)
540
541
.fi
542
.if n \{\
543
.RE
544
.\}
545
.RE
546
.SS "event run|status|script list|script enable|script disable"
547
.PP
548
This command is used to control event daemon and to inspect status of various events\&.
549
.PP
550
The commands below require a component to be specified\&. In the current version the only valid component is
551
legacy\&.
552
.PP
553
run \fITIMEOUT\fR \fICOMPONENT\fR \fIEVENT\fR [\fIARGUMENTS\fR]
554
.RS 4
555
This command can be used to manually run specified EVENT in COMPONENT with optional ARGUMENTS\&. The event will be allowed to run a maximum of TIMEOUT seconds\&. If TIMEOUT is 0, then there is no time limit for running the event\&.
556
.RE
557
.PP
558
status \fICOMPONENT\fR \fIEVENT\fR
559
.RS 4
560
This command displays the last execution status of the specified EVENT in COMPONENT\&.
561
.sp
562
The command will terminate with the exit status corresponding to the overall status of event that is displayed\&.
563
.sp
564
The output is the list of event scripts executed\&. Each line shows the name, status, duration and start time for each script\&.
565
.sp
566
Example output:
567
.sp
568
.if n \{\
569
.RS 4
570
.\}
571
.nf
572
00\&.ctdb              OK         0\&.014 Sat Dec 17 19:39:11 2016
573
01\&.reclock           OK         0\&.013 Sat Dec 17 19:39:11 2016
574
05\&.system            OK         0\&.029 Sat Dec 17 19:39:11 2016
575
06\&.nfs               OK         0\&.014 Sat Dec 17 19:39:11 2016
576
10\&.interface         OK         0\&.037 Sat Dec 17 19:39:11 2016
577
11\&.natgw             OK         0\&.011 Sat Dec 17 19:39:11 2016
578
11\&.routing           OK         0\&.007 Sat Dec 17 19:39:11 2016
579
13\&.per_ip_routing    OK         0\&.007 Sat Dec 17 19:39:11 2016
580
20\&.multipathd        OK         0\&.007 Sat Dec 17 19:39:11 2016
581
31\&.clamd             OK         0\&.007 Sat Dec 17 19:39:11 2016
582
40\&.vsftpd            OK         0\&.013 Sat Dec 17 19:39:11 2016
583
41\&.httpd             OK         0\&.018 Sat Dec 17 19:39:11 2016
584
49\&.winbind           OK         0\&.023 Sat Dec 17 19:39:11 2016
585
50\&.samba             OK         0\&.100 Sat Dec 17 19:39:12 2016
586
60\&.nfs               OK         0\&.376 Sat Dec 17 19:39:12 2016
587
70\&.iscsi             OK         0\&.009 Sat Dec 17 19:39:12 2016
588
91\&.lvs               OK         0\&.007 Sat Dec 17 19:39:12 2016
589
590
.fi
591
.if n \{\
592
.RE
593
.\}
594
.RE
595
.PP
596
script list \fICOMPONENT\fR
597
.RS 4
598
List the available event scripts in COMPONENT\&. Enabled scripts are flagged with a \*(Aq*\*(Aq\&.
599
.sp
600
Generally, event scripts are provided by CTDB\&. However, local or 3rd party event scripts may also be available\&. These are shown in a separate section after those provided by CTDB\&.
601
.sp
602
Example output:
603
.sp
604
.if n \{\
605
.RS 4
606
.\}
607
.nf
608
* 00\&.ctdb
609
* 01\&.reclock
610
* 05\&.system
611
* 06\&.nfs
612
* 10\&.interface
613
  11\&.natgw
614
  11\&.routing
615
  13\&.per_ip_routing
616
  20\&.multipathd
617
  31\&.clamd
618
  40\&.vsftpd
619
  41\&.httpd
620
* 49\&.winbind
621
* 50\&.samba
622
* 60\&.nfs
623
  70\&.iscsi
624
  91\&.lvs
625
626
* 02\&.local
627
628
.fi
629
.if n \{\
630
.RE
631
.\}
632
.RE
633
.PP
634
script enable \fICOMPONENT\fR \fISCRIPT\fR
635
.RS 4
636
Enable the specified event SCRIPT in COMPONENT\&. Only enabled scripts will be executed when running any event\&.
637
.RE
638
.PP
639
script disable \fICOMPONENT\fR \fISCRIPT\fR
640
.RS 4
641
Disable the specified event SCRIPT in COMPONENT\&. This will prevent the script from executing when running any event\&.
642
.RE
643
.SS "scriptstatus"
644
.PP
645
This command displays which event scripts where run in the previous monitoring cycle and the result of each script\&. If a script failed with an error, causing the node to become unhealthy, the output from that script is also shown\&.
646
.PP
647
This command is deprecated\&. It\*(Aqs provided for backward compatibility\&. In place of
648
\fBctdb scriptstatus\fR, use
649
\fBctdb event status\fR\&.
650
.sp
651
.it 1 an-trap
652
.nr an-no-space-flag 1
653
.nr an-break-flag 1
654
.br
655
.ps +1
656
\fBExample\fR
657
.RS 4
658
.sp
659
.if n \{\
660
.RS 4
661
.\}
662
.nf
663
# ctdb scriptstatus
664
00\&.ctdb              OK         0\&.011 Sat Dec 17 19:40:46 2016
665
01\&.reclock           OK         0\&.010 Sat Dec 17 19:40:46 2016
666
05\&.system            OK         0\&.030 Sat Dec 17 19:40:46 2016
667
06\&.nfs               OK         0\&.014 Sat Dec 17 19:40:46 2016
668
10\&.interface         OK         0\&.041 Sat Dec 17 19:40:46 2016
669
11\&.natgw             OK         0\&.008 Sat Dec 17 19:40:46 2016
670
11\&.routing           OK         0\&.007 Sat Dec 17 19:40:46 2016
671
13\&.per_ip_routing    OK         0\&.007 Sat Dec 17 19:40:46 2016
672
20\&.multipathd        OK         0\&.007 Sat Dec 17 19:40:46 2016
673
31\&.clamd             OK         0\&.007 Sat Dec 17 19:40:46 2016
674
40\&.vsftpd            OK         0\&.013 Sat Dec 17 19:40:46 2016
675
41\&.httpd             OK         0\&.015 Sat Dec 17 19:40:46 2016
676
49\&.winbind           OK         0\&.022 Sat Dec 17 19:40:46 2016
677
50\&.samba             ERROR      0\&.077 Sat Dec 17 19:40:46 2016
678
  OUTPUT: ERROR: samba tcp port 445 is not responding
679
680
.fi
681
.if n \{\
682
.RE
683
.\}
684
.RE
685
.SS "listvars"
686
.PP
687
List all tuneable variables, except the values of the obsolete tunables like VacuumMinInterval\&. The obsolete tunables can be retrieved only explicitly with the "ctdb getvar" command\&.
688
.sp
689
.it 1 an-trap
690
.nr an-no-space-flag 1
691
.nr an-break-flag 1
692
.br
693
.ps +1
694
\fBExample\fR
695
.RS 4
696
.sp
697
.if n \{\
698
.RS 4
699
.\}
700
.nf
701
# ctdb listvars
702
SeqnumInterval          = 1000
703
ControlTimeout          = 60
704
TraverseTimeout         = 20
705
KeepaliveInterval       = 5
706
KeepaliveLimit          = 5
707
RecoverTimeout          = 120
708
RecoverInterval         = 1
709
ElectionTimeout         = 3
710
TakeoverTimeout         = 9
711
MonitorInterval         = 15
712
TickleUpdateInterval    = 20
713
EventScriptTimeout      = 30
714
MonitorTimeoutCount     = 20
715
RecoveryGracePeriod     = 120
716
RecoveryBanPeriod       = 300
717
DatabaseHashSize        = 100001
718
DatabaseMaxDead         = 5
719
RerecoveryTimeout       = 10
720
EnableBans              = 1
721
NoIPFailback            = 0
722
VerboseMemoryNames      = 0
723
RecdPingTimeout         = 60
724
RecdFailCount           = 10
725
LogLatencyMs            = 0
726
RecLockLatencyMs        = 1000
727
RecoveryDropAllIPs      = 120
728
VacuumInterval          = 10
729
VacuumMaxRunTime        = 120
730
RepackLimit             = 10000
731
VacuumFastPathCount     = 60
732
MaxQueueDropMsg         = 1000000
733
AllowUnhealthyDBRead    = 0
734
StatHistoryInterval     = 1
735
DeferredAttachTO        = 120
736
AllowClientDBAttach     = 1
737
RecoverPDBBySeqNum      = 1
738
DeferredRebalanceOnNodeAdd = 300
739
FetchCollapse           = 1
740
HopcountMakeSticky      = 50
741
StickyDuration          = 600
742
StickyPindown           = 200
743
NoIPTakeover            = 0
744
DBRecordCountWarn       = 100000
745
DBRecordSizeWarn        = 10000000
746
DBSizeWarn              = 100000000
747
PullDBPreallocation     = 10485760
748
LockProcessesPerDB      = 200
749
RecBufferSizeLimit      = 1000000
750
QueueBufferSize         = 1024
751
IPAllocAlgorithm        = 2
752
753
.fi
754
.if n \{\
755
.RE
756
.\}
757
.RE
758
.SS "getvar \fINAME\fR"
759
.PP
760
Get the runtime value of a tuneable variable\&.
761
.sp
762
.it 1 an-trap
763
.nr an-no-space-flag 1
764
.nr an-break-flag 1
765
.br
766
.ps +1
767
\fBExample\fR
768
.RS 4
769
.sp
770
.if n \{\
771
.RS 4
772
.\}
773
.nf
774
# ctdb getvar MonitorInterval
775
MonitorInterval         = 15
776
777
.fi
778
.if n \{\
779
.RE
780
.\}
781
.RE
782
.SS "setvar \fINAME\fR \fIVALUE\fR"
783
.PP
784
Set the runtime value of a tuneable variable\&.
785
.sp
786
.it 1 an-trap
787
.nr an-no-space-flag 1
788
.nr an-break-flag 1
789
.br
790
.ps +1
791
\fBExample\fR
792
.RS 4
793
.sp
794
.if n \{\
795
.RS 4
796
.\}
797
.nf
798
# ctdb setvar MonitorInterval 20
799
800
.fi
801
.if n \{\
802
.RE
803
.\}
804
.RE
805
.SS "lvs {master|list|status}"
806
.PP
807
This command shows different aspects of LVS status\&. For an overview of CTDB\*(Aqs LVS functionality please see the
808
LVS
809
section in
810
\fBctdb\fR(7)\&.
811
.PP
812
master
813
.RS 4
814
Shows the PNN of the current LVS master node\&.
815
.sp
816
Example output:
817
.sp
818
.if n \{\
819
.RS 4
820
.\}
821
.nf
822
2
823
824
.fi
825
.if n \{\
826
.RE
827
.\}
828
.RE
829
.PP
830
list
831
.RS 4
832
Lists the currently usable LVS nodes\&.
833
.sp
834
Example output:
835
.sp
836
.if n \{\
837
.RS 4
838
.\}
839
.nf
840
2 10\&.0\&.0\&.13
841
3 10\&.0\&.0\&.14
842
843
.fi
844
.if n \{\
845
.RE
846
.\}
847
.RE
848
.PP
849
status
850
.RS 4
851
List the nodes in the current LVS group and their status\&.
852
.sp
853
Example output:
854
.sp
855
.if n \{\
856
.RS 4
857
.\}
858
.nf
859
pnn:0 10\&.0\&.0\&.11        UNHEALTHY (THIS NODE)
860
pnn:1 10\&.0\&.0\&.12        UNHEALTHY
861
pnn:2 10\&.0\&.0\&.13        OK
862
pnn:3 10\&.0\&.0\&.14        OK
863
864
.fi
865
.if n \{\
866
.RE
867
.\}
868
.RE
869
.SS "getcapabilities"
870
.PP
871
This command shows the capabilities of the current node\&. See the
872
CAPABILITIES
873
section in
874
\fBctdb\fR(7)
875
for more details\&.
876
.PP
877
Example output:
878
.sp
879
.if n \{\
880
.RS 4
881
.\}
882
.nf
883
RECMASTER: YES
884
LMASTER: YES
885
886
.fi
887
.if n \{\
888
.RE
889
.\}
890
.SS "statistics"
891
.PP
892
Collect statistics from the CTDB daemon about how many calls it has served\&. Information about various fields in statistics can be found in
893
\fBctdb-statistics\fR(7)\&.
894
.sp
895
.it 1 an-trap
896
.nr an-no-space-flag 1
897
.nr an-break-flag 1
898
.br
899
.ps +1
900
\fBExample\fR
901
.RS 4
902
.sp
903
.if n \{\
904
.RS 4
905
.\}
906
.nf
907
# ctdb statistics
908
CTDB version 1
909
Current time of statistics  :                Tue Mar  8 15:18:51 2016
910
Statistics collected since  : (003 21:31:32) Fri Mar  4 17:47:19 2016
911
 num_clients                        9
912
 frozen                             0
913
 recovering                         0
914
 num_recoveries                     2
915
 client_packets_sent          8170534
916
 client_packets_recv          7166132
917
 node_packets_sent           16549998
918
 node_packets_recv            5244418
919
 keepalive_packets_sent        201969
920
 keepalive_packets_recv        201969
921
 node
922
     req_call                      26
923
     reply_call                     0
924
     req_dmaster                    9
925
     reply_dmaster                 12
926
     reply_error                    0
927
     req_message              1339231
928
     req_control              8177506
929
     reply_control            6831284
930
 client
931
     req_call                      15
932
     req_message               334809
933
     req_control              6831308
934
 timeouts
935
     call                           0
936
     control                        0
937
     traverse                       0
938
 locks
939
     num_calls                      8
940
     num_current                    0
941
     num_pending                    0
942
     num_failed                     0
943
 total_calls                       15
944
 pending_calls                      0
945
 childwrite_calls                   0
946
 pending_childwrite_calls             0
947
 memory_used                   394879
948
 max_hop_count                      1
949
 total_ro_delegations               0
950
 total_ro_revokes                   0
951
 hop_count_buckets: 8 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0
952
 lock_buckets: 0 0 8 0 0 0 0 0 0 0 0 0 0 0 0 0
953
 locks_latency      MIN/AVG/MAX     0\&.010005/0\&.010418/0\&.011010 sec out of 8
954
 reclock_ctdbd      MIN/AVG/MAX     0\&.002538/0\&.002538/0\&.002538 sec out of 1
955
 reclock_recd       MIN/AVG/MAX     0\&.000000/0\&.000000/0\&.000000 sec out of 0
956
 call_latency       MIN/AVG/MAX     0\&.000044/0\&.002142/0\&.011702 sec out of 15
957
 childwrite_latency MIN/AVG/MAX     0\&.000000/0\&.000000/0\&.000000 sec out of 0
958
959
.fi
960
.if n \{\
961
.RE
962
.\}
963
.RE
964
.SS "statisticsreset"
965
.PP
966
This command is used to clear all statistics counters in a node\&.
967
.PP
968
Example: ctdb statisticsreset
969
.SS "dbstatistics \fIDB\fR"
970
.PP
971
Display statistics about the database DB\&. Information about various fields in dbstatistics can be found in
972
\fBctdb-statistics\fR(7)\&.
973
.sp
974
.it 1 an-trap
975
.nr an-no-space-flag 1
976
.nr an-break-flag 1
977
.br
978
.ps +1
979
\fBExample\fR
980
.RS 4
981
.sp
982
.if n \{\
983
.RS 4
984
.\}
985
.nf
986
# ctdb dbstatistics locking\&.tdb
987
DB Statistics: locking\&.tdb
988
 ro_delegations                     0
989
 ro_revokes                         0
990
 locks
991
     total                      14356
992
     failed                         0
993
     current                        0
994
     pending                        0
995
 hop_count_buckets: 28087 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0
996
 lock_buckets: 0 14188 38 76 32 19 3 0 0 0 0 0 0 0 0 0
997
 locks_latency      MIN/AVG/MAX     0\&.001066/0\&.012686/4\&.202292 sec out of 14356
998
 vacuum_latency     MIN/AVG/MAX     0\&.000472/0\&.002207/15\&.243570 sec out of 224530
999
 Num Hot Keys:     1
1000
     Count:8 Key:ff5bd7cb3ee3822edc1f0000000000000000000000000000
1001
1002
.fi
1003
.if n \{\
1004
.RE
1005
.\}
1006
.RE
1007
.SS "getreclock"
1008
.PP
1009
Show details of the recovery lock, if any\&.
1010
.PP
1011
Example output:
1012
.sp
1013
.if n \{\
1014
.RS 4
1015
.\}
1016
.nf
1017
	/clusterfs/\&.ctdb/recovery\&.lock
1018
1019
.fi
1020
.if n \{\
1021
.RE
1022
.\}
1023
.SS "getdebug"
1024
.PP
1025
Get the current debug level for the node\&. the debug level controls what information is written to the log file\&.
1026
.PP
1027
The debug levels are mapped to the corresponding syslog levels\&. When a debug level is set, only those messages at that level and higher levels will be printed\&.
1028
.PP
1029
The list of debug levels from highest to lowest are :
1030
.PP
1031
ERROR WARNING NOTICE INFO DEBUG
1032
.SS "setdebug \fIDEBUGLEVEL\fR"
1033
.PP
1034
Set the debug level of a node\&. This controls what information will be logged\&.
1035
.PP
1036
The debuglevel is one of ERROR WARNING NOTICE INFO DEBUG
1037
.SS "getpid"
1038
.PP
1039
This command will return the process id of the ctdb daemon\&.
1040
.SS "disable"
1041
.PP
1042
This command is used to administratively disable a node in the cluster\&. A disabled node will still participate in the cluster and host clustered TDB records but its public ip address has been taken over by a different node and it no longer hosts any services\&.
1043
.SS "enable"
1044
.PP
1045
Re\-enable a node that has been administratively disabled\&.
1046
.SS "stop"
1047
.PP
1048
This command is used to administratively STOP a node in the cluster\&. A STOPPED node is connected to the cluster but will not host any public ip addresse, nor does it participate in the VNNMAP\&. The difference between a DISABLED node and a STOPPED node is that a STOPPED node does not host any parts of the database which means that a recovery is required to stop/continue nodes\&.
1049
.SS "continue"
1050
.PP
1051
Re\-start a node that has been administratively stopped\&.
1052
.SS "addip \fIIPADDR\fR/\fImask\fR \fIIFACE\fR"
1053
.PP
1054
This command is used to add a new public ip to a node during runtime\&. It should be followed by a
1055
\fBctdb ipreallocate\fR\&. This allows public addresses to be added to a cluster without having to restart the ctdb daemons\&.
1056
.PP
1057
Note that this only updates the runtime instance of ctdb\&. Any changes will be lost next time ctdb is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&.
1058
.SS "delip \fIIPADDR\fR"
1059
.PP
1060
This command flags IPADDR for deletion from a node at runtime\&. It should be followed by a
1061
\fBctdb ipreallocate\fR\&. If IPADDR is currently hosted by the node it is being removed from, this ensures that the IP will first be failed over to another node, if possible, and that it is then actually removed\&.
1062
.PP
1063
Note that this only updates the runtime instance of CTDB\&. Any changes will be lost next time CTDB is restarted and the public addresses file is re\-read\&. If you want this change to be permanent you must also update the public addresses file manually\&.
1064
.SS "moveip \fIIPADDR\fR \fIPNN\fR"
1065
.PP
1066
This command can be used to manually fail a public ip address to a specific node\&.
1067
.PP
1068
In order to manually override the "automatic" distribution of public ip addresses that ctdb normally provides, this command only works when you have changed the tunables for the daemon to:
1069
.PP
1070
IPAllocAlgorithm != 0
1071
.PP
1072
NoIPFailback = 1
1073
.SS "shutdown"
1074
.PP
1075
This command will shutdown a specific CTDB daemon\&.
1076
.SS "setlmasterrole on|off"
1077
.PP
1078
This command is used to enable/disable the LMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an LMASTER for records in the database\&. A node that does not have the LMASTER capability will not show up in the vnnmap\&.
1079
.PP
1080
Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&.
1081
.PP
1082
Once this setting has been enabled/disabled, you need to perform a recovery for it to take effect\&.
1083
.PP
1084
See also "ctdb getcapabilities"
1085
.SS "setrecmasterrole on|off"
1086
.PP
1087
This command is used to enable/disable the RECMASTER capability for a node at runtime\&. This capability determines whether or not a node can be used as an RECMASTER for the cluster\&. A node that does not have the RECMASTER capability can not win a recmaster election\&. A node that already is the recmaster for the cluster when the capability is stripped off the node will remain the recmaster until the next cluster election\&.
1088
.PP
1089
Nodes will by default have this capability, but it can be stripped off nodes by the setting in the sysconfig file or by using this command\&.
1090
.PP
1091
See also "ctdb getcapabilities"
1092
.SS "reloadnodes"
1093
.PP
1094
This command is used when adding new nodes, or removing existing nodes from an existing cluster\&.
1095
.PP
1096
Procedure to add nodes:
1097
.sp
1098
.RS 4
1099
.ie n \{\
1100
\h'-04' 1.\h'+01'\c
1101
.\}
1102
.el \{\
1103
.sp -1
1104
.IP "  1." 4.2
1105
.\}
1106
To expand an existing cluster, first ensure with
1107
\fBctdb status\fR
1108
that all nodes are up and running and that they are all healthy\&. Do not try to expand a cluster unless it is completely healthy!
1109
.RE
1110
.sp
1111
.RS 4
1112
.ie n \{\
1113
\h'-04' 2.\h'+01'\c
1114
.\}
1115
.el \{\
1116
.sp -1
1117
.IP "  2." 4.2
1118
.\}
1119
On all nodes, edit
1120
/usr/local/etc/ctdb/nodes
1121
and
1122
\fIadd the new nodes at the end of this file\fR\&.
1123
.RE
1124
.sp
1125
.RS 4
1126
.ie n \{\
1127
\h'-04' 3.\h'+01'\c
1128
.\}
1129
.el \{\
1130
.sp -1
1131
.IP "  3." 4.2
1132
.\}
1133
Verify that all the nodes have identical
1134
/usr/local/etc/ctdb/nodes
1135
files after adding the new nodes\&.
1136
.RE
1137
.sp
1138
.RS 4
1139
.ie n \{\
1140
\h'-04' 4.\h'+01'\c
1141
.\}
1142
.el \{\
1143
.sp -1
1144
.IP "  4." 4.2
1145
.\}
1146
Run
1147
\fBctdb reloadnodes\fR
1148
to force all nodes to reload the nodes file\&.
1149
.RE
1150
.sp
1151
.RS 4
1152
.ie n \{\
1153
\h'-04' 5.\h'+01'\c
1154
.\}
1155
.el \{\
1156
.sp -1
1157
.IP "  5." 4.2
1158
.\}
1159
Use
1160
\fBctdb status\fR
1161
on all nodes and verify that they now show the additional nodes\&.
1162
.RE
1163
.sp
1164
.RS 4
1165
.ie n \{\
1166
\h'-04' 6.\h'+01'\c
1167
.\}
1168
.el \{\
1169
.sp -1
1170
.IP "  6." 4.2
1171
.\}
1172
Install and configure the new node and bring it online\&.
1173
.RE
1174
.PP
1175
Procedure to remove nodes:
1176
.sp
1177
.RS 4
1178
.ie n \{\
1179
\h'-04' 1.\h'+01'\c
1180
.\}
1181
.el \{\
1182
.sp -1
1183
.IP "  1." 4.2
1184
.\}
1185
To remove nodes from an existing cluster, first ensure with
1186
\fBctdb status\fR
1187
that all nodes, except the node to be deleted, are up and running and that they are all healthy\&. Do not try to remove nodes from a cluster unless the cluster is completely healthy!
1188
.RE
1189
.sp
1190
.RS 4
1191
.ie n \{\
1192
\h'-04' 2.\h'+01'\c
1193
.\}
1194
.el \{\
1195
.sp -1
1196
.IP "  2." 4.2
1197
.\}
1198
Shutdown and power off the node to be removed\&.
1199
.RE
1200
.sp
1201
.RS 4
1202
.ie n \{\
1203
\h'-04' 3.\h'+01'\c
1204
.\}
1205
.el \{\
1206
.sp -1
1207
.IP "  3." 4.2
1208
.\}
1209
On all other nodes, edit the
1210
/usr/local/etc/ctdb/nodes
1211
file and
1212
\fIcomment out\fR
1213
the nodes to be removed\&.
1214
\fIDo not delete the lines for the deleted nodes\fR, just comment them out by adding a \*(Aq#\*(Aq at the beginning of the lines\&.
1215
.RE
1216
.sp
1217
.RS 4
1218
.ie n \{\
1219
\h'-04' 4.\h'+01'\c
1220
.\}
1221
.el \{\
1222
.sp -1
1223
.IP "  4." 4.2
1224
.\}
1225
Run
1226
\fBctdb reloadnodes\fR
1227
to force all nodes to reload the nodes file\&.
1228
.RE
1229
.sp
1230
.RS 4
1231
.ie n \{\
1232
\h'-04' 5.\h'+01'\c
1233
.\}
1234
.el \{\
1235
.sp -1
1236
.IP "  5." 4.2
1237
.\}
1238
Use
1239
\fBctdb status\fR
1240
on all nodes and verify that the deleted nodes are no longer listed\&.
1241
.RE
1242
.SS "reloadips [\fIPNN\-LIST\fR]"
1243
.PP
1244
This command reloads the public addresses configuration file on the specified nodes\&. When it completes addresses will be reconfigured and reassigned across the cluster as necessary\&.
1245
.PP
1246
This command is currently unable to make changes to the netmask or interfaces associated with existing addresses\&. Such changes must be made in 2 steps by deleting addresses in question and re\-adding then\&. Unfortunately this will disrupt connections to the changed addresses\&.
1247
.SS "getdbmap"
1248
.PP
1249
This command lists all clustered TDB databases that the CTDB daemon has attached to\&. Some databases are flagged as PERSISTENT, this means that the database stores data persistently and the data will remain across reboots\&. One example of such a database is secrets\&.tdb where information about how the cluster was joined to the domain is stored\&. Some database are flagged as REPLICATED, this means that the data in that database is replicated across all the nodes\&. But the data will not remain across reboots\&. This type of database is used by CTDB to store it\*(Aqs internal state\&.
1250
.PP
1251
If a PERSISTENT database is not in a healthy state the database is flagged as UNHEALTHY\&. If there\*(Aqs at least one completely healthy node running in the cluster, it\*(Aqs possible that the content is restored by a recovery run automatically\&. Otherwise an administrator needs to analyze the problem\&.
1252
.PP
1253
See also "ctdb getdbstatus", "ctdb backupdb", "ctdb restoredb", "ctdb dumpbackup", "ctdb wipedb", "ctdb setvar AllowUnhealthyDBRead 1" and (if samba or tdb\-utils are installed) "tdbtool check"\&.
1254
.PP
1255
Most databases are not persistent and only store the state information that the currently running samba daemons need\&. These databases are always wiped when ctdb/samba starts and when a node is rebooted\&.
1256
.sp
1257
.it 1 an-trap
1258
.nr an-no-space-flag 1
1259
.nr an-break-flag 1
1260
.br
1261
.ps +1
1262
\fBExample\fR
1263
.RS 4
1264
.sp
1265
.if n \{\
1266
.RS 4
1267
.\}
1268
.nf
1269
# ctdb getdbmap
1270
Number of databases:10
1271
dbid:0x435d3410 name:notify\&.tdb path:/var/lib/ctdb/notify\&.tdb\&.0
1272
dbid:0x42fe72c5 name:locking\&.tdb path:/var/lib/ctdb/locking\&.tdb\&.0
1273
dbid:0x1421fb78 name:brlock\&.tdb path:/var/lib/ctdb/brlock\&.tdb\&.0
1274
dbid:0x17055d90 name:connections\&.tdb path:/var/lib/ctdb/connections\&.tdb\&.0
1275
dbid:0xc0bdde6a name:sessionid\&.tdb path:/var/lib/ctdb/sessionid\&.tdb\&.0
1276
dbid:0x122224da name:test\&.tdb path:/var/lib/ctdb/test\&.tdb\&.0
1277
dbid:0x2672a57f name:idmap2\&.tdb path:/var/lib/ctdb/persistent/idmap2\&.tdb\&.0 PERSISTENT
1278
dbid:0xb775fff6 name:secrets\&.tdb path:/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT
1279
dbid:0xe98e08b6 name:group_mapping\&.tdb path:/var/lib/ctdb/persistent/group_mapping\&.tdb\&.0 PERSISTENT
1280
dbid:0x7bbbd26c name:passdb\&.tdb path:/var/lib/ctdb/persistent/passdb\&.tdb\&.0 PERSISTENT
1281
1282
# ctdb getdbmap  # example for unhealthy database
1283
Number of databases:1
1284
dbid:0xb775fff6 name:secrets\&.tdb path:/var/lib/ctdb/persistent/secrets\&.tdb\&.0 PERSISTENT UNHEALTHY
1285
1286
# ctdb \-X getdbmap
1287
|ID|Name|Path|Persistent|Unhealthy|
1288
|0x7bbbd26c|passdb\&.tdb|/var/lib/ctdb/persistent/passdb\&.tdb\&.0|1|0|
1289
1290
.fi
1291
.if n \{\
1292
.RE
1293
.\}
1294
.RE
1295
.SS "backupdb \fIDB\fR \fIFILE\fR"
1296
.PP
1297
Copy the contents of database DB to FILE\&. FILE can later be read back using
1298
\fBrestoredb\fR\&. This is mainly useful for backing up persistent databases such as
1299
secrets\&.tdb
1300
and similar\&.
1301
.SS "restoredb \fIFILE\fR [\fIDB\fR]"
1302
.PP
1303
This command restores a persistent database that was previously backed up using backupdb\&. By default the data will be restored back into the same database as it was created from\&. By specifying dbname you can restore the data into a different database\&.
1304
.SS "setdbreadonly \fIDB\fR"
1305
.PP
1306
This command will enable the read\-only record support for a database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&.
1307
.SS "setdbsticky \fIDB\fR"
1308
.PP
1309
This command will enable the sticky record support for the specified database\&. This is an experimental feature to improve performance for contended records primarily in locking\&.tdb and brlock\&.tdb\&. When enabling this feature you must set it on all nodes in the cluster\&.
1310
.SH "INTERNAL COMMANDS"
1311
.PP
1312
Internal commands are used by CTDB\*(Aqs scripts and are not required for managing a CTDB cluster\&. Their parameters and behaviour are subject to change\&.
1313
.SS "gettickles \fIIPADDR\fR"
1314
.PP
1315
Show TCP connections that are registered with CTDB to be "tickled" if there is a failover\&.
1316
.SS "gratarp \fIIPADDR\fR \fIINTERFACE\fR"
1317
.PP
1318
Send out a gratuitous ARP for the specified interface through the specified interface\&. This command is mainly used by the ctdb eventscripts\&.
1319
.SS "pdelete \fIDB\fR \fIKEY\fR"
1320
.PP
1321
Delete KEY from DB\&.
1322
.SS "pfetch \fIDB\fR \fIKEY\fR"
1323
.PP
1324
Print the value associated with KEY in DB\&.
1325
.SS "pstore \fIDB\fR \fIKEY\fR \fIFILE\fR"
1326
.PP
1327
Store KEY in DB with contents of FILE as the associated value\&.
1328
.SS "ptrans \fIDB\fR [\fIFILE\fR]"
1329
.PP
1330
Read a list of key\-value pairs, one per line from FILE, and store them in DB using a single transaction\&. An empty value is equivalent to deleting the given key\&.
1331
.PP
1332
The key and value should be separated by spaces or tabs\&. Each key/value should be a printable string enclosed in double\-quotes\&.
1333
.SS "runstate [setup|first_recovery|startup|running]"
1334
.PP
1335
Print the runstate of the specified node\&. Runstates are used to serialise important state transitions in CTDB, particularly during startup\&.
1336
.PP
1337
If one or more optional runstate arguments are specified then the node must be in one of these runstates for the command to succeed\&.
1338
.sp
1339
.it 1 an-trap
1340
.nr an-no-space-flag 1
1341
.nr an-break-flag 1
1342
.br
1343
.ps +1
1344
\fBExample\fR
1345
.RS 4
1346
.sp
1347
.if n \{\
1348
.RS 4
1349
.\}
1350
.nf
1351
# ctdb runstate
1352
RUNNING
1353
1354
.fi
1355
.if n \{\
1356
.RE
1357
.\}
1358
.RE
1359
.SS "setifacelink \fIIFACE\fR up|down"
1360
.PP
1361
Set the internal state of network interface IFACE\&. This is typically used in the
1362
10\&.interface
1363
script in the "monitor" event\&.
1364
.PP
1365
Example: ctdb setifacelink eth0 up
1366
.SS "tickle"
1367
.PP
1368
Read a list of TCP connections, one per line, from standard input and send a TCP tickle to the source host for each connection\&. A connection is specified as:
1369
.sp
1370
.if n \{\
1371
.RS 4
1372
.\}
1373
.nf
1374
	\fISRC\-IPADDR\fR:\fISRC\-PORT\fR \fIDST\-IPADDR\fR:\fIDST\-PORT\fR
1375
1376
.fi
1377
.if n \{\
1378
.RE
1379
.\}
1380
.PP
1381
A single connection can be specified on the command\-line rather than on standard input\&.
1382
.PP
1383
A TCP tickle is a TCP ACK packet with an invalid sequence and acknowledge number and will when received by the source host result in it sending an immediate correct ACK back to the other end\&.
1384
.PP
1385
TCP tickles are useful to "tickle" clients after a IP failover has occurred since this will make the client immediately recognize the TCP connection has been disrupted and that the client will need to reestablish\&. This greatly speeds up the time it takes for a client to detect and reestablish after an IP failover in the ctdb cluster\&.
1386
.SS "version"
1387
.PP
1388
Display the CTDB version\&.
1389
.SH "DEBUGGING COMMANDS"
1390
.PP
1391
These commands are primarily used for CTDB development and testing and should not be used for normal administration\&.
1392
.SS "OPTIONS"
1393
.PP
1394
\-\-print\-emptyrecords
1395
.RS 4
1396
This enables printing of empty records when dumping databases with the catdb, cattbd and dumpdbbackup commands\&. Records with empty data segment are considered deleted by ctdb and cleaned by the vacuuming mechanism, so this switch can come in handy for debugging the vacuuming behaviour\&.
1397
.RE
1398
.PP
1399
\-\-print\-datasize
1400
.RS 4
1401
This lets database dumps (catdb, cattdb, dumpdbbackup) print the size of the record data instead of dumping the data contents\&.
1402
.RE
1403
.PP
1404
\-\-print\-lmaster
1405
.RS 4
1406
This lets catdb print the lmaster for each record\&.
1407
.RE
1408
.PP
1409
\-\-print\-hash
1410
.RS 4
1411
This lets database dumps (catdb, cattdb, dumpdbbackup) print the hash for each record\&.
1412
.RE
1413
.PP
1414
\-\-print\-recordflags
1415
.RS 4
1416
This lets catdb and dumpdbbackup print the record flags for each record\&. Note that cattdb always prints the flags\&.
1417
.RE
1418
.SS "process\-exists \fIPID\fR \fI[SRVID]\fR"
1419
.PP
1420
This command checks if a specific process exists on the CTDB host\&. This is mainly used by Samba to check if remote instances of samba are still running or not\&. When the optional SRVID argument is specified, the command check if a specific process exists on the CTDB host and has registered for specified SRVID\&.
1421
.SS "getdbstatus \fIDB\fR"
1422
.PP
1423
This command displays more details about a database\&.
1424
.sp
1425
.it 1 an-trap
1426
.nr an-no-space-flag 1
1427
.nr an-break-flag 1
1428
.br
1429
.ps +1
1430
\fBExample\fR
1431
.RS 4
1432
.sp
1433
.if n \{\
1434
.RS 4
1435
.\}
1436
.nf
1437
# ctdb getdbstatus test\&.tdb\&.0
1438
dbid: 0x122224da
1439
name: test\&.tdb
1440
path: /var/lib/ctdb/test\&.tdb\&.0
1441
PERSISTENT: no
1442
HEALTH: OK
1443
1444
# ctdb getdbstatus registry\&.tdb  # with a corrupted TDB
1445
dbid: 0xf2a58948
1446
name: registry\&.tdb
1447
path: /var/lib/ctdb/persistent/registry\&.tdb\&.0
1448
PERSISTENT: yes
1449
HEALTH: NO\-HEALTHY\-NODES \- ERROR \- Backup of corrupted TDB in \*(Aq/var/lib/ctdb/persistent/registry\&.tdb\&.0\&.corrupted\&.20091208091949\&.0Z\*(Aq
1450
1451
.fi
1452
.if n \{\
1453
.RE
1454
.\}
1455
.RE
1456
.SS "catdb \fIDB\fR"
1457
.PP
1458
Print a dump of the clustered TDB database DB\&.
1459
.SS "cattdb \fIDB\fR"
1460
.PP
1461
Print a dump of the contents of the local TDB database DB\&.
1462
.SS "dumpdbbackup \fIFILE\fR"
1463
.PP
1464
Print a dump of the contents from database backup FILE, similar to
1465
\fBcatdb\fR\&.
1466
.SS "wipedb \fIDB\fR"
1467
.PP
1468
Remove all contents of database DB\&.
1469
.SS "recover"
1470
.PP
1471
This command will trigger the recovery daemon to do a cluster recovery\&.
1472
.SS "ipreallocate, sync"
1473
.PP
1474
This command will force the recovery master to perform a full ip reallocation process and redistribute all ip addresses\&. This is useful to "reset" the allocations back to its default state if they have been changed using the "moveip" command\&. While a "recover" will also perform this reallocation, a recovery is much more hevyweight since it will also rebuild all the databases\&.
1475
.SS "attach \fIDBNAME\fR [persistent|replicated]"
1476
.PP
1477
Create a new CTDB database called DBNAME and attach to it on all nodes\&.
1478
.SS "detach \fIDB\-LIST\fR"
1479
.PP
1480
Detach specified non\-persistent database(s) from the cluster\&. This command will disconnect specified database(s) on all nodes in the cluster\&. This command should only be used when none of the specified database(s) are in use\&.
1481
.PP
1482
All nodes should be active and tunable AllowClientDBAccess should be disabled on all nodes before detaching databases\&.
1483
.SS "dumpmemory"
1484
.PP
1485
This is a debugging command\&. This command will make the ctdb daemon to write a fill memory allocation map to standard output\&.
1486
.SS "rddumpmemory"
1487
.PP
1488
This is a debugging command\&. This command will dump the talloc memory allocation tree for the recovery daemon to standard output\&.
1489
.SS "ban \fIBANTIME\fR"
1490
.PP
1491
Administratively ban a node for BANTIME seconds\&. The node will be unbanned after BANTIME seconds have elapsed\&.
1492
.PP
1493
A banned node does not participate in the cluster\&. It does not host any records for the clustered TDB and does not host any public IP addresses\&.
1494
.PP
1495
Nodes are automatically banned if they misbehave\&. For example, a node may be banned if it causes too many cluster recoveries\&.
1496
.PP
1497
To administratively exclude a node from a cluster use the
1498
\fBstop\fR
1499
command\&.
1500
.SS "unban"
1501
.PP
1502
This command is used to unban a node that has either been administratively banned using the ban command or has been automatically banned\&.
1503
.SH "SEE ALSO"
1504
.PP
1505
\fBctdbd\fR(1),
1506
\fBonnode\fR(1),
1507
\fBctdb\fR(7),
1508
\fBctdb-statistics\fR(7),
1509
\fBctdb-tunables\fR(7),
1510
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
1511
.SH "AUTHOR"
1512
.br
1513
.PP
1514
This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke
1515
.SH "COPYRIGHT"
1516
.br
1517
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
1518
.br
1519
.PP
1520
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\&.
1521
.PP
1522
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\&.
1523
.PP
1524
You should have received a copy of the GNU General Public License along with this program; if not, see
1525
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
1526
.sp
(-)b/net/samba415/files/man/ctdb.7 (+783 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB" "7" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb \- Clustered TDB
32
.SH "DESCRIPTION"
33
.PP
34
CTDB is a clustered database component in clustered Samba that provides a high\-availability load\-sharing CIFS server cluster\&.
35
.PP
36
The main functions of CTDB are:
37
.sp
38
.RS 4
39
.ie n \{\
40
\h'-04'\(bu\h'+03'\c
41
.\}
42
.el \{\
43
.sp -1
44
.IP \(bu 2.3
45
.\}
46
Provide a clustered version of the TDB database with automatic rebuild/recovery of the databases upon node failures\&.
47
.RE
48
.sp
49
.RS 4
50
.ie n \{\
51
\h'-04'\(bu\h'+03'\c
52
.\}
53
.el \{\
54
.sp -1
55
.IP \(bu 2.3
56
.\}
57
Monitor nodes in the cluster and services running on each node\&.
58
.RE
59
.sp
60
.RS 4
61
.ie n \{\
62
\h'-04'\(bu\h'+03'\c
63
.\}
64
.el \{\
65
.sp -1
66
.IP \(bu 2.3
67
.\}
68
Manage a pool of public IP addresses that are used to provide services to clients\&. Alternatively, CTDB can be used with LVS\&.
69
.RE
70
.PP
71
Combined with a cluster filesystem CTDB provides a full high\-availablity (HA) environment for services such as clustered Samba, NFS and other services\&.
72
.SH "ANATOMY OF A CTDB CLUSTER"
73
.PP
74
A CTDB cluster is a collection of nodes with 2 or more network interfaces\&. All nodes provide network (usually file/NAS) services to clients\&. Data served by file services is stored on shared storage (usually a cluster filesystem) that is accessible by all nodes\&.
75
.PP
76
CTDB provides an "all active" cluster, where services are load balanced across all nodes\&.
77
.SH "RECOVERY LOCK"
78
.PP
79
CTDB uses a
80
\fIrecovery lock\fR
81
to avoid a
82
\fIsplit brain\fR, where a cluster becomes partitioned and each partition attempts to operate independently\&. Issues that can result from a split brain include file data corruption, because file locking metadata may not be tracked correctly\&.
83
.PP
84
CTDB uses a
85
\fIcluster leader and follower\fR
86
model of cluster management\&. All nodes in a cluster elect one node to be the leader\&. The leader node coordinates privileged operations such as database recovery and IP address failover\&. CTDB refers to the leader node as the
87
\fIrecovery master\fR\&. This node takes and holds the recovery lock to assert its privileged role in the cluster\&.
88
.PP
89
By default, the recovery lock is implemented using a file (specified by
90
\fIrecovery lock\fR
91
in the
92
[cluster]
93
section of
94
\fBctdb.conf\fR(5)) residing in shared storage (usually) on a cluster filesystem\&. To support a recovery lock the cluster filesystem must support lock coherence\&. See
95
\fBping_pong\fR(1)
96
for more details\&.
97
.PP
98
The recovery lock can also be implemented using an arbitrary cluster mutex call\-out by using an exclamation point (\*(Aq!\*(Aq) as the first character of
99
\fIrecovery lock\fR\&. For example, a value of
100
\fB!/usr/local/bin/myhelper recovery\fR
101
would run the given helper with the specified arguments\&. See the source code relating to cluster mutexes for clues about writing call\-outs\&.
102
.PP
103
If a cluster becomes partitioned (for example, due to a communication failure) and a different recovery master is elected by the nodes in each partition, then only one of these recovery masters will be able to take the recovery lock\&. The recovery master in the "losing" partition will not be able to take the recovery lock and will be excluded from the cluster\&. The nodes in the "losing" partition will elect each node in turn as their recovery master so eventually all the nodes in that partition will be excluded\&.
104
.PP
105
CTDB does sanity checks to ensure that the recovery lock is held as expected\&.
106
.PP
107
CTDB can run without a recovery lock but this is not recommended as there will be no protection from split brains\&.
108
.SH "PRIVATE VS PUBLIC ADDRESSES"
109
.PP
110
Each node in a CTDB cluster has multiple IP addresses assigned to it:
111
.sp
112
.RS 4
113
.ie n \{\
114
\h'-04'\(bu\h'+03'\c
115
.\}
116
.el \{\
117
.sp -1
118
.IP \(bu 2.3
119
.\}
120
A single private IP address that is used for communication between nodes\&.
121
.RE
122
.sp
123
.RS 4
124
.ie n \{\
125
\h'-04'\(bu\h'+03'\c
126
.\}
127
.el \{\
128
.sp -1
129
.IP \(bu 2.3
130
.\}
131
One or more public IP addresses that are used to provide NAS or other services\&.
132
.RE
133
.sp
134
.SS "Private address"
135
.PP
136
Each node is configured with a unique, permanently assigned private address\&. This address is configured by the operating system\&. This address uniquely identifies a physical node in the cluster and is the address that CTDB daemons will use to communicate with the CTDB daemons on other nodes\&.
137
.PP
138
Private addresses are listed in the file
139
/usr/local/etc/ctdb/nodes)\&. This file contains the list of private addresses for all nodes in the cluster, one per line\&. This file must be the same on all nodes in the cluster\&.
140
.PP
141
Some users like to put this configuration file in their cluster filesystem\&. A symbolic link should be used in this case\&.
142
.PP
143
Private addresses should not be used by clients to connect to services provided by the cluster\&.
144
.PP
145
It is strongly recommended that the private addresses are configured on a private network that is separate from client networks\&. This is because the CTDB protocol is both unauthenticated and unencrypted\&. If clients share the private network then steps need to be taken to stop injection of packets to relevant ports on the private addresses\&. It is also likely that CTDB protocol traffic between nodes could leak sensitive information if it can be intercepted\&.
146
.PP
147
Example
148
/usr/local/etc/ctdb/nodes
149
for a four node cluster:
150
.sp
151
.if n \{\
152
.RS 4
153
.\}
154
.nf
155
192\&.168\&.1\&.1
156
192\&.168\&.1\&.2
157
192\&.168\&.1\&.3
158
192\&.168\&.1\&.4
159
160
.fi
161
.if n \{\
162
.RE
163
.\}
164
.SS "Public addresses"
165
.PP
166
Public addresses are used to provide services to clients\&. Public addresses are not configured at the operating system level and are not permanently associated with a particular node\&. Instead, they are managed by CTDB and are assigned to interfaces on physical nodes at runtime\&.
167
.PP
168
The CTDB cluster will assign/reassign these public addresses across the available healthy nodes in the cluster\&. When one node fails, its public addresses will be taken over by one or more other nodes in the cluster\&. This ensures that services provided by all public addresses are always available to clients, as long as there are nodes available capable of hosting this address\&.
169
.PP
170
The public address configuration is stored in
171
/usr/local/etc/ctdb/public_addresses
172
on each node\&. This file contains a list of the public addresses that the node is capable of hosting, one per line\&. Each entry also contains the netmask and the interface to which the address should be assigned\&. If this file is missing then no public addresses are configured\&.
173
.PP
174
Some users who have the same public addresses on all nodes like to put this configuration file in their cluster filesystem\&. A symbolic link should be used in this case\&.
175
.PP
176
Example
177
/usr/local/etc/ctdb/public_addresses
178
for a node that can host 4 public addresses, on 2 different interfaces:
179
.sp
180
.if n \{\
181
.RS 4
182
.\}
183
.nf
184
10\&.1\&.1\&.1/24 eth1
185
10\&.1\&.1\&.2/24 eth1
186
10\&.1\&.2\&.1/24 eth2
187
10\&.1\&.2\&.2/24 eth2
188
189
.fi
190
.if n \{\
191
.RE
192
.\}
193
.PP
194
In many cases the public addresses file will be the same on all nodes\&. However, it is possible to use different public address configurations on different nodes\&.
195
.PP
196
Example: 4 nodes partitioned into two subgroups:
197
.sp
198
.if n \{\
199
.RS 4
200
.\}
201
.nf
202
Node 0:/usr/local/etc/ctdb/public_addresses
203
	10\&.1\&.1\&.1/24 eth1
204
	10\&.1\&.1\&.2/24 eth1
205
206
Node 1:/usr/local/etc/ctdb/public_addresses
207
	10\&.1\&.1\&.1/24 eth1
208
	10\&.1\&.1\&.2/24 eth1
209
210
Node 2:/usr/local/etc/ctdb/public_addresses
211
	10\&.1\&.2\&.1/24 eth2
212
	10\&.1\&.2\&.2/24 eth2
213
214
Node 3:/usr/local/etc/ctdb/public_addresses
215
	10\&.1\&.2\&.1/24 eth2
216
	10\&.1\&.2\&.2/24 eth2
217
218
.fi
219
.if n \{\
220
.RE
221
.\}
222
.PP
223
In this example nodes 0 and 1 host two public addresses on the 10\&.1\&.1\&.x network while nodes 2 and 3 host two public addresses for the 10\&.1\&.2\&.x network\&.
224
.PP
225
Public address 10\&.1\&.1\&.1 can be hosted by either of nodes 0 or 1 and will be available to clients as long as at least one of these two nodes are available\&.
226
.PP
227
If both nodes 0 and 1 become unavailable then public address 10\&.1\&.1\&.1 also becomes unavailable\&. 10\&.1\&.1\&.1 can not be failed over to nodes 2 or 3 since these nodes do not have this public address configured\&.
228
.PP
229
The
230
\fBctdb ip\fR
231
command can be used to view the current assignment of public addresses to physical nodes\&.
232
.SH "NODE STATUS"
233
.PP
234
The current status of each node in the cluster can be viewed by the
235
\fBctdb status\fR
236
command\&.
237
.PP
238
A node can be in one of the following states:
239
.PP
240
OK
241
.RS 4
242
This node is healthy and fully functional\&. It hosts public addresses to provide services\&.
243
.RE
244
.PP
245
DISCONNECTED
246
.RS 4
247
This node is not reachable by other nodes via the private network\&. It is not currently participating in the cluster\&. It
248
\fIdoes not\fR
249
host public addresses to provide services\&. It might be shut down\&.
250
.RE
251
.PP
252
DISABLED
253
.RS 4
254
This node has been administratively disabled\&. This node is partially functional and participates in the cluster\&. However, it
255
\fIdoes not\fR
256
host public addresses to provide services\&.
257
.RE
258
.PP
259
UNHEALTHY
260
.RS 4
261
A service provided by this node has failed a health check and should be investigated\&. This node is partially functional and participates in the cluster\&. However, it
262
\fIdoes not\fR
263
host public addresses to provide services\&. Unhealthy nodes should be investigated and may require an administrative action to rectify\&.
264
.RE
265
.PP
266
BANNED
267
.RS 4
268
CTDB is not behaving as designed on this node\&. For example, it may have failed too many recovery attempts\&. Such nodes are banned from participating in the cluster for a configurable time period before they attempt to rejoin the cluster\&. A banned node
269
\fIdoes not\fR
270
host public addresses to provide services\&. All banned nodes should be investigated and may require an administrative action to rectify\&.
271
.RE
272
.PP
273
STOPPED
274
.RS 4
275
This node has been administratively exclude from the cluster\&. A stopped node does no participate in the cluster and
276
\fIdoes not\fR
277
host public addresses to provide services\&. This state can be used while performing maintenance on a node\&.
278
.RE
279
.PP
280
PARTIALLYONLINE
281
.RS 4
282
A node that is partially online participates in a cluster like a healthy (OK) node\&. Some interfaces to serve public addresses are down, but at least one interface is up\&. See also
283
\fBctdb ifaces\fR\&.
284
.RE
285
.SH "CAPABILITIES"
286
.PP
287
Cluster nodes can have several different capabilities enabled\&. These are listed below\&.
288
.PP
289
RECMASTER
290
.RS 4
291
Indicates that a node can become the CTDB cluster recovery master\&. The current recovery master is decided via an election held by all active nodes with this capability\&.
292
.sp
293
Default is YES\&.
294
.RE
295
.PP
296
LMASTER
297
.RS 4
298
Indicates that a node can be the location master (LMASTER) for database records\&. The LMASTER always knows which node has the latest copy of a record in a volatile database\&.
299
.sp
300
Default is YES\&.
301
.RE
302
.PP
303
The RECMASTER and LMASTER capabilities can be disabled when CTDB is used to create a cluster spanning across WAN links\&. In this case CTDB acts as a WAN accelerator\&.
304
.SH "LVS"
305
.PP
306
LVS is a mode where CTDB presents one single IP address for the entire cluster\&. This is an alternative to using public IP addresses and round\-robin DNS to loadbalance clients across the cluster\&.
307
.PP
308
This is similar to using a layer\-4 loadbalancing switch but with some restrictions\&.
309
.PP
310
One extra LVS public address is assigned on the public network to each LVS group\&. Each LVS group is a set of nodes in the cluster that presents the same LVS address public address to the outside world\&. Normally there would only be one LVS group spanning an entire cluster, but in situations where one CTDB cluster spans multiple physical sites it might be useful to have one LVS group for each site\&. There can be multiple LVS groups in a cluster but each node can only be member of one LVS group\&.
311
.PP
312
Client access to the cluster is load\-balanced across the HEALTHY nodes in an LVS group\&. If no HEALTHY nodes exists then all nodes in the group are used, regardless of health status\&. CTDB will, however never load\-balance LVS traffic to nodes that are BANNED, STOPPED, DISABLED or DISCONNECTED\&. The
313
\fBctdb lvs\fR
314
command is used to show which nodes are currently load\-balanced across\&.
315
.PP
316
In each LVS group, one of the nodes is selected by CTDB to be the LVS master\&. This node receives all traffic from clients coming in to the LVS public address and multiplexes it across the internal network to one of the nodes that LVS is using\&. When responding to the client, that node will send the data back directly to the client, bypassing the LVS master node\&. The command
317
\fBctdb lvs master\fR
318
will show which node is the current LVS master\&.
319
.PP
320
The path used for a client I/O is:
321
.sp
322
.RS 4
323
.ie n \{\
324
\h'-04' 1.\h'+01'\c
325
.\}
326
.el \{\
327
.sp -1
328
.IP "  1." 4.2
329
.\}
330
Client sends request packet to LVSMASTER\&.
331
.RE
332
.sp
333
.RS 4
334
.ie n \{\
335
\h'-04' 2.\h'+01'\c
336
.\}
337
.el \{\
338
.sp -1
339
.IP "  2." 4.2
340
.\}
341
LVSMASTER passes the request on to one node across the internal network\&.
342
.RE
343
.sp
344
.RS 4
345
.ie n \{\
346
\h'-04' 3.\h'+01'\c
347
.\}
348
.el \{\
349
.sp -1
350
.IP "  3." 4.2
351
.\}
352
Selected node processes the request\&.
353
.RE
354
.sp
355
.RS 4
356
.ie n \{\
357
\h'-04' 4.\h'+01'\c
358
.\}
359
.el \{\
360
.sp -1
361
.IP "  4." 4.2
362
.\}
363
Node responds back to client\&.
364
.RE
365
.PP
366
This means that all incoming traffic to the cluster will pass through one physical node, which limits scalability\&. You can send more data to the LVS address that one physical node can multiplex\&. This means that you should not use LVS if your I/O pattern is write\-intensive since you will be limited in the available network bandwidth that node can handle\&. LVS does work very well for read\-intensive workloads where only smallish READ requests are going through the LVSMASTER bottleneck and the majority of the traffic volume (the data in the read replies) goes straight from the processing node back to the clients\&. For read\-intensive i/o patterns you can achieve very high throughput rates in this mode\&.
367
.PP
368
Note: you can use LVS and public addresses at the same time\&.
369
.PP
370
If you use LVS, you must have a permanent address configured for the public interface on each node\&. This address must be routable and the cluster nodes must be configured so that all traffic back to client hosts are routed through this interface\&. This is also required in order to allow samba/winbind on the node to talk to the domain controller\&. This LVS IP address can not be used to initiate outgoing traffic\&.
371
.PP
372
Make sure that the domain controller and the clients are reachable from a node
373
\fIbefore\fR
374
you enable LVS\&. Also ensure that outgoing traffic to these hosts is routed out through the configured public interface\&.
375
.SS "Configuration"
376
.PP
377
To activate LVS on a CTDB node you must specify the
378
\fICTDB_LVS_PUBLIC_IFACE\fR,
379
\fICTDB_LVS_PUBLIC_IP\fR
380
and
381
\fICTDB_LVS_NODES\fR
382
configuration variables\&.
383
\fICTDB_LVS_NODES\fR
384
specifies a file containing the private address of all nodes in the current node\*(Aqs LVS group\&.
385
.PP
386
Example:
387
.sp
388
.if n \{\
389
.RS 4
390
.\}
391
.nf
392
CTDB_LVS_PUBLIC_IFACE=eth1
393
CTDB_LVS_PUBLIC_IP=10\&.1\&.1\&.237
394
CTDB_LVS_NODES=/usr/local/etc/ctdb/lvs_nodes
395
396
.fi
397
.if n \{\
398
.RE
399
.\}
400
.PP
401
Example
402
/usr/local/etc/ctdb/lvs_nodes:
403
.sp
404
.if n \{\
405
.RS 4
406
.\}
407
.nf
408
192\&.168\&.1\&.2
409
192\&.168\&.1\&.3
410
192\&.168\&.1\&.4
411
412
.fi
413
.if n \{\
414
.RE
415
.\}
416
.PP
417
Normally any node in an LVS group can act as the LVS master\&. Nodes that are highly loaded due to other demands maybe flagged with the "slave\-only" option in the
418
\fICTDB_LVS_NODES\fR
419
file to limit the LVS functionality of those nodes\&.
420
.PP
421
LVS nodes file that excludes 192\&.168\&.1\&.4 from being the LVS master node:
422
.sp
423
.if n \{\
424
.RS 4
425
.\}
426
.nf
427
192\&.168\&.1\&.2
428
192\&.168\&.1\&.3
429
192\&.168\&.1\&.4 slave\-only
430
431
.fi
432
.if n \{\
433
.RE
434
.\}
435
.SH "TRACKING AND RESETTING TCP CONNECTIONS"
436
.PP
437
CTDB tracks TCP connections from clients to public IP addresses, on known ports\&. When an IP address moves from one node to another, all existing TCP connections to that IP address are reset\&. The node taking over this IP address will also send gratuitous ARPs (for IPv4, or neighbour advertisement, for IPv6)\&. This allows clients to reconnect quickly, rather than waiting for TCP timeouts, which can be very long\&.
438
.PP
439
It is important that established TCP connections do not survive a release and take of a public IP address on the same node\&. Such connections can get out of sync with sequence and ACK numbers, potentially causing a disruptive ACK storm\&.
440
.SH "NAT GATEWAY"
441
.PP
442
NAT gateway (NATGW) is an optional feature that is used to configure fallback routing for nodes\&. This allows cluster nodes to connect to external services (e\&.g\&. DNS, AD, NIS and LDAP) when they do not host any public addresses (e\&.g\&. when they are unhealthy)\&.
443
.PP
444
This also applies to node startup because CTDB marks nodes as UNHEALTHY until they have passed a "monitor" event\&. In this context, NAT gateway helps to avoid a "chicken and egg" situation where a node needs to access an external service to become healthy\&.
445
.PP
446
Another way of solving this type of problem is to assign an extra static IP address to a public interface on every node\&. This is simpler but it uses an extra IP address per node, while NAT gateway generally uses only one extra IP address\&.
447
.SS "Operation"
448
.PP
449
One extra NATGW public address is assigned on the public network to each NATGW group\&. Each NATGW group is a set of nodes in the cluster that shares the same NATGW address to talk to the outside world\&. Normally there would only be one NATGW group spanning an entire cluster, but in situations where one CTDB cluster spans multiple physical sites it might be useful to have one NATGW group for each site\&.
450
.PP
451
There can be multiple NATGW groups in a cluster but each node can only be member of one NATGW group\&.
452
.PP
453
In each NATGW group, one of the nodes is selected by CTDB to be the NATGW master and the other nodes are consider to be NATGW slaves\&. NATGW slaves establish a fallback default route to the NATGW master via the private network\&. When a NATGW slave hosts no public IP addresses then it will use this route for outbound connections\&. The NATGW master hosts the NATGW public IP address and routes outgoing connections from slave nodes via this IP address\&. It also establishes a fallback default route\&.
454
.SS "Configuration"
455
.PP
456
NATGW is usually configured similar to the following example configuration:
457
.sp
458
.if n \{\
459
.RS 4
460
.\}
461
.nf
462
CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
463
CTDB_NATGW_PRIVATE_NETWORK=192\&.168\&.1\&.0/24
464
CTDB_NATGW_PUBLIC_IP=10\&.0\&.0\&.227/24
465
CTDB_NATGW_PUBLIC_IFACE=eth0
466
CTDB_NATGW_DEFAULT_GATEWAY=10\&.0\&.0\&.1
467
468
.fi
469
.if n \{\
470
.RE
471
.\}
472
.PP
473
Normally any node in a NATGW group can act as the NATGW master\&. Some configurations may have special nodes that lack connectivity to a public network\&. In such cases, those nodes can be flagged with the "slave\-only" option in the
474
\fICTDB_NATGW_NODES\fR
475
file to limit the NATGW functionality of those nodes\&.
476
.PP
477
See the
478
NAT GATEWAY
479
section in
480
\fBctdb-script.options\fR(5)
481
for more details of NATGW configuration\&.
482
.SS "Implementation details"
483
.PP
484
When the NATGW functionality is used, one of the nodes is selected to act as a NAT gateway for all the other nodes in the group when they need to communicate with the external services\&. The NATGW master is selected to be a node that is most likely to have usable networks\&.
485
.PP
486
The NATGW master hosts the NATGW public IP address
487
\fICTDB_NATGW_PUBLIC_IP\fR
488
on the configured public interfaces
489
\fICTDB_NATGW_PUBLIC_IFACE\fR
490
and acts as a router, masquerading outgoing connections from slave nodes via this IP address\&. If
491
\fICTDB_NATGW_DEFAULT_GATEWAY\fR
492
is set then it also establishes a fallback default route to the configured this gateway with a metric of 10\&. A metric 10 route is used so it can co\-exist with other default routes that may be available\&.
493
.PP
494
A NATGW slave establishes its fallback default route to the NATGW master via the private network
495
\fICTDB_NATGW_PRIVATE_NETWORK\fRwith a metric of 10\&. This route is used for outbound connections when no other default route is available because the node hosts no public addresses\&. A metric 10 routes is used so that it can co\-exist with other default routes that may be available when the node is hosting public addresses\&.
496
.PP
497
\fICTDB_NATGW_STATIC_ROUTES\fR
498
can be used to have NATGW create more specific routes instead of just default routes\&.
499
.PP
500
This is implemented in the
501
11\&.natgw
502
eventscript\&. Please see the eventscript file and the
503
NAT GATEWAY
504
section in
505
\fBctdb-script.options\fR(5)
506
for more details\&.
507
.SH "POLICY ROUTING"
508
.PP
509
Policy routing is an optional CTDB feature to support complex network topologies\&. Public addresses may be spread across several different networks (or VLANs) and it may not be possible to route packets from these public addresses via the system\*(Aqs default route\&. Therefore, CTDB has support for policy routing via the
510
13\&.per_ip_routing
511
eventscript\&. This allows routing to be specified for packets sourced from each public address\&. The routes are added and removed as CTDB moves public addresses between nodes\&.
512
.SS "Configuration variables"
513
.PP
514
There are 4 configuration variables related to policy routing:
515
\fICTDB_PER_IP_ROUTING_CONF\fR,
516
\fICTDB_PER_IP_ROUTING_RULE_PREF\fR,
517
\fICTDB_PER_IP_ROUTING_TABLE_ID_LOW\fR,
518
\fICTDB_PER_IP_ROUTING_TABLE_ID_HIGH\fR\&. See the
519
POLICY ROUTING
520
section in
521
\fBctdb-script.options\fR(5)
522
for more details\&.
523
.SS "Configuration"
524
.PP
525
The format of each line of
526
\fICTDB_PER_IP_ROUTING_CONF\fR
527
is:
528
.sp
529
.if n \{\
530
.RS 4
531
.\}
532
.nf
533
<public_address> <network> [ <gateway> ]
534
535
.fi
536
.if n \{\
537
.RE
538
.\}
539
.PP
540
Leading whitespace is ignored and arbitrary whitespace may be used as a separator\&. Lines that have a "public address" item that doesn\*(Aqt match an actual public address are ignored\&. This means that comment lines can be added using a leading character such as \*(Aq#\*(Aq, since this will never match an IP address\&.
541
.PP
542
A line without a gateway indicates a link local route\&.
543
.PP
544
For example, consider the configuration line:
545
.sp
546
.if n \{\
547
.RS 4
548
.\}
549
.nf
550
  192\&.168\&.1\&.99	192\&.168\&.1\&.1/24
551
552
.fi
553
.if n \{\
554
.RE
555
.\}
556
.PP
557
If the corresponding public_addresses line is:
558
.sp
559
.if n \{\
560
.RS 4
561
.\}
562
.nf
563
  192\&.168\&.1\&.99/24     eth2,eth3
564
565
.fi
566
.if n \{\
567
.RE
568
.\}
569
.PP
570
\fICTDB_PER_IP_ROUTING_RULE_PREF\fR
571
is 100, and CTDB adds the address to eth2 then the following routing information is added:
572
.sp
573
.if n \{\
574
.RS 4
575
.\}
576
.nf
577
  ip rule add from 192\&.168\&.1\&.99 pref 100 table ctdb\&.192\&.168\&.1\&.99
578
  ip route add 192\&.168\&.1\&.0/24 dev eth2 table ctdb\&.192\&.168\&.1\&.99
579
580
.fi
581
.if n \{\
582
.RE
583
.\}
584
.PP
585
This causes traffic from 192\&.168\&.1\&.1 to 192\&.168\&.1\&.0/24 go via eth2\&.
586
.PP
587
The
588
\fBip rule\fR
589
command will show (something like \- depending on other public addresses and other routes on the system):
590
.sp
591
.if n \{\
592
.RS 4
593
.\}
594
.nf
595
  0:		from all lookup local
596
  100:		from 192\&.168\&.1\&.99 lookup ctdb\&.192\&.168\&.1\&.99
597
  32766:	from all lookup main
598
  32767:	from all lookup default
599
600
.fi
601
.if n \{\
602
.RE
603
.\}
604
.PP
605
\fBip route show table ctdb\&.192\&.168\&.1\&.99\fR
606
will show:
607
.sp
608
.if n \{\
609
.RS 4
610
.\}
611
.nf
612
  192\&.168\&.1\&.0/24 dev eth2 scope link
613
614
.fi
615
.if n \{\
616
.RE
617
.\}
618
.PP
619
The usual use for a line containing a gateway is to add a default route corresponding to a particular source address\&. Consider this line of configuration:
620
.sp
621
.if n \{\
622
.RS 4
623
.\}
624
.nf
625
  192\&.168\&.1\&.99	0\&.0\&.0\&.0/0	192\&.168\&.1\&.1
626
627
.fi
628
.if n \{\
629
.RE
630
.\}
631
.PP
632
In the situation described above this will cause an extra routing command to be executed:
633
.sp
634
.if n \{\
635
.RS 4
636
.\}
637
.nf
638
  ip route add 0\&.0\&.0\&.0/0 via 192\&.168\&.1\&.1 dev eth2 table ctdb\&.192\&.168\&.1\&.99
639
640
.fi
641
.if n \{\
642
.RE
643
.\}
644
.PP
645
With both configuration lines,
646
\fBip route show table ctdb\&.192\&.168\&.1\&.99\fR
647
will show:
648
.sp
649
.if n \{\
650
.RS 4
651
.\}
652
.nf
653
  192\&.168\&.1\&.0/24 dev eth2 scope link
654
  default via 192\&.168\&.1\&.1 dev eth2
655
656
.fi
657
.if n \{\
658
.RE
659
.\}
660
.SS "Sample configuration"
661
.PP
662
Here is a more complete example configuration\&.
663
.sp
664
.if n \{\
665
.RS 4
666
.\}
667
.nf
668
/usr/local/etc/ctdb/public_addresses:
669
670
  192\&.168\&.1\&.98	eth2,eth3
671
  192\&.168\&.1\&.99	eth2,eth3
672
673
/usr/local/etc/ctdb/policy_routing:
674
675
  192\&.168\&.1\&.98 192\&.168\&.1\&.0/24
676
  192\&.168\&.1\&.98 192\&.168\&.200\&.0/24	192\&.168\&.1\&.254
677
  192\&.168\&.1\&.98 0\&.0\&.0\&.0/0 	192\&.168\&.1\&.1
678
  192\&.168\&.1\&.99 192\&.168\&.1\&.0/24
679
  192\&.168\&.1\&.99 192\&.168\&.200\&.0/24	192\&.168\&.1\&.254
680
  192\&.168\&.1\&.99 0\&.0\&.0\&.0/0 	192\&.168\&.1\&.1
681
682
.fi
683
.if n \{\
684
.RE
685
.\}
686
.PP
687
The routes local packets as expected, the default route is as previously discussed, but packets to 192\&.168\&.200\&.0/24 are routed via the alternate gateway 192\&.168\&.1\&.254\&.
688
.SH "NOTIFICATIONS"
689
.PP
690
When certain state changes occur in CTDB, it can be configured to perform arbitrary actions via notifications\&. For example, sending SNMP traps or emails when a node becomes unhealthy or similar\&.
691
.PP
692
The notification mechanism runs all executable files ending in "\&.script" in
693
/usr/local/etc/ctdb/events/notification/, ignoring any failures and continuing to run all files\&.
694
.PP
695
CTDB currently generates notifications after CTDB changes to these states:
696
.RS 4
697
init
698
.RE
699
.RS 4
700
setup
701
.RE
702
.RS 4
703
startup
704
.RE
705
.RS 4
706
healthy
707
.RE
708
.RS 4
709
unhealthy
710
.RE
711
.SH "LOG LEVELS"
712
.PP
713
Valid log levels, in increasing order of verbosity, are:
714
.RS 4
715
ERROR
716
.RE
717
.RS 4
718
WARNING
719
.RE
720
.RS 4
721
NOTICE
722
.RE
723
.RS 4
724
INFO
725
.RE
726
.RS 4
727
DEBUG
728
.RE
729
.SH "REMOTE CLUSTER NODES"
730
.PP
731
It is possible to have a CTDB cluster that spans across a WAN link\&. For example where you have a CTDB cluster in your datacentre but you also want to have one additional CTDB node located at a remote branch site\&. This is similar to how a WAN accelerator works but with the difference that while a WAN\-accelerator often acts as a Proxy or a MitM, in the ctdb remote cluster node configuration the Samba instance at the remote site IS the genuine server, not a proxy and not a MitM, and thus provides 100% correct CIFS semantics to clients\&.
732
.PP
733
See the cluster as one single multihomed samba server where one of the NICs (the remote node) is very far away\&.
734
.PP
735
NOTE: This does require that the cluster filesystem you use can cope with WAN\-link latencies\&. Not all cluster filesystems can handle WAN\-link latencies! Whether this will provide very good WAN\-accelerator performance or it will perform very poorly depends entirely on how optimized your cluster filesystem is in handling high latency for data and metadata operations\&.
736
.PP
737
To activate a node as being a remote cluster node you need to set the following two parameters in /usr/local/etc/ctdb/ctdb\&.conf for the remote node:
738
.sp
739
.if n \{\
740
.RS 4
741
.\}
742
.nf
743
[legacy]
744
  lmaster capability = false
745
  recmaster capability = false
746
747
.fi
748
.if n \{\
749
.RE
750
.\}
751
.PP
752
Verify with the command "ctdb getcapabilities" that that node no longer has the recmaster or the lmaster capabilities\&.
753
.SH "SEE ALSO"
754
.PP
755
\fBctdb\fR(1),
756
\fBctdbd\fR(1),
757
\fBctdbd_wrapper\fR(1),
758
\fBctdb_diagnostics\fR(1),
759
\fBltdbtool\fR(1),
760
\fBonnode\fR(1),
761
\fBping_pong\fR(1),
762
\fBctdb.conf\fR(5),
763
\fBctdb-script.options\fR(5),
764
\fBctdb.sysconfig\fR(5),
765
\fBctdb-statistics\fR(7),
766
\fBctdb-tunables\fR(7),
767
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
768
.SH "AUTHOR"
769
.br
770
.PP
771
This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke
772
.SH "COPYRIGHT"
773
.br
774
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
775
.br
776
.PP
777
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\&.
778
.PP
779
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\&.
780
.PP
781
You should have received a copy of the GNU General Public License along with this program; if not, see
782
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
783
.sp
(-)b/net/samba415/files/man/ctdb.conf.5 (+359 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb.conf
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB\&.CONF" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb.conf \- CTDB configuration file
32
.SH "DESCRIPTION"
33
.PP
34
This file contains CTDB configuration options that affect the operation of CTDB daemons and command\-line tools\&. The default location of this file is
35
/usr/local/etc/ctdb/ctdb\&.conf\&.
36
.PP
37
Note that this is a Samba\-style configuration file, so it has a very different syntax to previous CTDB configuration files\&.
38
.PP
39
For event script options please see
40
\fBctdb-script.options\fR(5)\&.
41
.PP
42
Configuration options are grouped into several sections below\&. There are only a few options in each section, allowing them to be ordered (approximately) in decreasing order of importance\&.
43
.SH "LOGGING CONFIGURATION"
44
.PP
45
Options in this section control CTDB\*(Aqs logging\&. They are valid within the
46
\fIlogging\fR
47
section of file, indicated by
48
[logging]\&.
49
.PP
50
log level = \fILOGLEVEL\fR
51
.RS 4
52
LOGLEVEL is a string that controls the verbosity of ctdbd\*(Aqs logging\&. See the
53
LOG LEVELS
54
section in
55
\fBctdb\fR(7)
56
for more details\&.
57
.sp
58
Default:
59
NOTICE
60
.RE
61
.PP
62
location = \fISTRING\fR
63
.RS 4
64
STRING specifies where ctdbd will write its log\&.
65
.sp
66
Valid values are:
67
.PP
68
file:\fIFILENAME\fR
69
.RS 4
70
FILENAME where ctdbd will write its log\&. This is usually
71
/var/log/log\&.ctdb\&.
72
.RE
73
.PP
74
syslog[:\fIMETHOD\fR]
75
.RS 4
76
CTDB will log to syslog\&. By default this will use the syslog(3) API\&.
77
.sp
78
If METHOD is specified then it specifies an extension that causes logging to be done in a non\-blocking fashion\&. This can be useful under heavy loads that might cause the syslog daemon to dequeue messages too slowly, which would otherwise cause CTDB to block when logging\&. METHOD must be one of:
79
.PP
80
nonblocking
81
.RS 4
82
CTDB will log to syslog via
83
/dev/log
84
in non\-blocking mode\&.
85
.RE
86
.PP
87
udp
88
.RS 4
89
CTDB will log to syslog via UDP to localhost:514\&. The syslog daemon must be configured to listen on (at least) localhost:514\&. Most implementations will log the messages against hostname "localhost" \- this is a limit of the implementation for compatibility with more syslog daemon implementations\&.
90
.RE
91
.PP
92
udp\-rfc5424
93
.RS 4
94
As with "udp" but messages are sent in RFC5424 format\&. This method will log the correct hostname but is not as widely implemented in syslog daemons\&.
95
.RE
96
.RE
97
.sp
98
Default: file:/var/log/log\&.ctdb
99
.RE
100
.SH "CLUSTER CONFIGURATION"
101
.PP
102
Options in this section affect the CTDB cluster setup\&. They are valid within the
103
\fIcluster\fR
104
section of file, indicated by
105
[cluster]\&.
106
.PP
107
recovery lock = \fILOCK\fR
108
.RS 4
109
LOCK specifies the cluster\-wide mutex used to detect and prevent a partitioned cluster (or "split brain")\&.
110
.sp
111
For information about the recovery lock please see the
112
RECOVERY LOCK
113
section in
114
\fBctdb\fR(7)\&.
115
.sp
116
Default: NONE\&. However, uses of a recovery lock is
117
\fIstrongly recommended\fR\&.
118
.RE
119
.PP
120
node address = \fIIPADDR\fR
121
.RS 4
122
IPADDR is the private IP address that ctdbd will bind to\&.
123
.sp
124
This option is only required when automatic address detection can not be used\&. This can be the case when running multiple ctdbd daemons/nodes on the same physical host (usually for testing), using InfiniBand for the private network or on Linux when sysctl net\&.ipv4\&.ip_nonlocal_bind=1\&.
125
.sp
126
Default: CTDB selects the first address from the nodes list that it can bind to\&. See also the
127
PRIVATE ADDRESS
128
section in
129
\fBctdb\fR(7)\&.
130
.RE
131
.PP
132
transport = tcp|ib
133
.RS 4
134
This option specifies which transport to use for ctdbd internode communications on the private network\&.
135
.sp
136
ib
137
means InfiniBand\&. The InfiniBand support is not regularly tested\&. If it is known to be broken then it may be disabled so that a value of
138
ib
139
is considered invalid\&.
140
.sp
141
Default:
142
tcp
143
.RE
144
.SH "DATABASE CONFIGURATION"
145
.PP
146
Options in this section affect the CTDB database setup\&. They are valid within the
147
\fIdatabase\fR
148
section of file, indicated by
149
[database]\&.
150
.PP
151
volatile database directory = \fIDIRECTORY\fR
152
.RS 4
153
DIRECTORY on local storage where CTDB keeps a local copy of volatile TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&.
154
.sp
155
Mounting a tmpfs (or similar memory filesystem) on this directory can provide a significant performance improvement when there is I/O contention on the local disk\&.
156
.sp
157
Default:
158
/var/lib/ctdb/volatile
159
.RE
160
.PP
161
persistent database directory=\fIDIRECTORY\fR
162
.RS 4
163
DIRECTORY on local storage where CTDB keeps a local copy of persistent TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&.
164
.sp
165
Default:
166
/var/lib/ctdb/persistent
167
.RE
168
.PP
169
state database directory = \fIDIRECTORY\fR
170
.RS 4
171
DIRECTORY on local storage where CTDB keeps a local copy of internal state TDB databases\&. This directory is local for each node and should not be stored on the shared cluster filesystem\&.
172
.sp
173
Default:
174
/var/lib/ctdb/state
175
.RE
176
.PP
177
tdb mutexes = true|false
178
.RS 4
179
This parameter enables TDB_MUTEX_LOCKING feature on volatile databases if the robust mutexes are supported\&. This optimizes the record locking using robust mutexes and is much more efficient that using posix locks\&.
180
.sp
181
If robust mutexes are unreliable on the platform being used then they can be disabled by setting this to
182
false\&.
183
.RE
184
.PP
185
lock debug script = \fIFILENAME\fR
186
.RS 4
187
FILENAME is a script used by CTDB\*(Aqs database locking code to attempt to provide debugging information when CTDB is unable to lock an entire database or a record\&.
188
.sp
189
This script should be a bare filename relative to the CTDB configuration directory (/usr/local/etc/ctdb/)\&. Any directory prefix is ignored and the path is calculated relative to this directory\&.
190
.sp
191
CTDB provides a lock debugging script and installs it as
192
/usr/local/etc/ctdb/debug_locks\&.sh\&.
193
.sp
194
Default: NONE
195
.RE
196
.SH "EVENT HANDLING CONFIGURATION"
197
.PP
198
Options in this section affect CTDB event handling\&. They are valid within the
199
\fIevent\fR
200
section of file, indicated by
201
[event]\&.
202
.PP
203
debug script = \fIFILENAME\fR
204
.RS 4
205
FILENAME is a script used by CTDB\*(Aqs event handling code to attempt to provide debugging information when an event times out\&.
206
.sp
207
This script should be a bare filename relative to the CTDB configuration directory (/usr/local/etc/ctdb/)\&. Any directory prefix is ignored and the path is calculated relative to this directory\&.
208
.sp
209
CTDB provides a script for debugging timed out event scripts and installs it as
210
/usr/local/etc/ctdb/debug\-hung\-script\&.sh\&.
211
.sp
212
Default: NONE
213
.RE
214
.SH "FAILOVER CONFIGURATION"
215
.PP
216
Options in this section affect CTDB failover\&. They are valid within the
217
\fIfailover\fR
218
section of file, indicated by
219
[failover]\&.
220
.PP
221
disabled = true|false
222
.RS 4
223
If set to
224
true
225
then public IP failover is disabled\&.
226
.sp
227
Default:
228
false
229
.RE
230
.SH "LEGACY CONFIGURATION"
231
.PP
232
Options in this section affect legacy CTDB setup\&. They are valid within the
233
\fIlegacy\fR
234
section of file, indicated by
235
[legacy]\&.
236
.PP
237
ctdb start as stopped = true|false
238
.RS 4
239
If set to
240
true
241
CTDB starts in the STOPPED state\&.
242
.sp
243
To allow the node to take part in the cluster it must be manually continued with the
244
\fBctdb continue\fR
245
command\&.
246
.sp
247
Please see the
248
NODE STATES
249
section in
250
\fBctdb\fR(7)
251
for more information about the STOPPED state\&.
252
.sp
253
Default:
254
false
255
.RE
256
.PP
257
start as disabled = true|false
258
.RS 4
259
If set to
260
true
261
CTDB starts in the DISABLED state\&.
262
.sp
263
To allow the node to host public IP addresses and services, it must be manually enabled using the
264
\fBctdb enable\fR
265
command\&.
266
.sp
267
Please see the
268
NODE STATES
269
section in
270
\fBctdb\fR(7)
271
for more information about the DISABLED state\&.
272
.sp
273
Default:
274
false
275
.RE
276
.PP
277
realtime scheduling = true|false
278
.RS 4
279
Usually CTDB runs with real\-time priority\&. This helps it to perform effectively on a busy system, such as when there are thousands of Samba clients\&. If you are running CTDB on a platform that does not support real\-time priority, you can set this to
280
false\&.
281
.sp
282
Default:
283
true
284
.RE
285
.PP
286
recmaster capability = true|false
287
.RS 4
288
Indicates whether a node can become the recovery master for the cluster\&. If this is set to
289
false
290
then the node will not be able to become the recovery master for the cluster\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&.
291
.sp
292
Please see the
293
REMOTE CLUSTER NODES
294
section in
295
\fBctdb\fR(7)
296
for more information\&.
297
.sp
298
Default:
299
true
300
.RE
301
.PP
302
lmaster capability = true|false
303
.RS 4
304
Indicates whether a node can become a location master for records in a database\&. If this is set to
305
false
306
then the node will not be part of the vnnmap\&. This feature is primarily used for making a cluster span across a WAN link and use CTDB as a WAN\-accelerator\&.
307
.sp
308
Please see the
309
REMOTE CLUSTER NODES
310
section in
311
\fBctdb\fR(7)
312
for more information\&.
313
.sp
314
Default:
315
true
316
.RE
317
.PP
318
script log level = \fILOGLEVEL\fR
319
.RS 4
320
This option sets the debug level of event script output to LOGLEVEL\&.
321
.sp
322
See the
323
DEBUG LEVELS
324
section in
325
\fBctdb\fR(7)
326
for more information\&.
327
.sp
328
Default:
329
ERROR
330
.RE
331
.SH "FILES"
332
.RS 4
333
/usr/local/etc/ctdb/ctdb\&.conf
334
.RE
335
.SH "SEE ALSO"
336
.PP
337
\fBctdbd\fR(1),
338
\fBonnode\fR(1),
339
\fBctdb.sysconfig\fR(5),
340
\fBctdb-script.options\fR(5),
341
\fBctdb\fR(7),
342
\fBctdb-tunables\fR(7),
343
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
344
.SH "AUTHOR"
345
.br
346
.PP
347
This documentation was written by Amitay Isaacs, Martin Schwenke
348
.SH "COPYRIGHT"
349
.br
350
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
351
.br
352
.PP
353
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\&.
354
.PP
355
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\&.
356
.PP
357
You should have received a copy of the GNU General Public License along with this program; if not, see
358
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
359
.sp
(-)b/net/samba415/files/man/ctdb.sysconfig.5 (+139 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb.sysconfig
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB\&.SYSCONFIG" "5" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb.sysconfig \- CTDB daemon configuration file
32
.SH "DESCRIPTION"
33
.PP
34
This file contains configuration that affects the operation of CTDB\&. This is a distribution\-specific service configuration file such as
35
/etc/sysconfig/ctdb
36
(Red Hat) or
37
/etc/default/ctdb
38
(Debian) and is a shell script (see
39
\fBsh\fR(1))\&.
40
.SH "GLOBAL CONFIGURATION"
41
.PP
42
CTDB_INIT_STYLE=debian|redhat|suse
43
.RS 4
44
This is the init style used by the Linux distribution (or other operating system) being used\&. This is usually determined dynamically by checking the system\&. This variable is used by the initscript to determine which init system primitives to use\&. It is also used by some eventscripts to choose the name of initscripts for certain services, since these can vary between distributions\&.
45
.sp
46
If using CTDB\*(Aqs event scripts are unable to determine an appropriate default then this option can also be placed in a relevant
47
\fBctdb-script.options\fR(5)
48
file\&.
49
.sp
50
Default: NONE\&. Guessed, based on features of distribution\&.
51
.RE
52
.PP
53
CTDB_STARTUP_TIMEOUT=\fINUM\fR
54
.RS 4
55
NUM is the number of seconds to wait for
56
\fBctdbd\fR(1)
57
complete early initialisation up to a point where it is unlikely to abort\&. If
58
\fBctdbd\fR
59
doesn\*(Aqt complete the "setup" event before this timeout then it is killed\&.
60
.sp
61
Defaults: 10
62
.RE
63
.SH "RESOURCE LIMITS"
64
.SS "Maximum number of open files"
65
.PP
66
CTDB can use a lot of file descriptors, especially when used with Samba\&. If there are thousands of smbd processes connected to CTDB when this can mean that thousands of file descriptors are used\&. For CTDB, it is often necessary to increase limit on the maximum number of open files\&.
67
.PP
68
The maximum number of open files should be configured using an operating system mechanism\&.
69
.PP
70
systemd
71
.RS 4
72
The
73
LimitNOFILE=\fBLIMIT\fR
74
option can be used in a unit/service file increase the maximum number of open files\&. See
75
\fBsystemd.exec\fR(5)
76
for details\&.
77
.RE
78
.PP
79
SYSV init
80
.RS 4
81
Use a command like
82
\fBulimit \-n \fR\fB\fBLIMIT\fR\fR
83
to increase the maximum number of open files\&. This command can be put in the relevant distribution\-specific service configuration file\&.
84
.RE
85
.SS "Allowing core dumps"
86
.PP
87
Many distributions do not allow core dump files to be generated by default\&. To assist with debugging, core files can be enabled\&. This should be configured using an operating system mechanism\&.
88
.PP
89
systemd
90
.RS 4
91
The
92
LimitCORE=0|unlimited
93
option can be used in a unit/service file\&.
94
0
95
disallows core files,
96
unlimited
97
allows them\&. maximum number of open files\&. See
98
\fBsystemd.exec\fR(5)
99
for details\&.
100
.RE
101
.PP
102
SYSV init
103
.RS 4
104
Use a command like
105
\fBulimit \-c 0|unlimited\fR
106
to disable or enable core files as required\&. This command can be put in the relevant distribution\-specific service configuration file\&.
107
.RE
108
.SH "FILES"
109
.RS 4
110
/etc/sysconfig/ctdb
111
.RE
112
.RS 4
113
/etc/default/ctdb
114
.RE
115
.RS 4
116
/usr/local/etc/ctdb/script\&.options
117
.RE
118
.SH "SEE ALSO"
119
.PP
120
\fBctdbd\fR(1),
121
\fBctdb-script.options\fR(5),
122
\fBctdb\fR(7),
123
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
124
.SH "AUTHOR"
125
.br
126
.PP
127
This documentation was written by Martin Schwenke
128
.SH "COPYRIGHT"
129
.br
130
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
131
.br
132
.PP
133
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\&.
134
.PP
135
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\&.
136
.PP
137
You should have received a copy of the GNU General Public License along with this program; if not, see
138
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
139
.sp
(-)b/net/samba415/files/man/ctdb_diagnostics.1 (+79 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdb_diagnostics
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 11/18/2018
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDB_DIAGNOSTICS" "1" "11/18/2018" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdb_diagnostics \- dump diagnostic information about CTDB/Samba installation
32
.SH "SYNOPSIS"
33
.HP \w'\fBctdb_diagnostics\fR\ 'u
34
\fBctdb_diagnostics\fR [OPTIONS] \&.\&.\&.
35
.SH "DESCRIPTION"
36
.PP
37
ctdb_diagnostics is used to dump diagnostic information about a clustered Samba installation\&. This includes configuration files, output of relevant commands and logs\&. This information can be used to check the correctness of the configuration and to diagnose problems\&.
38
.SH "OPTIONS"
39
.PP
40
\-n <nodes>
41
.RS 4
42
Comma separated list of nodes to operate on
43
.RE
44
.PP
45
\-c
46
.RS 4
47
Ignore comment lines (starting with \*(Aq#\*(Aq) in file comparisons
48
.RE
49
.PP
50
\-w
51
.RS 4
52
Ignore whitespace in file comparisons
53
.RE
54
.PP
55
\-\-no\-ads
56
.RS 4
57
Do not use commands that assume an Active Directory Server
58
.RE
59
.SH "SEE ALSO"
60
.PP
61
\fBctdb\fR(1),
62
\fBctdb\fR(7),
63
\m[blue]\fB\%https://ctdb.samba.org/\fR\m[]
64
.SH "AUTHOR"
65
.br
66
.PP
67
This documentation was written by Martijn van Brummelen
68
.SH "COPYRIGHT"
69
.br
70
Copyright \(co 2015 Martijn van Brummelen
71
.br
72
.PP
73
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\&.
74
.PP
75
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\&.
76
.PP
77
You should have received a copy of the GNU General Public License along with this program; if not, see
78
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
79
.sp
(-)b/net/samba415/files/man/ctdbd.1 (+83 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdbd
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDBD" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdbd \- The CTDB cluster daemon
32
.SH "SYNOPSIS"
33
.HP \w'\fBctdbd\fR\ 'u
34
\fBctdbd\fR [\fIOPTION\fR...]
35
.SH "DESCRIPTION"
36
.PP
37
ctdbd is the main CTDB daemon\&.
38
.PP
39
Note that ctdbd is not usually invoked directly\&. It is invoked via
40
\fBctdbd_wrapper\fR(1)
41
or via the initscript\&.
42
.PP
43
See
44
\fBctdb\fR(7)
45
for an overview of CTDB\&.
46
.SH "GENERAL OPTIONS"
47
.PP
48
\-i, \-\-interactive
49
.RS 4
50
Enable interactive mode\&. This will make ctdbd run in the foreground and not detach from the terminal\&. In this mode ctdbd will log to stderr\&.
51
.sp
52
By default ctdbd will detach itself and run in the background as a daemon, logging to the configured destination\&.
53
.RE
54
.PP
55
\-?, \-\-help
56
.RS 4
57
Display a summary of options\&.
58
.RE
59
.SH "SEE ALSO"
60
.PP
61
\fBctdb\fR(1),
62
\fBctdbd_wrapper\fR(1),
63
\fBonnode\fR(1),
64
\fBctdb.conf\fR(5),
65
\fBctdb\fR(7),
66
\fBctdb-tunables\fR(7),
67
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
68
.SH "AUTHOR"
69
.br
70
.PP
71
This documentation was written by Ronnie Sahlberg, Amitay Isaacs, Martin Schwenke
72
.SH "COPYRIGHT"
73
.br
74
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
75
.br
76
.PP
77
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\&.
78
.PP
79
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\&.
80
.PP
81
You should have received a copy of the GNU General Public License along with this program; if not, see
82
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
83
.sp
(-)b/net/samba415/files/man/ctdbd_wrapper.1 (+63 lines)
Added Link Here
1
'\" t
2
.\"     Title: ctdbd_wrapper
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "CTDBD_WRAPPER" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ctdbd_wrapper \- Wrapper for ctdbd
32
.SH "SYNOPSIS"
33
.HP \w'\fBctdbd_wrapper\fR\ 'u
34
\fBctdbd_wrapper\fR {start | stop}
35
.SH "DESCRIPTION"
36
.PP
37
ctdbd_wrapper is used to start or stop the main CTDB daemon\&.
38
.PP
39
See
40
\fBctdb\fR(7)
41
for an overview of CTDB\&.
42
.SH "SEE ALSO"
43
.PP
44
\fBctdbd\fR(1),
45
\fBctdb.sysconfig\fR(5),
46
\fBctdb\fR(7),
47
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
48
.SH "AUTHOR"
49
.br
50
.PP
51
This documentation was written by Amitay Isaacs, Martin Schwenke
52
.SH "COPYRIGHT"
53
.br
54
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
55
.br
56
.PP
57
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\&.
58
.PP
59
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\&.
60
.PP
61
You should have received a copy of the GNU General Public License along with this program; if not, see
62
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
63
.sp
(-)b/net/samba415/files/man/gentest.1 (+133 lines)
Added Link Here
1
'\" t
2
.\"     Title: gentest
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: Test Suite
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "GENTEST" "1" "09/23/2020" "Samba 4\&.0" "Test Suite"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
gentest \- Run random generic SMB operations against two SMB servers and show the differences in behavior
32
.SH "SYNOPSIS"
33
.HP \w'\fBgentest\fR\ 'u
34
\fBgentest\fR {//server1/share1} {//server2/share2} {\-U\ user%pass} {\-U\ user%pass} [\-s\ seed] [\-o\ numops] [\-a] [\-A] [\-i\ FILE] [\-O] [\-S\ FILE] [\-L] [\-F] [\-C] [\-X]
35
.SH "DESCRIPTION"
36
.PP
37
gentest
38
is a utility for detecting differences in behaviour between SMB servers\&. It will run a random set of generic operations against
39
\fI//server1/share1\fR
40
and then the same random set against
41
\fI//server2/share2\fR
42
and display the differences in the responses it gets\&.
43
.PP
44
This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&.
45
.SH "OPTIONS"
46
.PP
47
\-U user%pass
48
.RS 4
49
Specify the user and password to use when logging on on the shares\&. This parameter is mandatory and has to be specified twice\&.
50
.RE
51
.PP
52
\-s seed
53
.RS 4
54
Seed the random number generator with the specified value\&.
55
.RE
56
.PP
57
\-o numops
58
.RS 4
59
Set the number of operations to perform\&.
60
.RE
61
.PP
62
\-a
63
.RS 4
64
Print the operations that are performed\&.
65
.RE
66
.PP
67
\-A
68
.RS 4
69
Backtrack to find minimal number of operations required to make the response to a certain call differ\&.
70
.RE
71
.PP
72
\-i FILE
73
.RS 4
74
Specify a file containing the names of fields that have to be ignored (such as time fields)\&. See below for a description of the file format\&.
75
.RE
76
.PP
77
\-O
78
.RS 4
79
Enable oplocks\&.
80
.RE
81
.PP
82
\-S FILE
83
.RS 4
84
Set preset seeds file\&. The default is
85
gentest_seeds\&.dat\&.
86
.RE
87
.PP
88
\-L
89
.RS 4
90
Use preset seeds
91
.RE
92
.PP
93
\-F
94
.RS 4
95
Fast reconnect (just close files)
96
.RE
97
.PP
98
\-C
99
.RS 4
100
Continuous analysis mode
101
.RE
102
.PP
103
\-X
104
.RS 4
105
Analyse even when the test succeeded\&.
106
.RE
107
.SH "VERSION"
108
.PP
109
This man page is correct for version 4\&.0 of the Samba suite\&.
110
.SH "SEE ALSO"
111
.PP
112
Samba
113
.SH "AUTHOR"
114
.PP
115
This utility is part of the
116
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
117
suite, which is developed by the global
118
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
119
.PP
120
gentest was written by Andrew Tridgell\&.
121
.PP
122
This manpage was written by Jelmer Vernooij\&.
123
.SH "NOTES"
124
.IP " 1." 4
125
Samba
126
.RS 4
127
\%http://www.samba.org/
128
.RE
129
.IP " 2." 4
130
Samba Team
131
.RS 4
132
\%http://www.samba.org/samba/team/
133
.RE
(-)b/net/samba415/files/man/ldbadd.1 (+78 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbadd
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBADD" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbadd \- Command\-line utility for adding records to an LDB
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbadd\fR\ 'u
34
\fBldbadd\fR [\-h] [\-H\ LDB\-URL] [ldif\-file1] [ldif\-file2] [\&.\&.\&.]
35
.SH "DESCRIPTION"
36
.PP
37
ldbadd adds records to an ldb(3) database\&. It reads the ldif(5) files specified on the command line and adds the records from these files to the LDB database, which is specified by the \-H option or the LDB_URL environment variable\&.
38
.PP
39
If \- is specified as a ldb file, the ldif input is read from standard input\&.
40
.SH "OPTIONS"
41
.PP
42
\-h
43
.RS 4
44
Show list of available options\&.
45
.RE
46
.PP
47
\-H <ldb\-url>
48
.RS 4
49
LDB URL to connect to\&. See ldb(3) for details\&.
50
.RE
51
.SH "ENVIRONMENT"
52
.PP
53
LDB_URL
54
.RS 4
55
LDB URL to connect to (can be overridden by using the \-H command\-line option\&.)
56
.RE
57
.SH "VERSION"
58
.PP
59
This man page is correct for version 1\&.1 of LDB\&.
60
.SH "SEE ALSO"
61
.PP
62
ldb(3), ldbmodify, ldbdel, ldif(5)
63
.SH "AUTHOR"
64
.PP
65
ldb was written by
66
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
67
.PP
68
If you wish to report a problem or make a suggestion then please see the
69
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
70
web site for current contact and maintainer information\&.
71
.PP
72
This manpage was written by Jelmer Vernooij\&.
73
.SH "NOTES"
74
.IP " 1." 4
75
Andrew Tridgell
76
.RS 4
77
\%https://www.samba.org/~tridge/
78
.RE
(-)b/net/samba415/files/man/ldbdel.1 (+80 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbdel
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBDEL" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbdel \- Command\-line program for deleting LDB records
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbdel\fR\ 'u
34
\fBldbdel\fR [\-h] [\-H\ LDB\-URL] [dn] [\&.\&.\&.]
35
.SH "DESCRIPTION"
36
.PP
37
ldbdel deletes records from an ldb(3) database\&. It deletes the records identified by the dn\*(Aqs specified on the command\-line\&.
38
.PP
39
ldbdel uses either the database that is specified with the \-H option or the database specified by the LDB_URL environment variable\&.
40
.SH "OPTIONS"
41
.PP
42
\-h
43
.RS 4
44
Show list of available options\&.
45
.RE
46
.PP
47
\-H <ldb\-url>
48
.RS 4
49
LDB URL to connect to\&. See ldb(3) for details\&.
50
.RE
51
.SH "ENVIRONMENT"
52
.PP
53
LDB_URL
54
.RS 4
55
LDB URL to connect to (can be overridden by using the \-H command\-line option\&.)
56
.RE
57
.SH "VERSION"
58
.PP
59
This man page is correct for version 1\&.1 of LDB\&.
60
.SH "SEE ALSO"
61
.PP
62
ldb(3), ldbmodify, ldbadd, ldif(5)
63
.SH "AUTHOR"
64
.PP
65
ldb was written by
66
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
67
.PP
68
If you wish to report a problem or make a suggestion then please see the
69
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
70
web site for current contact and maintainer information\&.
71
.PP
72
ldbdel was written by Andrew Tridgell\&.
73
.PP
74
This manpage was written by Jelmer Vernooij\&.
75
.SH "NOTES"
76
.IP " 1." 4
77
Andrew Tridgell
78
.RS 4
79
\%https://www.samba.org/~tridge/
80
.RE
(-)b/net/samba415/files/man/ldbedit.1 (+111 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbedit
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBEDIT" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbedit \- Edit LDB databases using your preferred editor
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbedit\fR\ 'u
34
\fBldbedit\fR [\-?] [\-\-usage] [\-s\ base|one|sub] [\-b\ basedn] [\-a] [\-e\ editor] [\-H\ LDB\-URL] [expression] [attributes...]
35
.SH "DESCRIPTION"
36
.PP
37
ldbedit is a utility that allows you to edit LDB entries (in tdb files, sqlite files or LDAP servers) using your preferred editor\&. ldbedit generates an LDIF file based on your query, allows you to edit the LDIF, and then merges that LDIF back into the LDB backend\&.
38
.SH "OPTIONS"
39
.PP
40
\-?, \-\-help
41
.RS 4
42
Show list of available options, and a phrase describing what that option does\&.
43
.RE
44
.PP
45
\-\-usage
46
.RS 4
47
Show list of available options\&. This is similar to the help option, however it does not provide any description, and is hence shorter\&.
48
.RE
49
.PP
50
\-H <ldb\-url>
51
.RS 4
52
LDB URL to connect to\&. For a tdb database, this will be of the form tdb://\fIfilename\fR\&. For a LDAP connection over unix domain sockets, this will be of the form ldapi://\fIsocket\fR\&. For a (potentially remote) LDAP connection over TCP, this will be of the form ldap://\fIhostname\fR\&. For an SQLite database, this will be of the form sqlite://\fIfilename\fR\&.
53
.RE
54
.PP
55
\-s one|sub|base
56
.RS 4
57
Search scope to use\&. One\-level, subtree or base\&.
58
.RE
59
.PP
60
\-a, \-all
61
.RS 4
62
Edit all records\&. This allows you to apply the same change to a number of records at once\&. You probably want to combine this with an expression of the form "objectclass=*"\&.
63
.RE
64
.PP
65
\-e editor, \-\-editor editor
66
.RS 4
67
Specify the editor that should be used (overrides the VISUAL and EDITOR environment variables)\&. If this option is not used, and neither VISUAL nor EDITOR environment variables are set, then the vi editor will be used\&.
68
.RE
69
.PP
70
\-b basedn
71
.RS 4
72
Specify Base Distinguished Name to use\&.
73
.RE
74
.PP
75
\-v, \-\-verbose
76
.RS 4
77
Make ldbedit more verbose about the operations that are being performed\&. Without this option, ldbedit will only provide a summary change line\&.
78
.RE
79
.SH "ENVIRONMENT"
80
.PP
81
LDB_URL
82
.RS 4
83
LDB URL to connect to\&. This can be overridden by using the \-H command\-line option\&.)
84
.RE
85
.PP
86
VISUAL and EDITOR
87
.RS 4
88
Environment variables used to determine what editor to use\&. VISUAL takes precedence over EDITOR, and both are overridden by the \-e command\-line option\&.
89
.RE
90
.SH "VERSION"
91
.PP
92
This man page is correct for version 1\&.1 of LDB\&.
93
.SH "SEE ALSO"
94
.PP
95
ldb(3), ldbmodify(1), ldbdel(1), ldif(5), vi(1)
96
.SH "AUTHOR"
97
.PP
98
ldb was written by
99
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
100
.PP
101
If you wish to report a problem or make a suggestion then please see the
102
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
103
web site for current contact and maintainer information\&.
104
.PP
105
This manpage was written by Jelmer Vernooij and updated by Brad Hards\&.
106
.SH "NOTES"
107
.IP " 1." 4
108
Andrew Tridgell
109
.RS 4
110
\%https://www.samba.org/~tridge/
111
.RE
(-)b/net/samba415/files/man/ldbmodify.1 (+73 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbmodify
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBMODIFY" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbmodify \- Modify records in a LDB database
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbmodify\fR\ 'u
34
\fBldbmodify\fR [\-H\ LDB\-URL] [ldif\-file]
35
.SH "DESCRIPTION"
36
.PP
37
ldbmodify changes, adds and deletes records in a LDB database\&. The changes that should be made to the LDB database are read from the specified LDIF\-file\&. If \- is specified as the filename, input is read from stdin\&.
38
.PP
39
For now, see ldapmodify(1) for details on the LDIF file format\&.
40
.SH "OPTIONS"
41
.PP
42
\-H <ldb\-url>
43
.RS 4
44
LDB URL to connect to\&. See ldb(3) for details\&.
45
.RE
46
.SH "ENVIRONMENT"
47
.PP
48
LDB_URL
49
.RS 4
50
LDB URL to connect to (can be overridden by using the \-H command\-line option\&.)
51
.RE
52
.SH "VERSION"
53
.PP
54
This man page is correct for version 1\&.1 of LDB\&.
55
.SH "SEE ALSO"
56
.PP
57
ldb(3), ldbedit
58
.SH "AUTHOR"
59
.PP
60
ldb was written by
61
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
62
.PP
63
If you wish to report a problem or make a suggestion then please see the
64
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
65
web site for current contact and maintainer information\&.
66
.PP
67
This manpage was written by Jelmer Vernooij\&.
68
.SH "NOTES"
69
.IP " 1." 4
70
Andrew Tridgell
71
.RS 4
72
\%https://www.samba.org/~tridge/
73
.RE
(-)b/net/samba415/files/man/ldbrename.1 (+81 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbrename
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBRENAME" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbrename \- Edit LDB databases using your favorite editor
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbrename\fR\ 'u
34
\fBldbrename\fR [\-h] [\-o\ options] {olddn} {newdn}
35
.SH "DESCRIPTION"
36
.PP
37
ldbrename is a utility that allows you to rename trees in an LDB database based by DN\&. This utility takes two arguments: the original DN name of the top element and the DN to change it to\&.
38
.SH "OPTIONS"
39
.PP
40
\-h
41
.RS 4
42
Show list of available options\&.
43
.RE
44
.PP
45
\-H <ldb\-url>
46
.RS 4
47
LDB URL to connect to\&. See ldb(3) for details\&.
48
.RE
49
.PP
50
\-o options
51
.RS 4
52
Extra ldb options, such as modules\&.
53
.RE
54
.SH "ENVIRONMENT"
55
.PP
56
LDB_URL
57
.RS 4
58
LDB URL to connect to (can be overridden by using the \-H command\-line option\&.)
59
.RE
60
.SH "VERSION"
61
.PP
62
This man page is correct for version 1\&.1 of LDB\&.
63
.SH "SEE ALSO"
64
.PP
65
ldb(3), ldbmodify, ldbdel, ldif(5)
66
.SH "AUTHOR"
67
.PP
68
ldb was written by
69
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
70
.PP
71
If you wish to report a problem or make a suggestion then please see the
72
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
73
web site for current contact and maintainer information\&.
74
.PP
75
This manpage was written by Jelmer Vernooij\&.
76
.SH "NOTES"
77
.IP " 1." 4
78
Andrew Tridgell
79
.RS 4
80
\%https://www.samba.org/~tridge/
81
.RE
(-)b/net/samba415/files/man/ldbsearch.1 (+91 lines)
Added Link Here
1
'\" t
2
.\"     Title: ldbsearch
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: LDB 1.1
8
.\"  Language: English
9
.\"
10
.TH "LDBSEARCH" "1" "09/23/2020" "LDB 1\&.1" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ldbsearch \- Search for records in a LDB database
32
.SH "SYNOPSIS"
33
.HP \w'\fBldbsearch\fR\ 'u
34
\fBldbsearch\fR [\-h] [\-s\ base|one|sub] [\-b\ basedn] [\-i] [\-H\ LDB\-URL] [expression] [attributes]
35
.SH "DESCRIPTION"
36
.PP
37
ldbsearch searches a LDB database for records matching the specified expression (see the ldapsearch(1) manpage for a description of the expression format)\&. For each record, the specified attributes are printed\&.
38
.SH "OPTIONS"
39
.PP
40
\-h
41
.RS 4
42
Show list of available options\&.
43
.RE
44
.PP
45
\-H <ldb\-url>
46
.RS 4
47
LDB URL to connect to\&. See ldb(3) for details\&.
48
.RE
49
.PP
50
\-s one|sub|base
51
.RS 4
52
Search scope to use\&. One\-level, subtree or base\&.
53
.RE
54
.PP
55
\-i
56
.RS 4
57
Read search expressions from stdin\&.
58
.RE
59
.PP
60
\-b basedn
61
.RS 4
62
Specify Base DN to use\&.
63
.RE
64
.SH "ENVIRONMENT"
65
.PP
66
LDB_URL
67
.RS 4
68
LDB URL to connect to (can be overridden by using the \-H command\-line option\&.)
69
.RE
70
.SH "VERSION"
71
.PP
72
This man page is correct for version 1\&.1 of LDB\&.
73
.SH "SEE ALSO"
74
.PP
75
ldb(3), ldbedit(1)
76
.SH "AUTHOR"
77
.PP
78
ldb was written by
79
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&.
80
.PP
81
If you wish to report a problem or make a suggestion then please see the
82
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
83
web site for current contact and maintainer information\&.
84
.PP
85
This manpage was written by Jelmer Vernooij\&.
86
.SH "NOTES"
87
.IP " 1." 4
88
Andrew Tridgell
89
.RS 4
90
\%https://www.samba.org/~tridge/
91
.RE
(-)b/net/samba415/files/man/locktest.1 (+137 lines)
Added Link Here
1
'\" t
2
.\"     Title: locktest
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: Test Suite
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "LOCKTEST" "1" "09/23/2020" "Samba 4\&.0" "Test Suite"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
locktest \- Find differences in locking between two SMB servers
32
.SH "SYNOPSIS"
33
.HP \w'\fBlocktest\fR\ 'u
34
\fBlocktest\fR {//server1/share1} {//server2/share2} [\-U\ user%pass] [\-U\ user%pass] [\-s\ seed] [\-o\ numops] [\-a] [\-O] [\-E] [\-Z] [\-R\ range] [\-B\ base] [\-M\ min]
35
.SH "DESCRIPTION"
36
.PP
37
locktest
38
is a utility for detecting differences in behaviour in locking between SMB servers\&. It will run a random set of locking operations against
39
\fI//server1/share1\fR
40
and then the same random set against
41
\fI//server2/share2\fR
42
and display the differences in the responses it gets\&.
43
.PP
44
This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&.
45
.SH "OPTIONS"
46
.PP
47
\-U user%pass
48
.RS 4
49
Specify the user and password to use when logging on on the shares\&. This parameter can be specified twice (once for the first server, once for the second)\&.
50
.RE
51
.PP
52
\-s seed
53
.RS 4
54
Seed the random number generator with the specified value\&.
55
.RE
56
.PP
57
\-o numops
58
.RS 4
59
Set the number of operations to perform\&.
60
.RE
61
.PP
62
\-a
63
.RS 4
64
Print the operations that are performed\&.
65
.RE
66
.PP
67
\-A
68
.RS 4
69
Backtrack to find minimal number of operations required to make the response to a certain call differ\&.
70
.RE
71
.PP
72
\-O
73
.RS 4
74
Enable oplocks\&.
75
.RE
76
.PP
77
\-u
78
.RS 4
79
Hide unlock fails\&.
80
.RE
81
.PP
82
\-E
83
.RS 4
84
enable exact error code checking
85
.RE
86
.PP
87
\-Z
88
.RS 4
89
enable the zero/zero lock
90
.RE
91
.PP
92
\-R range
93
.RS 4
94
set lock range
95
.RE
96
.PP
97
\-B base
98
.RS 4
99
set lock base
100
.RE
101
.PP
102
\-M min
103
.RS 4
104
set min lock length
105
.RE
106
.PP
107
\-k
108
.RS 4
109
Use kerberos
110
.RE
111
.SH "VERSION"
112
.PP
113
This man page is correct for version 4\&.0 of the Samba suite\&.
114
.SH "SEE ALSO"
115
.PP
116
Samba
117
.SH "AUTHOR"
118
.PP
119
This utility is part of the
120
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
121
suite, which is developed by the global
122
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
123
.PP
124
locktest was written by Andrew Tridgell\&.
125
.PP
126
This manpage was written by Jelmer Vernooij\&.
127
.SH "NOTES"
128
.IP " 1." 4
129
Samba
130
.RS 4
131
\%http://www.samba.org/
132
.RE
133
.IP " 2." 4
134
Samba Team
135
.RS 4
136
\%http://www.samba.org/samba/team/
137
.RE
(-)b/net/samba415/files/man/ltdbtool.1 (+256 lines)
Added Link Here
1
'\" t
2
.\"     Title: ltdbtool
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "LTDBTOOL" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ltdbtool \- manipulate CTDB\*(Aqs local TDB files
32
.SH "SYNOPSIS"
33
.HP \w'\fBltdbtool\fR\ 'u
34
\fBltdbtool\fR [\fIOPTION\fR...] {\fICOMMAND\fR} [\fICOMMAND\-ARGS\fR]
35
.SH "DESCRIPTION"
36
.PP
37
ltdbtool is a utility to manipulate CTDB\*(Aqs local TDB databases (LTDBs) without connecting to a CTDB daemon\&.
38
.PP
39
It can be used to:
40
.sp
41
.RS 4
42
.ie n \{\
43
\h'-04'\(bu\h'+03'\c
44
.\}
45
.el \{\
46
.sp -1
47
.IP \(bu 2.3
48
.\}
49
dump the contents of a LTDB, optionally printing the CTDB record header information,
50
.RE
51
.sp
52
.RS 4
53
.ie n \{\
54
\h'-04'\(bu\h'+03'\c
55
.\}
56
.el \{\
57
.sp -1
58
.IP \(bu 2.3
59
.\}
60
convert between an LTDB and a non\-clustered tdb by adding or removing CTDB headers and
61
.RE
62
.sp
63
.RS 4
64
.ie n \{\
65
\h'-04'\(bu\h'+03'\c
66
.\}
67
.el \{\
68
.sp -1
69
.IP \(bu 2.3
70
.\}
71
convert between 64 and 32 bit LTDBs where the CTDB record headers differ by 4 bytes of padding\&.
72
.RE
73
.SH "OPTIONS"
74
.PP
75
\-e
76
.RS 4
77
Dump empty records\&. These are normally excluded\&.
78
.RE
79
.PP
80
\-p
81
.RS 4
82
Dump with header information, similar to "ctdb catdb"\&.
83
.RE
84
.PP
85
\-s {0 | 32 | 64}
86
.RS 4
87
Specify how to determine the CTDB record header size for the input database:
88
.PP
89
0
90
.RS 4
91
no CTDB header
92
.RE
93
.PP
94
32
95
.RS 4
96
CTDB header size of a 32 bit system (20 bytes)
97
.RE
98
.PP
99
64
100
.RS 4
101
CTDB header size of a 64 bit system (24 bytes)
102
.RE
103
.sp
104
The default is 32 or 64 depending on the system architecture\&.
105
.RE
106
.PP
107
\-o {0 | 32 | 64}
108
.RS 4
109
Specify how to determine the CTDB record header size for the output database, see \-s\&.
110
.RE
111
.PP
112
\-S \fISIZE\fR
113
.RS 4
114
Explicitly specify the CTDB record header SIZE of the input database in bytes\&.
115
.RE
116
.PP
117
\-O \fISIZE\fR
118
.RS 4
119
Explicitly specify the CTDB record header SIZE for the output database in bytes\&.
120
.RE
121
.PP
122
\-h
123
.RS 4
124
Print help text\&.
125
.RE
126
.SH "COMMANDS"
127
.PP
128
help
129
.RS 4
130
Print help text\&.
131
.RE
132
.PP
133
dump \fIIDB\fR
134
.RS 4
135
Dump the contents of an LTDB input file IDB to standard output in a human\-readable format\&.
136
.RE
137
.PP
138
convert \fIIDB\fR \fIODB\fR
139
.RS 4
140
Copy an LTDB input file IDB to output file ODB, optionally adding or removing CTDB headers\&.
141
.RE
142
.SH "EXAMPLES"
143
.PP
144
Print a local tdb in "tdbdump" style:
145
.sp
146
.if n \{\
147
.RS 4
148
.\}
149
.nf
150
      ltdbtool dump idmap2\&.tdb\&.0
151
152
.fi
153
.if n \{\
154
.RE
155
.\}
156
.PP
157
Print a local tdb with header information similar to "ctdb catdb":
158
.sp
159
.if n \{\
160
.RS 4
161
.\}
162
.nf
163
      ltdbtool dump \-p idmap2\&.tdb\&.0
164
165
.fi
166
.if n \{\
167
.RE
168
.\}
169
.PP
170
Strip the CTDB headers from records:
171
.sp
172
.if n \{\
173
.RS 4
174
.\}
175
.nf
176
      ltdbtool convert \-o0 idmap2\&.tdb\&.0 idmap\&.tdb
177
178
.fi
179
.if n \{\
180
.RE
181
.\}
182
.PP
183
Strip 64 bit CTDB headers from records, running on i386:
184
.sp
185
.if n \{\
186
.RS 4
187
.\}
188
.nf
189
      ltdbtool convert \-s64 \-o0 idmap2\&.tdb\&.0 idmap\&.tdb
190
191
.fi
192
.if n \{\
193
.RE
194
.\}
195
.PP
196
Strip the CTDB headers from records by piping through tdbrestore:
197
.sp
198
.if n \{\
199
.RS 4
200
.\}
201
.nf
202
      ltdbtool dump idmap2\&.tdb\&.0 | tdbrestore idmap\&.tdb
203
204
.fi
205
.if n \{\
206
.RE
207
.\}
208
.PP
209
Convert a local tdb from a 64 bit system for usage on a 32 bit system:
210
.sp
211
.if n \{\
212
.RS 4
213
.\}
214
.nf
215
      ltdbtool convert \-s64 \-o32 idmap2\&.tdb\&.0 idmap2\&.tdb\&.1
216
217
.fi
218
.if n \{\
219
.RE
220
.\}
221
.PP
222
Add a default header:
223
.sp
224
.if n \{\
225
.RS 4
226
.\}
227
.nf
228
      ltdbtool convert \-s0 idmap\&.tdb idmap2\&.tdb\&.0
229
230
.fi
231
.if n \{\
232
.RE
233
.\}
234
.SH "SEE ALSO"
235
.PP
236
\fBctdb\fR(1),
237
\fBtdbdump\fR(1),
238
\fBtdbrestore\fR(1),
239
\fBctdb\fR(7),
240
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
241
.SH "AUTHOR"
242
.br
243
.PP
244
This documentation was written by Gregor Beck
245
.SH "COPYRIGHT"
246
.br
247
Copyright \(co 2011 Gregor Beck, Michael Adam
248
.br
249
.PP
250
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\&.
251
.PP
252
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\&.
253
.PP
254
You should have received a copy of the GNU General Public License along with this program; if not, see
255
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
256
.sp
(-)b/net/samba415/files/man/masktest.1 (+113 lines)
Added Link Here
1
'\" t
2
.\"     Title: masktest
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: Test Suite
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "MASKTEST" "1" "09/23/2020" "Samba 4\&.0" "Test Suite"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
masktest \- Find differences in wildcard matching between Samba\*(Aqs implementation and that of a remote server\&.
32
.SH "SYNOPSIS"
33
.HP \w'\fBmasktest\fR\ 'u
34
\fBmasktest\fR {//server/share} [\-U\ user%pass] [\-d\ debuglevel] [\-W\ workgroup] [\-n\ numloops] [\-s\ seed] [\-a] [\-E] [\-M\ max\ protocol] [\-f\ filechars] [\-m\ maskchars] [\-v]
35
.SH "DESCRIPTION"
36
.PP
37
masktest
38
is a utility for detecting differences in behaviour between Samba\*(Aqs own implementation and that of a remote server\&. It will run generate random filenames/masks and check if these match the same files they do on the remote file as they do on the local server\&. It will display any differences it finds\&.
39
.PP
40
This utility is used by the Samba team to find differences in behaviour between Samba and Windows servers\&.
41
.SH "OPTIONS"
42
.PP
43
\-U user%pass
44
.RS 4
45
Specify the user and password to use when logging on on the shares\&. This parameter can be specified twice (once for the first server, once for the second)\&.
46
.RE
47
.PP
48
\-s seed
49
.RS 4
50
Seed the random number generator with the specified value\&.
51
.RE
52
.PP
53
\-n numops
54
.RS 4
55
Set the number of operations to perform\&.
56
.RE
57
.PP
58
\-a
59
.RS 4
60
Print the operations that are performed\&.
61
.RE
62
.PP
63
\-M max_protocol
64
.RS 4
65
Maximum protocol to use\&.
66
.RE
67
.PP
68
\-f
69
.RS 4
70
Specify characters that can be used when generating file names\&. Default: abcdefghijklm\&.
71
.RE
72
.PP
73
\-E
74
.RS 4
75
Abort when difference in behaviour is found\&.
76
.RE
77
.PP
78
\-m maskchars
79
.RS 4
80
Specify characters used for wildcards\&.
81
.RE
82
.PP
83
\-v
84
.RS 4
85
Be verbose
86
.RE
87
.SH "VERSION"
88
.PP
89
This man page is correct for version 4\&.0 of the Samba suite\&.
90
.SH "SEE ALSO"
91
.PP
92
Samba
93
.SH "AUTHOR"
94
.PP
95
This utility is part of the
96
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
97
suite, which is developed by the global
98
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
99
.PP
100
masktest was written by Andrew Tridgell\&.
101
.PP
102
This manpage was written by Jelmer Vernooij\&.
103
.SH "NOTES"
104
.IP " 1." 4
105
Samba
106
.RS 4
107
\%http://www.samba.org/
108
.RE
109
.IP " 2." 4
110
Samba Team
111
.RS 4
112
\%http://www.samba.org/samba/team/
113
.RE
(-)b/net/samba415/files/man/mdfind.1 (+166 lines)
Added Link Here
1
'\" t
2
.\"     Title: mdfind
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: User Commands
7
.\"    Source: Samba 4.12.7
8
.\"  Language: English
9
.\"
10
.TH "MDFIND" "1" "09/23/2020" "Samba 4\&.12\&.7" "User Commands"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
mdfind \- Run Spotlight searches against an SMB server
32
.SH "SYNOPSIS"
33
.HP \w'\ 'u
34
mvxattr {server} {sharename} {query} [\-p,\ \-\-path] [\-L,\ \-\-live]
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(1)
39
suite\&.
40
.PP
41
mdfind is a simple utility to run Spotlight searches against an SMB server that runs the Spotlight
42
\fImdssvc\fR
43
RPC service\&.
44
.SH "OPTIONS"
45
.PP
46
server
47
.RS 4
48
The SMB server name or IP address to connect to\&.
49
.RE
50
.PP
51
sharename
52
.RS 4
53
The name of a share on the server\&.
54
.RE
55
.PP
56
query
57
.RS 4
58
The query expression syntax is a simplified form of filename globbing familiar to shell users\&. Queries have the following format:
59
.sp
60
attribute=="value"
61
.sp
62
For queries against a Samba server with Spotlight enabled using the Elasticsearch backend, the list of supported metadata attributes is given by the JSON attribute mapping file, typically installed at
63
/usr/share/samba/mdssvc/elasticsearch_mappings\&.json
64
.RE
65
.PP
66
\-p PATH, \-\-path=PATH
67
.RS 4
68
Server side path to search, defaults to
69
\fI"/"\fR
70
.RE
71
.PP
72
\-L, \-\-live
73
.RS 4
74
Query remains running\&.
75
.RE
76
.SH "EXAMPLES"
77
.PP
78
Search all indexed metadata attributes, exact match:
79
.sp
80
.if n \{\
81
.RS 4
82
.\}
83
.nf
84
      \*(Aq*=="Samba"\*(Aq
85
86
.fi
87
.if n \{\
88
.RE
89
.\}
90
.PP
91
Search all indexed metadata attributes, prefix match:
92
.sp
93
.if n \{\
94
.RS 4
95
.\}
96
.nf
97
      \*(Aq*=="Samba*"\*(Aq
98
99
.fi
100
.if n \{\
101
.RE
102
.\}
103
.PP
104
Search by filename:
105
.sp
106
.if n \{\
107
.RS 4
108
.\}
109
.nf
110
      \*(AqkMDItemFSName=="Samba*"\*(Aq
111
112
.fi
113
.if n \{\
114
.RE
115
.\}
116
.PP
117
Search by date:
118
.sp
119
.if n \{\
120
.RS 4
121
.\}
122
.nf
123
      \*(AqkMDItemFSContentChangeDate<$time\&.iso(2018\-10\-01T10:00:00Z)\*(Aq
124
125
.fi
126
.if n \{\
127
.RE
128
.\}
129
.PP
130
Search files\*(Aqs content:
131
.sp
132
.if n \{\
133
.RS 4
134
.\}
135
.nf
136
      \*(AqkMDItemTextContent=="Samba*"\*(Aq
137
138
.fi
139
.if n \{\
140
.RE
141
.\}
142
.PP
143
Expressions:
144
.sp
145
.if n \{\
146
.RS 4
147
.\}
148
.nf
149
      kMDItemFSName=="Samba*"||kMDItemTextContent=="Tango*"\*(Aq
150
151
.fi
152
.if n \{\
153
.RE
154
.\}
155
.SH "SEE ALSO"
156
.PP
157
File Metadata Search Programming Guide
158
https://developer\&.apple\&.com/library/archive/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/Introduction\&.html
159
.SH "VERSION"
160
.PP
161
This man page is part of version 4\&.12\&.7 of the Samba suite\&.
162
.SH "AUTHOR"
163
.PP
164
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\&.
165
.PP
166
The mdfind manpage was written by Ralph Boehme\&.
(-)b/net/samba415/files/man/ndrdump.1 (+84 lines)
Added Link Here
1
'\" t
2
.\"     Title: ndrdump
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "NDRDUMP" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ndrdump \- DCE/RPC Packet Parser and Dumper
32
.SH "SYNOPSIS"
33
.HP \w'\fBndrdump\fR\ 'u
34
\fBndrdump\fR [\-c\ context] {pipe} {format} {in|out|struct} {filename}
35
.HP \w'\fBndrdump\fR\ 'u
36
\fBndrdump\fR [pipe]
37
.HP \w'\fBndrdump\fR\ 'u
38
\fBndrdump\fR
39
.SH "DESCRIPTION"
40
.PP
41
ndrdump tries to parse the specified
42
\fIfilename\fR
43
using Samba\*(Aqs parser for the specified pipe and format\&. The third argument should be either
44
\fIin\fR,
45
\fIout\fR
46
or
47
\fIstruct\fRdepending on whether the data should be parsed as a request, reply or a public structure\&.
48
.PP
49
Running ndrdump without arguments will list the pipes for which parsers are available\&.
50
.PP
51
Running ndrdump with one argument will list the functions and public structures that Samba can parse for the specified pipe\&.
52
.PP
53
The primary function of ndrdump is debugging Samba\*(Aqs internal DCE/RPC parsing functions\&. The file being parsed is usually one exported by wiresharks
54
\(lqExport selected packet bytes\(rq
55
function\&.
56
.PP
57
The context argument can be used to load context data from the request packet when parsing reply packets (such as array lengths)\&.
58
.SH "VERSION"
59
.PP
60
This man page is correct for version 4\&.0 of the Samba suite\&.
61
.SH "SEE ALSO"
62
.PP
63
wireshark, pidl
64
.SH "AUTHOR"
65
.PP
66
This utility is part of the
67
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
68
suite, which is developed by the global
69
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
70
.PP
71
ndrdump was written by Andrew Tridgell\&.
72
.PP
73
This manpage was written by Jelmer Vernooij\&.
74
.SH "NOTES"
75
.IP " 1." 4
76
Samba
77
.RS 4
78
\%http://www.samba.org/
79
.RE
80
.IP " 2." 4
81
Samba Team
82
.RS 4
83
\%http://www.samba.org/samba/team/
84
.RE
(-)b/net/samba415/files/man/nmblookup.1 (+225 lines)
Added Link Here
1
'\" t
2
.\"     Title: nmblookup
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: User Commands
7
.\"    Source: Samba 4.12.7
8
.\"  Language: English
9
.\"
10
.TH "NMBLOOKUP" "1" "09/23/2020" "Samba 4\&.12\&.7" "User Commands"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
nmblookup \- NetBIOS over TCP/IP client used to lookup NetBIOS names
32
.SH "SYNOPSIS"
33
.HP \w'\ 'u
34
nmblookup [\-M|\-\-master\-browser] [\-R|\-\-recursion] [\-S|\-\-status] [\-r|\-\-root\-port] [\-A|\-\-lookup\-by\-ip] [\-B|\-\-broadcast\ <broadcast\ address>] [\-U|\-\-unicast\ <unicast\ address>] [\-d\ <debug\ level>] [\-s\ <smb\ config\ file>] [\-i\ <NetBIOS\ scope>] [\-T|\-\-translate] [\-f|\-\-flags] {name}
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(7)
39
suite\&.
40
.PP
41
nmblookup
42
is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries\&. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine\&. All queries are done over UDP\&.
43
.SH "OPTIONS"
44
.PP
45
\-M|\-\-master\-browser
46
.RS 4
47
Searches for a master browser by looking up the NetBIOS
48
\fIname\fR
49
with a type of
50
\fB0x1d\fR\&. If
51
\fI name\fR
52
is "\-" then it does a lookup on the special name
53
\fB__MSBROWSE__\fR\&. Please note that in order to use the name "\-", you need to make sure "\-" isn\*(Aqt parsed as an argument, e\&.g\&. use :
54
\fBnmblookup \-M \-\- \-\fR\&.
55
.RE
56
.PP
57
\-R|\-\-recursion
58
.RS 4
59
Set the recursion desired bit in the packet to do a recursive lookup\&. This is used when sending a name query to a machine running a WINS server and the user wishes to query the names in the WINS server\&. If this bit is unset the normal (broadcast responding) NetBIOS processing code on a machine is used instead\&. See RFC1001, RFC1002 for details\&.
60
.RE
61
.PP
62
\-S|\-\-status
63
.RS 4
64
Once the name query has returned an IP address then do a node status query as well\&. A node status query returns the NetBIOS names registered by a host\&.
65
.RE
66
.PP
67
\-r|\-\-root\-port
68
.RS 4
69
Try and bind to UDP port 137 to send and receive UDP datagrams\&. The reason for this option is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port 137\&. Unfortunately, on most UNIX systems root privilege is needed to bind to this port, and in addition, if the
70
\fBnmbd\fR(8)
71
daemon is running on this machine it also binds to this port\&.
72
.RE
73
.PP
74
\-A|\-\-lookup\-by\-ip
75
.RS 4
76
Interpret
77
\fIname\fR
78
as an IP Address and do a node status query on this address\&.
79
.RE
80
.PP
81
\-n|\-\-netbiosname <primary NetBIOS name>
82
.RS 4
83
This option allows you to override the NetBIOS name that Samba uses for itself\&. This is identical to setting the
84
\m[blue]\fBnetbios name\fR\m[]
85
parameter in the
86
smb\&.conf
87
file\&. However, a command line setting will take precedence over settings in
88
smb\&.conf\&.
89
.RE
90
.PP
91
\-i|\-\-scope <scope>
92
.RS 4
93
This specifies a NetBIOS scope that
94
nmblookup
95
will use to communicate with when generating NetBIOS names\&. For details on the use of NetBIOS scopes, see rfc1001\&.txt and rfc1002\&.txt\&. NetBIOS scopes are
96
\fIvery\fR
97
rarely used, only set this parameter if you are the system administrator in charge of all the NetBIOS systems you communicate with\&.
98
.RE
99
.PP
100
\-W|\-\-workgroup=domain
101
.RS 4
102
Set the SMB domain of the username\&. This overrides the default domain which is the domain defined in smb\&.conf\&. If the domain specified is the same as the servers NetBIOS name, it causes the client to log on using the servers local SAM (as opposed to the Domain SAM)\&.
103
.RE
104
.PP
105
\-O|\-\-socket\-options socket options
106
.RS 4
107
TCP socket options to set on the client socket\&. See the socket options parameter in the
108
smb\&.conf
109
manual page for the list of valid options\&.
110
.RE
111
.PP
112
\-?|\-\-help
113
.RS 4
114
Print a summary of command line options\&.
115
.RE
116
.PP
117
\-\-usage
118
.RS 4
119
Display brief usage message\&.
120
.RE
121
.PP
122
\-B|\-\-broadcast <broadcast address>
123
.RS 4
124
Send the query to the given broadcast address\&. Without this option the default behavior of nmblookup is to send the query to the broadcast address of the network interfaces as either auto\-detected or defined in the
125
\fIinterfaces\fR
126
parameter of the
127
\fBsmb.conf\fR(5)
128
file\&.
129
.RE
130
.PP
131
\-U|\-\-unicast <unicast address>
132
.RS 4
133
Do a unicast query to the specified address or host
134
\fIunicast address\fR\&. This option (along with the
135
\fI\-R\fR
136
option) is needed to query a WINS server\&.
137
.RE
138
.PP
139
\-d|\-\-debuglevel=level
140
.RS 4
141
\fIlevel\fR
142
is an integer from 0 to 10\&. The default value if this parameter is not specified is 0\&.
143
.sp
144
The higher this value, the more detail will be logged to the log files about the activities of the server\&. At level 0, only critical errors and serious warnings will be logged\&. Level 1 is a reasonable level for day\-to\-day running \- it generates a small amount of information about operations carried out\&.
145
.sp
146
Levels above 1 will generate considerable amounts of log data, and should only be used when investigating a problem\&. Levels above 3 are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic\&.
147
.sp
148
Note that specifying this parameter here will override the
149
\m[blue]\fBlog level\fR\m[]
150
parameter in the
151
smb\&.conf
152
file\&.
153
.RE
154
.PP
155
\-V|\-\-version
156
.RS 4
157
Prints the program version number\&.
158
.RE
159
.PP
160
\-s|\-\-configfile=<configuration file>
161
.RS 4
162
The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
163
smb\&.conf
164
for more information\&. The default configuration file name is determined at compile time\&.
165
.RE
166
.PP
167
\-l|\-\-log\-basename=logdirectory
168
.RS 4
169
Base directory name for log/debug files\&. The extension
170
\fB"\&.progname"\fR
171
will be appended (e\&.g\&. log\&.smbclient, log\&.smbd, etc\&.\&.\&.)\&. The log file is never removed by the client\&.
172
.RE
173
.PP
174
\-\-option=<name>=<value>
175
.RS 4
176
Set the
177
\fBsmb.conf\fR(5)
178
option "<name>" to value "<value>" from the command line\&. This overrides compiled\-in defaults and options read from the configuration file\&.
179
.RE
180
.PP
181
\-T|\-\-translate
182
.RS 4
183
This causes any IP addresses found in the lookup to be looked up via a reverse DNS lookup into a DNS name, and printed out before each
184
.sp
185
\fIIP address \&.\&.\&.\&. NetBIOS name\fR
186
.sp
187
pair that is the normal output\&.
188
.RE
189
.PP
190
\-f|\-\-flags
191
.RS 4
192
Show which flags apply to the name that has been looked up\&. Possible answers are zero or more of: Response, Authoritative, Truncated, Recursion_Desired, Recursion_Available, Broadcast\&.
193
.RE
194
.PP
195
name
196
.RS 4
197
This is the NetBIOS name being queried\&. Depending upon the previous options this may be a NetBIOS name or IP address\&. If a NetBIOS name then the different name types may be specified by appending \*(Aq#<type>\*(Aq to the name\&. This name may also be \*(Aq*\*(Aq, which will return all registered names within a broadcast area\&.
198
.RE
199
.SH "EXAMPLES"
200
.PP
201
nmblookup
202
can be used to query a WINS server (in the same way
203
nslookup
204
is used to query DNS servers)\&. To query a WINS server,
205
nmblookup
206
must be called like this:
207
.PP
208
nmblookup \-U server \-R \*(Aqname\*(Aq
209
.PP
210
For example, running :
211
.PP
212
nmblookup \-U samba\&.org \-R \*(AqIRIX#1B\*(Aq
213
.PP
214
would query the WINS server samba\&.org for the domain master browser (1B name type) for the IRIX workgroup\&.
215
.SH "VERSION"
216
.PP
217
This man page is part of version 4\&.12\&.7 of the Samba suite\&.
218
.SH "SEE ALSO"
219
.PP
220
\fBnmbd\fR(8),
221
\fBsamba\fR(7), and
222
\fBsmb.conf\fR(5)\&.
223
.SH "AUTHOR"
224
.PP
225
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\&.
(-)b/net/samba415/files/man/nmblookup4.1 (+157 lines)
Added Link Here
1
'\" t
2
.\"     Title: nmblookup4
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 03/24/2017
6
.\"    Manual: User Commands
7
.\"    Source: Samba 3.2
8
.\"  Language: English
9
.\"
10
.TH "NMBLOOKUP4" "1" "03/24/2017" "Samba 3\&.2" "User Commands"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
nmblookup4 \- NetBIOS over TCP/IP client used to lookup NetBIOS names
32
.SH "SYNOPSIS"
33
.HP \w'\fBnmblookup4\fR\ 'u
34
\fBnmblookup4\fR [\-M] [\-R] [\-S] [\-r] [\-A] [\-h] [\-B\ <broadcast\ address>] [\-U\ <unicast\ address>] [\-d\ <debug\ level>] [\-s\ <smb\ config\ file>] [\-i\ <NetBIOS\ scope>] [\-T] [\-f] {name}
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(7)
39
suite\&.
40
.PP
41
\fBnmblookup4\fR
42
is used to query NetBIOS names and map them to IP addresses in a network using NetBIOS over TCP/IP queries\&. The options allow the name queries to be directed at a particular IP broadcast area or to a particular machine\&. All queries are done over UDP\&.
43
.SH "OPTIONS"
44
.PP
45
\-M
46
.RS 4
47
Searches for a master browser by looking up the NetBIOS
48
\fIname\fR
49
with a type of
50
\fB0x1d\fR\&. If
51
\fI name\fR
52
is "\-" then it does a lookup on the special name
53
\fB__MSBROWSE__\fR\&. Please note that in order to use the name "\-", you need to make sure "\-" isn\*(Aqt parsed as an argument, e\&.g\&. use :
54
\fBnmblookup4 \-M \-\- \-\fR\&.
55
.RE
56
.PP
57
\-R
58
.RS 4
59
Set the recursion desired bit in the packet to do a recursive lookup\&. This is used when sending a name query to a machine running a WINS server and the user wishes to query the names in the WINS server\&. If this bit is unset the normal (broadcast responding) NetBIOS processing code on a machine is used instead\&. See RFC1001, RFC1002 for details\&.
60
.RE
61
.PP
62
\-S
63
.RS 4
64
Once the name query has returned an IP address then do a node status query as well\&. A node status query returns the NetBIOS names registered by a host\&.
65
.RE
66
.PP
67
\-r
68
.RS 4
69
Try and bind to UDP port 137 to send and receive UDP datagrams\&. The reason for this option is a bug in Windows 95 where it ignores the source port of the requesting packet and only replies to UDP port 137\&. Unfortunately, on most UNIX systems root privilege is needed to bind to this port, and in addition, if the
70
\fBnmbd\fR(8)
71
daemon is running on this machine it also binds to this port\&.
72
.RE
73
.PP
74
\-A
75
.RS 4
76
Interpret
77
\fIname\fR
78
as an IP Address and do a node status query on this address\&.
79
.RE
80
.PP
81
\-B <broadcast address>
82
.RS 4
83
Send the query to the given broadcast address\&. Without this option the default behavior of nmblookup4 is to send the query to the broadcast address of the network interfaces as either auto\-detected or defined in the
84
\m[blue]\fB\fIinterfaces\fR\fR\m[]\&\s-2\u[1]\d\s+2
85
parameter of the
86
\fBsmb.conf\fR(5)
87
file\&.
88
.RE
89
.PP
90
\-U <unicast address>
91
.RS 4
92
Do a unicast query to the specified address or host
93
\fIunicast address\fR\&. This option (along with the
94
\fI\-R\fR
95
option) is needed to query a WINS server\&.
96
.RE
97
.PP
98
\-T
99
.RS 4
100
This causes any IP addresses found in the lookup to be looked up via a reverse DNS lookup into a DNS name, and printed out before each
101
.sp
102
\fIIP address \&.\&.\&.\&. NetBIOS name\fR
103
.sp
104
pair that is the normal output\&.
105
.RE
106
.PP
107
\-f
108
.RS 4
109
Show which flags apply to the name that has been looked up\&. Possible answers are zero or more of: Response, Authoritative, Truncated, Recursion_Desired, Recursion_Available, Broadcast\&.
110
.RE
111
.PP
112
name
113
.RS 4
114
This is the NetBIOS name being queried\&. Depending upon the previous options this may be a NetBIOS name or IP address\&. If a NetBIOS name then the different name types may be specified by appending \*(Aq#<type>\*(Aq to the name\&. This name may also be \*(Aq*\*(Aq, which will return all registered names within a broadcast area\&.
115
.RE
116
.SH "EXAMPLES"
117
.PP
118
\fBnmblookup4\fR
119
can be used to query a WINS server (in the same way
120
\fBnslookup\fR
121
is used to query DNS servers)\&. To query a WINS server,
122
\fBnmblookup4\fR
123
must be called like this:
124
.PP
125
\fBnmblookup4 \-U server \-R \*(Aqname\*(Aq\fR
126
.PP
127
For example, running :
128
.PP
129
\fBnmblookup4 \-U samba\&.org \-R \*(AqIRIX#1B\*(Aq\fR
130
.PP
131
would query the WINS server samba\&.org for the domain master browser (1B name type) for the IRIX workgroup\&.
132
.SH "VERSION"
133
.PP
134
This man page is correct for version 3 of the Samba suite\&.
135
.SH "SEE ALSO"
136
.PP
137
\fBnmbd\fR(8),
138
\fBsamba\fR(7), and
139
\fBsmb.conf\fR(5)\&.
140
.SH "AUTHOR"
141
.PP
142
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\&.
143
.PP
144
The original Samba man pages were written by Karl Auer\&. The man page sources were converted to YODL format (another excellent piece of Open Source software, available at
145
\m[blue]\fBftp://ftp\&.icce\&.rug\&.nl/pub/unix/\fR\m[]\&\s-2\u[2]\d\s+2) and updated for the Samba 2\&.0 release by Jeremy Allison\&. The conversion to DocBook for Samba 2\&.2 was done by Gerald Carter\&. The conversion to DocBook XML 4\&.2 for Samba 3\&.0 was done by Alexander Bokovoy\&.
146
.SH "NOTES"
147
.IP " 1." 4
148
\fIinterfaces\fR
149
150
.RS 4
151
\%[set $man.base.url.for.relative.links]/smb.conf.5.html#INTERFACES
152
.RE
153
.IP " 2." 4
154
ftp://ftp.icce.rug.nl/pub/unix/
155
.RS 4
156
\%ftp://ftp.icce.rug.nl/pub/unix/
157
.RE
(-)b/net/samba415/files/man/ntlm_auth.1 (+429 lines)
Added Link Here
1
'\" t
2
.\"     Title: ntlm_auth
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: User Commands
7
.\"    Source: Samba 4.12.7
8
.\"  Language: English
9
.\"
10
.TH "NTLM_AUTH" "1" "09/23/2020" "Samba 4\&.12\&.7" "User Commands"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ntlm_auth \- tool to allow external access to Winbind\*(Aqs NTLM authentication function
32
.SH "SYNOPSIS"
33
.HP \w'\ 'u
34
ntlm_auth
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(7)
39
suite\&.
40
.PP
41
ntlm_auth
42
is a helper utility that authenticates users using NT/LM authentication\&. It returns 0 if the users is authenticated successfully and 1 if access was denied\&. ntlm_auth uses winbind to access the user and authentication data for a domain\&. This utility is only intended to be used by other programs (currently
43
Squid
44
and
45
mod_ntlm_winbind)
46
.SH "OPERATIONAL REQUIREMENTS"
47
.PP
48
The
49
\fBwinbindd\fR(8)
50
daemon must be operational for many of these commands to function\&.
51
.PP
52
Some of these commands also require access to the directory
53
winbindd_privileged
54
in
55
$LOCKDIR\&. This should be done either by running this command as root or providing group access to the
56
winbindd_privileged
57
directory\&. For security reasons, this directory should not be world\-accessable\&.
58
.SH "OPTIONS"
59
.PP
60
\-\-helper\-protocol=PROTO
61
.RS 4
62
Operate as a stdio\-based helper\&. Valid helper protocols are:
63
.PP
64
squid\-2\&.4\-basic
65
.RS 4
66
Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&.
67
.RE
68
.PP
69
squid\-2\&.5\-basic
70
.RS 4
71
Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&.
72
.RE
73
.PP
74
squid\-2\&.5\-ntlmssp
75
.RS 4
76
Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&.
77
.sp
78
Requires access to the directory
79
winbindd_privileged
80
in
81
$LOCKDIR\&. The protocol used is described here:
82
http://devel\&.squid\-cache\&.org/ntlm/squid_helper_protocol\&.html\&. This protocol has been extended to allow the NTLMSSP Negotiate packet to be included as an argument to the
83
YR
84
command\&. (Thus avoiding loss of information in the protocol exchange)\&.
85
.RE
86
.PP
87
ntlmssp\-client\-1
88
.RS 4
89
Client\-side helper for use with arbitrary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowledge\&.
90
.sp
91
This helper is a client, and as such may be run by any user\&. The protocol used is effectively the reverse of the previous protocol\&. A
92
YR
93
command (without any arguments) starts the authentication exchange\&.
94
.RE
95
.PP
96
gss\-spnego
97
.RS 4
98
Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as
99
squid\-2\&.5\-ntlmssp, but has some subtle differences that are undocumented outside the source at this stage\&.
100
.sp
101
Requires access to the directory
102
winbindd_privileged
103
in
104
$LOCKDIR\&.
105
.RE
106
.PP
107
gss\-spnego\-client
108
.RS 4
109
Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&.
110
.RE
111
.PP
112
ntlm\-server\-1
113
.RS 4
114
Server\-side helper protocol, intended for use by a RADIUS server or the \*(Aqwinbind\*(Aq plugin for pppd, for the provision of MSCHAP and MSCHAPv2 authentication\&.
115
.sp
116
This protocol consists of lines in the form:
117
Parameter: value
118
and
119
Parameter:: Base64\-encode value\&. The presence of a single period
120
\&.
121
indicates that one side has finished supplying data to the other\&. (Which in turn could cause the helper to authenticate the user)\&.
122
.sp
123
Currently implemented parameters from the external program to the helper are:
124
.PP
125
Username
126
.RS 4
127
The username, expected to be in Samba\*(Aqs
128
\m[blue]\fBunix charset\fR\m[]\&.
129
.PP
130
Examples:
131
.RS 4
132
Username: bob
133
.sp
134
Username:: Ym9i
135
.RE
136
.RE
137
.PP
138
NT\-Domain
139
.RS 4
140
The user\*(Aqs domain, expected to be in Samba\*(Aqs
141
\m[blue]\fBunix charset\fR\m[]\&.
142
.PP
143
Examples:
144
.RS 4
145
NT\-Domain: WORKGROUP
146
.sp
147
NT\-Domain:: V09SS0dST1VQ
148
.RE
149
.RE
150
.PP
151
Full\-Username
152
.RS 4
153
The fully qualified username, expected to be in Samba\*(Aqs
154
\m[blue]\fBunix charset\fR\m[]
155
and qualified with the
156
\m[blue]\fBwinbind separator\fR\m[]\&.
157
.PP
158
Examples:
159
.RS 4
160
Full\-Username: WORKGROUP\ebob
161
.sp
162
Full\-Username:: V09SS0dST1VQYm9i
163
.RE
164
.RE
165
.PP
166
LANMAN\-Challenge
167
.RS 4
168
The 8 byte
169
LANMAN Challenge
170
value, generated randomly by the server, or (in cases such as MSCHAPv2) generated in some way by both the server and the client\&.
171
.PP
172
Examples:
173
.RS 4
174
LANMAN\-Challenge: 0102030405060708
175
.RE
176
.RE
177
.PP
178
LANMAN\-Response
179
.RS 4
180
The 24 byte
181
LANMAN Response
182
value, calculated from the user\*(Aqs password and the supplied
183
LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
184
.PP
185
Examples:
186
.RS 4
187
LANMAN\-Response: 0102030405060708090A0B0C0D0E0F101112131415161718
188
.RE
189
.RE
190
.PP
191
NT\-Response
192
.RS 4
193
The >= 24 byte
194
NT Response
195
calculated from the user\*(Aqs password and the supplied
196
LANMAN Challenge\&. Typically, this is provided over the network by a client wishing to authenticate\&.
197
.PP
198
Examples:
199
.RS 4
200
NT\-Response: 0102030405060708090A0B0C0D0E0F10111213141516171
201
.RE
202
.RE
203
.PP
204
Password
205
.RS 4
206
The user\*(Aqs password\&. This would be provided by a network client, if the helper is being used in a legacy situation that exposes plaintext passwords in this way\&.
207
.PP
208
Examples:
209
.RS 4
210
Password: samba2
211
.sp
212
Password:: c2FtYmEy
213
.RE
214
.RE
215
.PP
216
Request\-User\-Session\-Key
217
.RS 4
218
Upon successful authentication, return the user session key associated with the login\&.
219
.PP
220
Examples:
221
.RS 4
222
Request\-User\-Session\-Key: Yes
223
.RE
224
.RE
225
.PP
226
Request\-LanMan\-Session\-Key
227
.RS 4
228
Upon successful authentication, return the LANMAN session key associated with the login\&.
229
.PP
230
Examples:
231
.RS 4
232
Request\-LanMan\-Session\-Key: Yes
233
.RE
234
.RE
235
.RE
236
.sp
237
.if n \{\
238
.sp
239
.\}
240
.RS 4
241
.it 1 an-trap
242
.nr an-no-space-flag 1
243
.nr an-break-flag 1
244
.br
245
.ps +1
246
\fBWarning\fR
247
.ps -1
248
.br
249
Implementers should take care to base64 encode any data (such as usernames/passwords) that may contain malicious user data, such as a newline\&. They may also need to decode strings from the helper, which likewise may have been base64 encoded\&.
250
.sp .5v
251
.RE
252
.RE
253
.PP
254
\-\-username=USERNAME
255
.RS 4
256
Specify username of user to authenticate
257
.RE
258
.PP
259
\-\-domain=DOMAIN
260
.RS 4
261
Specify domain of user to authenticate
262
.RE
263
.PP
264
\-\-workstation=WORKSTATION
265
.RS 4
266
Specify the workstation the user authenticated from
267
.RE
268
.PP
269
\-\-challenge=STRING
270
.RS 4
271
NTLM challenge (in HEXADECIMAL)
272
.RE
273
.PP
274
\-\-lm\-response=RESPONSE
275
.RS 4
276
LM Response to the challenge (in HEXADECIMAL)
277
.RE
278
.PP
279
\-\-nt\-response=RESPONSE
280
.RS 4
281
NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
282
.RE
283
.PP
284
\-\-password=PASSWORD
285
.RS 4
286
User\*(Aqs plaintext password
287
.sp
288
If not specified on the command line, this is prompted for when required\&.
289
.sp
290
For the NTLMSSP based server roles, this parameter specifies the expected password, allowing testing without winbindd operational\&.
291
.RE
292
.PP
293
\-\-request\-lm\-key
294
.RS 4
295
Retrieve LM session key
296
.RE
297
.PP
298
\-\-request\-nt\-key
299
.RS 4
300
Request NT key
301
.RE
302
.PP
303
\-\-diagnostics
304
.RS 4
305
Perform Diagnostics on the authentication chain\&. Uses the password from
306
\-\-password
307
or prompts for one\&.
308
.RE
309
.PP
310
\-\-require\-membership\-of={SID|Name}
311
.RS 4
312
Require that a user be a member of specified group (either name or SID) for authentication to succeed\&.
313
.RE
314
.PP
315
\-\-pam\-winbind\-conf=FILENAME
316
.RS 4
317
Define the path to the pam_winbind\&.conf file\&.
318
.RE
319
.PP
320
\-\-target\-hostname=HOSTNAME
321
.RS 4
322
Define the target hostname\&.
323
.RE
324
.PP
325
\-\-target\-service=SERVICE
326
.RS 4
327
Define the target service\&.
328
.RE
329
.PP
330
\-\-use\-cached\-creds
331
.RS 4
332
Whether to use credentials cached by winbindd\&.
333
.RE
334
.PP
335
\-\-allow\-mschapv2
336
.RS 4
337
Explicitly allow MSCHAPv2\&.
338
.RE
339
.PP
340
\-\-offline\-logon
341
.RS 4
342
Allow offline logons for plain text auth\&.
343
.RE
344
.PP
345
\-\-configfile=<configuration file>
346
.RS 4
347
The file specified contains the configuration details required by the server\&. The information in this file includes server\-specific information such as what printcap file to use, as well as descriptions of all the services that the server is to provide\&. See
348
smb\&.conf
349
for more information\&. The default configuration file name is determined at compile time\&.
350
.RE
351
.PP
352
\-V|\-\-version
353
.RS 4
354
Prints the program version number\&.
355
.RE
356
.PP
357
\-?|\-\-help
358
.RS 4
359
Print a summary of command line options\&.
360
.RE
361
.PP
362
\-\-usage
363
.RS 4
364
Display brief usage message\&.
365
.RE
366
.SH "EXAMPLE SETUP"
367
.PP
368
To setup ntlm_auth for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the
369
squid\&.conf
370
file\&.
371
.sp
372
.if n \{\
373
.RS 4
374
.\}
375
.nf
376
auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp
377
auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic
378
auth_param basic children 5
379
auth_param basic realm Squid proxy\-caching web server
380
auth_param basic credentialsttl 2 hours
381
.fi
382
.if n \{\
383
.RE
384
.\}
385
.if n \{\
386
.sp
387
.\}
388
.RS 4
389
.it 1 an-trap
390
.nr an-no-space-flag 1
391
.nr an-break-flag 1
392
.br
393
.ps +1
394
\fBNote\fR
395
.ps -1
396
.br
397
.PP
398
This example assumes that ntlm_auth has been installed into your path, and that the group permissions on
399
winbindd_privileged
400
are as described above\&.
401
.sp .5v
402
.RE
403
.PP
404
To setup ntlm_auth for use by squid 2\&.5 with group limitation in addition to the above example, the following should be added to the
405
squid\&.conf
406
file\&.
407
.sp
408
.if n \{\
409
.RS 4
410
.\}
411
.nf
412
auth_param ntlm program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
413
auth_param basic program ntlm_auth \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
414
.fi
415
.if n \{\
416
.RE
417
.\}
418
.SH "TROUBLESHOOTING"
419
.PP
420
If you\*(Aqre experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millennium Edition against ntlm_auth\*(Aqs NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read
421
the Microsoft Knowledge Base article #239869 and follow instructions described there\&.
422
.SH "VERSION"
423
.PP
424
This man page is part of version 4\&.12\&.7 of the Samba suite\&.
425
.SH "AUTHOR"
426
.PP
427
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\&.
428
.PP
429
The ntlm_auth manpage was written by Jelmer Vernooij and Andrew Bartlett\&.
(-)b/net/samba415/files/man/ntlm_auth4.1 (+233 lines)
Added Link Here
1
'\" t
2
.\"     Title: ntlm_auth4
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 03/24/2017
6
.\"    Manual: User Commands
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "NTLM_AUTH4" "1" "03/24/2017" "Samba 4\&.0" "User Commands"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ntlm_auth4 \- tool to allow external access to Winbind\*(Aqs NTLM authentication function
32
.SH "SYNOPSIS"
33
.HP \w'\fBntlm_auth4\fR\ 'u
34
\fBntlm_auth4\fR [\-d\ debuglevel] [\-l\ logdir] [\-s\ <smb\ config\ file>]
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(7)
39
suite\&.
40
.PP
41
\fBntlm_auth4\fR
42
is a helper utility that authenticates users using NT/LM authentication\&. It returns 0 if the users is authenticated successfully and 1 if access was denied\&. ntlm_auth4 uses winbind to access the user and authentication data for a domain\&. This utility is only indended to be used by other programs (currently squid)\&.
43
.SH "OPERATIONAL REQUIREMENTS"
44
.PP
45
The
46
\fBwinbindd\fR(8)
47
daemon must be operational for many of these commands to function\&.
48
.PP
49
Some of these commands also require access to the directory
50
winbindd_privileged
51
in
52
$LOCKDIR\&. This should be done either by running this command as root or providing group access to the
53
winbindd_privileged
54
directory\&. For security reasons, this directory should not be world\-accessable\&.
55
.SH "OPTIONS"
56
.PP
57
\-\-helper\-protocol=PROTO
58
.RS 4
59
Operate as a stdio\-based helper\&. Valid helper protocols are:
60
.PP
61
squid\-2\&.4\-basic
62
.RS 4
63
Server\-side helper for use with Squid 2\&.4\*(Aqs basic (plaintext) authentication\&.
64
.RE
65
.PP
66
squid\-2\&.5\-basic
67
.RS 4
68
Server\-side helper for use with Squid 2\&.5\*(Aqs basic (plaintext) authentication\&.
69
.RE
70
.PP
71
squid\-2\&.5\-ntlmssp
72
.RS 4
73
Server\-side helper for use with Squid 2\&.5\*(Aqs NTLMSSP authentication\&.
74
.sp
75
Requires access to the directory
76
winbindd_privileged
77
in
78
$LOCKDIR\&. The protocol used is described here:
79
\m[blue]\fBhttp://devel\&.squid\-cache\&.org/ntlm/squid_helper_protocol\&.html\fR\m[]
80
.RE
81
.PP
82
ntlmssp\-client\-1
83
.RS 4
84
Cleint\-side helper for use with arbitary external programs that may wish to use Samba\*(Aqs NTLMSSP authentication knowlege\&.
85
.sp
86
This helper is a client, and as such may be run by any user\&. The protocol used is effectivly the reverse of the previous protocol\&.
87
.RE
88
.PP
89
gss\-spnego
90
.RS 4
91
Server\-side helper that implements GSS\-SPNEGO\&. This uses a protocol that is almost the same as
92
\fBsquid\-2\&.5\-ntlmssp\fR, but has some subtle differences that are undocumented outside the source at this stage\&.
93
.sp
94
Requires access to the directory
95
winbindd_privileged
96
in
97
$LOCKDIR\&.
98
.RE
99
.PP
100
gss\-spnego\-client
101
.RS 4
102
Client\-side helper that implements GSS\-SPNEGO\&. This also uses a protocol similar to the above helpers, but is currently undocumented\&.
103
.RE
104
.RE
105
.PP
106
\-\-username=USERNAME
107
.RS 4
108
Specify username of user to authenticate
109
.RE
110
.PP
111
\-\-domain=DOMAIN
112
.RS 4
113
Specify domain of user to authenticate
114
.RE
115
.PP
116
\-\-workstation=WORKSTATION
117
.RS 4
118
Specify the workstation the user authenticated from
119
.RE
120
.PP
121
\-\-challenge=STRING
122
.RS 4
123
NTLM challenge (in HEXADECIMAL)
124
.RE
125
.PP
126
\-\-lm\-response=RESPONSE
127
.RS 4
128
LM Response to the challenge (in HEXADECIMAL)
129
.RE
130
.PP
131
\-\-nt\-response=RESPONSE
132
.RS 4
133
NT or NTLMv2 Response to the challenge (in HEXADECIMAL)
134
.RE
135
.PP
136
\-\-password=PASSWORD
137
.RS 4
138
User\*(Aqs plaintext password
139
.sp
140
If not specified on the command line, this is prompted for when required\&.
141
.RE
142
.PP
143
\-\-request\-lm\-key
144
.RS 4
145
Retrieve LM session key
146
.RE
147
.PP
148
\-\-request\-nt\-key
149
.RS 4
150
Request NT key
151
.RE
152
.PP
153
\-\-diagnostics
154
.RS 4
155
Perform Diagnostics on the authentication chain\&. Uses the password from
156
\fB\-\-password\fR
157
or prompts for one\&.
158
.RE
159
.PP
160
\-\-require\-membership\-of={SID|Name}
161
.RS 4
162
Require that a user be a member of specified group (either name or SID) for authentication to succeed\&.
163
.RE
164
.SH "EXAMPLE SETUP"
165
.PP
166
To setup ntlm_auth4 for use by squid 2\&.5, with both basic and NTLMSSP authentication, the following should be placed in the
167
squid\&.conf
168
file\&.
169
.sp
170
.if n \{\
171
.RS 4
172
.\}
173
.nf
174
auth_param ntlm program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-ntlmssp
175
auth_param basic program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-basic
176
auth_param basic children 5
177
auth_param basic realm Squid proxy\-caching web server
178
auth_param basic credentialsttl 2 hours
179
.fi
180
.if n \{\
181
.RE
182
.\}
183
.if n \{\
184
.sp
185
.\}
186
.RS 4
187
.it 1 an-trap
188
.nr an-no-space-flag 1
189
.nr an-break-flag 1
190
.br
191
.ps +1
192
\fBNote\fR
193
.ps -1
194
.br
195
.PP
196
This example assumes that ntlm_auth4 has been installed into your path, and that the group permissions on
197
winbindd_privileged
198
are as described above\&.
199
.sp .5v
200
.RE
201
.PP
202
To setup ntlm_auth4 for use by squid 2\&.5 with group limitation in addition to the above example, the following should be added to the
203
squid\&.conf
204
file\&.
205
.sp
206
.if n \{\
207
.RS 4
208
.\}
209
.nf
210
auth_param ntlm program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-ntlmssp \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
211
auth_param basic program ntlm_auth4 \-\-helper\-protocol=squid\-2\&.5\-basic \-\-require\-membership\-of=\*(AqWORKGROUP\eDomain Users\*(Aq
212
.fi
213
.if n \{\
214
.RE
215
.\}
216
.SH "TROUBLESHOOTING"
217
.PP
218
If you\*(Aqre experiencing problems with authenticating Internet Explorer running under MS Windows 9X or Millenium Edition against ntlm_auth4\*(Aqs NTLMSSP authentication helper (\-\-helper\-protocol=squid\-2\&.5\-ntlmssp), then please read
219
\m[blue]\fBthe Microsoft Knowledge Base article #239869 and follow instructions described there\fR\m[]\&\s-2\u[1]\d\s+2\&.
220
.SH "VERSION"
221
.PP
222
This man page is correct for version 3\&.0 of the Samba suite\&.
223
.SH "AUTHOR"
224
.PP
225
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\&.
226
.PP
227
The ntlm_auth4 manpage was written by Jelmer Vernooij and Andrew Bartlett\&.
228
.SH "NOTES"
229
.IP " 1." 4
230
the Microsoft Knowledge Base article #239869 and follow instructions described there
231
.RS 4
232
\%http://support.microsoft.com/support/kb/articles/Q239/8/69.ASP
233
.RE
(-)b/net/samba415/files/man/oLschema2ldif.1 (+74 lines)
Added Link Here
1
'\" t
2
.\"     Title: oLschema2ldif
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "OLSCHEMA2LDIF" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
oLschema2ldif \- Converts LDAP schema\*(Aqs to LDB\-compatible LDIF
32
.SH "SYNOPSIS"
33
.HP \w'\fBoLschema2ldif\fR\ 'u
34
\fBoLschema2ldif\fR [\-I\ INPUT\-FILE] [\-O\ OUTPUT\-FILE]
35
.SH "DESCRIPTION"
36
.PP
37
oLschema2ldif is a simple tool that converts standard OpenLDAP schema files to a LDIF format that is understood by LDB\&.
38
.SH "OPTIONS"
39
.PP
40
\-I input\-file
41
.RS 4
42
OpenLDAP schema to read\&. If none are specified, the schema file will be read from standard input\&.
43
.RE
44
.PP
45
\-O output\-file
46
.RS 4
47
File to write ldif version of schema to\&.
48
.RE
49
.SH "VERSION"
50
.PP
51
This man page is correct for version 4\&.0 of the Samba suite\&.
52
.SH "SEE ALSO"
53
.PP
54
ldb(7), ldbmodify, ldbdel, ldif(5)
55
.SH "AUTHOR"
56
.PP
57
ldb was written by
58
\m[blue]\fBAndrew Tridgell\fR\m[]\&\s-2\u[1]\d\s+2\&. oLschema2ldif was written by
59
\m[blue]\fBSimo Sorce\fR\m[]\&\s-2\u[2]\d\s+2\&.
60
.PP
61
If you wish to report a problem or make a suggestion then please see the
62
\m[blue]\fB\%http://ldb.samba.org/\fR\m[]
63
web site for current contact and maintainer information\&.
64
.SH "NOTES"
65
.IP " 1." 4
66
Andrew Tridgell
67
.RS 4
68
\%https://www.samba.org/~tridge/
69
.RE
70
.IP " 2." 4
71
Simo Sorce
72
.RS 4
73
\%mailto:idra@samba.org
74
.RE
(-)b/net/samba415/files/man/onnode.1 (+218 lines)
Added Link Here
1
'\" t
2
.\"     Title: onnode
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "ONNODE" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
onnode \- run commands on CTDB cluster nodes
32
.SH "SYNOPSIS"
33
.HP \w'\fBonnode\fR\ 'u
34
\fBonnode\fR [\fIOPTION\fR...] {\fINODES\fR} {\fICOMMAND\fR}
35
.SH "DESCRIPTION"
36
.PP
37
onnode is a utility to run commands on a specific node of a CTDB cluster, or on all nodes\&.
38
.PP
39
\fINODES\fR
40
specifies which node(s) to run a command on\&. See section
41
NODES SPECIFICATION
42
for details\&.
43
.PP
44
\fICOMMAND\fR
45
can be any shell command\&. The onnode utility uses ssh or rsh to connect to the remote nodes and run the command\&.
46
.SH "OPTIONS"
47
.PP
48
\-c
49
.RS 4
50
Execute COMMAND in the current working directory on the specified nodes\&.
51
.RE
52
.PP
53
\-f \fIFILENAME\fR
54
.RS 4
55
Specify an alternative nodes FILENAME to use instead of the default\&. See the discussion of
56
/usr/local/etc/ctdb/nodes
57
in the FILES section for more details\&.
58
.RE
59
.PP
60
\-i
61
.RS 4
62
Keep standard input open, allowing data to be piped to onnode\&. Normally onnode closes stdin to avoid surprises when scripting\&. Note that this option is ignored when using
63
\fB\-p\fR
64
or if
65
\fBONNODE_SSH\fR
66
is set to anything other than "ssh"\&.
67
.RE
68
.PP
69
\-n
70
.RS 4
71
Allow nodes to be specified by name rather than node numbers\&. These nodes don\*(Aqt need to be listed in the nodes file\&. You can avoid the nodes file entirely by combining this with
72
\-f /dev/null\&.
73
.RE
74
.PP
75
\-p
76
.RS 4
77
Run COMMAND in parallel on the specified nodes\&. The default is to run COMMAND sequentially on each node\&.
78
.RE
79
.PP
80
\-P
81
.RS 4
82
Push files to nodes\&. Names of files to push are specified rather than the usual command\&. Quoting is fragile/broken \- filenames with whitespace in them are not supported\&.
83
.RE
84
.PP
85
\-q
86
.RS 4
87
Do not print node addresses\&. Normally, onnode prints informational node addresses if more than one node is specified\&. This overrides \-v\&.
88
.RE
89
.PP
90
\-v
91
.RS 4
92
Print node addresses even if only one node is specified\&. Normally, onnode prints informational node addresses when more than one node is specified\&.
93
.RE
94
.PP
95
\-h, \-\-help
96
.RS 4
97
Show a short usage guide\&.
98
.RE
99
.SH "NODES SPECIFICATION"
100
.PP
101
Nodes can be specified via numeric node numbers (from 0 to N\-1) or mnemonics\&. Multiple nodes are specified using lists of nodes, separated by commas, and ranges of numeric node numbers, separated by dashes\&. If nodes are specified multiple times then the command will be executed multiple times on those nodes\&. The order of nodes is significant\&.
102
.PP
103
The following mnemonics are available:
104
.PP
105
all
106
.RS 4
107
All nodes\&.
108
.RE
109
.PP
110
any
111
.RS 4
112
A node where ctdbd is running\&. This semi\-random but there is a bias towards choosing a low numbered node\&.
113
.RE
114
.PP
115
ok | healthy
116
.RS 4
117
All nodes that are not disconnected, banned, disabled or unhealthy\&.
118
.RE
119
.PP
120
con | connected
121
.RS 4
122
All nodes that are not disconnected\&.
123
.RE
124
.SH "EXAMPLES"
125
.PP
126
The following command would show the process ID of ctdbd on all nodes
127
.sp
128
.if n \{\
129
.RS 4
130
.\}
131
.nf
132
      onnode all ctdb getpid
133
134
.fi
135
.if n \{\
136
.RE
137
.\}
138
.PP
139
The following command would show the last 5 lines of log on each node, preceded by the node\*(Aqs hostname
140
.sp
141
.if n \{\
142
.RS 4
143
.\}
144
.nf
145
      onnode all "hostname; tail \-5 /var/log/log\&.ctdb"
146
147
.fi
148
.if n \{\
149
.RE
150
.\}
151
.PP
152
The following command would restart the ctdb service on all nodes, in parallel\&.
153
.sp
154
.if n \{\
155
.RS 4
156
.\}
157
.nf
158
      onnode \-p all service ctdb restart
159
160
.fi
161
.if n \{\
162
.RE
163
.\}
164
.PP
165
The following command would run \&./foo in the current working directory, in parallel, on nodes 0, 2, 3 and 4\&.
166
.sp
167
.if n \{\
168
.RS 4
169
.\}
170
.nf
171
      onnode \-c \-p 0,2\-4 \&./foo
172
173
.fi
174
.if n \{\
175
.RE
176
.\}
177
.SH "FILES"
178
.PP
179
/usr/local/etc/ctdb/nodes
180
.RS 4
181
Default file containing a list of each node\*(Aqs IP address or hostname\&.
182
.sp
183
As above, a file specified via the
184
\fB\-f\fR
185
is given precedence\&. If a relative path is specified and no corresponding file exists relative to the current directory then the file is also searched for in the CTDB configuration directory\&.
186
.sp
187
Otherwise the default is
188
/usr/local/etc/ctdb/nodes\&.
189
.RE
190
.PP
191
/usr/local/etc/ctdb/onnode\&.conf
192
.RS 4
193
If this file exists it is sourced by onnode\&. The main purpose is to allow the administrator to set
194
\fBONNODE_SSH\fR
195
to something other than "ssh"\&. In this case the \-t option is ignored\&.
196
.RE
197
.SH "SEE ALSO"
198
.PP
199
\fBctdb\fR(7),
200
\m[blue]\fB\%http://ctdb.samba.org/\fR\m[]
201
.SH "AUTHOR"
202
.br
203
.PP
204
This documentation was written by Andrew Tridgell, Martin Schwenke
205
.SH "COPYRIGHT"
206
.br
207
Copyright \(co 2007 Andrew Tridgell, Ronnie Sahlberg
208
.br
209
Copyright \(co 2008 Martin Schwenke
210
.br
211
.PP
212
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\&.
213
.PP
214
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\&.
215
.PP
216
You should have received a copy of the GNU General Public License along with this program; if not, see
217
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
218
.sp
(-)b/net/samba415/files/man/ping_pong.1 (+122 lines)
Added Link Here
1
'\" t
2
.\"     Title: ping_pong
3
.\"    Author:
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: CTDB - clustered TDB database
7
.\"    Source: ctdb
8
.\"  Language: English
9
.\"
10
.TH "PING_PONG" "1" "09/23/2020" "ctdb" "CTDB \- clustered TDB database"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
ping_pong \- measures the ping\-pong byte range lock latency
32
.SH "SYNOPSIS"
33
.HP \w'\fBping_pong\fR\ 'u
34
\fBping_pong\fR {\-r | \-w | \-rw} [\-m] [\-c] {\fIFILENAME\fR} {\fINUM\-LOCKS\fR}
35
.SH "DESCRIPTION"
36
.PP
37
ping_pong measures the byte range lock latency\&. It is especially useful on a cluster of nodes sharing a common lock manager as it will give some indication of the lock manager\*(Aqs performance under stress\&.
38
.PP
39
FILENAME is a file on shared storage to use for byte range locking tests\&.
40
.PP
41
NUM\-LOCKS is the number of byte range locks, so needs to be (strictly) greater than the number of nodes in the cluster\&.
42
.SH "OPTIONS"
43
.PP
44
\-r
45
.RS 4
46
test read performance
47
.RE
48
.PP
49
\-w
50
.RS 4
51
test write performance
52
.RE
53
.PP
54
\-m
55
.RS 4
56
use mmap
57
.RE
58
.PP
59
\-c
60
.RS 4
61
validate the locks
62
.RE
63
.SH "EXAMPLES"
64
.PP
65
Testing lock coherence
66
.sp
67
.if n \{\
68
.RS 4
69
.\}
70
.nf
71
      ping_pong test\&.dat N
72
73
.fi
74
.if n \{\
75
.RE
76
.\}
77
.PP
78
Testing lock coherence with lock validation
79
.sp
80
.if n \{\
81
.RS 4
82
.\}
83
.nf
84
      ping_pong \-c test\&.dat N
85
86
.fi
87
.if n \{\
88
.RE
89
.\}
90
.PP
91
Testing IO coherence
92
.sp
93
.if n \{\
94
.RS 4
95
.\}
96
.nf
97
      ping_pong \-rw test\&.dat N
98
99
.fi
100
.if n \{\
101
.RE
102
.\}
103
.SH "SEE ALSO"
104
.PP
105
\fBctdb\fR(7),
106
\m[blue]\fB\%https://wiki.samba.org/index.php/Ping_pong\fR\m[]
107
.SH "AUTHOR"
108
.br
109
.PP
110
This documentation was written by Mathieu Parent
111
.SH "COPYRIGHT"
112
.br
113
Copyright \(co 2002 Andrew Tridgell
114
.br
115
.PP
116
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\&.
117
.PP
118
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\&.
119
.PP
120
You should have received a copy of the GNU General Public License along with this program; if not, see
121
\m[blue]\fB\%http://www.gnu.org/licenses\fR\m[]\&.
122
.sp
(-)b/net/samba415/files/man/regdiff.1 (+87 lines)
Added Link Here
1
'\" t
2
.\"     Title: regdiff
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "REGDIFF" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
regdiff \- Diff program for Windows registry files
32
.SH "SYNOPSIS"
33
.HP \w'\fBregdiff\fR\ 'u
34
\fBregdiff\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location]
35
.SH "DESCRIPTION"
36
.PP
37
regdiff compares two Windows registry files key by key and value by value and generates a text file that contains the differences between the two files\&.
38
.PP
39
A file generated by regdiff can later be applied to a registry file by the regpatch utility\&.
40
.PP
41
regdiff and regpatch use the same file format as the regedit32\&.exe utility from Windows\&.
42
.SH "OPTIONS"
43
.PP
44
\-\-help
45
.RS 4
46
Show list of available options\&.
47
.RE
48
.PP
49
\-\-backend BACKEND
50
.RS 4
51
Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is
52
\fIdir\fR\&.
53
.sp
54
This argument can be specified twice: once for the first registry file and once for the second\&.
55
.RE
56
.PP
57
\-\-credentials=CREDENTIALS
58
.RS 4
59
Credentials to use, if any\&. Password should be separated from user name by a percent sign\&.
60
.sp
61
This argument can be specified twice: once for the first registry file and once for the second\&.
62
.RE
63
.SH "VERSION"
64
.PP
65
This man page is correct for version 4\&.0 of the Samba suite\&.
66
.SH "SEE ALSO"
67
.PP
68
gregedit, regshell, regpatch, regtree, samba, patch, diff
69
.SH "AUTHOR"
70
.PP
71
This utility is part of the
72
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
73
suite, which is developed by the global
74
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
75
.PP
76
This manpage and regdiff were written by Jelmer Vernooij\&.
77
.SH "NOTES"
78
.IP " 1." 4
79
Samba
80
.RS 4
81
\%http://www.samba.org/
82
.RE
83
.IP " 2." 4
84
Samba Team
85
.RS 4
86
\%http://www.samba.org/samba/team/
87
.RE
(-)b/net/samba415/files/man/regpatch.1 (+81 lines)
Added Link Here
1
'\" t
2
.\"     Title: regpatch
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "REGPATCH" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
regpatch \- Applies registry patches to registry files
32
.SH "SYNOPSIS"
33
.HP \w'\fBregpatch\fR\ 'u
34
\fBregpatch\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location] [patch\-file]
35
.SH "DESCRIPTION"
36
.PP
37
The regpatch utility applies registry patches to Windows registry files\&. The patch files should have the same format as is being used by the regdiff utility and regedit32\&.exe from Windows\&.
38
.PP
39
If no patch file is specified on the command line, regpatch attempts to read it from standard input\&.
40
.SH "OPTIONS"
41
.PP
42
\-\-help
43
.RS 4
44
Show list of available options\&.
45
.RE
46
.PP
47
\-\-backend BACKEND
48
.RS 4
49
Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is
50
\fIdir\fR\&.
51
.RE
52
.PP
53
\-\-credentials=CREDENTIALS
54
.RS 4
55
Credentials to use, if any\&. Password should be separated from user name by a percent sign\&.
56
.RE
57
.SH "VERSION"
58
.PP
59
This man page is correct for version 4\&.0 of the Samba suite\&.
60
.SH "SEE ALSO"
61
.PP
62
regdiff, regtree, regshell, gregedit, samba, diff, patch
63
.SH "AUTHOR"
64
.PP
65
This utility is part of the
66
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
67
suite, which is developed by the global
68
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
69
.PP
70
This manpage and regpatch were written by Jelmer Vernooij\&.
71
.SH "NOTES"
72
.IP " 1." 4
73
Samba
74
.RS 4
75
\%http://www.samba.org/
76
.RE
77
.IP " 2." 4
78
Samba Team
79
.RS 4
80
\%http://www.samba.org/samba/team/
81
.RE
(-)b/net/samba415/files/man/regshell.1 (+177 lines)
Added Link Here
1
'\" t
2
.\"     Title: regshell
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "REGSHELL" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
regshell \- Windows registry file browser using readline
32
.SH "SYNOPSIS"
33
.HP \w'\fBregshell\fR\ 'u
34
\fBregshell\fR [\-\-help] [\-\-backend=BACKEND] [\-\-credentials=CREDENTIALS] [location]
35
.SH "DESCRIPTION"
36
.PP
37
regshell is a utility that lets you browse thru a Windows registry file as if you were using a regular unix shell to browse thru a file system\&.
38
.SH "OPTIONS"
39
.PP
40
\-\-help
41
.RS 4
42
Show list of available options\&.
43
.RE
44
.PP
45
\-\-backend BACKEND
46
.RS 4
47
Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is
48
\fIdir\fR\&.
49
.RE
50
.PP
51
\-\-credentials=CREDENTIALS
52
.RS 4
53
Credentials to use, if any\&. Password should be separated from user name by a percent sign\&.
54
.RE
55
.SH "COMMANDS"
56
.PP
57
ck|cd <keyname>
58
.RS 4
59
Go to the specified subkey\&.
60
.RE
61
.PP
62
ch|predef [predefined\-key\-name]
63
.RS 4
64
Go to the specified predefined key\&.
65
.RE
66
.PP
67
list|ls
68
.RS 4
69
List subkeys and values of the current key\&.
70
.RE
71
.PP
72
mkkey|mkdir <keyname>
73
.RS 4
74
Create a key with the specified
75
\fIkeyname\fR
76
as a subkey of the current key\&.
77
.RE
78
.PP
79
rmval|rm <valname>
80
.RS 4
81
Delete the specified value\&.
82
.RE
83
.PP
84
rmkey|rmdir <keyname>
85
.RS 4
86
Delete the specified subkey recursively\&.
87
.RE
88
.PP
89
pwd|pwk
90
.RS 4
91
Print the full name of the current key\&.
92
.RE
93
.PP
94
set|update
95
.RS 4
96
Update the value of a key value\&. Not implemented at the moment\&.
97
.RE
98
.PP
99
help|?
100
.RS 4
101
Print a list of available commands\&.
102
.RE
103
.PP
104
exit|quit
105
.RS 4
106
Leave regshell\&.
107
.RE
108
.SH "EXAMPLES"
109
.PP
110
Browsing thru a nt4 registry file
111
.sp
112
.if n \{\
113
.RS 4
114
.\}
115
.nf
116
\fBregshell \-b nt4 NTUSER\&.DAT\fR
117
$$$PROTO\&.HIV> \fBls\fR
118
K AppEvents
119
K Console
120
K Control Panel
121
K Environment
122
K Identities
123
K Keyboard Layout
124
K Network
125
K Printers
126
K Software
127
K UNICODE Program Groups
128
K Windows 3\&.1 Migration Status
129
$$$PROTO\&.HIV> \fBexit\fR
130
.fi
131
.if n \{\
132
.RE
133
.\}
134
.PP
135
Listing the subkeys of HKEY_CURRENT_USER\eAppEvents on a remote computer:
136
.sp
137
.if n \{\
138
.RS 4
139
.\}
140
.nf
141
\fBregshell \-\-remote=ncacn_np:aurelia \-c "jelmer%secret"\fR
142
HKEY_CURRENT_MACHINE> \fBpredef HKEY_CURRENT_USER\fR
143
HKEY_CURRENT_USER> \fBcd AppEvents\fR
144
Current path is: HKEY_CURRENT_USER\eAppEvents
145
HKEY_CURRENT_USER\eAppEvents> \fBls\fR
146
K EventLabels
147
K Schemes
148
HKEY_CURRENT_USER\eAppEvents> \fBexit\fR
149
.fi
150
.if n \{\
151
.RE
152
.\}
153
.SH "VERSION"
154
.PP
155
This man page is correct for version 4\&.0 of the Samba suite\&.
156
.SH "SEE ALSO"
157
.PP
158
regtree, regdiff, regpatch, gregedit, samba
159
.SH "AUTHOR"
160
.PP
161
This utility is part of the
162
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
163
suite, which is developed by the global
164
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
165
.PP
166
This manpage and regshell were written by Jelmer Vernooij\&.
167
.SH "NOTES"
168
.IP " 1." 4
169
Samba
170
.RS 4
171
\%http://www.samba.org/
172
.RE
173
.IP " 2." 4
174
Samba Team
175
.RS 4
176
\%http://www.samba.org/samba/team/
177
.RE
(-)b/net/samba415/files/man/regtree.1 (+89 lines)
Added Link Here
1
'\" t
2
.\"     Title: regtree
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "REGTREE" "1" "09/23/2020" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
regtree \- Text\-mode registry viewer
32
.SH "SYNOPSIS"
33
.HP \w'\fBregtree\fR\ 'u
34
\fBregtree\fR [\-\-help] [\-\-backend=BACKEND] [\-\-fullpath] [\-\-no\-values] [\-\-credentials=CREDENTIALS] [location]
35
.SH "DESCRIPTION"
36
.PP
37
The regtree utility prints out all the contents of a Windows registry file\&. Subkeys are printed with one level more indentation than their parents\&.
38
.SH "OPTIONS"
39
.PP
40
\-\-help
41
.RS 4
42
Show list of available options\&.
43
.RE
44
.PP
45
\-\-backend BACKEND
46
.RS 4
47
Name of backend to load\&. Possible values are: creg, regf, dir and rpc\&. The default is
48
\fIdir\fR\&.
49
.RE
50
.PP
51
\-\-credentials=CREDENTIALS
52
.RS 4
53
Credentials to use, if any\&. Password should be separated from user name by a percent sign\&.
54
.RE
55
.PP
56
\-\-fullpath
57
.RS 4
58
Print the full path to each key instead of only its name\&.
59
.RE
60
.PP
61
\-\-no\-values
62
.RS 4
63
Don\*(Aqt print values, just keys\&.
64
.RE
65
.SH "VERSION"
66
.PP
67
This man page is correct for version 4\&.0 of the Samba suite\&.
68
.SH "SEE ALSO"
69
.PP
70
gregedit, regshell, regdiff, regpatch, samba
71
.SH "AUTHOR"
72
.PP
73
This utility is part of the
74
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
75
suite, which is developed by the global
76
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
77
.PP
78
This manpage and regtree were written by Jelmer Vernooij\&.
79
.SH "NOTES"
80
.IP " 1." 4
81
Samba
82
.RS 4
83
\%http://www.samba.org/
84
.RE
85
.IP " 2." 4
86
Samba Team
87
.RS 4
88
\%http://www.samba.org/samba/team/
89
.RE
(-)b/net/samba415/files/man/samba-gpupdate.8 (+116 lines)
Added Link Here
1
'\" t
2
.\"     Title: SAMBA_GPOUPDATE
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 2017-07-11
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.8.0
8
.\"  Language: English
9
.\"
10
.TH "SAMBA_GPOUPDATE" "8" "2017\-07\-11" "Samba 4\&.8\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
samba-gpupdate \- apply group policy
32
.SH "SYNOPSIS"
33
.HP \w'\fBsamba\-gpupdate\fR\ 'u
34
\fBsamba\-gpupdate\fR
35
.HP \w'\fBsamba\-gpupdate\fR\ 'u
36
\fBsamba\-gpupdate\fR [\fIoptions\fR]
37
.SH "DESCRIPTION"
38
.PP
39
This tool is part of the
40
\fBsamba\fR(1)
41
suite\&.
42
.PP
43
\fBsamba\-gpupdate\fR
44
a script for applying and unapplying Group Policy\&. Group Policy application is experimental\&. Currently this applies password policies (minimum/maximum password age, minimum password length, and password complexity) and kerberos policies (user/service ticket lifetime and renew lifetime)\&.
45
.SH "OPTIONS"
46
.PP
47
\fB\-h\fR,
48
\fB\-\-help\fR
49
show this help message and exit
50
.PP
51
\fB\-H \fRURL,
52
\fB\-\-url\fR=\fIURL\fR
53
URL for the samdb
54
.PP
55
\fB\-X\fR,
56
\fB\-\-unapply\fR
57
Unapply Group Policy
58
.PP
59
\fB\-\-target\fR
60
{Computer | User}
61
.PP
62
Samba Common Options:
63
.PP
64
\fB\-s \fRFILE,
65
\fB\-\-configfile\fR=\fIFILE\fR
66
Configuration file
67
.PP
68
\fB\-d \fRDEBUGLEVEL,
69
\fB\-\-debuglevel\fR=\fIDEBUGLEVEL\fR
70
debug level
71
.PP
72
\fB\-\-option\fR=\fIOPTION\fR
73
set smb\&.conf option from command line
74
.PP
75
\fB\-\-realm\fR=\fIREALM\fR
76
set the realm name
77
.PP
78
Version Options:
79
.PP
80
\fB\-V\fR,
81
\fB\-\-version\fR
82
Display version number
83
.PP
84
Credentials Options:
85
.PP
86
\fB\-\-simple\-bind\-dn\fR=\fIDN\fR
87
DN to use for a simple bind
88
.PP
89
\fB\-\-password\fR=\fIPASSWORD\fR
90
Password
91
.PP
92
\fB\-U \fRUSERNAME,
93
\fB\-\-username\fR=\fIUSERNAME\fR
94
Username
95
.PP
96
\fB\-W \fRWORKGROUP,
97
\fB\-\-workgroup\fR=\fIWORKGROUP\fR
98
Workgroup
99
.PP
100
\fB\-N\fR,
101
\fB\-\-no\-pass\fR
102
Don\*(Aqt ask for a password
103
.PP
104
\fB\-k \fRKERBEROS,
105
\fB\-\-kerberos\fR=\fIKERBEROS\fR
106
Use Kerberos
107
.PP
108
\fB\-\-ipaddress\fR=\fIIPADDRESS\fR
109
IP address of server
110
.PP
111
\fB\-P\fR,
112
\fB\-\-machine\-pass\fR
113
Use stored machine account password
114
.SH "AUTHOR"
115
.PP
116
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\&.
(-)b/net/samba415/files/man/smbtorture.1 (+362 lines)
Added Link Here
1
'\" t
2
.\"     Title: smbtorture
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 09/23/2020
6
.\"    Manual: Test Suite
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "SMBTORTURE" "1" "09/23/2020" "Samba 4\&.0" "Test Suite"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
smbtorture \- Run a series of tests against a SMB server
32
.SH "SYNOPSIS"
33
.HP \w'\fBsmbtorture\fR\ 'u
34
\fBsmbtorture\fR {//server/share} [\-d\ debuglevel] [\-U\ user%pass] [\-k] [\-N\ numprocs] [\-n\ netbios_name] [\-W\ workgroup] [\-e\ num\ files(entries)] [\-O\ socket_options] [\-m\ maximum_protocol] [\-L] [\-c\ CLIENT\&.TXT] [\-t\ timelimit] [\-C\ filename] [\-A] [\-p\ port] [\-s\ seed] [\-f\ max_failures] [\-X] {BINDING\-STRING|UNC} {TEST1} [TEST2] [\&.\&.\&.]
35
.SH "DESCRIPTION"
36
.PP
37
smbtorture is a testsuite that runs several tests against a SMB server\&. All tests are known to succeed against a Windows 2003 server (?)\&. Smbtorture\*(Aqs primary goal is finding differences in implementations of the SMB protocol and testing SMB servers\&.
38
.PP
39
Any number of tests can be specified on the command\-line\&. If no tests are specified, all tests are run\&.
40
.PP
41
If no arguments are specified at all, all available options and tests are listed\&.
42
.SS "Binding string format"
43
.PP
44
The binding string format is:
45
.PP
46
TRANSPORT:host[flags]
47
.PP
48
Where TRANSPORT is either ncacn_np for SMB, ncacn_ip_tcp for RPC/TCP or ncalrpc for local connections\&.
49
.PP
50
\*(Aqhost\*(Aq is an IP or hostname or netbios name\&. If the binding string identifies the server side of an endpoint, \*(Aqhost\*(Aq may be an empty string\&.
51
.PP
52
\*(Aqflags\*(Aq can include a SMB pipe name if using the ncacn_np transport or a TCP port number if using the ncacn_ip_tcp transport, otherwise they will be auto\-determined\&.
53
.PP
54
other recognised flags are:
55
.PP
56
sign
57
.RS 4
58
enable ntlmssp signing
59
.RE
60
.PP
61
seal
62
.RS 4
63
enable ntlmssp sealing
64
.RE
65
.PP
66
connect
67
.RS 4
68
enable rpc connect level auth (auth, but no sign or seal)
69
.RE
70
.PP
71
validate
72
.RS 4
73
enable the NDR validator
74
.RE
75
.PP
76
print
77
.RS 4
78
enable debugging of the packets
79
.RE
80
.PP
81
bigendian
82
.RS 4
83
use bigendian RPC
84
.RE
85
.PP
86
padcheck
87
.RS 4
88
check reply data for non\-zero pad bytes
89
.RE
90
.PP
91
For example, these all connect to the samr pipe:
92
.sp
93
.RS 4
94
.ie n \{\
95
\h'-04'\(bu\h'+03'\c
96
.\}
97
.el \{\
98
.sp -1
99
.IP \(bu 2.3
100
.\}
101
ncacn_np:myserver
102
.RE
103
.sp
104
.RS 4
105
.ie n \{\
106
\h'-04'\(bu\h'+03'\c
107
.\}
108
.el \{\
109
.sp -1
110
.IP \(bu 2.3
111
.\}
112
ncacn_np:myserver[samr]
113
.RE
114
.sp
115
.RS 4
116
.ie n \{\
117
\h'-04'\(bu\h'+03'\c
118
.\}
119
.el \{\
120
.sp -1
121
.IP \(bu 2.3
122
.\}
123
ncacn_np:myserver[\e\epipe\e\esamr]
124
.RE
125
.sp
126
.RS 4
127
.ie n \{\
128
\h'-04'\(bu\h'+03'\c
129
.\}
130
.el \{\
131
.sp -1
132
.IP \(bu 2.3
133
.\}
134
ncacn_np:myserver[/pipe/samr]
135
.RE
136
.sp
137
.RS 4
138
.ie n \{\
139
\h'-04'\(bu\h'+03'\c
140
.\}
141
.el \{\
142
.sp -1
143
.IP \(bu 2.3
144
.\}
145
ncacn_np:myserver[samr,sign,print]
146
.RE
147
.sp
148
.RS 4
149
.ie n \{\
150
\h'-04'\(bu\h'+03'\c
151
.\}
152
.el \{\
153
.sp -1
154
.IP \(bu 2.3
155
.\}
156
ncacn_np:myserver[\e\epipe\e\esamr,sign,seal,bigendian]
157
.RE
158
.sp
159
.RS 4
160
.ie n \{\
161
\h'-04'\(bu\h'+03'\c
162
.\}
163
.el \{\
164
.sp -1
165
.IP \(bu 2.3
166
.\}
167
ncacn_np:myserver[/pipe/samr,seal,validate]
168
.RE
169
.sp
170
.RS 4
171
.ie n \{\
172
\h'-04'\(bu\h'+03'\c
173
.\}
174
.el \{\
175
.sp -1
176
.IP \(bu 2.3
177
.\}
178
ncacn_np:
179
.RE
180
.sp
181
.RS 4
182
.ie n \{\
183
\h'-04'\(bu\h'+03'\c
184
.\}
185
.el \{\
186
.sp -1
187
.IP \(bu 2.3
188
.\}
189
ncacn_np:[/pipe/samr]
190
.RE
191
.sp
192
.RS 4
193
.ie n \{\
194
\h'-04'\(bu\h'+03'\c
195
.\}
196
.el \{\
197
.sp -1
198
.IP \(bu 2.3
199
.\}
200
ncacn_ip_tcp:myserver
201
.RE
202
.sp
203
.RS 4
204
.ie n \{\
205
\h'-04'\(bu\h'+03'\c
206
.\}
207
.el \{\
208
.sp -1
209
.IP \(bu 2.3
210
.\}
211
ncacn_ip_tcp:myserver[1024]
212
.RE
213
.sp
214
.RS 4
215
.ie n \{\
216
\h'-04'\(bu\h'+03'\c
217
.\}
218
.el \{\
219
.sp -1
220
.IP \(bu 2.3
221
.\}
222
ncacn_ip_tcp:myserver[1024,sign,seal]
223
.RE
224
.sp
225
.RS 4
226
.ie n \{\
227
\h'-04'\(bu\h'+03'\c
228
.\}
229
.el \{\
230
.sp -1
231
.IP \(bu 2.3
232
.\}
233
ncalrpc:
234
.RE
235
.SS "UNC Format"
236
.PP
237
The UNC format is:
238
.PP
239
//server/share
240
.SH "OPTIONS"
241
.PP
242
\-d debuglevel
243
.RS 4
244
Use the specified Samba debug level\&. A higher debug level means more output\&.
245
.RE
246
.PP
247
\-U user%pass
248
.RS 4
249
Use the specified username/password combination when logging in to a remote server\&.
250
.RE
251
.PP
252
\-k
253
.RS 4
254
Use kerberos when authenticating\&.
255
.RE
256
.PP
257
\-W workgroup
258
.RS 4
259
Use specified name as our workgroup name\&.
260
.RE
261
.PP
262
\-n netbios_name
263
.RS 4
264
Use specified name as our NetBIOS name\&.
265
.RE
266
.PP
267
\-O socket_options
268
.RS 4
269
Use specified socket options, equivalent of the smb\&.conf option
270
\(lqsocket options\(rq\&. See the smb\&.conf(5) manpage for details\&.
271
.RE
272
.PP
273
\-m max_protocol
274
.RS 4
275
Specify the maximum SMB dialect that should be used\&. Possible values are: CORE, COREPLUS, LANMAN1, LANMAN2, NT1
276
.RE
277
.PP
278
\-s seed
279
.RS 4
280
Initialize the randomizer using
281
\fIseed\fR
282
as seed\&.
283
.RE
284
.PP
285
\-L
286
.RS 4
287
Use oplocks\&.
288
.RE
289
.PP
290
\-X
291
.RS 4
292
Enable dangerous tests\&. Use with care! This might crash your server\&.\&.\&.
293
.RE
294
.PP
295
\-t timelimit
296
.RS 4
297
Specify the NBENCH time limit in seconds\&. Defaults to 600\&.
298
.RE
299
.PP
300
\-p ports
301
.RS 4
302
Specify ports to connect to\&.
303
.RE
304
.PP
305
\-c file
306
.RS 4
307
Read NBENCH commands from
308
\fIfile\fR
309
instead of from CLIENT\&.TXT\&.
310
.RE
311
.PP
312
\-A
313
.RS 4
314
Show not just OK or FAILED but more detailed output\&. Used only by DENY test at the moment\&.
315
.RE
316
.PP
317
\-C filename
318
.RS 4
319
Load a list of UNC names from the specified filename\&. Smbtorture instances will connect to a random host from this list\&.
320
.RE
321
.PP
322
\-N numprocs
323
.RS 4
324
Specify number of smbtorture processes to launch\&.
325
.RE
326
.PP
327
\-e num_files
328
.RS 4
329
Number of entries to use in certain tests (such as creating X files) (default: 1000)\&.
330
.RE
331
.PP
332
\-f max_failures
333
.RS 4
334
Number of failures before aborting a test (default: 1)\&.
335
.RE
336
.SH "VERSION"
337
.PP
338
This man page is correct for version 4\&.0 of the Samba suite\&.
339
.SH "SEE ALSO"
340
.PP
341
Samba
342
.SH "AUTHOR"
343
.PP
344
This utility is part of the
345
\m[blue]\fBSamba\fR\m[]\&\s-2\u[1]\d\s+2
346
suite, which is developed by the global
347
\m[blue]\fBSamba Team\fR\m[]\&\s-2\u[2]\d\s+2\&.
348
.PP
349
smbtorture was written by Andrew Tridgell\&.
350
.PP
351
This manpage was written by Jelmer Vernooij\&.
352
.SH "NOTES"
353
.IP " 1." 4
354
Samba
355
.RS 4
356
\%http://www.samba.org/
357
.RE
358
.IP " 2." 4
359
Samba Team
360
.RS 4
361
\%http://www.samba.org/samba/team/
362
.RE
(-)b/net/samba415/files/man/talloc.3 (+683 lines)
Added Link Here
1
'\" t
2
.\"     Title: talloc
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 2015-04-10
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "TALLOC" "3" "2015\-04\-10" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
talloc \- hierarchical reference counted memory pool system with destructors
32
.SH "SYNOPSIS"
33
.sp
34
.nf
35
#include <talloc\&.h>
36
.fi
37
.SH "DESCRIPTION"
38
.PP
39
If you are used to talloc from Samba3 then please read this carefully, as talloc has changed a lot\&.
40
.PP
41
The new talloc is a hierarchical, reference counted memory pool system with destructors\&. Quite a mouthful really, but not too bad once you get used to it\&.
42
.PP
43
Perhaps the biggest change from Samba3 is that there is no distinction between a "talloc context" and a "talloc pointer"\&. Any pointer returned from talloc() is itself a valid talloc context\&. This means you can do this:
44
.sp
45
.if n \{\
46
.RS 4
47
.\}
48
.nf
49
    struct foo *X = talloc(mem_ctx, struct foo);
50
    X\->name = talloc_strdup(X, "foo");
51
52
.fi
53
.if n \{\
54
.RE
55
.\}
56
.PP
57
and the pointer
58
X\->name
59
would be a "child" of the talloc context
60
X
61
which is itself a child of
62
mem_ctx\&. So if you do
63
talloc_free(mem_ctx)
64
then it is all destroyed, whereas if you do
65
talloc_free(X)
66
then just
67
X
68
and
69
X\->name
70
are destroyed, and if you do
71
talloc_free(X\->name)
72
then just the name element of
73
X
74
is destroyed\&.
75
.PP
76
If you think about this, then what this effectively gives you is an n\-ary tree, where you can free any part of the tree with talloc_free()\&.
77
.PP
78
If you find this confusing, then I suggest you run the
79
testsuite
80
program to watch talloc in action\&. You may also like to add your own tests to
81
testsuite\&.c
82
to clarify how some particular situation is handled\&.
83
.SH "TALLOC API"
84
.PP
85
The following is a complete guide to the talloc API\&. Read it all at least twice\&.
86
.SS "(type *)talloc(const void *ctx, type);"
87
.PP
88
The talloc() macro is the core of the talloc library\&. It takes a memory
89
\fIctx\fR
90
and a
91
\fItype\fR, and returns a pointer to a new area of memory of the given
92
\fItype\fR\&.
93
.PP
94
The returned pointer is itself a talloc context, so you can use it as the
95
\fIctx\fR
96
argument to more calls to talloc() if you wish\&.
97
.PP
98
The returned pointer is a "child" of the supplied context\&. This means that if you talloc_free() the
99
\fIctx\fR
100
then the new child disappears as well\&. Alternatively you can free just the child\&.
101
.PP
102
The
103
\fIctx\fR
104
argument to talloc() can be NULL, in which case a new top level context is created\&.
105
.SS "void *talloc_size(const void *ctx, size_t size);"
106
.PP
107
The function talloc_size() should be used when you don\*(Aqt have a convenient type to pass to talloc()\&. Unlike talloc(), it is not type safe (as it returns a void *), so you are on your own for type checking\&.
108
.SS "(typeof(ptr)) talloc_ptrtype(const void *ctx, ptr);"
109
.PP
110
The talloc_ptrtype() macro should be used when you have a pointer and want to allocate memory to point at with this pointer\&. When compiling with gcc >= 3 it is typesafe\&. Note this is a wrapper of talloc_size() and talloc_get_name() will return the current location in the source file\&. and not the type\&.
111
.SS "int talloc_free(void *ptr);"
112
.PP
113
The talloc_free() function frees a piece of talloc memory, and all its children\&. You can call talloc_free() on any pointer returned by talloc()\&.
114
.PP
115
The return value of talloc_free() indicates success or failure, with 0 returned for success and \-1 for failure\&. The only possible failure condition is if
116
\fIptr\fR
117
had a destructor attached to it and the destructor returned \-1\&. See
118
\(lqtalloc_set_destructor()\(rq
119
for details on destructors\&.
120
.PP
121
If this pointer has an additional parent when talloc_free() is called then the memory is not actually released, but instead the most recently established parent is destroyed\&. See
122
\(lqtalloc_reference()\(rq
123
for details on establishing additional parents\&.
124
.PP
125
For more control on which parent is removed, see
126
\(lqtalloc_unlink()\(rq\&.
127
.PP
128
talloc_free() operates recursively on its children\&.
129
.PP
130
From the 2\&.0 version of talloc, as a special case, talloc_free() is refused on pointers that have more than one parent, as talloc would have no way of knowing which parent should be removed\&. To free a pointer that has more than one parent please use talloc_unlink()\&.
131
.PP
132
To help you find problems in your code caused by this behaviour, if you do try and free a pointer with more than one parent then the talloc logging function will be called to give output like this:
133
.PP
134
135
.sp
136
.if n \{\
137
.RS 4
138
.\}
139
.nf
140
	    ERROR: talloc_free with references at some_dir/source/foo\&.c:123
141
		reference at some_dir/source/other\&.c:325
142
		reference at some_dir/source/third\&.c:121
143
144
.fi
145
.if n \{\
146
.RE
147
.\}
148
.PP
149
Please see the documentation for talloc_set_log_fn() and talloc_set_log_stderr() for more information on talloc logging functions\&.
150
.SS "void *talloc_reference(const void *ctx, const void *ptr);"
151
.PP
152
The talloc_reference() function makes
153
\fIctx\fR
154
an additional parent of
155
\fIptr\fR\&.
156
.PP
157
The return value of talloc_reference() is always the original pointer
158
\fIptr\fR, unless talloc ran out of memory in creating the reference in which case it will return NULL (each additional reference consumes around 48 bytes of memory on intel x86 platforms)\&.
159
.PP
160
If
161
\fIptr\fR
162
is NULL, then the function is a no\-op, and simply returns NULL\&.
163
.PP
164
After creating a reference you can free it in one of the following ways:
165
.PP
166
167
.sp
168
.RS 4
169
.ie n \{\
170
\h'-04'\(bu\h'+03'\c
171
.\}
172
.el \{\
173
.sp -1
174
.IP \(bu 2.3
175
.\}
176
you can talloc_free() any parent of the original pointer\&. That will reduce the number of parents of this pointer by 1, and will cause this pointer to be freed if it runs out of parents\&.
177
.RE
178
.sp
179
.RS 4
180
.ie n \{\
181
\h'-04'\(bu\h'+03'\c
182
.\}
183
.el \{\
184
.sp -1
185
.IP \(bu 2.3
186
.\}
187
you can talloc_free() the pointer itself if it has at maximum one parent\&. This behaviour has been changed since the release of version 2\&.0\&. Further informations in the description of "talloc_free"\&.
188
.RE
189
.PP
190
For more control on which parent to remove, see
191
\(lqtalloc_unlink()\(rq\&.
192
.SS "int talloc_unlink(const void *ctx, void *ptr);"
193
.PP
194
The talloc_unlink() function removes a specific parent from
195
\fIptr\fR\&. The
196
\fIctx\fR
197
passed must either be a context used in talloc_reference() with this pointer, or must be a direct parent of ptr\&.
198
.PP
199
Note that if the parent has already been removed using talloc_free() then this function will fail and will return \-1\&. Likewise, if
200
\fIptr\fR
201
is NULL, then the function will make no modifications and return \-1\&.
202
.PP
203
Usually you can just use talloc_free() instead of talloc_unlink(), but sometimes it is useful to have the additional control on which parent is removed\&.
204
.SS "void talloc_set_destructor(const void *ptr, int (*destructor)(void *));"
205
.PP
206
The function talloc_set_destructor() sets the
207
\fIdestructor\fR
208
for the pointer
209
\fIptr\fR\&. A
210
\fIdestructor\fR
211
is a function that is called when the memory used by a pointer is about to be released\&. The destructor receives
212
\fIptr\fR
213
as an argument, and should return 0 for success and \-1 for failure\&.
214
.PP
215
The
216
\fIdestructor\fR
217
can do anything it wants to, including freeing other pieces of memory\&. A common use for destructors is to clean up operating system resources (such as open file descriptors) contained in the structure the destructor is placed on\&.
218
.PP
219
You can only place one destructor on a pointer\&. If you need more than one destructor then you can create a zero\-length child of the pointer and place an additional destructor on that\&.
220
.PP
221
To remove a destructor call talloc_set_destructor() with NULL for the destructor\&.
222
.PP
223
If your destructor attempts to talloc_free() the pointer that it is the destructor for then talloc_free() will return \-1 and the free will be ignored\&. This would be a pointless operation anyway, as the destructor is only called when the memory is just about to go away\&.
224
.SS "int talloc_increase_ref_count(const void *\fIptr\fR);"
225
.PP
226
The talloc_increase_ref_count(\fIptr\fR) function is exactly equivalent to:
227
.sp
228
.if n \{\
229
.RS 4
230
.\}
231
.nf
232
talloc_reference(NULL, ptr);
233
.fi
234
.if n \{\
235
.RE
236
.\}
237
.PP
238
You can use either syntax, depending on which you think is clearer in your code\&.
239
.PP
240
It returns 0 on success and \-1 on failure\&.
241
.SS "size_t talloc_reference_count(const void *\fIptr\fR);"
242
.PP
243
Return the number of references to the pointer\&.
244
.SS "void talloc_set_name(const void *ptr, const char *fmt, \&.\&.\&.);"
245
.PP
246
Each talloc pointer has a "name"\&. The name is used principally for debugging purposes, although it is also possible to set and get the name on a pointer in as a way of "marking" pointers in your code\&.
247
.PP
248
The main use for names on pointer is for "talloc reports"\&. See
249
\(lqtalloc_report_depth_cb()\(rq,
250
\(lqtalloc_report_depth_file()\(rq,
251
\(lqtalloc_report()\(rq
252
\(lqtalloc_report()\(rq
253
and
254
\(lqtalloc_report_full()\(rq
255
for details\&. Also see
256
\(lqtalloc_enable_leak_report()\(rq
257
and
258
\(lqtalloc_enable_leak_report_full()\(rq\&.
259
.PP
260
The talloc_set_name() function allocates memory as a child of the pointer\&. It is logically equivalent to:
261
.sp
262
.if n \{\
263
.RS 4
264
.\}
265
.nf
266
talloc_set_name_const(ptr, talloc_asprintf(ptr, fmt, \&.\&.\&.));
267
.fi
268
.if n \{\
269
.RE
270
.\}
271
.PP
272
Note that multiple calls to talloc_set_name() will allocate more memory without releasing the name\&. All of the memory is released when the ptr is freed using talloc_free()\&.
273
.SS "void talloc_set_name_const(const void *\fIptr\fR, const char *\fIname\fR);"
274
.PP
275
The function talloc_set_name_const() is just like talloc_set_name(), but it takes a string constant, and is much faster\&. It is extensively used by the "auto naming" macros, such as talloc_p()\&.
276
.PP
277
This function does not allocate any memory\&. It just copies the supplied pointer into the internal representation of the talloc ptr\&. This means you must not pass a
278
\fIname\fR
279
pointer to memory that will disappear before
280
\fIptr\fR
281
is freed with talloc_free()\&.
282
.SS "void *talloc_named(const void *\fIctx\fR, size_t \fIsize\fR, const char *\fIfmt\fR, \&.\&.\&.);"
283
.PP
284
The talloc_named() function creates a named talloc pointer\&. It is equivalent to:
285
.sp
286
.if n \{\
287
.RS 4
288
.\}
289
.nf
290
ptr = talloc_size(ctx, size);
291
talloc_set_name(ptr, fmt, \&.\&.\&.\&.);
292
.fi
293
.if n \{\
294
.RE
295
.\}
296
.SS "void *talloc_named_const(const void *\fIctx\fR, size_t \fIsize\fR, const char *\fIname\fR);"
297
.PP
298
This is equivalent to:
299
.sp
300
.if n \{\
301
.RS 4
302
.\}
303
.nf
304
ptr = talloc_size(ctx, size);
305
talloc_set_name_const(ptr, name);
306
.fi
307
.if n \{\
308
.RE
309
.\}
310
.SS "const char *talloc_get_name(const void *\fIptr\fR);"
311
.PP
312
This returns the current name for the given talloc pointer,
313
\fIptr\fR\&. See
314
\(lqtalloc_set_name()\(rq
315
for details\&.
316
.SS "void *talloc_init(const char *\fIfmt\fR, \&.\&.\&.);"
317
.PP
318
This function creates a zero length named talloc context as a top level context\&. It is equivalent to:
319
.sp
320
.if n \{\
321
.RS 4
322
.\}
323
.nf
324
talloc_named(NULL, 0, fmt, \&.\&.\&.);
325
.fi
326
.if n \{\
327
.RE
328
.\}
329
.SS "void *talloc_new(void *\fIctx\fR);"
330
.PP
331
This is a utility macro that creates a new memory context hanging off an existing context, automatically naming it "talloc_new: __location__" where __location__ is the source line it is called from\&. It is particularly useful for creating a new temporary working context\&.
332
.SS "(\fItype\fR *)talloc_realloc(const void *\fIctx\fR, void *\fIptr\fR, \fItype\fR, \fIcount\fR);"
333
.PP
334
The talloc_realloc() macro changes the size of a talloc pointer\&. It has the following equivalences:
335
.sp
336
.if n \{\
337
.RS 4
338
.\}
339
.nf
340
talloc_realloc(ctx, NULL, type, 1) ==> talloc(ctx, type);
341
talloc_realloc(ctx, ptr, type, 0)  ==> talloc_free(ptr);
342
.fi
343
.if n \{\
344
.RE
345
.\}
346
.PP
347
The
348
\fIctx\fR
349
argument is only used if
350
\fIptr\fR
351
is not NULL, otherwise it is ignored\&.
352
.PP
353
talloc_realloc() returns the new pointer, or NULL on failure\&. The call will fail either due to a lack of memory, or because the pointer has more than one parent (see
354
\(lqtalloc_reference()\(rq)\&.
355
.SS "void *talloc_realloc_size(const void *ctx, void *ptr, size_t size);"
356
.PP
357
the talloc_realloc_size() function is useful when the type is not known so the type\-safe talloc_realloc() cannot be used\&.
358
.SS "TYPE *talloc_steal(const void *\fInew_ctx\fR, const TYPE *\fIptr\fR);"
359
.PP
360
The talloc_steal() function changes the parent context of a talloc pointer\&. It is typically used when the context that the pointer is currently a child of is going to be freed and you wish to keep the memory for a longer time\&.
361
.PP
362
The talloc_steal() function returns the pointer that you pass it\&. It does not have any failure modes\&.
363
.PP
364
It is possible to produce loops in the parent/child relationship if you are not careful with talloc_steal()\&. No guarantees are provided as to your sanity or the safety of your data if you do this\&.
365
.PP
366
Note that if you try and call talloc_steal() on a pointer that has more than one parent then the result is ambiguous\&. Talloc will choose to remove the parent that is currently indicated by talloc_parent() and replace it with the chosen parent\&. You will also get a message like this via the talloc logging functions:
367
.PP
368
369
.sp
370
.if n \{\
371
.RS 4
372
.\}
373
.nf
374
	  WARNING: talloc_steal with references at some_dir/source/foo\&.c:123
375
		reference at some_dir/source/other\&.c:325
376
		reference at some_dir/source/third\&.c:121
377
378
.fi
379
.if n \{\
380
.RE
381
.\}
382
.PP
383
To unambiguously change the parent of a pointer please see the function
384
\(lqtalloc_reparent()\(rq\&. See the talloc_set_log_fn() documentation for more information on talloc logging\&.
385
.SS "TYPE *talloc_reparent(const void *\fIold_parent\fR, const void *\fInew_parent\fR, const TYPE *\fIptr\fR);"
386
.PP
387
The talloc_reparent() function changes the parent context of a talloc pointer\&. It is typically used when the context that the pointer is currently a child of is going to be freed and you wish to keep the memory for a longer time\&.
388
.PP
389
The talloc_reparent() function returns the pointer that you pass it\&. It does not have any failure modes\&.
390
.PP
391
The difference between talloc_reparent() and talloc_steal() is that talloc_reparent() can specify which parent you wish to change\&. This is useful when a pointer has multiple parents via references\&.
392
.SS "TYPE *talloc_move(const void *\fInew_ctx\fR, TYPE **\fIptr\fR);"
393
.PP
394
The talloc_move() function is a wrapper around talloc_steal() which zeros the source pointer after the move\&. This avoids a potential source of bugs where a programmer leaves a pointer in two structures, and uses the pointer from the old structure after it has been moved to a new one\&.
395
.SS "size_t talloc_total_size(const void *\fIptr\fR);"
396
.PP
397
The talloc_total_size() function returns the total size in bytes used by this pointer and all child pointers\&. Mostly useful for debugging\&.
398
.PP
399
Passing NULL is allowed, but it will only give a meaningful result if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&.
400
.SS "size_t talloc_total_blocks(const void *\fIptr\fR);"
401
.PP
402
The talloc_total_blocks() function returns the total memory block count used by this pointer and all child pointers\&. Mostly useful for debugging\&.
403
.PP
404
Passing NULL is allowed, but it will only give a meaningful result if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&.
405
.SS "void talloc_report(const void *ptr, FILE *f);"
406
.PP
407
The talloc_report() function prints a summary report of all memory used by
408
\fIptr\fR\&. One line of report is printed for each immediate child of ptr, showing the total memory and number of blocks used by that child\&.
409
.PP
410
You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&.
411
.SS "void talloc_report_full(const void *\fIptr\fR, FILE *\fIf\fR);"
412
.PP
413
This provides a more detailed report than talloc_report()\&. It will recursively print the entire tree of memory referenced by the pointer\&. References in the tree are shown by giving the name of the pointer that is referenced\&.
414
.PP
415
You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&.
416
.SS ""
417
.HP \w'void\ talloc_report_depth_cb('u
418
.BI "void talloc_report_depth_cb(" "const\ void\ *ptr" ", " "int\ depth" ", " "int\ max_depth" ", " "void\ (*callback)(const\ void\ *ptr,\ int\ depth,\ int\ max_depth,\ int\ is_ref,\ void\ *priv)" ", " "void\ *priv" ");"
419
.PP
420
This provides a more flexible reports than talloc_report()\&. It will recursively call the callback for the entire tree of memory referenced by the pointer\&. References in the tree are passed with
421
\fIis_ref = 1\fR
422
and the pointer that is referenced\&.
423
.PP
424
You can pass NULL for the pointer, in which case a report is printed for the top level memory context, but only if talloc_enable_leak_report() or talloc_enable_leak_report_full() has been called\&.
425
.PP
426
The recursion is stopped when depth >= max_depth\&. max_depth = \-1 means only stop at leaf nodes\&.
427
.SS ""
428
.HP \w'void\ talloc_report_depth_file('u
429
.BI "void talloc_report_depth_file(" "const\ void\ *ptr" ", " "int\ depth" ", " "int\ max_depth" ", " "FILE\ *f" ");"
430
.PP
431
This provides a more flexible reports than talloc_report()\&. It will let you specify the depth and max_depth\&.
432
.SS "void talloc_enable_leak_report(void);"
433
.PP
434
This enables calling of talloc_report(NULL, stderr) when the program exits\&. In Samba4 this is enabled by using the \-\-leak\-report command line option\&.
435
.PP
436
For it to be useful, this function must be called before any other talloc function as it establishes a "null context" that acts as the top of the tree\&. If you don\*(Aqt call this function first then passing NULL to talloc_report() or talloc_report_full() won\*(Aqt give you the full tree printout\&.
437
.PP
438
Here is a typical talloc report:
439
.sp
440
.if n \{\
441
.RS 4
442
.\}
443
.nf
444
talloc report on \*(Aqnull_context\*(Aq (total 267 bytes in 15 blocks)
445
libcli/auth/spnego_parse\&.c:55  contains   31 bytes in   2 blocks
446
libcli/auth/spnego_parse\&.c:55  contains   31 bytes in   2 blocks
447
iconv(UTF8,CP850)              contains   42 bytes in   2 blocks
448
libcli/auth/spnego_parse\&.c:55  contains   31 bytes in   2 blocks
449
iconv(CP850,UTF8)              contains   42 bytes in   2 blocks
450
iconv(UTF8,UTF\-16LE)           contains   45 bytes in   2 blocks
451
iconv(UTF\-16LE,UTF8)           contains   45 bytes in   2 blocks
452
453
.fi
454
.if n \{\
455
.RE
456
.\}
457
.SS "void talloc_enable_leak_report_full(void);"
458
.PP
459
This enables calling of talloc_report_full(NULL, stderr) when the program exits\&. In Samba4 this is enabled by using the \-\-leak\-report\-full command line option\&.
460
.PP
461
For it to be useful, this function must be called before any other talloc function as it establishes a "null context" that acts as the top of the tree\&. If you don\*(Aqt call this function first then passing NULL to talloc_report() or talloc_report_full() won\*(Aqt give you the full tree printout\&.
462
.PP
463
Here is a typical full report:
464
.sp
465
.if n \{\
466
.RS 4
467
.\}
468
.nf
469
full talloc report on \*(Aqroot\*(Aq (total 18 bytes in 8 blocks)
470
p1               contains     18 bytes in   7 blocks (ref 0)
471
    r1               contains     13 bytes in   2 blocks (ref 0)
472
        reference to: p2
473
    p2               contains      1 bytes in   1 blocks (ref 1)
474
    x3               contains      1 bytes in   1 blocks (ref 0)
475
    x2               contains      1 bytes in   1 blocks (ref 0)
476
    x1               contains      1 bytes in   1 blocks (ref 0)
477
478
.fi
479
.if n \{\
480
.RE
481
.\}
482
.SS "(\fItype\fR *)talloc_zero(const void *\fIctx\fR, \fItype\fR);"
483
.PP
484
The talloc_zero() macro is equivalent to:
485
.sp
486
.if n \{\
487
.RS 4
488
.\}
489
.nf
490
ptr = talloc(ctx, type);
491
if (ptr) memset(ptr, 0, sizeof(type));
492
.fi
493
.if n \{\
494
.RE
495
.\}
496
.SS "void *talloc_zero_size(const void *\fIctx\fR, size_t \fIsize\fR)"
497
.PP
498
The talloc_zero_size() function is useful when you don\*(Aqt have a known type\&.
499
.SS "void *talloc_memdup(const void *\fIctx\fR, const void *\fIp\fR, size_t size);"
500
.PP
501
The talloc_memdup() function is equivalent to:
502
.sp
503
.if n \{\
504
.RS 4
505
.\}
506
.nf
507
ptr = talloc_size(ctx, size);
508
if (ptr) memcpy(ptr, p, size);
509
.fi
510
.if n \{\
511
.RE
512
.\}
513
.SS "char *talloc_strdup(const void *\fIctx\fR, const char *\fIp\fR);"
514
.PP
515
The talloc_strdup() function is equivalent to:
516
.sp
517
.if n \{\
518
.RS 4
519
.\}
520
.nf
521
ptr = talloc_size(ctx, strlen(p)+1);
522
if (ptr) memcpy(ptr, p, strlen(p)+1);
523
.fi
524
.if n \{\
525
.RE
526
.\}
527
.PP
528
This function sets the name of the new pointer to the passed string\&. This is equivalent to:
529
.sp
530
.if n \{\
531
.RS 4
532
.\}
533
.nf
534
talloc_set_name_const(ptr, ptr)
535
.fi
536
.if n \{\
537
.RE
538
.\}
539
.SS "char *talloc_strndup(const void *\fIt\fR, const char *\fIp\fR, size_t \fIn\fR);"
540
.PP
541
The talloc_strndup() function is the talloc equivalent of the C library function strndup(3)\&.
542
.PP
543
This function sets the name of the new pointer to the passed string\&. This is equivalent to:
544
.sp
545
.if n \{\
546
.RS 4
547
.\}
548
.nf
549
talloc_set_name_const(ptr, ptr)
550
.fi
551
.if n \{\
552
.RE
553
.\}
554
.SS "char *talloc_vasprintf(const void *\fIt\fR, const char *\fIfmt\fR, va_list \fIap\fR);"
555
.PP
556
The talloc_vasprintf() function is the talloc equivalent of the C library function vasprintf(3)\&.
557
.PP
558
This function sets the name of the new pointer to the new string\&. This is equivalent to:
559
.sp
560
.if n \{\
561
.RS 4
562
.\}
563
.nf
564
talloc_set_name_const(ptr, ptr)
565
.fi
566
.if n \{\
567
.RE
568
.\}
569
.SS "char *talloc_asprintf(const void *\fIt\fR, const char *\fIfmt\fR, \&.\&.\&.);"
570
.PP
571
The talloc_asprintf() function is the talloc equivalent of the C library function asprintf(3)\&.
572
.PP
573
This function sets the name of the new pointer to the passed string\&. This is equivalent to:
574
.sp
575
.if n \{\
576
.RS 4
577
.\}
578
.nf
579
talloc_set_name_const(ptr, ptr)
580
.fi
581
.if n \{\
582
.RE
583
.\}
584
.SS "char *talloc_asprintf_append(char *s, const char *fmt, \&.\&.\&.);"
585
.PP
586
The talloc_asprintf_append() function appends the given formatted string to the given string\&.
587
.PP
588
This function sets the name of the new pointer to the new string\&. This is equivalent to:
589
.sp
590
.if n \{\
591
.RS 4
592
.\}
593
.nf
594
talloc_set_name_const(ptr, ptr)
595
.fi
596
.if n \{\
597
.RE
598
.\}
599
.SS "(type *)talloc_array(const void *ctx, type, unsigned int count);"
600
.PP
601
The talloc_array() macro is equivalent to:
602
.sp
603
.if n \{\
604
.RS 4
605
.\}
606
.nf
607
(type *)talloc_size(ctx, sizeof(type) * count);
608
.fi
609
.if n \{\
610
.RE
611
.\}
612
.PP
613
except that it provides integer overflow protection for the multiply, returning NULL if the multiply overflows\&.
614
.SS "void *talloc_array_size(const void *ctx, size_t size, unsigned int count);"
615
.PP
616
The talloc_array_size() function is useful when the type is not known\&. It operates in the same way as talloc_array(), but takes a size instead of a type\&.
617
.SS "(typeof(ptr)) talloc_array_ptrtype(const void *ctx, ptr, unsigned int count);"
618
.PP
619
The talloc_ptrtype() macro should be used when you have a pointer to an array and want to allocate memory of an array to point at with this pointer\&. When compiling with gcc >= 3 it is typesafe\&. Note this is a wrapper of talloc_array_size() and talloc_get_name() will return the current location in the source file\&. and not the type\&.
620
.SS "void *talloc_realloc_fn(const void *ctx, void *ptr, size_t size)"
621
.PP
622
This is a non\-macro version of talloc_realloc(), which is useful as libraries sometimes want a realloc function pointer\&. A realloc(3) implementation encapsulates the functionality of malloc(3), free(3) and realloc(3) in one call, which is why it is useful to be able to pass around a single function pointer\&.
623
.SS "void *talloc_autofree_context(void);"
624
.PP
625
This is a handy utility function that returns a talloc context which will be automatically freed on program exit\&. This can be used to reduce the noise in memory leak reports\&.
626
.SS "void *talloc_check_name(const void *ptr, const char *name);"
627
.PP
628
This function checks if a pointer has the specified
629
\fIname\fR\&. If it does then the pointer is returned\&. It it doesn\*(Aqt then NULL is returned\&.
630
.SS "(type *)talloc_get_type(const void *ptr, type);"
631
.PP
632
This macro allows you to do type checking on talloc pointers\&. It is particularly useful for void* private pointers\&. It is equivalent to this:
633
.sp
634
.if n \{\
635
.RS 4
636
.\}
637
.nf
638
(type *)talloc_check_name(ptr, #type)
639
.fi
640
.if n \{\
641
.RE
642
.\}
643
.SS "talloc_set_type(const void *ptr, type);"
644
.PP
645
This macro allows you to force the name of a pointer to be a particular
646
\fItype\fR\&. This can be used in conjunction with talloc_get_type() to do type checking on void* pointers\&.
647
.PP
648
It is equivalent to this:
649
.sp
650
.if n \{\
651
.RS 4
652
.\}
653
.nf
654
talloc_set_name_const(ptr, #type)
655
.fi
656
.if n \{\
657
.RE
658
.\}
659
.SS "talloc_set_log_fn(void (*log_fn)(const char *message));"
660
.PP
661
This function sets a logging function that talloc will use for warnings and errors\&. By default talloc will not print any warnings or errors\&.
662
.SS "talloc_set_log_stderr(void);"
663
.PP
664
This sets the talloc log function to write log messages to stderr
665
.SH "PERFORMANCE"
666
.PP
667
All the additional features of talloc(3) over malloc(3) do come at a price\&. We have a simple performance test in Samba4 that measures talloc() versus malloc() performance, and it seems that talloc() is about 10% slower than malloc() on my x86 Debian Linux box\&. For Samba, the great reduction in code complexity that we get by using talloc makes this worthwhile, especially as the total overhead of talloc/malloc in Samba is already quite small\&.
668
.SH "SEE ALSO"
669
.PP
670
malloc(3), strndup(3), vasprintf(3), asprintf(3),
671
\m[blue]\fB\%http://talloc.samba.org/\fR\m[]
672
.SH "AUTHOR"
673
.PP
674
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\&.
675
.SH "COPYRIGHT/LICENSE"
676
.PP
677
Copyright (C) Andrew Tridgell 2004
678
.PP
679
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version\&.
680
.PP
681
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\&.
682
.PP
683
You should have received a copy of the GNU General Public License along with this program; if not, see http://www\&.gnu\&.org/licenses/\&.
(-)b/net/samba415/files/man/tdbbackup.8 (+129 lines)
Added Link Here
1
'\" t
2
.\"     Title: tdbbackup
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 2015-04-25
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 3.6
8
.\"  Language: English
9
.\"
10
.TH "TDBBACKUP" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
tdbbackup \- tool for backing up and for validating the integrity of samba \&.tdb files
32
.SH "SYNOPSIS"
33
.HP \w'\fBtdbbackup\fR\ 'u
34
\fBtdbbackup\fR [\-s\ suffix] [\-v] [\-h] [\-l]
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(1)
39
suite\&.
40
.PP
41
\fBtdbbackup\fR
42
is a tool that may be used to backup samba \&.tdb files\&. This tool may also be used to verify the integrity of the \&.tdb files prior to samba startup or during normal operation\&. If it finds file damage and it finds a prior backup the backup file will be restored\&.
43
.SH "OPTIONS"
44
.PP
45
\-h
46
.RS 4
47
Get help information\&.
48
.RE
49
.PP
50
\-s suffix
51
.RS 4
52
The
53
\fB\-s\fR
54
option allows the administrator to specify a file backup extension\&. This way it is possible to keep a history of tdb backup files by using a new suffix for each backup\&.
55
.RE
56
.PP
57
\-v
58
.RS 4
59
The
60
\fB\-v\fR
61
will check the database for damages (corrupt data) which if detected causes the backup to be restored\&.
62
.RE
63
.PP
64
\-l
65
.RS 4
66
This options disables any locking, by passing TDB_NOLOCK to tdb_open_ex()\&. Only use this for database files which are not used by any other process! And also only if it is otherwise not possible to open the database, e\&.g\&. databases which were created with mutex locking\&.
67
.RE
68
.SH "COMMANDS"
69
.PP
70
\fIGENERAL INFORMATION\fR
71
.PP
72
The
73
\fBtdbbackup\fR
74
utility can safely be run at any time\&. It was designed so that it can be used at any time to validate the integrity of tdb files, even during Samba operation\&. Typical usage for the command will be:
75
.PP
76
tdbbackup [\-s suffix] *\&.tdb
77
.PP
78
Before restarting samba the following command may be run to validate \&.tdb files:
79
.PP
80
tdbbackup \-v [\-s suffix] *\&.tdb
81
.PP
82
Samba \&.tdb files are stored in various locations, be sure to run backup all \&.tdb file on the system\&. Important files includes:
83
.sp
84
.RS 4
85
.ie n \{\
86
\h'-04'\(bu\h'+03'\c
87
.\}
88
.el \{\
89
.sp -1
90
.IP \(bu 2.3
91
.\}
92
93
\fBsecrets\&.tdb\fR
94
\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&.
95
.RE
96
.sp
97
.RS 4
98
.ie n \{\
99
\h'-04'\(bu\h'+03'\c
100
.\}
101
.el \{\
102
.sp -1
103
.IP \(bu 2.3
104
.\}
105
106
\fBpassdb\&.tdb\fR
107
\- usual location is in the /usr/local/samba/private directory, or on some systems in /etc/samba\&.
108
.RE
109
.sp
110
.RS 4
111
.ie n \{\
112
\h'-04'\(bu\h'+03'\c
113
.\}
114
.el \{\
115
.sp -1
116
.IP \(bu 2.3
117
.\}
118
119
\fB*\&.tdb\fR
120
located in the /usr/local/samba/var directory or on some systems in the /var/cache or /var/lib/samba directories\&.
121
.RE
122
.SH "VERSION"
123
.PP
124
This man page is correct for version 3 of the Samba suite\&.
125
.SH "AUTHOR"
126
.PP
127
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\&.
128
.PP
129
The tdbbackup man page was written by John H Terpstra\&.
(-)b/net/samba415/files/man/tdbdump.8 (+72 lines)
Added Link Here
1
'\" t
2
.\"     Title: tdbdump
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 2015-04-25
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 3.6
8
.\"  Language: English
9
.\"
10
.TH "TDBDUMP" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
tdbdump \- tool for printing the contents of a TDB file
32
.SH "SYNOPSIS"
33
.HP \w'\fBtdbdump\fR\ 'u
34
\fBtdbdump\fR [\-k\ \fIkeyname\fR] [\-e] [\-h] {filename}
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(1)
39
suite\&.
40
.PP
41
\fBtdbdump\fR
42
is a very simple utility that \*(Aqdumps\*(Aq the contents of a TDB (Trivial DataBase) file to standard output in a human\-readable format\&.
43
.PP
44
This tool can be used when debugging problems with TDB files\&. It is intended for those who are somewhat familiar with Samba internals\&.
45
.SH "OPTIONS"
46
.PP
47
\-h
48
.RS 4
49
Get help information\&.
50
.RE
51
.PP
52
\-k \fIkeyname\fR
53
.RS 4
54
The
55
\fB\-k\fR
56
option restricts dumping to a single key, if found\&.
57
.RE
58
.PP
59
\-e
60
.RS 4
61
The
62
\fB\-e\fR
63
tries to dump out from a corrupt database\&. Naturally, such a dump is unreliable, at best\&.
64
.RE
65
.SH "VERSION"
66
.PP
67
This man page is correct for version 3 of the Samba suite\&.
68
.SH "AUTHOR"
69
.PP
70
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\&.
71
.PP
72
The tdbdump man page was written by Jelmer Vernooij\&.
(-)b/net/samba415/files/man/tdbrestore.8 (+54 lines)
Added Link Here
1
'\" t
2
.\"     Title: tdbrestore
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 2015-04-25
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 3.6
8
.\"  Language: English
9
.\"
10
.TH "TDBRESTORE" "8" "2015\-04\-25" "Samba 3\&.6" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
tdbrestore \- tool for creating a TDB file out of a tdbdump output
32
.SH "SYNOPSIS"
33
.HP \w'\fBtdbrestore\fR\ 'u
34
\fBtdbrestore\fR {tdbfilename}
35
.SH "DESCRIPTION"
36
.PP
37
This tool is part of the
38
\fBsamba\fR(1)
39
suite\&.
40
.PP
41
\fBtdbrestore\fR
42
is a very simple utility that \*(Aqrestores\*(Aq the contents of dump file into TDB (Trivial DataBase) file\&. The dump file is obtained from the tdbdump command\&.
43
.PP
44
This tool wait on the standard input for the content of the dump and will write the tdb in the tdbfilename parameter\&.
45
.PP
46
This tool can be used for unpacking the content of tdb as backup mean\&.
47
.SH "VERSION"
48
.PP
49
This man page is correct for version 3 of the Samba suite\&.
50
.SH "AUTHOR"
51
.PP
52
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\&. This tool was initially written by Volker Lendecke based on an idea by Simon McVittie\&.
53
.PP
54
The tdbrestore man page was written by Matthieu Patou\&.
(-)b/net/samba415/files/man/tdbtool.8 (+170 lines)
Added Link Here
1
'\" t
2
.\"     Title: tdbtool
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5
.\"      Date: 2015-04-25
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.0
8
.\"  Language: English
9
.\"
10
.TH "TDBTOOL" "8" "2015\-04\-25" "Samba 4\&.0" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
tdbtool \- manipulate the contents TDB files
32
.SH "SYNOPSIS"
33
.HP \w'\fBtdbtool\fR\ 'u
34
\fBtdbtool\fR
35
.HP \w'\fBtdbtool\fR\ 'u
36
\fBtdbtool\fR [\-l] \fITDBFILE\fR [\fICOMMANDS\fR...]
37
.SH "DESCRIPTION"
38
.PP
39
This tool is part of the
40
\fBsamba\fR(1)
41
suite\&.
42
.PP
43
\fBtdbtool\fR
44
a tool for displaying and altering the contents of Samba TDB (Trivial DataBase) files\&. Each of the commands listed below can be entered interactively or provided on the command line\&.
45
.SH "OPTIONS"
46
.PP
47
\-l
48
.RS 4
49
This options disables any locking, by passing TDB_NOLOCK to tdb_open_ex()\&. Only use this for database files which are not used by any other process! And also only if it is otherwise not possible to open the database, e\&.g\&. databases which were created with mutex locking\&.
50
.RE
51
.SH "COMMANDS"
52
.PP
53
\fBcreate\fR \fITDBFILE\fR
54
.RS 4
55
Create a new database named
56
\fITDBFILE\fR\&.
57
.RE
58
.PP
59
\fBopen\fR \fITDBFILE\fR
60
.RS 4
61
Open an existing database named
62
\fITDBFILE\fR\&.
63
.RE
64
.PP
65
\fBerase\fR
66
.RS 4
67
Erase the current database\&.
68
.RE
69
.PP
70
\fBdump\fR
71
.RS 4
72
Dump the current database as strings\&.
73
.RE
74
.PP
75
\fBcdump\fR
76
.RS 4
77
Dump the current database as connection records\&.
78
.RE
79
.PP
80
\fBkeys\fR
81
.RS 4
82
Dump the current database keys as strings\&.
83
.RE
84
.PP
85
\fBhexkeys\fR
86
.RS 4
87
Dump the current database keys as hex values\&.
88
.RE
89
.PP
90
\fBinfo\fR
91
.RS 4
92
Print summary information about the current database\&.
93
.RE
94
.PP
95
\fBinsert\fR \fIKEY\fR \fIDATA\fR
96
.RS 4
97
Insert a record into the current database\&.
98
.RE
99
.PP
100
\fBmove\fR \fIKEY\fR \fITDBFILE\fR
101
.RS 4
102
Move a record from the current database into
103
\fITDBFILE\fR\&.
104
.RE
105
.PP
106
\fBstore\fR \fIKEY\fR \fIDATA\fR
107
.RS 4
108
Store (replace) a record in the current database\&.
109
.RE
110
.PP
111
\fBshow\fR \fIKEY\fR
112
.RS 4
113
Show a record by key\&.
114
.RE
115
.PP
116
\fBdelete\fR \fIKEY\fR
117
.RS 4
118
Delete a record by key\&.
119
.RE
120
.PP
121
\fBlist\fR
122
.RS 4
123
Print the current database hash table and free list\&.
124
.RE
125
.PP
126
\fBfree\fR
127
.RS 4
128
Print the current database and free list\&.
129
.RE
130
.PP
131
\fB!\fR \fICOMMAND\fR
132
.RS 4
133
Execute the given system command\&.
134
.RE
135
.PP
136
\fBfirst\fR
137
.RS 4
138
Print the first record in the current database\&.
139
.RE
140
.PP
141
\fBnext\fR
142
.RS 4
143
Print the next record in the current database\&.
144
.RE
145
.PP
146
\fBcheck\fR
147
.RS 4
148
Check the integrity of the current database\&.
149
.RE
150
.PP
151
\fBrepack\fR
152
.RS 4
153
Repack a database using a temporary file to remove fragmentation\&.
154
.RE
155
.PP
156
\fBquit\fR
157
.RS 4
158
Exit
159
\fBtdbtool\fR\&.
160
.RE
161
.SH "CAVEATS"
162
.PP
163
The contents of the Samba TDB files are private to the implementation and should not be altered with
164
\fBtdbtool\fR\&.
165
.SH "VERSION"
166
.PP
167
This man page is correct for version 3\&.6 of the Samba suite\&.
168
.SH "AUTHOR"
169
.PP
170
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\&.
(-)b/net/samba415/files/man/vfs_freebsd.8 (+204 lines)
Added Link Here
1
'\" t
2
.\"     Title: vfs_freebsd
3
.\"    Author: [see the "AUTHOR" section]
4
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
5
.\"      Date: 06/24/2019
6
.\"    Manual: System Administration tools
7
.\"    Source: Samba 4.10.5
8
.\"  Language: English
9
.\"
10
.TH "VFS_FREEBSD" "8" "06/24/2019" "Samba 4\&.10\&.5" "System Administration tools"
11
.\" -----------------------------------------------------------------
12
.\" * Define some portability stuff
13
.\" -----------------------------------------------------------------
14
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15
.\" http://bugs.debian.org/507673
16
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18
.ie \n(.g .ds Aq \(aq
19
.el       .ds Aq '
20
.\" -----------------------------------------------------------------
21
.\" * set default formatting
22
.\" -----------------------------------------------------------------
23
.\" disable hyphenation
24
.nh
25
.\" disable justification (adjust text to left margin only)
26
.ad l
27
.\" -----------------------------------------------------------------
28
.\" * MAIN CONTENT STARTS HERE *
29
.\" -----------------------------------------------------------------
30
.SH "NAME"
31
vfs_freebsd \- FreeBSD\-specific VFS functions
32
.SH "SYNOPSIS"
33
.HP \w'\ 'u
34
vfs objects = freebsd
35
.SH "DESCRIPTION"
36
.PP
37
This VFS module is part of the
38
\fBsamba\fR(7)
39
suite\&.
40
.PP
41
The
42
vfs_freebsd
43
module implements some of the FreeBSD\-specific VFS functions\&.
44
.PP
45
This module is stackable\&.
46
.SH "OPTIONS"
47
.PP
48
freebsd:extattr mode=[legacy|compat|secure]
49
.RS 4
50
This parameter defines how the emulation of the Linux attr(5) extended attributes is performed through the FreeBSD native extattr(9) system calls\&.
51
.sp
52
Currently the
53
\fIsecurity\fR,
54
\fIsystem\fR,
55
\fItrusted\fR
56
and
57
\fIuser\fR
58
extended attribute(xattr) classes are defined in Linux\&. Contrary FreeBSD has only
59
\fIUSER\fR
60
and
61
\fISYSTEM\fR
62
extended attribute(extattr) namespaces, so mapping of one set into another isn\*(Aqt straightforward and can be done in different ways\&.
63
.sp
64
Historically the Samba(7) built\-in xattr mapping implementation simply converted
65
\fIsystem\fR
66
and
67
\fIuser\fR
68
xattr into corresponding
69
\fISYSTEM\fR
70
and
71
\fIUSER\fR
72
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
73
\fIsecurity\fR
74
and
75
\fItrusted\fR
76
as invalid\&. Such behavior in particular broke AD provisioning on UFS2 file systems as essential
77
\fIsecurity\&.NTACL\fR
78
xattr was rejected as invalid\&.
79
.sp
80
This module tries to address this problem and provide secure, where it\*(Aqs possible, way to map Linux xattr into FreeBSD\*(Aqs extattr\&.
81
.sp
82
When
83
\fImode\fR
84
is set to the
85
\fIlegacy (default)\fR
86
then modified version of built\-in mapping is used, where
87
\fIsystem\fR
88
xattr is mapped into SYSTEM namespace, while
89
\fIsecure\fR,
90
\fItrusted\fR
91
and
92
\fIuser\fR
93
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\&.
94
.sp
95
The
96
\fIcompat\fR
97
mode is mostly designed for the jailed environments, where it\*(Aqs 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
98
\fIclass\&.attribute\fR
99
format\&.
100
.sp
101
The
102
\fIsecure\fR
103
mode is meant for storing extended attributes in a secure manner, so that
104
\fIsecurity\fR,
105
\fIsystem\fR
106
and
107
\fItrusted\fR
108
are stored in the SYSTEM namespace, which can be modified only by root\&.
109
.RE
110
.SH ""
111
.sp
112
.it 1 an-trap
113
.nr an-no-space-flag 1
114
.nr an-break-flag 1
115
.br
116
.B Table\ \&1.\ \&Attributes mapping
117
.TS
118
allbox tab(:);
119
lB lB lB lB lB.
120
T{
121
122
T}:T{
123
built\-in
124
T}:T{
125
legacy
126
T}:T{
127
compat/jail
128
T}:T{
129
secure
130
T}
131
.T&
132
lB l l l l
133
lB l l l l
134
lB l l l l
135
lB l l l l.
136
T{
137
user
138
T}:T{
139
USER; attribute
140
T}:T{
141
USER; attribute
142
T}:T{
143
USER; user\&.attribute
144
T}:T{
145
USER; user\&.attribute
146
T}
147
T{
148
system
149
T}:T{
150
SYSTEM; attribute
151
T}:T{
152
SYSTEM; attribute
153
T}:T{
154
USER; system\&.attribute
155
T}:T{
156
SYSTEM; system\&.attribute
157
T}
158
T{
159
trusted
160
T}:T{
161
FAIL
162
T}:T{
163
USER; attribute
164
T}:T{
165
USER; trusted\&.attribute
166
T}:T{
167
SYSTEM; trusted\&.attribute
168
T}
169
T{
170
security
171
T}:T{
172
FAIL
173
T}:T{
174
USER; attribute
175
T}:T{
176
USER; security\&.attribute
177
T}:T{
178
SYSTEM; security\&.attribute
179
T}
180
.TE
181
.sp 1
182
.SH "EXAMPLES"
183
.PP
184
Use secure method of setting extended attributes on the share:
185
.sp
186
.if n \{\
187
.RS 4
188
.\}
189
.nf
190
	\fI[sysvol]\fR
191
	\m[blue]\fBvfs objects = freebsd\fR\m[]
192
	\m[blue]\fBfreebsd:extattr mode = secure\fR\m[]
193
.fi
194
.if n \{\
195
.RE
196
.\}
197
.SH "VERSION"
198
.PP
199
This man page is part of version 4\&.10\&.5 of the Samba suite\&.
200
.SH "AUTHOR"
201
.PP
202
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\&.
203
.PP
204
This module was written by Timur I\&. Bakeyev
(-)b/net/samba415/files/pkg-message.in (+24 lines)
Added Link Here
1
[
2
{ type: install
3
  message: <<EOM
4
How to start: http://wiki.samba.org/index.php/Samba4/HOWTO
5
6
* Your configuration is: %%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%
7
8
* All the relevant databases are under: %%SAMBA4_LOCKDIR%%
9
10
* All the logs are under: %%SAMBA4_LOGDIR%%
11
12
%%AD_DC%%* Provisioning script is: %%PREFIX%%/bin/samba-tool
13
%%AD_DC%%
14
%%NSUPDATE%%You will need to specify location of the 'nsupdate' command in the
15
%%NSUPDATE%%%%SAMBA4_CONFIG%% file:
16
%%NSUPDATE%%
17
%%NSUPDATE%%      nsupdate command = %%PREFIX%%/bin/samba-nsupdate -g
18
%%NSUPDATE%%
19
For additional documentation check: http://wiki.samba.org/index.php/Samba4
20
21
Bug reports should go to the: https://bugzilla.samba.org/
22
EOM
23
}
24
]
(-)b/net/samba415/files/samba_server.in (+196 lines)
Added Link Here
1
#!/bin/sh
2
3
# PROVIDE: samba_server
4
# REQUIRE: NETWORKING SERVERS DAEMON ldconfig resolv ntpd %%SAMBA4_SERVICES%%
5
# BEFORE: LOGIN
6
# KEYWORD: shutdown
7
#
8
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
9
# to enable this service:
10
#
11
#samba_server_enable="YES"
12
#
13
# You can disable/enable any of the Samba daemons by specifying:
14
#samba_enable="NO"
15
#nmbd_enable="NO"
16
#smbd_enable="NO"
17
# You need to enable winbindd separately, by adding:
18
#winbindd_enable="YES"
19
# Configuration file can be set with:
20
#samba_server_config="%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%"
21
#
22
23
. /etc/rc.subr
24
25
name="samba_server"
26
rcvar=${name}_enable
27
# Defaults
28
samba_server_config_default="%%SAMBA4_CONFDIR%%/%%SAMBA4_CONFIG%%"
29
smbcontrol_command="%%PREFIX%%/bin/smbcontrol"
30
# Custom commands
31
extra_commands="reload status configtest"
32
33
start_precmd="samba_server_prestart"
34
restart_precmd="samba_server_checkconfig"
35
reload_precmd="samba_server_checkconfig"
36
start_cmd="samba_server_cmd"
37
stop_cmd="samba_server_cmd"
38
status_cmd="samba_server_cmd"
39
configtest_cmd="samba_server_checkconfig"
40
reload_cmd="samba_server_reload_cmd"
41
rcvar_cmd="samba_server_rcvar_cmd"
42
43
samba_server_checkconfig() {
44
    echo -n "Performing sanity check on Samba configuration: "
45
    if ${testparm_command} >/dev/null 2>&1; then
46
	echo "OK"
47
    else
48
	echo "FAILED"
49
	return 1
50
    fi
51
}
52
53
samba_server_prestart() {
54
    # Make sure we have our RUNDIR, even if it's on a tmpfs
55
    if [ -d "${samba_server_piddir}" -o ! -e "${samba_server_piddir}" ]; then
56
	install -d -m 0755 "${samba_server_piddir}"
57
    fi
58
    # https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200186
59
    if [ -d "${samba_server_privatedir}" -o ! -e "${samba_server_privatedir}" ]; then
60
	install -d -m 0700 "${samba_server_privatedir}"
61
    fi
62
    samba_server_checkconfig
63
}
64
65
samba_server_rcvar_cmd() {
66
    local name rcvar
67
    rcvar=${name}_enable
68
    # Prevent recursive calling
69
    unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
70
    # Check master variable
71
    run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
72
    # Check dependent variables
73
    for name in ${samba_daemons}; do
74
	# XXX
75
	rcvars=''; v=''
76
	rcvar=${name}_enable
77
	run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
78
    done
79
}
80
81
samba_server_reload_cmd() {
82
    local name rcvar command pidfile force_run
83
    # Prevent recursive calling
84
    unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
85
    # Ignore rcvar and run command
86
    if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
87
	force_run=yes
88
    fi
89
    # Apply to all daemons
90
    for name in ${samba_daemons}; do
91
	rcvar=${name}_enable
92
	command="%%PREFIX%%/sbin/${name}"
93
	pidfile="${samba_server_piddir}/${name}.pid"
94
	# Daemon should be enabled and running
95
	if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
96
	    if [ -n "$(check_pidfile "${pidfile}" "${command}")" ]; then
97
		debug "reloading ${name} configuration"
98
		echo "Reloading ${name}."
99
		${smbcontrol_command} "${name}" 'reload-config' ${command_args} >/dev/null 2>&1
100
	    fi
101
	fi
102
    done
103
}
104
105
samba_server_cmd() {
106
    local name rcvar rcvars v command pidfile samba_daemons result force_run
107
    # Prevent recursive calling
108
    unset "${rc_arg}_cmd" "${rc_arg}_precmd" "${rc_arg}_postcmd"
109
    # Stop processes in the reverse order
110
    if [ "${rc_arg}" = "stop" ] ; then
111
	samba_daemons=$(reverse_list ${samba_daemons})
112
    fi
113
    # Ignore rcvar and run command
114
    if [ -n "${_rc_prefix}" -a "${_rc_prefix}" = "one" ] || [ -n "${rc_force}" ] || [ -n "${rc_fast}" ]; then
115
	force_run=yes
116
    fi
117
    # Assume success
118
    result=0
119
    # Apply to all daemons
120
    for name in ${samba_daemons}; do
121
	# XXX
122
	rcvars=''; v=''
123
	rcvar=${name}_enable
124
	command="%%PREFIX%%/sbin/${name}"
125
	pidfile="${samba_server_piddir}/${name}.pid"
126
	# Daemon should be enabled and running
127
	if ( [ -n "${rcvar}" ] && checkyesno "${rcvar}" ) || [ -n "$force_run" ]; then
128
	    run_rc_command "${_rc_prefix}${rc_arg}" ${rc_extra_args}
129
	    # If any of the commands failed, take it as a global result
130
	    result=$((${result} || $?))
131
	fi
132
    done
133
    return ${result}
134
}
135
136
samba_server_config_init() {
137
    local name
138
    # Load configuration
139
    load_rc_config "${name}"
140
    # Defaults
141
    samba_server_enable=${samba_server_enable:=NO}
142
    samba_server_config=${samba_server_config=${samba_server_config_default}}
143
    samba_server_configfile_arg=${samba_server_config:+--configfile="${samba_server_config}"}			#"
144
    #testparm_command="%%PREFIX%%/bin/samba-tool testparm --suppress-prompt --verbose ${samba_server_configfile_arg}"
145
    testparm_command="%%PREFIX%%/bin/testparm --suppress-prompt --verbose ${samba_server_config}"
146
    # Determine what daemons are necessary to run Samba in the current role
147
    samba_server_role=$(${testparm_command} --parameter-name='server role' 2>/dev/null)
148
    case "${samba_server_role}" in
149
	active\ directory\ domain\ controller)
150
	    samba_daemons="samba"
151
	    ;;
152
	auto|*)
153
	    samba_daemons="nmbd smbd winbindd"
154
	    ;;
155
    esac
156
    # Load daemons configuration
157
    for name in ${samba_daemons}; do
158
	load_rc_config "${name}"
159
	# If samba_server_enable is 'YES'
160
	if [ -n "${rcvar}" ] && checkyesno "${rcvar}"; then
161
	    if [ "${name}" != "winbindd" ]; then
162
		# Set variable to 'YES' only if it is unset
163
		eval ${name}_enable=\${${name}_enable-YES}
164
	    else
165
		# Winbindd
166
		samba_server_idmap=$(${testparm_command} --parameter-name='idmap uid' 2>/dev/null)
167
		if [ -n "${samba_server_idmap}" ]; then
168
		    winbindd_enable="YES"
169
		fi
170
	    fi
171
	fi
172
	# If variable is empty, set it to 'NO'
173
	eval ${name}_enable=\${${name}_enable:-NO}
174
    done
175
    # Fetch parameters from configuration file
176
    samba_server_lockdir="$(${testparm_command} --parameter-name='lock directory' 2>/dev/null)"
177
    samba_server_lockdir=${samba_server_lockdir:=%%SAMBA4_LOCKDIR%%}
178
    samba_server_piddir="$(${testparm_command} --parameter-name='pid directory' 2>/dev/null)"
179
    samba_server_piddir=${samba_server_piddir:=%%SAMBA4_RUNDIR%%}
180
    samba_server_privatedir="$(${testparm_command} --parameter-name='private dir' 2>/dev/null)"
181
    samba_server_privatedir=${samba_server_privatedir:=%%SAMBA4_PRIVATEDIR%%}
182
}
183
184
# Load configuration variables
185
samba_server_config_init
186
# Common flags
187
command_args=${samba_server_configfile_arg}
188
samba_flags=${samba_flags="--daemon"}
189
nmbd_flags=${nmbd_flags="--daemon"}
190
smbd_flags=${smbd_flags="--daemon"}
191
winbindd_flags=${winbindd_flags="--daemon"}
192
# Requirements
193
required_files="${samba_server_config}"
194
required_dirs="${samba_server_lockdir}"
195
196
run_rc_command "$1"
(-)b/net/samba415/pkg-descr (+8 lines)
Added Link Here
1
Samba4 is an attempt to implement an Active Directory compatible Domain
2
Controller.
3
4
In short, you can join a WinNT, Win2000, WinXP or Win 2003 - 2016 member
5
server to a Samba4 domain, and it will behave much as it does in AD,
6
including Kerberos domain logins where applicable.
7
8
WWW: https://www.samba.org/
(-)b/net/samba415/pkg-plist (+453 lines)
Added Link Here
1
bin/cifsdd
2
bin/dbwrap_tool
3
bin/dumpmscat
4
bin/findsmb
5
bin/gentest
6
bin/locktest
7
bin/masktest
8
bin/mdfind
9
bin/mvxattr
10
bin/ndrdump
11
bin/net
12
bin/nmblookup
13
bin/ntlm_auth
14
bin/oLschema2ldif
15
bin/pdbedit
16
bin/profiles
17
bin/regdiff
18
bin/regpatch
19
bin/regshell
20
bin/regtree
21
bin/rpcclient
22
bin/samba-regedit
23
bin/sharesec
24
bin/smbcacls
25
bin/smbclient
26
bin/smbcontrol
27
bin/smbcquotas
28
bin/smbget
29
bin/smbpasswd
30
bin/smbspool
31
bin/smbstatus
32
bin/smbtar
33
bin/smbtree
34
bin/testparm
35
bin/vfstest
36
bin/wbinfo
37
sbin/eventlogadm
38
sbin/nmbd
39
sbin/smbd
40
sbin/winbindd
41
include/samba4/charset.h
42
include/samba4/core/doserr.h
43
include/samba4/core/error.h
44
include/samba4/core/hresult.h
45
include/samba4/core/ntstatus_gen.h
46
include/samba4/core/ntstatus.h
47
include/samba4/core/werror_gen.h
48
include/samba4/core/werror.h
49
include/samba4/credentials.h
50
include/samba4/dcerpc.h
51
include/samba4/dcesrv_core.h
52
%%LDAP%%include/samba4/smb_ldap.h
53
%%LDAP%%include/samba4/smbldap.h
54
include/samba4/domain_credentials.h
55
include/samba4/gen_ndr/atsvc.h
56
include/samba4/gen_ndr/auth.h
57
include/samba4/gen_ndr/dcerpc.h
58
include/samba4/gen_ndr/drsblobs.h
59
include/samba4/gen_ndr/drsuapi.h
60
include/samba4/gen_ndr/krb5pac.h
61
include/samba4/gen_ndr/lsa.h
62
include/samba4/gen_ndr/misc.h
63
include/samba4/gen_ndr/nbt.h
64
include/samba4/gen_ndr/ndr_atsvc.h
65
include/samba4/gen_ndr/ndr_dcerpc.h
66
include/samba4/gen_ndr/ndr_drsblobs.h
67
include/samba4/gen_ndr/ndr_drsuapi.h
68
include/samba4/gen_ndr/ndr_krb5pac.h
69
include/samba4/gen_ndr/ndr_misc.h
70
include/samba4/gen_ndr/ndr_nbt.h
71
include/samba4/gen_ndr/ndr_samr_c.h
72
include/samba4/gen_ndr/ndr_samr.h
73
include/samba4/gen_ndr/ndr_svcctl_c.h
74
include/samba4/gen_ndr/ndr_svcctl.h
75
include/samba4/gen_ndr/netlogon.h
76
include/samba4/gen_ndr/samr.h
77
include/samba4/gen_ndr/security.h
78
include/samba4/gen_ndr/server_id.h
79
include/samba4/gen_ndr/svcctl.h
80
include/samba4/ldb_wrap.h
81
include/samba4/libsmbclient.h
82
include/samba4/lookup_sid.h
83
include/samba4/machine_sid.h
84
include/samba4/ndr.h
85
include/samba4/ndr/ndr_dcerpc.h
86
include/samba4/ndr/ndr_drsblobs.h
87
include/samba4/ndr/ndr_drsuapi.h
88
include/samba4/ndr/ndr_krb5pac.h
89
include/samba4/ndr/ndr_nbt.h
90
include/samba4/ndr/ndr_svcctl.h
91
include/samba4/netapi.h
92
include/samba4/param.h
93
include/samba4/passdb.h
94
include/samba4/rpc_common.h
95
include/samba4/samba/session.h
96
include/samba4/samba/version.h
97
include/samba4/share.h
98
include/samba4/smb2_lease_struct.h
99
include/samba4/smbconf.h
100
include/samba4/tdr.h
101
include/samba4/tsocket_internal.h
102
include/samba4/tsocket.h
103
include/samba4/util_ldb.h
104
include/samba4/util/attr.h
105
include/samba4/util/blocking.h
106
include/samba4/util/data_blob.h
107
include/samba4/util/debug.h
108
include/samba4/util/discard.h
109
include/samba4/util/fault.h
110
include/samba4/util/genrand.h
111
include/samba4/util/idtree_random.h
112
include/samba4/util/idtree.h
113
include/samba4/util/signal.h
114
include/samba4/util/string_wrappers.h
115
include/samba4/util/substitute.h
116
include/samba4/util/tevent_ntstatus.h
117
include/samba4/util/tevent_unix.h
118
include/samba4/util/tevent_werror.h
119
include/samba4/util/tfork.h
120
include/samba4/util/time.h
121
include/samba4/wbclient.h
122
@dir include/samba4/util
123
@dir include/samba4/samba
124
@dir include/samba4/ndr
125
@dir include/samba4/gen_ndr
126
@dir include/samba4/core
127
@dir include/samba4
128
%%SAMBA4_LIBDIR%%/libdcerpc-binding.so
129
%%SAMBA4_LIBDIR%%/libdcerpc-binding.so.0
130
%%SAMBA4_LIBDIR%%/libdcerpc-samr.so
131
%%SAMBA4_LIBDIR%%/libdcerpc-samr.so.0
132
%%SAMBA4_LIBDIR%%/libdcerpc-server-core.so
133
%%SAMBA4_LIBDIR%%/libdcerpc-server-core.so.0
134
%%SAMBA4_LIBDIR%%/libdcerpc.so
135
%%SAMBA4_LIBDIR%%/libdcerpc.so.0
136
%%SAMBA4_LIBDIR%%/libndr-krb5pac.so
137
%%SAMBA4_LIBDIR%%/libndr-krb5pac.so.0
138
%%SAMBA4_LIBDIR%%/libndr-nbt.so
139
%%SAMBA4_LIBDIR%%/libndr-nbt.so.0
140
%%SAMBA4_LIBDIR%%/libndr-standard.so
141
%%SAMBA4_LIBDIR%%/libndr-standard.so.0
142
%%SAMBA4_LIBDIR%%/libndr.so
143
%%SAMBA4_LIBDIR%%/libndr.so.1
144
%%SAMBA4_LIBDIR%%/libnetapi.so
145
%%SAMBA4_LIBDIR%%/libnetapi.so.0
146
%%SAMBA4_LIBDIR%%/libsamba-credentials.so
147
%%SAMBA4_LIBDIR%%/libsamba-credentials.so.0
148
%%SAMBA4_LIBDIR%%/libsamba-errors.so
149
%%SAMBA4_LIBDIR%%/libsamba-errors.so.1
150
%%SAMBA4_LIBDIR%%/libsamba-hostconfig.so
151
%%SAMBA4_LIBDIR%%/libsamba-hostconfig.so.0
152
%%SAMBA4_LIBDIR%%/libsamba-passdb.so
153
%%SAMBA4_LIBDIR%%/libsamba-passdb.so.0
154
%%SAMBA4_LIBDIR%%/libsamba-util.so
155
%%SAMBA4_LIBDIR%%/libsamba-util.so.0
156
%%SAMBA4_LIBDIR%%/libsamdb.so
157
%%SAMBA4_LIBDIR%%/libsamdb.so.0
158
%%SAMBA4_LIBDIR%%/libsmbclient.so
159
%%SAMBA4_LIBDIR%%/libsmbclient.so.0
160
%%SAMBA4_LIBDIR%%/libsmbconf.so
161
%%SAMBA4_LIBDIR%%/libsmbconf.so.0
162
%%LDAP%%%%SAMBA4_LIBDIR%%/libsmbldap.so
163
%%LDAP%%%%SAMBA4_LIBDIR%%/libsmbldap.so.2
164
%%SAMBA4_LIBDIR%%/libtevent-util.so
165
%%SAMBA4_LIBDIR%%/libtevent-util.so.0
166
%%SAMBA4_LIBDIR%%/libwbclient.so
167
%%SAMBA4_LIBDIR%%/libwbclient.so.0
168
lib/nss_winbind.so.1
169
lib/nss_wins.so.1
170
lib/pam_winbind.so
171
%%CUPS%%libexec/samba/smbspool_krb5_wrapper
172
%%SAMBA4_LIBDIR%%/private/libCHARSET3-samba4.so
173
%%SAMBA4_LIBDIR%%/private/libLIBWBCLIENT-OLD-samba4.so
174
%%SAMBA4_LIBDIR%%/private/libMESSAGING-samba4.so
175
%%SAMBA4_LIBDIR%%/private/libMESSAGING-SEND-samba4.so
176
%%SAMBA4_LIBDIR%%/private/libaddns-samba4.so
177
%%SAMBA4_LIBDIR%%/private/libads-samba4.so
178
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libasn1-samba4.so.8
179
%%SAMBA4_LIBDIR%%/private/libasn1util-samba4.so
180
%%SAMBA4_LIBDIR%%/private/libauth-samba4.so
181
%%SAMBA4_LIBDIR%%/private/libauth-unix-token-samba4.so
182
%%SAMBA4_LIBDIR%%/private/libauth4-samba4.so
183
%%SAMBA4_LIBDIR%%/private/libauthkrb5-samba4.so
184
%%SAMBA4_LIBDIR%%/private/libcli-cldap-samba4.so
185
%%SAMBA4_LIBDIR%%/private/libcli-ldap-common-samba4.so
186
%%SAMBA4_LIBDIR%%/private/libcli-ldap-samba4.so
187
%%SAMBA4_LIBDIR%%/private/libcli-nbt-samba4.so
188
%%SAMBA4_LIBDIR%%/private/libcli-smb-common-samba4.so
189
%%SAMBA4_LIBDIR%%/private/libclidns-samba4.so
190
%%SAMBA4_LIBDIR%%/private/libcli-spoolss-samba4.so
191
%%SAMBA4_LIBDIR%%/private/libcliauth-samba4.so
192
%%SAMBA4_LIBDIR%%/private/libcluster-samba4.so
193
%%SAMBA4_LIBDIR%%/private/libcmdline-contexts-samba4.so
194
%%SAMBA4_LIBDIR%%/private/libcmdline-credentials-samba4.so
195
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libcom_err-samba4.so.0
196
%%SAMBA4_LIBDIR%%/private/libcommon-auth-samba4.so
197
%%SAMBA4_LIBDIR%%/private/libdbwrap-samba4.so
198
%%SAMBA4_LIBDIR%%/private/libdcerpc-pkt-auth-samba4.so
199
%%SAMBA4_LIBDIR%%/private/libdcerpc-samba-samba4.so
200
%%SAMBA4_LIBDIR%%/private/libdcerpc-samba4.so
201
%%SAMBA4_LIBDIR%%/private/libdsdb-module-samba4.so
202
%%SAMBA4_LIBDIR%%/private/libevents-samba4.so
203
%%SAMBA4_LIBDIR%%/private/libflag-mapping-samba4.so
204
%%SAMBA4_LIBDIR%%/private/libgenrand-samba4.so
205
%%SAMBA4_LIBDIR%%/private/libgensec-samba4.so
206
%%SAMBA4_LIBDIR%%/private/libgpext-samba4.so
207
%%SAMBA4_LIBDIR%%/private/libgpo-samba4.so
208
%%SAMBA4_LIBDIR%%/private/libgse-samba4.so
209
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libgssapi-samba4.so.2
210
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhcrypto-samba4.so.5
211
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhdb-samba4.so.11
212
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libheimbase-samba4.so.1
213
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libheimntlm-samba4.so.1
214
%%SAMBA4_LIBDIR%%/private/libhttp-samba4.so
215
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libhx509-samba4.so.5
216
%%SAMBA4_LIBDIR%%/private/libidmap-samba4.so
217
%%SAMBA4_LIBDIR%%/private/libinterfaces-samba4.so
218
%%SAMBA4_LIBDIR%%/private/libiov-buf-samba4.so
219
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libkdc-samba4.so.2
220
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libkrb5-samba4.so.26
221
%%SAMBA4_LIBDIR%%/private/libkrb5samba-samba4.so
222
%%SAMBA4_LIBDIR%%/private/libldbsamba-samba4.so
223
%%SAMBA4_LIBDIR%%/private/liblibcli-lsa3-samba4.so
224
%%SAMBA4_LIBDIR%%/private/liblibcli-netlogon3-samba4.so
225
%%SAMBA4_LIBDIR%%/private/liblibsmb-samba4.so
226
%%SAMBA4_LIBDIR%%/private/libmessages-dgm-samba4.so
227
%%SAMBA4_LIBDIR%%/private/libmessages-util-samba4.so
228
%%SAMBA4_LIBDIR%%/private/libmscat-samba4.so
229
%%SAMBA4_LIBDIR%%/private/libmsghdr-samba4.so
230
%%SAMBA4_LIBDIR%%/private/libmsrpc3-samba4.so
231
%%SAMBA4_LIBDIR%%/private/libndr-samba-samba4.so
232
%%SAMBA4_LIBDIR%%/private/libndr-samba4.so
233
%%SAMBA4_LIBDIR%%/private/libnet-keytab-samba4.so
234
%%SAMBA4_LIBDIR%%/private/libnetif-samba4.so
235
%%SAMBA4_LIBDIR%%/private/libnpa-tstream-samba4.so
236
%%SAMBA4_LIBDIR%%/private/libnss-info-samba4.so
237
%%SAMBA4_LIBDIR%%/private/libpopt-samba3-cmdline-samba4.so
238
%%SAMBA4_LIBDIR%%/private/libpopt-samba3-samba4.so
239
%%SAMBA4_LIBDIR%%/private/libposix-eadb-samba4.so
240
%%SAMBA4_LIBDIR%%/private/libprinter-driver-samba4.so
241
%%SAMBA4_LIBDIR%%/private/libprinting-migrate-samba4.so
242
%%SAMBA4_LIBDIR%%/private/libregistry-samba4.so
243
%%SAMBA4_LIBDIR%%/private/libreplace-samba4.so
244
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libroken-samba4.so.19
245
%%SAMBA4_LIBDIR%%/private/libsamba-cluster-support-samba4.so
246
%%SAMBA4_LIBDIR%%/private/libsamba-debug-samba4.so
247
%%SAMBA4_LIBDIR%%/private/libsamba-modules-samba4.so
248
%%SAMBA4_LIBDIR%%/private/libsamba-security-samba4.so
249
%%SAMBA4_LIBDIR%%/private/libsamba-sockets-samba4.so
250
%%SAMBA4_LIBDIR%%/private/libsamba3-util-samba4.so
251
%%SAMBA4_LIBDIR%%/private/libsamdb-common-samba4.so
252
%%SAMBA4_LIBDIR%%/private/libsecrets3-samba4.so
253
%%SAMBA4_LIBDIR%%/private/libserver-id-db-samba4.so
254
%%SAMBA4_LIBDIR%%/private/libserver-role-samba4.so
255
%%SAMBA4_LIBDIR%%/private/libshares-samba4.so
256
%%SAMBA4_LIBDIR%%/private/libsmb-transport-samba4.so
257
%%SAMBA4_LIBDIR%%/private/libsmbclient-raw-samba4.so
258
%%SAMBA4_LIBDIR%%/private/libsmbd-base-samba4.so
259
%%SAMBA4_LIBDIR%%/private/libsmbd-shim-samba4.so
260
%%LDAP%%%%SAMBA4_LIBDIR%%/private/libsmbldaphelper-samba4.so
261
%%SAMBA4_LIBDIR%%/private/libsmbpasswdparser-samba4.so
262
%%SAMBA4_LIBDIR%%/private/libsocket-blocking-samba4.so
263
%%SAMBA4_LIBDIR%%/private/libsys-rw-samba4.so
264
%%SAMBA4_LIBDIR%%/private/libtalloc-report-printf-samba4.so
265
%%SAMBA4_LIBDIR%%/private/libtalloc-report-samba4.so
266
%%SAMBA4_LIBDIR%%/private/libtdb-wrap-samba4.so
267
%%SAMBA4_LIBDIR%%/private/libtime-basic-samba4.so
268
%%SAMBA4_LIBDIR%%/private/libtorture-samba4.so
269
%%SAMBA4_LIBDIR%%/private/libtrusts-util-samba4.so
270
%%SAMBA4_LIBDIR%%/private/libutil-cmdline-samba4.so
271
%%SAMBA4_LIBDIR%%/private/libutil-reg-samba4.so
272
%%SAMBA4_LIBDIR%%/private/libutil-setid-samba4.so
273
%%SAMBA4_LIBDIR%%/private/libutil-tdb-samba4.so
274
%%SAMBA4_LIBDIR%%/private/libwinbind-client-samba4.so
275
%%GSSAPI_BUILTIN%%%%SAMBA4_LIBDIR%%/private/libwind-samba4.so.0
276
%%SAMBA4_LIBDIR%%/private/libxattr-tdb-samba4.so
277
@dir %%SAMBA4_LIBDIR%%/private
278
@dir %%SAMBA4_LIBDIR%%
279
%%PKGCONFIGDIR%%/dcerpc.pc
280
%%PKGCONFIGDIR%%/dcerpc_samr.pc
281
%%PKGCONFIGDIR%%/ndr.pc
282
%%PKGCONFIGDIR%%/ndr_krb5pac.pc
283
%%PKGCONFIGDIR%%/ndr_nbt.pc
284
%%PKGCONFIGDIR%%/ndr_standard.pc
285
%%PKGCONFIGDIR%%/netapi.pc
286
%%PKGCONFIGDIR%%/samba-credentials.pc
287
%%PKGCONFIGDIR%%/samba-hostconfig.pc
288
%%PKGCONFIGDIR%%/samba-util.pc
289
%%PKGCONFIGDIR%%/samdb.pc
290
%%PKGCONFIGDIR%%/smbclient.pc
291
%%PKGCONFIGDIR%%/wbclient.pc
292
@comment Setup files
293
%%SPOTLIGHT%%%%DATADIR%%/samba/mdssvc/elasticsearch_mappings.json
294
@comment Man pages
295
man/man1/dbwrap_tool.1.gz
296
man/man1/findsmb.1.gz
297
man/man1/gentest.1.gz
298
man/man1/locktest.1.gz
299
man/man1/log2pcap.1.gz
300
man/man1/masktest.1.gz
301
man/man1/mdfind.1.gz
302
man/man1/mvxattr.1.gz
303
man/man1/ndrdump.1.gz
304
man/man1/nmblookup.1.gz
305
man/man1/ntlm_auth.1.gz
306
man/man1/oLschema2ldif.1.gz
307
man/man1/profiles.1.gz
308
man/man1/regdiff.1.gz
309
man/man1/regpatch.1.gz
310
man/man1/regshell.1.gz
311
man/man1/regtree.1.gz
312
man/man1/rpcclient.1.gz
313
man/man1/sharesec.1.gz
314
man/man1/smbcacls.1.gz
315
man/man1/smbclient.1.gz
316
man/man1/smbcontrol.1.gz
317
man/man1/smbcquotas.1.gz
318
man/man1/smbget.1.gz
319
man/man1/smbstatus.1.gz
320
man/man1/smbtar.1.gz
321
man/man1/smbtree.1.gz
322
man/man1/testparm.1.gz
323
man/man1/vfstest.1.gz
324
man/man1/wbinfo.1.gz
325
man/man5/lmhosts.5.gz
326
man/man5/pam_winbind.conf.5.gz
327
man/man5/smb.conf.5.gz
328
man/man5/smb4.conf.5.gz
329
man/man5/smbgetrc.5.gz
330
man/man5/smbpasswd.5.gz
331
man/man7/libsmbclient.7.gz
332
man/man7/samba.7.gz
333
man/man7/traffic_learner.7.gz
334
man/man7/traffic_replay.7.gz
335
man/man8/cifsdd.8.gz
336
man/man8/eventlogadm.8.gz
337
man/man8/idmap_ad.8.gz
338
man/man8/idmap_autorid.8.gz
339
man/man8/idmap_hash.8.gz
340
man/man8/idmap_ldap.8.gz
341
man/man8/idmap_nss.8.gz
342
man/man8/idmap_rfc2307.8.gz
343
man/man8/idmap_rid.8.gz
344
man/man8/idmap_script.8.gz
345
man/man8/idmap_tdb.8.gz
346
man/man8/idmap_tdb2.8.gz
347
man/man8/net.8.gz
348
man/man8/nmbd.8.gz
349
man/man8/pam_winbind.8.gz
350
man/man8/pdbedit.8.gz
351
man/man8/samba_downgrade_db.8.gz
352
man/man8/samba-regedit.8.gz
353
man/man8/samba-tool.8.gz
354
man/man8/samba.8.gz
355
man/man8/smbd.8.gz
356
man/man8/smbpasswd.8.gz
357
%%CUPS%%man/man8/smbspool_krb5_wrapper.8.gz
358
man/man8/smbspool.8.gz
359
man/man8/vfs_acl_tdb.8.gz
360
man/man8/vfs_acl_xattr.8.gz
361
man/man8/vfs_aio_fork.8.gz
362
man/man8/vfs_aio_pthread.8.gz
363
man/man8/vfs_audit.8.gz
364
man/man8/vfs_cacheprime.8.gz
365
man/man8/vfs_cap.8.gz
366
man/man8/vfs_catia.8.gz
367
man/man8/vfs_commit.8.gz
368
man/man8/vfs_crossrename.8.gz
369
man/man8/vfs_default_quota.8.gz
370
man/man8/vfs_dirsort.8.gz
371
man/man8/vfs_extd_audit.8.gz
372
man/man8/vfs_fake_perms.8.gz
373
man/man8/vfs_freebsd.8.gz
374
man/man8/vfs_full_audit.8.gz
375
man/man8/vfs_linux_xfs_sgid.8.gz
376
man/man8/vfs_media_harmony.8.gz
377
man/man8/vfs_offline.8.gz
378
man/man8/vfs_preopen.8.gz
379
man/man8/vfs_readahead.8.gz
380
man/man8/vfs_readonly.8.gz
381
man/man8/vfs_recycle.8.gz
382
man/man8/vfs_shadow_copy.8.gz
383
man/man8/vfs_shadow_copy2.8.gz
384
man/man8/vfs_shell_snap.8.gz
385
man/man8/vfs_streams_depot.8.gz
386
man/man8/vfs_streams_xattr.8.gz
387
man/man8/vfs_syncops.8.gz
388
man/man8/vfs_time_audit.8.gz
389
man/man8/vfs_unityed_media.8.gz
390
man/man8/vfs_virusfilter.8.gz
391
man/man8/vfs_widelinks.8.gz
392
man/man8/vfs_worm.8.gz
393
man/man8/vfs_xattr_tdb.8.gz
394
man/man8/vfs_zfsacl.8.gz
395
man/man8/winbind_krb5_locator.8.gz
396
man/man8/winbindd.8.gz
397
@dir %%SAMBA4_RUNDIR%%
398
@dir %%SAMBA4_LOGDIR%%
399
@dir %%SAMBA4_LOCKDIR%%
400
@dir %%SAMBA4_PRIVATEDIR%%
401
@dir %%SAMBA4_BINDDNSDIR%%
402
@comment Use bundled libraries
403
%%SAMBA4_BUNDLED_CMOCKA%%%%SAMBA4_LIBDIR%%/private/libcmocka-samba4.so
404
%%SAMBA4_BUNDLED_LDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_ldb_text.py
405
%%SAMBA4_BUNDLED_LDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/ldb%%PYTHON_EXT_SUFFIX%%.so
406
%%SAMBA4_BUNDLED_LDB%%%%PYTHON3%%%%SAMBA4_LIBDIR%%/private/libpyldb-util%%PYTHON_EXT_SUFFIX%%.so.2
407
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbdump
408
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbadd
409
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbdel
410
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbedit
411
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbmodify
412
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbrename
413
%%SAMBA4_BUNDLED_LDB%%bin/samba-ldbsearch
414
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_LIBDIR%%/private/libldb-cmdline-samba4.so
415
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_LIBDIR%%/private/libldb-key-value-samba4.so
416
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_LIBDIR%%/private/libldb-tdb-err-map-samba4.so
417
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_LIBDIR%%/private/libldb-tdb-int-samba4.so
418
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_LIBDIR%%/private/libldb.so.2
419
%%AD_DC%%%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/count_attrs.so
420
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/asq.so
421
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/ildap.so
422
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/ldb.so
423
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/ldbsamba_extensions.so
424
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/paged_searches.so
425
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/rdn_name.so
426
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/sample.so
427
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/server_sort.so
428
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/skel.so
429
%%SAMBA4_BUNDLED_LDB%%%%SAMBA4_MODULEDIR%%/ldb/tdb.so
430
%%SAMBA4_BUNDLED_TALLOC%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/talloc%%PYTHON_EXT_SUFFIX%%.so
431
%%SAMBA4_BUNDLED_TALLOC%%%%PYTHON3%%%%SAMBA4_LIBDIR%%/private/libpytalloc-util%%PYTHON_EXT_SUFFIX%%.so.2
432
%%SAMBA4_BUNDLED_TALLOC%%%%SAMBA4_LIBDIR%%/private/libtalloc.so.2
433
%%SAMBA4_BUNDLED_TALLOC%%man/man3/talloc.3.gz
434
%%SAMBA4_BUNDLED_TDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_tdb_text.py
435
%%SAMBA4_BUNDLED_TDB%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/tdb%%PYTHON_EXT_SUFFIX%%.so
436
%%SAMBA4_BUNDLED_TDB%%bin/samba-tdbbackup
437
%%SAMBA4_BUNDLED_TDB%%bin/samba-tdbdump
438
%%SAMBA4_BUNDLED_TDB%%bin/samba-tdbrestore
439
%%SAMBA4_BUNDLED_TDB%%bin/samba-tdbtool
440
%%SAMBA4_BUNDLED_TDB%%%%SAMBA4_LIBDIR%%/private/libtdb.so.1
441
%%SAMBA4_BUNDLED_TEVENT%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/_tevent%%PYTHON_EXT_SUFFIX%%.so
442
%%SAMBA4_BUNDLED_TEVENT%%%%PYTHON3%%%%PYTHON_SITELIBDIR%%/tevent.py
443
%%SAMBA4_BUNDLED_TEVENT%%%%SAMBA4_LIBDIR%%/private/libtevent.so.0
444
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbadd.1.gz
445
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbdel.1.gz
446
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbedit.1.gz
447
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbmodify.1.gz
448
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbrename.1.gz
449
%%SAMBA4_BUNDLED_LDB%%man/man1/samba-ldbsearch.1.gz
450
%%SAMBA4_BUNDLED_TDB%%man/man8/samba-tdbbackup.8.gz
451
%%SAMBA4_BUNDLED_TDB%%man/man8/samba-tdbdump.8.gz
452
%%SAMBA4_BUNDLED_TDB%%man/man8/samba-tdbrestore.8.gz
453
%%SAMBA4_BUNDLED_TDB%%man/man8/samba-tdbtool.8.gz
(-)b/net/samba415/pkg-plist.ad_dc (+175 lines)
Added Link Here
1
bin/samba-tool
2
sbin/samba_downgrade_db
3
sbin/samba
4
sbin/samba_dnsupdate
5
sbin/samba_kcc
6
sbin/samba_spnupdate
7
sbin/samba_upgradedns
8
sbin/samba-gpupdate
9
include/samba4/dcerpc_server.h
10
lib/samba4/libdcerpc-server.so
11
lib/samba4/libdcerpc-server.so.0
12
lib/samba4/private/libdlz-bind9-for-torture-samba4.so
13
lib/samba4/private/libprocess-model-samba4.so
14
lib/samba4/private/libservice-samba4.so
15
%%GSSAPI_BUILTIN%%lib/samba4/private/libHDB-SAMBA4-samba4.so
16
lib/samba4/private/libdb-glue-samba4.so
17
lib/samba4/private/libdfs-server-ad-samba4.so
18
lib/samba4/private/libdnsserver-common-samba4.so
19
lib/samba4/private/libdsdb-garbage-collect-tombstones-samba4.so
20
lib/samba4/private/libpac-samba4.so
21
lib/samba4/private/libscavenge-dns-records-samba4.so
22
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9.so
23
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_9.so
24
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_10.so
25
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_11.so
26
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_12.so
27
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_14.so
28
%%SAMBA4_MODULEDIR%%/bind9/dlz_bind9_16.so
29
%%SAMBA4_MODULEDIR%%/gensec/krb5.so
30
%%SAMBA4_MODULEDIR%%/ldb/acl.so
31
%%SAMBA4_MODULEDIR%%/ldb/aclread.so
32
%%SAMBA4_MODULEDIR%%/ldb/anr.so
33
%%SAMBA4_MODULEDIR%%/ldb/audit_log.so
34
%%SAMBA4_MODULEDIR%%/ldb/descriptor.so
35
%%SAMBA4_MODULEDIR%%/ldb/dirsync.so
36
%%SAMBA4_MODULEDIR%%/ldb/dns_notify.so
37
%%SAMBA4_MODULEDIR%%/ldb/dsdb_notification.so
38
%%SAMBA4_MODULEDIR%%/ldb/encrypted_secrets.so
39
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_in.so
40
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_out.so
41
%%SAMBA4_MODULEDIR%%/ldb/extended_dn_store.so
42
%%SAMBA4_MODULEDIR%%/ldb/group_audit_log.so
43
%%SAMBA4_MODULEDIR%%/ldb/instancetype.so
44
%%SAMBA4_MODULEDIR%%/ldb/lazy_commit.so
45
%%SAMBA4_MODULEDIR%%/ldb/linked_attributes.so
46
%%SAMBA4_MODULEDIR%%/ldb/new_partition.so
47
%%SAMBA4_MODULEDIR%%/ldb/objectclass_attrs.so
48
%%SAMBA4_MODULEDIR%%/ldb/objectclass.so
49
%%SAMBA4_MODULEDIR%%/ldb/objectguid.so
50
%%SAMBA4_MODULEDIR%%/ldb/operational.so
51
%%SAMBA4_MODULEDIR%%/ldb/paged_results.so
52
%%SAMBA4_MODULEDIR%%/ldb/partition.so
53
%%SAMBA4_MODULEDIR%%/ldb/password_hash.so
54
%%SAMBA4_MODULEDIR%%/ldb/ranged_results.so
55
%%SAMBA4_MODULEDIR%%/ldb/repl_meta_data.so
56
%%SAMBA4_MODULEDIR%%/ldb/resolve_oids.so
57
%%SAMBA4_MODULEDIR%%/ldb/rootdse.so
58
%%SAMBA4_MODULEDIR%%/ldb/samba_dsdb.so
59
%%SAMBA4_MODULEDIR%%/ldb/samba_secrets.so
60
%%SAMBA4_MODULEDIR%%/ldb/samba3sam.so
61
%%SAMBA4_MODULEDIR%%/ldb/samba3sid.so
62
%%SAMBA4_MODULEDIR%%/ldb/samldb.so
63
%%SAMBA4_MODULEDIR%%/ldb/schema_data.so
64
%%SAMBA4_MODULEDIR%%/ldb/schema_load.so
65
%%SAMBA4_MODULEDIR%%/ldb/secrets_tdb_sync.so
66
%%SAMBA4_MODULEDIR%%/ldb/show_deleted.so
67
%%SAMBA4_MODULEDIR%%/ldb/subtree_delete.so
68
%%SAMBA4_MODULEDIR%%/ldb/subtree_rename.so
69
%%SAMBA4_MODULEDIR%%/ldb/tombstone_reanimate.so
70
%%SAMBA4_MODULEDIR%%/ldb/unique_object_sids.so
71
%%SAMBA4_MODULEDIR%%/ldb/update_keytab.so
72
%%SAMBA4_MODULEDIR%%/ldb/vlv.so
73
%%SAMBA4_MODULEDIR%%/ldb/wins_ldb.so
74
%%SAMBA4_MODULEDIR%%/process_model/prefork.so
75
%%SAMBA4_MODULEDIR%%/process_model/standard.so
76
%%SAMBA4_MODULEDIR%%/service/cldap.so
77
%%SAMBA4_MODULEDIR%%/service/dcerpc.so
78
%%SAMBA4_MODULEDIR%%/service/dns_update.so
79
%%SAMBA4_MODULEDIR%%/service/dns.so
80
%%SAMBA4_MODULEDIR%%/service/drepl.so
81
%%SAMBA4_MODULEDIR%%/service/kcc.so
82
%%SAMBA4_MODULEDIR%%/service/kdc.so
83
%%SAMBA4_MODULEDIR%%/service/ldap.so
84
%%SAMBA4_MODULEDIR%%/service/nbtd.so
85
%%SAMBA4_MODULEDIR%%/service/ntp_signd.so
86
%%SAMBA4_MODULEDIR%%/service/s3fs.so
87
%%SAMBA4_MODULEDIR%%/service/winbindd.so
88
%%SAMBA4_MODULEDIR%%/service/wrepl.so
89
%%SAMBA4_MODULEDIR%%/vfs/posix_eadb.so
90
%%PKGCONFIGDIR%%/dcerpc_server.pc
91
%%DATADIR%%/samba/admx/en-US/samba.adml
92
%%DATADIR%%/samba/admx/samba.admx
93
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes__Windows_Server_2012_R2.ldf
94
%%DATADIR%%/setup/ad-schema/AD_DS_Attributes__Windows_Server_2016.ldf
95
%%DATADIR%%/setup/ad-schema/AD_DS_Classes__Windows_Server_2012_R2.ldf
96
%%DATADIR%%/setup/ad-schema/AD_DS_Classes__Windows_Server_2016.ldf
97
%%DATADIR%%/setup/ad-schema/Attributes_for_AD_DS__Windows_Server_2008_R2.ldf
98
%%DATADIR%%/setup/ad-schema/Attributes_for_AD_DS__Windows_Server_2012.ldf
99
%%DATADIR%%/setup/ad-schema/Classes_for_AD_DS__Windows_Server_2008_R2.ldf
100
%%DATADIR%%/setup/ad-schema/Classes_for_AD_DS__Windows_Server_2012.ldf
101
%%DATADIR%%/setup/ad-schema/licence.txt
102
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_Attributes.txt
103
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_Classes.txt
104
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_R2_Attributes.txt
105
%%DATADIR%%/setup/ad-schema/MS-AD_Schema_2K8_R2_Classes.txt
106
%%DATADIR%%/setup/adprep/fix-forest-rev.ldf
107
%%DATADIR%%/setup/adprep/WindowsServerDocs/Forest-Wide-Updates.md
108
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch49.ldf.diff
109
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch50.ldf.diff
110
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch51.ldf.diff
111
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch57.ldf.diff
112
%%DATADIR%%/setup/adprep/WindowsServerDocs/Sch59.ldf.diff
113
%%DATADIR%%/setup/adprep/WindowsServerDocs/Schema-Updates.md
114
%%DATADIR%%/setup/aggregate_schema.ldif
115
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k0.txt
116
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k3.txt
117
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k3R2.txt
118
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k8.txt
119
%%DATADIR%%/setup/display-specifiers/DisplaySpecifiers-Win2k8R2.txt
120
%%DATADIR%%/setup/dns_update_list
121
%%DATADIR%%/setup/extended-rights.ldif
122
%%DATADIR%%/setup/idmap_init.ldif
123
%%DATADIR%%/setup/krb5.conf
124
%%DATADIR%%/setup/named.conf
125
%%DATADIR%%/setup/named.conf.dlz
126
%%DATADIR%%/setup/named.conf.update
127
%%DATADIR%%/setup/named.txt
128
%%DATADIR%%/setup/prefixMap.txt
129
%%DATADIR%%/setup/provision_basedn_modify.ldif
130
%%DATADIR%%/setup/provision_basedn_options.ldif
131
%%DATADIR%%/setup/provision_basedn_references.ldif
132
%%DATADIR%%/setup/provision_basedn.ldif
133
%%DATADIR%%/setup/provision_computers_add.ldif
134
%%DATADIR%%/setup/provision_computers_modify.ldif
135
%%DATADIR%%/setup/provision_configuration_basedn.ldif
136
%%DATADIR%%/setup/provision_configuration_modify.ldif
137
%%DATADIR%%/setup/provision_configuration_references.ldif
138
%%DATADIR%%/setup/provision_configuration.ldif
139
%%DATADIR%%/setup/provision_dns_accounts_add.ldif
140
%%DATADIR%%/setup/provision_dns_add_samba.ldif
141
%%DATADIR%%/setup/provision_dnszones_add.ldif
142
%%DATADIR%%/setup/provision_dnszones_modify.ldif
143
%%DATADIR%%/setup/provision_dnszones_partitions.ldif
144
%%DATADIR%%/setup/provision_group_policy.ldif
145
%%DATADIR%%/setup/provision_init.ldif
146
%%DATADIR%%/setup/provision_partitions.ldif
147
%%DATADIR%%/setup/provision_privilege.ldif
148
%%DATADIR%%/setup/provision_rootdse_add.ldif
149
%%DATADIR%%/setup/provision_rootdse_modify.ldif
150
%%DATADIR%%/setup/provision_schema_basedn_modify.ldif
151
%%DATADIR%%/setup/provision_schema_basedn.ldif
152
%%DATADIR%%/setup/provision_self_join_config.ldif
153
%%DATADIR%%/setup/provision_self_join_modify_config.ldif
154
%%DATADIR%%/setup/provision_self_join_modify_schema.ldif
155
%%DATADIR%%/setup/provision_self_join_modify.ldif
156
%%DATADIR%%/setup/provision_self_join.ldif
157
%%DATADIR%%/setup/provision_users_add.ldif
158
%%DATADIR%%/setup/provision_users_modify.ldif
159
%%DATADIR%%/setup/provision_users.ldif
160
%%DATADIR%%/setup/provision_well_known_sec_princ.ldif
161
%%DATADIR%%/setup/provision.ldif
162
%%DATADIR%%/setup/provision.reg
163
%%DATADIR%%/setup/provision.zone
164
%%DATADIR%%/setup/schema_samba4.ldif
165
%%DATADIR%%/setup/secrets_dns.ldif
166
%%DATADIR%%/setup/secrets_init.ldif
167
%%DATADIR%%/setup/secrets.ldif
168
%%DATADIR%%/setup/share.ldif
169
%%DATADIR%%/setup/spn_update_list
170
%%DATADIR%%/setup/ypServ30.ldif
171
@dir %%DATADIR%%/setup/display-specifiers
172
@dir %%DATADIR%%/setup/ad-schema
173
@dir %%DATADIR%%/setup
174
@dir %%DATADIR%%
175
man/man8/samba-gpupdate.8.gz
(-)b/net/samba415/pkg-plist.cluster (+78 lines)
Added Link Here
1
@comment Cluster
2
bin/ctdb
3
bin/ctdb_diagnostics
4
bin/ltdbtool
5
bin/onnode
6
bin/ping_pong
7
etc/ctdb/ctdb-crash-cleanup.sh
8
etc/ctdb/debug_locks.sh
9
etc/ctdb/debug-hung-script.sh
10
etc/ctdb/events/legacy/00.ctdb.script
11
etc/ctdb/events/legacy/01.reclock.script
12
etc/ctdb/events/legacy/05.system.script
13
etc/ctdb/events/legacy/10.interface.script
14
etc/ctdb/events/notification/README
15
etc/ctdb/functions
16
etc/ctdb/nfs-checks.d/00.portmapper.check
17
etc/ctdb/nfs-checks.d/10.status.check
18
etc/ctdb/nfs-checks.d/20.nfs.check
19
etc/ctdb/nfs-checks.d/30.nlockmgr.check
20
etc/ctdb/nfs-checks.d/40.mountd.check
21
etc/ctdb/nfs-checks.d/50.rquotad.check
22
etc/ctdb/nfs-checks.d/README
23
etc/ctdb/nfs-linux-kernel-callout
24
etc/ctdb/notify.sh
25
etc/ctdb/statd-callout
26
etc/sudoers.d/ctdb
27
lib/samba4/private/libctdb-event-client-samba4.so
28
libexec/ctdb/ctdb_killtcp
29
libexec/ctdb/ctdb_lock_helper
30
libexec/ctdb/ctdb_lvs
31
libexec/ctdb/ctdb_mutex_fcntl_helper
32
libexec/ctdb/ctdb_natgw
33
libexec/ctdb/ctdb_recovery_helper
34
libexec/ctdb/ctdb_takeover_helper
35
libexec/ctdb/ctdb-config
36
libexec/ctdb/ctdb-event
37
libexec/ctdb/ctdb-eventd
38
libexec/ctdb/ctdb-path
39
libexec/ctdb/smnotify
40
man/man1/ctdb_diagnostics.1.gz
41
man/man1/ctdb.1.gz
42
man/man1/ctdbd_wrapper.1.gz
43
man/man1/ctdbd.1.gz
44
man/man1/ltdbtool.1.gz
45
man/man1/onnode.1.gz
46
man/man1/ping_pong.1.gz
47
man/man5/ctdb-script.options.5.gz
48
man/man5/ctdb.conf.5.gz
49
man/man5/ctdb.sysconfig.5.gz
50
man/man7/ctdb-statistics.7.gz
51
man/man7/ctdb-tunables.7.gz
52
man/man7/ctdb.7.gz
53
sbin/ctdbd
54
sbin/ctdbd_wrapper
55
share/ctdb/events/legacy/00.ctdb.script
56
share/ctdb/events/legacy/01.reclock.script
57
share/ctdb/events/legacy/05.system.script
58
share/ctdb/events/legacy/06.nfs.script
59
share/ctdb/events/legacy/10.interface.script
60
share/ctdb/events/legacy/11.natgw.script
61
share/ctdb/events/legacy/11.routing.script
62
share/ctdb/events/legacy/13.per_ip_routing.script
63
share/ctdb/events/legacy/20.multipathd.script
64
share/ctdb/events/legacy/31.clamd.script
65
share/ctdb/events/legacy/40.vsftpd.script
66
share/ctdb/events/legacy/41.httpd.script
67
share/ctdb/events/legacy/48.netbios.script
68
share/ctdb/events/legacy/49.winbind.script
69
share/ctdb/events/legacy/50.samba.script
70
share/ctdb/events/legacy/60.nfs.script
71
share/ctdb/events/legacy/70.iscsi.script
72
share/ctdb/events/legacy/91.lvs.script
73
@dir /var/lib/ctdb/volatile
74
@dir /var/lib/ctdb/state
75
@dir /var/lib/ctdb/persistent
76
@dir /var/lib/ctdb
77
@dir /var/lib
78
@dir /var/run/ctdb
(-)b/net/samba415/pkg-plist.python (-1 / +386 lines)
Added Link Here
0
- 
1
bin/smbtorture
2
man/man1/smbtorture.1.gz
3
include/samba4/policy.h
4
lib/samba4/libsamba-policy%%PYTHON_EXT_SUFFIX%%.so
5
lib/samba4/libsamba-policy%%PYTHON_EXT_SUFFIX%%.so.0
6
lib/samba4/private/libsamba-net%%PYTHON_EXT_SUFFIX%%-samba4.so
7
lib/samba4/private/libsamba-python%%PYTHON_EXT_SUFFIX%%-samba4.so
8
%%PKGCONFIGDIR%%/samba-policy%%PYTHON_EXT_SUFFIX%%.pc
9
@comment Python block
10
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dckeytab%%PYTHON_EXT_SUFFIX%%.so
11
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/posix_eadb%%PYTHON_EXT_SUFFIX%%.so
12
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/xattr_native%%PYTHON_EXT_SUFFIX%%.so
13
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/xattr_tdb%%PYTHON_EXT_SUFFIX%%.so
14
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dsdb_dns%%PYTHON_EXT_SUFFIX%%.so
15
%%AD_DC%%%%PYTHON_SITELIBDIR%%/samba/dsdb%%PYTHON_EXT_SUFFIX%%.so
16
%%PYTHON_SITELIBDIR%%/samba/__init__.py
17
%%PYTHON_SITELIBDIR%%/samba/_glue%%PYTHON_EXT_SUFFIX%%.so
18
%%PYTHON_SITELIBDIR%%/samba/_ldb%%PYTHON_EXT_SUFFIX%%.so
19
%%PYTHON_SITELIBDIR%%/samba/auth_util.py
20
%%PYTHON_SITELIBDIR%%/samba/auth%%PYTHON_EXT_SUFFIX%%.so
21
%%PYTHON_SITELIBDIR%%/samba/colour.py
22
%%PYTHON_SITELIBDIR%%/samba/common.py
23
%%PYTHON_SITELIBDIR%%/samba/compat.py
24
%%PYTHON_SITELIBDIR%%/samba/credentials%%PYTHON_EXT_SUFFIX%%.so
25
%%PYTHON_SITELIBDIR%%/samba/crypto%%PYTHON_EXT_SUFFIX%%.so
26
%%PYTHON_SITELIBDIR%%/samba/dbchecker.py
27
%%PYTHON_SITELIBDIR%%/samba/dcerpc/__init__.py
28
%%PYTHON_SITELIBDIR%%/samba/dcerpc/atsvc%%PYTHON_EXT_SUFFIX%%.so
29
%%PYTHON_SITELIBDIR%%/samba/dcerpc/auth%%PYTHON_EXT_SUFFIX%%.so
30
%%PYTHON_SITELIBDIR%%/samba/dcerpc/base%%PYTHON_EXT_SUFFIX%%.so
31
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dcerpc%%PYTHON_EXT_SUFFIX%%.so
32
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dfs%%PYTHON_EXT_SUFFIX%%.so
33
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dns%%PYTHON_EXT_SUFFIX%%.so
34
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dnsp%%PYTHON_EXT_SUFFIX%%.so
35
%%PYTHON_SITELIBDIR%%/samba/dcerpc/dnsserver%%PYTHON_EXT_SUFFIX%%.so
36
%%PYTHON_SITELIBDIR%%/samba/dcerpc/drsblobs%%PYTHON_EXT_SUFFIX%%.so
37
%%PYTHON_SITELIBDIR%%/samba/dcerpc/drsuapi%%PYTHON_EXT_SUFFIX%%.so
38
%%PYTHON_SITELIBDIR%%/samba/dcerpc/echo%%PYTHON_EXT_SUFFIX%%.so
39
%%PYTHON_SITELIBDIR%%/samba/dcerpc/epmapper%%PYTHON_EXT_SUFFIX%%.so
40
%%PYTHON_SITELIBDIR%%/samba/dcerpc/idmap%%PYTHON_EXT_SUFFIX%%.so
41
%%PYTHON_SITELIBDIR%%/samba/dcerpc/initshutdown%%PYTHON_EXT_SUFFIX%%.so
42
%%PYTHON_SITELIBDIR%%/samba/dcerpc/irpc%%PYTHON_EXT_SUFFIX%%.so
43
%%PYTHON_SITELIBDIR%%/samba/dcerpc/krb5ccache%%PYTHON_EXT_SUFFIX%%.so
44
%%PYTHON_SITELIBDIR%%/samba/dcerpc/krb5pac%%PYTHON_EXT_SUFFIX%%.so
45
%%PYTHON_SITELIBDIR%%/samba/dcerpc/lsa%%PYTHON_EXT_SUFFIX%%.so
46
%%PYTHON_SITELIBDIR%%/samba/dcerpc/mdssvc%%PYTHON_EXT_SUFFIX%%.so
47
%%PYTHON_SITELIBDIR%%/samba/dcerpc/messaging%%PYTHON_EXT_SUFFIX%%.so
48
%%PYTHON_SITELIBDIR%%/samba/dcerpc/mgmt%%PYTHON_EXT_SUFFIX%%.so
49
%%PYTHON_SITELIBDIR%%/samba/dcerpc/misc%%PYTHON_EXT_SUFFIX%%.so
50
%%PYTHON_SITELIBDIR%%/samba/dcerpc/nbt%%PYTHON_EXT_SUFFIX%%.so
51
%%PYTHON_SITELIBDIR%%/samba/dcerpc/netlogon%%PYTHON_EXT_SUFFIX%%.so
52
%%PYTHON_SITELIBDIR%%/samba/dcerpc/ntlmssp%%PYTHON_EXT_SUFFIX%%.so
53
%%PYTHON_SITELIBDIR%%/samba/dcerpc/preg%%PYTHON_EXT_SUFFIX%%.so
54
%%PYTHON_SITELIBDIR%%/samba/dcerpc/samr%%PYTHON_EXT_SUFFIX%%.so
55
%%PYTHON_SITELIBDIR%%/samba/dcerpc/security%%PYTHON_EXT_SUFFIX%%.so
56
%%PYTHON_SITELIBDIR%%/samba/dcerpc/server_id%%PYTHON_EXT_SUFFIX%%.so
57
%%PYTHON_SITELIBDIR%%/samba/dcerpc/smb_acl%%PYTHON_EXT_SUFFIX%%.so
58
%%PYTHON_SITELIBDIR%%/samba/dcerpc/spoolss%%PYTHON_EXT_SUFFIX%%.so
59
%%PYTHON_SITELIBDIR%%/samba/dcerpc/srvsvc%%PYTHON_EXT_SUFFIX%%.so
60
%%PYTHON_SITELIBDIR%%/samba/dcerpc/svcctl%%PYTHON_EXT_SUFFIX%%.so
61
%%PYTHON_SITELIBDIR%%/samba/dcerpc/unixinfo%%PYTHON_EXT_SUFFIX%%.so
62
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winbind%%PYTHON_EXT_SUFFIX%%.so
63
%%PYTHON_SITELIBDIR%%/samba/dcerpc/windows_event_ids%%PYTHON_EXT_SUFFIX%%.so
64
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winreg%%PYTHON_EXT_SUFFIX%%.so
65
%%PYTHON_SITELIBDIR%%/samba/dcerpc/winspool%%PYTHON_EXT_SUFFIX%%.so
66
%%PYTHON_SITELIBDIR%%/samba/dcerpc/witness%%PYTHON_EXT_SUFFIX%%.so
67
%%PYTHON_SITELIBDIR%%/samba/dcerpc/wkssvc%%PYTHON_EXT_SUFFIX%%.so
68
%%PYTHON_SITELIBDIR%%/samba/dcerpc/xattr%%PYTHON_EXT_SUFFIX%%.so
69
%%PYTHON_SITELIBDIR%%/samba/descriptor.py
70
%%PYTHON_SITELIBDIR%%/samba/dnsresolver.py
71
%%PYTHON_SITELIBDIR%%/samba/dnsserver.py
72
%%PYTHON_SITELIBDIR%%/samba/domain_update.py
73
%%PYTHON_SITELIBDIR%%/samba/drs_utils.py
74
%%PYTHON_SITELIBDIR%%/samba/emulate/__init__.py
75
%%PYTHON_SITELIBDIR%%/samba/emulate/traffic_packets.py
76
%%PYTHON_SITELIBDIR%%/samba/emulate/traffic.py
77
%%PYTHON_SITELIBDIR%%/samba/forest_update.py
78
%%PYTHON_SITELIBDIR%%/samba/gensec%%PYTHON_EXT_SUFFIX%%.so
79
%%PYTHON_SITELIBDIR%%/samba/getopt.py
80
%%PYTHON_SITELIBDIR%%/samba/gp_ext_loader.py
81
%%PYTHON_SITELIBDIR%%/samba/gp_parse/__init__.py
82
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_aas.py
83
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_csv.py
84
%%PYTHON_SITELIBDIR%%/samba/gp_scripts_ext.py
85
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_inf.py
86
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_ini.py
87
%%PYTHON_SITELIBDIR%%/samba/gp_parse/gp_pol.py
88
%%PYTHON_SITELIBDIR%%/samba/gp_sec_ext.py
89
%%PYTHON_SITELIBDIR%%/samba/gpclass.py
90
%%PYTHON_SITELIBDIR%%/samba/gpo%%PYTHON_EXT_SUFFIX%%.so
91
%%PYTHON_SITELIBDIR%%/samba/graph.py
92
%%PYTHON_SITELIBDIR%%/samba/hostconfig.py
93
%%PYTHON_SITELIBDIR%%/samba/idmap.py
94
%%PYTHON_SITELIBDIR%%/samba/join.py
95
%%PYTHON_SITELIBDIR%%/samba/kcc/__init__.py
96
%%PYTHON_SITELIBDIR%%/samba/kcc/debug.py
97
%%PYTHON_SITELIBDIR%%/samba/kcc/graph_utils.py
98
%%PYTHON_SITELIBDIR%%/samba/kcc/graph.py
99
%%PYTHON_SITELIBDIR%%/samba/kcc/kcc_utils.py
100
%%PYTHON_SITELIBDIR%%/samba/kcc/ldif_import_export.py
101
%%PYTHON_SITELIBDIR%%/samba/logger.py
102
%%PYTHON_SITELIBDIR%%/samba/mdb_util.py
103
%%PYTHON_SITELIBDIR%%/samba/messaging%%PYTHON_EXT_SUFFIX%%.so
104
%%PYTHON_SITELIBDIR%%/samba/ms_display_specifiers.py
105
%%PYTHON_SITELIBDIR%%/samba/ms_forest_updates_markdown.py
106
%%PYTHON_SITELIBDIR%%/samba/ms_schema_markdown.py
107
%%PYTHON_SITELIBDIR%%/samba/ms_schema.py
108
%%PYTHON_SITELIBDIR%%/samba/ndr.py
109
%%PYTHON_SITELIBDIR%%/samba/net%%PYTHON_EXT_SUFFIX%%.so
110
%%PYTHON_SITELIBDIR%%/samba/netbios%%PYTHON_EXT_SUFFIX%%.so
111
%%PYTHON_SITELIBDIR%%/samba/netcmd/__init__.py
112
%%PYTHON_SITELIBDIR%%/samba/netcmd/common.py
113
%%PYTHON_SITELIBDIR%%/samba/netcmd/computer.py
114
%%PYTHON_SITELIBDIR%%/samba/netcmd/contact.py
115
%%PYTHON_SITELIBDIR%%/samba/netcmd/dbcheck.py
116
%%PYTHON_SITELIBDIR%%/samba/netcmd/delegation.py
117
%%PYTHON_SITELIBDIR%%/samba/netcmd/dns.py
118
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain_backup.py
119
%%PYTHON_SITELIBDIR%%/samba/netcmd/domain.py
120
%%PYTHON_SITELIBDIR%%/samba/netcmd/drs.py
121
%%PYTHON_SITELIBDIR%%/samba/netcmd/dsacl.py
122
%%PYTHON_SITELIBDIR%%/samba/netcmd/forest.py
123
%%PYTHON_SITELIBDIR%%/samba/netcmd/fsmo.py
124
%%PYTHON_SITELIBDIR%%/samba/netcmd/gpo.py
125
%%PYTHON_SITELIBDIR%%/samba/netcmd/group.py
126
%%PYTHON_SITELIBDIR%%/samba/netcmd/ldapcmp.py
127
%%PYTHON_SITELIBDIR%%/samba/netcmd/main.py
128
%%PYTHON_SITELIBDIR%%/samba/netcmd/nettime.py
129
%%PYTHON_SITELIBDIR%%/samba/netcmd/ntacl.py
130
%%PYTHON_SITELIBDIR%%/samba/netcmd/ou.py
131
%%PYTHON_SITELIBDIR%%/samba/netcmd/processes.py
132
%%PYTHON_SITELIBDIR%%/samba/netcmd/pso.py
133
%%PYTHON_SITELIBDIR%%/samba/netcmd/rodc.py
134
%%PYTHON_SITELIBDIR%%/samba/netcmd/schema.py
135
%%PYTHON_SITELIBDIR%%/samba/netcmd/sites.py
136
%%PYTHON_SITELIBDIR%%/samba/netcmd/spn.py
137
%%PYTHON_SITELIBDIR%%/samba/netcmd/testparm.py
138
%%PYTHON_SITELIBDIR%%/samba/netcmd/user.py
139
%%PYTHON_SITELIBDIR%%/samba/netcmd/visualize.py
140
%%PYTHON_SITELIBDIR%%/samba/ntacls.py
141
%%PYTHON_SITELIBDIR%%/samba/ntstatus%%PYTHON_EXT_SUFFIX%%.so
142
%%PYTHON_SITELIBDIR%%/samba/param%%PYTHON_EXT_SUFFIX%%.so
143
%%PYTHON_SITELIBDIR%%/samba/policy%%PYTHON_EXT_SUFFIX%%.so
144
%%PYTHON_SITELIBDIR%%/samba/provision/__init__.py
145
%%PYTHON_SITELIBDIR%%/samba/provision/backend.py
146
%%PYTHON_SITELIBDIR%%/samba/provision/common.py
147
%%PYTHON_SITELIBDIR%%/samba/provision/kerberos_implementation.py
148
%%PYTHON_SITELIBDIR%%/samba/provision/kerberos.py
149
%%PYTHON_SITELIBDIR%%/samba/provision/sambadns.py
150
%%PYTHON_SITELIBDIR%%/samba/registry%%PYTHON_EXT_SUFFIX%%.so
151
%%PYTHON_SITELIBDIR%%/samba/remove_dc.py
152
%%PYTHON_SITELIBDIR%%/samba/samba3/__init__.py
153
%%PYTHON_SITELIBDIR%%/samba/samba3/libsmb_samba_internal%%PYTHON_EXT_SUFFIX%%.so
154
%%PYTHON_SITELIBDIR%%/samba/samba3/mdscli%%PYTHON_EXT_SUFFIX%%.so
155
%%PYTHON_SITELIBDIR%%/samba/samba3/param%%PYTHON_EXT_SUFFIX%%.so
156
%%PYTHON_SITELIBDIR%%/samba/samba3/passdb%%PYTHON_EXT_SUFFIX%%.so
157
%%PYTHON_SITELIBDIR%%/samba/samba3/smbd%%PYTHON_EXT_SUFFIX%%.so
158
%%PYTHON_SITELIBDIR%%/samba/samdb.py
159
%%PYTHON_SITELIBDIR%%/samba/schema.py
160
%%PYTHON_SITELIBDIR%%/samba/sd_utils.py
161
%%PYTHON_SITELIBDIR%%/samba/security%%PYTHON_EXT_SUFFIX%%.so
162
%%PYTHON_SITELIBDIR%%/samba/sites.py
163
%%PYTHON_SITELIBDIR%%/samba/subnets.py
164
%%PYTHON_SITELIBDIR%%/samba/subunit/__init__.py
165
%%PYTHON_SITELIBDIR%%/samba/subunit/run.py
166
%%PYTHON_SITELIBDIR%%/samba/tdb_util.py
167
%%PYTHON_SITELIBDIR%%/samba/tests/__init__.py
168
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_base.py
169
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_dsdb.py
170
%%PYTHON_SITELIBDIR%%/samba/tests/audit_log_pass_change.py
171
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_base.py
172
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_ncalrpc.py
173
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_netlogon_bad_creds.py
174
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_netlogon.py
175
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_pass_change.py
176
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_samlogon.py
177
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log_winbind.py
178
%%PYTHON_SITELIBDIR%%/samba/tests/auth_log.py
179
%%PYTHON_SITELIBDIR%%/samba/tests/auth.py
180
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/__init__.py
181
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/bug13653.py
182
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/check_output.py
183
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/downgradedatabase.py
184
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/mdfind.py
185
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/ndrdump.py
186
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/netads_json.py
187
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/samba_dnsupdate.py
188
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls_basic.py
189
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcacls.py
190
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcontrol_process.py
191
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/smbcontrol.py
192
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_learner.py
193
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_replay.py
194
%%PYTHON_SITELIBDIR%%/samba/tests/blackbox/traffic_summary.py
195
%%PYTHON_SITELIBDIR%%/samba/tests/common.py
196
%%PYTHON_SITELIBDIR%%/samba/tests/complex_expressions.py
197
%%PYTHON_SITELIBDIR%%/samba/tests/core.py
198
%%PYTHON_SITELIBDIR%%/samba/tests/credentials.py
199
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/__init__.py
200
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/array.py
201
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/bare.py
202
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/dnsserver.py
203
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/integer.py
204
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/lsa.py
205
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/mdssvc.py
206
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/misc.py
207
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/raw_protocol.py
208
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/raw_testcase.py
209
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/registry.py
210
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/rpc_talloc.py
211
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/rpcecho.py
212
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/sam.py
213
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/srvsvc.py
214
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/string_tests.py
215
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/testrpc.py
216
%%PYTHON_SITELIBDIR%%/samba/tests/dcerpc/unix.py
217
%%PYTHON_SITELIBDIR%%/samba/tests/dckeytab.py
218
%%PYTHON_SITELIBDIR%%/samba/tests/dns_base.py
219
%%PYTHON_SITELIBDIR%%/samba/tests/dns_forwarder_helpers/server.py
220
%%PYTHON_SITELIBDIR%%/samba/tests/dns_forwarder.py
221
%%PYTHON_SITELIBDIR%%/samba/tests/dns_invalid.py
222
%%PYTHON_SITELIBDIR%%/samba/tests/dns_packet.py
223
%%PYTHON_SITELIBDIR%%/samba/tests/dns_tkey.py
224
%%PYTHON_SITELIBDIR%%/samba/tests/dns_wildcard.py
225
%%PYTHON_SITELIBDIR%%/samba/tests/dns.py
226
%%PYTHON_SITELIBDIR%%/samba/tests/docs.py
227
%%PYTHON_SITELIBDIR%%/samba/tests/domain_backup_offline.py
228
%%PYTHON_SITELIBDIR%%/samba/tests/domain_backup.py
229
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_api.py
230
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_lock.py
231
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb_schema_attributes.py
232
%%PYTHON_SITELIBDIR%%/samba/tests/dsdb.py
233
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/__init__.py
234
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/traffic_packet.py
235
%%PYTHON_SITELIBDIR%%/samba/tests/emulate/traffic.py
236
%%PYTHON_SITELIBDIR%%/samba/tests/encrypted_secrets.py
237
%%PYTHON_SITELIBDIR%%/samba/tests/gensec.py
238
%%PYTHON_SITELIBDIR%%/samba/tests/get_opt.py
239
%%PYTHON_SITELIBDIR%%/samba/tests/getdcname.py
240
%%PYTHON_SITELIBDIR%%/samba/tests/glue.py
241
%%PYTHON_SITELIBDIR%%/samba/tests/gpo.py
242
%%PYTHON_SITELIBDIR%%/samba/tests/graph.py
243
%%PYTHON_SITELIBDIR%%/samba/tests/group_audit.py
244
%%PYTHON_SITELIBDIR%%/samba/tests/hostconfig.py
245
%%PYTHON_SITELIBDIR%%/samba/tests/join.py
246
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/__init__.py
247
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/graph_utils.py
248
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/graph.py
249
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/kcc_utils.py
250
%%PYTHON_SITELIBDIR%%/samba/tests/kcc/ldif_import_export.py
251
%%PYTHON_SITELIBDIR%%/samba/tests/krb5_credentials.py
252
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/alias_tests.py
253
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/as_canonicalization_tests.py
254
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/as_req_tests.py
255
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/compatability_tests.py
256
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/fast_tests.py
257
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kcrypto.py
258
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_base_test.py
259
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_tests.py
260
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/kdc_tgs_tests.py
261
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/ms_kile_client_principal_lookup_tests.py
262
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/raw_testcase.py
263
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rfc4120_constants.py
264
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rfc4120_pyasn1.py
265
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/rodc_tests.py
266
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/s4u_tests.py
267
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/salt_tests.py
268
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/simple_tests.py
269
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/spn_tests.py
270
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_ccache.py
271
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_idmap_nss.py
272
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_ldap.py
273
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_min_domain_uid.py
274
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_rpc.py
275
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/test_smb.py
276
%%PYTHON_SITELIBDIR%%/samba/tests/krb5/xrealm_tests.py
277
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_raw.py
278
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_referrals.py
279
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_spn.py
280
%%PYTHON_SITELIBDIR%%/samba/tests/ldap_upn_sam_account.py
281
%%PYTHON_SITELIBDIR%%/samba/tests/libsmb.py
282
%%PYTHON_SITELIBDIR%%/samba/tests/loadparm.py
283
%%PYTHON_SITELIBDIR%%/samba/tests/lsa_string.py
284
%%PYTHON_SITELIBDIR%%/samba/tests/messaging.py
285
%%PYTHON_SITELIBDIR%%/samba/tests/net_join_no_spnego.py
286
%%PYTHON_SITELIBDIR%%/samba/tests/net_join.py
287
%%PYTHON_SITELIBDIR%%/samba/tests/netbios.py
288
%%PYTHON_SITELIBDIR%%/samba/tests/netcmd.py
289
%%PYTHON_SITELIBDIR%%/samba/tests/netlogonsvc.py
290
%%PYTHON_SITELIBDIR%%/samba/tests/ntacls_backup.py
291
%%PYTHON_SITELIBDIR%%/samba/tests/ntacls.py
292
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth_base.py
293
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth_krb5.py
294
%%PYTHON_SITELIBDIR%%/samba/tests/ntlm_auth.py
295
%%PYTHON_SITELIBDIR%%/samba/tests/ntlmdisabled.py
296
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind_chauthtok.py
297
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind_warn_pwd_expire.py
298
%%PYTHON_SITELIBDIR%%/samba/tests/pam_winbind.py
299
%%PYTHON_SITELIBDIR%%/samba/tests/param.py
300
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_fl2003.py
301
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_fl2008.py
302
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_gpgme.py
303
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash_ldap.py
304
%%PYTHON_SITELIBDIR%%/samba/tests/password_hash.py
305
%%PYTHON_SITELIBDIR%%/samba/tests/password_quality.py
306
%%PYTHON_SITELIBDIR%%/samba/tests/password_test.py
307
%%PYTHON_SITELIBDIR%%/samba/tests/policy.py
308
%%PYTHON_SITELIBDIR%%/samba/tests/posixacl.py
309
%%PYTHON_SITELIBDIR%%/samba/tests/prefork_restart.py
310
%%PYTHON_SITELIBDIR%%/samba/tests/process_limits.py
311
%%PYTHON_SITELIBDIR%%/samba/tests/provision.py
312
%%PYTHON_SITELIBDIR%%/samba/tests/pso.py
313
%%PYTHON_SITELIBDIR%%/samba/tests/py_credentials.py
314
%%PYTHON_SITELIBDIR%%/samba/tests/registry.py
315
%%PYTHON_SITELIBDIR%%/samba/tests/s3idmapdb.py
316
%%PYTHON_SITELIBDIR%%/samba/tests/s3param.py
317
%%PYTHON_SITELIBDIR%%/samba/tests/s3passdb.py
318
%%PYTHON_SITELIBDIR%%/samba/tests/s3registry.py
319
%%PYTHON_SITELIBDIR%%/samba/tests/s3windb.py
320
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/__init__.py
321
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/base.py
322
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/computer.py
323
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/contact.py
324
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/demote.py
325
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/dnscmd.py
326
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/drs_clone_dc_data_lmdb_size.py
327
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/dsacl.py
328
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/forest.py
329
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/fsmo.py
330
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/gpo.py
331
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/group.py
332
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/help.py
333
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/join_lmdb_size.py
334
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/join.py
335
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/ntacl.py
336
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/ou.py
337
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/passwordsettings.py
338
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/processes.py
339
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/promote_dc_lmdb_size.py
340
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/provision_lmdb_size.py
341
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/provision_password_check.py
342
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/rodc.py
343
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/schema.py
344
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/sites.py
345
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/timecmd.py
346
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_check_password_script.py
347
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_base.py
348
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_gpg.py
349
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA_userPassword.py
350
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_virtualCryptSHA.py
351
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user_wdigest.py
352
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/user.py
353
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/visualize_drs.py
354
%%PYTHON_SITELIBDIR%%/samba/tests/samba_tool/visualize.py
355
%%PYTHON_SITELIBDIR%%/samba/tests/samba_upgradedns_lmdb.py
356
%%PYTHON_SITELIBDIR%%/samba/tests/samba3sam.py
357
%%PYTHON_SITELIBDIR%%/samba/tests/samdb_api.py
358
%%PYTHON_SITELIBDIR%%/samba/tests/samdb.py
359
%%PYTHON_SITELIBDIR%%/samba/tests/security.py
360
%%PYTHON_SITELIBDIR%%/samba/tests/segfault.py
361
%%PYTHON_SITELIBDIR%%/samba/tests/smb.py
362
%%PYTHON_SITELIBDIR%%/samba/tests/smbd_base.py
363
%%PYTHON_SITELIBDIR%%/samba/tests/smbd_fuzztest.py
364
%%PYTHON_SITELIBDIR%%/samba/tests/source.py
365
%%PYTHON_SITELIBDIR%%/samba/tests/strings.py
366
%%PYTHON_SITELIBDIR%%/samba/tests/subunitrun.py
367
%%PYTHON_SITELIBDIR%%/samba/tests/tdb_util.py
368
%%PYTHON_SITELIBDIR%%/samba/tests/upgrade.py
369
%%PYTHON_SITELIBDIR%%/samba/tests/upgradeprovision.py
370
%%PYTHON_SITELIBDIR%%/samba/tests/upgradeprovisionneeddc.py
371
%%PYTHON_SITELIBDIR%%/samba/tests/usage.py
372
%%PYTHON_SITELIBDIR%%/samba/tests/xattr.py
373
%%PYTHON_SITELIBDIR%%/samba/upgrade.py
374
%%PYTHON_SITELIBDIR%%/samba/upgradehelpers.py
375
%%PYTHON_SITELIBDIR%%/samba/uptodateness.py
376
%%PYTHON_SITELIBDIR%%/samba/werror%%PYTHON_EXT_SUFFIX%%.so
377
%%PYTHON_SITELIBDIR%%/samba/xattr.py
378
@dir %%PYTHON_SITELIBDIR%%/samba/tests/samba_tool
379
@dir %%PYTHON_SITELIBDIR%%/samba/tests/dcerpc
380
@dir %%PYTHON_SITELIBDIR%%/samba/tests/blackbox
381
@dir %%PYTHON_SITELIBDIR%%/samba/tests
382
@dir %%PYTHON_SITELIBDIR%%/samba/samba3
383
@dir %%PYTHON_SITELIBDIR%%/samba/provision
384
@dir %%PYTHON_SITELIBDIR%%/samba/netcmd
385
@dir %%PYTHON_SITELIBDIR%%/samba/dcerpc
386
@dir %%PYTHON_SITELIBDIR%%/samba

Return to bug 263874