Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (116)
2c51c8f8
VERISON: Bump version up to 4.9.5...
Dec 20, 2018
a5c8e943
s3:script/tests reduce code duplication
Jan 07, 2019
b9a1a179
s3:utils/smbget add error handling for mkdir() calls
Jan 07, 2019
41889196
s3:utils/smbget fix recursive download with empty source directories
Jan 07, 2019
a1486390
s3:auth: ignore create_builtin_guests() failing without a valid idmap configuration
Jan 09, 2019
55e8277a
samba-tool drs showrepl: do not crash if no dnsHostName found
Jan 09, 2019
e7b34474
lib/util: Count a trailing line that doesn't end in a newline
Jan 09, 2019
48af1338
s3-smbd: avoid assuming fsp is always intact after close_file call.
Jan 09, 2019
887030b7
s3:auth_winbind: remove fallback to optional backend
Jan 09, 2019
cb7dabb8
s3:auth_winbind: return NT_STATUS_NO_LOGON_SERVERS if winbindd is not available
Jan 09, 2019
d4b8049d
s3:auth_winbind: ignore a missing winbindd as NT4 PDC/BDC without trusts
Jan 09, 2019
1d927b23
samba-tool: don't print backtrace on simple DNS errors
Jan 10, 2019
d1027b4b
dns: changing onelevel search for wildcard to subtree
Jan 14, 2019
f6ff49b3
audit_logging: auth_json_audit required auth_json
Jan 14, 2019
16bd1112
s3-vfs-streams_xattr: add close call
Jan 14, 2019
d94403d1
s3-vfs-fruit: add close call
Jan 14, 2019
0a3a2617
s3: net: Do not set NET_FLAGS_ANONYMOUS with -k
Jan 14, 2019
38c45922
s3: lib: nmbname: Ensure we limit the NetBIOS name correctly. CID: 1433607
Jan 21, 2019
d253c470
python: Add new compat PYARG_STR_UNI format
Jan 21, 2019
043e6e8b
s4/libnet: use 'et' as format for ParseTuple with python2
Jan 21, 2019
869ae9a1
lib/ldb/tests/python: Add test to pass utf8 encoded bytes to ldb.Dn
Jan 21, 2019
8738db2a
lib/ldb: Use new PYARG_ES format for parseTuple
Jan 21, 2019
76bcdeca
ldb: Bump ldb version to 1.4.4
Jan 21, 2019
2cebe0b8
json: Modify API to use return codes
Feb 01, 2019
3145dae2
audit_logging: Remove debug log header and JSON Authentication: prefix
Feb 01, 2019
f13c5a9c
s3:libsmb: Check disable_netbios in socket connect
Feb 01, 2019
fc3f516a
s3:libsmb: Print debug message about Netbios
Feb 01, 2019
c824d35f
s3:smbpasswd: Print debug message about Netbios
Feb 01, 2019
8e2514a1
s3:utils:net: Print debug message about Netbios
Feb 01, 2019
0493165a
s3:libsmb: Honor disable_netbios option in smbsock_connect_send
Feb 01, 2019
83350523
s3: libsmb: use smb2cli_conn_max_trans_size() in cli_smb2_list()
Feb 01, 2019
5cbce550
libcli: Add error log if insufficient SMB2 credits
Feb 01, 2019
3b19257a
s3:libsmb: cli_smb2_list() can sometimes fail initially on a connection
Feb 01, 2019
4588c1c7
lib/audit_logging: actually create talloc
Feb 01, 2019
bb3e0c5c
vfs_fileid: fix get_connectpath_ino
Feb 01, 2019
d1428435
ctdb: Print locks latency in machinereadable stats
Feb 01, 2019
6ddc44fb
vfs_fileid: fix fsname_norootdir algorithm
Feb 05, 2019
3477e19d
vfs_glusterfs: Adapt to changes in libgfapi signatures
Feb 05, 2019
e51de1d4
join: Fix TypeError when handling exception
Feb 05, 2019
56b401eb
join: Throw CommandError instead of Exception for simple errors
Feb 05, 2019
f6ebd9d2
manpages/samba.7.xml: smbcontrol can also work with 'samba'
Feb 05, 2019
562ceb1f
s4:messaging: add support 'smbcontrol <pid> debug/debuglevel'
Feb 05, 2019
e896ca8f
s4:server: avoid using pid=0 for the parent 'samba' process
Feb 05, 2019
aced074c
s4:server: add support for 'smbcontrol samba shutdown'
Feb 05, 2019
d94e8230
selftest:Samba4: use 'smbcontrol samba shutdown'
Feb 05, 2019
676b4389
s3-vfs: add glusterfs_fuse vfs module.
Feb 05, 2019
9b21b518
s3-vfs: Use ENOATTR in errno comparison for getxattr
Feb 05, 2019
befb3527
ldb: Avoid inefficient one-level searches
Feb 13, 2019
c7b04443
ldb: Bump ldb version to 1.4.5
Feb 13, 2019
455099bd
s3-smbd: use fruit:model string for mDNS registration
Feb 21, 2019
3ec3f9dc
printing: drop pcap_cache_loaded() guard around load_printers()
Feb 21, 2019
44f49283
printing: check lp_load_printers() prior to pcap cache update
Feb 21, 2019
eac00de2
s3: tests: Add regression test for smbd crash on share force group change with existing connection.
Feb 21, 2019
7644bb26
smbd: uid: Don't crash if 'force group' is added to an existing share connection.
Feb 21, 2019
6f697b9c
netcmd/user: python[3]-gpgme unsupported and replaced by python[3]-gpg
Feb 21, 2019
b650db4d
s3: VFS: vfs_fruit. Fix the NetAtalk deny mode compatibility code.
Feb 21, 2019
eb425d50
s4: torture: vfs_fruit. Change test_fruit_locking_conflict() to match the...
Feb 21, 2019
53d2623b
s3:vfs: Initialize pid to 0 in test_netatalk_lock()
Feb 21, 2019
c0858bc9
s3:vfs: Correctly check if OFD locks should be enabled or not
Feb 21, 2019
5995d5b9
tldap: avoid a use after free crash
Feb 21, 2019
d85f9fdc
tldap: avoid more use after free errors
Feb 21, 2019
2f5823c5
waf: Check for libnscd
Feb 21, 2019
fd8e90b9
CVE-2019-3824 ldb: Out of bound read in ldb_wildcard_compare
Feb 26, 2019
cedc4e89
CVE-2019-3824 ldb: Extra comments to clarify no pointer wrap in wildcard processing
Feb 26, 2019
33fa01b4
CVE-2019-3824 ldb: Improve code style and layout in wildcard processing
Feb 26, 2019
754bc1a7
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero
Feb 26, 2019
73187de7
CVE-2019-3824 ldb: wildcard_match check tree operation
Feb 26, 2019
2a88a47b
CVE-2019-3824 ldb: wildcard_match end of data check
Feb 26, 2019
47b2344b
CVE-2019-3824 ldb: Add tests for ldb_wildcard_match
Feb 26, 2019
2bbd2dcf
CVE-2019-3824 ldb: Release ldb 1.4.6
Feb 26, 2019
2a1daf2e
Add Recommends: samba-dsdb-modules for samba-common-bin (Closes: #862467)
Feb 26, 2019
ab66f700
notifyd: Fix SIGBUS on sparc
Mar 04, 2019
6a38b991
man pages: document prefork process model
Mar 04, 2019
6bea9304
messages_dgm: Use saved errno value
Mar 04, 2019
9dd1b416
torture3: Extend read3 for the "messaging target re-inits" failure
Mar 04, 2019
ad3751b5
messages_dgm: Properly handle receiver re-initialization
Mar 04, 2019
592f0211
ctdb-config: Change example recovery lock setting to one that fails
Mar 04, 2019
fb8c3bd8
ctdb-recoverd: Free cluster mutex handler on failure to take lock
Mar 04, 2019
f63f2a0e
ctdb-recoverd: Clean up logging on failure to take recovery lock
Mar 04, 2019
fd9a02c0
ctdb-recoverd: Make recoverd context available in recovery lock handle
Mar 04, 2019
4c059e03
ctdb-recoverd: Ban node on unknown error when taking recovery lock
Mar 04, 2019
65c3c580
ctdb-recoverd: Time out attempt to take recovery lock after 120s
Mar 04, 2019
eb16d3b7
ctdb-cluster-mutex: Separate out command and file handling
Mar 04, 2019
915aff6f
winbindd: make a copy of xid's in wb_xids2sids_send()
Mar 04, 2019
577ac999
winbindd: make xids a const argument to wb_xids2sids_send()
Mar 04, 2019
4cf7bddc
winbindd: convert id to a pointer in wb_xids2sids_dom_done()
Mar 04, 2019
06862c77
winbindd: update xid in wb_xids2sids_state->xids with what we got
Mar 04, 2019
b6587172
winbindd: switch send-next/done order
Mar 04, 2019
9c36a6dd
winbindd: track whether a result from xid2sid was coming from the cache
Mar 04, 2019
53dfd92b
winbindd: set idmap cache entries as the last step in async wb_xids2sids
Mar 04, 2019
f59064f8
s3: smbtorture3: Add POSIX-MKDIR test for posix_mkdir case sensitive bug.
Mar 04, 2019
fe4254ef
smbd: SMB1-POSIX: Add missing info-level SMB_POSIX_PATH_OPEN for UCF_UNIX_NAME_LOOKUP flag.
Mar 04, 2019
4b58042f
smbd: unix_convert: Ensure we don't call get_real_filename on POSIX paths.
Mar 04, 2019
ffb706dd
s3: torture: Add additional POSIX mkdir tests.
Mar 04, 2019
13bf8118
s3: smbd: filenames - ensure we replace the missing '/' if we error in an intermediate POSIX path.
Mar 04, 2019
15ef70cb
vfs_ceph: add missing fallocate hook
Mar 04, 2019
ba75d5f4
vfs_ceph: fix strict_allocate_ftruncate()
Mar 04, 2019
47fb4ba8
vfs_ceph: remove ceph_fallocate/ceph_ftruncate fallback
Mar 04, 2019
f8748b8b
s4-server: Open and close a transaction on sam.ldb at startup
Mar 11, 2019
9dc374fe
sambaundoguididx: use the right escaped oder unescaped sam ldb files
Mar 11, 2019
Show whitespace changes
Inline
Side-by-side
VERSION
View file @
51996460
...
...
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=9
SAMBA_VERSION_RELEASE=
4
SAMBA_VERSION_RELEASE=
5
########################################################
# If a official release has a serious bug #
...
...
WHATSNEW.txt
View file @
51996460
=============================
Release Notes for Samba 4.9.5
March 12, 2019
=============================
Changes since 4.9.4:
--------------------
o Andrew Bartlett <abartlet@samba.org>
* BUG 13714: audit_logging: Remove debug log header and JSON Authentication:
prefix.
* BUG 13760: Fix upgrade from 4.7 (or earlier) to 4.9.
o Jeremy Allison <jra@samba.org>
* BUG 11495: s3: lib: nmbname: Ensure we limit the NetBIOS name correctly.
CID: 1433607.
* BUG 13690: smbd: uid: Don't crash if 'force group' is added to an existing
share connection.
* BUG 13770: s3: VFS: vfs_fruit. Fix the NetAtalk deny mode compatibility
code.
* BUG 13803: s3: SMB1 POSIX mkdir does case insensitive name lookup.
o Christian Ambach <ambi@samba.org>
* BUG 13199: s3:utils/smbget fix recursive download with empty source
directories.
o Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* BUG 13716: samba-tool drs showrepl: Do not crash if no dnsHostName found.
o Tim Beale <timbeale@catalyst.net.nz>
* BUG 13736: s3:libsmb: cli_smb2_list() can sometimes fail initially on a
connection.
* BUG 13747: join: Throw CommandError instead of Exception for simple errors.
* BUG 13762: ldb: Avoid inefficient one-level searches.
o Ralph Boehme <slow@samba.org>
* BUG 13736: s3: libsmb: use smb2cli_conn_max_trans_size() in
cli_smb2_list().
* BUG 13776: tldap: Avoid use after free errors.
* BUG 13802: Fix idmap xid2sid cache churn.
* BUG 13812: access_check_max_allowed() doesn't process "Owner Rights" ACEs.
o Günther Deschner <gd@samba.org>
* BUG 13720: s3-smbd: Avoid assuming fsp is always intact after close_file
call.
* BUG 13725: s3-vfs-fruit: Add close call.
* BUG 13746: s3-smbd: Use fruit:model string for mDNS registration.
* BUG 13774: s3-vfs: add glusterfs_fuse vfs module.
o David Disseldorp <ddiss@samba.org>
* BUG 13766: printing: Check lp_load_printers() prior to pcap cache update.
* BUG 13807: vfs_ceph: vfs_ceph strict_allocate_ftruncate calls (local FS)
ftruncate and fallocate.
o Philipp Gesang <philipp.gesang@intra2net.com>
* BUG 13737: lib/audit_logging: Actually create talloc.
o Joe Guo <joeg@catalyst.net.nz>
* BUG 13728: netcmd/user: python[3]-gpgme unsupported and replaced by
python[3]-gpg.
o Aaron Haslett <aaronhaslett@catalyst.net.nz>
* BUG 13738: dns: Changing onelevel search for wildcard to subtree.
o Björn Jacke <bj@sernet.de>
* BUG 13721: samba-tool: Don't print backtrace on simple DNS errors.
* BUG 13759: sambaundoguididx: Use the right escaped oder unescaped sam ldb
files.
o Volker Lendecke <vl@samba.org>
* BUG 13742: ctdb: Print locks latency in machinereadable stats.
* BUG 13786: messages_dgm: Messaging gets stuck when pids are recycled.
o Gary Lockyer <gary@catalyst.net.nz>
* BUG 13715: audit_logging: auth_json_audit required auth_json.
* BUG 13765: man pages: Document prefork process model.
* BUG 13773: CVE-2019-3824 ldb: Release ldb 1.4.6.
o Stefan Metzmacher <metze@samba.org>
* BUG 13697: s3:auth: ignore create_builtin_guests() failing without a valid
idmap configuration.
* BUG 13722: s3:auth_winbind: Ignore a missing winbindd as NT4 PDC/BDC
without trusts.
* BUG 13723: s3:auth_winbind: return NT_STATUS_NO_LOGON_SERVERS if winbindd
is not available.
* BUG 13752: s4:server: Add support for 'smbcontrol samba shutdown' and
'smbcontrol <pid> debug/debuglevel'.
o Noel Power <noel.power@suse.com>
* BUG 13616: Python: Ensure ldb.Dn can doesn't rencoded str with py2.
o Anoop C S <anoopcs@redhat.com>
* BUG 13330: vfs_glusterfs: Adapt to changes in libgfapi signatures.
* BUG 13774: s3-vfs: Use ENOATTR in errno comparison for getxattr.
o Jiří Šašek <jiri.sasek@oracle.com>
* BUG 13704: notifyd: Fix SIGBUS on sparc.
o Christof Schmitt <cs@samba.org>
* BUG 13787: waf: Check for libnscd.
o Andreas Schneider <asn@samba.org>
* BUG 13770: s3:vfs: Correctly check if OFD locks should be enabled or not.
o Martin Schwenke <martin@meltin.net>
* BUG 13717: lib/util: Count a trailing line that doesn't end in a newline.
* BUG 13800: Recovery lock bug fixes.
o Justin Stephenson <jstephen@redhat.com>
* BUG 13726: s3: net: Do not set NET_FLAGS_ANONYMOUS with -k.
* BUG 13727: s3:libsmb: Honor disable_netbios option in smbsock_connect_send.
o Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
* BUG 13741: vfs_fileid: Fix get_connectpath_ino.
* BUG 13744: vfs_fileid: Fix fsname_norootdir algorithm.
#######################################
Reporting bugs & Development Discussion
#######################################
Please discuss this release on the samba-technical mailing list or by
joining the #samba-technical IRC channel on irc.freenode.net.
If you do report problems then please try to send high quality
feedback. If you don't provide vital information to help us track down
the problem then you will probably be ignored. All bug reports should
be filed under the "Samba 4.1 and newer" product in the project's Bugzilla
database (https://bugzilla.samba.org/).
======================================================================
== Our Code, Our Bugs, Our Responsibility.
== The Samba Team
======================================================================
Release notes for older releases follow:
----------------------------------------
=============================
Release Notes for Samba 4.9.4
December 20, 2018
...
...
@@ -74,8 +215,8 @@ database (https://bugzilla.samba.org/).
======================================================================
Release notes for older releases follow:
----------------------------------------
----------------------------------------------------------------------
=============================
Release Notes for Samba 4.9.3
...
...
auth/auth_log.c
View file @
51996460
...
...
@@ -78,11 +78,10 @@ static const char* get_password_type(const struct auth_usersupplied_info *ui);
static
void
log_json
(
struct
imessaging_context
*
msg_ctx
,
struct
loadparm_context
*
lp_ctx
,
struct
json_object
*
object
,
const
char
*
type
,
int
debug_class
,
int
debug_level
)
{
audit_log_json
(
type
,
object
,
debug_class
,
debug_level
);
audit_log_json
(
object
,
debug_class
,
debug_level
);
if
(
msg_ctx
&&
lp_ctx
&&
lpcfg_auth_event_notification
(
lp_ctx
))
{
audit_message_send
(
msg_ctx
,
AUTH_EVENT_NAME
,
...
...
@@ -102,8 +101,7 @@ static void log_json(struct imessaging_context *msg_ctx,
* To process the resulting log lines from the commend line use jq to
* parse the json.
*
* grep "JSON Authentication" log file |
* sed 's;^[^{]*;;' |
* grep "^ {" log file |
* jq -rc '"\(.timestamp)\t\(.Authentication.status)\t
* \(.Authentication.clientDomain)\t
* \(.Authentication.clientAccount)
...
...
@@ -123,63 +121,134 @@ static void log_authentication_event_json(
struct
dom_sid
*
sid
,
int
debug_level
)
{
struct
json_object
wrapper
=
json_
new
_object
()
;
struct
json_object
authentication
;
struct
json_object
wrapper
=
json_
empty
_object
;
struct
json_object
authentication
=
json_empty_object
;
char
negotiate_flags
[
11
];
json_add_timestamp
(
&
wrapper
);
json_add_string
(
&
wrapper
,
"type"
,
AUTH_JSON_TYPE
);
int
rc
=
0
;
authentication
=
json_new_object
();
json_add_version
(
&
authentication
,
AUTH_MAJOR
,
AUTH_MINOR
);
json_add_string
(
&
authentication
,
"status"
,
nt_errstr
(
status
));
json_add_address
(
&
authentication
,
"localAddress"
,
ui
->
local_host
);
if
(
json_is_invalid
(
&
authentication
))
{
goto
failure
;
}
rc
=
json_add_version
(
&
authentication
,
AUTH_MAJOR
,
AUTH_MINOR
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"status"
,
nt_errstr
(
status
));
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_address
(
&
authentication
,
"localAddress"
,
ui
->
local_host
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_address
(
&
authentication
,
"remoteAddress"
,
ui
->
remote_host
);
json_add_string
(
&
authentication
,
"serviceDescription"
,
ui
->
service_description
);
json_add_string
(
&
authentication
,
"authDescription"
,
ui
->
auth_description
);
json_add_string
(
&
authentication
,
"clientDomain"
,
ui
->
client
.
domain_name
);
json_add_string
(
&
authentication
,
"clientAccount"
,
ui
->
client
.
account_name
);
json_add_string
(
&
authentication
,
"workstation"
,
ui
->
workstation_name
);
json_add_string
(
&
authentication
,
"becameAccount"
,
account_name
);
json_add_string
(
&
authentication
,
"becameDomain"
,
domain_name
);
json_add_sid
(
&
authentication
,
"becameSid"
,
sid
);
json_add_string
(
&
authentication
,
"mappedAccount"
,
ui
->
mapped
.
account_name
);
json_add_string
(
&
authentication
,
"mappedDomain"
,
ui
->
mapped
.
domain_name
);
json_add_string
(
&
authentication
,
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"serviceDescription"
,
ui
->
service_description
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"authDescription"
,
ui
->
auth_description
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"clientDomain"
,
ui
->
client
.
domain_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"clientAccount"
,
ui
->
client
.
account_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"workstation"
,
ui
->
workstation_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"becameAccount"
,
account_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"becameDomain"
,
domain_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_sid
(
&
authentication
,
"becameSid"
,
sid
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"mappedAccount"
,
ui
->
mapped
.
account_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"mappedDomain"
,
ui
->
mapped
.
domain_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"netlogonComputer"
,
ui
->
netlogon_trust_account
.
computer_name
);
json_add_string
(
&
authentication
,
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"netlogonTrustAccount"
,
ui
->
netlogon_trust_account
.
account_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
snprintf
(
negotiate_flags
,
sizeof
(
negotiate_flags
),
"0x%08X"
,
ui
->
netlogon_trust_account
.
negotiate_flags
);
json_add_string
(
&
authentication
,
"netlogonNegotiateFlags"
,
negotiate_flags
);
json_add_int
(
&
authentication
,
rc
=
json_add_string
(
&
authentication
,
"netlogonNegotiateFlags"
,
negotiate_flags
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_int
(
&
authentication
,
"netlogonSecureChannelType"
,
ui
->
netlogon_trust_account
.
secure_channel_type
);
json_add_sid
(
&
authentication
,
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_sid
(
&
authentication
,
"netlogonTrustAccountSid"
,
ui
->
netlogon_trust_account
.
sid
);
json_add_string
(
&
authentication
,
"passwordType"
,
get_password_type
(
ui
));
json_add_object
(
&
wrapper
,
AUTH_JSON_TYPE
,
&
authentication
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authentication
,
"passwordType"
,
get_password_type
(
ui
));
if
(
rc
!=
0
)
{
goto
failure
;
}
wrapper
=
json_new_object
();
if
(
json_is_invalid
(
&
wrapper
))
{
goto
failure
;
}
rc
=
json_add_timestamp
(
&
wrapper
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
wrapper
,
"type"
,
AUTH_JSON_TYPE
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_object
(
&
wrapper
,
AUTH_JSON_TYPE
,
&
authentication
);
if
(
rc
!=
0
)
{
goto
failure
;
}
/*
* While not a general-purpose profiling solution this will
...
...
@@ -192,18 +261,28 @@ static void log_authentication_event_json(
struct
timeval
current_time
=
timeval_current
();
uint64_t
duration
=
usec_time_diff
(
&
current_time
,
start_time
);
json_add_int
(
&
authentication
,
"duration"
,
duration
);
rc
=
json_add_int
(
&
authentication
,
"duration"
,
duration
);
if
(
rc
!=
0
)
{
goto
failure
;
}
}
log_json
(
msg_ctx
,
lp_ctx
,
&
wrapper
,
AUTH_JSON_TYPE
,
DBGC_AUTH_AUDIT
,
DBGC_AUTH_AUDIT_JSON
,
debug_level
);
json_free
(
&
wrapper
);
return
;
failure:
/*
* On a failure authentication will not have been added to wrapper so it
* needs to be freed to avoid a leak.
*
*/
json_free
(
&
authentication
);
json_free
(
&
wrapper
);
DBG_ERR
(
"Failed to write authentication event JSON log message
\n
"
);
}
/*
...
...
@@ -218,8 +297,7 @@ static void log_authentication_event_json(
* To process the resulting log lines from the commend line use jq to
* parse the json.
*
* grep "JSON Authentication" log_file |\
* sed "s;^[^{]*;;" |\
* grep "^ {" log_file |\
* jq -rc '"\(.timestamp)\t
* \(.Authorization.domain)\t
* \(.Authorization.account)\t
...
...
@@ -237,53 +315,109 @@ static void log_successful_authz_event_json(
struct
auth_session_info
*
session_info
,
int
debug_level
)
{
struct
json_object
wrapper
=
json_
new
_object
()
;
struct
json_object
authorization
;
struct
json_object
wrapper
=
json_
empty
_object
;
struct
json_object
authorization
=
json_empty_object
;
char
account_flags
[
11
];
int
rc
=
0
;
json_add_timestamp
(
&
wrapper
);
json_add_string
(
&
wrapper
,
"type"
,
AUTHZ_JSON_TYPE
);
authorization
=
json_new_object
();
json_add_version
(
&
authorization
,
AUTHZ_MAJOR
,
AUTHZ_MINOR
);
json_add_address
(
&
authorization
,
"localAddress"
,
local
);
json_add_address
(
&
authorization
,
"remoteAddress"
,
remote
);
json_add_string
(
&
authorization
,
"serviceDescription"
,
service_description
);
json_add_string
(
&
authorization
,
"authType"
,
auth_type
);
json_add_string
(
&
authorization
,
"domain"
,
session_info
->
info
->
domain_name
);
json_add_string
(
&
authorization
,
"account"
,
session_info
->
info
->
account_name
);
json_add_sid
(
&
authorization
,
"sid"
,
&
session_info
->
security_token
->
sids
[
0
]);
json_add_guid
(
&
authorization
,
"sessionId"
,
&
session_info
->
unique_session_token
);
json_add_string
(
&
authorization
,
"logonServer"
,
session_info
->
info
->
logon_server
);
json_add_string
(
&
authorization
,
"transportProtection"
,
transport_protection
);
if
(
json_is_invalid
(
&
authorization
))
{
goto
failure
;
}
rc
=
json_add_version
(
&
authorization
,
AUTHZ_MAJOR
,
AUTHZ_MINOR
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_address
(
&
authorization
,
"localAddress"
,
local
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_address
(
&
authorization
,
"remoteAddress"
,
remote
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"serviceDescription"
,
service_description
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"authType"
,
auth_type
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"domain"
,
session_info
->
info
->
domain_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"account"
,
session_info
->
info
->
account_name
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_sid
(
&
authorization
,
"sid"
,
&
session_info
->
security_token
->
sids
[
0
]);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_guid
(
&
authorization
,
"sessionId"
,
&
session_info
->
unique_session_token
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"logonServer"
,
session_info
->
info
->
logon_server
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
authorization
,
"transportProtection"
,
transport_protection
);
if
(
rc
!=
0
)
{
goto
failure
;
}
snprintf
(
account_flags
,
sizeof
(
account_flags
),
"0x%08X"
,
session_info
->
info
->
acct_flags
);
json_add_string
(
&
authorization
,
"accountFlags"
,
account_flags
);
json_add_object
(
&
wrapper
,
AUTHZ_JSON_TYPE
,
&
authorization
);
rc
=
json_add_string
(
&
authorization
,
"accountFlags"
,
account_flags
);
if
(
rc
!=
0
)
{
goto
failure
;
}
wrapper
=
json_new_object
();
if
(
json_is_invalid
(
&
wrapper
))
{
goto
failure
;
}
rc
=
json_add_timestamp
(
&
wrapper
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_string
(
&
wrapper
,
"type"
,
AUTHZ_JSON_TYPE
);
if
(
rc
!=
0
)
{
goto
failure
;
}
rc
=
json_add_object
(
&
wrapper
,
AUTHZ_JSON_TYPE
,
&
authorization
);
if
(
rc
!=
0
)
{
goto
failure
;
}
log_json
(
msg_ctx
,
lp_ctx
,
&
wrapper
,
AUTHZ_JSON_TYPE
,
DBGC_AUTH_AUDIT
,
DBGC_AUTH_AUDIT_JSON
,
debug_level
);
json_free
(
&
wrapper
);
return
;
failure:
/*
* On a failure authorization will not have been added to wrapper so it
* needs to be freed to avoid a leak.
*
*/
json_free
(
&
authorization
);
json_free
(
&
wrapper
);
DBG_ERR
(
"Unable to log Authentication event JSON audit message
\n
"
);
}
#else
...
...
ctdb/config/ctdb.conf
View file @
51996460
...
...
@@ -11,7 +11,12 @@
# log level = NOTICE
[
cluster
]
# Shared recovery lock file to avoid split brain. No default.
# Do NOT run CTDB without a recovery lock file unless you know exactly
# what you are doing.
# recovery lock = /shared/recovery.lock
# Shared recovery lock file to avoid split brain. Daemon
# default is no recovery lock. Do NOT run CTDB without a
# recovery lock file unless you know exactly what you are
# doing.
#
# Please see the RECOVERY LOCK section in ctdb(7) for more
# details.
#
# recovery lock = !/bin/false RECOVERY LOCK NOT CONFIGURED
ctdb/doc/ctdb-etcd.7
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb-etcd
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\-ETCD" "7" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\-ETCD" "7" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb-script.options.5
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb-script.options
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\-SCRIPT\&.OPTIO" "5" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\-SCRIPT\&.OPTIO" "5" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb-statistics.7
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb-statistics
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\-STATISTICS" "7" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\-STATISTICS" "7" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb-tunables.7
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb-tunables
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\-TUNABLES" "7" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\-TUNABLES" "7" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb.7
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB" "7" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB" "7" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb.conf.5
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb.conf
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\&.CONF" "5" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\&.CONF" "5" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb.sysconfig.5
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb.sysconfig
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB\&.SYSCONFIG" "5" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB\&.SYSCONFIG" "5" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb_diagnostics.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdb_diagnostics
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDB_DIAGNOSTICS" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDB_DIAGNOSTICS" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdb_mutex_ceph_rados_helper.7
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: Ceph RADOS Mutex
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CEPH RADOS MUTEX" "7" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CEPH RADOS MUTEX" "7" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdbd.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdbd
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDBD" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDBD" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ctdbd_wrapper.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ctdbd_wrapper
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "CTDBD_WRAPPER" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "CTDBD_WRAPPER" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ltdbtool.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ltdbtool
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "LTDBTOOL" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "LTDBTOOL" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/onnode.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: onnode
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "ONNODE" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "ONNODE" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/doc/ping_pong.1
View file @
51996460
...
...
@@ -2,12 +2,12 @@
.\" Title: ping_pong
.\" Author:
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 12/20
/2018
.\" Date:
03/
12/20
19
.\" Manual: CTDB - clustered TDB database
.\" Source: ctdb
.\" Language: English
.\"
.TH "PING_PONG" "1" "12/20
/2018
" "ctdb" "CTDB \- clustered TDB database"
.TH "PING_PONG" "1" "
03/
12/20
19
" "ctdb" "CTDB \- clustered TDB database"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
...
...
ctdb/server/ctdb_cluster_mutex.c
View file @
51996460
...
...
@@ -118,72 +118,101 @@ static void cluster_mutex_handler(struct tevent_context *ev,
static
char
cluster_mutex_helper
[
PATH_MAX
+
1
]
=
""
;
static
bool
cluster_mutex_helper_args
(
TALLOC_CTX
*
mem_ctx
,
const
char
*
argstring
,
char
***
argv
)
static
bool
cluster_mutex_helper_args_file
(
TALLOC_CTX
*
mem_ctx
,
const
char
*
argstring
,
char
***
argv
)
{
int
nargs
,
i
,
ret
,
n
;
bool
is_command
=
false
;
bool
ok
;
char
**
args
=
NULL
;
char
*
strv
=
NULL
;
char
*
t
=
NULL
;
if
(
argstring
!=
NULL
&&
argstring
[
0
]
==
'!'
)
{
/* This is actually a full command */
is_command
=
true
;
t
=
discard_const
(
&
argstring
[
1
]);
}
else
{
is_command
=
false
;
t
=
discard_const
(
argstring
);
ok
=
ctdb_set_helper
(
"cluster mutex helper"
,
cluster_mutex_helper
,
sizeof
(
cluster_mutex_helper
),
"CTDB_CLUSTER_MUTEX_HELPER"
,
CTDB_HELPER_BINDIR
,
"ctdb_mutex_fcntl_helper"
);
if
(
!
ok
)
{
DBG_ERR
(
"ctdb exiting with error: "
"Unable to set cluster mutex helper
\n
"
);
exit
(
1
);
}
ret
=
strv_split
(
mem_ctx
,
&
strv
,
t
,
"
\t
"
);
if
(
ret
!=
0
)
{
DEBUG
(
DEBUG_ERR
,
(
"Unable to parse mutex helper string
\"
%s
\"
(%s)
\n
"
,
argstring
,
strerror
(
ret
))
);
/* Array includes default helper, file and NULL */
args
=
talloc_array
(
mem_ctx
,
char
*
,
3
);
if
(
args
==
NULL
)
{
DBG_ERR
(
"Memory allocation error
\n
"
);
return
false
;
}
n
=
strv_count
(
strv
);
args
=
talloc_array
(
mem_ctx
,
char
*
,
n
+
(
is_command
?
1
:
2
))
;
args
[
0
]
=
cluster_mutex_helper
;
if
(
args
==
NULL
)
{
DEBUG
(
DEBUG_ERR
,(
__location__
" out of memory
\n
"
));
args
[
1
]
=
talloc_strdup
(
args
,
argstring
);
if
(
args
[
1
]
==
NULL
)
{
DBG_ERR
(
"Memory allocation error
\n
"
);
return
false
;
}
n
args
=
0
;
args
[
2
]
=
NULL
;
if
(
!
is_command
)
{
if
(
!
ctdb_set_helper
(
"cluster mutex helper"
,
cluster_mutex_helper
,
sizeof
(
cluster_mutex_helper
),
"CTDB_CLUSTER_MUTEX_HELPER"
,
CTDB_HELPER_BINDIR
,
"ctdb_mutex_fcntl_helper"
))
{
DEBUG
(
DEBUG_ERR
,(
"ctdb exiting with error: %s
\n
"
,
__location__
" Unable to set cluster mutex helper
\n
"
));
exit
(
1
);
*
argv
=
args
;
return
true
;
}
args
[
nargs
++
]
=
cluster_mutex_helper
;
static
bool
cluster_mutex_helper_args_cmd
(
TALLOC_CTX
*
mem_ctx
,
const
char
*
argstring
,
char
***
argv
)
{
int
i
,
ret
,
n
;
char
**
args
=
NULL
;
char
*
strv
=
NULL
;
char
*
t
=
NULL
;
ret
=
strv_split
(
mem_ctx
,
&
strv
,
argstring
,
"
\t
"
);
if
(
ret
!=
0
)
{
D_ERR
(
"Unable to parse mutex helper command
\"
%s
\"
(%s)
\n
"
,
argstring
,
strerror
(
ret
));
return
false
;
}
n
=
strv_count
(
strv
);
/* Extra slot for NULL */
args
=
talloc_array
(
mem_ctx
,
char
*
,
n
+
1
);
if
(
args
==
NULL
)
{
DBG_ERR
(
"Memory allocation error
\n
"
);
return
false
;
}
talloc_steal
(
args
,
strv
);
t
=
NULL
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
/* Don't copy, just keep cmd_args around */
t
=
strv_next
(
strv
,
t
);
args
[
nargs
++
]
=
t
;
args
[
i
]
=
t
;
}
/* Make sure last argument is NULL */
args
[
nargs
]
=
NULL
;
args
[
n
]
=
NULL
;
*
argv
=
args
;
return
true
;
}
static
bool
cluster_mutex_helper_args
(
TALLOC_CTX
*
mem_ctx
,
const
char
*
argstring
,
char
***
argv
)
{
bool
ok
;
if
(
argstring
!=
NULL
&&
argstring
[
0
]
==
'!'
)
{
ok
=
cluster_mutex_helper_args_cmd
(
mem_ctx
,
&
argstring
[
1
],
argv
);
}
else
{
ok
=
cluster_mutex_helper_args_file
(
mem_ctx
,
argstring
,
argv
);
}
return
ok
;
}
struct
ctdb_cluster_mutex_handle
*
ctdb_cluster_mutex
(
TALLOC_CTX
*
mem_ctx
,
struct
ctdb_context
*
ctdb
,
...
...
Prev
1
2
3
4
5
…
12
Next