]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agorpc_server: Fix a typo
Volker Lendecke [Wed, 20 Jan 2021 14:00:08 +0000 (15:00 +0100)] 
rpc_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agotorture: Align integer types
Volker Lendecke [Wed, 20 Jan 2021 20:10:35 +0000 (21:10 +0100)] 
torture: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Align integer types
Volker Lendecke [Fri, 15 Jan 2021 15:02:52 +0000 (16:02 +0100)] 
lib: Align integer types

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibrpc: Fix a small memleak in epm_floor_string()
Volker Lendecke [Fri, 15 Jan 2021 14:16:55 +0000 (15:16 +0100)] 
librpc: Fix a small memleak in epm_floor_string()

Use GUID_buf_string(), don't leak the output of GUID_string()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: Simplify sendfile_short_send()
Volker Lendecke [Thu, 14 Jan 2021 20:57:16 +0000 (21:57 +0100)] 
smbd: Simplify sendfile_short_send()

Allocate 1024 bytes on the stack instead of using calloc

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosharesec: Simplify add_ace()
Volker Lendecke [Thu, 14 Jan 2021 20:52:51 +0000 (21:52 +0100)] 
sharesec: Simplify add_ace()

Use ADD_TO_ARRAY

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibcli: make_sec_acl() copies the ace_list, make that const
Volker Lendecke [Thu, 14 Jan 2021 20:51:01 +0000 (21:51 +0100)] 
libcli: make_sec_acl() copies the ace_list, make that const

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbcacls: Simplify add_ace_with_ctx()
Volker Lendecke [Thu, 14 Jan 2021 20:45:36 +0000 (21:45 +0100)] 
smbcacls: Simplify add_ace_with_ctx()

Use ADD_TO_ARRAY()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Simplify add_ace()
Volker Lendecke [Thu, 14 Jan 2021 20:33:13 +0000 (21:33 +0100)] 
libsmb: Simplify add_ace()

Use ADD_TO_ARRAY()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibsmb: Simplify sec_desc_parse()
Volker Lendecke [Thu, 14 Jan 2021 20:32:21 +0000 (21:32 +0100)] 
libsmb: Simplify sec_desc_parse()

Avoid CALLOC for just one struct dom_sids

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbcacls: Simplify sec_desc_parse()
Volker Lendecke [Thu, 14 Jan 2021 19:49:00 +0000 (20:49 +0100)] 
smbcacls: Simplify sec_desc_parse()

Don't use SMB_CALLOC_ARRAY for just one element.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Make accept_recv() return struct samba_sockaddr
Volker Lendecke [Mon, 11 Jan 2021 14:58:58 +0000 (15:58 +0100)] 
lib: Make accept_recv() return struct samba_sockaddr

Avoid casting problems by using the samba_sockaddr union

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Slightly simplify dcesrv_bind()
Volker Lendecke [Thu, 14 Jan 2021 11:20:43 +0000 (12:20 +0100)] 
rpc_server: Slightly simplify dcesrv_bind()

Factor out dereferencing conn->dce_ctx

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Slightly simplify dcesrv_bind()
Volker Lendecke [Thu, 14 Jan 2021 11:17:53 +0000 (12:17 +0100)] 
rpc_server: Slightly simplify dcesrv_bind()

We have already dereferenced call->conn in a variable, use that.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: Simplify vfs_gluster_getwd()
Volker Lendecke [Thu, 14 Jan 2021 09:25:41 +0000 (10:25 +0100)] 
vfs: Simplify vfs_gluster_getwd()

Avoid a malloc, we allocate PATH_MAX chars on the stack elsewhere too

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Use hex_byte() in strhex_to_str()
Volker Lendecke [Thu, 14 Jan 2021 09:21:19 +0000 (10:21 +0100)] 
lib: Use hex_byte() in strhex_to_str()

I had completely missed that one in the last round...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolib: Avoid an "includes.h"
Volker Lendecke [Thu, 14 Jan 2021 09:10:04 +0000 (10:10 +0100)] 
lib: Avoid an "includes.h"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agorpc_server: Fix a typo
Volker Lendecke [Wed, 13 Jan 2021 15:03:08 +0000 (16:03 +0100)] 
rpc_server: Fix a typo

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3:idmap_hash: reliable return ID_TYPE_BOTH
Stefan Metzmacher [Fri, 23 Oct 2020 10:21:57 +0000 (12:21 +0200)] 
s3:idmap_hash: reliable return ID_TYPE_BOTH

idmap_hash used to bounce back the requested type,
which was ID_TYPE_UID, ID_TYPE_GID or ID_TYPE_NOT_SPECIFIED
before as the winbindd parent always used a lookupsids.
When the lookupsids failed because of an unknown domain,
the idmap child weren't requested at all and the caller
sees ID_TYPE_NOT_SPECIFIED.

This module should have supported ID_TYPE_BOTH since
samba-4.1.0, similar to idmap_rid and idmap_autorid.

Now that the winbindd parent will pass ID_TYPE_BOTH in order to
indicate that the domain exists, it's better to always return
ID_TYPE_BOTH instead of a random mix of ID_TYPE_UID, ID_TYPE_GID
or ID_TYPE_BOTH. In order to request a type_hint it will return
ID_REQUIRE_TYPE for ID_TYPE_NOT_SPECIFIED, which means that
the parent at least assures that the domain sid exists.
And the caller still gets ID_TYPE_NOT_SPECIFIED if the
domain doesn't exist.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jan 22 11:32:46 UTC 2021 on sn-devel-184

5 years agowinbind: remove legacy flags fallback
Ralph Boehme [Mon, 11 Jan 2021 13:59:46 +0000 (14:59 +0100)] 
winbind: remove legacy flags fallback

Some very old NT4 DCs might have not returned the account flags filled in. This
shouldn't be a problem anymore. Additionally, on a typical domain member server,
this request is (and can only be) send to the primary domain, so this will not
work with accounts from trusted domains.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 21 22:56:20 UTC 2021 on sn-devel-184

5 years agos3/auth: implement "winbind:ignore domains"
Ralph Boehme [Fri, 15 Jan 2021 11:56:25 +0000 (12:56 +0100)] 
s3/auth: implement "winbind:ignore domains"

Under the following conditions a user from an ignored domain might be able to
authenticate:

- using Kerberos

- successfully previous authentication so the idmap and name caches are filled

- winbind not running (fwiw, winbindd is mandatory on a domain member)

- nscd running with a cached getpwnam for the ignored user (otherwise auth fails
  because getpwnam fails)

- lookup_name() function being modified to look into the name cache before
  contacting winbindd. Currently it talks directly to winbindd and that will
  check the cache.

Currently, authentication will only fail because creating the local token for
the user fails because an LSA lookupname RPC call fails (because winbindd is not
running).

All of this makes a successfull authentication unlikelly, but that is more by
accident then by design.

To ensures that if winbindd is not running and as such winbindd itself can not
enforce the restriction, also implement the ignored domains check in the auth
system as a last line of defense.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14602
RN: "winbind:ignore domains" doesn't prevent user login from trusted domain

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: check for allowed domains in winbindd_pam_auth_pac_verify()
Ralph Boehme [Thu, 14 Jan 2021 09:42:53 +0000 (10:42 +0100)] 
winbind: check for allowed domains in winbindd_pam_auth_pac_verify()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: check for allowed domains in winbindd_dual_pam_chauthtok()
Ralph Boehme [Mon, 11 Jan 2021 16:59:48 +0000 (17:59 +0100)] 
winbind: check for allowed domains in winbindd_dual_pam_chauthtok()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: check for allowed domains in winbindd_dual_pam_chng_pswd_auth_crap()
Ralph Boehme [Mon, 11 Jan 2021 16:19:05 +0000 (17:19 +0100)] 
winbind: check for allowed domains in winbindd_dual_pam_chng_pswd_auth_crap()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: check for allowed domains in winbindd_dual_pam_auth_crap()
Ralph Boehme [Mon, 11 Jan 2021 16:10:19 +0000 (17:10 +0100)] 
winbind: check for allowed domains in winbindd_dual_pam_auth_crap()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: check for allowed domains in winbindd_dual_pam_auth()
Ralph Boehme [Mon, 11 Jan 2021 15:50:31 +0000 (16:50 +0100)] 
winbind: check for allowed domains in winbindd_dual_pam_auth()

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: move "winbind:ignore domain" logic to a seperate function
Ralph Boehme [Mon, 11 Jan 2021 15:15:15 +0000 (16:15 +0100)] 
winbind: move "winbind:ignore domain" logic to a seperate function

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest: add a test for "winbind:ignore domains"
Ralph Boehme [Wed, 13 Jan 2021 10:54:40 +0000 (11:54 +0100)] 
selftest: add a test for "winbind:ignore domains"

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: handle MSG_SMB_CONF_UPDATED in the winbinds children
Ralph Boehme [Wed, 20 Jan 2021 11:00:16 +0000 (12:00 +0100)] 
winbind: handle MSG_SMB_CONF_UPDATED in the winbinds children

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: set logfile after reloading config
Ralph Boehme [Wed, 20 Jan 2021 11:27:23 +0000 (12:27 +0100)] 
winbind: set logfile after reloading config

lp_load_global() will overwrite whatever we've set with lp_set_logfile().

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agowinbind: move config-reloading code to winbindd_dual.c
Ralph Boehme [Wed, 20 Jan 2021 10:17:22 +0000 (11:17 +0100)] 
winbind: move config-reloading code to winbindd_dual.c

In preperation of forwarding MSG_SMB_CONF_UPDATED to all childs.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoselftest: use correct DNS domain name for wrapper hosts file
Ralph Boehme [Thu, 14 Jan 2021 07:14:46 +0000 (08:14 +0100)] 
selftest: use correct DNS domain name for wrapper hosts file

For some reason the join fails to register the DNS records when provisioning the
member env:

   Using short domain name -- SAMBA2008R2
   Joined 'IDMAPADMEMBER' to dns domain 'samba2008r2.example.com'
   DNS Update for idmapadmember.samba.example.com failed: ERROR_DNS_UPDATE_FAILED

At the same time the hosts file used by the wrappers contains the wrong fqdn. As
a result the test that the next commit is going do add fails due do the broken
DNS resolution:

...
UNEXPECTED(failure): samba3.blackbox.winbind_ignore_domain.test_winbind_ignore_domains_ok_krb5(ad_member_idmap_ad:local)
REASON: Exception: Exception: do_connect: Connection to idmapadmember.samba2008r2.example.com failed (Error NT_STATUS_UNSUCCESSFUL)
...

Checking DNS in the testenv, first the working record for the main DC:

testenv$ dig @10.53.57.64 dc7.samba2008r2.example.com +short
10.53.57.27

testenv$ bin/samba-tool dns query dc7 samba2008r2.example.com dc7 A -U Administrator%locDCpass7
  Name=, Records=1, Children=0
    A: 10.53.57.27 (flags=f0, serial=1, ttl=900)

Now the failing idmapadmember:

testenv$ dig @10.53.57.64 idmapadmember.samba2008r2.example.com +short

testenv$ bin/samba-tool dns query dc7 samba2008r2.example.com idmapadmember A -U Administrator%locDCpass7
ERROR: Record or zone does not exist.

Fixing the hosts file lets the tests work, fixing the broken DNS record
registration is a task for another day.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoVFS: unityed_media: Fixup um_mknodat() to correctly use the dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 20:30:10 +0000 (12:30 -0800)] 
VFS: unityed_media: Fixup um_mknodat() to correctly use the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: unityed_media: Fix um_mkdirat() to correctly look at the full pathname.
Jeremy Allison [Wed, 20 Jan 2021 20:27:16 +0000 (12:27 -0800)] 
VFS: unityed_media: Fix um_mkdirat() to correctly look at the full pathname.

Missed in the original mkdirat fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: time_audit: Fixup smb_time_audit_mknodat() to log the dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 20:22:29 +0000 (12:22 -0800)] 
VFS: time_audit: Fixup smb_time_audit_mknodat() to log the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: syncops: Fixup all uses of the SYNCOPS_NEXT_SMB_FNAME macro to correctly use...
Jeremy Allison [Wed, 20 Jan 2021 20:11:01 +0000 (12:11 -0800)] 
VFS: syncops: Fixup all uses of the SYNCOPS_NEXT_SMB_FNAME macro to correctly use the dirfsp path.

Remove the temp solution added to syncops_mkdirat()
as we now have a generic fix.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: shadow_copy2: Fixup shadow_copy2_mknodat() to correctly use the dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 19:59:16 +0000 (11:59 -0800)] 
VFS: shadow_copy2: Fixup shadow_copy2_mknodat() to correctly use the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: media_harmony: Fixup mh_mknodat() to correctly use the dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 19:56:36 +0000 (11:56 -0800)] 
VFS: media_harmony: Fixup mh_mknodat() to correctly use the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: full_audit: Fixup smb_full_audit_mknodat() to log the dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 19:51:16 +0000 (11:51 -0800)] 
VFS: full_audit: Fixup smb_full_audit_mknodat() to log the dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agoVFS: cap: Fixup cap_mknodat() to cope with translating dirfsp path.
Jeremy Allison [Wed, 20 Jan 2021 19:33:03 +0000 (11:33 -0800)] 
VFS: cap: Fixup cap_mknodat() to cope with translating dirfsp path.

Missed in my original fixes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
5 years agovfs_fruit: make use of adouble_open_from_base_fsp(ADOUBLE_RSRC) in fruit_open_rsrc_ad...
Stefan Metzmacher [Tue, 8 Dec 2020 15:29:10 +0000 (16:29 +0100)] 
vfs_fruit: make use of adouble_open_from_base_fsp(ADOUBLE_RSRC) in fruit_open_rsrc_adouble()

The key is that we return a fake_fd to the caller and only open
the '._' file in the background.

The next vfs backend should only see the fsp from
adouble_open_from_base_fsp, while the vfs backends above
should only see the fake_fd.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan 21 14:47:53 UTC 2021 on sn-devel-184

5 years agovfs_fruit: add fruit_get_complete_fio() helper
Stefan Metzmacher [Thu, 10 Dec 2020 12:11:06 +0000 (13:11 +0100)] 
vfs_fruit: add fruit_get_complete_fio() helper

This will make it easier to hide some fsp extension later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agovfs_fruit: let fruit_open_rsrc_adouble() return errno = EISDIR
Stefan Metzmacher [Wed, 30 Dec 2020 12:49:37 +0000 (13:49 +0100)] 
vfs_fruit: let fruit_open_rsrc_adouble() return errno = EISDIR

That hopefully makes the check that ':AFP_Resource' can't
be created on directories.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:adouble: add adouble_open_from_base_fsp()
Stefan Metzmacher [Wed, 23 Dec 2020 10:58:08 +0000 (11:58 +0100)] 
s3:adouble: add adouble_open_from_base_fsp()

For now we only support ADOUBLE_RSRC, but that might change in future.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:adouble: allow ad_fget/ad_get_internal to be used with a backend fsp
Stefan Metzmacher [Wed, 23 Dec 2020 10:58:08 +0000 (11:58 +0100)] 
s3:adouble: allow ad_fget/ad_get_internal to be used with a backend fsp

Up to now we only passed in stream fsp, but that will change shortly.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoshare_mode_lock: DEBUG/ASSERT recursion deadlock detection
Stefan Metzmacher [Wed, 23 Dec 2020 10:59:05 +0000 (11:59 +0100)] 
share_mode_lock: DEBUG/ASSERT recursion deadlock detection

This situation should never happen!

The known trigger is fixed with the change to adouble_open_rsrc_fsp()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3:adouble: rewrite ad_open_rsrc() as adouble_open_rsrc_fsp() using create_internal_fsp()
Stefan Metzmacher [Wed, 23 Dec 2020 10:58:08 +0000 (11:58 +0100)] 
s3:adouble: rewrite ad_open_rsrc() as adouble_open_rsrc_fsp() using create_internal_fsp()

"._" AppleDouble files are hidden by vfs_fruit by default, so there's no
need to go through a full SMB_VFS_CREATE_FILE() for them.

They don't need an smbXsrv_open_global.tdb entry nor a locking.tdb
entry, so we just open them with fd_openat().

This avoids a recursion deadlock in get_share_mode_lock() when closing
the ':AFP_Resource' stream.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agoWHATSNEW: Start release notes for Samba 4.15.0pre1.
Karolin Seeger [Thu, 21 Jan 2021 12:55:25 +0000 (13:55 +0100)] 
WHATSNEW: Start release notes for Samba 4.15.0pre1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
5 years agoVERSION: Bump version up to 4.15.0pre1...
Karolin Seeger [Thu, 21 Jan 2021 12:51:20 +0000 (13:51 +0100)] 
VERSION: Bump version up to 4.15.0pre1...

and re-enable GIT_SNAPSHOT.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
5 years agoVERSION: Disable GIT_SNAPSHOT for the 4.14.0rc1 release. samba-4.14.0rc1
Karolin Seeger [Thu, 21 Jan 2021 12:48:52 +0000 (13:48 +0100)] 
VERSION: Disable GIT_SNAPSHOT for the 4.14.0rc1 release.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
5 years agoWHATSNEW: Add release notes for Samba 4.14.0rc1.
Karolin Seeger [Thu, 21 Jan 2021 12:47:02 +0000 (13:47 +0100)] 
WHATSNEW: Add release notes for Samba 4.14.0rc1.

Signed-off-by: Karolin Seeger <kseeger@samba.org>
5 years agoReleaseKey: add GnuPG key transition statement for the Samba release key
Karolin Seeger [Thu, 21 Jan 2021 12:02:26 +0000 (13:02 +0100)] 
ReleaseKey: add GnuPG key transition statement for the Samba release key

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agoscript/release.sh: always select the GPG key by it's ID
Karolin Seeger [Thu, 21 Jan 2021 12:03:44 +0000 (13:03 +0100)] 
script/release.sh: always select the GPG key by it's ID

Signed-off-by: Karolin Seeger <kseeger@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
5 years agoWHATSNEW.txt: Miscellaneous samba-tool changes
Björn Baumbach [Mon, 18 Jan 2021 14:02:22 +0000 (15:02 +0100)] 
WHATSNEW.txt: Miscellaneous samba-tool changes

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
5 years agolibcli:smb: Fix a typo in a debug message
Andreas Schneider [Tue, 19 Jan 2021 14:50:24 +0000 (15:50 +0100)] 
libcli:smb: Fix a typo in a debug message

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Tue Jan 19 16:15:21 UTC 2021 on sn-devel-184

5 years agovfs: update status of SMB_VFS_SYMLINKAT()
Jeremy Allison [Fri, 15 Jan 2021 22:50:23 +0000 (14:50 -0800)] 
vfs: update status of SMB_VFS_SYMLINKAT()

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sun Jan 17 05:48:14 UTC 2021 on sn-devel-184

5 years agos3: smbd: Change smb_set_file_unix_link() to use a real directory fsp for SMB_VFS_SYM...
Jeremy Allison [Fri, 15 Jan 2021 22:29:08 +0000 (14:29 -0800)] 
s3: smbd: Change smb_set_file_unix_link() to use a real directory fsp for SMB_VFS_SYMLINKAT().

New VFS change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: glusterfs: Fix vfs_gluster_symlinkat() to cope with a real dirfsp.
Jeremy Allison [Fri, 15 Jan 2021 22:35:58 +0000 (14:35 -0800)] 
s3: VFS: glusterfs: Fix vfs_gluster_symlinkat() to cope with a real dirfsp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: ceph: Fix cephwrap_symlinkat() to cope with real directory fsps.
Jeremy Allison [Fri, 15 Jan 2021 22:33:17 +0000 (14:33 -0800)] 
s3: VFS: ceph: Fix cephwrap_symlinkat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agovfs: directory enumeration is now handle based
Ralph Boehme [Fri, 15 Jan 2021 15:37:56 +0000 (16:37 +0100)] 
vfs: directory enumeration is now handle based

Remove obsolete description. Also remove SMB_VFS_STATX() as I don't see a need
for that atm.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Jan 15 22:01:55 UTC 2021 on sn-devel-184

5 years agovfs: update status of SMB_VFS_MKDIRAT()
Ralph Boehme [Fri, 15 Jan 2021 09:13:36 +0000 (10:13 +0100)] 
vfs: update status of SMB_VFS_MKDIRAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopysmbd: use real dirfsp for SMB_VFS_MKDIRAT()
Ralph Boehme [Fri, 15 Jan 2021 09:12:29 +0000 (10:12 +0100)] 
pysmbd: use real dirfsp for SMB_VFS_MKDIRAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agovfs: update status of SMB_VFS_MKNODAT()
Ralph Boehme [Fri, 15 Jan 2021 08:54:15 +0000 (09:54 +0100)] 
vfs: update status of SMB_VFS_MKNODAT()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3: smbd: Change smb_unix_mknod() to use a real directory fsp for SMB_VFS_MKNODAT().
Jeremy Allison [Thu, 14 Jan 2021 20:18:50 +0000 (12:18 -0800)] 
s3: smbd: Change smb_unix_mknod() to use a real directory fsp for SMB_VFS_MKNODAT().

New VFS change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: smbd: Move creation of parent_fname out of lp_inherit_permissions() clause in...
Jeremy Allison [Thu, 14 Jan 2021 19:50:39 +0000 (11:50 -0800)] 
s3: smbd: Move creation of parent_fname out of lp_inherit_permissions() clause in smb_unix_mknod().

We will need this for the upcoming openat_pathref_fsp() use.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: glusterfs: Fix vfs_gluster_mknodat() to cope with a real dirfsp.
Jeremy Allison [Thu, 14 Jan 2021 20:25:24 +0000 (12:25 -0800)] 
s3: VFS: glusterfs: Fix vfs_gluster_mknodat() to cope with a real dirfsp.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: glusterfs: Fix missing END_PROFILE() in mkdirat() return.
Jeremy Allison [Thu, 14 Jan 2021 20:26:48 +0000 (12:26 -0800)] 
s3: VFS: glusterfs: Fix missing END_PROFILE() in mkdirat() return.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: ceph: Fix cephwrap_mknodat() to cope with real directory fsps.
Jeremy Allison [Thu, 14 Jan 2021 20:35:29 +0000 (12:35 -0800)] 
s3: VFS: ceph: Fix cephwrap_mknodat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agos3: VFS: ceph: Fix cephwrap_mkdirat() to cope with real directory fsps.
Jeremy Allison [Thu, 14 Jan 2021 20:31:24 +0000 (12:31 -0800)] 
s3: VFS: ceph: Fix cephwrap_mkdirat() to cope with real directory fsps.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
5 years agosamba-tool: Optionally hide disabled/expired accounts in "group listmembers"
Björn Baumbach [Wed, 23 Dec 2020 14:51:12 +0000 (15:51 +0100)] 
samba-tool: Optionally hide disabled/expired accounts in "group listmembers"

  --hide-expired        Do not list expired group members
  --hide-disabled       Do not list disabled group members

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 15 16:34:11 UTC 2021 on sn-devel-184

5 years agosamba-tool: Optionally hide disabled/expired accounts in "user list"
Björn Baumbach [Wed, 23 Dec 2020 12:00:34 +0000 (13:00 +0100)] 
samba-tool: Optionally hide disabled/expired accounts in "user list"

  --hide-expired        Do not list expired user accounts
  --hide-disabled       Do not list disabled user accounts

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agodoc/samba-tool: describe command parameters for "user list" command
Björn Baumbach [Wed, 23 Dec 2020 15:39:55 +0000 (16:39 +0100)] 
doc/samba-tool: describe command parameters for "user list" command

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agodoc/samba-tool: describe command parameters for "group listmembers" command
Björn Baumbach [Wed, 23 Dec 2020 15:48:31 +0000 (16:48 +0100)] 
doc/samba-tool: describe command parameters for "group listmembers" command

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agolibcli/smb: allow unexpected padding in SMB2 IOCTL responses
Stefan Metzmacher [Thu, 14 Jan 2021 16:32:15 +0000 (17:32 +0100)] 
libcli/smb: allow unexpected padding in SMB2 IOCTL responses

A NetApp Ontap 7.3.7 SMB server add 8 padding bytes to an
offset that's already 8 byte aligned.

RN: Work around special SMB2 IOCTL response behavior of NetApp Ontap 7.3.7
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14607

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Jan 15 08:36:34 UTC 2021 on sn-devel-184

5 years agosmbd: implement FSCTL_SMBTORTURE_IOCTL_RESPONSE_BODY_PADDING8 as reproducer for bug...
Stefan Metzmacher [Thu, 14 Jan 2021 16:39:01 +0000 (17:39 +0100)] 
smbd: implement FSCTL_SMBTORTURE_IOCTL_RESPONSE_BODY_PADDING8 as reproducer for bug 14607

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agos4:torture/smb2: add samba3.smb2.ioctl.bug14607
Stefan Metzmacher [Thu, 14 Jan 2021 16:39:18 +0000 (17:39 +0100)] 
s4:torture/smb2: add samba3.smb2.ioctl.bug14607

FSCTL_SMBTORTURE_IOCTL_RESPONSE_BODY_PADDING8 will be used
to trigger an SMB2 IOCTL response with extra padding.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agolibcli/smb: split out smb2cli_ioctl_parse_buffer()
Stefan Metzmacher [Thu, 14 Jan 2021 16:27:21 +0000 (17:27 +0100)] 
libcli/smb: split out smb2cli_ioctl_parse_buffer()

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

Pair-Programmed-With: Volker Lendecke <vl@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Volker Lendecke <vl@samba.org>
5 years agolibcli/smb: Allow smb2cli_validate_negotiate_info_done() to ignore NT_STATUS_INVALID_...
Jeremy Allison [Wed, 6 Jan 2021 17:03:05 +0000 (09:03 -0800)] 
libcli/smb: Allow smb2cli_validate_negotiate_info_done() to ignore NT_STATUS_INVALID_PARAMETER.

This can be returned from NetApp Ontap 7.3.7 SMB server
implementations. Now we have ensured smb2_signing_check_pdu()
cannot return NT_STATUS_INVALID_PARAMETER on a signing error
it's safe to check this error code here. Windows 10
clients ignore this error from the NetApp.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agolibcli/smb: Change some checks to SMB_ASSERTS
Stefan Metzmacher [Mon, 11 Jan 2021 09:01:39 +0000 (10:01 +0100)] 
libcli/smb: Change some checks to SMB_ASSERTS

If we end up here, it's definitely a programming error in the basic
parsing layer of the SMB2 packet.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
5 years agovfs: The New VFS
Ralph Boehme [Wed, 9 Dec 2020 21:04:31 +0000 (13:04 -0800)] 
vfs: The New VFS

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jan 14 19:00:05 UTC 2021 on sn-devel-184

5 years agosmbd: inherit st_ex_mode to basename from stream name in create_file_unixpath()
Ralph Boehme [Tue, 12 Jan 2021 11:23:38 +0000 (12:23 +0100)] 
smbd: inherit st_ex_mode to basename from stream name in create_file_unixpath()

This ensures smb_fname_base knows if it's a file or directory.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agosmbd: call vfs_stat() in mkdir_internal()
Ralph Boehme [Tue, 12 Jan 2021 11:03:33 +0000 (12:03 +0100)] 
smbd: call vfs_stat() in mkdir_internal()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agoprinting: call vfs_stat() in driver_unlink_internals()
Ralph Boehme [Tue, 12 Jan 2021 11:03:02 +0000 (12:03 +0100)] 
printing: call vfs_stat() in driver_unlink_internals()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibadouble: assert valid stat in ad_unconvert_get_streams()
Ralph Boehme [Tue, 12 Jan 2021 11:02:40 +0000 (12:02 +0100)] 
libadouble: assert valid stat in ad_unconvert_get_streams()

All callers already stat the path, just add a check that asserts this.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibadouble: call vfs_stat() in ad_convert_finderinfo()
Ralph Boehme [Tue, 12 Jan 2021 10:59:33 +0000 (11:59 +0100)] 
libadouble: call vfs_stat() in ad_convert_finderinfo()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agolibadouble: call vfs_stat() in ad_convert_xattr()
Ralph Boehme [Tue, 12 Jan 2021 10:59:02 +0000 (11:59 +0100)] 
libadouble: call vfs_stat() in ad_convert_xattr()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agopysmbd: call vfs_stat() in set_sys_acl_conn()
Ralph Boehme [Tue, 12 Jan 2021 10:58:41 +0000 (11:58 +0100)] 
pysmbd: call vfs_stat() in set_sys_acl_conn()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
5 years agos3/rpc_server: add deps of rpc_mdssvc_module
Ralph Boehme [Thu, 7 Jan 2021 14:51:26 +0000 (15:51 +0100)] 
s3/rpc_server: add deps of rpc_mdssvc_module

This allows removing allow_undefined_symbols=True.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Thu Jan 14 16:05:10 UTC 2021 on sn-devel-184

5 years agorpc_server: Remove protocol-specific dcerpc_setup_ routines
Volker Lendecke [Tue, 12 Jan 2021 16:53:57 +0000 (17:53 +0100)] 
rpc_server: Remove protocol-specific dcerpc_setup_ routines

These are all just stream sockets, being taken care of by
dcesrv_setup_ncacn_listener()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Jan 14 14:35:58 UTC 2021 on sn-devel-184

5 years agorpc_server: Use dcesrv_setup_ncacn_listener() in dcesrv_setup_endpoint_sockets()
Volker Lendecke [Tue, 12 Jan 2021 16:36:44 +0000 (17:36 +0100)] 
rpc_server: Use dcesrv_setup_ncacn_listener() in dcesrv_setup_endpoint_sockets()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Add dcesrv_setup_ncacn_listener()
Volker Lendecke [Tue, 12 Jan 2021 15:48:25 +0000 (16:48 +0100)] 
rpc_server: Add dcesrv_setup_ncacn_listener()

This is supposed to replace the protocol-specific dcerpc_setup_*
functions. They are all very similar except the way to create the
socket file descriptor. By handing out the anonymous structure
"listen_state" for an error path the listener tevent_fd structs can be
cancelled individually or handed over to other talloc parents.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Move setting ip-based socket options
Volker Lendecke [Tue, 12 Jan 2021 16:03:42 +0000 (17:03 +0100)] 
rpc_server: Move setting ip-based socket options

All ncacn_ip_tcp listener sockets are created via
dcesrv_create_ncacn_ip_tcp_socket(). Moving setting the socket options
out of dcesrv_setup_ncacn_ip_tcp_socket() to remove a special case for
TCP from the dcesrv_setup_* family of routines.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Direct pointer initialization in dcesrv_ncacn_np_accept_done()
Volker Lendecke [Tue, 12 Jan 2021 15:57:59 +0000 (16:57 +0100)] 
rpc_server: Direct pointer initialization in dcesrv_ncacn_np_accept_done()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agolib: Initialize variables in prefork_listen_accept_handler()
Volker Lendecke [Mon, 11 Jan 2021 14:36:11 +0000 (15:36 +0100)] 
lib: Initialize variables in prefork_listen_accept_handler()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agolib: Fix typos
Volker Lendecke [Mon, 11 Jan 2021 14:23:41 +0000 (15:23 +0100)] 
lib: Fix typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Make dcerpc_ncacn_accept() take tsocket_address **
Volker Lendecke [Tue, 12 Jan 2021 08:26:24 +0000 (09:26 +0100)] 
rpc_server: Make dcerpc_ncacn_accept() take tsocket_address **

dcerpc_ncacn_accept() talloc_move's the addresses away from the
caller's talloc hierarchy. Don't leave pointers around in the caller.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agotsocket: Fix a few typos
Volker Lendecke [Tue, 12 Jan 2021 08:25:45 +0000 (09:25 +0100)] 
tsocket: Fix a few typos

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Remove unused make_server_pipes_struct()
Volker Lendecke [Mon, 11 Jan 2021 20:37:08 +0000 (21:37 +0100)] 
rpc_server: Remove unused make_server_pipes_struct()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Use make_base_pipes_struct() in make_internal_rpc_pipe_socketpair()
Volker Lendecke [Mon, 11 Jan 2021 20:35:26 +0000 (21:35 +0100)] 
rpc_server: Use make_base_pipes_struct() in make_internal_rpc_pipe_socketpair()

make_server_pipes_struct() is just a simple wrapper.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>
5 years agorpc_server: Use make_base_pipes_struct() in dcesrv_ncacn_accept_step2()
Volker Lendecke [Mon, 11 Jan 2021 20:32:52 +0000 (21:32 +0100)] 
rpc_server: Use make_base_pipes_struct() in dcesrv_ncacn_accept_step2()

make_server_pipes_struct() is just a simple wrapper.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Samuel Cabrero <scabrero@samba.org>