diff --git a/.gitignore b/.gitignore index 1b087cf..99161ff 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/gpgkey-52FBC0B86D954B0843324CDC6F33915B6568B7EA.gpg -SOURCES/samba-4.9.1.tar.xz +SOURCES/samba-4.10.4.tar.xz diff --git a/.samba.metadata b/.samba.metadata index 638f3b8..1e4e8c9 100644 --- a/.samba.metadata +++ b/.samba.metadata @@ -1,2 +1,2 @@ 6bf33724c18b74427453f0e3fc0180f84ff60818 SOURCES/gpgkey-52FBC0B86D954B0843324CDC6F33915B6568B7EA.gpg -81b7c9a13d48fa25c58c90ae85e7d256e9952227 SOURCES/samba-4.9.1.tar.xz +c24e15add96d79950552f0ffbb44234e4142342c SOURCES/samba-4.10.4.tar.xz diff --git a/SOURCES/README.dc b/SOURCES/README.dc deleted file mode 100644 index d67a556..0000000 --- a/SOURCES/README.dc +++ /dev/null @@ -1,12 +0,0 @@ -MIT Kerberos 5 Support -======================= - -Fedora is using MIT Kerberos implementation as its Kerberos infrastructure of -choice. The Samba build in Fedora is using MIT Kerberos implementation in order -to allow system-wide interoperability between both desktop and server -applications running on the same machine. - -In this build the Active Directory support has been disabled. - -In case of further questions do not hesitate to send your inquiries to -samba-owner@fedoraproject.org diff --git a/SOURCES/samba-4.10-fix_smbspool.patch b/SOURCES/samba-4.10-fix_smbspool.patch new file mode 100644 index 0000000..fa12f06 --- /dev/null +++ b/SOURCES/samba-4.10-fix_smbspool.patch @@ -0,0 +1,1127 @@ +From 16056895403f3c673dc5adc531b7e739d46292fb Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Mon, 13 May 2019 16:55:49 +0200 +Subject: [PATCH 1/9] s3:smbspool: Add the 'lp' group to the users groups + +This is required to access files in /var/spool/cups which have been +temporarily created in there by CUPS. + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 6086efb6808089c431e7307fa239924bfda1185b) +--- + source3/client/smbspool_krb5_wrapper.c | 22 ++++++++++++++++++++++ + 1 file changed, 22 insertions(+) + +diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c +index 5c4da33238b..e6684fc0d0c 100644 +--- a/source3/client/smbspool_krb5_wrapper.c ++++ b/source3/client/smbspool_krb5_wrapper.c +@@ -82,6 +82,7 @@ int main(int argc, char *argv[]) + { + char smbspool_cmd[PATH_MAX] = {0}; + struct passwd *pwd; ++ struct group *g = NULL; + char gen_cc[PATH_MAX] = {0}; + struct stat sb; + char *env = NULL; +@@ -89,6 +90,7 @@ int main(int argc, char *argv[]) + char device_uri[4096] = {0}; + uid_t uid = (uid_t)-1; + gid_t gid = (gid_t)-1; ++ gid_t groups[1] = { (gid_t)-1 }; + unsigned long tmp; + int cmp; + int rc; +@@ -176,6 +178,26 @@ int main(int argc, char *argv[]) + return CUPS_BACKEND_FAILED; + } + ++ /* ++ * We need the primary group of the 'lp' user. This is needed to access ++ * temporary files in /var/spool/cups/. ++ */ ++ g = getgrnam("lp"); ++ if (g == NULL) { ++ CUPS_SMB_ERROR("Failed to find user 'lp' - %s", ++ strerror(errno)); ++ return CUPS_BACKEND_FAILED; ++ } ++ ++ CUPS_SMB_DEBUG("Adding group 'lp' (%u)", g->gr_gid); ++ groups[0] = g->gr_gid; ++ rc = setgroups(sizeof(groups), groups); ++ if (rc != 0) { ++ CUPS_SMB_ERROR("Failed to set groups for 'lp' - %s", ++ strerror(errno)); ++ return CUPS_BACKEND_FAILED; ++ } ++ + CUPS_SMB_DEBUG("Switching to gid=%d", gid); + rc = setgid(gid); + if (rc != 0) { +-- +2.21.0 + + +From a6b29458e833db85057ef1b7c0403e90f76adfa4 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 16 May 2019 13:41:02 +0200 +Subject: [PATCH 2/9] s3:smbspool: Print the principal we use to authenticate + with + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 42492d547661cb7a98c237b32d42ee93de35aba5) +--- + source3/client/smbspool.c | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c +index 22071613677..efbdd418fdb 100644 +--- a/source3/client/smbspool.c ++++ b/source3/client/smbspool.c +@@ -616,6 +616,7 @@ static bool kerberos_ccache_is_valid(void) { + return false; + } else { + krb5_principal default_princ = NULL; ++ char *princ_name = NULL; + + code = krb5_cc_get_principal(ctx, + ccache, +@@ -625,6 +626,16 @@ static bool kerberos_ccache_is_valid(void) { + krb5_free_context(ctx); + return false; + } ++ ++ code = krb5_unparse_name(ctx, ++ default_princ, ++ &princ_name); ++ if (code == 0) { ++ fprintf(stderr, ++ "DEBUG: Try to authenticate as %s\n", ++ princ_name); ++ krb5_free_unparsed_name(ctx, princ_name); ++ } + krb5_free_principal(ctx, default_princ); + } + krb5_cc_close(ctx, ccache); +-- +2.21.0 + + +From b64ed8bb51c7c78d757881fc3944f7bc812f5457 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 16 May 2019 14:25:00 +0200 +Subject: [PATCH 3/9] s3:smbspool: Add debug for finding KRB5CCNAME + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 3632bfef25e471075886eb7aecddd4cc260db8ba) +--- + source3/client/smbspool_krb5_wrapper.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c +index e6684fc0d0c..2cdcd372ec6 100644 +--- a/source3/client/smbspool_krb5_wrapper.c ++++ b/source3/client/smbspool_krb5_wrapper.c +@@ -219,10 +219,14 @@ int main(int argc, char *argv[]) + env = getenv("KRB5CCNAME"); + if (env != NULL && env[0] != 0) { + snprintf(gen_cc, sizeof(gen_cc), "%s", env); ++ CUPS_SMB_DEBUG("User already set KRB5CCNAME [%s] as ccache", ++ gen_cc); + + goto create_env; + } + ++ CUPS_SMB_DEBUG("Trying to guess KRB5CCNAME (FILE, DIR, KEYRING)"); ++ + snprintf(gen_cc, sizeof(gen_cc), "/tmp/krb5cc_%d", uid); + + rc = lstat(gen_cc, &sb); +-- +2.21.0 + + +From 3b7be905d256955e7e8c056f14626547e08fea2d Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 16 May 2019 17:10:57 +0200 +Subject: [PATCH 4/9] s3:smbspool: Use %u format specifier to print uid + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit be596ce3d2455bd49a8ebd311d8c764c37852858) +--- + source3/client/smbspool_krb5_wrapper.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c +index 2cdcd372ec6..3266b90ec1a 100644 +--- a/source3/client/smbspool_krb5_wrapper.c ++++ b/source3/client/smbspool_krb5_wrapper.c +@@ -227,13 +227,13 @@ int main(int argc, char *argv[]) + + CUPS_SMB_DEBUG("Trying to guess KRB5CCNAME (FILE, DIR, KEYRING)"); + +- snprintf(gen_cc, sizeof(gen_cc), "/tmp/krb5cc_%d", uid); ++ snprintf(gen_cc, sizeof(gen_cc), "/tmp/krb5cc_%u", uid); + + rc = lstat(gen_cc, &sb); + if (rc == 0) { +- snprintf(gen_cc, sizeof(gen_cc), "FILE:/tmp/krb5cc_%d", uid); ++ snprintf(gen_cc, sizeof(gen_cc), "FILE:/tmp/krb5cc_%u", uid); + } else { +- snprintf(gen_cc, sizeof(gen_cc), "/run/user/%d/krb5cc", uid); ++ snprintf(gen_cc, sizeof(gen_cc), "/run/user/%u/krb5cc", uid); + + rc = lstat(gen_cc, &sb); + if (rc == 0 && S_ISDIR(sb.st_mode)) { +-- +2.21.0 + + +From 6e2069b014358b6f7e04121fa39c5f2750506d78 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 16 May 2019 17:40:43 +0200 +Subject: [PATCH 5/9] s3:smbspool: Fallback to default ccache if KRB5CCNAME is + not set + +This could also support the new KCM credential cache storage. + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 6bbdf69e406916107400e2cabdbc831e2a2bbee3) +--- + source3/client/smbspool_krb5_wrapper.c | 79 ++++++++++++++++++-------- + source3/wscript_build | 1 + + 2 files changed, 55 insertions(+), 25 deletions(-) + +diff --git a/source3/client/smbspool_krb5_wrapper.c b/source3/client/smbspool_krb5_wrapper.c +index 3266b90ec1a..bff1df417e8 100644 +--- a/source3/client/smbspool_krb5_wrapper.c ++++ b/source3/client/smbspool_krb5_wrapper.c +@@ -21,6 +21,7 @@ + + #include "includes.h" + #include "system/filesys.h" ++#include "system/kerberos.h" + #include "system/passwd.h" + + #include +@@ -68,6 +69,50 @@ static void cups_smb_debug(enum cups_smb_dbglvl_e lvl, const char *format, ...) + buffer); + } + ++static bool kerberos_get_default_ccache(char *ccache_buf, size_t len) ++{ ++ krb5_context ctx; ++ const char *ccache_name = NULL; ++ char *full_ccache_name = NULL; ++ krb5_ccache ccache = NULL; ++ krb5_error_code code; ++ ++ code = krb5_init_context(&ctx); ++ if (code != 0) { ++ return false; ++ } ++ ++ ccache_name = krb5_cc_default_name(ctx); ++ if (ccache_name == NULL) { ++ krb5_free_context(ctx); ++ return false; ++ } ++ ++ code = krb5_cc_resolve(ctx, ccache_name, &ccache); ++ if (code != 0) { ++ krb5_free_context(ctx); ++ return false; ++ } ++ ++ code = krb5_cc_get_full_name(ctx, ccache, &full_ccache_name); ++ krb5_cc_close(ctx, ccache); ++ if (code != 0) { ++ krb5_free_context(ctx); ++ return false; ++ } ++ ++ snprintf(ccache_buf, len, "%s", full_ccache_name); ++ ++#ifdef SAMBA4_USES_HEIMDAL ++ free(full_ccache_name); ++#else ++ krb5_free_string(ctx, full_ccache_name); ++#endif ++ krb5_free_context(ctx); ++ ++ return true; ++} ++ + /* + * This is a helper binary to execute smbspool. + * +@@ -84,7 +129,6 @@ int main(int argc, char *argv[]) + struct passwd *pwd; + struct group *g = NULL; + char gen_cc[PATH_MAX] = {0}; +- struct stat sb; + char *env = NULL; + char auth_info_required[256] = {0}; + char device_uri[4096] = {0}; +@@ -92,6 +136,7 @@ int main(int argc, char *argv[]) + gid_t gid = (gid_t)-1; + gid_t groups[1] = { (gid_t)-1 }; + unsigned long tmp; ++ bool ok; + int cmp; + int rc; + +@@ -225,32 +270,16 @@ int main(int argc, char *argv[]) + goto create_env; + } + +- CUPS_SMB_DEBUG("Trying to guess KRB5CCNAME (FILE, DIR, KEYRING)"); +- +- snprintf(gen_cc, sizeof(gen_cc), "/tmp/krb5cc_%u", uid); +- +- rc = lstat(gen_cc, &sb); +- if (rc == 0) { +- snprintf(gen_cc, sizeof(gen_cc), "FILE:/tmp/krb5cc_%u", uid); +- } else { +- snprintf(gen_cc, sizeof(gen_cc), "/run/user/%u/krb5cc", uid); +- +- rc = lstat(gen_cc, &sb); +- if (rc == 0 && S_ISDIR(sb.st_mode)) { +- snprintf(gen_cc, +- sizeof(gen_cc), +- "DIR:/run/user/%d/krb5cc", +- uid); +- } else { +-#if defined(__linux__) +- snprintf(gen_cc, +- sizeof(gen_cc), +- "KEYRING:persistent:%d", +- uid); +-#endif +- } ++ ok = kerberos_get_default_ccache(gen_cc, sizeof(gen_cc)); ++ if (ok) { ++ CUPS_SMB_DEBUG("Use default KRB5CCNAME [%s]", ++ gen_cc); ++ goto create_env; + } + ++ /* Fallback to a FILE ccache */ ++ snprintf(gen_cc, sizeof(gen_cc), "FILE:/tmp/krb5cc_%u", uid); ++ + create_env: + /* + * Make sure we do not have LD_PRELOAD or other security relevant +diff --git a/source3/wscript_build b/source3/wscript_build +index f67ce59fe52..8e34b7d0261 100644 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -1134,6 +1134,7 @@ bld.SAMBA3_BINARY('smbspool_krb5_wrapper', + deps=''' + DYNCONFIG + cups ++ krb5 + ''', + install_path='${LIBEXECDIR}/samba', + enabled=bld.CONFIG_SET('HAVE_CUPS')) +-- +2.21.0 + + +From d6673500b639ad1402014aa35113bd395e35d4f5 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Mon, 13 May 2019 16:48:31 +0200 +Subject: [PATCH 6/9] s3:smbspool: Print the filename we failed to open + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 281274572bcc3125fe6026a01ef7bf7ef584a0dd) +--- + source3/client/smbspool.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c +index efbdd418fdb..ef16c2bed42 100644 +--- a/source3/client/smbspool.c ++++ b/source3/client/smbspool.c +@@ -224,7 +224,9 @@ main(int argc, /* I - Number of command-line arguments */ + + fp = fopen(print_file, "rb"); + if (fp == NULL) { +- perror("ERROR: Unable to open print file"); ++ fprintf(stderr, ++ "ERROR: Unable to open print file: %s", ++ print_file); + goto done; + } + +-- +2.21.0 + + +From ea931f33d92506cdab17a7b746e43831d6bf2112 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Mon, 13 May 2019 18:54:02 +0200 +Subject: [PATCH 7/9] s3:smbspool: Always try to authenticate using Kerberos + +If username and password is given, then fallback to NTLM. However try +kinit first. Also we correctly handle NULL passwords in the meantime and +this makes it easier to deal with issues. + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 3d719a1f85db8e423dc3a4116a2228961d5ac48d) +--- + source3/client/smbspool.c | 90 ++++++++++++++++++++++----------------- + 1 file changed, 51 insertions(+), 39 deletions(-) + +diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c +index ef16c2bed42..f21aac2ac58 100644 +--- a/source3/client/smbspool.c ++++ b/source3/client/smbspool.c +@@ -88,8 +88,8 @@ main(int argc, /* I - Number of command-line arguments */ + int port; /* Port number */ + char uri[1024], /* URI */ + *sep, /* Pointer to separator */ +- *tmp, *tmp2, /* Temp pointers to do escaping */ +- *password; /* Password */ ++ *tmp, *tmp2; /* Temp pointers to do escaping */ ++ const char *password = NULL; /* Password */ + char *username, /* Username */ + *server, /* Server name */ + *printer;/* Printer name */ +@@ -293,8 +293,6 @@ main(int argc, /* I - Number of command-line arguments */ + if ((tmp2 = strchr_m(tmp, ':')) != NULL) { + *tmp2++ = '\0'; + password = uri_unescape_alloc(tmp2); +- } else { +- password = empty_str; + } + username = uri_unescape_alloc(tmp); + } else { +@@ -302,14 +300,15 @@ main(int argc, /* I - Number of command-line arguments */ + username = empty_str; + } + +- if ((password = getenv("AUTH_PASSWORD")) == NULL) { +- password = empty_str; ++ env = getenv("AUTH_PASSWORD"); ++ if (env != NULL && strlen(env) > 0) { ++ password = env; + } + + server = uri + 6; + } + +- if (password != empty_str) { ++ if (password != NULL) { + auth_info_required = "username,password"; + } + +@@ -514,6 +513,7 @@ smb_complete_connection(const char *myname, + NTSTATUS nt_status; + struct cli_credentials *creds = NULL; + bool use_kerberos = false; ++ bool fallback_after_kerberos = false; + + /* Start the SMB connection */ + *need_auth = false; +@@ -524,27 +524,21 @@ smb_complete_connection(const char *myname, + return NULL; + } + +- /* +- * We pretty much guarantee password must be valid or a pointer to a +- * 0 char. +- */ +- if (!password) { +- *need_auth = true; +- return NULL; +- } +- + if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) { +- auth_info_required = "negotiate"; + use_kerberos = true; + } + ++ if (flags & CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS) { ++ fallback_after_kerberos = true; ++ } ++ + creds = cli_session_creds_init(cli, + username, + workgroup, + NULL, /* realm */ + password, + use_kerberos, +- false, /* fallback_after_kerberos */ ++ fallback_after_kerberos, + false, /* use_ccache */ + false); /* password_is_nt_hash */ + if (creds == NULL) { +@@ -663,6 +657,10 @@ smb_connect(const char *workgroup, /* I - Workgroup */ + struct cli_state *cli; /* New connection */ + char *myname = NULL; /* Client name */ + struct passwd *pwd; ++ int flags = CLI_FULL_CONNECTION_USE_KERBEROS; ++ bool use_kerberos = false; ++ const char *user = username; ++ int cmp; + + /* + * Get the names and addresses of the client and server... +@@ -672,42 +670,56 @@ smb_connect(const char *workgroup, /* I - Workgroup */ + return NULL; + } + +- /* +- * See if we have a username first. This is for backwards compatible +- * behavior with 3.0.14a +- */ + +- if (username == NULL || username[0] == '\0') { +- if (kerberos_ccache_is_valid()) { +- goto kerberos_auth; ++ cmp = strcmp(auth_info_required, "negotiate"); ++ if (cmp == 0) { ++ if (!kerberos_ccache_is_valid()) { ++ return NULL; + } ++ user = jobusername; ++ ++ use_kerberos = true; ++ fprintf(stderr, ++ "DEBUG: Try to connect using Kerberos ...\n"); ++ } ++ ++ cmp = strcmp(auth_info_required, "username,password"); ++ if (cmp == 0) { ++ if (username == NULL || username[0] == '\0') { ++ return NULL; ++ } ++ ++ /* Fallback to NTLM */ ++ flags |= CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS; ++ ++ fprintf(stderr, ++ "DEBUG: Try to connect using username/password ...\n"); ++ } ++ ++ cmp = strcmp(auth_info_required, "none"); ++ if (cmp == 0) { ++ fprintf(stderr, ++ "DEBUG: This backend doesn't support none auth ...\n"); ++ return NULL; + } + + cli = smb_complete_connection(myname, + server, + port, +- username, ++ user, + password, + workgroup, + share, +- 0, ++ flags, + need_auth); + if (cli != NULL) { +- fputs("DEBUG: Connected with username/password...\n", stderr); ++ fprintf(stderr, "DEBUG: SMB connection established.\n"); + return (cli); + } + +-kerberos_auth: +- /* +- * Try to use the user kerberos credentials (if any) to authenticate +- */ +- cli = smb_complete_connection(myname, server, port, jobusername, "", +- workgroup, share, +- CLI_FULL_CONNECTION_USE_KERBEROS, need_auth); +- +- if (cli) { +- fputs("DEBUG: Connected using Kerberos...\n", stderr); +- return (cli); ++ if (!use_kerberos) { ++ fprintf(stderr, "ERROR: SMB connection failed!\n"); ++ return NULL; + } + + /* give a chance for a passwordless NTLMSSP session setup */ +-- +2.21.0 + + +From 8689e83030160fbdbe9b72ff0c86826b49f707a1 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 16 May 2019 18:24:32 +0200 +Subject: [PATCH 8/9] s3:smbspool: Add debug messages to + kerberos_ccache_is_valid() + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit 93acd880801524c5e621df7b5bf5ad650f93cec3) +--- + source3/client/smbspool.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c +index f21aac2ac58..79e210dd12e 100644 +--- a/source3/client/smbspool.c ++++ b/source3/client/smbspool.c +@@ -602,12 +602,15 @@ static bool kerberos_ccache_is_valid(void) { + + ccache_name = krb5_cc_default_name(ctx); + if (ccache_name == NULL) { ++ DBG_ERR("Failed to get default ccache name\n"); + krb5_free_context(ctx); + return false; + } + + code = krb5_cc_resolve(ctx, ccache_name, &ccache); + if (code != 0) { ++ DBG_ERR("Failed to resolve ccache name: %s\n", ++ ccache_name); + krb5_free_context(ctx); + return false; + } else { +@@ -618,6 +621,9 @@ static bool kerberos_ccache_is_valid(void) { + ccache, + &default_princ); + if (code != 0) { ++ DBG_ERR("Failed to get default principal from " ++ "ccache: %s\n", ++ ccache_name); + krb5_cc_close(ctx, ccache); + krb5_free_context(ctx); + return false; +-- +2.21.0 + + +From d1cee66a5e66d83b2aee3a803351c51d4f5a8118 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Tue, 14 May 2019 11:35:46 +0200 +Subject: [PATCH 9/9] s3:smbspool: Use NTSTATUS return codes + +This allows us to simplify some code and return better errors. + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Guenther Deschner +(cherry picked from commit d9af3dc02e98a3eb22441dfbdeddbaca0af078ea) +--- + source3/client/smbspool.c | 250 ++++++++++++++++++++++---------------- + 1 file changed, 145 insertions(+), 105 deletions(-) + +diff --git a/source3/client/smbspool.c b/source3/client/smbspool.c +index 79e210dd12e..ad988eb0df9 100644 +--- a/source3/client/smbspool.c ++++ b/source3/client/smbspool.c +@@ -61,12 +61,27 @@ + * Local functions... + */ + +-static int get_exit_code(struct cli_state * cli, NTSTATUS nt_status); ++static int get_exit_code(NTSTATUS nt_status); + static void list_devices(void); +-static struct cli_state *smb_complete_connection(const char *, const char *, +- int, const char *, const char *, const char *, const char *, int, bool *need_auth); +-static struct cli_state *smb_connect(const char *, const char *, int, const +- char *, const char *, const char *, const char *, bool *need_auth); ++static NTSTATUS ++smb_complete_connection(struct cli_state **output_cli, ++ const char *myname, ++ const char *server, ++ int port, ++ const char *username, ++ const char *password, ++ const char *workgroup, ++ const char *share, ++ int flags); ++static NTSTATUS ++smb_connect(struct cli_state **output_cli, ++ const char *workgroup, ++ const char *server, ++ const int port, ++ const char *share, ++ const char *username, ++ const char *password, ++ const char *jobusername); + static int smb_print(struct cli_state *, const char *, FILE *); + static char *uri_unescape_alloc(const char *); + #if 0 +@@ -90,16 +105,15 @@ main(int argc, /* I - Number of command-line arguments */ + *sep, /* Pointer to separator */ + *tmp, *tmp2; /* Temp pointers to do escaping */ + const char *password = NULL; /* Password */ +- char *username, /* Username */ +- *server, /* Server name */ ++ const char *username = NULL; /* Username */ ++ char *server, /* Server name */ + *printer;/* Printer name */ + const char *workgroup; /* Workgroup */ + FILE *fp; /* File to print */ + int status = 1; /* Status of LPD job */ +- struct cli_state *cli; /* SMB interface */ +- char empty_str[] = ""; ++ NTSTATUS nt_status = NT_STATUS_UNSUCCESSFUL; ++ struct cli_state *cli = NULL; /* SMB interface */ + int tries = 0; +- bool need_auth = true; + const char *dev_uri = NULL; + const char *env = NULL; + const char *config_file = NULL; +@@ -296,8 +310,9 @@ main(int argc, /* I - Number of command-line arguments */ + } + username = uri_unescape_alloc(tmp); + } else { +- if ((username = getenv("AUTH_USERNAME")) == NULL) { +- username = empty_str; ++ env = getenv("AUTH_USERNAME"); ++ if (env != NULL && strlen(env) > 0) { ++ username = env; + } + + env = getenv("AUTH_PASSWORD"); +@@ -369,27 +384,39 @@ main(int argc, /* I - Number of command-line arguments */ + load_interfaces(); + + do { +- cli = smb_connect(workgroup, +- server, +- port, +- printer, +- username, +- password, +- print_user, +- &need_auth); +- if (cli == NULL) { +- if (need_auth) { +- exit(2); ++ nt_status = smb_connect(&cli, ++ workgroup, ++ server, ++ port, ++ printer, ++ username, ++ password, ++ print_user); ++ if (!NT_STATUS_IS_OK(nt_status)) { ++ status = get_exit_code(nt_status); ++ if (status == 2) { ++ fprintf(stderr, ++ "DEBUG: Unable to connect to CIFS " ++ "host: %s", ++ nt_errstr(nt_status)); ++ goto done; + } else if (getenv("CLASS") == NULL) { +- fprintf(stderr, "ERROR: Unable to connect to CIFS host, will retry in 60 seconds...\n"); ++ fprintf(stderr, ++ "ERROR: Unable to connect to CIFS " ++ "host: %s. Will retry in 60 " ++ "seconds...\n", ++ nt_errstr(nt_status)); + sleep(60); + tries++; + } else { +- fprintf(stderr, "ERROR: Unable to connect to CIFS host, trying next printer...\n"); ++ fprintf(stderr, ++ "ERROR: Unable to connect to CIFS " ++ "host: %s. Trying next printer...\n", ++ nt_errstr(nt_status)); + goto done; + } + } +- } while ((cli == NULL) && (tries < MAX_RETRY_CONNECT)); ++ } while (!NT_STATUS_IS_OK(nt_status) && (tries < MAX_RETRY_CONNECT)); + + if (cli == NULL) { + fprintf(stderr, "ERROR: Unable to connect to CIFS host after (tried %d times)\n", tries); +@@ -436,10 +463,9 @@ done: + */ + + static int +-get_exit_code(struct cli_state * cli, +- NTSTATUS nt_status) ++get_exit_code(NTSTATUS nt_status) + { +- int i; ++ size_t i; + + /* List of NTSTATUS errors that are considered + * authentication errors +@@ -455,17 +481,16 @@ get_exit_code(struct cli_state * cli, + }; + + +- fprintf(stderr, "DEBUG: get_exit_code(cli=%p, nt_status=%s [%x])\n", +- cli, nt_errstr(nt_status), NT_STATUS_V(nt_status)); ++ fprintf(stderr, ++ "DEBUG: get_exit_code(nt_status=%s [%x])\n", ++ nt_errstr(nt_status), NT_STATUS_V(nt_status)); + + for (i = 0; i < ARRAY_SIZE(auth_errors); i++) { + if (!NT_STATUS_EQUAL(nt_status, auth_errors[i])) { + continue; + } + +- if (cli) { +- fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); +- } ++ fprintf(stderr, "ATTR: auth-info-required=%s\n", auth_info_required); + + /* + * 2 = authentication required... +@@ -498,16 +523,16 @@ list_devices(void) + } + + +-static struct cli_state * +-smb_complete_connection(const char *myname, ++static NTSTATUS ++smb_complete_connection(struct cli_state **output_cli, ++ const char *myname, + const char *server, + int port, + const char *username, + const char *password, + const char *workgroup, + const char *share, +- int flags, +- bool *need_auth) ++ int flags) + { + struct cli_state *cli; /* New connection */ + NTSTATUS nt_status; +@@ -516,12 +541,11 @@ smb_complete_connection(const char *myname, + bool fallback_after_kerberos = false; + + /* Start the SMB connection */ +- *need_auth = false; + nt_status = cli_start_connection(&cli, myname, server, NULL, port, + SMB_SIGNING_DEFAULT, flags); + if (!NT_STATUS_IS_OK(nt_status)) { + fprintf(stderr, "ERROR: Connection failed: %s\n", nt_errstr(nt_status)); +- return NULL; ++ return nt_status; + } + + if (flags & CLI_FULL_CONNECTION_USE_KERBEROS) { +@@ -544,20 +568,16 @@ smb_complete_connection(const char *myname, + if (creds == NULL) { + fprintf(stderr, "ERROR: cli_session_creds_init failed\n"); + cli_shutdown(cli); +- return NULL; ++ return NT_STATUS_NO_MEMORY; + } + + nt_status = cli_session_setup_creds(cli, creds); + if (!NT_STATUS_IS_OK(nt_status)) { + fprintf(stderr, "ERROR: Session setup failed: %s\n", nt_errstr(nt_status)); + +- if (get_exit_code(cli, nt_status) == 2) { +- *need_auth = true; +- } +- + cli_shutdown(cli); + +- return NULL; ++ return nt_status; + } + + nt_status = cli_tree_connect_creds(cli, share, "?????", creds); +@@ -565,13 +585,9 @@ smb_complete_connection(const char *myname, + fprintf(stderr, "ERROR: Tree connect failed (%s)\n", + nt_errstr(nt_status)); + +- if (get_exit_code(cli, nt_status) == 2) { +- *need_auth = true; +- } +- + cli_shutdown(cli); + +- return NULL; ++ return nt_status; + } + #if 0 + /* Need to work out how to specify this on the URL. */ +@@ -584,7 +600,8 @@ smb_complete_connection(const char *myname, + } + #endif + +- return cli; ++ *output_cli = cli; ++ return NT_STATUS_OK; + } + + static bool kerberos_ccache_is_valid(void) { +@@ -650,49 +667,48 @@ static bool kerberos_ccache_is_valid(void) { + * 'smb_connect()' - Return a connection to a server. + */ + +-static struct cli_state * /* O - SMB connection */ +-smb_connect(const char *workgroup, /* I - Workgroup */ ++static NTSTATUS ++smb_connect(struct cli_state **output_cli, ++ const char *workgroup, /* I - Workgroup */ + const char *server, /* I - Server */ + const int port, /* I - Port */ + const char *share, /* I - Printer */ + const char *username, /* I - Username */ + const char *password, /* I - Password */ +- const char *jobusername, /* I - User who issued the print job */ +- bool *need_auth) +-{ /* O - Need authentication? */ +- struct cli_state *cli; /* New connection */ ++ const char *jobusername) /* I - User who issued the print job */ ++{ ++ struct cli_state *cli = NULL; /* New connection */ + char *myname = NULL; /* Client name */ + struct passwd *pwd; + int flags = CLI_FULL_CONNECTION_USE_KERBEROS; + bool use_kerberos = false; + const char *user = username; +- int cmp; ++ NTSTATUS nt_status; + + /* + * Get the names and addresses of the client and server... + */ + myname = get_myname(talloc_tos()); + if (!myname) { +- return NULL; ++ return NT_STATUS_NO_MEMORY; + } + + +- cmp = strcmp(auth_info_required, "negotiate"); +- if (cmp == 0) { ++ if (strcmp(auth_info_required, "negotiate") == 0) { + if (!kerberos_ccache_is_valid()) { +- return NULL; ++ fprintf(stderr, ++ "ERROR: No valid Kerberos credential cache " ++ "found!\n"); ++ return NT_STATUS_LOGON_FAILURE; + } + user = jobusername; + + use_kerberos = true; + fprintf(stderr, + "DEBUG: Try to connect using Kerberos ...\n"); +- } +- +- cmp = strcmp(auth_info_required, "username,password"); +- if (cmp == 0) { +- if (username == NULL || username[0] == '\0') { +- return NULL; ++ } else if (strcmp(auth_info_required, "username,password") == 0) { ++ if (username == NULL) { ++ return NT_STATUS_INVALID_ACCOUNT_NAME; + } + + /* Fallback to NTLM */ +@@ -700,59 +716,83 @@ smb_connect(const char *workgroup, /* I - Workgroup */ + + fprintf(stderr, + "DEBUG: Try to connect using username/password ...\n"); +- } ++ } else { ++ if (username != NULL) { ++ flags |= CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS; ++ } else if (kerberos_ccache_is_valid()) { ++ auth_info_required = "negotiate"; + +- cmp = strcmp(auth_info_required, "none"); +- if (cmp == 0) { +- fprintf(stderr, +- "DEBUG: This backend doesn't support none auth ...\n"); +- return NULL; ++ user = jobusername; ++ use_kerberos = true; ++ } else { ++ fprintf(stderr, ++ "DEBUG: This backend requires credentials!\n"); ++ return NT_STATUS_ACCESS_DENIED; ++ } + } + +- cli = smb_complete_connection(myname, +- server, +- port, +- user, +- password, +- workgroup, +- share, +- flags, +- need_auth); +- if (cli != NULL) { ++ nt_status = smb_complete_connection(&cli, ++ myname, ++ server, ++ port, ++ user, ++ password, ++ workgroup, ++ share, ++ flags); ++ if (NT_STATUS_IS_OK(nt_status)) { + fprintf(stderr, "DEBUG: SMB connection established.\n"); +- return (cli); ++ ++ *output_cli = cli; ++ return NT_STATUS_OK; + } + + if (!use_kerberos) { + fprintf(stderr, "ERROR: SMB connection failed!\n"); +- return NULL; ++ return nt_status; + } + + /* give a chance for a passwordless NTLMSSP session setup */ + pwd = getpwuid(geteuid()); + if (pwd == NULL) { +- return NULL; +- } +- +- cli = smb_complete_connection(myname, server, port, pwd->pw_name, "", +- workgroup, share, 0, need_auth); +- +- if (cli) { ++ return NT_STATUS_ACCESS_DENIED; ++ } ++ ++ nt_status = smb_complete_connection(&cli, ++ myname, ++ server, ++ port, ++ pwd->pw_name, ++ "", ++ workgroup, ++ share, ++ 0); ++ if (NT_STATUS_IS_OK(nt_status)) { + fputs("DEBUG: Connected with NTLMSSP...\n", stderr); +- return (cli); ++ ++ *output_cli = cli; ++ return NT_STATUS_OK; + } + + /* + * last try. Use anonymous authentication + */ + +- cli = smb_complete_connection(myname, server, port, "", "", +- workgroup, share, 0, need_auth); +- /* +- * Return the new connection... +- */ +- +- return (cli); ++ nt_status = smb_complete_connection(&cli, ++ myname, ++ server, ++ port, ++ "", ++ "", ++ workgroup, ++ share, ++ 0); ++ if (NT_STATUS_IS_OK(nt_status)) { ++ *output_cli = cli; ++ return NT_STATUS_OK; ++ } ++ ++ return nt_status; + } + + +@@ -798,7 +838,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */ + if (!NT_STATUS_IS_OK(nt_status)) { + fprintf(stderr, "ERROR: %s opening remote spool %s\n", + nt_errstr(nt_status), title); +- return get_exit_code(cli, nt_status); ++ return get_exit_code(nt_status); + } + + /* +@@ -816,7 +856,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */ + status = cli_writeall(cli, fnum, 0, (uint8_t *)buffer, + tbytes, nbytes, NULL); + if (!NT_STATUS_IS_OK(status)) { +- int ret = get_exit_code(cli, status); ++ int ret = get_exit_code(status); + fprintf(stderr, "ERROR: Error writing spool: %s\n", + nt_errstr(status)); + fprintf(stderr, "DEBUG: Returning status %d...\n", +@@ -832,7 +872,7 @@ smb_print(struct cli_state * cli, /* I - SMB connection */ + if (!NT_STATUS_IS_OK(nt_status)) { + fprintf(stderr, "ERROR: %s closing remote spool %s\n", + nt_errstr(nt_status), title); +- return get_exit_code(cli, nt_status); ++ return get_exit_code(nt_status); + } else { + return (0); + } +-- +2.21.0 + +From ffa5f8b65c662130c2d23e47df6d00fef3b73cc3 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Tue, 18 Jun 2019 14:43:50 +0200 +Subject: [PATCH] s3:client: Link smbspool_krb5_wrapper against krb5samba + +Heimdal doesn't provide krb5_free_unparsed_name(), so we need to use the +function we provide in krb5samba. + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=13939 + +Signed-off-by: Andreas Schneider +Reviewed-by: Ralph Boehme +(cherry picked from commit 9268919e046190c7b423133de3f9d0edada3f1b8) +--- + source3/wscript_build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/source3/wscript_build b/source3/wscript_build +index 1ebb006781a..26e251f442a 100644 +--- a/source3/wscript_build ++++ b/source3/wscript_build +@@ -1133,7 +1133,7 @@ bld.SAMBA3_BINARY('smbspool_krb5_wrapper', + deps=''' + DYNCONFIG + cups +- krb5 ++ krb5samba + ''', + install_path='${LIBEXECDIR}/samba', + enabled=bld.CONFIG_SET('HAVE_CUPS')) +-- +2.21.0 + diff --git a/SOURCES/samba-4.10.4.tar.asc b/SOURCES/samba-4.10.4.tar.asc new file mode 100644 index 0000000..29f805c --- /dev/null +++ b/SOURCES/samba-4.10.4.tar.asc @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- + +iHMEABECADMWIQRS+8C4bZVLCEMyTNxvM5FbZWi36gUCXOUjjhUcc2FtYmEtYnVn +c0BzYW1iYS5vcmcACgkQbzORW2Vot+oeXQCgkgjBBjMDA7WRd7pl8akT65XmGaAA +n3v79/BJYEuD3vw98M5nW4GBN6C9 +=/Xfk +-----END PGP SIGNATURE----- diff --git a/SOURCES/samba-4.9-add_smbc_setOptionProtocols.patch b/SOURCES/samba-4.9-add_smbc_setOptionProtocols.patch deleted file mode 100644 index 08c88a1..0000000 --- a/SOURCES/samba-4.9-add_smbc_setOptionProtocols.patch +++ /dev/null @@ -1,280 +0,0 @@ -From 5192b35d5e8644f000277c2f075b2ae90c514cbd Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Tue, 4 Sep 2018 15:48:03 +0200 -Subject: [PATCH] s3:libsmbclient: Add function to set protocol levels - -Signed-off-by: Andreas Schneider -Reviewed-by: Jeremy Allison -(cherry picked from commit 0dae4e2f5c65167fdb2405e232436921a0bb17e6) ---- - source3/include/libsmbclient.h | 19 ++- - source3/libsmb/ABI/smbclient-0.5.0.sigs | 185 ++++++++++++++++++++++++ - source3/libsmb/libsmb_setget.c | 18 +++ - source3/libsmb/wscript | 2 +- - 4 files changed, 222 insertions(+), 2 deletions(-) - create mode 100644 source3/libsmb/ABI/smbclient-0.5.0.sigs - -diff --git a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h -index ca5c7f87f71..5e4a1715402 100644 ---- a/source3/include/libsmbclient.h -+++ b/source3/include/libsmbclient.h -@@ -831,7 +831,24 @@ smbc_getOptionUseNTHash(SMBCCTX *c); - void - smbc_setOptionUseNTHash(SMBCCTX *c, smbc_bool b); - -- -+/** -+ * @brief Set the 'client min protocol' and the 'client max protocol'. -+ * -+ * IMPORTANT: This overrrides the values 'client min protocol' and 'client max -+ * protocol' set in the smb.conf file! -+ * -+ * @param[in] c The smbc context to use. -+ * -+ * @param[in] min_proto The minimal protocol to use or NULL for leaving it -+ * untouched. -+ * -+ * @param[in] max_proto The maximum protocol to use or NULL for leaving it -+ * untouched. -+ * -+ * @returns true for success, false otherwise -+ */ -+smbc_bool -+smbc_setOptionProtocols(SMBCCTX *c, const char *min_proto, const char *max_proto); - - /************************************* - * Getters and setters for FUNCTIONS * -diff --git a/source3/libsmb/ABI/smbclient-0.5.0.sigs b/source3/libsmb/ABI/smbclient-0.5.0.sigs -new file mode 100644 -index 00000000000..b4245979c24 ---- /dev/null -+++ b/source3/libsmb/ABI/smbclient-0.5.0.sigs -@@ -0,0 +1,185 @@ -+smbc_chmod: int (const char *, mode_t) -+smbc_close: int (int) -+smbc_closedir: int (int) -+smbc_creat: int (const char *, mode_t) -+smbc_fgetxattr: int (int, const char *, const void *, size_t) -+smbc_flistxattr: int (int, char *, size_t) -+smbc_free_context: int (SMBCCTX *, int) -+smbc_fremovexattr: int (int, const char *) -+smbc_fsetxattr: int (int, const char *, const void *, size_t, int) -+smbc_fstat: int (int, struct stat *) -+smbc_fstatvfs: int (int, struct statvfs *) -+smbc_ftruncate: int (int, off_t) -+smbc_getDebug: int (SMBCCTX *) -+smbc_getFunctionAddCachedServer: smbc_add_cached_srv_fn (SMBCCTX *) -+smbc_getFunctionAuthData: smbc_get_auth_data_fn (SMBCCTX *) -+smbc_getFunctionAuthDataWithContext: smbc_get_auth_data_with_context_fn (SMBCCTX *) -+smbc_getFunctionCheckServer: smbc_check_server_fn (SMBCCTX *) -+smbc_getFunctionChmod: smbc_chmod_fn (SMBCCTX *) -+smbc_getFunctionClose: smbc_close_fn (SMBCCTX *) -+smbc_getFunctionClosedir: smbc_closedir_fn (SMBCCTX *) -+smbc_getFunctionCreat: smbc_creat_fn (SMBCCTX *) -+smbc_getFunctionFstat: smbc_fstat_fn (SMBCCTX *) -+smbc_getFunctionFstatVFS: smbc_fstatvfs_fn (SMBCCTX *) -+smbc_getFunctionFstatdir: smbc_fstatdir_fn (SMBCCTX *) -+smbc_getFunctionFtruncate: smbc_ftruncate_fn (SMBCCTX *) -+smbc_getFunctionGetCachedServer: smbc_get_cached_srv_fn (SMBCCTX *) -+smbc_getFunctionGetdents: smbc_getdents_fn (SMBCCTX *) -+smbc_getFunctionGetxattr: smbc_getxattr_fn (SMBCCTX *) -+smbc_getFunctionListPrintJobs: smbc_list_print_jobs_fn (SMBCCTX *) -+smbc_getFunctionListxattr: smbc_listxattr_fn (SMBCCTX *) -+smbc_getFunctionLseek: smbc_lseek_fn (SMBCCTX *) -+smbc_getFunctionLseekdir: smbc_lseekdir_fn (SMBCCTX *) -+smbc_getFunctionMkdir: smbc_mkdir_fn (SMBCCTX *) -+smbc_getFunctionNotify: smbc_notify_fn (SMBCCTX *) -+smbc_getFunctionOpen: smbc_open_fn (SMBCCTX *) -+smbc_getFunctionOpenPrintJob: smbc_open_print_job_fn (SMBCCTX *) -+smbc_getFunctionOpendir: smbc_opendir_fn (SMBCCTX *) -+smbc_getFunctionPrintFile: smbc_print_file_fn (SMBCCTX *) -+smbc_getFunctionPurgeCachedServers: smbc_purge_cached_fn (SMBCCTX *) -+smbc_getFunctionRead: smbc_read_fn (SMBCCTX *) -+smbc_getFunctionReaddir: smbc_readdir_fn (SMBCCTX *) -+smbc_getFunctionReaddirPlus: smbc_readdirplus_fn (SMBCCTX *) -+smbc_getFunctionRemoveCachedServer: smbc_remove_cached_srv_fn (SMBCCTX *) -+smbc_getFunctionRemoveUnusedServer: smbc_remove_unused_server_fn (SMBCCTX *) -+smbc_getFunctionRemovexattr: smbc_removexattr_fn (SMBCCTX *) -+smbc_getFunctionRename: smbc_rename_fn (SMBCCTX *) -+smbc_getFunctionRmdir: smbc_rmdir_fn (SMBCCTX *) -+smbc_getFunctionSetxattr: smbc_setxattr_fn (SMBCCTX *) -+smbc_getFunctionSplice: smbc_splice_fn (SMBCCTX *) -+smbc_getFunctionStat: smbc_stat_fn (SMBCCTX *) -+smbc_getFunctionStatVFS: smbc_statvfs_fn (SMBCCTX *) -+smbc_getFunctionTelldir: smbc_telldir_fn (SMBCCTX *) -+smbc_getFunctionUnlink: smbc_unlink_fn (SMBCCTX *) -+smbc_getFunctionUnlinkPrintJob: smbc_unlink_print_job_fn (SMBCCTX *) -+smbc_getFunctionUtimes: smbc_utimes_fn (SMBCCTX *) -+smbc_getFunctionWrite: smbc_write_fn (SMBCCTX *) -+smbc_getNetbiosName: const char *(SMBCCTX *) -+smbc_getOptionBrowseMaxLmbCount: int (SMBCCTX *) -+smbc_getOptionCaseSensitive: smbc_bool (SMBCCTX *) -+smbc_getOptionDebugToStderr: smbc_bool (SMBCCTX *) -+smbc_getOptionFallbackAfterKerberos: smbc_bool (SMBCCTX *) -+smbc_getOptionFullTimeNames: smbc_bool (SMBCCTX *) -+smbc_getOptionNoAutoAnonymousLogin: smbc_bool (SMBCCTX *) -+smbc_getOptionOneSharePerServer: smbc_bool (SMBCCTX *) -+smbc_getOptionOpenShareMode: smbc_share_mode (SMBCCTX *) -+smbc_getOptionSmbEncryptionLevel: smbc_smb_encrypt_level (SMBCCTX *) -+smbc_getOptionUrlEncodeReaddirEntries: smbc_bool (SMBCCTX *) -+smbc_getOptionUseCCache: smbc_bool (SMBCCTX *) -+smbc_getOptionUseKerberos: smbc_bool (SMBCCTX *) -+smbc_getOptionUseNTHash: smbc_bool (SMBCCTX *) -+smbc_getOptionUserData: void *(SMBCCTX *) -+smbc_getPort: uint16_t (SMBCCTX *) -+smbc_getServerCacheData: struct smbc_server_cache *(SMBCCTX *) -+smbc_getTimeout: int (SMBCCTX *) -+smbc_getUser: const char *(SMBCCTX *) -+smbc_getWorkgroup: const char *(SMBCCTX *) -+smbc_getdents: int (unsigned int, struct smbc_dirent *, int) -+smbc_getxattr: int (const char *, const char *, const void *, size_t) -+smbc_init: int (smbc_get_auth_data_fn, int) -+smbc_init_context: SMBCCTX *(SMBCCTX *) -+smbc_lgetxattr: int (const char *, const char *, const void *, size_t) -+smbc_list_print_jobs: int (const char *, smbc_list_print_job_fn) -+smbc_listxattr: int (const char *, char *, size_t) -+smbc_llistxattr: int (const char *, char *, size_t) -+smbc_lremovexattr: int (const char *, const char *) -+smbc_lseek: off_t (int, off_t, int) -+smbc_lseekdir: int (int, off_t) -+smbc_lsetxattr: int (const char *, const char *, const void *, size_t, int) -+smbc_mkdir: int (const char *, mode_t) -+smbc_new_context: SMBCCTX *(void) -+smbc_notify: int (int, smbc_bool, uint32_t, unsigned int, smbc_notify_callback_fn, void *) -+smbc_open: int (const char *, int, mode_t) -+smbc_open_print_job: int (const char *) -+smbc_opendir: int (const char *) -+smbc_option_get: void *(SMBCCTX *, char *) -+smbc_option_set: void (SMBCCTX *, char *, ...) -+smbc_print_file: int (const char *, const char *) -+smbc_read: ssize_t (int, void *, size_t) -+smbc_readdir: struct smbc_dirent *(unsigned int) -+smbc_readdirplus: const struct libsmb_file_info *(unsigned int) -+smbc_removexattr: int (const char *, const char *) -+smbc_rename: int (const char *, const char *) -+smbc_rmdir: int (const char *) -+smbc_setConfiguration: int (SMBCCTX *, const char *) -+smbc_setDebug: void (SMBCCTX *, int) -+smbc_setFunctionAddCachedServer: void (SMBCCTX *, smbc_add_cached_srv_fn) -+smbc_setFunctionAuthData: void (SMBCCTX *, smbc_get_auth_data_fn) -+smbc_setFunctionAuthDataWithContext: void (SMBCCTX *, smbc_get_auth_data_with_context_fn) -+smbc_setFunctionCheckServer: void (SMBCCTX *, smbc_check_server_fn) -+smbc_setFunctionChmod: void (SMBCCTX *, smbc_chmod_fn) -+smbc_setFunctionClose: void (SMBCCTX *, smbc_close_fn) -+smbc_setFunctionClosedir: void (SMBCCTX *, smbc_closedir_fn) -+smbc_setFunctionCreat: void (SMBCCTX *, smbc_creat_fn) -+smbc_setFunctionFstat: void (SMBCCTX *, smbc_fstat_fn) -+smbc_setFunctionFstatVFS: void (SMBCCTX *, smbc_fstatvfs_fn) -+smbc_setFunctionFstatdir: void (SMBCCTX *, smbc_fstatdir_fn) -+smbc_setFunctionFtruncate: void (SMBCCTX *, smbc_ftruncate_fn) -+smbc_setFunctionGetCachedServer: void (SMBCCTX *, smbc_get_cached_srv_fn) -+smbc_setFunctionGetdents: void (SMBCCTX *, smbc_getdents_fn) -+smbc_setFunctionGetxattr: void (SMBCCTX *, smbc_getxattr_fn) -+smbc_setFunctionListPrintJobs: void (SMBCCTX *, smbc_list_print_jobs_fn) -+smbc_setFunctionListxattr: void (SMBCCTX *, smbc_listxattr_fn) -+smbc_setFunctionLseek: void (SMBCCTX *, smbc_lseek_fn) -+smbc_setFunctionLseekdir: void (SMBCCTX *, smbc_lseekdir_fn) -+smbc_setFunctionMkdir: void (SMBCCTX *, smbc_mkdir_fn) -+smbc_setFunctionNotify: void (SMBCCTX *, smbc_notify_fn) -+smbc_setFunctionOpen: void (SMBCCTX *, smbc_open_fn) -+smbc_setFunctionOpenPrintJob: void (SMBCCTX *, smbc_open_print_job_fn) -+smbc_setFunctionOpendir: void (SMBCCTX *, smbc_opendir_fn) -+smbc_setFunctionPrintFile: void (SMBCCTX *, smbc_print_file_fn) -+smbc_setFunctionPurgeCachedServers: void (SMBCCTX *, smbc_purge_cached_fn) -+smbc_setFunctionRead: void (SMBCCTX *, smbc_read_fn) -+smbc_setFunctionReaddir: void (SMBCCTX *, smbc_readdir_fn) -+smbc_setFunctionReaddirPlus: void (SMBCCTX *, smbc_readdirplus_fn) -+smbc_setFunctionRemoveCachedServer: void (SMBCCTX *, smbc_remove_cached_srv_fn) -+smbc_setFunctionRemoveUnusedServer: void (SMBCCTX *, smbc_remove_unused_server_fn) -+smbc_setFunctionRemovexattr: void (SMBCCTX *, smbc_removexattr_fn) -+smbc_setFunctionRename: void (SMBCCTX *, smbc_rename_fn) -+smbc_setFunctionRmdir: void (SMBCCTX *, smbc_rmdir_fn) -+smbc_setFunctionSetxattr: void (SMBCCTX *, smbc_setxattr_fn) -+smbc_setFunctionSplice: void (SMBCCTX *, smbc_splice_fn) -+smbc_setFunctionStat: void (SMBCCTX *, smbc_stat_fn) -+smbc_setFunctionStatVFS: void (SMBCCTX *, smbc_statvfs_fn) -+smbc_setFunctionTelldir: void (SMBCCTX *, smbc_telldir_fn) -+smbc_setFunctionUnlink: void (SMBCCTX *, smbc_unlink_fn) -+smbc_setFunctionUnlinkPrintJob: void (SMBCCTX *, smbc_unlink_print_job_fn) -+smbc_setFunctionUtimes: void (SMBCCTX *, smbc_utimes_fn) -+smbc_setFunctionWrite: void (SMBCCTX *, smbc_write_fn) -+smbc_setLogCallback: void (SMBCCTX *, void *, smbc_debug_callback_fn) -+smbc_setNetbiosName: void (SMBCCTX *, const char *) -+smbc_setOptionBrowseMaxLmbCount: void (SMBCCTX *, int) -+smbc_setOptionCaseSensitive: void (SMBCCTX *, smbc_bool) -+smbc_setOptionDebugToStderr: void (SMBCCTX *, smbc_bool) -+smbc_setOptionFallbackAfterKerberos: void (SMBCCTX *, smbc_bool) -+smbc_setOptionFullTimeNames: void (SMBCCTX *, smbc_bool) -+smbc_setOptionNoAutoAnonymousLogin: void (SMBCCTX *, smbc_bool) -+smbc_setOptionOneSharePerServer: void (SMBCCTX *, smbc_bool) -+smbc_setOptionOpenShareMode: void (SMBCCTX *, smbc_share_mode) -+smbc_setOptionProtocols: smbc_bool (SMBCCTX *, const char *, const char *) -+smbc_setOptionSmbEncryptionLevel: void (SMBCCTX *, smbc_smb_encrypt_level) -+smbc_setOptionUrlEncodeReaddirEntries: void (SMBCCTX *, smbc_bool) -+smbc_setOptionUseCCache: void (SMBCCTX *, smbc_bool) -+smbc_setOptionUseKerberos: void (SMBCCTX *, smbc_bool) -+smbc_setOptionUseNTHash: void (SMBCCTX *, smbc_bool) -+smbc_setOptionUserData: void (SMBCCTX *, void *) -+smbc_setPort: void (SMBCCTX *, uint16_t) -+smbc_setServerCacheData: void (SMBCCTX *, struct smbc_server_cache *) -+smbc_setTimeout: void (SMBCCTX *, int) -+smbc_setUser: void (SMBCCTX *, const char *) -+smbc_setWorkgroup: void (SMBCCTX *, const char *) -+smbc_set_context: SMBCCTX *(SMBCCTX *) -+smbc_set_credentials: void (const char *, const char *, const char *, smbc_bool, const char *) -+smbc_set_credentials_with_fallback: void (SMBCCTX *, const char *, const char *, const char *) -+smbc_setxattr: int (const char *, const char *, const void *, size_t, int) -+smbc_stat: int (const char *, struct stat *) -+smbc_statvfs: int (char *, struct statvfs *) -+smbc_telldir: off_t (int) -+smbc_unlink: int (const char *) -+smbc_unlink_print_job: int (const char *, int) -+smbc_urldecode: int (char *, char *, size_t) -+smbc_urlencode: int (char *, char *, int) -+smbc_utime: int (const char *, struct utimbuf *) -+smbc_utimes: int (const char *, struct timeval *) -+smbc_version: const char *(void) -+smbc_write: ssize_t (int, const void *, size_t) -diff --git a/source3/libsmb/libsmb_setget.c b/source3/libsmb/libsmb_setget.c -index 60b822a395c..b1c4ff3b557 100644 ---- a/source3/libsmb/libsmb_setget.c -+++ b/source3/libsmb/libsmb_setget.c -@@ -526,6 +526,24 @@ smbc_setOptionUseNTHash(SMBCCTX *c, smbc_bool b) - } - } - -+smbc_bool -+smbc_setOptionProtocols(SMBCCTX *c, -+ const char *min_proto, -+ const char *max_proto) -+{ -+ bool ok = true; -+ -+ if (min_proto != NULL) { -+ ok = lp_set_cmdline("client min protocol", min_proto); -+ } -+ -+ if (max_proto != NULL) { -+ ok &= lp_set_cmdline("client min protocol", max_proto); -+ } -+ -+ return ok; -+} -+ - /** Get the function for obtaining authentication data */ - smbc_get_auth_data_fn - smbc_getFunctionAuthData(SMBCCTX *c) -diff --git a/source3/libsmb/wscript b/source3/libsmb/wscript -index 5482aea7d9c..298afc3c0e3 100644 ---- a/source3/libsmb/wscript -+++ b/source3/libsmb/wscript -@@ -27,5 +27,5 @@ def build(bld): - public_headers='../include/libsmbclient.h', - abi_directory='ABI', - abi_match='smbc_*', -- vnum='0.4.0', -+ vnum='0.5.0', - pc_files='smbclient.pc') --- -2.19.2 - diff --git a/SOURCES/samba-4.9-fix_winbind_passdb_segfault.patch b/SOURCES/samba-4.9-fix_winbind_passdb_segfault.patch deleted file mode 100644 index 3d678a2..0000000 --- a/SOURCES/samba-4.9-fix_winbind_passdb_segfault.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 38e6908f259b2bdbdba38a856b9d67585453af9a Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 29 Oct 2018 19:45:58 +0100 -Subject: [PATCH] s3:winbind: Check return code of initialize_password_db() - -See https://retrace.fedoraproject.org/faf/reports/1577174/ - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13668 - -Signed-off-by: Andreas Schneider -Reviewed-by: Jeremy Allison - -(cherry picked from commit ba17cae4cab686b8d018c39d16706e621f9f93ac) ---- - source3/winbindd/winbindd.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c -index 254d93b344d..a8ffc31778c 100644 ---- a/source3/winbindd/winbindd.c -+++ b/source3/winbindd/winbindd.c -@@ -1845,7 +1845,13 @@ int main(int argc, const char **argv) - if (!NT_STATUS_IS_OK(status)) { - exit_daemon("Winbindd reinit_after_fork() failed", map_errno_from_nt_status(status)); - } -- initialize_password_db(true, server_event_context()); -+ -+ ok = initialize_password_db(true, server_event_context()); -+ if (!ok) { -+ exit_daemon("Failed to initialize passdb backend! " -+ "Check the 'passdb backend' variable in your " -+ "smb.conf file.", EINVAL); -+ } - - /* - * Do not initialize the parent-child-pipe before becoming --- -2.19.1 - diff --git a/SOURCES/samba-4.9-harden_homes_share.patch b/SOURCES/samba-4.9-harden_homes_share.patch deleted file mode 100644 index 60ca5c6..0000000 --- a/SOURCES/samba-4.9-harden_homes_share.patch +++ /dev/null @@ -1,402 +0,0 @@ -From b67bc28be3e0ab40e14f698951c9ba057ea8321d Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Thu, 15 Nov 2018 16:06:49 +0100 -Subject: [PATCH 1/4] selftest: Add gooduser and eviluser to Samba3 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 - -Signed-off-by: Andreas Schneider -Reviewed-by: Ralph Böhme -Reviewed-by: Jeremy Allison -(cherry picked from commit 3b38dddff2c1d1b51aed96368b358f349682bea0) ---- - selftest/target/Samba3.pm | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm -index 438cb3409bb..373f8152ca3 100755 ---- a/selftest/target/Samba3.pm -+++ b/selftest/target/Samba3.pm -@@ -1610,8 +1610,10 @@ sub provision($$$$$$$$$) - my ($gid_force_user); - my ($uid_user1); - my ($uid_user2); -+ my ($uid_gooduser); -+ my ($uid_eviluser); - -- if ($unix_uid < 0xffff - 10) { -+ if ($unix_uid < 0xffff - 12) { - $max_uid = 0xffff; - } else { - $max_uid = $unix_uid; -@@ -1627,6 +1629,8 @@ sub provision($$$$$$$$$) - $uid_smbget = $max_uid - 8; - $uid_user1 = $max_uid - 9; - $uid_user2 = $max_uid - 10; -+ $uid_gooduser = $max_uid - 11; -+ $uid_eviluser = $max_uid - 12; - - if ($unix_gids[0] < 0xffff - 8) { - $max_gid = 0xffff; -@@ -2248,6 +2252,8 @@ force_user:x:$uid_force_user:$gid_force_user:force user gecos:$prefix_abs:/bin/f - smbget_user:x:$uid_smbget:$gid_domusers:smbget_user gecos:$prefix_abs:/bin/false - user1:x:$uid_user1:$gid_nogroup:user1 gecos:$prefix_abs:/bin/false - user2:x:$uid_user2:$gid_nogroup:user2 gecos:$prefix_abs:/bin/false -+gooduser:x:$uid_gooduser:$gid_domusers:gooduser gecos:$prefix_abs:/bin/false -+eviluser:x:$uid_eviluser:$gid_domusers:eviluser gecos::/bin/false - "; - if ($unix_uid != 0) { - print PASSWD "root:x:$uid_root:$gid_root:root gecos:$prefix_abs:/bin/false -@@ -2324,6 +2330,8 @@ force_user:x:$gid_force_user: - createuser($self, "smbget_user", $password, $conffile, \%createuser_env) || die("Unable to create smbget_user"); - createuser($self, "user1", $password, $conffile, \%createuser_env) || die("Unable to create user1"); - createuser($self, "user2", $password, $conffile, \%createuser_env) || die("Unable to create user2"); -+ createuser($self, "gooduser", $password, $conffile, \%createuser_env) || die("Unable to create gooduser"); -+ createuser($self, "eviluser", $password, $conffile, \%createuser_env) || die("Unable to create eviluser"); - - open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list"); - print DNS_UPDATE_LIST "A $server. $server_ip\n"; --- -2.19.2 - - -From ca57b6e4f02c725a3f47b8dde01d4b70dce42784 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Fri, 16 Nov 2018 15:40:59 +0100 -Subject: [PATCH 2/4] s3:tests: Test for users connecting to their 'homes' - share -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This adds a test for CVE-2009-2813. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 - -Signed-off-by: Andreas Schneider -Reviewed-by: Ralph Böhme -(cherry picked from commit cc471448df91c43fe38e2fcdf9b3874636ca51a6) ---- - selftest/target/Samba3.pm | 4 ++ - source3/script/tests/test_homes.sh | 99 ++++++++++++++++++++++++++++++ - source3/selftest/tests.py | 1 + - 3 files changed, 104 insertions(+) - create mode 100755 source3/script/tests/test_homes.sh - -diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm -index 373f8152ca3..2031003210c 100755 ---- a/selftest/target/Samba3.pm -+++ b/selftest/target/Samba3.pm -@@ -921,6 +921,10 @@ sub setup_fileserver - comment = inherit only unix owner - inherit owner = unix only - acl_xattr:ignore system acls = yes -+[homes] -+ comment = Home directories -+ browseable = No -+ read only = No - "; - - my $vars = $self->provision($path, "WORKGROUP", -diff --git a/source3/script/tests/test_homes.sh b/source3/script/tests/test_homes.sh -new file mode 100755 -index 00000000000..06de0a0c301 ---- /dev/null -+++ b/source3/script/tests/test_homes.sh -@@ -0,0 +1,99 @@ -+#!/bin/sh -+ -+# Copyright (c) Andreas Schneider -+# License: GPLv3 -+ -+if [ $# -lt 7 ]; then -+ echo "Usage: test_homes.sh SERVER USERNAME PASSWORD LOCAL_PATH PREFIX SMBCLIENT CONFIGURATION" -+ exit 1 -+fi -+ -+SERVER="${1}" -+USERNAME="${2}" -+PASSWORD="${3}" -+LOCAL_PATH="${4}" -+PREFIX="${5}" -+SMBCLIENT="${6}" -+CONFIGURATION="${7}" -+shift 7 -+ -+incdir=`dirname $0`/../../../testprogs/blackbox -+. $incdir/subunit.sh -+ -+failed=0 -+ -+test_gooduser_home() -+{ -+ tmpfile=$PREFIX/smbclient_homes_gooduser_commands -+ cat > $tmpfile < $tmpfile < -Date: Thu, 22 Nov 2018 18:23:24 +0100 -Subject: [PATCH 3/4] s3:smbd: Make sure we do not export "/" (root) as home - dir -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -If "/" (root) is returned as the home directory, prevent exporting it. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 - -Signed-off-by: Andreas Schneider -Reviewed-by: Ralph Böhme -(cherry picked from commit 99695528f7453023446956d5f8f0656574e243af) ---- - source3/param/service.c | 6 +++++- - source3/smbd/password.c | 7 +++++++ - 2 files changed, 12 insertions(+), 1 deletion(-) - -diff --git a/source3/param/service.c b/source3/param/service.c -index b21be6093d4..22f46f08894 100644 ---- a/source3/param/service.c -+++ b/source3/param/service.c -@@ -149,7 +149,11 @@ int find_service(TALLOC_CTX *ctx, const char *service_in, char **p_service_out) - DEBUG(3,("checking for home directory %s gave %s\n",*p_service_out, - phome_dir?phome_dir:"(NULL)")); - -- iService = add_home_service(*p_service_out,*p_service_out /* 'username' */, phome_dir); -+ if (!strequal(phome_dir, "/")) { -+ iService = add_home_service(*p_service_out, -+ *p_service_out, /* username */ -+ phome_dir); -+ } - } - - /* If we still don't have a service, attempt to add it as a printer. */ -diff --git a/source3/smbd/password.c b/source3/smbd/password.c -index f472bda2c70..0576d2563eb 100644 ---- a/source3/smbd/password.c -+++ b/source3/smbd/password.c -@@ -129,6 +129,13 @@ int register_homes_share(const char *username) - return -1; - } - -+ if (strequal(pwd->pw_dir, "/")) { -+ DBG_NOTICE("Invalid home directory defined for user '%s'\n", -+ username); -+ TALLOC_FREE(pwd); -+ return -1; -+ } -+ - DEBUG(3, ("Adding homes service for user '%s' using home directory: " - "'%s'\n", username, pwd->pw_dir)); - --- -2.19.2 - - -From e26c6aa97e57432d2f2fee2eba870ba76c9b8d41 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 3 Dec 2018 11:05:46 +0100 -Subject: [PATCH 4/4] s3:tests: Add test for checking that root is not allowed - as home dir -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13699 - -Signed-off-by: Andreas Schneider -Reviewed-by: Ralph Böhme -Reviewed-by: Jeremy Allison - -Autobuild-User(master): Jeremy Allison -Autobuild-Date(master): Wed Dec 5 05:22:43 CET 2018 on sn-devel-144 - -(cherry picked from commit a92f0ccce606be12e851a4100fbb44b069c5fe87) ---- - selftest/target/Samba3.pm | 6 ++++- - source3/script/tests/test_homes.sh | 37 ++++++++++++++++++++++++++++++ - 2 files changed, 42 insertions(+), 1 deletion(-) - -diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm -index 2031003210c..583396b3818 100755 ---- a/selftest/target/Samba3.pm -+++ b/selftest/target/Samba3.pm -@@ -1616,8 +1616,9 @@ sub provision($$$$$$$$$) - my ($uid_user2); - my ($uid_gooduser); - my ($uid_eviluser); -+ my ($uid_slashuser); - -- if ($unix_uid < 0xffff - 12) { -+ if ($unix_uid < 0xffff - 13) { - $max_uid = 0xffff; - } else { - $max_uid = $unix_uid; -@@ -1635,6 +1636,7 @@ sub provision($$$$$$$$$) - $uid_user2 = $max_uid - 10; - $uid_gooduser = $max_uid - 11; - $uid_eviluser = $max_uid - 12; -+ $uid_slashuser = $max_uid - 13; - - if ($unix_gids[0] < 0xffff - 8) { - $max_gid = 0xffff; -@@ -2258,6 +2260,7 @@ user1:x:$uid_user1:$gid_nogroup:user1 gecos:$prefix_abs:/bin/false - user2:x:$uid_user2:$gid_nogroup:user2 gecos:$prefix_abs:/bin/false - gooduser:x:$uid_gooduser:$gid_domusers:gooduser gecos:$prefix_abs:/bin/false - eviluser:x:$uid_eviluser:$gid_domusers:eviluser gecos::/bin/false -+slashuser:x:$uid_slashuser:$gid_domusers:slashuser gecos:/:/bin/false - "; - if ($unix_uid != 0) { - print PASSWD "root:x:$uid_root:$gid_root:root gecos:$prefix_abs:/bin/false -@@ -2336,6 +2339,7 @@ force_user:x:$gid_force_user: - createuser($self, "user2", $password, $conffile, \%createuser_env) || die("Unable to create user2"); - createuser($self, "gooduser", $password, $conffile, \%createuser_env) || die("Unable to create gooduser"); - createuser($self, "eviluser", $password, $conffile, \%createuser_env) || die("Unable to create eviluser"); -+ createuser($self, "slashuser", $password, $conffile, \%createuser_env) || die("Unable to create slashuser"); - - open(DNS_UPDATE_LIST, ">$prefix/dns_update_list") or die("Unable to open $$prefix/dns_update_list"); - print DNS_UPDATE_LIST "A $server. $server_ip\n"; -diff --git a/source3/script/tests/test_homes.sh b/source3/script/tests/test_homes.sh -index 06de0a0c301..90e84550dbc 100755 ---- a/source3/script/tests/test_homes.sh -+++ b/source3/script/tests/test_homes.sh -@@ -88,6 +88,39 @@ EOF - return 0 - } - -+test_slashuser_home() -+{ -+ tmpfile=$PREFIX/smbclient_homes_slashuser_commands -+ cat > $tmpfile < -Date: Mon, 12 Nov 2018 10:09:23 +0100 -Subject: [PATCH 1/5] s3:rpcclient: Initialize domain_name - -This could be passed uninitialized to dcerpc_netr_DsRGetDCName() - -Found by cppcheck. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 56ac8944eb58f234422b4bd4dd9a64b8e51e874d) ---- - source3/rpcclient/cmd_netlogon.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c -index 8d62ef7e095..631740562c6 100644 ---- a/source3/rpcclient/cmd_netlogon.c -+++ b/source3/rpcclient/cmd_netlogon.c -@@ -216,7 +216,7 @@ static WERROR cmd_netlogon_dsr_getdcname(struct rpc_pipe_client *cli, - WERROR werr = WERR_OK; - uint32_t flags = DS_RETURN_DNS_NAME; - const char *server_name = cli->desthost; -- const char *domain_name; -+ const char *domain_name = NULL; - struct GUID domain_guid = GUID_zero(); - struct GUID site_guid = GUID_zero(); - struct netr_DsRGetDCNameInfo *info = NULL; --- -2.19.2 - - -From f14942265b08710d4e9bf6b17219f65b5ea79e01 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 12 Nov 2018 10:13:51 +0100 -Subject: [PATCH 2/5] librpc:ndr: Initialize inblob - -Found by cppcheck. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 9c37ed26f0a814f77c934ae190f48d0a1e673f83) ---- - librpc/ndr/ndr_backupkey.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/librpc/ndr/ndr_backupkey.c b/librpc/ndr/ndr_backupkey.c -index 827bc694230..adb6e393287 100644 ---- a/librpc/ndr/ndr_backupkey.c -+++ b/librpc/ndr/ndr_backupkey.c -@@ -58,7 +58,9 @@ _PUBLIC_ void ndr_print_bkrp_BackupKey(struct ndr_print *ndr, const char *name, - ndr->flags |= LIBNDR_PRINT_SET_VALUES; - } - if (flags & NDR_IN) { -- union bkrp_data_in_blob inblob; -+ union bkrp_data_in_blob inblob = { -+ .empty._empty_ = '\0', -+ }; - DATA_BLOB blob; - uint32_t level; - enum ndr_err_code ndr_err; --- -2.19.2 - - -From 865ad3bb69c487589f24c755b2082fe51e5a261a Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 12 Nov 2018 10:16:06 +0100 -Subject: [PATCH 3/5] libgpo: Make sure status is intialized - -Found by cppcheck. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 159f753732cdc1e4491f93617779861fb9d73bc7) ---- - libgpo/gpo_ldap.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgpo/gpo_ldap.c b/libgpo/gpo_ldap.c -index fec00053b49..f087203f28a 100644 ---- a/libgpo/gpo_ldap.c -+++ b/libgpo/gpo_ldap.c -@@ -474,7 +474,7 @@ ADS_STATUS ads_get_gpo(ADS_STRUCT *ads, - const char *guid_name, - struct GROUP_POLICY_OBJECT *gpo) - { -- ADS_STATUS status; -+ ADS_STATUS status = ADS_ERROR(LDAP_NO_SUCH_OBJECT); - LDAPMessage *res = NULL; - char *dn; - const char *filter; --- -2.19.2 - - -From b40b21c5b2f6ed6e4e123cb55d9279f88b3e5c3b Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 12 Nov 2018 10:17:37 +0100 -Subject: [PATCH 4/5] lib:util Always initialize start and space - -Found by cppcheck. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 050d1e7d53c068efac109ec4ff7a686d152e6a45) ---- - lib/util/talloc_report.c | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/lib/util/talloc_report.c b/lib/util/talloc_report.c -index 63213a014b6..bed0fd91e43 100644 ---- a/lib/util/talloc_report.c -+++ b/lib/util/talloc_report.c -@@ -33,8 +33,8 @@ static char *talloc_vasprintf_append_largebuf(char *buf, ssize_t *pstr_len, - const char *fmt, va_list ap) - { - ssize_t str_len = *pstr_len; -- size_t buflen, needed, space; -- char *start, *tmpbuf; -+ size_t buflen, needed, space = 0; -+ char *start = NULL, *tmpbuf = NULL; - va_list ap2; - int printlen; - -@@ -52,9 +52,6 @@ static char *talloc_vasprintf_append_largebuf(char *buf, ssize_t *pstr_len, - if (buflen > str_len) { - start = buf + str_len; - space = buflen - str_len; -- } else { -- start = NULL; -- space = 0; - } - - va_copy(ap2, ap); --- -2.19.2 - - -From 01c2b8c1920744b9b46e3b2010f0487f23aa865b Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 12 Nov 2018 10:21:15 +0100 -Subject: [PATCH 5/5] ctdb: Fix an out of bound array access - -Found by cppcheck. - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13680 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 008b9652cacdfd99e68db9d88f4e0c33eefa87e9) ---- - ctdb/common/logging.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/ctdb/common/logging.c b/ctdb/common/logging.c -index dc8c4f75058..55e5d541735 100644 ---- a/ctdb/common/logging.c -+++ b/ctdb/common/logging.c -@@ -85,7 +85,7 @@ const char *debug_level_to_string(int log_level) - { - int i; - -- for (i=0; ARRAY_SIZE(log_string_map); i++) { -+ for (i=0; i < ARRAY_SIZE(log_string_map); i++) { - if (log_string_map[i].log_level == log_level) { - return log_string_map[i].log_string; - } --- -2.19.2 diff --git a/SOURCES/samba-4.9.0rc5-stack-protector.patch b/SOURCES/samba-4.9.0rc5-stack-protector.patch deleted file mode 100644 index 51bc83a..0000000 --- a/SOURCES/samba-4.9.0rc5-stack-protector.patch +++ /dev/null @@ -1,117 +0,0 @@ -From e2dd47233f467e2ab80564968be4af6da6505161 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 3 Sep 2018 10:35:08 +0200 -Subject: [PATCH 1/2] waf: Check for -fstack-protect-strong support - -The -fstack-protector* flags are compiler only flags, don't pass them to -the linker. - -https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/ - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit 38e97f8b52e85bdfcf2d74a4fb3c848fa46ba371) ---- - buildtools/wafsamba/samba_autoconf.py | 36 ++++++++++++++------------- - 1 file changed, 19 insertions(+), 17 deletions(-) - -diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py -index c4391d0c4dc..bfd6f9710db 100644 ---- a/buildtools/wafsamba/samba_autoconf.py -+++ b/buildtools/wafsamba/samba_autoconf.py -@@ -674,23 +674,25 @@ def SAMBA_CONFIG_H(conf, path=None): - return - - # we need to build real code that can't be optimized away to test -- if conf.check(fragment=''' -- #include -- -- int main(void) -- { -- char t[100000]; -- while (fgets(t, sizeof(t), stdin)); -- return 0; -- } -- ''', -- execute=0, -- ccflags='-fstack-protector', -- ldflags='-fstack-protector', -- mandatory=False, -- msg='Checking if toolchain accepts -fstack-protector'): -- conf.ADD_CFLAGS('-fstack-protector') -- conf.ADD_LDFLAGS('-fstack-protector') -+ stack_protect_list = ['-fstack-protector-strong', '-fstack-protector'] -+ for stack_protect_flag in stack_protect_list: -+ flag_supported = conf.check(fragment=''' -+ #include -+ -+ int main(void) -+ { -+ char t[100000]; -+ while (fgets(t, sizeof(t), stdin)); -+ return 0; -+ } -+ ''', -+ execute=0, -+ ccflags=[ '-Werror', '-Wp,-D_FORTIFY_SOURCE=2', stack_protect_flag], -+ mandatory=False, -+ msg='Checking if compiler accepts %s' % (stack_protect_flag)) -+ if flag_supported: -+ conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag)) -+ break - - if Options.options.debug: - conf.ADD_CFLAGS('-g', testflags=True) --- -2.18.0 - - -From 09f3acb3497efb9ebb8a0d7d199726a8c318e4f8 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Mon, 3 Sep 2018 10:49:52 +0200 -Subject: [PATCH 2/2] waf: Add -fstack-clash-protection - -https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/ - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13601 - -Signed-off-by: Andreas Schneider -Reviewed-by: Andrew Bartlett -(cherry picked from commit fc4df251c88365142515a81bea1120b2b84cc4a0) ---- - buildtools/wafsamba/samba_autoconf.py | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/buildtools/wafsamba/samba_autoconf.py b/buildtools/wafsamba/samba_autoconf.py -index bfd6f9710db..f2b3ec8db8d 100644 ---- a/buildtools/wafsamba/samba_autoconf.py -+++ b/buildtools/wafsamba/samba_autoconf.py -@@ -694,6 +694,23 @@ def SAMBA_CONFIG_H(conf, path=None): - conf.ADD_CFLAGS('-Wp,-D_FORTIFY_SOURCE=2 %s' % (stack_protect_flag)) - break - -+ flag_supported = conf.check(fragment=''' -+ #include -+ -+ int main(void) -+ { -+ char t[100000]; -+ while (fgets(t, sizeof(t), stdin)); -+ return 0; -+ } -+ ''', -+ execute=0, -+ ccflags=[ '-Werror', '-fstack-clash-protection'], -+ mandatory=False, -+ msg='Checking if compiler accepts -fstack-clash-protection') -+ if flag_supported: -+ conf.ADD_CFLAGS('-fstack-clash-protection') -+ - if Options.options.debug: - conf.ADD_CFLAGS('-g', testflags=True) - --- -2.18.0 - diff --git a/SOURCES/samba-4.9.1.tar.asc b/SOURCES/samba-4.9.1.tar.asc deleted file mode 100644 index 3a95975..0000000 --- a/SOURCES/samba-4.9.1.tar.asc +++ /dev/null @@ -1,6 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iFwEABECABwFAluomosVHHNhbWJhLWJ1Z3NAc2FtYmEub3JnAAoJEG8zkVtlaLfq -Ef0AoLUiZNu1bqD0YjbzI8KCisfwPF/2AKDGrFuyL4ds6Ege/OiUbg7krCXrOg== -=2NTz ------END PGP SIGNATURE----- diff --git a/SOURCES/samba-4.9_fix_debug_segfault.patch b/SOURCES/samba-4.9_fix_debug_segfault.patch deleted file mode 100644 index edbbd33..0000000 --- a/SOURCES/samba-4.9_fix_debug_segfault.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 99c354431703a4408f0208e3f2b06a9da81937f2 Mon Sep 17 00:00:00 2001 -From: Andreas Schneider -Date: Wed, 7 Nov 2018 14:32:29 +0100 -Subject: [PATCH] lib:util: Fix DEBUGCLASS pointer initializiation - -This fixes a segfault in pyglue: - -==10142== Process terminating with default action of signal 11 (SIGSEGV) -==10142== Bad permissions for mapped region at address 0x6F00A20 -==10142== at 0x6F1074B: py_set_debug_level (pyglue.c:165) - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13679 - -Signed-off-by: Andreas Schneider -Reviewed-by: Jeremy Allison -(cherry picked from commit 71ef09c1afdbf967b829cb66b33c3a5cb1c18ba0) ---- - lib/util/debug.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/lib/util/debug.c b/lib/util/debug.c -index d41e0f99c77..847ec1f0a0c 100644 ---- a/lib/util/debug.c -+++ b/lib/util/debug.c -@@ -557,10 +557,10 @@ static const char *default_classname_table[] = { - * This is to allow reading of DEBUGLEVEL_CLASS before the debug - * system has been initialized. - */ --static const int debug_class_list_initial[ARRAY_SIZE(default_classname_table)]; -+static int debug_class_list_initial[ARRAY_SIZE(default_classname_table)]; - - static size_t debug_num_classes = 0; --int *DEBUGLEVEL_CLASS = discard_const_p(int, debug_class_list_initial); -+int *DEBUGLEVEL_CLASS = debug_class_list_initial; - - - /* -------------------------------------------------------------------------- ** --- -2.19.1 - diff --git a/SPECS/samba.spec b/SPECS/samba.spec index 0e77cab..272e322 100644 --- a/SPECS/samba.spec +++ b/SPECS/samba.spec @@ -6,13 +6,13 @@ # ctdb is enabled by default, you can disable it with: --without clustering %bcond_without clustering -%define main_release 8 +%define main_release 1 -%define samba_version 4.9.1 -%define talloc_version 2.1.14 -%define tdb_version 1.3.16 -%define tevent_version 0.9.37 -%define ldb_version 1.4.2 +%define samba_version 4.10.4 +%define talloc_version 2.1.16 +%define tdb_version 1.3.18 +%define tevent_version 0.9.39 +%define ldb_version 1.5.4 # This should be rc1 or nil %define pre_release %nil @@ -58,13 +58,12 @@ %global with_intel_aes_accel 1 %endif -%global libwbc_alternatives_version 0.14 +%global libwbc_alternatives_version 0.15 %global libwbc_alternatives_suffix %nil %if 0%{?__isa_bits} == 64 %global libwbc_alternatives_suffix -64 %endif -%global with_mitkrb5 1 %global with_dc 1 %if 0%{?rhel} @@ -83,8 +82,6 @@ %global with_clustering_support 1 %endif -%{!?python2_sitearch: %define python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} - %global _systemd_extra "Environment=KRB5CCNAME=FILE:/run/samba/krb5cc_samba" Name: samba @@ -119,15 +116,9 @@ Source12: smb.conf.example Source13: pam_winbind.conf Source14: samba.pamd -Source200: README.dc Source201: README.downgrade -Patch0: samba-4.9.0rc5-stack-protector.patch -Patch1: samba-4.9-fix_winbind_passdb_segfault.patch -Patch2: samba-4.9_fix_debug_segfault.patch -Patch3: samba-4.9-harden_homes_share.patch -Patch4: samba-4.9-static_analysis_fixes.patch -Patch5: samba-4.9-add_smbc_setOptionProtocols.patch +Patch0: samba-4.10-fix_smbspool.patch Requires(pre): /usr/sbin/groupadd Requires(post): systemd @@ -185,32 +176,32 @@ BuildRequires: libnsl2-devel BuildRequires: libtirpc-devel BuildRequires: libuuid-devel BuildRequires: libxslt +BuildRequires: lmdb BuildRequires: ncurses-devel BuildRequires: openldap-devel BuildRequires: pam-devel BuildRequires: perl-interpreter BuildRequires: perl-generators -BuildRequires: perl(Test::More) +BuildRequires: perl(Archive::Tar) BuildRequires: perl(ExtUtils::MakeMaker) -# For pidl BuildRequires: perl(Parse::Yapp) +BuildRequires: perl(Test::More) BuildRequires: popt-devel -BuildRequires: python2-devel BuildRequires: python3-devel %if %{with_dc} -BuildRequires: python2-dns -# Add python2-iso8601 to avoid that the -# version in Samba is being packaged -BuildRequires: python2-iso8601 # Add python3-iso8601 to avoid that the # version in Samba is being packaged BuildRequires: python3-iso8601 +BuildRequires: python3-subunit-test %endif # with_dc BuildRequires: quota-devel BuildRequires: readline-devel BuildRequires: rpcgen BuildRequires: rpcsvc-proto-devel BuildRequires: sed +BuildRequires: libtasn1-devel +# We need asn1Parser +BuildRequires: libtasn1-tools BuildRequires: xfsprogs-devel BuildRequires: xz BuildRequires: zlib-devel >= 1.2.3 @@ -232,32 +223,30 @@ BuildRequires: gnutls-devel >= 3.4.7 BuildRequires: krb5-server >= %{required_mit_krb5} # Required by samba-tool to run tests -BuildRequires: python2-crypto BuildRequires: python3-crypto +%else +BuildRequires: gnutls-devel >= 3.2.0 %endif +# pidl requirements +BuildRequires: perl(Parse::Yapp) + BuildRequires: libtalloc-devel >= %{talloc_version} -BuildRequires: python2-talloc-devel >= %{talloc_version} BuildRequires: python3-talloc-devel >= %{talloc_version} BuildRequires: libtevent-devel >= %{tevent_version} -BuildRequires: python2-tevent >= %{tevent_version} BuildRequires: python3-tevent >= %{tevent_version} BuildRequires: libtdb-devel >= %{tdb_version} -BuildRequires: python2-tdb >= %{tdb_version} BuildRequires: python3-tdb >= %{tdb_version} BuildRequires: libldb-devel >= %{ldb_version} -BuildRequires: python2-ldb-devel >= %{ldb_version} BuildRequires: python3-ldb-devel >= %{ldb_version} %if %{with testsuite} BuildRequires: ldb-tools BuildRequires: tdb-tools -BuildRequires: python2-pygpgme -BuildRequires: python2-markdown -BuildRequires: python3-pygpgme +BuildRequires: python3-gpg BuildRequires: python3-markdown %endif @@ -285,6 +274,9 @@ Requires: %{name}-client-libs = %{samba_depver} %if %with_libsmbclient Requires: libsmbclient = %{samba_depver} %endif +%if %with_libwbclient +Requires: libwbclient = %{samba_depver} +%endif Provides: samba4-client = %{samba_depver} Obsoletes: samba4-client < %{samba_depver} @@ -322,6 +314,12 @@ Requires(post): systemd Provides: samba4-common = %{samba_depver} Obsoletes: samba4-common < %{samba_depver} +%if ! %{with_dc} +Obsoletes: samba-dc < %{samba_depver} +Obsoletes: samba-dc-libs < %{samba_depver} +Obsoletes: samba-dc-bind-dlz < %{samba_depver} +%endif + %description common samba-common provides files necessary for both the server and client packages of Samba. @@ -355,34 +353,27 @@ The samba-common-tools package contains tools for Samba servers and SMB/CIFS clients. ### DC +%if %{with_dc} %package dc Summary: Samba AD Domain Controller Requires: %{name} = %{samba_depver} Requires: %{name}-libs = %{samba_depver} Requires: %{name}-dc-libs = %{samba_depver} Requires: %{name}-winbind = %{samba_depver} -# samb-tool needs tdbbackup +# samba-tool needs tdbbackup Requires: tdb-tools -%if %{with_dc} -# samba-tool requirements, explicitly require python2 right now -Requires: python2 -Requires: python2-%{name} = %{samba_depver} -Requires: python2-%{name}-dc = %{samba_depver} -Requires: python2-crypto +# samba-tool needs mdb_copy +Requires: lmdb +Requires: ldb-tools # Force using libldb version to be the same as build version # Otherwise LDB modules will not be loaded and samba-tool will fail # See bug 1507420 %requires_eq libldb -### Note that samba-dc right now cannot be used with Python 3 -### so we should make sure it does use python2 explicitly -%if 0 Requires: python3-crypto Requires: python3-%{name} = %{samba_depver} Requires: python3-%{name}-dc = %{samba_depver} -%endif Requires: krb5-server >= %{required_mit_krb5} -%endif Provides: samba4-dc = %{samba_depver} Obsoletes: samba4-dc < %{samba_depver} @@ -404,7 +395,6 @@ The %{name}-dc-libs package contains the libraries needed by the DC to link against the SMB, RPC and other protocols. ### DC-BIND -%if %with_dc %package dc-bind-dlz Summary: Bind DLZ module for Samba AD Requires: %{name}-common = %{samba_depver} @@ -449,8 +439,12 @@ Summary: Samba VFS module for GlusterFS Requires: glusterfs-api >= 3.4.0.16 Requires: glusterfs >= 3.4.0.16 Requires: %{name} = %{samba_depver} +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} Requires: %{name}-libs = %{samba_depver} +%if %with_libwbclient +Requires: libwbclient = %{samba_depver} +%endif Obsoletes: samba-glusterfs < %{samba_depver} Provides: samba-glusterfs = %{samba_depver} @@ -463,7 +457,8 @@ Samba VFS module for GlusterFS integration. %package krb5-printing Summary: Samba CUPS backend for printing with Kerberos Requires(pre): %{name}-client -Requires: %{name}-client +Requires: %{name}-client = %{samba_depver} +Requires: %{name}-client-libs = %{samba_depver} Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives @@ -476,6 +471,7 @@ the Kerberos credentials cache of the user issuing the print job. ### LIBS %package libs Summary: Samba libraries +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} %if %with_libwbclient Requires: libwbclient = %{samba_depver} @@ -494,7 +490,11 @@ against the SMB, RPC and other protocols provided by the Samba suite. Summary: The SMB client library Requires(pre): %{name}-common = %{samba_depver} Requires: %{name}-common = %{samba_depver} +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} +%if %with_libwbclient +Requires: libwbclient = %{samba_depver} +%endif %description -n libsmbclient The libsmbclient contains the SMB client library from the Samba suite. @@ -531,48 +531,6 @@ The libwbclient-devel package provides developer tools for the wbclient library. %endif # with_libwbclient -### PYTHON2 -%if %{with_dc} -### PYTHON 2 is required for Samba AD DC right now -%package -n python2-%{name} -Summary: Samba Python libraries -Requires: %{name} = %{samba_depver} -Requires: %{name}-client-libs = %{samba_depver} -Requires: %{name}-common-libs = %{samba_depver} -Requires: %{name}-libs = %{samba_depver} -Requires: python2-tevent -Requires: python2-tdb -Requires: python2-ldb -Requires: python2-talloc -Requires: python2-dns - -Provides: samba-python = %{samba_depver} -Obsoletes: samba-python < %{samba_depver} - -Provides: samba4-python = %{samba_depver} -Obsoletes: samba4-python < %{samba_depver} - -%description -n python2-%{name} -The %{name}-python package contains the Python libraries needed by programs -that use SMB, RPC and other Samba provided protocols in Python programs. - -%package -n python2-samba-test -Summary: Samba Python libraries -Requires: python2-%{name} = %{samba_depver} - -%description -n python2-samba-test -The python2-%{name}-test package contains the Python libraries used by the test suite of Samba. -If you want to run full set of Samba tests, you need to install this package. - -%package -n python2-samba-dc -Summary: Samba Python libraries for Samba AD -Requires: python2-%{name} = %{samba_depver} - -%description -n python2-samba-dc -The python2-%{name}-dc package contains the Python libraries needed by programs -to manage Samba AD. -%endif - ### PYTHON3 %package -n python3-%{name} Summary: Samba Python3 libraries @@ -585,6 +543,12 @@ Requires: python3-tevent Requires: python3-tdb Requires: python3-ldb Requires: python3-dns +%if %with_libsmbclient +Requires: libsmbclient = %{samba_depver} +%endif +%if %with_libwbclient +Requires: libwbclient = %{samba_depver} +%endif %description -n python3-%{name} The python3-%{name} package contains the Python 3 libraries needed by programs @@ -632,6 +596,7 @@ Requires: %{name} = %{samba_depver} Requires: %{name}-common = %{samba_depver} Requires: %{name}-winbind = %{samba_depver} +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} Requires: %{name}-libs = %{samba_depver} Requires: %{name}-test-libs = %{samba_depver} @@ -645,6 +610,8 @@ Requires: libsmbclient = %{samba_depver} %if %with_libwbclient Requires: libwbclient = %{samba_depver} %endif +Requires: python3-%{name} = %{version}-%{release} +Requires: perl(Archive::Tar) Provides: samba4-test = %{samba_depver} Obsoletes: samba4-test < %{samba_depver} @@ -656,8 +623,12 @@ packages of Samba. ### TEST-LIBS %package test-libs Summary: Libraries need by the testing tools for Samba servers and clients +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} Requires: %{name}-libs = %{samba_depver} +%if %with_libwbclient +Requires: libwbclient = %{samba_depver} +%endif Provides: %{name}-test-devel = %{samba_depver} Obsoletes: %{name}-test-devel < %{samba_depver} @@ -675,6 +646,7 @@ Requires: %{name}-common-tools = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} Requires: %{name}-libs = %{samba_depver} Requires: %{name}-winbind-modules = %{samba_depver} +Requires: libwbclient = %{samba_depver} Provides: samba4-winbind = %{samba_depver} Obsoletes: samba4-winbind < %{samba_depver} @@ -712,6 +684,7 @@ Requires: %{name}-winbind = %{samba_depver} %else Requires: %{name}-libs = %{samba_depver} %endif +Requires: samba-client-libs = %{samba_depver} Provides: samba4-winbind-krb5-locator = %{samba_depver} Obsoletes: samba4-winbind-krb5-locator < %{samba_depver} @@ -748,6 +721,7 @@ necessary to communicate to the Winbind Daemon %package -n ctdb Summary: A Clustered Database based on Samba's Trivial Database (TDB) +Requires: %{name}-common-libs = %{samba_depver} Requires: %{name}-client-libs = %{samba_depver} Requires: coreutils @@ -781,7 +755,8 @@ and use CTDB instead. %package -n ctdb-tests Summary: CTDB clustered database test suite -Requires: samba-client-libs = %{samba_depver} +Requires: %{name}-common-libs = %{samba_depver} +Requires: %{name}-client-libs = %{samba_depver} Requires: ctdb = %{samba_depver} Recommends: nc @@ -842,14 +817,6 @@ export python_LDFLAGS="$(echo %{__global_ldflags} | sed -e 's/-Wl,-z,defs//g')" # Use the gold linker export LDFLAGS="%{__global_ldflags} -fuse-ld=gold" -%if 0%{?rhel} -# Use Python 2 for the waf buildscript -pathfix.py -n -p -i %{__python2} buildtools/bin/waf -export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 -%endif # rhel - -export PYTHON=%{__python2} - %configure \ --enable-fhs \ --with-piddir=/run \ @@ -869,9 +836,8 @@ export PYTHON=%{__python2} %if (! %with_libsmbclient) || (! %with_libwbclient) --private-libraries=%{_samba_private_libraries} \ %endif -%if %with_mitkrb5 --with-system-mitkrb5 \ -%endif + --with-experimental-mit-ad-dc \ %if ! %with_dc --without-ad-dc \ %endif @@ -891,55 +857,20 @@ export PYTHON=%{__python2} --accel-aes=intelaesni \ %endif --with-systemd \ - --systemd-install-services \ - --with-systemddir=/usr/lib/systemd/system \ - --systemd-smb-extra=%{_systemd_extra} \ - --systemd-nmb-extra=%{_systemd_extra} \ - --systemd-winbind-extra=%{_systemd_extra} \ - --systemd-samba-extra=%{_systemd_extra} \ - --extra-python=%{__python3} + --systemd-install-services \ + --with-systemddir=/usr/lib/systemd/system \ + --systemd-smb-extra=%{_systemd_extra} \ + --systemd-nmb-extra=%{_systemd_extra} \ + --systemd-winbind-extra=%{_systemd_extra} \ + --systemd-samba-extra=%{_systemd_extra} make %{?_smp_mflags} %install rm -rf %{buildroot} -%if 0%{?rhel} -export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 -%endif # rhel -export PYTHON=%{__python2} - make %{?_smp_mflags} install DESTDIR=%{buildroot} -# Workaround: make sure all general Python shebangs are pointing to Python 2 -# otherwise it will not work when default python is different from Python 2. -# Samba tools aren't ready for Python 3 yet. -for i in %{buildroot}%{_bindir} %{buildroot}%{_sbindir} ; do - find $i \ - ! -name '*.pyc' -a \ - ! -name '*.pyo' -a \ - -type f -exec grep -qsm1 '^#!.*\bpython' {} \; \ - -exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!%{__python2}|' {} \; -done - -# FIXME: Remove Python3 files with bad syntax -# (needs to be done after install; before that the py2 and py3 versions -# are the same) -filenames=$(echo " - tests/dcerpc/integer.py - tests/dcerpc/unix.py -") -for file in $filenames; do - filename="%{buildroot}/%{python3_sitearch}/samba/$file" - if python3 -c "with open('$filename') as f: compile(f.read(), '$file', 'exec')"; then - echo "python3 compilation of $file succeeded unexpectedly" - exit 1 - else - echo "python3 compilation of $file failed, removing" - rm "$filename" - fi -done - install -d -m 0755 %{buildroot}/usr/{sbin,bin} install -d -m 0755 %{buildroot}%{_libdir}/security install -d -m 0755 %{buildroot}/var/lib/samba @@ -1011,11 +942,6 @@ install -m 0644 ctdb/config/ctdb.conf %{buildroot}%{_sysconfdir}/ctdb/ctdb.conf install -m 0644 %{SOURCE201} packaging/README.downgrade -%if ! %with_dc -install -m 0644 %{SOURCE200} packaging/README.dc -install -m 0644 %{SOURCE200} packaging/README.dc-libs -%endif - %if %with_clustering_support install -m 0644 ctdb/config/ctdb.service %{buildroot}%{_unitdir} %endif @@ -1041,33 +967,6 @@ for i in \ %{_libdir}/samba/ldb/ildap.so \ %{_libdir}/samba/ldb/ldbsamba_extensions.so \ %{_unitdir}/samba.service \ - %{python2_sitearch}/samba/dcerpc/dnsserver.so \ - %{python2_sitearch}/samba/dnsserver.py* \ - %{python2_sitearch}/samba/domain_update.py* \ - %{python2_sitearch}/samba/dsdb_dns.so \ - %{python2_sitearch}/samba/dsdb.so \ - %{python2_sitearch}/samba/forest_update.py* \ - %{python2_sitearch}/samba/gpclass.py* \ - %{python2_sitearch}/samba/gpo.so \ - %{python2_sitearch}/samba/gp_sec_ext.py* \ - %{python2_sitearch}/samba/kcc/debug.py* \ - %{python2_sitearch}/samba/kcc/graph.py* \ - %{python2_sitearch}/samba/kcc/graph_utils.py* \ - %{python2_sitearch}/samba/kcc/__init__.py* \ - %{python2_sitearch}/samba/kcc/kcc_utils.py* \ - %{python2_sitearch}/samba/kcc/ldif_import_export.py* \ - %{python2_sitearch}/samba/mdb_util.py* \ - %{python2_sitearch}/samba/ms_forest_updates_markdown.py* \ - %{python2_sitearch}/samba/ms_schema_markdown.py* \ - %{python2_sitearch}/samba/provision/backend.py* \ - %{python2_sitearch}/samba/provision/common.py* \ - %{python2_sitearch}/samba/provision/__init__.py* \ - %{python2_sitearch}/samba/provision/kerberos_implementation.py* \ - %{python2_sitearch}/samba/provision/kerberos.py* \ - %{python2_sitearch}/samba/provision/sambadns.py* \ - %{python2_sitearch}/samba/samdb.py* \ - %{python2_sitearch}/samba/schema.py* \ - %{python2_sitearch}/samba/web_server/__init__.py* \ %{python3_sitearch}/samba/dcerpc/dnsserver.*.so \ %{python3_sitearch}/samba/dnsserver.py \ %{python3_sitearch}/samba/domain_update.py \ @@ -1104,9 +1003,17 @@ for i in \ %{python3_sitearch}/samba/__pycache__/ms_schema_markdown.*.pyc \ %{python3_sitearch}/samba/__pycache__/remove_dc.*.pyc \ %{python3_sitearch}/samba/__pycache__/schema.*.pyc \ + %{python3_sitearch}/samba/__pycache__/uptodateness.*.pyc \ %{python3_sitearch}/samba/remove_dc.py \ %{python3_sitearch}/samba/samdb.py \ %{python3_sitearch}/samba/schema.py \ + %{python3_sitearch}/samba/third_party/iso8601/__init__.py \ + %{python3_sitearch}/samba/third_party/iso8601/__pycache__/__init__.*.pyc \ + %{python3_sitearch}/samba/third_party/iso8601/__pycache__/iso8601.*.pyc \ + %{python3_sitearch}/samba/third_party/iso8601/__pycache__/test_iso8601.*.pyc \ + %{python3_sitearch}/samba/third_party/iso8601/iso8601.py \ + %{python3_sitearch}/samba/third_party/iso8601/test_iso8601.py \ + %{python3_sitearch}/samba/uptodateness.py \ %{_sbindir}/samba-gpupdate \ ; do rm -f %{buildroot}$i @@ -1117,14 +1024,7 @@ done # the ldconfig-created links be recorded in the RPM. /sbin/ldconfig -N -n %{buildroot}%{_libdir} -# FIXME -find %{buildroot}%{python2_sitearch} -name "*.pyc" -print -delete - %if ! %with_dc -# Remove whole %python2_sitearch for non-DC build -# Also remove libraries specific to DC or only used for test generation -# but requiring Python 2 -rm -rf %{buildroot}%{python2_sitearch} for f in samba/libsamba-net-samba4.so \ samba/libsamba-python-samba4.so \ libsamba-policy.so* \ @@ -1133,20 +1033,8 @@ for f in samba/libsamba-net-samba4.so \ done %endif # ! with_dc -# FIXME: we need to clear linking smbtorture against python2 first -for i in %{buildroot}%{_bindir}/smbtorture \ - %{buildroot}%{_mandir}/man1/smbtorture.1* ; do - rm -f $i -done - - %if %{with testsuite} %check -%if 0%{?rhel} -export RHEL_ALLOW_PYTHON2_FOR_BUILD=1 -%endif # rhel -export PYTHON=%{__python2} - TDB_NO_FSYNC=1 make %{?_smp_mflags} test %endif # with testsuite @@ -1166,7 +1054,7 @@ TDB_NO_FSYNC=1 make %{?_smp_mflags} test getent group printadmin >/dev/null || groupadd -r printadmin || : %post common -/sbin/ldconfig +%{?ldconfig} %tmpfiles_create %{_tmpfilesdir}/samba.conf if [ -d /var/cache/samba ]; then mv /var/cache/samba/netsamlogon_cache.tdb /var/lib/samba/ 2>/dev/null @@ -1185,18 +1073,12 @@ if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove cups_backend_smb %{_bindir}/smbspool fi -%post client-libs -p /sbin/ldconfig - -%postun client-libs -p /sbin/ldconfig - -%post common-libs -p /sbin/ldconfig - -%postun common-libs -p /sbin/ldconfig +%ldconfig_scriptlets client-libs -%if %with_dc -%post dc-libs -p /sbin/ldconfig +%ldconfig_scriptlets common-libs -%postun dc-libs -p /sbin/ldconfig +%if %{with_dc} +%ldconfig_scriptlets dc-libs %post dc %systemd_post samba.service @@ -1206,7 +1088,7 @@ fi %postun dc %systemd_postun_with_restart samba.service -%endif +%endif # with_dc %post krb5-printing %{_sbindir}/update-alternatives --install %{_libexecdir}/samba/cups_backend_smb \ @@ -1218,14 +1100,10 @@ if [ $1 -eq 0 ] ; then %{_sbindir}/update-alternatives --remove cups_backend_smb %{_libexecdir}/samba/smbspool_krb5_wrapper fi -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig +%ldconfig_scriptlets libs %if %with_libsmbclient -%post -n libsmbclient -p /sbin/ldconfig - -%postun -n libsmbclient -p /sbin/ldconfig +%ldconfig_scriptlets -n libsmbclient %endif %if %with_libwbclient @@ -1238,7 +1116,7 @@ fi libwbclient.so.%{libwbc_alternatives_version}%{libwbc_alternatives_suffix} \ %{_libdir}/samba/wbclient/libwbclient.so.%{libwbc_alternatives_version} \ 10 -/sbin/ldconfig +%{?ldconfig} %preun -n libwbclient %{_sbindir}/update-alternatives \ @@ -1268,9 +1146,7 @@ fi %endif # with_libwbclient -%post test -p /sbin/ldconfig - -%postun test -p /sbin/ldconfig +%ldconfig_scriptlets test %pre winbind /usr/sbin/groupadd -g 88 wbpriv >/dev/null 2>&1 || : @@ -1301,9 +1177,7 @@ if [ $1 -eq 0 ]; then %{_sbindir}/update-alternatives --remove winbind_krb5_locator.so %{_libdir}/samba/krb5/winbind_krb5_locator.so fi -%post winbind-modules -p /sbin/ldconfig - -%postun winbind-modules -p /sbin/ldconfig +%ldconfig_scriptlets winbind-modules %if %with_clustering_support %post -n ctdb @@ -1321,7 +1195,7 @@ fi ### SAMBA %files %license COPYING -%doc README WHATSNEW.txt +%doc README.md WHATSNEW.txt %doc examples/autofs examples/LDAP examples/misc %doc examples/printer-accounting examples/printing %doc packaging/README.downgrade @@ -1358,6 +1232,7 @@ fi %{_libdir}/samba/vfs/fileid.so %{_libdir}/samba/vfs/fruit.so %{_libdir}/samba/vfs/full_audit.so +%{_libdir}/samba/vfs/glusterfs_fuse.so %{_libdir}/samba/vfs/linux_xfs_sgid.so %{_libdir}/samba/vfs/media_harmony.so %{_libdir}/samba/vfs/netatalk.so @@ -1395,7 +1270,6 @@ fi %{_mandir}/man8/vfs_aio_pthread.8* %{_mandir}/man8/vfs_audit.8* %{_mandir}/man8/vfs_btrfs.8* -%{_mandir}/man8/vfs_cacheprime.8* %{_mandir}/man8/vfs_cap.8* %{_mandir}/man8/vfs_catia.8* %{_mandir}/man8/vfs_commit.8* @@ -1407,13 +1281,11 @@ fi %{_mandir}/man8/vfs_fileid.8* %{_mandir}/man8/vfs_fruit.8* %{_mandir}/man8/vfs_full_audit.8* -%{_mandir}/man8/vfs_gpfs.8* +%{_mandir}/man8/vfs_glusterfs_fuse.8* %{_mandir}/man8/vfs_linux_xfs_sgid.8* %{_mandir}/man8/vfs_media_harmony.8* %{_mandir}/man8/vfs_netatalk.8* -%{_mandir}/man8/vfs_nfs4acl_xattr.8* %{_mandir}/man8/vfs_offline.8* -%{_mandir}/man8/vfs_prealloc.8* %{_mandir}/man8/vfs_preopen.8* %{_mandir}/man8/vfs_readahead.8* %{_mandir}/man8/vfs_readonly.8* @@ -1426,7 +1298,6 @@ fi %{_mandir}/man8/vfs_streams_xattr.8* %{_mandir}/man8/vfs_syncops.8* %{_mandir}/man8/vfs_time_audit.8* -%{_mandir}/man8/vfs_tsmsm.8* %{_mandir}/man8/vfs_unityed_media.8* %{_mandir}/man8/vfs_virusfilter.8* %{_mandir}/man8/vfs_worm.8* @@ -1446,6 +1317,7 @@ fi %files client %{_bindir}/cifsdd %{_bindir}/dbwrap_tool +%{_bindir}/dumpmscat %{_bindir}/findsmb %{_bindir}/mvxattr %{_bindir}/nmblookup @@ -1526,6 +1398,9 @@ fi %{_libdir}/samba/libcli-smb-common-samba4.so %{_libdir}/samba/libcli-spoolss-samba4.so %{_libdir}/samba/libcliauth-samba4.so +%{_libdir}/samba/libclidns-samba4.so +%{_libdir}/samba/libcluster-samba4.so +%{_libdir}/samba/libcmdline-contexts-samba4.so %{_libdir}/samba/libcmdline-credentials-samba4.so %{_libdir}/samba/libcommon-auth-samba4.so %{_libdir}/samba/libctdb-event-client-samba4.so @@ -1547,6 +1422,7 @@ fi %{_libdir}/samba/liblibsmb-samba4.so %{_libdir}/samba/libmessages-dgm-samba4.so %{_libdir}/samba/libmessages-util-samba4.so +%{_libdir}/samba/libmscat-samba4.so %{_libdir}/samba/libmsghdr-samba4.so %{_libdir}/samba/libmsrpc3-samba4.so %{_libdir}/samba/libndr-samba-samba4.so @@ -1621,6 +1497,7 @@ fi ### COMMON-libs %files common-libs # common libraries +%{_libdir}/samba/libpopt-samba3-cmdline-samba4.so %{_libdir}/samba/libpopt-samba3-samba4.so %if %{with_intel_aes_accel} %{_libdir}/samba/libaesni-intel-samba4.so @@ -1648,9 +1525,8 @@ fi %{_mandir}/man8/smbpasswd.8* ### DC +%if %{with_dc} %files dc - -%if %with_dc %{_unitdir}/samba.service %{_bindir}/samba-tool %{_sbindir}/samba @@ -1690,6 +1566,7 @@ fi %{_libdir}/samba/ldb/objectclass_attrs.so %{_libdir}/samba/ldb/objectguid.so %{_libdir}/samba/ldb/operational.so +%{_libdir}/samba/ldb/paged_results.so %{_libdir}/samba/ldb/partition.so %{_libdir}/samba/ldb/password_hash.so %{_libdir}/samba/ldb/ranged_results.so @@ -1720,13 +1597,9 @@ fi %{_mandir}/man8/samba.8* %{_mandir}/man8/samba-gpupdate.8* %{_mandir}/man8/samba-tool.8* -%else # with_dc -%doc packaging/README.dc -%endif # with_dc ### DC-LIBS %files dc-libs -%if %with_dc %{_libdir}/samba/libdb-glue-samba4.so %{_libdir}/samba/libprocess-model-samba4.so %{_libdir}/samba/libservice-samba4.so @@ -1753,12 +1626,8 @@ fi %{_libdir}/samba/libdsdb-module-samba4.so %{_libdir}/samba/libdsdb-garbage-collect-tombstones-samba4.so %{_libdir}/samba/libscavenge-dns-records-samba4.so -%else -%doc packaging/README.dc-libs -%endif # with_dc ### DC-BIND -%if %with_dc %files dc-bind-dlz %attr(770,root,named) %dir /var/lib/samba/bind-dns %dir %{_libdir}/samba/bind9 @@ -1766,6 +1635,7 @@ fi %{_libdir}/samba/bind9/dlz_bind9_9.so %{_libdir}/samba/bind9/dlz_bind9_10.so %{_libdir}/samba/bind9/dlz_bind9_11.so +%{_libdir}/samba/bind9/dlz_bind9_12.so %endif # with_dc ### DEVEL @@ -1838,16 +1708,14 @@ fi %{_includedir}/samba-4.0/util/byteorder.h %{_includedir}/samba-4.0/util/data_blob.h %{_includedir}/samba-4.0/util/debug.h +%{_includedir}/samba-4.0/util/discard.h %{_includedir}/samba-4.0/util/fault.h %{_includedir}/samba-4.0/util/genrand.h %{_includedir}/samba-4.0/util/idtree.h %{_includedir}/samba-4.0/util/idtree_random.h -%{_includedir}/samba-4.0/util/memory.h -%{_includedir}/samba-4.0/util/safe_string.h %{_includedir}/samba-4.0/util/signal.h %{_includedir}/samba-4.0/util/string_wrappers.h %{_includedir}/samba-4.0/util/substitute.h -%{_includedir}/samba-4.0/util/talloc_stack.h %{_includedir}/samba-4.0/util/tevent_ntstatus.h %{_includedir}/samba-4.0/util/tevent_unix.h %{_includedir}/samba-4.0/util/tevent_werror.h @@ -1887,9 +1755,6 @@ fi %{_includedir}/samba-4.0/dcerpc_server.h %{_libdir}/libdcerpc-server.so %{_libdir}/pkgconfig/dcerpc_server.pc - -%{_libdir}/libsamba-policy.so -%{_libdir}/pkgconfig/samba-policy.pc %endif %if ! %with_libsmbclient @@ -1927,7 +1792,6 @@ fi %{_libdir}/samba/libLIBWBCLIENT-OLD-samba4.so %{_libdir}/samba/libauth4-samba4.so %{_libdir}/samba/libauth-unix-token-samba4.so -%{_libdir}/samba/libcluster-samba4.so %{_libdir}/samba/libdcerpc-samba4.so %{_libdir}/samba/libnon-posix-acls-samba4.so %{_libdir}/samba/libshares-samba4.so @@ -1998,336 +1862,6 @@ fi %{_mandir}/man1/pidl* %{_mandir}/man3/Parse::Pidl* -### PYTHON2 -%if %{with_dc} -%files -n python2-%{name} -%{_libdir}/samba/libsamba-python-samba4.so -%{_libdir}/samba/libsamba-net-samba4.so -%{_libdir}/libsamba-policy.so.* - -%dir %{python2_sitearch}/samba -%{python2_sitearch}/samba/__init__.py* -%{python2_sitearch}/samba/_glue.so -%{python2_sitearch}/samba/_ldb.so -%{python2_sitearch}/samba/auth.so -%{python2_sitearch}/samba/colour.py* -%{python2_sitearch}/samba/common.py* -%{python2_sitearch}/samba/compat.py* -%{python2_sitearch}/samba/credentials.so -%{python2_sitearch}/samba/crypto.so -%{python2_sitearch}/samba/dbchecker.py* -%{python2_sitearch}/samba/descriptor.py* -%{python2_sitearch}/samba/drs_utils.py* -%{python2_sitearch}/samba/gensec.so -%{python2_sitearch}/samba/getopt.py* -%{python2_sitearch}/samba/graph.py* -%{python2_sitearch}/samba/hostconfig.py* -%{python2_sitearch}/samba/idmap.py* -%{python2_sitearch}/samba/join.py* -%{python2_sitearch}/samba/messaging.so -%{python2_sitearch}/samba/ms_display_specifiers.py* -%{python2_sitearch}/samba/ms_schema.py* -%{python2_sitearch}/samba/ndr.py* -%{python2_sitearch}/samba/net.so -%{python2_sitearch}/samba/netbios.so -%{python2_sitearch}/samba/ntacls.py* -%{python2_sitearch}/samba/ntstatus.so -%{python2_sitearch}/samba/param.so -%{python2_sitearch}/samba/policy.so -%{python2_sitearch}/samba/posix_eadb.so -%{python2_sitearch}/samba/registry.so -%{python2_sitearch}/samba/remove_dc.py* -%{python2_sitearch}/samba/sd_utils.py* -%{python2_sitearch}/samba/security.so -%{python2_sitearch}/samba/sites.py* -%{python2_sitearch}/samba/smb.so -%{python2_sitearch}/samba/subnets.py* -%{python2_sitearch}/samba/upgrade.py* -%{python2_sitearch}/samba/upgradehelpers.py* -%{python2_sitearch}/samba/werror.so -%{python2_sitearch}/samba/xattr.py* -%{python2_sitearch}/samba/xattr_native.so -%{python2_sitearch}/samba/xattr_tdb.so - -%dir %{python2_sitearch}/samba/dcerpc -%{python2_sitearch}/samba/dcerpc/__init__.py* -%{python2_sitearch}/samba/dcerpc/atsvc.so -%{python2_sitearch}/samba/dcerpc/auth.so -%{python2_sitearch}/samba/dcerpc/base.so -%{python2_sitearch}/samba/dcerpc/dcerpc.so -%{python2_sitearch}/samba/dcerpc/dfs.so -%{python2_sitearch}/samba/dcerpc/dns.so -%{python2_sitearch}/samba/dcerpc/dnsp.so -%{python2_sitearch}/samba/dcerpc/drsblobs.so -%{python2_sitearch}/samba/dcerpc/drsuapi.so -%{python2_sitearch}/samba/dcerpc/echo.so -%{python2_sitearch}/samba/dcerpc/epmapper.so -%{python2_sitearch}/samba/dcerpc/idmap.so -%{python2_sitearch}/samba/dcerpc/initshutdown.so -%{python2_sitearch}/samba/dcerpc/irpc.so -%{python2_sitearch}/samba/dcerpc/krb5pac.so -%{python2_sitearch}/samba/dcerpc/lsa.so -%{python2_sitearch}/samba/dcerpc/messaging.so -%{python2_sitearch}/samba/dcerpc/mgmt.so -%{python2_sitearch}/samba/dcerpc/misc.so -%{python2_sitearch}/samba/dcerpc/nbt.so -%{python2_sitearch}/samba/dcerpc/netlogon.so -%{python2_sitearch}/samba/dcerpc/ntlmssp.so -%{python2_sitearch}/samba/dcerpc/samr.so -%{python2_sitearch}/samba/dcerpc/security.so -%{python2_sitearch}/samba/dcerpc/server_id.so -%{python2_sitearch}/samba/dcerpc/smb_acl.so -%{python2_sitearch}/samba/dcerpc/srvsvc.so -%{python2_sitearch}/samba/dcerpc/svcctl.so -%{python2_sitearch}/samba/dcerpc/unixinfo.so -%{python2_sitearch}/samba/dcerpc/winbind.so -%{python2_sitearch}/samba/dcerpc/winreg.so -%{python2_sitearch}/samba/dcerpc/wkssvc.so -%{python2_sitearch}/samba/dcerpc/xattr.so - -%dir %{python2_sitearch}/samba/emulate -%{python2_sitearch}/samba/emulate/__init__.py* -%{python2_sitearch}/samba/emulate/traffic.py* -%{python2_sitearch}/samba/emulate/traffic_packets.py* - -%dir %{python2_sitearch}/samba/netcmd -%{python2_sitearch}/samba/netcmd/__init__.py* -%{python2_sitearch}/samba/netcmd/common.py* -%{python2_sitearch}/samba/netcmd/computer.py* -%{python2_sitearch}/samba/netcmd/dbcheck.py* -%{python2_sitearch}/samba/netcmd/delegation.py* -%{python2_sitearch}/samba/netcmd/dns.py* -%{python2_sitearch}/samba/netcmd/domain.py* -%{python2_sitearch}/samba/netcmd/domain_backup.py* -%{python2_sitearch}/samba/netcmd/drs.py* -%{python2_sitearch}/samba/netcmd/dsacl.py* -%{python2_sitearch}/samba/netcmd/forest.py* -%{python2_sitearch}/samba/netcmd/fsmo.py* -%{python2_sitearch}/samba/netcmd/gpo.py* -%{python2_sitearch}/samba/netcmd/group.py* -%{python2_sitearch}/samba/netcmd/ldapcmp.py* -%{python2_sitearch}/samba/netcmd/main.py* -%{python2_sitearch}/samba/netcmd/nettime.py* -%{python2_sitearch}/samba/netcmd/ntacl.py* -%{python2_sitearch}/samba/netcmd/ou.py* -%{python2_sitearch}/samba/netcmd/processes.py* -%{python2_sitearch}/samba/netcmd/pso.py* -%{python2_sitearch}/samba/netcmd/rodc.py* -%{python2_sitearch}/samba/netcmd/schema.py* -%{python2_sitearch}/samba/netcmd/sites.py* -%{python2_sitearch}/samba/netcmd/spn.py* -%{python2_sitearch}/samba/netcmd/testparm.py* -%{python2_sitearch}/samba/netcmd/user.py* -%{python2_sitearch}/samba/netcmd/visualize.py* - -%dir %{python2_sitearch}/samba/samba3 -%{python2_sitearch}/samba/samba3/__init__.py* -%{python2_sitearch}/samba/samba3/libsmb_samba_internal.so -%{python2_sitearch}/samba/samba3/param.so -%{python2_sitearch}/samba/samba3/passdb.so -%{python2_sitearch}/samba/samba3/smbd.so - -%dir %{python2_sitearch}/samba/subunit -%{python2_sitearch}/samba/subunit/__init__.py* -%{python2_sitearch}/samba/subunit/run.py* -%{python2_sitearch}/samba/tdb_util.py* - -%dir %{python2_sitearch}/samba/third_party -%{python2_sitearch}/samba/third_party/__init__.py* - -%if %{with_dc} -%files -n python2-%{name}-dc -%{python2_sitearch}/samba/domain_update.py* -%{python2_sitearch}/samba/dckeytab.so -%{python2_sitearch}/samba/dsdb.so -%{python2_sitearch}/samba/dsdb_dns.so -%{python2_sitearch}/samba/dnsserver.py* -%{python2_sitearch}/samba/forest_update.py* -%{python2_sitearch}/samba/gpclass.py* -%{python2_sitearch}/samba/gpo.so -%{python2_sitearch}/samba/gp_sec_ext.py* -%{python2_sitearch}/samba/mdb_util.py* -%{python2_sitearch}/samba/ms_forest_updates_markdown.py* -%{python2_sitearch}/samba/ms_schema_markdown.py* -%{python2_sitearch}/samba/samdb.py* -%{python2_sitearch}/samba/schema.py* - -%{python2_sitearch}/samba/dcerpc/dnsserver.so - -%dir %{python2_sitearch}/samba/kcc -%{python2_sitearch}/samba/kcc/__init__.py* -%{python2_sitearch}/samba/kcc/debug.py* -%{python2_sitearch}/samba/kcc/graph.py* -%{python2_sitearch}/samba/kcc/graph_utils.py* -%{python2_sitearch}/samba/kcc/kcc_utils.py* -%{python2_sitearch}/samba/kcc/ldif_import_export.py* - -%dir %{python2_sitearch}/samba/provision -%{python2_sitearch}/samba/provision/__init__.py* -%{python2_sitearch}/samba/provision/backend.py* -%{python2_sitearch}/samba/provision/common.py* -%{python2_sitearch}/samba/provision/kerberos.py* -%{python2_sitearch}/samba/provision/kerberos_implementation.py* -%{python2_sitearch}/samba/provision/sambadns.py* - -%dir %{python2_sitearch}/samba/web_server -%{python2_sitearch}/samba/web_server/__init__.py* -%endif - -%files -n python2-%{name}-test -%dir %{python2_sitearch}/samba/tests -%{python2_sitearch}/samba/tests/__init__.py* -%{python2_sitearch}/samba/tests/audit_log_base.py* -%{python2_sitearch}/samba/tests/audit_log_dsdb.py* -%{python2_sitearch}/samba/tests/audit_log_pass_change.py* -%{python2_sitearch}/samba/tests/auth.py* -%{python2_sitearch}/samba/tests/auth_log.py* -%{python2_sitearch}/samba/tests/auth_log_base.py* -%{python2_sitearch}/samba/tests/auth_log_ncalrpc.py* -%{python2_sitearch}/samba/tests/auth_log_netlogon.py* -%{python2_sitearch}/samba/tests/auth_log_netlogon_bad_creds.py* -%{python2_sitearch}/samba/tests/auth_log_pass_change.py* -%{python2_sitearch}/samba/tests/auth_log_samlogon.py* -%dir %{python2_sitearch}/samba/tests/blackbox -%{python2_sitearch}/samba/tests/blackbox/__init__.py* -%{python2_sitearch}/samba/tests/blackbox/check_output.py* -%{python2_sitearch}/samba/tests/blackbox/ndrdump.py* -%{python2_sitearch}/samba/tests/blackbox/samba_dnsupdate.py* -%{python2_sitearch}/samba/tests/blackbox/smbcontrol.py* -%{python2_sitearch}/samba/tests/blackbox/traffic_learner.py* -%{python2_sitearch}/samba/tests/blackbox/traffic_replay.py* -%{python2_sitearch}/samba/tests/blackbox/traffic_summary.py* -%{python2_sitearch}/samba/tests/common.py* -%{python2_sitearch}/samba/tests/core.py* -%{python2_sitearch}/samba/tests/credentials.py* -%dir %{python2_sitearch}/samba/tests/dcerpc -%{python2_sitearch}/samba/tests/dcerpc/__init__.py* -%{python2_sitearch}/samba/tests/dcerpc/array.py* -%{python2_sitearch}/samba/tests/dcerpc/bare.py* -%{python2_sitearch}/samba/tests/dcerpc/dnsserver.py* -%{python2_sitearch}/samba/tests/dcerpc/integer.py* -%{python2_sitearch}/samba/tests/dcerpc/misc.py* -%{python2_sitearch}/samba/tests/dcerpc/raw_protocol.py* -%{python2_sitearch}/samba/tests/dcerpc/raw_testcase.py* -%{python2_sitearch}/samba/tests/dcerpc/registry.py* -%{python2_sitearch}/samba/tests/dcerpc/rpc_talloc.py* -%{python2_sitearch}/samba/tests/dcerpc/rpcecho.py* -%{python2_sitearch}/samba/tests/dcerpc/sam.py* -%{python2_sitearch}/samba/tests/dcerpc/srvsvc.py* -%{python2_sitearch}/samba/tests/dcerpc/string.py* -%{python2_sitearch}/samba/tests/dcerpc/testrpc.py* -%{python2_sitearch}/samba/tests/dcerpc/unix.py* -%{python2_sitearch}/samba/tests/dckeytab.py* -%{python2_sitearch}/samba/tests/dns.py* -%{python2_sitearch}/samba/tests/dns_base.py* -%{python2_sitearch}/samba/tests/dns_forwarder.py* -%{python2_sitearch}/samba/tests/dns_invalid.py* -%dir %{python2_sitearch}/samba/tests/dns_forwarder_helpers -%{python2_sitearch}/samba/tests/dns_forwarder_helpers/server.py* -%{python2_sitearch}/samba/tests/dns_tkey.py* -%{python2_sitearch}/samba/tests/dns_wildcard.py* -%{python2_sitearch}/samba/tests/docs.py* -%{python2_sitearch}/samba/tests/domain_backup.py* -%{python2_sitearch}/samba/tests/dsdb.py* -%{python2_sitearch}/samba/tests/dsdb_lock.py* -%{python2_sitearch}/samba/tests/dsdb_schema_attributes.py* -%dir %{python2_sitearch}/samba/tests/emulate -%{python2_sitearch}/samba/tests/emulate/__init__.py* -%{python2_sitearch}/samba/tests/emulate/traffic.py* -%{python2_sitearch}/samba/tests/emulate/traffic_packet.py* -%{python2_sitearch}/samba/tests/encrypted_secrets.py* -%{python2_sitearch}/samba/tests/gensec.py* -%{python2_sitearch}/samba/tests/getdcname.py* -%{python2_sitearch}/samba/tests/get_opt.py* -%{python2_sitearch}/samba/tests/glue.py* -%{python2_sitearch}/samba/tests/gpo.py* -%{python2_sitearch}/samba/tests/graph.py* -%{python2_sitearch}/samba/tests/group_audit.py* -%{python2_sitearch}/samba/tests/hostconfig.py* -%{python2_sitearch}/samba/tests/join.py* -%dir %{python2_sitearch}/samba/tests/kcc -%{python2_sitearch}/samba/tests/kcc/__init__.py* -%{python2_sitearch}/samba/tests/kcc/graph.py* -%{python2_sitearch}/samba/tests/kcc/graph_utils.py* -%{python2_sitearch}/samba/tests/kcc/kcc_utils.py* -%{python2_sitearch}/samba/tests/kcc/ldif_import_export.py* -%{python2_sitearch}/samba/tests/krb5_credentials.py* -%{python2_sitearch}/samba/tests/libsmb_samba_internal.py* -%{python2_sitearch}/samba/tests/loadparm.py* -%{python2_sitearch}/samba/tests/lsa_string.py* -%{python2_sitearch}/samba/tests/messaging.py* -%{python2_sitearch}/samba/tests/net_join.py* -%{python2_sitearch}/samba/tests/net_join_no_spnego.py* -%{python2_sitearch}/samba/tests/netbios.py* -%{python2_sitearch}/samba/tests/netcmd.py* -%{python2_sitearch}/samba/tests/netlogonsvc.py* -%{python2_sitearch}/samba/tests/ntacls.py* -%{python2_sitearch}/samba/tests/ntacls_backup.py* -%{python2_sitearch}/samba/tests/ntlmdisabled.py* -%{python2_sitearch}/samba/tests/pam_winbind.py* -%{python2_sitearch}/samba/tests/pam_winbind_warn_pwd_expire.py* -%{python2_sitearch}/samba/tests/param.py* -%{python2_sitearch}/samba/tests/password_hash.py* -%{python2_sitearch}/samba/tests/password_hash_fl2003.py* -%{python2_sitearch}/samba/tests/password_hash_fl2008.py* -%{python2_sitearch}/samba/tests/password_hash_gpgme.py* -%{python2_sitearch}/samba/tests/password_hash_ldap.py* -%{python2_sitearch}/samba/tests/password_quality.py* -%{python2_sitearch}/samba/tests/password_test.py* -%{python2_sitearch}/samba/tests/policy.py* -%{python2_sitearch}/samba/tests/posixacl.py* -%{python2_sitearch}/samba/tests/provision.py* -%{python2_sitearch}/samba/tests/pso.py* -%{python2_sitearch}/samba/tests/py_credentials.py* -%{python2_sitearch}/samba/tests/registry.py* -%{python2_sitearch}/samba/tests/s3idmapdb.py* -%{python2_sitearch}/samba/tests/s3param.py* -%{python2_sitearch}/samba/tests/s3passdb.py* -%{python2_sitearch}/samba/tests/s3registry.py* -%{python2_sitearch}/samba/tests/s3windb.py* -%{python2_sitearch}/samba/tests/samba3sam.py* -%dir %{python2_sitearch}/samba/tests/samba_tool -%{python2_sitearch}/samba/tests/samba_tool/__init__.py* -%{python2_sitearch}/samba/tests/samba_tool/base.py* -%{python2_sitearch}/samba/tests/samba_tool/computer.py* -%{python2_sitearch}/samba/tests/samba_tool/demote.py* -%{python2_sitearch}/samba/tests/samba_tool/dnscmd.py* -%{python2_sitearch}/samba/tests/samba_tool/forest.py* -%{python2_sitearch}/samba/tests/samba_tool/fsmo.py* -%{python2_sitearch}/samba/tests/samba_tool/gpo.py* -%{python2_sitearch}/samba/tests/samba_tool/group.py* -%{python2_sitearch}/samba/tests/samba_tool/help.py* -%{python2_sitearch}/samba/tests/samba_tool/join.py* -%{python2_sitearch}/samba/tests/samba_tool/ntacl.py* -%{python2_sitearch}/samba/tests/samba_tool/ou.py* -%{python2_sitearch}/samba/tests/samba_tool/passwordsettings.py* -%{python2_sitearch}/samba/tests/samba_tool/processes.py* -%{python2_sitearch}/samba/tests/samba_tool/provision_password_check.py* -%{python2_sitearch}/samba/tests/samba_tool/rodc.py* -%{python2_sitearch}/samba/tests/samba_tool/schema.py* -%{python2_sitearch}/samba/tests/samba_tool/sites.py* -%{python2_sitearch}/samba/tests/samba_tool/timecmd.py* -%{python2_sitearch}/samba/tests/samba_tool/user.py* -%{python2_sitearch}/samba/tests/samba_tool/user_check_password_script.py* -%{python2_sitearch}/samba/tests/samba_tool/user_virtualCryptSHA.py* -%{python2_sitearch}/samba/tests/samba_tool/user_wdigest.py* -%{python2_sitearch}/samba/tests/samba_tool/visualize.py* -%{python2_sitearch}/samba/tests/samba_tool/visualize_drs.py* -%{python2_sitearch}/samba/tests/samdb.py* -%{python2_sitearch}/samba/tests/samdb_api.py* -%{python2_sitearch}/samba/tests/security.py* -%{python2_sitearch}/samba/tests/smb.py* -%{python2_sitearch}/samba/tests/source.py* -%{python2_sitearch}/samba/tests/strings.py* -%{python2_sitearch}/samba/tests/subunitrun.py* -%{python2_sitearch}/samba/tests/tdb_util.py* -%{python2_sitearch}/samba/tests/unicodenames.py* -%{python2_sitearch}/samba/tests/upgrade.py* -%{python2_sitearch}/samba/tests/upgradeprovision.py* -%{python2_sitearch}/samba/tests/upgradeprovisionneeddc.py* -%{python2_sitearch}/samba/tests/xattr.py* -%endif # rhel - ### PYTHON3 %files -n python3-%{name} %dir %{python3_sitearch}/samba/ @@ -2342,11 +1876,13 @@ fi %{python3_sitearch}/samba/__pycache__/drs_utils.*.pyc %{python3_sitearch}/samba/__pycache__/getopt.*.pyc %{python3_sitearch}/samba/__pycache__/gpclass.*.pyc +%{python3_sitearch}/samba/__pycache__/gp_ext_loader.*.pyc %{python3_sitearch}/samba/__pycache__/gp_sec_ext.*.pyc %{python3_sitearch}/samba/__pycache__/graph.*.pyc %{python3_sitearch}/samba/__pycache__/hostconfig.*.pyc %{python3_sitearch}/samba/__pycache__/idmap.*.pyc %{python3_sitearch}/samba/__pycache__/join.*.pyc +%{python3_sitearch}/samba/__pycache__/logger.*.pyc %{python3_sitearch}/samba/__pycache__/mdb_util.*.pyc %{python3_sitearch}/samba/__pycache__/ms_display_specifiers.*.pyc %{python3_sitearch}/samba/__pycache__/ms_schema.*.pyc @@ -2394,15 +1930,20 @@ fi %{python3_sitearch}/samba/dcerpc/nbt.*.so %{python3_sitearch}/samba/dcerpc/netlogon.*.so %{python3_sitearch}/samba/dcerpc/ntlmssp.*.so +%{python3_sitearch}/samba/dcerpc/preg.*.so %{python3_sitearch}/samba/dcerpc/samr.*.so %{python3_sitearch}/samba/dcerpc/security.*.so %{python3_sitearch}/samba/dcerpc/server_id.*.so %{python3_sitearch}/samba/dcerpc/smb_acl.*.so +%{python3_sitearch}/samba/dcerpc/spoolss.*.so %{python3_sitearch}/samba/dcerpc/srvsvc.*.so %{python3_sitearch}/samba/dcerpc/svcctl.*.so %{python3_sitearch}/samba/dcerpc/unixinfo.*.so %{python3_sitearch}/samba/dcerpc/winbind.*.so +%{python3_sitearch}/samba/dcerpc/windows_event_ids.*.so %{python3_sitearch}/samba/dcerpc/winreg.*.so +%{python3_sitearch}/samba/dcerpc/winspool.*.so +%{python3_sitearch}/samba/dcerpc/witness.*.so %{python3_sitearch}/samba/dcerpc/wkssvc.*.so %{python3_sitearch}/samba/dcerpc/xattr.*.so %{python3_sitearch}/samba/descriptor.py @@ -2429,6 +1970,22 @@ fi %{python3_sitearch}/samba/emulate/__init__.py %{python3_sitearch}/samba/emulate/traffic.py %{python3_sitearch}/samba/emulate/traffic_packets.py +%{python3_sitearch}/samba/gp_ext_loader.py +%dir %{python3_sitearch}/samba/gp_parse +%{python3_sitearch}/samba/gp_parse/__init__.py +%dir %{python3_sitearch}/samba/gp_parse/__pycache__ +%{python3_sitearch}/samba/gp_parse/__pycache__/__init__.*.pyc +%{python3_sitearch}/samba/gp_parse/__pycache__/gp_aas.*.pyc +%{python3_sitearch}/samba/gp_parse/__pycache__/gp_csv.*.pyc +%{python3_sitearch}/samba/gp_parse/__pycache__/gp_inf.*.pyc +%{python3_sitearch}/samba/gp_parse/__pycache__/gp_ini.*.pyc +%{python3_sitearch}/samba/gp_parse/__pycache__/gp_pol.*.pyc +%{python3_sitearch}/samba/gp_parse/gp_aas.py +%{python3_sitearch}/samba/gp_parse/gp_csv.py +%{python3_sitearch}/samba/gp_parse/gp_inf.py +%{python3_sitearch}/samba/gp_parse/gp_ini.py +%{python3_sitearch}/samba/gp_parse/gp_pol.py +%{python3_sitearch}/samba/logger.py %{python3_sitearch}/samba/mdb_util.py %{python3_sitearch}/samba/ms_display_specifiers.py %{python3_sitearch}/samba/ms_schema.py @@ -2515,8 +2072,20 @@ fi %{python3_sitearch}/samba/subunit/__pycache__/run.*.pyc %{python3_sitearch}/samba/subunit/run.py %{python3_sitearch}/samba/tdb_util.py +%dir %{python3_sitearch}/samba/third_party +%{python3_sitearch}/samba/third_party/__init__.py +%dir %{python3_sitearch}/samba/third_party/__pycache__ +%{python3_sitearch}/samba/third_party/__pycache__/__init__.*.pyc %{python3_sitearch}/samba/upgrade.py %{python3_sitearch}/samba/upgradehelpers.py +%dir %{python3_sitearch}/samba/web_server +%{python3_sitearch}/samba/web_server/__init__.py +%dir %{python3_sitearch}/samba/web_server/__pycache__ +%{python3_sitearch}/samba/web_server/__pycache__/__init__.*.pyc +%{python3_sitearch}/samba/werror.*.so +%{python3_sitearch}/samba/xattr.py +%{python3_sitearch}/samba/xattr_native.*.so +%{python3_sitearch}/samba/xattr_tdb.*.so # FIXME: # /usr/lib64/libsamba-policy.cpython-36m-x86-64-linux-gnu.so # /usr/lib64/libsamba-policy.cpython-36m-x86-64-linux-gnu.so.0 @@ -2544,6 +2113,7 @@ fi %{python3_sitearch}/samba/__pycache__/remove_dc.*.pyc %{python3_sitearch}/samba/__pycache__/samdb.*.pyc %{python3_sitearch}/samba/__pycache__/schema.*.pyc +%{python3_sitearch}/samba/__pycache__/uptodateness.*.pyc %{python3_sitearch}/samba/dcerpc/dnsserver.*.so %{python3_sitearch}/samba/dckeytab.*.so @@ -2588,6 +2158,7 @@ fi %{python3_sitearch}/samba/provision/__pycache__/sambadns.*.pyc %{python3_sitearch}/samba/remove_dc.py +%{python3_sitearch}/samba/uptodateness.py %endif %files -n python3-%{name}-test @@ -2607,6 +2178,7 @@ fi %{python3_sitearch}/samba/tests/__pycache__/auth_log_netlogon_bad_creds.*.pyc %{python3_sitearch}/samba/tests/__pycache__/auth_log_samlogon.*.pyc %{python3_sitearch}/samba/tests/__pycache__/common.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/complex_expressions.*.pyc %{python3_sitearch}/samba/tests/__pycache__/core.*.pyc %{python3_sitearch}/samba/tests/__pycache__/credentials.*.pyc %{python3_sitearch}/samba/tests/__pycache__/dckeytab.*.pyc @@ -2621,6 +2193,7 @@ fi %{python3_sitearch}/samba/tests/__pycache__/dsdb_schema_attributes.*.pyc %{python3_sitearch}/samba/tests/__pycache__/docs.*.pyc %{python3_sitearch}/samba/tests/__pycache__/domain_backup.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/domain_backup_offline.*.pyc %{python3_sitearch}/samba/tests/__pycache__/encrypted_secrets.*.pyc %{python3_sitearch}/samba/tests/__pycache__/gensec.*.pyc %{python3_sitearch}/samba/tests/__pycache__/get_opt.*.pyc @@ -2632,8 +2205,8 @@ fi %{python3_sitearch}/samba/tests/__pycache__/hostconfig.*.pyc %{python3_sitearch}/samba/tests/__pycache__/join.*.pyc %{python3_sitearch}/samba/tests/__pycache__/krb5_credentials.*.pyc -%{python3_sitearch}/samba/tests/__pycache__/libsmb_samba_internal.*.pyc %{python3_sitearch}/samba/tests/__pycache__/loadparm.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/libsmb.*.pyc %{python3_sitearch}/samba/tests/__pycache__/lsa_string.*.pyc %{python3_sitearch}/samba/tests/__pycache__/messaging.*.pyc %{python3_sitearch}/samba/tests/__pycache__/netbios.*.pyc @@ -2644,7 +2217,11 @@ fi %{python3_sitearch}/samba/tests/__pycache__/ntacls.*.pyc %{python3_sitearch}/samba/tests/__pycache__/ntacls_backup.*.pyc %{python3_sitearch}/samba/tests/__pycache__/ntlmdisabled.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/ntlm_auth.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/ntlm_auth_base.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/ntlm_auth_krb5.*.pyc %{python3_sitearch}/samba/tests/__pycache__/pam_winbind.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/pam_winbind_chauthtok.*.pyc %{python3_sitearch}/samba/tests/__pycache__/pam_winbind_warn_pwd_expire.*.pyc %{python3_sitearch}/samba/tests/__pycache__/param.*.pyc %{python3_sitearch}/samba/tests/__pycache__/password_hash.*.pyc @@ -2656,6 +2233,8 @@ fi %{python3_sitearch}/samba/tests/__pycache__/password_test.*.pyc %{python3_sitearch}/samba/tests/__pycache__/policy.*.pyc %{python3_sitearch}/samba/tests/__pycache__/posixacl.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/prefork_restart.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/process_limits.*.pyc %{python3_sitearch}/samba/tests/__pycache__/provision.*.pyc %{python3_sitearch}/samba/tests/__pycache__/pso.*.pyc %{python3_sitearch}/samba/tests/__pycache__/py_credentials.*.pyc @@ -2670,11 +2249,11 @@ fi %{python3_sitearch}/samba/tests/__pycache__/samdb_api.*.pyc %{python3_sitearch}/samba/tests/__pycache__/security.*.pyc %{python3_sitearch}/samba/tests/__pycache__/smb.*.pyc +%{python3_sitearch}/samba/tests/__pycache__/smbd_base.*.pyc %{python3_sitearch}/samba/tests/__pycache__/source.*.pyc %{python3_sitearch}/samba/tests/__pycache__/strings.*.pyc %{python3_sitearch}/samba/tests/__pycache__/subunitrun.*.pyc %{python3_sitearch}/samba/tests/__pycache__/tdb_util.*.pyc -%{python3_sitearch}/samba/tests/__pycache__/unicodenames.*.pyc %{python3_sitearch}/samba/tests/__pycache__/upgrade.*.pyc %{python3_sitearch}/samba/tests/__pycache__/upgradeprovision.*.pyc %{python3_sitearch}/samba/tests/__pycache__/upgradeprovisionneeddc.*.pyc @@ -2694,21 +2273,28 @@ fi %{python3_sitearch}/samba/tests/blackbox/__init__.py %dir %{python3_sitearch}/samba/tests/blackbox/__pycache__ %{python3_sitearch}/samba/tests/blackbox/__pycache__/__init__.*.pyc +%{python3_sitearch}/samba/tests/blackbox/__pycache__/bug13653.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/check_output.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/ndrdump.*.pyc +%{python3_sitearch}/samba/tests/blackbox/__pycache__/netads_json.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/samba_dnsupdate.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/smbcontrol.*.pyc +%{python3_sitearch}/samba/tests/blackbox/__pycache__/smbcontrol_process.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/traffic_learner.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/traffic_replay.*.pyc %{python3_sitearch}/samba/tests/blackbox/__pycache__/traffic_summary.*.pyc +%{python3_sitearch}/samba/tests/blackbox/bug13653.py %{python3_sitearch}/samba/tests/blackbox/check_output.py %{python3_sitearch}/samba/tests/blackbox/ndrdump.py +%{python3_sitearch}/samba/tests/blackbox/netads_json.py %{python3_sitearch}/samba/tests/blackbox/samba_dnsupdate.py %{python3_sitearch}/samba/tests/blackbox/smbcontrol.py +%{python3_sitearch}/samba/tests/blackbox/smbcontrol_process.py %{python3_sitearch}/samba/tests/blackbox/traffic_learner.py %{python3_sitearch}/samba/tests/blackbox/traffic_replay.py %{python3_sitearch}/samba/tests/blackbox/traffic_summary.py %{python3_sitearch}/samba/tests/common.py +%{python3_sitearch}/samba/tests/complex_expressions.py %{python3_sitearch}/samba/tests/core.py %{python3_sitearch}/samba/tests/credentials.py %dir %{python3_sitearch}/samba/tests/dcerpc @@ -2718,6 +2304,7 @@ fi %{python3_sitearch}/samba/tests/dcerpc/__pycache__/array.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/bare.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/dnsserver.*.pyc +%{python3_sitearch}/samba/tests/dcerpc/__pycache__/integer.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/misc.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/raw_protocol.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/raw_testcase.*.pyc @@ -2726,11 +2313,13 @@ fi %{python3_sitearch}/samba/tests/dcerpc/__pycache__/rpcecho.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/sam.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/srvsvc.*.pyc -%{python3_sitearch}/samba/tests/dcerpc/__pycache__/string.*.pyc +%{python3_sitearch}/samba/tests/dcerpc/__pycache__/string_tests.*.pyc %{python3_sitearch}/samba/tests/dcerpc/__pycache__/testrpc.*.pyc +%{python3_sitearch}/samba/tests/dcerpc/__pycache__/unix.*.pyc %{python3_sitearch}/samba/tests/dcerpc/array.py %{python3_sitearch}/samba/tests/dcerpc/bare.py %{python3_sitearch}/samba/tests/dcerpc/dnsserver.py +%{python3_sitearch}/samba/tests/dcerpc/integer.py %{python3_sitearch}/samba/tests/dcerpc/misc.py %{python3_sitearch}/samba/tests/dcerpc/raw_protocol.py %{python3_sitearch}/samba/tests/dcerpc/raw_testcase.py @@ -2739,14 +2328,17 @@ fi %{python3_sitearch}/samba/tests/dcerpc/rpcecho.py %{python3_sitearch}/samba/tests/dcerpc/sam.py %{python3_sitearch}/samba/tests/dcerpc/srvsvc.py -%{python3_sitearch}/samba/tests/dcerpc/string.py +%{python3_sitearch}/samba/tests/dcerpc/string_tests.py %{python3_sitearch}/samba/tests/dcerpc/testrpc.py +%{python3_sitearch}/samba/tests/dcerpc/unix.py %{python3_sitearch}/samba/tests/dckeytab.py %{python3_sitearch}/samba/tests/dns.py %{python3_sitearch}/samba/tests/dns_base.py %{python3_sitearch}/samba/tests/dns_forwarder.py %dir %{python3_sitearch}/samba/tests/dns_forwarder_helpers +%{python3_sitearch}/samba/tests/dns_forwarder_helpers/__pycache__/dns_hub.*.pyc %{python3_sitearch}/samba/tests/dns_forwarder_helpers/__pycache__/server.*.pyc +%{python3_sitearch}/samba/tests/dns_forwarder_helpers/dns_hub.py %{python3_sitearch}/samba/tests/dns_forwarder_helpers/server.py %{python3_sitearch}/samba/tests/dns_invalid.py %{python3_sitearch}/samba/tests/dns_tkey.py @@ -2756,6 +2348,7 @@ fi %{python3_sitearch}/samba/tests/dsdb_schema_attributes.py %{python3_sitearch}/samba/tests/docs.py %{python3_sitearch}/samba/tests/domain_backup.py +%{python3_sitearch}/samba/tests/domain_backup_offline.py %dir %{python3_sitearch}/samba/tests/emulate %{python3_sitearch}/samba/tests/emulate/__init__.py %dir %{python3_sitearch}/samba/tests/emulate/__pycache__ @@ -2787,7 +2380,7 @@ fi %{python3_sitearch}/samba/tests/kcc/kcc_utils.py %{python3_sitearch}/samba/tests/kcc/ldif_import_export.py %{python3_sitearch}/samba/tests/krb5_credentials.py -%{python3_sitearch}/samba/tests/libsmb_samba_internal.py +%{python3_sitearch}/samba/tests/libsmb.py %{python3_sitearch}/samba/tests/loadparm.py %{python3_sitearch}/samba/tests/lsa_string.py %{python3_sitearch}/samba/tests/messaging.py @@ -2799,7 +2392,11 @@ fi %{python3_sitearch}/samba/tests/ntacls.py %{python3_sitearch}/samba/tests/ntacls_backup.py %{python3_sitearch}/samba/tests/ntlmdisabled.py +%{python3_sitearch}/samba/tests/ntlm_auth.py +%{python3_sitearch}/samba/tests/ntlm_auth_base.py +%{python3_sitearch}/samba/tests/ntlm_auth_krb5.py %{python3_sitearch}/samba/tests/pam_winbind.py +%{python3_sitearch}/samba/tests/pam_winbind_chauthtok.py %{python3_sitearch}/samba/tests/pam_winbind_warn_pwd_expire.py %{python3_sitearch}/samba/tests/param.py %{python3_sitearch}/samba/tests/password_hash.py @@ -2811,6 +2408,8 @@ fi %{python3_sitearch}/samba/tests/password_test.py %{python3_sitearch}/samba/tests/policy.py %{python3_sitearch}/samba/tests/posixacl.py +%{python3_sitearch}/samba/tests/prefork_restart.py +%{python3_sitearch}/samba/tests/process_limits.py %{python3_sitearch}/samba/tests/provision.py %{python3_sitearch}/samba/tests/pso.py %{python3_sitearch}/samba/tests/py_credentials.py @@ -2879,23 +2478,15 @@ fi %{python3_sitearch}/samba/tests/samdb_api.py %{python3_sitearch}/samba/tests/security.py %{python3_sitearch}/samba/tests/smb.py +%{python3_sitearch}/samba/tests/smbd_base.py %{python3_sitearch}/samba/tests/source.py %{python3_sitearch}/samba/tests/strings.py %{python3_sitearch}/samba/tests/subunitrun.py %{python3_sitearch}/samba/tests/tdb_util.py -%{python3_sitearch}/samba/tests/unicodenames.py %{python3_sitearch}/samba/tests/upgrade.py %{python3_sitearch}/samba/tests/upgradeprovision.py %{python3_sitearch}/samba/tests/upgradeprovisionneeddc.py %{python3_sitearch}/samba/tests/xattr.py -%dir %{python3_sitearch}/samba/web_server -%{python3_sitearch}/samba/web_server/__init__.py -%dir %{python3_sitearch}/samba/web_server/__pycache__ -%{python3_sitearch}/samba/web_server/__pycache__/__init__.*.pyc -%{python3_sitearch}/samba/werror.*.so -%{python3_sitearch}/samba/xattr.py -%{python3_sitearch}/samba/xattr_native.*.so -%{python3_sitearch}/samba/xattr_tdb.*.so ### TEST %files test @@ -2903,14 +2494,12 @@ fi %{_bindir}/locktest %{_bindir}/masktest %{_bindir}/ndrdump -%if 0 %{_bindir}/smbtorture -%{_mandir}/man1/smbtorture.1* -%endif %{_mandir}/man1/gentest.1* %{_mandir}/man1/locktest.1* %{_mandir}/man1/masktest.1* %{_mandir}/man1/ndrdump.1* +%{_mandir}/man1/smbtorture.1* %{_mandir}/man1/vfstest.1* %if %{with testsuite} @@ -3004,6 +2593,7 @@ fi %{_sbindir}/ctdbd %{_sbindir}/ctdbd_wrapper %{_bindir}/ctdb +%{_bindir}/ctdb_local_daemons %{_bindir}/ping_pong %{_bindir}/ltdbtool %{_bindir}/ctdb_diagnostics @@ -3076,6 +2666,7 @@ fi %{_libexecdir}/ctdb/tests/comm_server_test %{_libexecdir}/ctdb/tests/comm_test %{_libexecdir}/ctdb/tests/conf_test +%{_libexecdir}/ctdb/tests/ctdb_io_test %{_libexecdir}/ctdb/tests/ctdb_packet_parse %{_libexecdir}/ctdb/tests/ctdb_takeover_tests %{_libexecdir}/ctdb/tests/db_hash_test @@ -3112,6 +2703,7 @@ fi %{_libexecdir}/ctdb/tests/sock_daemon_test %{_libexecdir}/ctdb/tests/sock_io_test %{_libexecdir}/ctdb/tests/srvid_test +%{_libexecdir}/ctdb/tests/system_socket_test %{_libexecdir}/ctdb/tests/test_mutex_raw %{_libexecdir}/ctdb/tests/transaction_loop %{_libexecdir}/ctdb/tests/tunnel_cmd @@ -3123,7 +2715,6 @@ fi %dir %{_datadir}/ctdb/tests/complex %{_datadir}/ctdb/tests/complex/README -%{_datadir}/ctdb/tests/complex/00_ctdb_init.sh %{_datadir}/ctdb/tests/complex/11_ctdb_delip_removes_ip.sh %{_datadir}/ctdb/tests/complex/18_ctdb_reloadips.sh %{_datadir}/ctdb/tests/complex/30_nfs_tickle_killtcp.sh @@ -3156,6 +2747,7 @@ fi %{_datadir}/ctdb/tests/cunit/config_test_005.sh %{_datadir}/ctdb/tests/cunit/config_test_006.sh %{_datadir}/ctdb/tests/cunit/config_test_007.sh +%{_datadir}/ctdb/tests/cunit/ctdb_io_test_001.sh %{_datadir}/ctdb/tests/cunit/db_hash_test_001.sh %{_datadir}/ctdb/tests/cunit/event_protocol_test_001.sh %{_datadir}/ctdb/tests/cunit/event_script_test_001.sh @@ -3179,7 +2771,11 @@ fi %{_datadir}/ctdb/tests/cunit/sock_daemon_test_001.sh %{_datadir}/ctdb/tests/cunit/sock_io_test_001.sh %{_datadir}/ctdb/tests/cunit/srvid_test_001.sh - +%{_datadir}/ctdb/tests/cunit/system_socket_test_001.sh +%dir %{_datadir}/ctdb/tests/etc-ctdb +%dir %{_datadir}/ctdb/tests/etc-ctdb/events +%dir %{_datadir}/ctdb/tests/etc-ctdb/events/legacy +%{_datadir}/ctdb/tests/etc-ctdb/events/legacy/00.test.script %dir %{_datadir}/ctdb/tests/eventd %{_datadir}/ctdb/tests/eventd/README %dir %{_datadir}/ctdb/tests/eventd/etc-ctdb @@ -3521,6 +3117,8 @@ fi %{_datadir}/ctdb/tests/onnode/0004.sh %{_datadir}/ctdb/tests/onnode/0005.sh %{_datadir}/ctdb/tests/onnode/0006.sh +%{_datadir}/ctdb/tests/onnode/0010.sh +%{_datadir}/ctdb/tests/onnode/0011.sh %{_datadir}/ctdb/tests/onnode/0070.sh %{_datadir}/ctdb/tests/onnode/0071.sh %{_datadir}/ctdb/tests/onnode/0072.sh @@ -3557,12 +3155,9 @@ fi %dir %{_datadir}/ctdb/tests/simple %{_datadir}/ctdb/tests/simple/README -%{_datadir}/ctdb/tests/simple/00_ctdb_init.sh %{_datadir}/ctdb/tests/simple/00_ctdb_onnode.sh -%{_datadir}/ctdb/tests/simple/01_ctdb_version.sh -%{_datadir}/ctdb/tests/simple/02_ctdb_listvars.sh -%{_datadir}/ctdb/tests/simple/03_ctdb_getvar.sh -%{_datadir}/ctdb/tests/simple/04_ctdb_setvar.sh +%{_datadir}/ctdb/tests/simple/01_ctdb_reclock_command.sh +%{_datadir}/ctdb/tests/simple/02_ctdb_tunables.sh %{_datadir}/ctdb/tests/simple/05_ctdb_listnodes.sh %{_datadir}/ctdb/tests/simple/06_ctdb_getpid.sh %{_datadir}/ctdb/tests/simple/07_ctdb_process_exists.sh @@ -3585,11 +3180,9 @@ fi %{_datadir}/ctdb/tests/simple/26_ctdb_config_check_error_on_unreachable_ctdb.sh %{_datadir}/ctdb/tests/simple/27_ctdb_detach.sh %{_datadir}/ctdb/tests/simple/28_zero_eventscripts.sh -%{_datadir}/ctdb/tests/simple/31_ctdb_disable.sh -%{_datadir}/ctdb/tests/simple/32_ctdb_enable.sh +%{_datadir}/ctdb/tests/simple/32_ctdb_disable_enable.sh %{_datadir}/ctdb/tests/simple/35_ctdb_getreclock.sh -%{_datadir}/ctdb/tests/simple/41_ctdb_stop.sh -%{_datadir}/ctdb/tests/simple/42_ctdb_continue.sh +%{_datadir}/ctdb/tests/simple/42_ctdb_stop_continue.sh %{_datadir}/ctdb/tests/simple/43_stop_recmaster_yield.sh %{_datadir}/ctdb/tests/simple/51_message_ring.sh %{_datadir}/ctdb/tests/simple/52_fetch_ring.sh @@ -3599,6 +3192,7 @@ fi %{_datadir}/ctdb/tests/simple/56_replicated_transaction_recovery.sh %{_datadir}/ctdb/tests/simple/58_ctdb_restoredb.sh %{_datadir}/ctdb/tests/simple/60_recoverd_missing_ip.sh +%{_datadir}/ctdb/tests/simple/69_recovery_resurrect_deleted.sh %{_datadir}/ctdb/tests/simple/70_recoverpdbbyseqnum.sh %{_datadir}/ctdb/tests/simple/71_ctdb_wipedb.sh %{_datadir}/ctdb/tests/simple/72_update_record_persistent.sh @@ -3611,17 +3205,11 @@ fi %{_datadir}/ctdb/tests/simple/80_ctdb_traverse.sh %{_datadir}/ctdb/tests/simple/81_tunnel_ring.sh %{_datadir}/ctdb/tests/simple/90_debug_hung_script.sh -%{_datadir}/ctdb/tests/simple/99_daemons_shutdown.sh -%dir %{_datadir}/ctdb/tests/simple/etc-ctdb -%dir %{_datadir}/ctdb/tests/simple/etc-ctdb/events -%dir %{_datadir}/ctdb/tests/simple/etc-ctdb/events/legacy -%{_datadir}/ctdb/tests/simple/etc-ctdb/events/legacy/00.test.script %dir %{_datadir}/ctdb/tests/simple/scripts %{_datadir}/ctdb/tests/simple/scripts/local.bash %{_datadir}/ctdb/tests/simple/scripts/local_daemons.bash -%{_datadir}/ctdb/tests/simple/scripts/ssh_local_daemons.sh %dir %{_datadir}/ctdb/tests/takeover %{_datadir}/ctdb/tests/takeover/README @@ -3845,6 +3433,27 @@ fi %endif # with_clustering_support %changelog +* Wed Jun 19 2019 Andreas Schneider - 4.10.4-1 +- resolves: #1712378 - Fix smbspool CUPS backend +- resolves: #1696612 - Fix 'net ads join -U admin@parentdomain' + +* Thu May 23 2019 Andreas Schneider - 4.10.4-0 +- related: #1638001 - Rebase to Samba version 4.10.4 +- resolves: #1597298 - Build Samba with python3 +- resolves: #1658558 - Add 'net ads leave --keep-account' option +- resolves: #1669004 - Fix systemd status notifications +- resolves: #1672167 - Fix printing cache timeout in debug output +- resolves: #1696525 - Fix CVE-2019-3880 + +* Fri May 17 2019 Andreas Schneider - 4.10.3-0 +- related: #1638001 - Rebase to Samba version 4.10.3 + +* Fri May 10 2019 Andreas Schneider - 4.10.2-1 +- related: #1638001 - Fix package upgrades + +* Mon May 06 2019 Andreas Schneider - 4.10.2-0 +- resolves: #1638001 - Rebase Samba to version 4.10 + * Thu Jan 03 2019 Andreas Schneider - 4.9.1-8 - resolves: #1663421 - Fix perl interpreter dependencies