1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-29 11:21:54 +03:00
Commit Graph

115737 Commits

Author SHA1 Message Date
Andreas Schneider
f68d6aa335 s3:lib: Use C99 initializer for poptOption in netapi nltest
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
d34edc6b7b s3:lib: Use C99 initializer for poptOption in netapi common test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
54c1ab6d75 s3:lib: Use POPT_TABLEEND for last element of poptOption
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
650af8bf9e s3:winbind: Use C99 initializer for poptOption in winbindd
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
4c3ada2515 s3:param: Use C99 initializer for poptOption in test_lp_load
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
f699cec7d5 s3:utils: Use C99 initializer for poptOption in smbget
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:15 +01:00
Andreas Schneider
0de35fd3f6 s3:utils: Use C99 initializer for poptOption in smbtree
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
90103d1d9e s3:utils: Use C99 initializer for poptOption in net
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
5961286f29 s3:utils: Use C99 initializer for poptOption in log2pcaphex
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
7c8d4f2116 s3:utils: Use C99 initializer for poptOption in testparm
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
f5f084e9fd s3:utils: Use C99 initializer for poptOption in smbcquotas
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
a2bb56542b s3:utils: Use C99 initializer for poptOption in ntlm_auth
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
0fde49ac6b s3:utils: Use C99 initializer for poptOption in sharesec
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:14 +01:00
Andreas Schneider
aa944d50fa s3:utils: Use C99 initializer for poptOption in profiles
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
19d4495882 s3:utils: Use C99 initializer for poptOption in nmblookup
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
5990980cc9 s3:utils: Use C99 initializer for poptOption in smbcacls
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
83d25ca9d9 s3:utils: Use C99 initializer for poptOption in smbstatus
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
a3aca2f734 s3:torture: Use C99 initializer for poptOption in vfstest
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
9a15d45844 s3:smbd: Use C99 initializer for poptOption in smbd server
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
3834ea867a s3:rpcclient: Use C99 initializer for poptOption in cmd_witness
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
b0dbc7d1f5 s3:client: Use C99 initializer for poptOption in smbclient
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:13 +01:00
Andreas Schneider
53e2e8c37d nsswitch: Use C99 initializer for poptOption in wbinfo
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
cdf03f9206 libcli:nbt: Use C99 initializer for poptOption in nmblookup
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
cbf8917b40 lib:texpect: Use C99 initializer for poptOption in texpect
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
007898bf8d examples: Use C99 initializer for poptOption in testacl
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
d304d3c6f0 examples: Reformat testacl libsmbclient example
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
23709cc351 ctdb: Use C99 initializer for poptOption in test_options
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
db6992c2e9 ctdb: Use C99 initializer for poptOption in ctdb tool
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:12 +01:00
Andreas Schneider
b9924839ce gitlab-ci: Use artifacts instead of after_script
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jan 26 22:16:38 CET 2019 on sn-devel-144
2019-01-26 22:16:38 +01:00
Andreas Schneider
5aee11c286 gitlab-ci: Move before and after script to shared template
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-26 19:08:12 +01:00
Andreas Schneider
8989916b5a gitlab-ci: Move the image definition to the template
And in addition use variables for defining project and build env.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-26 19:08:12 +01:00
Tim Beale
80685fd823 s4:libcli: Remove (now unused) pysmb.c bindings
The s4 SMB client bindings don't support SMBv2, so we've made the
decision to use the s3 SMB client bindings/library code instead.
Everything in the Samba codebase now uses the s3 bindings, and we'll
add a warning message to Samba v4.10 that the s4 bindings are
deprecated. This patch removes the unused s4 bindings completely for
the next (i.e. v4.11) release.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jan 26 04:05:25 CET 2019 on sn-devel-144
2019-01-26 04:05:25 +01:00
Tim Beale
8c097b4a31 s3:pylibsmb: Initialize pointers to NULL in new API code
Fix a few uninitialized pointers that managed to sneak through review.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-01-26 00:53:10 +01:00
Isaac Boukris
d93f901ed7 Fix tests when building with selftest but without developer
Signed-off-by: Isaac Boukris <iboukris@gmail.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jan 25 21:57:57 CET 2019 on sn-devel-144
2019-01-25 21:57:57 +01:00
Jeremy Allison
e37f9956c1 smbd: uid: Don't crash if 'force group' is added to an existing share connection.
smbd could crash if "force group" is added to a
share definition whilst an existing connection
to that share exists. In that case, don't change
the existing credentials for force group, only
do so for new connections.

Remove knownfail from regression test.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jan 25 16:31:27 CET 2019 on sn-devel-144
2019-01-25 16:31:27 +01:00
Jeremy Allison
7b21b4c1f5 s3: tests: Add regression test for smbd crash on share force group change with existing connection.
Mark as known fail for now.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-01-25 13:20:23 +01:00
Tim Beale
e903d37ea4 s3:rpclient: rpclient help is not very helpful
The help was not telling me that there was a mandatory 'server' argument
that I needed to specify. After trying several different combinations
of parameters, I eventually had to run the tool in gdb to work out why
it was complaining.

This is the output I was getting:

bin/rpcclient -U$USERNAME%$PASSWORD -I $SERVER_IP
Usage: rpcclient [OPTION...]
  -c, --command=COMMANDS                 Execute semicolon separated
cmds
  -I, --dest-ip=IP                       Specify destination IP address
  -p, --port=PORT                        Specify port number
...

New help output is:

Usage: rpcclient [OPTION...] <server>
Options:
  -c, --command=COMMANDS                 Execute semicolon separated
cmds
...

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-01-25 13:20:23 +01:00
Ralph Boehme
67fc683a3e CI: move target "build_nt4" to private gitlab runners
Fixes the mistake of 574fdfae59 that added
"build_nt4" to the public runners.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13761

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>

Autobuild-User(master): Tim Beale <timbeale@samba.org>
Autobuild-Date(master): Thu Jan 24 02:45:09 CET 2019 on sn-devel-144
2019-01-24 02:45:09 +01:00
Anoop C S
c99402724a s3-vfs: Use ENOATTR in errno comparison for getxattr
* ENODATA is not defined in FreeBSD
* ENOATTR is defined to be a synonym for ENODATA in Linux
* In its absence Samba already defines ENOATTR to either
  ENODATA or ENOENT

Thus it is safe and correct to compare with ENOATTR rather
than ENODATA.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jan 23 21:59:10 CET 2019 on sn-devel-144
2019-01-23 21:59:10 +01:00
SATOH Fumiyasu
9f666969f8 docs-xml: Fix a typo in manpage for idmap_ad
Signed-off-by: SATOH Fumiyasu <fumiyas@osstech.co.jp>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-01-23 18:49:17 +01:00
Ralph Boehme
574fdfae59 CI: run "samba-nt4" as part of the free runners
Looks like this got lost in the py2/py3 reshuffling around
d01d85ccb2.

Signed-off-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Jan 23 12:41:32 CET 2019 on sn-devel-144
2019-01-23 12:41:32 +01:00
Joe Guo
4729c90f97 traffic: rm --scale-traffic default value
-S, --scale--traffic defaults to 1.0
when we switch to new option -T, both -T and -S are set, which raise an error:

script/traffic_replay #234: --scale-traffic and --packets-per-second are incompatible. Use one or the other.

Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Tim Beale <timbeale@catalyst.net.nz>

Autobuild-User(master): Tim Beale <timbeale@samba.org>
Autobuild-Date(master): Wed Jan 23 03:09:41 CET 2019 on sn-devel-144
2019-01-23 03:09:41 +01:00
Jeremy Allison
36c42e6d62 libcli: dns: Change internal DNS_REQUEST_TIMEOUT from 2 to 10 seconds.
Should make us more robust when dealing with slow DNS servers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Jan 22 23:37:16 CET 2019 on sn-devel-144
2019-01-22 23:37:16 +01:00
Günther Deschner
adffe0dcf0 s3-vfs: add glusterfs_fuse vfs module.
This module only implements the get_real_filename function by accessing
a distinct extended attribute that is available over a glusterfs fuse
mount.

By implementing this vfs function users of a glusterfs fuse mount
achieve a much better performance in create based workloads where samba
then can avoid trying multiple case folding options to detect the real
filename.

Patch is based on an initial patch provided by
Poornima G <pgurusid@redhat.com>

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jan 22 18:37:56 CET 2019 on sn-devel-144
2019-01-22 18:37:56 +01:00
Tim Beale
10e54a095f netcmd: Try to improve domain backup error message
I ran this command as non-root by mistake and didn't find the error
message particularly helpful. Tweak the error message so it reminds the
user that they should be root. Also display the path we're looking for
the sam.ldb file in, to give them more clues.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13676

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Mon Jan 21 16:34:06 CET 2019 on sn-devel-144
2019-01-21 16:34:06 +01:00
Lukas Slebodnik
0628ca2a55 tdb: Fix compatibility of wscript with older python
Traceback (most recent call last):
  File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point
    run_commands()
  File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 251, in run_commands
    ctx = run_command(cmd_name)
  File "tdb-1.3.17/third_party/waf/waflib/Scripting.py", line 235, in run_command
    ctx.execute()
  File "tdb-1.3.17/third_party/waf/waflib/Context.py", line 204, in execute
    self.recurse([os.path.dirname(g_module.root_path)])
  File "tdb-1.3.17/third_party/waf/waflib/Context.py", line 286, in recurse
    user_function(self)
  File "tdb-1.3.17/wscript", line 225, in testonly
    cmd = "BINDIR={} {}".format(blddir, sh_test)
ValueError: zero length field name in format

Signed-off-by: Lukas Slebodnik <lslebodn@fedoraproject.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sun Jan 20 03:49:59 CET 2019 on sn-devel-144
2019-01-20 03:49:59 +01:00
Anoop C S
08ba013a2b s4/messaging: Fix undefined reference in linking libMESSAGING-samba4.so
Early check for DEVELOPER or ENABLE_SELFTEST configure options inside
messaging_handlers.c leaves us with the following undefined reference
linkage error:

[1315/3712] Linking bin/default/source4/lib/messaging/libMESSAGING-samba4.so
/usr/bin/ld: source4/lib/messaging/messaging.c.4.o: in function
						`imessaging_init_internal':
/root/samba.git/bin/default/../../source4/lib/messaging/messaging.c:472:
		undefined reference to `imessaging_register_extra_handlers'
collect2: error: ld returned 1 exit status

This happened due to failure in including "includes.h" before checking
the above mentioned configure options.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-20 00:31:25 +01:00
Gary Lockyer
60aa7b3634 group_audit: error handling in group change
Generate an appropriate log message in the event of an error
log_group_membership_changes.  As the changes have not been applied to
the database, there is no easy way to determine the intended changes.
This information is available in the "dsdbChange" audit messages, to
avoid replicating this logic for what should be a very rare occurrence
we simply log it as a "Failure"

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Jan 19 22:32:05 CET 2019 on sn-devel-144
2019-01-19 22:32:05 +01:00
Gary Lockyer
942567afda group_audit: Tests for error handling in group change
Add tests to exercise the error handling in
log_group_membership_changes.

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-19 19:21:20 +01:00
Douglas Bagnall
f4b3229f5b s4/py_dsdb: catch/handle alloc failures in py_dsdb_normalise_attributes()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-19 19:21:20 +01:00