[SCM] Samba Shared Repository - branch master updated

2021-08-05 Thread Ralph Böhme
The branch, master has been updated
   via  7e6b818fea5 ktutil: Print the numeric enctype if 
krb5_enctype_to_string() fails
  from  4d44db0208a docs: Add vfs_expand_msdfs manpage

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


- Log -
commit 7e6b818fea5541fbedaa68624ca76ebc1fbbf501
Author: Andrew Bartlett 
Date:   Mon Aug 2 11:21:51 2021 +1200

ktutil: Print the numeric enctype if krb5_enctype_to_string() fails

Sadly krb5_enctype_to_string() fails when des-cbc-crc encyrption
type is removed, leaving a failure the operate rather than
falling back to anything useful.

So fall back to printing 3 in the absense of anything more
useful.  A future fix could be to hard-code this mapping
in the smb_krb5_enctype_to_string() wrapper.

Signed-off-by: Andrew Bartlett 
Reviewed-by: Ralph Boehme 

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Fri Aug  6 05:53:44 UTC 2021 on sn-devel-184

---

Summary of changes:
 source4/kdc/ktutil.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/ktutil.c b/source4/kdc/ktutil.c
index 59aa1cf377f..732d247446c 100644
--- a/source4/kdc/ktutil.c
+++ b/source4/kdc/ktutil.c
@@ -96,11 +96,11 @@ int main (int argc, char **argv)
 enctype,
 _str);
if (ret) {
-   smb_krb5_err(mem_ctx, context, 1, ret, 
"krb5_enctype_to_string");
+   printf("%s (%d)\n", principal, (int)enctype);
+   } else {
+   printf("%s (%s)\n", principal, enctype_str);
}
 
-   printf("%s (%s)\n", principal, enctype_str);
-
TALLOC_FREE(principal);
SAFE_FREE(enctype_str);
smb_krb5_kt_free_entry(context, );


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2021-08-05 Thread Jeremy Allison
The branch, master has been updated
   via  4d44db0208a docs: Add vfs_expand_msdfs manpage
  from  104fc353909 mit-samba: Only set the function opening bracket once

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


- Log -
commit 4d44db0208ad604b270d8659e2c5d4a079941423
Author: Volker Lendecke 
Date:   Thu Aug 5 12:58:52 2021 +0200

docs: Add vfs_expand_msdfs manpage

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12707

Signed-off-by: Volker Lendecke 
Reviewed-by: Jeremy Allison 

Autobuild-User(master): Jeremy Allison 
Autobuild-Date(master): Thu Aug  5 18:09:11 UTC 2021 on sn-devel-184

---

Summary of changes:
 ...vfs_extd_audit.8.xml => vfs_expand_msdfs.8.xml} | 43 +++---
 docs-xml/wscript_build |  1 +
 2 files changed, 23 insertions(+), 21 deletions(-)
 copy docs-xml/manpages/{vfs_extd_audit.8.xml => vfs_expand_msdfs.8.xml} (54%)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages/vfs_extd_audit.8.xml 
b/docs-xml/manpages/vfs_expand_msdfs.8.xml
similarity index 54%
copy from docs-xml/manpages/vfs_extd_audit.8.xml
copy to docs-xml/manpages/vfs_expand_msdfs.8.xml
index 378fde0f665..34f92c69788 100644
--- a/docs-xml/manpages/vfs_extd_audit.8.xml
+++ b/docs-xml/manpages/vfs_expand_msdfs.8.xml
@@ -1,9 +1,9 @@
 
 http://www.samba.org/samba/DTD/samba-doc;>
-
+
 
 
-   vfs_extd_audit
+   vfs_expand_msdfs
8
Samba
System Administration tools
@@ -12,13 +12,13 @@
 
 
 
-   vfs_extd_audit
-   record selected Samba VFS operations
+   vfs_expand_msdfs
+   Expand msdfs links depending on client IP
 
 
 

-   vfs objects = extd_audit
+   vfs objects = expand_msdfs

 
 
@@ -29,28 +29,29 @@
samba
7 suite.
 
-   The extd_audit VFS module records selected
-   client operations to both the
-   smbd
-   8 log and
-   system log (using
-   syslog
-   3).
+   With this module, the link target is not directly a
+   server and share, but this module expects the target to
+   reference a file, containing a table. The file is referenced
+   by means of the msdfs symlink target according to
+   msdfs:@table-filename@/share. The file table-filename is
+   supposed to contain a list of destinations that are looked at
+   from top to bottom:
 
-   Other than logging to the
-   smbd
-   8 log,
-   vfs_extd_audit is identical to
-   vfs_audit
-   8.
-   
-
-   This module is stackable.
+   
+192.168.234 local.samba.org
+192.168 remote.samba.org
+ default.samba.org
+   
 
+   With this, clients from network 192.168.234/24 are
+   redirected to host local.samba.org, clients from 192.168/16
+   are redirected to remote.samba.org and all other clients go to
+   default.samba.org.
 
 
 
VERSION
+
This man page is part of version  of the Samba suite.

 
diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build
index 5ddb8ded615..358ba8d010a 100644
--- a/docs-xml/wscript_build
+++ b/docs-xml/wscript_build
@@ -81,6 +81,7 @@ vfs_module_manpages = ['vfs_acl_tdb',
'vfs_crossrename',
'vfs_default_quota',
'vfs_dirsort',
+   'vfs_expand_msdfs',
'vfs_extd_audit',
'vfs_fake_perms',
'vfs_fileid',


-- 
Samba Shared Repository



[SCM] Samba Shared Repository - branch master updated

2021-08-05 Thread Andreas Schneider
The branch, master has been updated
   via  104fc353909 mit-samba: Only set the function opening bracket once
   via  60159e03850 mit-samba: Use talloc_get_type_abort() instead of 
casting
   via  dd8138236be mit-samba: Send the logging to the kdc log facility
   via  41d906301b8 mit-samba: Define debug class for kdb module
  from  4f093ae6c9e s3: VFS: ceph. Fix enumerating directories. 
dirfsp->fh->fd != AT_FDCWD in this case.

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


- Log -
commit 104fc3539090ae9e161945ef9d18d897e3b71fed
Author: Andreas Schneider 
Date:   Thu Jul 15 08:48:37 2021 +0200

mit-samba: Only set the function opening bracket once

Reviewed-by: Andrew Bartlett 

Autobuild-User(master): Andreas Schneider 
Autobuild-Date(master): Thu Aug  5 10:33:18 UTC 2021 on sn-devel-184

commit 60159e03850f88cdee332ba65939cfe4582cb5e1
Author: Andreas Schneider 
Date:   Mon Jul 12 13:05:59 2021 +0200

mit-samba: Use talloc_get_type_abort() instead of casting

This is safer to use and fixes compiler warnings.

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

commit dd8138236bec3635c25e5b482b7a14faa0a9c36b
Author: Andreas Schneider 
Date:   Mon Jun 11 16:15:10 2018 +0200

mit-samba: Send the logging to the kdc log facility

Reviewed-by: Andrew Bartlett 

commit 41d906301b8d13f831b155dcec37d9b9f36c
Author: Andreas Schneider 
Date:   Wed Jul 14 12:49:11 2021 +0200

mit-samba: Define debug class for kdb module

Signed-off-by: Andreas Schneider 
Reviewed-by: Andrew Bartlett 

---

Summary of changes:
 source4/kdc/mit-kdb/kdb_samba_change_pwd.c |  3 +++
 source4/kdc/mit-kdb/kdb_samba_common.c |  3 +++
 source4/kdc/mit-kdb/kdb_samba_masterkey.c  |  3 +++
 source4/kdc/mit-kdb/kdb_samba_pac.c|  3 +++
 source4/kdc/mit-kdb/kdb_samba_policies.c   |  6 +++--
 source4/kdc/mit-kdb/kdb_samba_principals.c |  3 +++
 source4/kdc/mit_samba.c| 37 ++
 7 files changed, 46 insertions(+), 12 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/mit-kdb/kdb_samba_change_pwd.c 
b/source4/kdc/mit-kdb/kdb_samba_change_pwd.c
index e0264cb4f09..ad7bb5d54ea 100644
--- a/source4/kdc/mit-kdb/kdb_samba_change_pwd.c
+++ b/source4/kdc/mit-kdb/kdb_samba_change_pwd.c
@@ -30,6 +30,9 @@
 #include "kdc/mit_samba.h"
 #include "kdb_samba.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_KERBEROS
+
 krb5_error_code kdb_samba_change_pwd(krb5_context context,
 krb5_keyblock *master_key,
 krb5_key_salt_tuple *ks_tuple,
diff --git a/source4/kdc/mit-kdb/kdb_samba_common.c 
b/source4/kdc/mit-kdb/kdb_samba_common.c
index e89aed6aeba..35cac193a44 100644
--- a/source4/kdc/mit-kdb/kdb_samba_common.c
+++ b/source4/kdc/mit-kdb/kdb_samba_common.c
@@ -30,6 +30,9 @@
 #include "kdc/mit_samba.h"
 #include "kdb_samba.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_KERBEROS
+
 struct mit_samba_context *ks_get_context(krb5_context kcontext)
 {
void *db_ctx;
diff --git a/source4/kdc/mit-kdb/kdb_samba_masterkey.c 
b/source4/kdc/mit-kdb/kdb_samba_masterkey.c
index 2c4fe72d8c2..b068d964735 100644
--- a/source4/kdc/mit-kdb/kdb_samba_masterkey.c
+++ b/source4/kdc/mit-kdb/kdb_samba_masterkey.c
@@ -31,6 +31,9 @@
 #include "kdc/mit_samba.h"
 #include "kdb_samba.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_KERBEROS
+
 krb5_error_code kdb_samba_fetch_master_key(krb5_context context,
   krb5_principal name,
   krb5_keyblock *key,
diff --git a/source4/kdc/mit-kdb/kdb_samba_pac.c 
b/source4/kdc/mit-kdb/kdb_samba_pac.c
index 15497603b10..75b05a62a07 100644
--- a/source4/kdc/mit-kdb/kdb_samba_pac.c
+++ b/source4/kdc/mit-kdb/kdb_samba_pac.c
@@ -30,6 +30,9 @@
 #include "kdc/mit_samba.h"
 #include "kdb_samba.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_KERBEROS
+
 krb5_error_code kdb_samba_dbekd_decrypt_key_data(krb5_context context,
 const krb5_keyblock *mkey,
 const krb5_key_data *key_data,
diff --git a/source4/kdc/mit-kdb/kdb_samba_policies.c 
b/source4/kdc/mit-kdb/kdb_samba_policies.c
index 9197551ed61..c431567a7f4 100644
--- a/source4/kdc/mit-kdb/kdb_samba_policies.c
+++ b/source4/kdc/mit-kdb/kdb_samba_policies.c
@@ -30,6 +30,9 @@
 #include "kdc/mit_samba.h"
 #include "kdb_samba.h"
 
+#undef DBGC_CLASS
+#define DBGC_CLASS DBGC_KERBEROS
+
 /* FIXME: This is a krb5 function which is exported, but in no header */
 extern krb5_error_code decode_krb5_padata_sequence(const krb5_data *output,
   krb5_pa_data ***rep);
@@ -301,7 +304,6 @@ 

[SCM] Samba Shared Repository - branch master updated

2021-08-05 Thread Ralph Böhme
The branch, master has been updated
   via  4f093ae6c9e s3: VFS: ceph. Fix enumerating directories. 
dirfsp->fh->fd != AT_FDCWD in this case.
  from  000f389d09e gitlab: Use shorter names for Samba AD DC env with MIT 
KRB5

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


- Log -
commit 4f093ae6c9ee5b3e0f98b47fbacb0e37fad62052
Author: Jeremy Allison 
Date:   Fri Jul 16 18:53:24 2021 -0700

s3: VFS: ceph. Fix enumerating directories. dirfsp->fh->fd != AT_FDCWD in 
this case.

Same as the fix for glusterfs.

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

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

Autobuild-User(master): Ralph Böhme 
Autobuild-Date(master): Thu Aug  5 06:15:14 UTC 2021 on sn-devel-184

---

Summary of changes:
 source3/modules/vfs_ceph.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_ceph.c b/source3/modules/vfs_ceph.c
index 594ebce4b9a..3f55d724143 100644
--- a/source3/modules/vfs_ceph.c
+++ b/source3/modules/vfs_ceph.c
@@ -403,14 +403,23 @@ static int cephwrap_openat(struct vfs_handle_struct 
*handle,
   int flags,
   mode_t mode)
 {
+   struct smb_filename *name = NULL;
bool have_opath = false;
bool became_root = false;
int result = -ENOENT;
 
/*
-* cephfs API doesn't have ceph_openat(), so for now assert this.
+* ceph doesn't have openat().
 */
-   SMB_ASSERT(fsp_get_pathref_fd(dirfsp) == AT_FDCWD);
+   if (fsp_get_pathref_fd(dirfsp) != AT_FDCWD) {
+   name = full_path_from_dirfsp_atname(talloc_tos(),
+   dirfsp,
+   smb_fname);
+   if (name == NULL) {
+   return -1;
+   }
+   smb_fname = name;
+   }
 
DBG_DEBUG("[CEPH] openat(%p, %s, %p, %d, %d)\n", handle,
  smb_fname_str_dbg(smb_fname), fsp, flags, mode);
@@ -438,6 +447,7 @@ static int cephwrap_openat(struct vfs_handle_struct *handle,
}
 
 out:
+   TALLOC_FREE(name);
fsp->fsp_flags.have_proc_fds = false;
DBG_DEBUG("[CEPH] open(...) = %d\n", result);
WRAP_RETURN(result);


-- 
Samba Shared Repository