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

117594 Commits

Author SHA1 Message Date
Jeremy Allison
29ee235cae s3: torture: Ensure we can always get a POSIX ACL on a directory handle.
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): Wed Jun 26 19:31:28 UTC 2019 on sn-devel-184
2019-06-26 19:31:28 +00:00
Jeremy Allison
61777349f1 s3: smbd: We also need to open a real directory fd when modifying security.
Makes the logic identical to file open.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-26 18:14:23 +00:00
Noel Power
164570fcbb lib/param: clang: Fix 'dereference of a null pointer' warning
Fixes:

lib/param/loadparm.c:3325:36: warning: Access to field 'szService' results in a dereference of a null pointer (loaded from variable 'service') <--[clang]
        return lpcfg_string((const char *)service->szService)

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

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Wed Jun 26 11:53:08 UTC 2019 on sn-devel-184
2019-06-26 11:53:08 +00:00
Noel Power
9c58684566 librpc/ndr: clang: Fix warning 'Value stored to 'towernum' is never read'
Fixes:

librpc/ndr/ndr_orpc.c:140:2: warning: Value stored to 'towernum' is never read <--[clang]
        towernum = 0;
        ^          ~
1 warning generated.

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Noel Power
fd17d50f7c lib/dwrap: Fix 'Null pointer passed as an argument to a 'nonnull' parameter '
Fixes:

lib/dbwrap/dbwrap.c:645:4: warning: Null pointer passed as an argument to a 'nonnull' parameter <--[clang]
                        memcpy(p, dbufs[i].dptr, thislen);

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Noel Power
37add5c8ce lib/dbwrap: clang: Fix 'all argument is an uninitialized value'
Fixes:

lib/dbwrap/dbwrap.c:533:4: warning: 2nd function call argument is an uninitialized value <--[clang]
                        dbwrap_lock_order_unlock(db, lockptr);
                        ^

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Noel Power
1d00bd9f0b lib/util: clang: Fix Value stored during its initialization is never read
Fixes:

lib/util/util_tdb.c:385:11: warning: Value stored to 'result' during its initialization is never read <--[clang]

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Noel Power
cf43f1d052 clang: Fix Null pointer passed as argument warning
Fixes:
lib/tdb/common/transaction.c:354:2: warning: Null pointer passed as an argument to a 'nonnull' parameter <--[clang]
        memcpy(tdb->transaction->blocks[blk] + off, buf, len);
&

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Noel Power
7987e4af96 lib/tdb: clang: Fix warning: Dereference of null pointer
Fixes:

lib/tdb/common/lock.c:933:6: warning: Dereference of null pointer <--[clang]
        if (tdb->allrecord_lock.count) {
            ^~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2019-06-26 10:30:23 +00:00
Aaron Haslett
e28365c515 selftest: schema version check in provision test
Modifying blackbox provision test to check schema version.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 26 05:31:03 UTC 2019 on sn-devel-184
2019-06-26 05:31:03 +00:00
Aaron Haslett
cb16395ab3 schema: changing default base schema to 2012_R2
Changing default base schema from 2008_R2 to 2012_R2

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-06-26 04:12:34 +00:00
Aaron Haslett
fc9845da69 selftest: specifying 2008_R2 base schema for tests that need it
We're going to change the default base schema so this patch changes all
tests and testenvs requiring the current default (2008_R2) to specify it
in all provision commands using --base-schema.

Signed-off-by: Aaron Haslett <aaronhaslett@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-06-26 04:12:33 +00:00
Tim Beale
295bf73e9b dsdb: Handle DB corner-case where PSO container doesn't exist
A 2003 AD DB with functional level set to >= 2008 was non-functional
due to the PSO checks.

We already check the functional level is >= 2008 before checking for the
PSO container. However, users could change their functional level
without ensuring their DB conforms to the corresponding base schema.

The objectclass DSDB module should prevent the PSO container from ever
being deleted. So the only way we should be able to hit this case is
through upgrading the functional level (but not the underlying schema
objects). If so, log a low-priority message and continue without errors.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14008
RN: Previously, AD operations such as user authentication could fail
completely with the message 'Error 32 determining PSOs in system' logged
on the samba server. This problem would only affect a domain that was
created using a pre-2008 AD base schema and then had its functional
level manually raised to 2008 or greater. This issue has now been
resolved.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
5df815cfd2 pidl: Remove the need to always specify --client with --python
This allows us to avoid generating client code for NDR-only protocols that do
not go over DCE/RPC

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
46bf62dd0c librpc: No longer generate or build unused client bindings for frsrpc
We retain the IDL and NDR parsers for ndrdump.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
88bb8fe43a librpc: Do not generate extra unused client or python bindings with PIDL
This sorts out the idl list into the parts that actually need --python and --client specified
and so speeds up the compile and clarifies the code behaviour.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
6f9176e649 librpc: Remove frsblobs.idl
We can now dump public structures using ndrdump, so helper dump functions
are not required any more.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
9c7e8f3a35 librpc: Remove unused RPC_NDR_MDSSVC
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
ba222585ca librpc: Remove unused RPC_NDR_KEYSVC
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
2555692f48 librpc: Remove unused RPC_NDR_TRKWKS
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
634b44c25e librpc: Remove unused RPC_NDR_SCERPC
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
bee87eecb8 librpc: Remove unused RPC_NDR_WZCSVC
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
a162d68f58 librpc: Remove unused RPC_NDR_MSGSVC
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
21eec4cf3c librpc: Remove unused RPC_NDR_SERVER_ID
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
34206deb35 librpc: Remove unused RPC_NDR_NBT
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
57ed8db7a2 librpc: Remove unused RPC_NDR_DSBACKUP
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
f4f0db0c8e librpc: Remove unused RPC_NDR_WINSIF
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
c6f9ff9cce librpc: Remove unused RPC_NDR_POLICYAGENT
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
0531893451 librpc: Remove unused RPC_NDR_EFS
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
4bfd001d79 librpc: Remove unused RPC_NDR_AUDIOSRV
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
48f65c851a librpc: Remove unused RPC_NDR_SMB_ACL
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
0af3a6139d librpc: Remove unused RPC_NDR_IDMAP
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:33 +00:00
Andrew Bartlett
8e83667fe4 librpc: Remove unused RPC_NDR_XATTR
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
27ad784bfb librpc: Remove unused RPC_NDR_DRSBLOBS
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
518227b674 librpc: Remove unused RPC_NDR_NTLMSSP
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
dbff6cac31 librpc: Do not generate client code for dbgidl.idl
We only want to record the GUID and function table names, we do not need
to generate uncalled stubs.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
ecd5fa294c s4-torture: Remove unused #include of librpc/gen_ndr/ndr_dcerpc_c.h
We only need librpc/rpc/rpc_common.h

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
69361a43ad lib/tls: Remove unused header definitions from source4/lib/tls/tls.h (tls socket wrapper)
These were removed in eb15acdd35 but the
header declarations were not removed.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Andrew Bartlett
6f81fe151a ntvfs: Remove now unused functions
These likely became unused once other untested parts of the NTVFS file server were
removed in 2017e291a2,
ee8b48df0f,
679227d606,
31de52ed2e

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-06-26 04:12:32 +00:00
Karolin Seeger
039558fea8 packaging: Update READMEs to reflect current status.
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Reviewed-by: Björn Baumbach <bb@sernet.de>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Jun 25 12:09:39 UTC 2019 on sn-devel-184
2019-06-25 12:09:39 +00:00
David Disseldorp
2436496e71 client: enable allinfo and altname tab completion
Should tab-complete a single remote path.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Jun 25 10:55:45 UTC 2019 on sn-devel-184
2019-06-25 10:55:45 +00:00
Jeremy Allison
05667d36de s3: torture: Add POSIX-ACL-OPLOCK test to check interaction of posix ACL operations with an oplocked Windows handle.
(Spoiler alert, it breaks the oplock :-).

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): Mon Jun 24 20:05:34 UTC 2019 on sn-devel-184
2019-06-24 20:05:34 +00:00
Jeremy Allison
78bdbfbf54 s3: smbd: Posix ACLs. Now we know we have a handle, always use VFS_FCHMOD instead of VFS_CHMOD.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
644ab10b04 s3: modules: Fruit. Now we know we have a handle, always use VFS_FCHMOD instead of VFS_CHMOD.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
bd203e98f8 s3: smbd: If smbd_do_qfilepathinfo() causes an oplock or lease break, we must check for deferred open here.
Note this isn't an issue in SMB2, as no SMB2 info level requests
called by smbd_do_qfilepathinfo()/smbd_do_setfilepathinfo() from
SMB2 can cause a oplock or lease break.

The SMB1 trans2.c: calling of smbd_do_setfilepathinfo()
correctly copes with this, this was just missed in the
SMB1 call of smbd_do_qfilepathinfo().

Needed for the following POSIX ACL query interacting
with Windows oplock file test to follow.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
147ce70eea s3: smbd: Make set_unix_posix_default_acl() take an fsp argument, not smb_fname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
77454ecfbd s3: smbd: Add default ACLS can only be set on directory check to smb_set_posix_acl().
This was already being checked in the lower layer,
so no change in behavior, just an efficiency and
clarity change.

Just move an extra check here so we refuse the
set if a default ACL is sent on a file object
before we go into the lower layers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
503e1243d2 s3: smbd: Only pass fsp to remove_posix_acl(). No longer uses smb_fname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
caa4024a91 s3: smbd: Only pass fsp to set_unix_posix_acl(). No longer uses smb_fname.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:10 +00:00
Jeremy Allison
681f0f2337 s3: smbd: Change set_unix_posix_default_acl() to return NTSTATUS.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2019-06-24 18:49:09 +00:00