1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

7591 Commits

Author SHA1 Message Date
Andrew Bartlett
9a02c31deb lib: Explicitly refuse to truncate unix domain socket paths
This avoids creating a socket like:

.../winbindd_privileged/p

instead of

.../winbindd_privileged/pipe

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-10-18 16:07:35 +00:00
Anoop C S
25b1e478ec s3/dump_core: Have a newline towards the end of log message
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Fri Oct 18 08:54:04 UTC 2019 on sn-devel-184
2019-10-18 08:54:04 +00:00
Andreas Schneider
b84abb3a46 s3:libnet: Require sealed LDAP SASL connections for joining
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2019-10-09 07:06:35 +00:00
Anoop C S
5084a69de1 s3: VFS: Add SMB_VFS_FCNTL
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-08 08:38:32 +00:00
Volker Lendecke
32d6cc84cf dbwrap_watch: Don't alert ourselves, fix raw.oplock.batch26 race
This fixes the following flaky test:

UNEXPECTED(failure): samba3.raw.oplock.batch26(nt4_dc)
REASON: Exception: Exception: (../../source4/torture/raw/oplock.c:3718): wrong value for break_info.count got 0x2 - should be 0x1

You can reproduce it with two small msleeps, which means it's a race
condition:

diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 20b5a3e294c..126c7fc021d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1917,6 +1917,14 @@ NTSTATUS send_break_message(struct messaging_context *msg_ctx,
 	DATA_BLOB blob;
 	NTSTATUS status;

+	{
+		static bool sent = false;
+		if (sent) {
+			smb_msleep(500);
+		}
+		sent = true;
+	}
+
 	if (DEBUGLVL(10)) {
 		struct server_id_buf buf;
 		DBG_DEBUG("Sending break message to %s\n",
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index b3da84b1269..d9c4dbb9487 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -858,6 +858,8 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
 	uint16_t break_to;
 	bool break_needed = true;

+	smb_msleep(100);
+
 	msg = talloc(talloc_tos(), struct oplock_break_message);
 	if (msg == NULL) {
 		DBG_WARNING("talloc failed\n");

15a8af075a introduced a bug where we immediately wake up ourselves
after doing a watch_send, leading to two inter-smbd oplock break
messages for this case. In theory, this should not matter, as in the
oplock break handler in the destination smbd we check

(fsp->sent_oplock_break != NO_BREAK_SENT)

so that the break does not get sent twice. However, with the above two
sleeps the oplock holding client could send out its oplock downgrade
while the second inter-smbd break messages was on its way.

The real fix would be to note in the share mode array that the
inter-smbd message has already been sent, but as other users of
dbwrap_watched_watch_send might also be affected by this bug, this fix
should be sufficient to get rid of this flaky test.

Unfortunately, dbwrap_watch.c is now pretty complex and needs some
serious refactoring to become understandable again. But that's
something for another day, sorry.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:41 +00:00
Volker Lendecke
64da66a75c dbwrap_watch: Remove "addwatch" handling from dbwrap_watched_save()
This has been moved to dbwrap_watched_watch_send()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:41 +00:00
Volker Lendecke
491b71f29b dbwrap_watch: Move reallocating watchers to dbwrap_watched_watch_send()
Before 15a8af075a we did not have a separately allocated watchers
array and dbwrap_watched_save() could play (too) smart tricks with
dbwrap_record_storev(). Now that we always have watchers talloc'ed, we
can remove those smart tricks from dbwrap_watched_save() in the next
commit.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:41 +00:00
Volker Lendecke
88f8edf69b dbwrap_watch: Slightly simplify dbwrap_watched_fetch_locked()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:41 +00:00
Volker Lendecke
b66b8a74b1 lib: Fix CID 1453985: Null pointer dereferences (FORWARD_NULL)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-10-02 08:01:40 +00:00
Ralph Boehme
091e3fdab6 s3:lib: add is_named_stream()
Add a new utility functions that checks whether a struct smb_filename points to
a real named stream, excluding the default stream "::$DATA".

  foo           -> false
  foo::$DATA    -> false
  foo:bar       -> true
  foo:bar:$DATA -> true

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:40 +00:00
Ralph Boehme
780a8dcba9 s3:lib: use strequal_m() in is_ntfs_default_stream_smb_fname()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Ralph Boehme
3f8bc1ce3e s3:lib: implement logic directly in is_ntfs_default_stream_smb_fname()
This allows changing the semantics of is_ntfs_stream_smb_fname() in the next
commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Ralph Boehme
2584b4cdea s3:lib: expand a comment with the function doc for is_ntfs_stream_smb_fname
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Ralph Boehme
f9fdb8a2a6 s3:lib: factor out stream name asserts to helper function
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Ralph Boehme
6c1647ca7a s3:lib: assert stream_name is NULL for POSIX paths
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Ralph Boehme
d7dc85990a s3:lib: rework a return expression into an if block
Needed to add additional stuff after the if block in the next commit.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-10-02 08:01:39 +00:00
Noel Power
6ae0fd5a34 s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Fixes:

source3/lib/netapi/user.c:1290:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:1610:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

source3/lib/netapi/user.c:2990:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3184:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
source3/lib/netapi/user.c:3522:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26 18:41:28 +00:00
Noel Power
a3b9986fac s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Fixes:

source3/lib/netapi/getdc.c:173:11: warning: Value stored to 'status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND;
                 ^~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26 18:41:27 +00:00
Noel Power
25c92111dc s3/lib/netapi: clang: Fix 'Value stored during initialization is never read'
Fixes:

source3/lib/netapi/group.c:1383:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1521:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
samba/source3/lib/netapi/group.c:1718:11: warning: Value stored to '
status' during its initialization is never read <--[clang]
        NTSTATUS status = NT_STATUS_OK;
                 ^~~~~~   ~~~~~~~~~~~~
3 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-26 18:41:27 +00:00
Jeremy Allison
0535656284 s3: lib: adouble: Add dirfsp to ad_convert_delete_adfile(). Use UNLINKAT instead of UNLINK.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-09-26 17:20:50 +00:00
Jeremy Allison
7691ce3a4b s3: lib: adouble: Add struct files_struct *dirfsp parameter to ad_convert().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2019-09-26 17:20:50 +00:00
Volker Lendecke
bc4e8b1aba messaging: Do POOL_USAGE via a socket
This makes debugging run-away processes much more efficient and even
possible at all: If the pool-usage output is more than 256MB, the
previous code could not realloc it and threw it away. Also, it is not
helpful for an already huge process to allocate even more.

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

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 18 21:27:30 UTC 2019 on sn-devel-184
2019-09-18 21:27:30 +00:00
Volker Lendecke
15a8af075a lib: Enable watching and storing dbwrap_watch records.
Samba so far on a dbwrap_watch record either watches or stores a
record, but never both from the same db_record instance acquired from
a dbwrap_fetch_locked(). In one of the next commits this will change,
we will watch a record and at the same time store data into it. This
patch enables a watch_send() followed by a storev() by properly
keeping the watchers around.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-17 22:49:39 +00:00
Khem Raj
5a80f399b5 util_sec.c: Move __thread variable to global scope
Make clang happy otherwise it complains about variable scope

fixes

source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage
        } __thread cache;
          ^

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-09-17 12:31:40 +00:00
Volker Lendecke
219a189c99 lib: Add "utok_string"
A terse, one-line unix token representation for debugging purposes

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-11 19:59:34 +00:00
Volker Lendecke
7e70701ab0 vfs: Use file_id_str_buf() in xattr_tdb_setattr()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:31 +00:00
Volker Lendecke
5ca021bd85 vfs: Use file_id_str_buf() in xattr_tdb_getattr()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:31 +00:00
Volker Lendecke
b09c216f5a lib: Use file_id_str_buf() in file_id_string()
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:31 +00:00
Volker Lendecke
049b8833ae lib: Add file_id_str_buf()
file_id_string() without talloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:30 +00:00
Volker Lendecke
ba72d8231f lib: Properly #ifdef __LIB_FILE_ID_H__
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2019-09-10 23:14:30 +00:00
Ralph Boehme
ac18730f10 s3:lib: add update_stat_ex_from_saved_stat()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14121

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-09-10 19:05:29 +00:00
Ralph Boehme
84abeaa60f s3:lib: round itime to NTTIME resolution in make_file_id_from_itime()
The rounding is needed because when a file is created via eg an SMB2 CREATE
request, we need to calculate the correct File-ID for the QFID Create-Context or
for a subsequent GETINFO SMB request on the same file-handle.

Any later metadata request that received the File-ID will do so by going through
dos_mode() -> ... -> parse_dos_attribute_blob(), where the File-ID will be
calculated from the on-disk itime which has NTTIME resolution.

As long as that is the only available itime backend, I'm rounding itime inside
make_file_id_from_itime(), not in the callers.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-09-10 19:05:29 +00:00
David Disseldorp
9173ae5f7f s3/lib/ctdbd_conn: assert hdr following read/recv
ctdb_pkt_recv_recv() and ctdb_read_packet() give us a non-null hdr on
success, so drop the error path check in favour of an assert.

This fixes a regression in 3913b9a408,
where tevent_req_error() may be skipped in the ctdbd_parse_done()
ctdb_pkt_recv_recv() error path.

Reported-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Sep  4 14:20:16 UTC 2019 on sn-devel-184
2019-09-04 14:20:16 +00:00
Jeremy Allison
e4c4af64fa s3: smbd: Add sys_mknodat() wrapper call.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2019-08-22 18:00:33 +00:00
Garming Sam
bff466943e tldap: Paged searches fail when they get to the end
The normal case hit the goto label, and should have just returned.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14029
2019-08-01 05:01:15 +00:00
Garming Sam
e5452a3742 tldap: Make memcpy of no controls safe
Static analyzers sometimes complain about this case.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14029
2019-08-01 05:01:15 +00:00
Andreas Schneider
fa09e811ca s3:lib: Use the passed mem_ctx instead of talloc_tos()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26 01:48:26 +00:00
Andreas Schneider
576bcf6155 libcli:auth: Return WERROR for encode_wkssvc_join_password_buffer()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26 01:48:24 +00:00
Andreas Schneider
7915a48e53 s3:rpc_client: Return NTSTATUS for init_samr_CryptPasswordEx()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26 01:48:22 +00:00
Andreas Schneider
4b9b1dbe9c s3:rpc_client: Return NTSTATUS for init_samr_CryptPassword()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14031

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-07-26 01:48:22 +00:00
Noel Power
3913b9a408 s3/lib: clang: Fix 'access to field results in a deref of a null pointer'
Fixes:

source3/lib/ctdbd_conn.c:1953:6: warning: Access to field 'operation' results in a dereference of a null pointer (loaded from variable 'hdr') <--[clang]
        if (hdr->operation != CTDB_REPLY_CALL) {
            ^~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Wed Jul 24 22:50:27 UTC 2019 on sn-devel-184
2019-07-24 22:50:27 +00:00
Noel Power
81f8cbfba3 s3/lib: clang: Fix 'function call argument is an uninitialized value'
Fixes:

source3/lib/ctdbd_conn.c:1066:3: warning: 3rd function call argument is an uninitialized value <--[clang]
                DEBUG(0,("ctdbd_control failed: %s, %d\n", strerror(ret),
                ^

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-24 21:33:21 +00:00
Noel Power
1d651a8d58 s3/lib: clang: Fix 'Acces to field results in a deref of a null pointer'
Fixes:

source3/lib/ctdbd_conn.c:415:6: warning: Access to field 'operation' results in a dereference of a null pointer (loaded from variable 'hdr') <--[clang]
        if (hdr->operation == CTDB_REQ_MESSAGE) {

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-24 21:33:21 +00:00
Noel Power
637cd1a6c4 s3/lib/dbwrap: clang: Fix 'Access to field results in a deref of a null'
Fixes:

source3/lib/dbwrap/dbwrap_ctdb.c:530:39: warning: Access to field 'm_write' results in a dereference of a null pointer (loaded from field 'transaction') <--[clang]
        if (pull_newest_from_marshall_buffer(ctx->transaction->m_write, key,

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-24 21:33:20 +00:00
Noel Power
6858c83dc6 s3/lib/dwrap: clang: Fix 'Value stored to 'ret' is never read'
Fixes:

source3/lib/dbwrap/dbwrap_ctdb.c:95:2: warning: Value stored to 'ret' is never read <--[clang]
        ret = ctdbd_init_connection(mem_ctx,
        ^     ~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-24 21:33:20 +00:00
Samuel Cabrero
6964348bbf s3:prefork: Allow to associate private data with listening socket
Prepare for merger RPC server codebase, where it will be necessary to
stablish an association between the listening socket and the
dcesrv_endpoint that the socket is serving.

Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2019-07-22 16:49:15 +00:00
Samuel Cabrero
6ac170267c s3-prefork: Add header inclusion guards
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-07-22 16:49:14 +00:00
Volker Lendecke
b0fc1ca65a lib: Fix the 32-bit build
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu Jul 18 12:55:30 UTC 2019 on sn-devel-184
2019-07-18 12:55:30 +00:00
Noel Power
c461352172 s3/lib/smbconf: clang: 'Value stored during its initialization is never read'
Fixes:

source3/lib/smbconf/smbconf_reg.c:123:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:178:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:444:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:583:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:712:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:995:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
source3/lib/smbconf/smbconf_reg.c:1103:9: warning: Value stored to 'werr' during its initialization is never read <--[clang]
        WERROR werr = WERR_OK;
               ^~~~   ~~~~~~~
7 warnings generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Gary Lockyer <gary@samba.org>
Autobuild-Date(master): Wed Jul 17 00:07:48 UTC 2019 on sn-devel-184
2019-07-17 00:07:48 +00:00
Noel Power
b388c217d4 s3/lib: clang: 'Value stored to 'rta' is never read'
Fixes:
source3/lib/addrchange.c:217:2: warning: Value stored to 'rta' is never read <--[clang]
        rta = IFA_RTA(ifa);
        ^     ~~~~~~~~~~~~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-07-16 22:52:25 +00:00