[SCM] Samba Shared Repository - branch master updated

2021-12-09 Thread Ralph Böhme
The branch, master has been updated
   via  bd98e040d4a Update WHATSNEW.txt with removal of wildcard copy, 
rename and unlink.
   via  4ac91bd065c s3: smbd: Remove 'const char *src_original_lcomp' from 
reply_mv().
   via  5190a8bd821 s3: smbd: Remove 'const char *src_original_lcomp' 
parameter from rename_internals().
   via  7ac844ce92a s3: smbd: Inside rename_internals() remove '{ ... }' 
block around singleton rename code.
   via  fe92aaa962a s3: smbd: Remove the commented out resolve_wildcards().
   via  ff722c0fdfb s3: smbd: Remove all wildcard code from 
rename_internals().
   via  3cb5ef1c798 s3: smbd: Remove dest_has_wild and all associated code 
from rename_internals()
   via  885a982b9fd s3: smbd: Prepare to remove wildcard matching from 
rename_internals().
   via  de90620bec5 s3: smbd: In reply_ntrename() remove 'bool 
dest_has_wcard' and all uses.
   via  f44fc91505a s3: smbd: In reply_ntrename(), never set dest_has_wcard.
   via  e66148c8741 s3: smbd: In reply_ntrename() remove the 
UCF_ALWAYS_ALLOW_WCARD_LCOMP flag for destination lookups.
   via  ff4bbb1279a s3: smbd: In SMBntrename (0xa5) prevent wildcards in 
destination name.
   via  f67f25bcf02 s3: smbd: In smb_file_rename_information() 
(SMB_FILE_RENAME_INFORMATION info level) prevent destination wildcards.
   via  4cfe055ca7e s3: smbd: Remove UCF_ALWAYS_ALLOW_WCARD_LCOMP flag from 
pathname processing in reply_mv().
   via  098d63a219c s3: smbd: Remove 'bool has_wild' parameter from 
unlink_internals().
   via  42985702df0 s3: smbd: Change unlink_internals() to ignore has_wild 
parameter.
   via  f46445cb6ae s3: smbd: In reply_unlink() remove the possibility of 
receiving a wildcard name.
   via  7f61ff777b1 s3: smbd: Remove support for SMBcopy SMB_COM_COPY (0x29)
   via  d2aae105c61 s3: torture: Remove the wildcard unlink test code.
   via  fb4e998346d s4: torture: Remove the wildcard rename test code.
   via  3c9a33ca346 s4: torture: Remove the wildcard unlink test code.
   via  ef1d9d31bc3 s3: torture: In run_smb1_wild_mangle_unlink_test() use 
a valid pathname for rename target.
   via  78ee275c734 s3: torture: In torture_mangle(), use torture_deltree() 
for setup and cleanup.
   via  6cb9f127e1f s3: torture: In test_mask(), use torture_deltree() for 
setup.
   via  9398655cfdd s3: torture: In run_streamerror(), use 
torture_deltree() for setup.
   via  5a802ae2d31 s3: torture: In torture_chkpath_test(), use 
torture_deltree() for setup and cleanup.
   via  1eeabbf8401 s3: torture: In torture_casetable(), use 
torture_deltree() for setup and cleanup.
   via  498b3d923cd s3: torture: In torture_utable(), use torture_deltree() 
for setup.
   via  7ffc03d5e7d s3: torture: In run_smb1_wild_mangle_rename_test() use 
torture_deltree() for setup and cleanup.
   via  3a73178fe48 s3: torture: In run_smb1_wild_mangle_unlink_test() use 
torture_deltree() for setup and cleanup.
   via  a0bfb37b4be s3: torture: Add torture_deltree() for setup and 
teardown.
   via  770d8375fca s4: libcli: smbcli_unlink() is no longer used with 
wildcard patterns.
   via  3a42b351364 s4: torture: Use smbcli_unlink_wcard() to setup and 
cleanup in masktest.
   via  367dc3cb597 s4: torture: Use smbcli_unlink_wcard() in 
base.casetable test.
   via  c697ad1e389 s4: torture: Use smbcli_unlink_wcard() to cleanup in 
base.mangle test.
   via  78102894931 s4: torture: Use smbcli_unlink_wcard() to remove 
wildcards in base.chkpath test.
   via  35d8b146655 s4: torture: In raw.notify test use 
smbcli_unlink_wcard() in place of smbcli_unlink().
   via  5b7ff5a9d00 s4: libcli: In smbcli_deltree() use 
smbcli_unlink_wcard() in place of smbcli_unlink().
   via  3d0857c9ec2 s4: libcli: Add smbcli_unlink_wcard().
  from  e2b7a2f7811 s4-auth: Remove unused headers

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit bd98e040d4a4a24cc2be5bb9cfde5ebbe575ce52
Author: Jeremy Allison 
Date:   Tue Dec 7 10:25:38 2021 -0800

Update WHATSNEW.txt with removal of wildcard copy, rename and unlink.

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Thu Dec  9 18:57:15 UTC 2021 on sn-devel-184

commit 4ac91bd065cee699cdb4daeff719d02464d75326
Author: Jeremy Allison 
Date:   Wed Dec 1 16:40:55 2021 -0800

s3: smbd: Remove 'const char *src_original_lcomp' from reply_mv().

No longer used.

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph Boehme 

commit 5190a8bd8211f93b11409ae2ba5fbe365b1a8390
Author: Jeremy Allison 
Date:   Wed Dec 1 16:39:42 2021 -0800

s3: smbd: Remove 'const char *src_original_lcomp' parameter from 
rename_internals().

No longer used.

Signed-off-by: Jeremy Allison 
Reviewed-by: Ralph 

[SCM] Samba Shared Repository - branch master updated

2021-12-09 Thread Stefan Metzmacher
The branch, master has been updated
   via  e2b7a2f7811 s4-auth: Remove unused headers
   via  1bacf26d30a auth/credentials: Fix cli_credentials_shallow_ccache 
error case
   via  ce293eb861b auth/credentials: Handle ENOENT when obtaining ccache 
lifetime
  from  102ad9ee6a0 librpc: match gensec_gssapi and call 
gsskrb5_set_dns_canonicalize() for Heimdal

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -
commit e2b7a2f78117e20739aa4f895ce68825e160d451
Author: Andrew Bartlett 
Date:   Wed Dec 8 15:30:02 2021 +1300

s4-auth: Remove unused headers

These changes were submitted in a patch by
Stefan Metzmacher  in his lorikeet-heimdal
import branch of patches to upgrade to a modern Heimdal.

Signed-off-by: Andrew Bartlett 
Signed-off-by: Stefan Metzmacher 

Autobuild-User(master): Stefan Metzmacher 
Autobuild-Date(master): Thu Dec  9 14:14:12 UTC 2021 on sn-devel-184

commit 1bacf26d30adc89348786bff7b9e2fe6d6f43856
Author: Stefan Metzmacher 
Date:   Fri Apr 3 15:29:32 2020 +0200

auth/credentials: Fix cli_credentials_shallow_ccache error case

Avoid dangling values if something fails...

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Joseph Sutton 

commit ce293eb861b2fc6c7a88cf67664c91735bf49d44
Author: Stefan Metzmacher 
Date:   Fri Apr 3 15:27:45 2020 +0200

auth/credentials: Handle ENOENT when obtaining ccache lifetime

The new Heimdal may return ENOENT instead of KRB5_CC_END.

Signed-off-by: Stefan Metzmacher 
Reviewed-by: Joseph Sutton 

---

Summary of changes:
 auth/credentials/credentials_krb5.c   | 13 +
 source4/auth/kerberos/kerberos.h  |  1 -
 source4/auth/kerberos/krb5_init_context.c |  1 -
 3 files changed, 9 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/auth/credentials/credentials_krb5.c 
b/auth/credentials/credentials_krb5.c
index d2e7a76a69e..e69e1a83b3c 100644
--- a/auth/credentials/credentials_krb5.c
+++ b/auth/credentials/credentials_krb5.c
@@ -686,7 +686,7 @@ _PUBLIC_ int cli_credentials_get_named_ccache(struct 
cli_credentials *cred,
bool expired = false;
ret = 
smb_krb5_cc_get_lifetime(cred->ccache->smb_krb5_context->krb5_context,
   cred->ccache->ccache, );
-   if (ret == KRB5_CC_END) {
+   if (ret == KRB5_CC_END || ret == ENOENT) {
/* If we have a particular ccache set, without
 * an initial ticket, then assume there is a
 * good reason */
@@ -1060,15 +1060,22 @@ static int cli_credentials_shallow_ccache(struct 
cli_credentials *cred)
 {
krb5_error_code ret;
const struct ccache_container *old_ccc = NULL;
+   enum credentials_obtained old_obtained;
struct ccache_container *ccc = NULL;
char *ccache_name = NULL;
krb5_principal princ;
 
+   old_obtained = cred->ccache_obtained;
old_ccc = cred->ccache;
if (old_ccc == NULL) {
return 0;
}
 
+   cred->ccache = NULL;
+   cred->ccache_obtained = CRED_UNINITIALISED;
+   cred->client_gss_creds = NULL;
+   cred->client_gss_creds_obtained = CRED_UNINITIALISED;
+
ret = krb5_cc_get_principal(
old_ccc->smb_krb5_context->krb5_context,
old_ccc->ccache,
@@ -1077,7 +1084,6 @@ static int cli_credentials_shallow_ccache(struct 
cli_credentials *cred)
/*
 * This is an empty ccache. No point in copying anything.
 */
-   cred->ccache = NULL;
return 0;
}
krb5_free_principal(old_ccc->smb_krb5_context->krb5_context, princ);
@@ -1110,8 +1116,7 @@ static int cli_credentials_shallow_ccache(struct 
cli_credentials *cred)
}
 
cred->ccache = ccc;
-   cred->client_gss_creds = NULL;
-   cred->client_gss_creds_obtained = CRED_UNINITIALISED;
+   cred->ccache_obtained = old_obtained;
return ret;
 }
 
diff --git a/source4/auth/kerberos/kerberos.h b/source4/auth/kerberos/kerberos.h
index 1dd63acc838..33ee4f301ed 100644
--- a/source4/auth/kerberos/kerberos.h
+++ b/source4/auth/kerberos/kerberos.h
@@ -27,7 +27,6 @@
 #include "auth/kerberos/krb5_init_context.h"
 #include "librpc/gen_ndr/krb5pac.h"
 #include "lib/krb5_wrap/krb5_samba.h"
-#include "lib/krb5_wrap/gss_samba.h"
 
 struct auth_user_info_dc;
 struct cli_credentials;
diff --git a/source4/auth/kerberos/krb5_init_context.c 
b/source4/auth/kerberos/krb5_init_context.c
index 639718cb6a6..616eebc968e 100644
--- a/source4/auth/kerberos/krb5_init_context.c
+++ b/source4/auth/kerberos/krb5_init_context.c
@@ -22,7 +22,6 @@
 
 #include "includes.h"
 #include "system/kerberos.h"
-#include