[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 37c6a327ed7 [ci-images] remove use of sudo in image building smoke test via 96da1142866 [ci-images] run podman directly instead of docker link via 4ee29f846fd [ci-images] use podman instead of docker from 976326fa2b6 s3/util/py_net.c: fix samba-tool domain join&leave segfault https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 37c6a327ed7ae588e49865621ff79418704e6d38 Author: Uri Simchoni Date: Tue May 24 22:54:04 2022 +0300 [ci-images] remove use of sudo in image building smoke test Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed May 25 20:50:25 UTC 2022 on sn-devel-184 commit 96da11428662c63b033eb18d6adb3f9a734d7394 Author: Uri Simchoni Date: Mon May 23 22:58:16 2022 +0300 [ci-images] run podman directly instead of docker link Instead of having a symbolic link from docker to podman, use podman directly. This is made for better clarity, and because docker and podman are not 100% intechangeable in this script. Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett commit 4ee29f846fdf53fbbdeff2663798490766947f0e Author: Uri Simchoni Date: Mon May 23 20:42:55 2022 +0300 [ci-images] use podman instead of docker Use podman as image building tool instead of docker. The image-creation pipeline still runs on docker only (until gitlab-runner supports podman), but the pipeline image may emply podman instead of docker to build images. Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- Summary of changes: .gitlab-ci-main.yml | 2 +- bootstrap/.gitlab-ci.yml | 30 ++ bootstrap/sha1sum.txt| 2 +- 3 files changed, 16 insertions(+), 18 deletions(-) Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index 02b22b1571f..4bfa2f2ea04 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -42,7 +42,7 @@ variables: # Set this to the contents of bootstrap/sha1sum.txt # which is generated by bootstrap/template.py --render # - SAMBA_CI_CONTAINER_TAG: a6e30c371ba434b89af5628bd1974e5cc947eb9f + SAMBA_CI_CONTAINER_TAG: a9f12c7712cfccf1bf957d6976dc87917524b55e # # We use the ubuntu1804 image as default as # it matches what we have on sn-devel-184. diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml index 111be1556ff..053dd17f9e2 100644 --- a/bootstrap/.gitlab-ci.yml +++ b/bootstrap/.gitlab-ci.yml @@ -1,8 +1,6 @@ -services: - - docker:dind .build_image_template: - image: docker:latest + image: quay.io/podman/stable:latest stage: images tags: # We need to make sure we only use gitlab.com @@ -29,32 +27,32 @@ services: script: | set -xueo pipefail ci_image_name=samba-ci-${CI_JOB_NAME} -docker build -t ${ci_image_name} --build-arg SHA1SUM=${SAMBA_CI_CONTAINER_TAG} bootstrap/generated-dists/${CI_JOB_NAME} +podman build -t ${ci_image_name} --build-arg SHA1SUM=${SAMBA_CI_CONTAINER_TAG} bootstrap/generated-dists/${CI_JOB_NAME} ci_image_path="${SAMBA_CI_CONTAINER_REGISTRY}/${ci_image_name}" timestamp=$(date +%Y%m%d%H%M%S) -docker_hash=$(docker image inspect --format='{{index .Id}}' ${ci_image_name} | cut -d : -f 2 | cut -c 1-9) - timestamp_tag=${SAMBA_CI_CONTAINER_TAG}-${timestamp}-${GITLAB_USER_LOGIN}-${docker_hash} +container_hash=$(podman image inspect --format='{{ .Id }}' ${ci_image_name} | cut -c 1-9) + timestamp_tag=${SAMBA_CI_CONTAINER_TAG}-${timestamp}-${GITLAB_USER_LOGIN}-${container_hash} samba_repo_root=/home/samba/samba # Ensure we are generating the correct container that we expect to be in echo "${SAMBA_CI_CONTAINER_TAG}" > /tmp/sha1sum-tag.txt diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt -docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ +podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ /bin/bash -c "echo \"${SAMBA_CI_CONTAINER_TAG}\" > /tmp/sha1sum-tag.txt; diff -u bootstrap/sha1sum.txt /tmp/sha1sum-tag.txt" -docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ +podman run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ diff -u bootstrap/sha1sum.txt /sha1sum.txt -docker run --volume $(pwd):${samba_repo_root} --workdir ${samba_repo_root} ${ci_image_name} \ +podman run --volume $(pwd):${samba_repo_roo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fc69206f8b8 lib:fuzzing: Fix quoting of --fuzz-target-ldflags via cc3081cebfb s3:utils: Fix format error from 2d87e0f6efa s4: process_prefork: Make prefork_restart() use an asynchronous timer event instead of calling sleep(X). https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fc69206f8b8956662e7fc05600e39d2f149a22d9 Author: Andreas Schneider Date: Fri Oct 1 09:16:21 2021 +0200 lib:fuzzing: Fix quoting of --fuzz-target-ldflags Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Oct 4 11:36:06 UTC 2021 on sn-devel-184 commit cc3081cebfb65181cd291702cb6a2e727dc999b2 Author: Andreas Schneider Date: Fri Oct 1 10:46:09 2021 +0200 s3:utils: Fix format error regedit_hexedit.c:166:39: error: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} 166 | wprintw(buf->win, "%08X ", off); |~~~^ ~~~ | | | | | size_t {aka long unsigned int} | unsigned int |%08lX Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni --- Summary of changes: lib/fuzzing/oss-fuzz/do_build.sh | 2 +- source3/utils/regedit_hexedit.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/fuzzing/oss-fuzz/do_build.sh b/lib/fuzzing/oss-fuzz/do_build.sh index e00e2251589..159e9579155 100755 --- a/lib/fuzzing/oss-fuzz/do_build.sh +++ b/lib/fuzzing/oss-fuzz/do_build.sh @@ -85,7 +85,7 @@ esac $SANITIZER_ARG \ --disable-warnings-as-errors \ --abi-check-disable \ - --fuzz-target-ldflags="-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \ + "--fuzz-target-ldflags=-Wl,--disable-new-dtags $LIB_FUZZING_ENGINE" \ --nonshared-binary=ALL \ "$@" \ LINK_CC="$CXX" diff --git a/source3/utils/regedit_hexedit.c b/source3/utils/regedit_hexedit.c index 383736ae2bc..413e563f653 100644 --- a/source3/utils/regedit_hexedit.c +++ b/source3/utils/regedit_hexedit.c @@ -163,7 +163,7 @@ void hexedit_refresh(struct hexedit *buf) size_t i, endline; wmove(buf->win, lineno, 0); - wprintw(buf->win, "%08X ", off); + wprintw(buf->win, "%08zX ", off); endline = BYTES_PER_LINE; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ce2bc74dce4 bootstrap: Remove last references to Ubuntu 16.04 from 01378a52a1c tests/krb5: Create testing accounts in appropriate containers https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ce2bc74dce46cc9e27f692527a0b81e1afab0096 Author: Andrew Bartlett Date: Mon Sep 13 18:22:36 2021 +1200 bootstrap: Remove last references to Ubuntu 16.04 The Ubuntu 16.04 build went away with 4366c3bb71fe9c083dedeae8798547b64a64d2b4 as oss-fuzz moves to Ubuntu 20.04. We don't do a special build for the oss-fuzz, this restores the behaviour before e10910f8de542b0be9b89942791bd37288b7a32a and d048d7e17d756099e208fa4d6b931a147b0b1489 where oss-fuzz was only tested as part of the main build. (In the case of a failure the pipeline would fail, preventing a merge, just the same as for any other failing test). Signed-off-by: Andrew Bartlett Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Sep 14 04:44:44 UTC 2021 on sn-devel-184 --- Summary of changes: .gitlab-ci-main.yml | 2 +- bootstrap/.gitlab-ci.yml | 6 -- bootstrap/config.py | 11 --- bootstrap/generated-dists/Vagrantfile | 7 -- bootstrap/generated-dists/ubuntu1604/Dockerfile | 27 -- bootstrap/generated-dists/ubuntu1604/bootstrap.sh | 109 -- bootstrap/generated-dists/ubuntu1604/locale.sh| 55 --- bootstrap/generated-dists/ubuntu1604/packages.yml | 94 --- bootstrap/sha1sum.txt | 2 +- 9 files changed, 2 insertions(+), 311 deletions(-) delete mode 100644 bootstrap/generated-dists/ubuntu1604/Dockerfile delete mode 100755 bootstrap/generated-dists/ubuntu1604/bootstrap.sh delete mode 100755 bootstrap/generated-dists/ubuntu1604/locale.sh delete mode 100644 bootstrap/generated-dists/ubuntu1604/packages.yml Changeset truncated at 500 lines: diff --git a/.gitlab-ci-main.yml b/.gitlab-ci-main.yml index a6c362931da..8ad0034faa7 100644 --- a/.gitlab-ci-main.yml +++ b/.gitlab-ci-main.yml @@ -42,7 +42,7 @@ variables: # Set this to the contents of bootstrap/sha1sum.txt # which is generated by bootstrap/template.py --render # - SAMBA_CI_CONTAINER_TAG: 733f8fa83c921e5a7ec8f5470b2ca7d52548f4b0 + SAMBA_CI_CONTAINER_TAG: 752c448d3186fe93a0c4039b8fbe897bb67a1f33 # # We use the ubuntu1804 image as default as # it matches what we have on sn-devel-184. diff --git a/bootstrap/.gitlab-ci.yml b/bootstrap/.gitlab-ci.yml index 5e5856b1e90..1cef89374de 100644 --- a/bootstrap/.gitlab-ci.yml +++ b/bootstrap/.gitlab-ci.yml @@ -88,12 +88,6 @@ services: # - $SAMBA_CI_REBUILD_BROKEN_IMAGES == "yes" -# This is ONLY for oss-fuzz, so we test a fuzz build not a real one -ubuntu1604: - extends: .build_image_template - variables: -SAMBA_CI_TEST_JOB: "samba-fuzz" - ubuntu1804: extends: .build_image_template diff --git a/bootstrap/config.py b/bootstrap/config.py index ba4304bb9f8..7fe3bbd956a 100644 --- a/bootstrap/config.py +++ b/bootstrap/config.py @@ -399,17 +399,6 @@ DEB_DISTS = { 'liburing-dev': '', # not available } }, -'ubuntu1604': { -'docker_image': 'ubuntu:16.04', -'vagrant_box': 'ubuntu/xenial64', -'replace': { -'python3-gpg': 'python3-gpgme', -'glusterfs-common': '', -'libcephfs-dev': '', -'liburing-dev': '', # not available -'libtracker-sparql-2.0-dev': '', # not available -} -}, 'ubuntu1804': { 'docker_image': 'ubuntu:18.04', 'vagrant_box': 'ubuntu/bionic64', diff --git a/bootstrap/generated-dists/Vagrantfile b/bootstrap/generated-dists/Vagrantfile index 42da0161e40..7c1e0d80c6a 100644 --- a/bootstrap/generated-dists/Vagrantfile +++ b/bootstrap/generated-dists/Vagrantfile @@ -59,13 +59,6 @@ Vagrant.configure("2") do |config| v.vm.provision :shell, path: "opensuse152/locale.sh" end -config.vm.define "ubuntu1604" do |v| -v.vm.box = "ubuntu/xenial64" -v.vm.hostname = "ubuntu1604" -v.vm.provision :shell, path: "ubuntu1604/bootstrap.sh" -v.vm.provision :shell, path: "ubuntu1604/locale.sh" -end - config.vm.define "ubuntu1804" do |v| v.vm.box = "ubuntu/bionic64"
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6b9b0439d84 heimdal: Remove lex.yy.c file left over from a bug in lexyacc.sh via 5950fc66e01 build: Make Python 3.6 the minimum to build now oss-fuzz is upgraded from 926db374a61 smbd: fix "ea support = no" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6b9b0439d849d26797b6ce9e27b85188f427c5b2 Author: Andrew Bartlett Date: Fri Sep 10 05:00:39 2021 +1200 heimdal: Remove lex.yy.c file left over from a bug in lexyacc.sh This file was incorrectly added in 6a27fbbfc4c51ae1635b8a5fa51c470ebc9f01e2, was never referenced on our build system and should have been removed with c51c15144e3fbdd3ebed301a077c687e23882e09 at least. That script had a bug and did not remove this filename if the particular version of lex generated it, and so it likely was added to git as a result. Signed-off-by: Andrew Bartlett Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Sep 13 05:41:30 UTC 2021 on sn-devel-184 commit 5950fc66e017e5712a5bafbce16c92484eee4c16 Author: Andrew Bartlett Date: Thu Sep 9 20:43:11 2021 +1200 build: Make Python 3.6 the minimum to build now oss-fuzz is upgraded The exception to allow building, but not operating, with Python 3.5 was only because oss-fuzz provided only Python 3.5 on Ubuntu 16.04. Ubuntu 20.04 is now the base image provided, so this exception can be removed. Signed-off-by: Andrew Bartlett Reviewed-by: Uri Simchoni --- Summary of changes: buildtools/wafsamba/samba_python.py |3 - source4/heimdal/lib/hx509/lex.yy.c | 1898 --- 2 files changed, 1901 deletions(-) delete mode 100644 source4/heimdal/lib/hx509/lex.yy.c Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/samba_python.py b/buildtools/wafsamba/samba_python.py index 002357bb556..12a94c8079d 100644 --- a/buildtools/wafsamba/samba_python.py +++ b/buildtools/wafsamba/samba_python.py @@ -7,9 +7,6 @@ from waflib.Configure import conf @conf def SAMBA_CHECK_PYTHON(conf, version=(3,6,0)): -if conf.env.enable_fuzzing: -version=(3,5,0) - # enable tool to build python extensions if conf.env.HAVE_PYTHON_H: conf.check_python_version(version) diff --git a/source4/heimdal/lib/hx509/lex.yy.c b/source4/heimdal/lib/hx509/lex.yy.c deleted file mode 100644 index 5c0a9c4635b..000 --- a/source4/heimdal/lib/hx509/lex.yy.c +++ /dev/null @@ -1,1898 +0,0 @@ - -#line 3 "lex.yy.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4aea5c0972d tevent: Release tevent 0.10.2 via 28e4ac0e7ae tdb: Release tdb 1.4.3 via 3e2eafeb446 talloc: Release talloc 2.3.1 from e856877ef88 ndrdump: avoid use after free https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4aea5c0972de53c143530cc42ef6d3b8cfafb973 Author: Uri Simchoni Date: Sat Nov 16 23:54:31 2019 +0200 tevent: Release tevent 0.10.2 * Upgrade waf to version 2.0.18 to fix a cross-compilation issue BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Nov 18 11:44:08 UTC 2019 on sn-devel-184 commit 28e4ac0e7ae965745fde628d7a675e337aa45341 Author: Uri Simchoni Date: Sat Nov 16 23:52:33 2019 +0200 tdb: Release tdb 1.4.3 * Upgrade waf to version 2.0.18 to fix a cross-compilation issue. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett commit 3e2eafeb4460c8b6b3c3dbf64bbc967ae1d601d0 Author: Uri Simchoni Date: Sat Nov 16 23:45:51 2019 +0200 talloc: Release talloc 2.3.1 * Upgrade waf to 2.0.18 to fix a cross-compilation issue BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett --- Summary of changes: lib/talloc/ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.3.1.sigs} | 0 lib/talloc/ABI/{talloc-2.1.10.sigs => talloc-2.3.1.sigs} | 0 lib/talloc/wscript| 2 +- lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.3.sigs} | 0 lib/tdb/wscript | 2 +- lib/tevent/ABI/{tevent-0.10.0.sigs => tevent-0.10.2.sigs} | 0 lib/tevent/wscript| 2 +- 7 files changed, 3 insertions(+), 3 deletions(-) copy lib/talloc/ABI/{pytalloc-util-2.3.0.sigs => pytalloc-util-2.3.1.sigs} (100%) copy lib/talloc/ABI/{talloc-2.1.10.sigs => talloc-2.3.1.sigs} (100%) copy lib/tdb/ABI/{tdb-1.3.17.sigs => tdb-1.4.3.sigs} (100%) copy lib/tevent/ABI/{tevent-0.10.0.sigs => tevent-0.10.2.sigs} (100%) Changeset truncated at 500 lines: diff --git a/lib/talloc/ABI/pytalloc-util-2.3.0.sigs b/lib/talloc/ABI/pytalloc-util-2.3.1.sigs similarity index 100% copy from lib/talloc/ABI/pytalloc-util-2.3.0.sigs copy to lib/talloc/ABI/pytalloc-util-2.3.1.sigs diff --git a/lib/talloc/ABI/talloc-2.1.10.sigs b/lib/talloc/ABI/talloc-2.3.1.sigs similarity index 100% copy from lib/talloc/ABI/talloc-2.1.10.sigs copy to lib/talloc/ABI/talloc-2.3.1.sigs diff --git a/lib/talloc/wscript b/lib/talloc/wscript index 9a182e8f311..b955d215b80 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'talloc' -VERSION = '2.3.0' +VERSION = '2.3.1' import os import sys diff --git a/lib/tdb/ABI/tdb-1.3.17.sigs b/lib/tdb/ABI/tdb-1.4.3.sigs similarity index 100% copy from lib/tdb/ABI/tdb-1.3.17.sigs copy to lib/tdb/ABI/tdb-1.4.3.sigs diff --git a/lib/tdb/wscript b/lib/tdb/wscript index 1ab0e8d334a..e56ddd0578a 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'tdb' -VERSION = '1.4.2' +VERSION = '1.4.3' import sys, os diff --git a/lib/tevent/ABI/tevent-0.10.0.sigs b/lib/tevent/ABI/tevent-0.10.2.sigs similarity index 100% copy from lib/tevent/ABI/tevent-0.10.0.sigs copy to lib/tevent/ABI/tevent-0.10.2.sigs diff --git a/lib/tevent/wscript b/lib/tevent/wscript index 58915214a91..93af416f583 100644 --- a/lib/tevent/wscript +++ b/lib/tevent/wscript @@ -1,7 +1,7 @@ #!/usr/bin/env python APPNAME = 'tevent' -VERSION = '0.10.1' +VERSION = '0.10.2' import sys, os -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1b69795c5bb s3:lib:wins fix a compile warning on Ubuntu 18.04 from f37b913348e smbd: Save 520 bytes of writable memory from every smbd https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1b69795c5bbc2ed24c54f8295fd3d9e4e0a0f938 Author: Christian Ambach Date: Tue Oct 22 11:02:05 2019 +0200 s3:lib:wins fix a compile warning on Ubuntu 18.04 gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) with -O2 puts up a warning here: ../../source3/lib/wins_srv.c: In function ‘wins_srv_tags’: ../../source3/lib/wins_srv.c:235:3: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow] for (j=0;j Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Oct 23 04:57:09 UTC 2019 on sn-devel-184 --- Summary of changes: source3/lib/wins_srv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/lib/wins_srv.c b/source3/lib/wins_srv.c index 4872d1c75b3..23796a2c5f4 100644 --- a/source3/lib/wins_srv.c +++ b/source3/lib/wins_srv.c @@ -208,7 +208,7 @@ static void parse_ip(struct tagged_ip *ip, const char *str) char **wins_srv_tags(void) { char **ret = NULL; - int count=0, i, j; + unsigned int count=0, i, j; const char **list; if (lp_we_are_a_wins_server()) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 649d15bb969 autobuild: harden samba-xc test suite via fdfd6984090 wafsamba: pass environment to cross-execute tests via 5a4ade95342 wafsamba: avoid pre-forking if cross-compilation is enabled via e00e9335028 wafsamba: use test_args instead of exec_args to support cross-compilation via 09e282ec817 waf: upgrade to 2.0.18 from 0afd655e802 dbwrap_watch: Fix cleaning up dead watchers https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 649d15bb969b6d27fd4554f49600366bb3df4712 Author: Uri Simchoni Date: Wed Oct 9 21:53:43 2019 +0300 autobuild: harden samba-xc test suite Add more checks which directly test the behavior of --cross-answers and --cross-execute. Previous test tested things in a round-about way, checking that running in all three modes (native, cross-execute, cross-answers) yields the same result. It was vulnerable to a degradation in which cross-compilation modes didn't work at all and were running native tests, which is what happened with the upgrade of waf. The added tests check the following: - That cross-excute with cross-answers sets the cross-answers file - That the content of cross-answers file actually affects the build configuration - That a missing line in cross-answers fails the build BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sun Oct 20 13:29:58 UTC 2019 on sn-devel-184 commit fdfd69840902f4b13db2a204a0ca87a578b61b85 Author: Uri Simchoni Date: Mon Oct 7 00:37:41 2019 +0300 wafsamba: pass environment to cross-execute tests This can come in handy for cross-execute scripts in general, and is particularly required by the samba-xc test for cross-answers / cross-execute, because Samba sets LD_LIBRARY_PATH during rpath checks, and the test program needs that in order to successfully run. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett commit 5a4ade953420a4122c80d291ac53310abd6a279c Author: Uri Simchoni Date: Mon Oct 7 00:37:31 2019 +0300 wafsamba: avoid pre-forking if cross-compilation is enabled Waf supports pre-forking to run configuration tests, but this doesn't play well with Samba's cross-compilation support, because Samba monkey-patches the actual fork+exec, which doesn't happen in a pre-forked process pool. This patch emulates the impact of WAF_NO_PREFORK env var when cross-compilation is enabled. The blueprint for the solution has been suggested by Thomas Nagy in https://bugzilla.samba.org/show_bug.cgi?id=13846#c7 (item #2) BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett commit e00e93350288dc212fed3f1be2adf78dcb6e58e7 Author: Uri Simchoni Date: Mon Oct 7 00:37:17 2019 +0300 wafsamba: use test_args instead of exec_args to support cross-compilation exec_args seems to have been a custom addition to Samba's copy of waf. Upstream Waf has an identically-purposed parameter called test_args. This parameter is being used for addiing runtime args to test programs that are being run during configuration phases. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett commit 09e282ec8173f2935bdb579e0396f269ce712e0d Author: Uri Simchoni Date: Mon Oct 7 00:36:42 2019 +0300 waf: upgrade to 2.0.18 This is required to get the new test_args parameter to conf.check, which facilitates passing arguments to configuration test programs. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett --- Summary of changes: buildtools/bin/waf| 2 +- buildtools/wafsamba/samba_autoconf.py | 6 +- buildtools/wafsamba/samba_cross.py| 7 +- buildtools/wafsamba/wafsamba.py | 2 +- script/autobuild.py | 10 ++ third_party/waf/waflib/Configure.py | 20 ++- third_party/waf/waflib/Context.py | 6 +- third_party/waf/waflib/Scripting.py | 7 +- third_party/waf/waflib/TaskGen.py | 2 +- third_party/waf/waflib/Tools/asm.py | 37 - third_party/waf/waflib/Tools/c_aliases.py | 6 +- third_party/waf/waflib/Tools/c_config.py | 9 +- third_party/waf/waflib/Tools/c_tests.py | 3 +- thi
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 25b1e478ec5 s3/dump_core: Have a newline towards the end of log message via c4e902be722 Add fuzzing binary for ldb_parse_tree via de7c78335de Add fuzzing binary for ldap_decode via f9c39237adf Add fuzzing binary for lzxpress via a42a5a42f79 Add fuzzing binary for regfio via 6b6df73b4ce regfio: Allow ignoring of checksum via e477a94ffd3 Add fuzzing binary for reg_parse via 799a1f65f6c Build registry parsing code into subsystem from 68155811aba samba-tool: Add facility to add rfc2307 attributes to an already created user or group https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 25b1e478ec5e8ac40d41013a824311824482fa67 Author: Anoop C S Date: Wed Oct 16 14:33:06 2019 +0530 s3/dump_core: Have a newline towards the end of log message Signed-off-by: Anoop C S Reviewed-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Fri Oct 18 08:54:04 UTC 2019 on sn-devel-184 commit c4e902be7226e596d7bbba8baf4389eeab0ca8b6 Author: Michael Hanselmann Date: Fri Apr 12 00:46:49 2019 +0200 Add fuzzing binary for ldb_parse_tree Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit de7c78335de63f95f97f946aec287b7bb87f6b47 Author: Michael Hanselmann Date: Wed Apr 10 01:20:36 2019 +0200 Add fuzzing binary for ldap_decode Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit f9c39237adfaf1ea223e5c810d019f433af95cf0 Author: Michael Hanselmann Date: Wed Apr 10 00:36:03 2019 +0200 Add fuzzing binary for lzxpress Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit a42a5a42f79cc886d752de1645638e24c600c4d0 Author: Michael Hanselmann Date: Thu Apr 4 02:26:26 2019 +0200 Add fuzzing binary for regfio Checksums are better ignored during fuzzing, hence a flag is added to the regfio parser to disable checksums. Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit 6b6df73b4ce20286b1b7370750d11d0d648d7752 Author: Michael Hanselmann Date: Mon Sep 23 21:53:55 2019 + regfio: Allow ignoring of checksum In order to get good coverage fuzzing code has to either calculate checksums correctly or to disable their verification. This change implements the latter for the "REGF_FILE" structure used by the "regfio_*" family of functions. Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit e477a94ffd3795d7d8aa83e899e9b0f2f9860a79 Author: Michael Hanselmann Date: Fri Apr 5 00:50:09 2019 +0200 Add fuzzing binary for reg_parse A temporary file is used to store the fuzzing input. Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit 799a1f65f6cc80256b6e140b7763396d76d4a830 Author: Michael Hanselmann Date: Mon Sep 23 21:47:51 2019 + Build registry parsing code into subsystem Fuzzing code will make use of the "reg_parse_fd" function. By building it into the "SMBREGISTRY" subsystem it can just be linked and "reg_parse.c" doesn't need to be explicitly included. Signed-off-by: Michael Hanselmann Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni --- Summary of changes: .../{fuzz_oLschema2ldif.c => fuzz_ldap_decode.c} | 38 ++-- .../{fuzz_tiniparser.c => fuzz_ldb_parse_tree.c} | 25 +--- lib/fuzzing/{fuzz_tiniparser.c => fuzz_lzxpress.c} | 14 ++--- .../fuzzing/fuzz_reg_parse.c | 41 - lib/fuzzing/fuzz_regfio.c | 68 ++ lib/fuzzing/wscript_build | 35 +++ source3/lib/dumpcore.c | 2 +- source3/registry/regfio.c | 3 +- source3/registry/regfio.h | 7 +++ source3/utils/wscript_build| 1 - source3/wscript_build | 1 + 11 files changed, 184 insertions(+), 51 deletions(-) copy lib/fuzzing/{fuzz_oLschema2ldif.c => fuzz_ldap_decode.c} (60%) copy lib/fuzzing/{fuzz_tiniparser.c => fuzz_ldb_parse_tree.c} (68%) copy lib/fuzzing/{fuzz_tiniparser.c => fuzz_lzxpress.c} (82%) copy source3/modules/nfs4acl_xattr_nfs.h => lib/fuzzing/fuzz_reg_parse.c (55%) create mode 100644 lib/fuzzing/fuzz_regfio.c Changeset truncated at 500 lines: diff --git a/lib/fuzzing/fuz
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 69cca061a4e lib: Optimize file_compare via 79e3b1c71f5 smbd: Increase a debug level from ee2fe56ba0e drepl: memory leak fix https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 69cca061a4e176c3d23f5f0771893011adafc940 Author: Volker Lendecke Date: Wed May 1 15:34:22 2019 +0200 lib: Optimize file_compare Triggered by two coverity false positives. Loading both files into talloc'ed memory seems inefficient to me. Rely on stdio to do proper buffering. This removes the restriction from ae95d611: "It is meant for small files". This is more lines, but to me it has less implicit complexity. Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Jul 17 12:45:51 UTC 2019 on sn-devel-184 commit 79e3b1c71f59591c54e87299984e50d2ffb00b6b Author: Volker Lendecke Date: Tue Jul 9 20:04:03 2019 +0200 smbd: Increase a debug level This is not a real error, it happens when the share mode record is not around. Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: lib/util/util_file.c | 55 +-- source3/locking/share_mode_lock.c | 4 +-- 2 files changed, 43 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/util/util_file.c b/lib/util/util_file.c index 48ee03fb5f9..5260ee9d721 100644 --- a/lib/util/util_file.c +++ b/lib/util/util_file.c @@ -382,22 +382,49 @@ _PUBLIC_ int fdprintf(int fd, const char *format, ...) */ bool file_compare(const char *path1, const char *path2) { - size_t size1, size2; - char *p1, *p2; - TALLOC_CTX *mem_ctx = talloc_new(NULL); - - p1 = file_load(path1, &size1, 0, mem_ctx); - p2 = file_load(path2, &size2, 0, mem_ctx); - if (!p1 || !p2 || size1 != size2) { - talloc_free(mem_ctx); - return false; + FILE *f1 = NULL, *f2 = NULL; + uint8_t buf1[1024], buf2[1024]; + bool ret = false; + + f1 = fopen(path1, "r"); + if (f1 == NULL) { + goto done; } - if (memcmp(p1, p2, size1) != 0) { - talloc_free(mem_ctx); - return false; + f2 = fopen(path2, "r"); + if (f2 == NULL) { + goto done; } - talloc_free(mem_ctx); - return true; + + while (!feof(f1)) { + size_t n1 = fread(buf1, 1, sizeof(buf1), f1); + size_t n2 = fread(buf2, 1, sizeof(buf2), f2); + + if (n1 != n2) { + goto done; + } + if (n1 == 0) { + ret = (feof(f1) && feof(f2)); + goto done; + } + if (memcmp(buf1, buf2, n1) != 0) { + goto done; + } + if (n1 < sizeof(buf1)) { + bool has_error = (ferror(f1) || ferror(f2)); + if (has_error) { + goto done; + } + } + } + ret = true; +done: + if (f2 != NULL) { + fclose(f2); + } + if (f1 != NULL) { + fclose(f1); + } + return ret; } /** diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 430d14fab4a..3c1e9a8a2cb 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -593,8 +593,8 @@ struct share_mode_lock *get_share_mode_lock( smb_fname, old_write_time); if (!NT_STATUS_IS_OK(status)) { - DBG_WARNING("get_static_share_mode_data failed: %s\n", - nt_errstr(status)); + DBG_DEBUG("get_static_share_mode_data failed: %s\n", + nt_errstr(status)); TALLOC_FREE(static_share_mode_record); goto fail; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9df23fe4e51 sysquota_linux: fix querying of group quotas from 63f4fb615d6 abi_gen.sh: ignore gdb customisations when comparing signatures https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9df23fe4e51227b3d5bcb074fe34d10f9e019a66 Author: Björn Jacke Date: Wed Jan 30 17:00:36 2019 +0100 sysquota_linux: fix querying of group quotas for gids we need to get/set the effective gids, same like for the uids already BUG: https://bugzilla.samba.org/show_bug.cgi?id=13768 Signed-off-by: Bjoern Jacke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sun Feb 3 09:54:56 CET 2019 on sn-devel-144 --- Summary of changes: source3/lib/sysquotas_linux.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/sysquotas_linux.c b/source3/lib/sysquotas_linux.c index c0987de9299..eebb1ad1f8c 100644 --- a/source3/lib/sysquotas_linux.c +++ b/source3/lib/sysquotas_linux.c @@ -92,10 +92,10 @@ int sys_get_vfs_quota(const char *path, const char *bdev, case SMB_GROUP_FS_QUOTA_TYPE: DEBUG(10, ("sys_get_vfs_quota: path[%s] bdev[%s] " "SMB_GROUP_FS_QUOTA_TYPE (gid[%u])\n", - path, bdev, (unsigned)getgid())); + path, bdev, (unsigned)getegid())); if ((ret = quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), bdev, - getgid(), (caddr_t)&D)) == 0) { + getegid(), (caddr_t)&D)) == 0) { qflags |= QUOTAS_DENY_DISK; } @@ -189,10 +189,10 @@ int sys_set_vfs_quota(const char *path, const char *bdev, case SMB_GROUP_FS_QUOTA_TYPE: DEBUG(10, ("sys_set_vfs_quota: path[%s] bdev[%s] " "SMB_GROUP_FS_QUOTA_TYPE (gid[%u])\n", - path, bdev, (unsigned)getgid())); + path, bdev, (unsigned)getegid())); ret = quotactl(QCMD(Q_GETQUOTA, GRPQUOTA), bdev, - getgid(), (caddr_t)&D); + getegid(), (caddr_t)&D); cur_enf = (ret == 0); new_enf = ((dp->qflags & QUOTAS_DENY_DISK) != 0); /* We're not changing quota enforcement, so return -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d35a22c Fix incorrect `ldbsearch` invocation via e2023e8 Remove some bashisms from the test scripts via 3450dd6 Don't load LDB_MODULESDIR as a module file from f8313d7 winbind: Don't send "server_id" explicitly for DUMP_DOMAIN_LIST https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d35a22cc445795faf8331b6d4b195e0c35eab99e Author: Timur I. Bakeyev Date: Mon Dec 11 05:05:19 2017 +0100 Fix incorrect `ldbsearch` invocation Signed-off-by: Timur I. Bakeyev Reviewed-by: Uri Simchoni Reviewed-by: Björn Jacke Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Feb 19 12:31:38 CET 2018 on sn-devel-144 commit e2023e86d54be86784a18ccbeced4e2a046c710d Author: Timur I. Bakeyev Date: Mon Dec 11 02:47:21 2017 +0100 Remove some bashisms from the test scripts Signed-off-by: Timur I. Bakeyev Reviewed-by: Uri Simchoni Reviewed-by: Christof Schmitt commit 3450dd6a50d1d08f49de5ff98f2ce20f31081636 Author: Timur I. Bakeyev Date: Wed Feb 14 02:31:58 2018 +0100 Don't load LDB_MODULESDIR as a module file We are setting modules directory here(LDB_MODULESDIR) so treat it this way, no need to attempt to load it as a module file. Signed-off-by: Timur I. Bakeyev Reviewed-by: Andreas Schneider Reviewed-by: Uri Simchoni --- Summary of changes: lib/ldb/common/ldb_modules.c | 2 +- source3/script/smbaddshare| 4 ++-- source3/script/smbchangeshare | 8 source3/script/smbdeleteshare | 2 +- source3/script/tests/test_forceuser_validusers.sh | 2 +- source3/script/tests/test_smbclient_s3.sh | 4 ++-- testprogs/blackbox/dbcheck-oldrelease.sh | 2 +- testprogs/blackbox/test_wintest.sh| 3 +-- 8 files changed, 13 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ldb/common/ldb_modules.c b/lib/ldb/common/ldb_modules.c index 25551e1..cc067ab 100644 --- a/lib/ldb/common/ldb_modules.c +++ b/lib/ldb/common/ldb_modules.c @@ -1103,7 +1103,7 @@ static int ldb_modules_load_dir(const char *modules_dir, const char *version) */ void ldb_set_modules_dir(struct ldb_context *ldb, const char *path) { - int ret = ldb_modules_load_path(path, LDB_VERSION); + int ret = ldb_modules_load_dir(path, LDB_VERSION); if (ret != LDB_SUCCESS) { ldb_asprintf_errstring(ldb, "Failed to load modules from: %s\n", path); } diff --git a/source3/script/smbaddshare b/source3/script/smbaddshare index 62f1bdf..704c9f4 100755 --- a/source3/script/smbaddshare +++ b/source3/script/smbaddshare @@ -19,14 +19,14 @@ NETCONF="$BINDIR/net --configfile=$CONF conf" $NETCONF addshare "$SHARENAME" "$SHAREPATH" writeable=no guest_ok=no "$COMMENT" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failure during addshare: rc=$RC exit $RC fi $NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failure during setparm for max connections: rc=$RC exit $RC fi diff --git a/source3/script/smbchangeshare b/source3/script/smbchangeshare index 2f3fa3b..098e968 100755 --- a/source3/script/smbchangeshare +++ b/source3/script/smbchangeshare @@ -20,28 +20,28 @@ NETCONF="$BINDIR/net --configfile=$CONF conf" $NETCONF setparm "$SHARENAME" 'path' "$SHAREPATH" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failure during setparm for path: rc=$RC exit $RC fi $NETCONF setparm "$SHARENAME" 'comment' "$COMMENT" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failed during setparm for comment: rc=$RC exit $RC fi $NETCONF setparm "$SHARENAME" 'max connections' "$MAX_CONN" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failure during setparm for max connections: rc=$RC exit $RC fi $NETCONF setparm "$SHARENAME" 'csc policy' "$CSC_POLICY" RC=$? -if [[ $RC -ne 0 ]]; then +if [ $RC -ne 0 ]; then echo Failure during setparm for csc policy: rc=$RC exit $RC fi diff --git a/source3/script/smbdeleteshare b/source3/script/smbdeleteshare index 8cd8d1f..8f70678 100755 --- a/source3/script/smbdeleteshare +++ b/source3/script/smbdeleteshare @@ -15,7 +15,7 @@ SHARENAME="$2" NETCONF="$BINDIR/net --configfile=$CONF conf" $NETCONF delshare "$SHARENAME" RC=$? -if [[ $RC -ne 0 ]]; then
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3e43f80 Replace tabs with spaces to comply with PEP8, reorder list of manpages in the alphanumeric sort order. via 8034b88 Add vfs_zfsacl manpage to the list of manpages if we have this module enabled. via e9e4cd4 Fix typo in the "wide links" description for the getwd cache. from 0685954 pam_winbind: avoid non-literal-format warning https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3e43f80ad1f0ce2f0a807da64d1f5e8bd6512526 Author: Timur I. Bakeyev Date: Wed Nov 29 06:40:10 2017 +0100 Replace tabs with spaces to comply with PEP8, reorder list of manpages in the alphanumeric sort order. Signed-off-by: Timur I. Bakeyev Reviewed-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Nov 29 16:58:32 CET 2017 on sn-devel-144 commit 8034b88d4e771663c4b7b581fb6b1992c33d5d96 Author: Timur I. Bakeyev Date: Wed Nov 29 06:35:37 2017 +0100 Add vfs_zfsacl manpage to the list of manpages if we have this module enabled. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12934 Signed-off-by: Timur I. Bakeyev Reviewed-by: Volker Lendecke Reviewed-by: Uri Simchoni commit e9e4cd4d2b6ae376cba90fdb56b9c9684f2dc492 Author: Timur I. Bakeyev Date: Wed Nov 29 05:48:52 2017 +0100 Fix typo in the "wide links" description for the getwd cache. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12934 Signed-off-by: Timur I. Bakeyev Reviewed-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: docs-xml/smbdotconf/tuning/getwdcache.xml | 2 +- docs-xml/wscript_build| 23 +-- 2 files changed, 14 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/tuning/getwdcache.xml b/docs-xml/smbdotconf/tuning/getwdcache.xml index 93f7a90..ec4d9ed 100644 --- a/docs-xml/smbdotconf/tuning/getwdcache.xml +++ b/docs-xml/smbdotconf/tuning/getwdcache.xml @@ -6,7 +6,7 @@ This is a tuning option. When this is enabled a caching algorithm will be used to reduce the time taken for getwd() calls. This can have a significant impact on performance, especially -when the parameter is set to no. +when the parameter is set to no. yes diff --git a/docs-xml/wscript_build b/docs-xml/wscript_build index 0bd08d1..f586208 100644 --- a/docs-xml/wscript_build +++ b/docs-xml/wscript_build @@ -6,9 +6,6 @@ manpages=''' manpages/dbwrap_tool.1 manpages/eventlogadm.8 manpages/findsmb.1 - manpages/libsmbclient.7 - manpages/lmhosts.5 - manpages/log2pcap.1 manpages/idmap_ad.8 manpages/idmap_autorid.8 manpages/idmap_hash.8 @@ -19,6 +16,9 @@ manpages=''' manpages/idmap_script.8 manpages/idmap_tdb.8 manpages/idmap_tdb2.8 + manpages/libsmbclient.7 + manpages/lmhosts.5 + manpages/log2pcap.1 manpages/mvxattr.1 manpages/net.8 manpages/nmbd.8 @@ -27,10 +27,10 @@ manpages=''' manpages/pdbedit.8 manpages/profiles.1 manpages/rpcclient.1 + manpages/samba-regedit.8 + manpages/samba-tool.8 manpages/samba.7 manpages/samba.8 - manpages/samba-tool.8 - manpages/samba-regedit.8 manpages/sharesec.1 manpages/smbcacls.1 manpages/smbclient.1 @@ -41,20 +41,20 @@ manpages=''' manpages/smbgetrc.5 manpages/smbpasswd.5 manpages/smbpasswd.8 - manpages/smbspool.8 manpages/smbspool_krb5_wrapper.8 + manpages/smbspool.8 manpages/smbstatus.1 manpages/smbtar.1 manpages/smbtree.1 manpages/testparm.1 - manpages/traffic_replay.7 manpages/traffic_learner.7 + manpages/traffic_replay.7 manpages/vfs_acl_tdb.8 manpages/vfs_acl_xattr.8 manpages/vfs_aio_fork.8 manpages/vfs_aio_pthread.8 manpages/vfs_audit.8 -manpages/vfs_btrfs.8 + manpages/vfs_btrfs.8 manpages/vfs_cacheprime.8 manpages/vfs_cap.8 manpages/vfs_catia.8 @@ -82,8 +82,8 @@ manpages=''' manpages/vfs_recycle.8 manpages/vfs_shadow_copy.8 manpages/vfs_shadow_copy2.8 -manpages/vfs_shell_snap.8 -manpages/vfs_snapper.8 + manpages/vfs_shell_snap.8 + manpages/vfs_snapper.8 manpages/vfs_streams_depot.8 manpages/vfs_streams_xattr.8 manpages/vfs_syncops.8 @@ -160,3 +160,6 @@
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via f5f0d2d Remove my (no-longer) employer info from b78a222 remove dead contact links from the hong kong support site https://git.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit f5f0d2df359025fd48d26a2adfbed9c5cd3f1c06 Author: Uri Simchoni Date: Wed Jun 28 09:48:38 2017 +0300 Remove my (no-longer) employer info --- Summary of changes: team/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/team/index.html b/team/index.html index 58d0716..baab197 100755 --- a/team/index.html +++ b/team/index.html @@ -97,7 +97,7 @@ mailing list and start contributing to the development of Samba. mailto:mi...@samba.org";>Rafal Szczesniak mailto:j...@samba.org";>John Terpstra https://www.samba.org/~tridge/";>Andrew Tridgell -mailto:u...@samba.org";>Uri Simchoni (https://www.ctera.com/";>CTERA) +mailto:u...@samba.org";>Uri Simchoni https://www.samba.org/~jelmer/";>Jelmer Vernooij mailto:m...@samba.org";>Matthias Dieter Wallnöfer mailto:m...@samba.org";>Michael Warfield -- Samba Website Repository
[SCM] Samba Shared Repository - branch master updated
(0) count: * count: 0x0002 (2) result : NT_STATUS_OK So the name for S-1-5-21-3293503978-489118715-2763867031-1106 has S-1-5-21-1387724271-3540671778-1971508351 in referenced lsa_DomainInfo structure. In that case we should not use the domain name from lsa_DomainInfo, because we would use the wrong idmap backend. For the case where the domain part of the sIDHistory sid is a still existing domain, which can be found our internal list of trusted domains, we now use the correct idmap backend: the idmap domain from the historic SID. If the historic domain does no longer exist, we will fallback to the default idmap domain. The next step would be doing a lookup sid call for the domain sid, which may help with one-way trusts. The long term goal needs to be that idmap backends are based on sids only and only the smb.conf allows names to be used which will be converted to sids on startup. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12702 Pair-Programmed-With: Stefan Metzmacher Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Apr 12 16:43:30 CEST 2017 on sn-devel-144 commit 63698da6e26965a539b623064ff34d4cb177f2ff Author: Andreas Schneider Date: Mon Apr 10 07:50:41 2017 +0200 waf: Only build pam_wrapper if we build with pam Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni commit 2fa9346333bab34a5bf1ad1ec26da2d9b6a291dd Author: Uri Simchoni Date: Wed Apr 12 10:32:39 2017 +0300 build: refuse to build without PAM support if enabled If PAM support is enabled, refuse to build if the prerequisite libraries are not in place, instead of silently disabling PAM support and continuing with the build. This simplifies inclusion of pam_wrapper in the tree. Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider --- Summary of changes: selftest/tests.py | 6 -- source3/winbindd/wb_sids2xids.c | 6 +- source3/wscript | 4 wscript | 3 ++- wscript_build | 2 +- 5 files changed, 16 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/tests.py b/selftest/tests.py index d962a66..e3dd914 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -39,6 +39,7 @@ finally: have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash) with_cmocka = ("HAVE_CMOCKA" in config_hash) +with_pam = ("WITH_PAM" in config_hash) pam_wrapper_so_path=config_hash["LIBPAM_WRAPPER_SO_PATH"] planpythontestsuite("none", "samba.tests.source") @@ -137,8 +138,9 @@ plantestsuite( configuration]) planpythontestsuite("none", "samba.tests.glue", py3_compatible=True) -plantestsuite("samba.tests.pam_winbind", "ad_member", - [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"), valgrindify(python), pam_wrapper_so_path]) +if with_pam: +plantestsuite("samba.tests.pam_winbind", "ad_member", + [os.path.join(srcdir(), "python/samba/tests/test_pam_winbind.sh"), valgrindify(python), pam_wrapper_so_path]) if with_cmocka: plantestsuite("samba.unittests.krb5samba", "none", diff --git a/source3/winbindd/wb_sids2xids.c b/source3/winbindd/wb_sids2xids.c index dc90bdf..b8ad300 100644 --- a/source3/winbindd/wb_sids2xids.c +++ b/source3/winbindd/wb_sids2xids.c @@ -194,9 +194,13 @@ static void wb_sids2xids_lookupsids_done(struct tevent_req *subreq) if (n->sid_index != UINT32_MAX) { const struct lsa_DomainInfo *info; + bool match; info = &domains->domains[n->sid_index]; - domain_name = info->name.string; + match = dom_sid_in_domain(info->sid, sid); + if (match) { + domain_name = info->name.string; + } } if (domain_name == NULL) { struct winbindd_domain *wb_domain = NULL; diff --git a/source3/wscript b/source3/wscript index 7875368..c526fc5 100644 --- a/source3/wscript +++ b/source3/wscript @@ -947,6 +947,10 @@ int i; i = PAM_RADIO_TYPE; if use_pam: conf.DEFINE('WITH_PAM', 1) conf.DEFINE('WITH_PAM_MODULES', 1) +else: +conf.fatal("PAM support is enabled but prerequisite libraries " + "or headers not found. Use --wit
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 782172a s3: Test for CVE-2017-2619 regression with "follow symlinks = no". via ae17beb s3: smbd: Fix incorrect logic exposed by fix for the security bug 12496 (CVE-2017-2619). from f55399f samba_dnsupdate: Add additional debugging https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 782172a9bef0040981d20e49519b13dd744df6a0 Author: Jeremy Allison Date: Mon Mar 27 11:48:25 2017 -0700 s3: Test for CVE-2017-2619 regression with "follow symlinks = no". BUG: https://bugzilla.samba.org/show_bug.cgi?id=12721 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Mar 28 07:00:46 CEST 2017 on sn-devel-144 commit ae17bebd250bdde5614b2ac17e53512f19fe9b68 Author: Jeremy Allison Date: Mon Mar 27 10:46:47 2017 -0700 s3: smbd: Fix incorrect logic exposed by fix for the security bug 12496 (CVE-2017-2619). In a UNIX filesystem, the names "." and ".." by definition can *never* be symlinks - they are already reserved names. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12721 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni --- Summary of changes: selftest/target/Samba3.pm | 8 source3/script/tests/test_smbclient_s3.sh | 73 +++ source3/smbd/vfs.c| 7 ++- 3 files changed, 86 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index d754b5f..354f152 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1245,6 +1245,9 @@ sub provision() my $shadow_shrdir="$shadow_basedir/share"; push(@dirs,$shadow_shrdir); + my $nosymlinks_shrdir="$shrdir/nosymlinks"; + push(@dirs,$nosymlinks_shrdir); + # this gets autocreated by winbindd my $wbsockdir="$prefix_abs/winbindd"; @@ -1861,6 +1864,11 @@ sub provision() copy = tmp mangled names = illegal +[nosymlinks] + copy = tmp + path = $nosymlinks_shrdir + follow symlinks = no + [kernel_oplocks] copy = tmp kernel oplocks = yes diff --git a/source3/script/tests/test_smbclient_s3.sh b/source3/script/tests/test_smbclient_s3.sh index 22849bd..7d86a61 100755 --- a/source3/script/tests/test_smbclient_s3.sh +++ b/source3/script/tests/test_smbclient_s3.sh @@ -1096,6 +1096,75 @@ EOF fi } +# Test follow symlinks can't access symlinks +test_nosymlinks() +{ +# Setup test dirs. +slink_name="$LOCAL_PATH/nosymlinks/source" +slink_target="$LOCAL_PATH/nosymlinks/target" +mkdir_target="$LOCAL_PATH/nosymlinks/a" + +rm -f $slink_target +rm -f $slink_name +rm -rf $mkdir_target + +touch $slink_target +ln -s $slink_target $slink_name + +# Getting a file through a symlink name should fail. +tmpfile=$PREFIX/smbclient_interactive_prompt_commands +cat > $tmpfile < $tmpfile <
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e7d1d8c nsswtich: Add negative tests for authentication with wbinfo via e202883 s3:libads: Remove obsolete smb_krb5_get_ntstatus_from_init_creds() via 21fbbfd idmap_rfc2307: Clarify the documentation a bit via d8a063b idmap_rfc2307: Slightly simplify idmap_rfc2307_initialize() via 7ff3ae7 idmap_tdb: Avoid a few casts from c0e196b s3:libsmb: Only print error message if kerberos use is forced https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e7d1d8c49322a131e7ca1993f9956f0bddcaff3c Author: Andreas Schneider Date: Mon Mar 20 12:22:44 2017 +0100 nsswtich: Add negative tests for authentication with wbinfo BUG: https://bugzilla.samba.org/show_bug.cgi?id=12708 Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Mar 22 10:58:58 CET 2017 on sn-devel-144 commit e2028837b958618a66449a77ee628e4e176e521e Author: Andreas Schneider Date: Tue Mar 21 09:57:30 2017 +0100 s3:libads: Remove obsolete smb_krb5_get_ntstatus_from_init_creds() There is no way we can get a better error code out of this. The original function called was krb5_get_init_creds_opt_get_error() which has been deprecated in 2008. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12708 Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni commit 21fbbfded1cb46edf31d39f80d0faefb896065fa Author: Volker Lendecke Date: Tue Mar 21 16:00:27 2017 +0100 idmap_rfc2307: Clarify the documentation a bit "bind_path" is a variable name internally used inside Samba. If you look at "man ldapsearch" from OpenLDAP for example, the more common term for this parameter is "search base". Adapt the documentation accordingly. Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit d8a063b4e64ae4325c4fc229927aaf8319fcbad0 Author: Volker Lendecke Date: Tue Mar 21 15:52:37 2017 +0100 idmap_rfc2307: Slightly simplify idmap_rfc2307_initialize() Replace an "else" branch with an early "goto err" Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 7ff3ae73741c42e8081b8fc242cddc4b1b436449 Author: Volker Lendecke Date: Sun Jan 8 13:00:39 2017 + idmap_tdb: Avoid a few casts The times of attempting to be C++ compatible are gone since C compilers can do very good warnings too. Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: docs-xml/manpages/idmap_rfc2307.8.xml | 4 +- nsswitch/tests/test_wbinfo.sh | 4 + source3/libads/kerberos.c | 169 -- source3/winbindd/idmap_rfc2307.c | 26 +++--- source3/winbindd/idmap_tdb_common.c | 12 +-- 5 files changed, 21 insertions(+), 194 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/idmap_rfc2307.8.xml b/docs-xml/manpages/idmap_rfc2307.8.xml index 024415a..5785662 100644 --- a/docs-xml/manpages/idmap_rfc2307.8.xml +++ b/docs-xml/manpages/idmap_rfc2307.8.xml @@ -70,13 +70,13 @@ bind_path_user - Specifies the bind path where + Specifies the search base where user objects can be found in the LDAP server. bind_path_group - Specifies the bind path where + Specifies the search base where group objects can be found in the LDAP server. diff --git a/nsswitch/tests/test_wbinfo.sh b/nsswitch/tests/test_wbinfo.sh index 69cc437..cfe582d 100755 --- a/nsswitch/tests/test_wbinfo.sh +++ b/nsswitch/tests/test_wbinfo.sh @@ -254,6 +254,10 @@ testit "wbinfo -K against $TARGET with domain creds" $wbinfo --krb5ccname=$KRB5C testit "wbinfo --separator against $TARGET" $wbinfo --separator || failed=`expr $failed + 1` +testit_expect_failure "wbinfo -a against $TARGET with invalid password" $wbinfo -a "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1` + +testit_expect_failure "wbinfo -K against $TARGET with invalid password" $wbinfo -K "$DOMAIN/$USERNAME%InvalidPassword" && failed=`expr $failed + 1` + rm -f $KRB5CCNAME_PATH exit $failed diff --git a/source3/libads/kerberos.c b/source3/libads/kerberos.c index dcb268e..13c48ca 100644 --- a/source3/libads/kerberos.c +++ b/source3/libads/kerberos.c @@ -99,156 +99,
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 373e0bd winbindd: Remove an unused #define via 42899d5 winbind: Use talloc_strdup_upper where appropriate via ae12111 ldap_server: Fix a typo via eecdc3b winbind: Fix a typo from 35f92b8 ldb: add LDB_FLG_DONT_CREATE_DB https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 373e0bdf12bcc502c3bbfd206d0ba71b32a01570 Author: Volker Lendecke Date: Wed Mar 8 10:26:38 2017 +0100 winbindd: Remove an unused #define Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Fri Mar 10 00:00:15 CET 2017 on sn-devel-144 commit 42899d542665c0adcfd5285d23164a8615e51ef5 Author: Volker Lendecke Date: Wed Mar 8 10:17:16 2017 +0100 winbind: Use talloc_strdup_upper where appropriate Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit ae12111685c65dc70662a41aaedadf4e6c415b87 Author: Volker Lendecke Date: Tue Mar 7 15:29:18 2017 +0100 ldap_server: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit eecdc3b1ee2ce7790207853cc6e1c66fe25de887 Author: Volker Lendecke Date: Mon Mar 6 20:33:28 2017 + winbind: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: source3/winbindd/winbindd_cache.c | 8 +--- source3/winbindd/winbindd_pam.c | 2 +- source4/ldap_server/ldap_server.c | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c index 4bb0195..bafeb9b 100644 --- a/source3/winbindd/winbindd_cache.c +++ b/source3/winbindd/winbindd_cache.c @@ -108,8 +108,6 @@ struct cache_entry { void (*smb_panic_fn)(const char *const why) = smb_panic; -#define WINBINDD_MAX_CACHE_SIZE (50*1024*1024) - static struct winbind_cache *wcache; static char *wcache_path(void) @@ -1115,14 +1113,10 @@ NTSTATUS resolve_username_to_alias( TALLOC_CTX *mem_ctx, if (!cache->tdb) goto do_query; - upper_name = talloc_strdup(mem_ctx, name); + upper_name = talloc_strdup_upper(mem_ctx, name); if (upper_name == NULL) { return NT_STATUS_NO_MEMORY; } - if (!strupper_m(upper_name)) { - talloc_free(upper_name); - return NT_STATUS_INVALID_PARAMETER; - } centry = wcache_fetch(cache, domain, "NSS/NA/%s", upper_name); diff --git a/source3/winbindd/winbindd_pam.c b/source3/winbindd/winbindd_pam.c index 5d1da16..782b28a 100644 --- a/source3/winbindd/winbindd_pam.c +++ b/source3/winbindd/winbindd_pam.c @@ -1578,7 +1578,7 @@ static NTSTATUS winbindd_dual_pam_auth_samlogon(TALLOC_CTX *mem_ctx, /* handle the case where a NT4 DC does not fill in the acct_flags in * the samlogon reply info3. When accurate info3 is required by the -* caller, we look up the account flags ourselve - gd */ +* caller, we look up the account flags ourselves - gd */ if ((request_flags & WBFLAG_PAM_INFO3_TEXT) && NT_STATUS_IS_OK(result) && (my_info3->base.acct_flags == 0)) { diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 8b21fbb..96df39c 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -437,7 +437,7 @@ static bool ldapsrv_call_read_next(struct ldapsrv_connection *conn) } /* -* The minimun size of a LDAP pdu is 7 bytes +* The minimum size of a LDAP pdu is 7 bytes * * dumpasn1 -hh ldap-unbind-min.dat * -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
09:39:37 2017 +0100 vfs_fruit: enabling AAPL extensions must be a global switch Apple's SMB2 AAPL extension is enabled once per SMB2 connection. Unfortunately the (per se correct) fix for bug #12541 results in vfs_fruit checking a per tcon config state variable to determine whether AAPL has been negotiated. This variable will be false for all but the first tcon. We must make it a global variable. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12604 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Mar 2 04:34:10 CET 2017 on sn-devel-144 commit 708767da8c366c021d6d15a3ae71d009357c3320 Author: Ralph Boehme Date: Thu Jan 19 09:30:45 2017 +0100 vfs_fruit: only veto AppleDouble files with fruit:resource=file vfs_fruit only creates AppleDouble files itself when "fruit:resource" is set to "file" (the default). It is only then the these AppleDouble files should be treated as an internal representation and should be inaccessible from clients. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12526> Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit c7a79a9b35225f41eeae961ab340882c7d49f0c4 Author: Ralph Boehme Date: Fri Feb 17 16:35:44 2017 +0100 s4/torture: vfs_fruit: add stream with illegal ntfs characters to copyile test This ensures a stream with illegal NTFS characters mapped to the Unicode private range like :foo\xef\x80\xa2bar:$DATA that is stored as an xattr name user.DosStream.foo:bar:$DATA if "fruit:encoding = native" is set, is copied by the special fruit copy_chunk request. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit ffa727f33b06e71403303b53797a068f455b22f8 Author: Ralph Boehme Date: Tue Feb 7 15:01:53 2017 +0100 vfs_fruit: use stat info from base_fsp This is also supposed to be valid in the VFS stack, so there's no need to re-stat here. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit 8b7e88f368ce793699fc57272e74d0815219a250 Author: Ralph Boehme Date: Sun Dec 11 19:11:09 2016 +0100 s4/torture: vfs_fruit: test invalid AFPINFO_STREAM_NAME BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit a2afd61906fbf36f75b2054abfd7384f220a14e3 Author: Ralph Boehme Date: Sun Dec 11 19:10:05 2016 +0100 vfs_fruit: ignore or delete invalid AFP_AfpInfo streams BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit bac79eac093e042f22a77fa8e468f8c92bb3c113 Author: Ralph Boehme Date: Sun Dec 11 19:06:46 2016 +0100 selftest: add shares without vfs_fruit for the vfs_fruit tests Not used for now, but the next commit will add a test that makes use of this. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit 08dc5b4673a955f365095824275e67b2ea8fc31e Author: Ralph Boehme Date: Sun Dec 11 19:02:37 2016 +0100 s4/torture: change shares in used torture_suite_add_2ns_smb2_test() torture_suite_add_2ns_smb2_test wan't used, change it to use the default share as share 1 and a second share taken from torture option "torture:share2". BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit b302444f5b0675f0cb0f26fa2ad53e298067f7ab Author: Ralph Boehme Date: Thu Dec 8 17:47:36 2016 +0100 docs/vfs_fruit: document known limitations with fruit:encoding=native BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit c8baf2760ad51a7739084a8e2617c58c287b651e Author: Ralph Boehme Date: Thu Dec 8 15:45:12 2016 +0100 s4/torture: add test for AAPL find with name with illegal NTFS characters BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit 49723151b2107553559c397adadda90f7c4806f7 Author: Ralph Boehme Date: Thu Dec 8 15:44:37 2016 +0100 lib/torture: add torture_assert_mem_equal_goto BUG: https://bugzilla.samba.org/show_bug.cgi?id=12427 Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni commit 8ae4539e47bcaa37d5a052eaf443a95287d851e1 Author: Ralph Boehme Date: Tue Dec 6 10:25:46 2016 +0100 s4/torture: add a vfs_fruit renaming test with open rsrc fork Verify IO on the resource fork works after a rename of
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e36e1f7 build:wafsamba: Remove ambiguous 'if x in conf.env' constructs via f73c6bd Add missing import of sys in ms_schema.py from 89ed562 docs: Fix typo in man smb.conf. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e36e1f7b12291ac818206cadc2b3081a02f62f84 Author: Thomas Nagy Date: Sat Mar 26 14:35:52 2016 +0100 build:wafsamba: Remove ambiguous 'if x in conf.env' constructs Configuration values such as HAVE_STDDEF_H can be set to 0 to indicate a test failure. Waf 1.5 has a few bugs that prevent configuration tests from setting such values consistently on failures. Consequently, conditions such as 'if conf.env.VARNAME' must be used to indicate that config test successes are expected. Note that conf.env.VARNAME always returns an empty list (False value) when no variable is defined so there are no risk of raising AttributeError/KeyError exceptions. Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Feb 21 13:47:07 CET 2017 on sn-devel-144 commit f73c6bd2698ccd6e52b0782407c1c6c6fe78d60d Author: Andrej Date: Thu Jan 19 16:24:34 2017 +0100 Add missing import of sys in ms_schema.py Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni --- Summary of changes: buildtools/wafsamba/wscript | 4 ++-- python/samba/ms_schema.py | 1 + source3/wscript | 8 source4/lib/tls/wscript | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 8802e5a..fcaaf1b 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -490,12 +490,12 @@ struct foo bar = { .y = 'X', .x = 1 }; if not conf.CHECK_LARGEFILE(): raise Utils.WafError('Samba requires large file support support, but not available on this platform: sizeof(off_t) < 8') -if 'HAVE_STDDEF_H' in conf.env and 'HAVE_STDLIB_H' in conf.env: +if conf.env.HAVE_STDDEF_H and conf.env.HAVE_STDLIB_H: conf.DEFINE('STDC_HEADERS', 1) conf.CHECK_HEADERS('sys/time.h time.h', together=True) -if 'HAVE_SYS_TIME_H' in conf.env and 'HAVE_TIME_H' in conf.env: +if conf.env.HAVE_SYS_TIME_H and conf.env.HAVE_TIME_H: conf.DEFINE('TIME_WITH_SYS_TIME', 1) # cope with different extensions for libraries diff --git a/python/samba/ms_schema.py b/python/samba/ms_schema.py index c16693c..245ce3f 100644 --- a/python/samba/ms_schema.py +++ b/python/samba/ms_schema.py @@ -117,6 +117,7 @@ def __read_folded_line(f, buffer): def __read_raw_entries(f): """reads an LDIF entry, only unfolding lines""" +import sys # will not match options after the attribute type attr_type_re = re.compile("^([A-Za-z]+[A-Za-z0-9-]*):") diff --git a/source3/wscript b/source3/wscript index 07338e9..2ea1db2 100644 --- a/source3/wscript +++ b/source3/wscript @@ -141,7 +141,7 @@ long ret = splice(0,0,1,0,400,SPLICE_F_MOVE); host_os = sys.platform if host_os.rfind('sunos') == -1: conf.CHECK_HEADERS('sys/inotify.h') -if "HAVE_SYS_INOTIFY_H" in conf.env: +if conf.env.HAVE_SYS_INOTIFY_H: conf.DEFINE('HAVE_INOTIFY', 1) # Check for kernel change notify support @@ -313,7 +313,7 @@ int main(int argc, char **argv) conf.CHECK_STRUCTURE_MEMBER('struct stat', 'st_flags', define='HAVE_STAT_ST_FLAGS', headers='sys/types.h sys/stat.h unistd.h') -if "HAVE_BLKCNT_T" in conf.env: +if conf.env.HAVE_BLKCNT_T: conf.CHECK_CODE(''' static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 4)];''', 'SIZEOF_BLKCNT_T_4', @@ -321,7 +321,7 @@ int main(int argc, char **argv) msg="Checking whether blkcnt_t is 32 bit") # If sizeof is 4 it can't be 8 -if "HAVE_BLKCNT_T" in conf.env: +if conf.env.HAVE_BLKCNT_T: if not conf.CONFIG_SET('SIZEOF_BLKCNT_T_4'): conf.CHECK_CODE(''' static int test_array[1 - 2 * !(((long int)(sizeof(blkcnt_t))) <= 8)];''', @@ -332,7 +332,7 @@ int main(int argc, char **argv) # Check for POSIX capability support conf.CHECK_FUNCS_IN('cap_get_proc', 'cap', headers='sys/capability.h') -if &quo
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 2e1dc95 idmap4: Use sid_check_is_in_unix_groups() via e06a342 idmap4: Use sid_check_is_in_unix_users() via 166e23d lib: Avoid an includes.h via c66f57d lib: Add required prerequisites for librpc/gen_ndr/security.h via 24f0878 passdb: Move lookup_unix_[user|group]_name to lookup_sid.c via c5b9c58 lib: Add lib/util_unixsids.h via 6830a6a idmap4: Slightly simplify idmap_xid_to_sid via 2146df2 idmap4: Fix error path memleaks in idmap_init via f39ed43 idmap4: Fix idmap_ctx talloc hierarchy from 3660c76 ctdb-takeover: Clean up when exiting on error https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 2e1dc952f0505154f649c04da4b2194f433a6cbe Author: Volker Lendecke Date: Tue Dec 27 13:08:58 2016 + idmap4: Use sid_check_is_in_unix_groups() This avoids the need for the special unix groups sid Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Dec 29 00:05:25 CET 2016 on sn-devel-144 commit e06a342f80bf75863d0c0f057c19aeab2bcb3c29 Author: Volker Lendecke Date: Tue Dec 27 13:08:58 2016 + idmap4: Use sid_check_is_in_unix_users() This avoids the need for the special unix users sid Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 166e23d98b90a814450164eb363bbbcbad0a2163 Author: Volker Lendecke Date: Tue Dec 27 13:05:49 2016 + lib: Avoid an includes.h Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit c66f57d1de9bb95b61e7208c7c13900ec98ce643 Author: Volker Lendecke Date: Tue Dec 27 13:04:57 2016 + lib: Add required prerequisites for librpc/gen_ndr/security.h Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 24f08784a3a577699895f95d087dd5be085d032a Author: Volker Lendecke Date: Tue Dec 27 12:57:23 2016 + passdb: Move lookup_unix_[user|group]_name to lookup_sid.c This is the only user and reduces the dependencies of util_unixsids.c Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit c5b9c58032e4daba49e1119001bab9c93a0c2c77 Author: Volker Lendecke Date: Tue Dec 27 12:52:00 2016 + lib: Add lib/util_unixsids.h Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 6830a6a35026664a70f012dce973a9805c85b82d Author: Volker Lendecke Date: Tue Dec 27 12:32:13 2016 + idmap4: Slightly simplify idmap_xid_to_sid No need to parse "S-1-22-1", we have global_sid_Unix_Users Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 2146df24d86eff3cbe6ca713db3bee546f2c7de7 Author: Volker Lendecke Date: Tue Dec 27 12:21:09 2016 + idmap4: Fix error path memleaks in idmap_init Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit f39ed433dc6393e82e82ad734a79473abe01ee75 Author: Volker Lendecke Date: Tue Dec 27 12:19:54 2016 + idmap4: Fix idmap_ctx talloc hierarchy Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: libcli/security/security.h | 3 ++ source3/auth/auth_util.c | 1 + source3/auth/server_info.c | 1 + source3/auth/token_util.c | 1 + source3/include/proto.h| 13 --- source3/lib/util_sid_passdb.c | 1 + source3/lib/util_unixsids.c| 40 ++ .../winbindd_async.c => lib/util_unixsids.h} | 32 + ...passdb-0.25.0.sigs => samba-passdb-0.26.0.sigs} | 2 -- source3/passdb/lookup_sid.c| 36 +++ source3/winbindd/wb_lookupsids.c | 1 + source3/winbindd/winbindd_samr.c | 1 + source3/winbindd/winbindd_util.c | 1 + source3/wscript_build | 2 +- source4/winbind/idmap.c| 35 +++ source4/winbind/idmap.h| 2 -- 16 files changed, 79 insertions(+), 93 deletions(-) copy source3/{winbindd/winbindd_async.c => lib/util_unixsids.h} (54%) copy source3/passdb/ABI/{samba-passdb-0.25.0.sigs => samba-passdb-0.26.0.sigs} (99%) Changeset truncated at 500 lines: diff --git a/libcli/security/security.h b/libcli/security/security.h index 6e4b172..4df18eb 100644 --- a/libcli/security/security.h +++ b/libcli/security/security.h @@ -20,6 +20,9 @@ #ifndef _LIBCLI_SECURITY_SECURITY_H_ #define _LIBCLI_SECURITY_SECURITY_H_ +#include "lib/util/data_blob.h" +#include "
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 91d0275 winbindd: Use idmap cache in xids2sids via f7f49a2 idmap: Prime gencache after xids2sids calls via 9079dc4 idmap: Pass up the xid2sids unix-ids from the idmap child from a25fb5c idmap_rid: Add the error string in a debug https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 91d027554e414f371b3237110d1c92033d929992 Author: Volker Lendecke Date: Tue Dec 27 10:19:17 2016 + winbindd: Use idmap cache in xids2sids Typically smbd should have looked into the idmap cache itself before contacting winbind. But winbind has internal users of this API (getpwuid and getgrgid for example), and those need to use the cache too. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484 Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Dec 28 00:06:41 CET 2016 on sn-devel-144 commit f7f49a2354c99d95a302f070fe3aa97a949063c8 Author: Volker Lendecke Date: Tue Dec 20 16:22:48 2016 +0100 idmap: Prime gencache after xids2sids calls This fixes a performance regression for "hide unreadable". With an empty gencache, we only do xid2sid calls when reading a large number of acls. We lost caching the xid2sid calls while implmenting the multiple-id calls, probably because at that time the bug with ID_TYPE_BOTH backends was still pending. This patch restores the xid2sid caching hopefully correctly. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484 Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 9079dc4f4501c4e868f46de41b82927b69dc78d5 Author: Volker Lendecke Date: Wed Dec 21 11:29:08 2016 +0100 idmap: Pass up the xid2sids unix-ids from the idmap child When asking for gid2sid with an idmap backend that does ID_TYPE_BOTH and the sid in question is actually a user, the parent winbind needs to know about it. The next commit will prime the gencache also after xid2sid calls, and if we filled it with a ID_TYPE_GID entry, a later sid2uid call would fail. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12484 Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: librpc/idl/winbind.idl | 2 +- source3/winbindd/wb_xids2sids.c | 41 +++- source3/winbindd/winbindd_dual_srv.c | 1 + 3 files changed, 42 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/librpc/idl/winbind.idl b/librpc/idl/winbind.idl index 60c875b..ec472c5 100644 --- a/librpc/idl/winbind.idl +++ b/librpc/idl/winbind.idl @@ -59,7 +59,7 @@ interface winbind NTSTATUS wbint_UnixIDs2Sids( [in,string,charset(UTF8)] char *domain_name, [in] uint32 num_ids, - [in] unixid xids[num_ids], + [in,out] unixid xids[num_ids], [out] dom_sid sids[num_ids] ); diff --git a/source3/winbindd/wb_xids2sids.c b/source3/winbindd/wb_xids2sids.c index 7fc8a72..7ac1998 100644 --- a/source3/winbindd/wb_xids2sids.c +++ b/source3/winbindd/wb_xids2sids.c @@ -262,7 +262,20 @@ static void wb_xids2sids_dom_done(struct tevent_req *subreq) continue; } - sid_copy(&state->all_sids[i], &state->dom_sids[dom_sid_idx++]); + sid_copy(&state->all_sids[i], &state->dom_sids[dom_sid_idx]); + + /* +* Prime the cache after an xid2sid call. It's +* important that we use state->dom_xids for the xid +* value, not state->all_xids: state->all_xids carries +* what we asked for, e.g. a +* ID_TYPE_UID. state->dom_xids holds something the +* idmap child possibly changed to ID_TYPE_BOTH. +*/ + idmap_cache_set_sid2unixid( + &state->all_sids[i], &state->dom_xids[dom_sid_idx]); + + dom_sid_idx += 1; } tevent_req_done(req); @@ -340,6 +353,32 @@ struct tevent_req *wb_xids2sids_send(TALLOC_CTX *mem_ctx, return tevent_req_post(req, ev); } + if (winbindd_use_idmap_cache()) { + uint32_t i; + + for (i=0; isids[i], &sid); + } + } + } + wb_xids2sids_init_dom_maps(); num_domains = talloc_array_length(dom_maps); diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c index 4a581d33..7b80418 100644 --- a/source3/winbindd/winbindd_dual_srv.c +++ b/source3/winbindd/winbindd_dual_srv.c @@ -233,6 +233,7 @@ NTSTATUS _wbint_UnixIDs2
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 60fd6a3 WHATSNEW: document new inherit owner option via bb75943 WHATSNEW: document kerberos encryption types from a59e547 docs: fix funny typo in smb.conf manpage wrt Samba's FSRVP server. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 60fd6a324b1b98a02674b8afe36277359bdb5893 Author: Uri Simchoni Date: Wed Aug 10 08:38:59 2016 +0300 WHATSNEW: document new inherit owner option Signed-off-by: Uri Simchoni Reviewed-by: Rowland Penny Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Nov 24 20:23:46 CET 2016 on sn-devel-144 commit bb7594392f61ee284d1caec6c865e9663a705174 Author: Uri Simchoni Date: Wed Aug 10 08:38:30 2016 +0300 WHATSNEW: document kerberos encryption types Signed-off-by: Uri Simchoni Reviewed-by: Rowland Penny --- Summary of changes: WHATSNEW.txt | 27 +++ 1 file changed, 27 insertions(+) Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 6b96cae..6778a0a 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -16,6 +16,31 @@ UPGRADING NEW FEATURES/CHANGES +kerberos client encryption types + +Some parts of Samba (most notably winbindd) perform Kerberos client +operations based on a Samba-generated krb5.conf file. A new +parameter, "kerberos encryption types" allows configuring the +encryption types set in this file, thereby allowing the user to +enforce strong or legacy encryption in Kerberos exchanges. + +The default value of "all" is compatible with previous behavior, allowing +all encryption algorithms to be negotiated. Setting the parameter to "strong" +only allows AES-based algorithms to be negotiated. Setting the parameter to +"legacy" allows only RC4-HMAC-MD5 - the legacy algorithm for Active Directory. +This can solves some corner cases of mixed environments with Server 2003R2 and +newer DCs. + + +new option for owner inheritance + +The "inherit owner" smb.conf parameter instructs smbd to set the +owner of files to be the same as the parent directory's owner. +Up until now, this parameter could be set to "yes" or "no". +A new option, "unix only", enables this feature only for the UNIX owner +of the file, not affecting the SID owner in the Windows NT ACL of the +file. This can be used to emulate something very similar to folder quotas. + REMOVED FEATURES @@ -26,6 +51,8 @@ smb.conf changes Parameter NameDescription Default ----- --- + kerberos encryption types New all + inherit owner New option KNOWN ISSUES -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1366385 s3: vfs: streams_depot. Use conn->connectpath not conn->cwd. from 92a0a56 vfs:glusterfs: preallocate result for glfs_realpath https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1366385d1c3e9ac0556e954864e60e72f6906942 Author: Jeremy Allison Date: Fri Oct 21 11:04:02 2016 -0700 s3: vfs: streams_depot. Use conn->connectpath not conn->cwd. conn->cwd can change over the life of the connection, conn->connectpath remains static. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12387 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Oct 24 23:52:48 CEST 2016 on sn-devel-144 --- Summary of changes: source3/modules/vfs_streams_depot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_streams_depot.c b/source3/modules/vfs_streams_depot.c index d874514..aa54b8d 100644 --- a/source3/modules/vfs_streams_depot.c +++ b/source3/modules/vfs_streams_depot.c @@ -130,7 +130,8 @@ static char *stream_dir(vfs_handle_struct *handle, check_valid = lp_parm_bool(SNUM(handle->conn), "streams_depot", "check_valid", true); - tmp = talloc_asprintf(talloc_tos(), "%s/.streams", handle->conn->cwd); + tmp = talloc_asprintf(talloc_tos(), "%s/.streams", + handle->conn->connectpath); if (tmp == NULL) { errno = ENOMEM; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3f1f6e0 heimdal: revert 1f90983324b9f5804dc57f87c5f7695b0e53db8d via 0b61d9e heimdal-lib/krb5: keep a copy of config etypes in the context from 780a80c bug 12293: stop group.py throwing errors if group is unknown https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3f1f6e03cd38e241060ff10f1f153cc266dca888 Author: Uri Simchoni Date: Fri Sep 23 19:28:10 2016 +0300 heimdal: revert 1f90983324b9f5804dc57f87c5f7695b0e53db8d A different version has gone upstream, fixing the problem elsewhere. Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Oct 3 11:12:29 CEST 2016 on sn-devel-144 commit 0b61d9e02ea0680fbb3ef927d09a573813b4ed15 Author: Uri Simchoni Date: Fri Sep 30 20:18:14 2016 +0300 heimdal-lib/krb5: keep a copy of config etypes in the context When reading configuration file, keep an extra copy of the encryption types, and use this when resetting the encryption types to default. GSSAPI always resets the enctypes to default before obtaining a TGS, because the enctypes might have previously altered, so this prevents changing the etypes from the configured ones to the full set of supported etypes. The same patch has gone into upstream heimdal as commit a3bece1. It is a different solution to the problem fixed here by commit 1f90983, so this commit will be reverted next to keep compatibility with uptream. Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett --- Summary of changes: source4/heimdal/lib/gssapi/krb5/init_sec_context.c | 11 +--- source4/heimdal/lib/krb5/context.c | 29 ++ source4/heimdal/lib/krb5/krb5_locl.h | 1 + 3 files changed, 37 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/heimdal/lib/gssapi/krb5/init_sec_context.c b/source4/heimdal/lib/gssapi/krb5/init_sec_context.c index efc4215..0a89ae1 100644 --- a/source4/heimdal/lib/gssapi/krb5/init_sec_context.c +++ b/source4/heimdal/lib/gssapi/krb5/init_sec_context.c @@ -427,12 +427,15 @@ init_auth /* * This is hideous glue for (NFS) clients that wants to limit the * available enctypes to what it can support (encryption in - * kernel). + * kernel). If there is no enctypes selected for this credential, + * reset it to the default set of enctypes. */ { - if (cred && cred->enctypes) { - krb5_set_default_in_tkt_etypes(context, cred->enctypes); - } + krb5_enctype *enctypes = NULL; + + if (cred && cred->enctypes) + enctypes = cred->enctypes; + krb5_set_default_in_tkt_etypes(context, enctypes); } /* canon name if needed for client + target realm */ diff --git a/source4/heimdal/lib/krb5/context.c b/source4/heimdal/lib/krb5/context.c index 4290b71..23e3879 100644 --- a/source4/heimdal/lib/krb5/context.c +++ b/source4/heimdal/lib/krb5/context.c @@ -48,6 +48,11 @@ } \ } while(0) +static krb5_error_code +copy_enctypes(krb5_context context, + const krb5_enctype *in, + krb5_enctype **out); + /* * Set the list of etypes `ret_etypes' from the configuration variable * `name' @@ -123,6 +128,18 @@ init_context_from_config_file(krb5_context context) free(context->etypes); context->etypes = tmptypes; +/* The etypes member may change during the lifetime + * of the context. To be able to reset it to + * config value, we keep another copy. + */ +free(context->cfg_etypes); +context->cfg_etypes = NULL; +if (tmptypes) { + ret = copy_enctypes(context, tmptypes, &context->cfg_etypes); + if (ret) + return ret; +} + ret = set_etypes (context, "default_etypes_des", &tmptypes); if(ret) return ret; @@ -506,6 +523,11 @@ krb5_copy_context(krb5_context context, krb5_context *out) if (ret) goto out; } +if (context->cfg_etypes) { + ret = copy_etypes(context, context->cfg_etypes, &p->cfg_etypes); + if (ret) + goto out; +} if (context->etypes_des) { ret = copy_etypes(context, context->etypes_des, &p->etypes_des); if (ret) @@ -574,6 +596,7 @@ krb5_free_context(krb5_context context) if (context->default_cc_name_env) free(context->default_cc_name_env); free(context->etypes); +free(context->cfg_etypes); free(context->etypes_des); krb5_free_host_realm (context, context->
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 85a309b s3-rpc_client: use spoolss_driver_version_to_qword in winreg_printer_ver_to_qword via 04bb54d s3-rpc_client: use spoolss_timestr_to_NTTIME in winreg_printer_date_to_NTTIME via 2f4f9a0 s3-rpc_client: add spoolss_driver_version_to_qword() via 56949a1 s3-rpc_client: add spoolss_timestr_to_NTTIME() via b7e1a77 librpc: fix some variable names in winspool protocol IDL via 2d2e336 hresult: re-generate hresult error code definitions from MS-ERREF. via 8f056d0 hresult: add new HRESULT_FROM_WERROR macro from 5ab88dd s4-kdc: Remove unused etypes from sdb structure https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 85a309b5a3fcb5c230aa599f89fc152822329971 Author: Günther Deschner Date: Fri Sep 23 17:08:02 2016 +0200 s3-rpc_client: use spoolss_driver_version_to_qword in winreg_printer_ver_to_qword Guenter Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Sep 27 00:09:18 CEST 2016 on sn-devel-144 commit 04bb54dbd8bc366b034b903d5ca79a6f3bb571f1 Author: Günther Deschner Date: Fri Sep 23 17:07:23 2016 +0200 s3-rpc_client: use spoolss_timestr_to_NTTIME in winreg_printer_date_to_NTTIME Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni commit 2f4f9a086cfa7220663f69d15d27fe67e0a666e3 Author: Günther Deschner Date: Fri Sep 23 17:11:27 2016 +0200 s3-rpc_client: add spoolss_driver_version_to_qword() Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni commit 56949a1c32fad6f1de387d37aaeb83b131cd0e14 Author: Günther Deschner Date: Fri Sep 23 17:10:22 2016 +0200 s3-rpc_client: add spoolss_timestr_to_NTTIME() Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni commit b7e1a770dd9151737000d88f84dffbd42eacd7f8 Author: Günther Deschner Date: Thu Sep 22 16:30:52 2016 +0200 librpc: fix some variable names in winspool protocol IDL never undestimate the power of sed... Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni commit 2d2e33657507d9e31d6f6d30e296537730c2a7b3 Author: Günther Deschner Date: Mon Sep 26 18:32:54 2016 +0200 hresult: re-generate hresult error code definitions from MS-ERREF. Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni commit 8f056d07ab6850c88646ec65c2abb84790e11e35 Author: Günther Deschner Date: Sun Sep 25 19:51:03 2016 +0200 hresult: add new HRESULT_FROM_WERROR macro Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni --- Summary of changes: libcli/util/hresult.c | 79 ++--- libcli/util/hresult.h | 2 + librpc/idl/winspool.idl | 8 ++-- source3/rpc_client/cli_winreg_spoolss.c | 30 +++-- source3/rpc_client/init_spoolss.c | 50 + source3/rpc_client/init_spoolss.h | 4 ++ source4/scripting/bin/gen_hresult.py| 1 + 7 files changed, 109 insertions(+), 65 deletions(-) Changeset truncated at 500 lines: diff --git a/libcli/util/hresult.c b/libcli/util/hresult.c index 327d97b..2bea989 100644 --- a/libcli/util/hresult.c +++ b/libcli/util/hresult.c @@ -234,7 +234,7 @@ static const struct { { HRES_SCHED_S_BATCH_LOGON_PROBLEM, "HRES_SCHED_S_BATCH_LOGON_PROBLEM", - "The task is registered, but it may fail to start. Batch logon privilege needs to be enabled for the task principal." + "The task is registered, but it might fail to start. Batch logon privilege needs to be enabled for the task principal." }, { HRES_XACT_S_ASYNC, @@ -384,7 +384,7 @@ static const struct { { HRES_NS_S_WMP_UI_VERSIONMISMATCH, "HRES_NS_S_WMP_UI_VERSIONMISMATCH", - "An upgrade may be needed for the theme manager to correctly show this skin. Skin reports version: %.1f." + "An upgrade is needed for the theme manager to correctly show this skin. Skin reports version: %.1f." }, { HRES_NS_S_WMP_EXCEPTION, @@ -949,12 +949,12 @@ static const struct { { HRES_CO_E_CREATEPROCESS_FAILURE, "HRES_CO_E_CREATEPROCESS_FAILURE", - "The server process could not be started. The path name may be incorrect." + "The server process could not be started. The path name might be i
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 839cd98 s4-torture: cleanup torture_suite_add_ndr_pull_validate_test API. from d8b57e3 s3-spoolss: fix _spoolss_GetPrinterDataEx by moving the keyname lengthcheck. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 839cd98f48cbfc84d70a73828a6bf14b1c2999c8 Author: Günther Deschner Date: Mon Jul 25 16:37:19 2016 +0200 s4-torture: cleanup torture_suite_add_ndr_pull_validate_test API. Guenther Signed-off-by: Guenther Deschner Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Sep 7 09:28:13 CEST 2016 on sn-devel-144 --- Summary of changes: source4/torture/ndr/backupkey.c | 3 +-- source4/torture/ndr/clusapi.c | 4 ++-- source4/torture/ndr/drsblobs.c | 18 -- source4/torture/ndr/krb5pac.c | 30 ++ source4/torture/ndr/nbt.c | 8 source4/torture/ndr/ndr.h | 11 ++- source4/torture/ndr/negoex.c| 2 +- source4/torture/ndr/ntlmssp.c | 4 ++-- 8 files changed, 38 insertions(+), 42 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/ndr/backupkey.c b/source4/torture/ndr/backupkey.c index abf34ac..1be9229 100644 --- a/source4/torture/ndr/backupkey.c +++ b/source4/torture/ndr/backupkey.c @@ -156,8 +156,7 @@ struct torture_suite *ndr_backupkey_suite(TALLOC_CTX *ctx) torture_suite_add_ndr_pull_validate_test(suite, bkrp_exported_RSA_key_pair, - data_blob_const(exported_rsa_ndr, - sizeof(exported_rsa_ndr)), + exported_rsa_ndr, NULL); return suite; diff --git a/source4/torture/ndr/clusapi.c b/source4/torture/ndr/clusapi.c index 3fe84db..cf2ac67 100644 --- a/source4/torture/ndr/clusapi.c +++ b/source4/torture/ndr/clusapi.c @@ -371,12 +371,12 @@ struct torture_suite *ndr_clusapi_suite(TALLOC_CTX *ctx) torture_suite_add_ndr_pull_validate_test(suite, clusapi_PROPERTY_LIST, - data_blob_const(clusapi_PROPERTY_LIST_data,sizeof(clusapi_PROPERTY_LIST_data)), + clusapi_PROPERTY_LIST_data, clusapi_PROPERTY_LIST_check); torture_suite_add_ndr_pull_validate_test(suite, clusapi_PROPERTY_LIST, - data_blob_const(clusapi_PROPERTY_LIST_data2,sizeof(clusapi_PROPERTY_LIST_data2)), + clusapi_PROPERTY_LIST_data2, clusapi_PROPERTY_LIST_check2); return suite; diff --git a/source4/torture/ndr/drsblobs.c b/source4/torture/ndr/drsblobs.c index b1a4711..0ef2d95 100644 --- a/source4/torture/ndr/drsblobs.c +++ b/source4/torture/ndr/drsblobs.c @@ -513,37 +513,35 @@ struct torture_suite *ndr_drsblobs_suite(TALLOC_CTX *ctx) torture_suite_add_ndr_pull_test(suite, ForestTrustInfo, forest_trust_info_data_out, forest_trust_info_check_out); torture_suite_add_ndr_pull_test(suite, trustDomainPasswords, trust_domain_passwords_in, trust_domain_passwords_check_in); - torture_suite_add_ndr_pull_validate_test(suite, + torture_suite_add_ndr_pull_validate_test_blob(suite, trustAuthInOutBlob, base64_decode_data_blob_talloc(suite, trustAuthIncoming), NULL); - torture_suite_add_ndr_pull_validate_test(suite, + torture_suite_add_ndr_pull_validate_test_blob(suite, trustAuthInOutBlob, base64_decode_data_blob_talloc(suite, trustAuthOutgoing), NULL); torture_suite_add_ndr_pull_validate_test(empty1_suite, supplementalCredentialsBlob, - data_blob_const(supplementalCredentials_empty1, - sizeof(supplementalCredentials_empty1)), + supplementalCredentials_empty1, supplementalCredentials_empty1_check); torture_suite_add_ndr_pull_validate_test(empty2_suite, supplementalCredentialsBlob, - data_blob_const(supplementalCredentials_empty2, - sizeof(supplementalCredentials_empty2
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 57a54af s3: smbclient: In order to get shadow copy data over SMB1 we must call cli_shadow_copy_data() twice. via 336da63 s3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv(). via a9fe27e s3: libsmb: Correctly set max_setup_size in FSCTL_GET_SHADOW_COPY_DATA nttrans ioctl. via 0b252d7 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_list_trans_send(). via e4a261c s3: libsmb: Make a comment note that cli_set_ea() needs some internal changes before cli_set_ea_path() can use previous path versions. via 97cde5d s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ctemp_send(). via e2d7055 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_chkpath_send(). via 00551d7 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setatr_send(). via 461000c s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_getatr_send(). via 47c1314 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_openx_create(). via d7ee917 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_nttrans_create_send(). via cd4a60b s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntcreate1_send(). via 17d1f19 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rmdir_send() via 3081604 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_mkdir_send(). via 3242a0b s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_unlink_send(). via c2a1905 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_ntrename_internal_send(). via ae70479 s3: libsmb: s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_rename_send(). via 21a7bf4 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_qpathinfo_send() via 75e4290 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_setpathinfo_send(). via 19696f3 s3: libsmb: Add clistr_is_previous_version_path() via 79c8b75 s3: libsmb: Add uint16_t addtional_flags2 to cli_smb_req_create(). via 76bbc4c s3: libsmb: Add uint16_t addtional_flags2 to cli_trans_send(). via a876f91 s3: libsmb: Add uint16_t additional_flags2 arg to cli_smb_send(). via 66650e6 s3: SMB1: Add missing FLAGS2 definitions from MS-SMB. from 3c103f9 netcmd/domain: improve error message grammar https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 57a54af66f414708d5c02f346f08bc4bfd55349d Author: Jeremy Allison Date: Thu Aug 18 14:36:50 2016 -0700 s3: smbclient: In order to get shadow copy data over SMB1 we must call cli_shadow_copy_data() twice. Once with 'get_names = false' to get the size, then again with 'get_names = true' to get the data or a Windows server fails to return valid info. Samba doesn't have this bug. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Fri Aug 19 23:59:35 CEST 2016 on sn-devel-144 commit 336da637541fba13586af6fc2cb9d143d656e87e Author: Jeremy Allison Date: Thu Aug 18 12:06:23 2016 -0700 s3: libsmb: Do some hardening in the receive processing of cli_shadow_copy_data_recv(). Protect against malicious servers. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit a9fe27e17ce55461946037bb25a432da340095ab Author: Jeremy Allison Date: Thu Aug 18 14:33:01 2016 -0700 s3: libsmb: Correctly set max_setup_size in FSCTL_GET_SHADOW_COPY_DATA nttrans ioctl. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 0b252d7c6fdd963308fff8938a8be185892afbbe Author: Jeremy Allison Date: Thu Aug 18 14:26:20 2016 -0700 s3: libsmb: Plumb in additional_flags2 = FLAGS2_REPARSE_PATH to cli_list_trans_send(). BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit e4a261c6c826a2be75bcd9d6af8232f043acc5f1 Author: Jeremy Allison Date: Thu Aug 18 14:20:11 2016 -0700 s3: libsmb: Make a comment note that cli_set_ea() needs some internal changes before cli_set_ea_path() can use previous path versions. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12165 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 97cde5dc92185f188868ddd71287d43ddae30516 Author: Jeremy Allison Date: Thu Aug 18 14:07:17 2016 -0700 s3: libsmb: Plumb in additional_flags2
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 98ea4a2 pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID from 23b4fb6 s3-libnet: Add missing format element https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 98ea4a2219c4ff1c1a8307f64a7588845be7af6f Author: ouyang.xu Date: Mon Jul 11 18:12:52 2016 +0800 pvfs_open win10 fix, need return SMB2_CREATE_TAG_QFID Signed-off-by: kkhaike Reviewed-by: Jeremy Allison Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Fri Aug 19 09:35:15 CEST 2016 on sn-devel-144 --- Summary of changes: source4/libcli/raw/interfaces.h | 4 +++- source4/ntvfs/ntvfs_generic.c| 3 +++ source4/ntvfs/posix/pvfs_open.c | 18 ++ source4/smb_server/smb/nttrans.c | 1 + source4/smb_server/smb/reply.c | 1 + source4/smb_server/smb2/fileio.c | 5 + 6 files changed, 31 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source4/libcli/raw/interfaces.h b/source4/libcli/raw/interfaces.h index 7e8258e..732ba15 100644 --- a/source4/libcli/raw/interfaces.h +++ b/source4/libcli/raw/interfaces.h @@ -1464,9 +1464,10 @@ union smb_open { NTTRANS varient of the call */ struct security_descriptor *sec_desc; struct smb_ea_list *ea_list; - + /* some optional parameters from the SMB2 varient */ bool query_maximal_access; + bool query_on_disk_id; /* private flags for internal use only */ uint8_t private_flags; @@ -1489,6 +1490,7 @@ union smb_open { /* optional return values matching SMB2 tagged values in the call */ uint32_t maximal_access; + uint8_t on_disk_id[32]; } out; } ntcreatex, nttrans, generic; diff --git a/source4/ntvfs/ntvfs_generic.c b/source4/ntvfs/ntvfs_generic.c index 4edc31c..fe68b41 100644 --- a/source4/ntvfs/ntvfs_generic.c +++ b/source4/ntvfs/ntvfs_generic.c @@ -236,6 +236,8 @@ static NTSTATUS ntvfs_map_open_finish(struct ntvfs_module_context *ntvfs, io->smb2.out.file_attr = io2->generic.out.attrib; io->smb2.out.reserved2 = 0; io->smb2.out.maximal_access = io2->generic.out.maximal_access; + memcpy(io->smb2.out.on_disk_id, io2->generic.out.on_disk_id, + sizeof(io2->generic.out.on_disk_id)); break; default: @@ -529,6 +531,7 @@ NTSTATUS ntvfs_map_open(struct ntvfs_module_context *ntvfs, io2->generic.in.sec_desc= io->smb2.in.sec_desc; io2->generic.in.ea_list = &io->smb2.in.eas; io2->generic.in.query_maximal_access = io->smb2.in.query_maximal_access; + io2->generic.in.query_on_disk_id = io->smb2.in.query_on_disk_id; io2->generic.in.private_flags = 0; /* we don't support timewarp yet */ diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index ceee642..48d2712 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -407,6 +407,12 @@ static NTSTATUS pvfs_open_directory(struct pvfs_state *pvfs, return NT_STATUS_OBJECT_NAME_NOT_FOUND; } + if (io->generic.in.query_on_disk_id) { + ZERO_ARRAY(io->generic.out.on_disk_id); + SBVAL(io->generic.out.on_disk_id, 0, name->st.st_ino); + SBVAL(io->generic.out.on_disk_id, 8, name->st.st_dev); + } + /* the open succeeded, keep this handle permanently */ status = ntvfs_handle_set_backend_data(h, pvfs->ntvfs, f); if (!NT_STATUS_IS_OK(status)) { @@ -722,6 +728,12 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, } } + if (io->generic.in.query_on_disk_id) { + ZERO_ARRAY(io->generic.out.on_disk_id); + SBVAL(io->generic.out.on_disk_id, 0, name->st.st_ino); + SBVAL(io->generic.out.on_disk_id, 8, name->st.st_dev); + } + /* form the lock context used for byte range locking and opendb locking */ status = pvfs_locking_key(name, f->handle, &f->handle->odb_locking_key); @@ -1434,6 +1446,12 @@ NTSTATUS pvfs_open(struct ntvfs_module_context *ntvfs, NT_STATUS_NOT_OK_RETURN(status); } + if (io->generic.in.query_on_disk_id) { +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ce82bf0 selftest: add a test for new "inherit owner" option via 1dfd8df smbd: add an option to inherit only the UNIX owner via ebb3b34 selftest: add a test for "inherit owner" parameter via 2a8ccc0 libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path. via 27ebf64 s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss. via c0246b4 ctdb-ib: Fix DEBUG log messages via f1a8fb1 ctdb-recovery-helper: Fix format-nonliteral warning via 5176354 ctdb-daemon: Fix format-nonliteral warning via fa0015d ctdb-daemon: Fix format-nonliteral warning via d682ee9 ctdb-daemon: Fix format-nonliteral warning via b201859 ctdb-common: Fix format-nonliteral warning from 415a3a5 ctdb-tests: Log errors if the test fails https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ce82bf09fe2170e7277af044c887180b5fcdc703 Author: Uri Simchoni Date: Wed Aug 10 05:00:23 2016 +0300 selftest: add a test for new "inherit owner" option Add a test for the "unix only" option of "inherit owner" smb.conf parameter. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Aug 10 11:25:52 CEST 2016 on sn-devel-144 commit 1dfd8df23d63f786788bc24ebb71039feaf34d91 Author: Uri Simchoni Date: Tue Aug 2 09:37:00 2016 +0300 smbd: add an option to inherit only the UNIX owner This can be used to emulate folder quotas, as explained in the modified manpage. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison commit ebb3b34ec5d323692e59dad1bf8559920eee1fcf Author: Uri Simchoni Date: Wed Aug 10 04:58:45 2016 +0300 selftest: add a test for "inherit owner" parameter Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison commit 2a8ccc0841184c2df9fc19f8452009b92071c115 Author: Jeremy Allison Date: Tue Aug 9 11:57:20 2016 -0700 libgpo: Correctly use the 'server' parameter after parsing it out of the GPO path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 27ebf64b347a770e0d1ad4f1db645cb1b8dd5861 Author: Jeremy Allison Date: Mon Aug 8 16:53:21 2016 -0700 s3: libsmb: Protect cli_connect_nb_send() from being passed a NULL hostname and dest_ss. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12135 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit c0246b4cc2c351dced44d28021ee4139bdf7b288 Author: Amitay Isaacs Date: Tue Aug 2 18:22:13 2016 +1000 ctdb-ib: Fix DEBUG log messages https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni commit f1a8fb11dda578f194063cdcf2c5dca7000b272b Author: Amitay Isaacs Date: Tue Aug 2 19:04:17 2016 +1000 ctdb-recovery-helper: Fix format-nonliteral warning ... and printf format errors. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni commit 5176354d1279f0e3c216c58ea8637579d9a6a389 Author: Amitay Isaacs Date: Tue Aug 2 19:00:54 2016 +1000 ctdb-daemon: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni commit fa0015d9adbd3c98957dc61d04b7ffcaa6703e0f Author: Amitay Isaacs Date: Tue Aug 2 18:58:51 2016 +1000 ctdb-daemon: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni commit d682ee99810caac489c20d8b673ff4b12a17d75f Author: Amitay Isaacs Date: Tue Aug 2 18:54:31 2016 +1000 ctdb-daemon: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni commit b201859372189b6e7d57e078a813861a1533aaf4 Author: Amitay Isaacs Date: Tue Aug 2 18:31:14 2016 +1000 ctdb-common: Fix format-nonliteral warning BUG: https://bugzilla.samba.org/show_bug.cgi?id=12137 Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni --- Summary of changes: ctdb/common/common.h | 3 +- ctdb/ib/ibwrapper.c | 20 ++-- ctdb/include/ctdb_private.h | 5 +- ctdb/server/ctdb_recovery_helper.c| 6 +- ctdb/server/eventscript.c | 8 ++ docs-xml/smbdotconf/security/inheritowne
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9d29593 tevent: Clarify apparently useless conditions from 792f89c Fix typo in python/samba/provision/__init__.py https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9d29593d9224ba1d380bb697d45238f34c1edf53 Author: Nikolai Kondrashov Date: Wed Jun 29 15:05:08 2016 +0300 tevent: Clarify apparently useless conditions Comment on two similar conditions in tevent_standard.c, which, otherwise, at a first glance, seem useless, i.e. always true. The conditions checking glue->epoll_ops for being non-NULL, imply that it *can* be NULL. A casual reader would not generally expect a "member" function to modify its container's pointer in a container higher up, and would assume that glue->epoll_ops could be NULL before the call, resulting in a near-NULL pointer dereference. However, in this case epoll_ops is indeed cleared in those "member" functions, in the case of an epoll interface failure, to signify fallback to poll interface. Reviewed-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Jul 12 13:56:41 CEST 2016 on sn-devel-144 --- Summary of changes: lib/tevent/tevent_standard.c | 10 ++ 1 file changed, 10 insertions(+) Changeset truncated at 500 lines: diff --git a/lib/tevent/tevent_standard.c b/lib/tevent/tevent_standard.c index a050901..30e9b91 100644 --- a/lib/tevent/tevent_standard.c +++ b/lib/tevent/tevent_standard.c @@ -112,6 +112,11 @@ static int std_event_loop_once(struct tevent_context *ev, const char *location) int ret; ret = glue->epoll_ops->loop_once(ev, location); + /* +* If the above hasn't panicked due to an epoll interface failure, +* std_fallback_to_poll() wasn't called, and hasn't cleared epoll_ops to +* signify fallback to poll_ops. +*/ if (glue->epoll_ops != NULL) { /* No fallback */ return ret; @@ -138,6 +143,11 @@ static int std_event_loop_wait(struct tevent_context *ev, const char *location) int ret; ret = glue->epoll_ops->loop_wait(ev, location); + /* +* If the above hasn't panicked due to an epoll interface failure, +* std_fallback_to_poll() wasn't called, and hasn't cleared epoll_ops to +* signify fallback to poll_ops. +*/ if (glue->epoll_ops != NULL) { /* No fallback */ return ret; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c0704d9 s3: libsmb: Correctly trim a trailing \ character in cli_smb2_create_fnum_send() when passing a pathname to SMB2 create. from e29d8f1 libnet: ignore realm setting for domain security joins to AD domains if 'winbind rpc only = true' https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c0704d99ce43a5497a29bfc53331159e4f978441 Author: Jeremy Allison Date: Tue Jun 21 15:49:27 2016 -0700 s3: libsmb: Correctly trim a trailing \\ character in cli_smb2_create_fnum_send() when passing a pathname to SMB2 create. We already trim any leading \\ characters in this function, so this is the simplest place to clean the pathname. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11986 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Jun 22 10:33:29 CEST 2016 on sn-devel-144 --- Summary of changes: source3/libsmb/cli_smb2_fnum.c | 12 1 file changed, 12 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index a17d918..c5b1434 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -176,6 +176,7 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx, { struct tevent_req *req, *subreq; struct cli_smb2_create_fnum_state *state; + size_t fname_len = 0; req = tevent_req_create(mem_ctx, &state, struct cli_smb2_create_fnum_state); @@ -199,6 +200,17 @@ struct tevent_req *cli_smb2_create_fnum_send(TALLOC_CTX *mem_ctx, fname++; } + /* Or end in a '\' */ + fname_len = strlen(fname); + if (fname_len > 0 && fname[fname_len-1] == '\\') { + char *new_fname = talloc_strdup(state, fname); + if (tevent_req_nomem(new_fname, req)) { + return tevent_req_post(req, ev); + } + new_fname[fname_len-1] = '\0'; + fname = new_fname; + } + subreq = smb2cli_create_send(state, ev, cli->conn, cli->timeout, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e46cb9b s3: krb5: keytab - The done label can be jumped to with context == NULL. from 0e2711b lib: Fix uninitialized read in msghdr_copy https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e46cb9b835eb8f2bd998def82baf6f07fda9fe5c Author: Jeremy Allison Date: Wed Jun 8 14:50:59 2016 -0700 s3: krb5: keytab - The done label can be jumped to with context == NULL. Ensure we don't crash in this case. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11959 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Jun 9 13:18:56 CEST 2016 on sn-devel-144 --- Summary of changes: source3/libads/kerberos_keytab.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 731895e..160b5839 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -552,26 +552,24 @@ done: TALLOC_FREE(oldEntries); TALLOC_FREE(frame); - { + if (context) { krb5_keytab_entry zero_kt_entry; + krb5_kt_cursor zero_csr; + ZERO_STRUCT(zero_kt_entry); + ZERO_STRUCT(zero_csr); + if (memcmp(&zero_kt_entry, &kt_entry, sizeof(krb5_keytab_entry))) { smb_krb5_kt_free_entry(context, &kt_entry); } - } - { - krb5_kt_cursor zero_csr; - ZERO_STRUCT(zero_csr); if ((memcmp(&cursor, &zero_csr, sizeof(krb5_kt_cursor)) != 0) && keytab) { krb5_kt_end_seq_get(context, keytab, &cursor); } - } - if (keytab) { - krb5_kt_close(context, keytab); - } - if (context) { + if (keytab) { + krb5_kt_close(context, keytab); + } krb5_free_context(context); } return ret; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e70fef9 winbindd: prevent log spam when enumerating users via 32c7d0c winbindd: log domain name of failures to get trustdoms from e8c9e10 talloc: rename local timeval function copies https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e70fef92b2da7593f32c92079b257299bd8fb8b9 Author: Ralph Boehme Date: Tue May 31 18:52:12 2016 +0200 winbindd: prevent log spam when enumerating users When enumerating users we try to fetch sAMAccountType attribute which might not be present for whatever reason. Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Reviewed-by: Michael Adam Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Jun 2 09:04:13 CEST 2016 on sn-devel-144 commit 32c7d0c410abb9e5c51347404a5b71ac56e0b24f Author: Ralph Boehme Date: Wed Feb 3 08:07:02 2016 +0100 winbindd: log domain name of failures to get trustdoms Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Reviewed-by: Michael Adam --- Summary of changes: source3/winbindd/winbindd_ads.c | 11 --- source3/winbindd/winbindd_util.c | 3 ++- 2 files changed, 10 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/winbindd_ads.c b/source3/winbindd/winbindd_ads.c index a9a23db..dc92a4a 100644 --- a/source3/winbindd/winbindd_ads.c +++ b/source3/winbindd/winbindd_ads.c @@ -343,10 +343,15 @@ static NTSTATUS query_user_list(struct winbindd_domain *domain, struct wbint_userinfo *info = &((*pinfo)[count]); uint32_t group; uint32_t atype; + bool ok; - if (!ads_pull_uint32(ads, msg, "sAMAccountType", &atype) || - ds_atype_map(atype) != SID_NAME_USER) { - DEBUG(1,("Not a user account? atype=0x%x\n", atype)); + ok = ads_pull_uint32(ads, msg, "sAMAccountType", &atype); + if (!ok) { + DBG_INFO("Object lacks sAMAccountType attribute\n"); + continue; + } + if (ds_atype_map(atype) != SID_NAME_USER) { + DBG_INFO("Not a user account? atype=0x%x\n", atype); continue; } diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index c323520..f0344b1 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -348,7 +348,8 @@ static void trustdom_list_done(struct tevent_req *req) res = wb_domain_request_recv(req, state, &response, &err); if ((res == -1) || (response->result != WINBINDD_OK)) { - DBG_WARNING("Could not receive trustdoms\n"); + DBG_WARNING("Could not receive trusts for domain %s\n", + state->domain->name); TALLOC_FREE(state); return; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 847eff3 s3-sysquotas-linux - cleanup via 38356be s3-sysquotas-linux: remove check for EDQUOT on getting user quota via 9fa8b5c s3-sysquotas-linux: remove support for old interfaces from 4db5711 ctdb-common: Use correct macro for checking Ethernet hardware family https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 847eff3b4be5925dea0a23829a3bdbf13a50073a Author: Uri Simchoni Date: Mon May 23 23:14:12 2016 +0300 s3-sysquotas-linux - cleanup Now that the module supports only the current Linux quota interface, it does not need a two-level hierarchy. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu May 26 18:54:12 CEST 2016 on sn-devel-144 commit 38356bed8064e2b4be2923ae2073800248db749f Author: Uri Simchoni Date: Mon May 23 22:27:28 2016 +0300 s3-sysquotas-linux: remove check for EDQUOT on getting user quota The same check is done by sys_get_quota() which is the only caller. Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison commit 9fa8b5cf84e3d13250bf24728ee7e4db5f551b79 Author: Uri Simchoni Date: Mon May 23 22:07:39 2016 +0300 s3-sysquotas-linux: remove support for old interfaces Remove support for Linux quota interfaces that predate the 2.6.x kernel series. Glibc has been supporting the "current" quota interface for over 10 years now... Signed-off-by: Uri Simchoni Reviewed-by: Jeremy Allison --- Summary of changes: source3/include/samba_linux_quota.h | 335 - source3/lib/sysquotas_linux.c | 475 ++-- 2 files changed, 73 insertions(+), 737 deletions(-) delete mode 100644 source3/include/samba_linux_quota.h Changeset truncated at 500 lines: diff --git a/source3/include/samba_linux_quota.h b/source3/include/samba_linux_quota.h deleted file mode 100644 index 51acc20..000 --- a/source3/include/samba_linux_quota.h +++ /dev/null @@ -1,335 +0,0 @@ -#ifndef _SAMBA_LINUX_QUOTA_H_ -#define _SAMBA_LINUX_QUOTA_H_ -/* - Unix SMB/CIFS implementation. - Copyright (C) Andrew Tridgell 1994-2002 - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* - This file is needed because Quota support on Linux has - been broken since Linus kernel 2.4.x. It will only get - better (and this file be removed) when all the distributions - ship a glibc with a working quota.h file. This is very - bad. JRA. - - Original file came from Christoph Hellwig . - Massaged into one nasty include file (to stop us having to - add multiple files into Samba just for Linux braindamage) - by JRA. -*/ - -#undef QUOTABLOCK_SIZE - -#ifndef _QUOTAIO_LINUX_V1 -#define _QUOTAIO_LINUX_V1 - -/* - * Headerfile for old quotafile format - */ - -#include - -#define V1_DQBLK_SIZE_BITS 10 -#define V1_DQBLK_SIZE (1 << V1_DQBLK_SIZE_BITS)/* Size of one quota block in bytes in old format */ - -#define V1_DQOFF(__id) ((loff_t) ((__id) * sizeof(struct v1_disk_dqblk))) - -/* Structure of quota on disk */ -struct v1_disk_dqblk { - u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ - u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ - u_int32_t dqb_curblocks;/* current block count */ - u_int32_t dqb_ihardlimit; /* maximum # allocated inodes */ - u_int32_t dqb_isoftlimit; /* preferred limit on inodes */ - u_int32_t dqb_curinodes;/* current # allocated inodes */ - time_t dqb_btime; /* time limit for excessive disk use */ - time_t dqb_itime; /* time limit for excessive files */ -} __attribute__ ((packed)); - -/* Structure used for communication with kernel */ -struct v1_kern_dqblk { - u_int32_t dqb_bhardlimit; /* absolute limit on disk blks alloc */ - u_int32_t dqb_bsoftlimit; /* preferred limit on disk blks */ - u_int32_t dqb_curblocks;/* current block count */ - u_int32_t dqb_ihardlimit; /* maximum # allocated inode
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 84aea20 ctdb: Fix CID 1327222 Copy into fixed size buffer via 04b5e9c ctdb: Fix CID 1361817 Dereference after null check from 404acae dbwrap_ctdb: Remove get_my_vnn dependency https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 84aea20f37f7a59c13eb0dcb63e26a389fcc47ee Author: Volker Lendecke Date: Tue May 17 11:39:38 2016 +0200 ctdb: Fix CID 1327222 Copy into fixed size buffer Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue May 17 21:21:30 CEST 2016 on sn-devel-144 commit 04b5e9c9a629add210cafd802c9f4d584d4925b8 Author: Volker Lendecke Date: Tue May 17 11:36:44 2016 +0200 ctdb: Fix CID 1361817 Dereference after null check Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: ctdb/tests/src/fake_ctdbd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/ctdb/tests/src/fake_ctdbd.c b/ctdb/tests/src/fake_ctdbd.c index 0d08313..462ecb7 100644 --- a/ctdb/tests/src/fake_ctdbd.c +++ b/ctdb/tests/src/fake_ctdbd.c @@ -2097,11 +2097,17 @@ static bool server_recv(struct tevent_req *req, int *perr) static int socket_init(const char *sockpath) { struct sockaddr_un addr; + size_t len; int ret, fd; memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; - strcpy(addr.sun_path, sockpath); + + len = strlcpy(addr.sun_path, sockpath, sizeof(addr.sun_path)); + if (len >= sizeof(addr.sun_path)) { + fprintf(stderr, "path too long: %s\n", sockpath); + return -1; + } fd = socket(AF_UNIX, SOCK_STREAM, 0); if (fd == -1) { @@ -2172,6 +2178,7 @@ static void start_server(TALLOC_CTX *mem_ctx, struct tevent_context *ev, req = server_send(mem_ctx, ev, ctdb, fd); if (req == NULL) { fprintf(stderr, "Memory error\n"); + exit(1); } len = write(pfd, &ret, sizeof(ret)); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 07e2f47 Fix the smb2_setinfo to handle FS info types and FSQUOTA infolevel from f4181f2 ldb-samba/ldb_matching_rules: Fix CID 1349424 - Uninitialized pointer read https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 07e2f4731e5819a893c4675d93fede5ea261bed7 Author: Partha Sarathi Date: Thu Apr 14 12:39:05 2016 + Fix the smb2_setinfo to handle FS info types and FSQUOTA infolevel Signed-off-by: Partha Sarathi Reviewed-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Apr 27 05:39:01 CEST 2016 on sn-devel-144 --- Summary of changes: source3/smbd/globals.h | 7 +++ source3/smbd/smb2_setinfo.c | 18 ++ source3/smbd/trans2.c | 143 3 files changed, 116 insertions(+), 52 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/globals.h b/source3/smbd/globals.h index 4c02083..9e3e95c 100644 --- a/source3/smbd/globals.h +++ b/source3/smbd/globals.h @@ -140,6 +140,13 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn, char **ppdata, unsigned int *pdata_size); +NTSTATUS smbd_do_setfsinfo(connection_struct *conn, + struct smb_request *req, + TALLOC_CTX *mem_ctx, + uint16_t info_level, + files_struct *fsp, + const DATA_BLOB *pdata); + NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn, struct smb_request *req, TALLOC_CTX *mem_ctx, diff --git a/source3/smbd/smb2_setinfo.c b/source3/smbd/smb2_setinfo.c index 9361aea..a9196fe 100644 --- a/source3/smbd/smb2_setinfo.c +++ b/source3/smbd/smb2_setinfo.c @@ -530,6 +530,24 @@ static struct tevent_req *smbd_smb2_setinfo_send(TALLOC_CTX *mem_ctx, break; } + case 0x02:/* SMB2_SETINFO_FS */ + { + uint16_t file_info_level = in_file_info_class + 1000; + + status = smbd_do_setfsinfo(conn, smbreq, state, + file_info_level, + fsp, + &in_input_buffer); + if (!NT_STATUS_IS_OK(status)) { + if (NT_STATUS_EQUAL(status, NT_STATUS_INVALID_LEVEL)) { + status = NT_STATUS_INVALID_INFO_CLASS; + } + tevent_req_nterror(req, status); + return tevent_req_post(req, ev); + } + break; + } + case 0x03:/* SMB2_SETINFO_SECURITY */ { if (!CAN_WRITE(conn)) { diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 0e1c6d9..9c0660b 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -3993,6 +3993,86 @@ cBytesSector=%u, cUnitTotal=%u, cUnitAvail=%d\n", (unsigned int)bsize, (unsigned return status; } +static NTSTATUS smb_set_fsquota(connection_struct *conn, + struct smb_request *req, + files_struct *fsp, + const DATA_BLOB *qdata) +{ + NTSTATUS status; + SMB_NTQUOTA_STRUCT quotas; + + ZERO_STRUCT(quotas); + + /* access check */ + if ((get_current_uid(conn) != 0) || !CAN_WRITE(conn)) { + DEBUG(3, ("set_fsquota: access_denied service [%s] user [%s]\n", + lp_servicename(talloc_tos(), SNUM(conn)), + conn->session_info->unix_info->unix_name)); + return NT_STATUS_ACCESS_DENIED; + } + + if (!check_fsp_ntquota_handle(conn, req, + fsp)) { + DEBUG(1, ("set_fsquota: no valid QUOTA HANDLE\n")); + return NT_STATUS_INVALID_HANDLE; + } + + /* note: normally there're 48 bytes, +* but we didn't use the last 6 bytes for now +* --metze +*/ + if (qdata->length < 42) { + DEBUG(0,("set_fsquota: requires total_data(%u) >= 42 bytes!\n", + (unsigned int)qdata->length)); + return NT_STATUS_INVALID_PARAMETER; + } + + /* unknown_1 24 NULL bytes in pdata*/ + + /* the soft quotas 8 bytes (uint64_t)*/ + quotas.softlim = BVAL(qdata->data,24); + + /* the hard quotas 8 bytes (uint64_t)*/ + quotas.hardlim = BVAL(qdata->data,32); + + /* quota_flags 2 bytes **/ + quotas.qflags = SVAL(qdata->data,40
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 34482eb libads: record session expiry for spnego sasl binds from 90737fb printing: handle "printcap cache time" change on HUP https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 34482eb7cc3d74c8de510309332e8ab176d0f3c0 Author: Uri Simchoni Date: Mon Apr 18 23:08:38 2016 +0300 libads: record session expiry for spnego sasl binds With the move to gensec-based spnego, record the session expiry in tgs_expire, so that libads users such as winbindd can use this info to determine how long to keep the connection. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11852 Signed-off-by: Uri Simchoni Reviewed-by: Andrew Bartlett Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Apr 19 16:53:57 CEST 2016 on sn-devel-144 --- Summary of changes: source3/libads/sasl.c | 9 + 1 file changed, 9 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/libads/sasl.c b/source3/libads/sasl.c index 22aa9cf..b8d4527 100644 --- a/source3/libads/sasl.c +++ b/source3/libads/sasl.c @@ -134,6 +134,7 @@ static ADS_STATUS ads_sasl_spnego_gensec_bind(ADS_STRUCT *ads, struct auth_generic_state *auth_generic_state; bool use_spnego_principal = lp_client_use_spnego_principal(); const char *sasl_list[] = { sasl, NULL }; + NTTIME end_nt_time; nt_status = auth_generic_client_prepare(NULL, &auth_generic_state); if (!NT_STATUS_IS_OK(nt_status)) { @@ -307,6 +308,14 @@ static ADS_STATUS ads_sasl_spnego_gensec_bind(ADS_STRUCT *ads, } } + ads->auth.tgs_expire = LONG_MAX; + end_nt_time = gensec_expire_time(auth_generic_state->gensec_security); + if (end_nt_time != GENSEC_EXPIRE_TIME_INFINITY) { + struct timeval tv; + nttime_to_timeval(&tv, end_nt_time); + ads->auth.tgs_expire = tv.tv_sec; + } + if (ads->ldap.wrap_type > ADS_SASLWRAP_TYPE_PLAIN) { size_t max_wrapped = gensec_max_wrapped_size(auth_generic_state->gensec_security); ads->ldap.out.max_unwrapped = gensec_max_input_size(auth_generic_state->gensec_security); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e6ed803 tdb mutex check: Fix CID 1358473 Uninitialized scalar variable from acf6deb tdb: version 1.3.9 https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e6ed803a3ba8df05271fd12f1bc7abf667e27a86 Author: Volker Lendecke Date: Tue Apr 12 07:49:40 2016 +0200 tdb mutex check: Fix CID 1358473 Uninitialized scalar variable This comes via a "goto cleanup" before suspend_mask is initialized Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Apr 12 11:39:35 CEST 2016 on sn-devel-144 --- Summary of changes: lib/tdb/common/mutex.c | 2 ++ 1 file changed, 2 insertions(+) Changeset truncated at 500 lines: diff --git a/lib/tdb/common/mutex.c b/lib/tdb/common/mutex.c index d8167be..c212842 100644 --- a/lib/tdb/common/mutex.c +++ b/lib/tdb/common/mutex.c @@ -786,6 +786,8 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void) initialized = true; + sigemptyset(&suspend_mask); + ok = tdb_mutex_locking_supported(); if (!ok) { return false; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via fca78dd s3: smbd: DFS - Remove the last lp_posix_pathnames() from the SMB2/3 code paths. from c51b8c2 ctdb-recovery-helper: Add banning to parallel recovery https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit fca78dddb428b89b01317e47a0db34124dda555e Author: Jeremy Allison Date: Sat Mar 19 21:04:09 2016 -0700 s3: smbd: DFS - Remove the last lp_posix_pathnames() from the SMB2/3 code paths. lp_posix_pathnames() is only used in one place in SMB1 DFS processing - in dealing with buggy clients, and not at all in SMB2/3. Note that the removal of lp_posix_pathnames() in the initial detection of path separator is a change in behavior - but the case where an incoming DFS name *doesn't* begin with the correct separator is a client bug, so I'm comfortable with making this change. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Fri Mar 25 13:23:48 CET 2016 on sn-devel-144 --- Summary of changes: source3/smbd/msdfs.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/msdfs.c b/source3/smbd/msdfs.c index 647ac3b..cab6ff3 100644 --- a/source3/smbd/msdfs.c +++ b/source3/smbd/msdfs.c @@ -82,9 +82,19 @@ static NTSTATUS parse_dfs_path(connection_struct *conn, eos_ptr = &pathname_local[strlen(pathname_local)]; p = temp = pathname_local; - pdp->posix_path = (lp_posix_pathnames() && *pathname == '/'); + /* +* Non-broken DFS paths *must* start with the +* path separator. For Windows this is always '\\', +* for posix paths this is always '/'. +*/ - sepchar = pdp->posix_path ? '/' : '\\'; + if (*pathname == '/') { + pdp->posix_path = true; + sepchar = '/'; + } else { + pdp->posix_path = false; + sepchar = '\\'; + } if (allow_broken_path && (*pathname != sepchar)) { DEBUG(10,("parse_dfs_path: path %s doesn't start with %c\n", @@ -92,6 +102,8 @@ static NTSTATUS parse_dfs_path(connection_struct *conn, /* * Possibly client sent a local path by mistake. * Try and convert to a local path. +* Note that this is an SMB1-only fallback +* to cope with known broken SMB1 clients. */ pdp->hostname = eos_ptr; /* "" */ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d648775 third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead of __GNUC__ via 82258aa s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of __GNUC__ via 7b92b84 mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__ via fb0ebbf s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__ via a20ee62 tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__ via 6ba2fe2 libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__ via 88be24c util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons from c027e3d s4-libnet: Link dckeytab.so correctly when is AD DC enabled https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d64877541036c6b82aa0204671bfdae08936b529 Author: Douglas Bagnall Date: Wed Mar 23 15:30:22 2016 +1300 third_party/zlib/zlib.h: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Mar 24 18:43:34 CET 2016 on sn-devel-144 commit 82258aa2a6ff1a8d139f60abb170aaffb0934025 Author: Douglas Bagnall Date: Wed Mar 23 15:29:50 2016 +1300 s4/lib/wmi_wrap: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit 7b92b84415dd3292538eb4e44fac12b4e564b984 Author: Douglas Bagnall Date: Wed Mar 23 15:28:45 2016 +1300 mdssvc/sparql_parser.c: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit fb0ebbfcbfb5754b0fca7b309eaded0e57877230 Author: Douglas Bagnall Date: Wed Mar 23 15:27:45 2016 +1300 s3/modules/getdate: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit a20ee62984bdb623f8fa55a9900cb69a99bf38e6 Author: Douglas Bagnall Date: Wed Mar 23 15:26:49 2016 +1300 tevent.h: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit 6ba2fe2e3f1ad27b12f4ef67f41c7ad4f29f17c3 Author: Douglas Bagnall Date: Wed Mar 23 15:26:03 2016 +1300 libreplace: use HAVE___ATTRIBUTE__ instead of __GNUC__ Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni commit 88be24c279e29a363c2aabcb68b5f0a1e039f477 Author: Douglas Bagnall Date: Wed Mar 23 11:16:48 2016 +1300 util/attr.h: use HAVE___ATTRIBUTE__, not __GNUC__ comparisons The comparisons that look like #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) fail if __GNUC_MINOR__ is 0. The intended comparison is something more like #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) However, given that: * these checks are really trying to test the presence of __attribute__, * there are now credible compilers that are not GCC, which have __attribute__ but might not be good at emulating __GNUC__ numbers, and * we really face little risk of running into GCC 2.95 * we have a HAVE___ATTRIBUTE__ check in ./configure let's not do the version comparisons. (Untested on GCC 2.95, GCC 3.0 and GCC 3.1). Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Reviewed-by: Uri Simchoni --- Summary of changes: lib/replace/replace.h | 4 ++-- lib/tevent/tevent.h | 2 +- lib/util/attr.h | 16 source3/modules/getdate.c | 2 +- source3/modules/getdate.y | 2 +- source3/rpc_server/mdssvc/sparql_parser.c | 4 +--- source4/lib/wmi/wmi_wrap.c| 8 +--- third_party/zlib/zlib.h | 2 +- 8 files changed, 16 insertions(+), 24 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/replace/replace.h b/lib/replace/replace.h index c764d06..7080373 100644 --- a/lib/replace/replace.h +++ b/lib/replace/replace.h @@ -425,7 +425,7 @@ int rep_dlclose(void *handle); #endif #ifndef PRINTF_ATTRIBUTE -#if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 ) +#ifdef HAVE___ATTRIBUTE__ /** Use gcc attribute to check printf fns. a1 is the 1-based index of * the parameter containing the format, and a2 the index of the first * argument. Note that some gcc 2.x versions don't handle this @@ -437,7 +437,7 @@ int rep_dlclose(void *handle); #endif #ifndef _DEPRECATED_ -#if (__GNUC__ >= 3) &&
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via acdfa98 s4-libnet: only build python-dckeytab module for Heimdal in AD DC mode from 0234e3a Revert "autobuild: Return the last 50 log lines" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit acdfa98ac02b7a161a353614009ab0ec24f171fa Author: Alexander Bokovoy Date: Wed Mar 23 08:15:34 2016 +0200 s4-libnet: only build python-dckeytab module for Heimdal in AD DC mode Signed-off-by: Alexander Bokovoy Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Mar 23 23:43:51 CET 2016 on sn-devel-144 --- Summary of changes: source4/libnet/wscript_build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source4/libnet/wscript_build b/source4/libnet/wscript_build index 6cca50d..daae59f 100644 --- a/source4/libnet/wscript_build +++ b/source4/libnet/wscript_build @@ -18,5 +18,5 @@ bld.SAMBA_PYTHON('python_dckeytab', source='py_net_dckeytab.c libnet_export_keytab.c', deps='pyrpc_util HDB_SAMBA4 com_err', realname='samba/dckeytab.so', -enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL') +enabled=bld.CONFIG_SET('SAMBA4_USES_HEIMDAL') and bld.CONFIG_SET('AD_DC_BUILD_IS_ENABLED') ) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e64ab0d s3: vfs: vfs_xattr_tdb - cleanup. Remove unneeded variable "path". via 6b87710 s3:vfs: Change get_acl_blob() to take a const smb_filename * parameter from const char *. via 13dae2b s3:smbd: Change refuse_symlink() to take a const smb_filename * parameter from const char *. via e7898c6 s3:smbd: Change get_ea_names_from_file() to take a const smb_filename * parameter from const char *. via 4404cff s3:smbd: Change get_ea_list_from_file_path() to take a const smb_filename * parameter from const char *. via 641ebf0 s3: smbd: Change canonicalize_ea_name() to take a const smb_filename * parameter from const char *. via c3937f5 s3: smbd: Reformatting - remove unneeded const char *fname variable. via e800092 s3:vfs: vfs_streams_xattr.c: Change walk_xattr_streams() to const struct smb_filename * from const char *. via 347d3aa s3:vfs: vfs_streams_xattr.c - Remove duplicate code. This is exactly vfs_stat_smb_basename(). via b10d3c6 s3: vfs: vfs_solarisacl. refuse_symlink() means we can always use STAT here. via f690c1c s3: vfs: vfs_hpuxacl. refuse_symlink() means we can always use STAT here. from 7b431eb build: mark explicit dependencies on pytalloc-util https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e64ab0d72a92f5e80e7a115f168b4d24b2fe73f6 Author: Jeremy Allison Date: Fri Mar 11 16:07:20 2016 -0800 s3: vfs: vfs_xattr_tdb - cleanup. Remove unneeded variable "path". Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Mar 15 11:45:19 CET 2016 on sn-devel-144 commit 6b877102dbd7d375fdd240904f983e1f2196a100 Author: Jeremy Allison Date: Fri Mar 11 15:50:57 2016 -0800 s3:vfs: Change get_acl_blob() to take a const smb_filename * parameter from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 13dae2b46ed9a53b7eeed4ce125478b5bbb3e2b5 Author: Jeremy Allison Date: Fri Mar 11 15:38:28 2016 -0800 s3:smbd: Change refuse_symlink() to take a const smb_filename * parameter from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit e7898c6d6cf433fad031179f60223555602ae48e Author: Jeremy Allison Date: Fri Mar 11 15:34:58 2016 -0800 s3:smbd: Change get_ea_names_from_file() to take a const smb_filename * parameter from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 4404cff57ad22fc706b5f3b021bc5842c85b6c96 Author: Jeremy Allison Date: Fri Mar 11 15:30:00 2016 -0800 s3:smbd: Change get_ea_list_from_file_path() to take a const smb_filename * parameter from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 641ebf05f1b6f9d5e801c4f46ae607ef81b91c18 Author: Jeremy Allison Date: Fri Mar 11 15:25:54 2016 -0800 s3: smbd: Change canonicalize_ea_name() to take a const smb_filename * parameter from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit c3937f556d090dc5daeb21a363f7f06154678d7a Author: Jeremy Allison Date: Fri Mar 11 15:23:23 2016 -0800 s3: smbd: Reformatting - remove unneeded const char *fname variable. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit e8000923aec54903e4b592be2bc4a67d71ee4064 Author: Jeremy Allison Date: Fri Mar 11 15:11:20 2016 -0800 s3:vfs: vfs_streams_xattr.c: Change walk_xattr_streams() to const struct smb_filename * from const char *. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 347d3aaf961774c3d90ac1e9b1ffd56fa6913118 Author: Jeremy Allison Date: Fri Mar 11 15:08:26 2016 -0800 s3:vfs: vfs_streams_xattr.c - Remove duplicate code. This is exactly vfs_stat_smb_basename(). Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit b10d3c644002e30ad1c76d21b8bdcb7dc8c0e5f2 Author: Jeremy Allison Date: Fri Mar 11 16:01:31 2016 -0800 s3: vfs: vfs_solarisacl. refuse_symlink() means we can always use STAT here. For a posix acl call on a symlink, we've already refused it. For a Windows acl mapped call on a symlink, we want to follow it. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit f690c1cfc8a53bd8c9b3e7e8fc6122d09ed7aa36 Author: Jeremy Allison Date: Fri Mar 11 14:29:20 2016 -0800 s3: vfs: vfs_hpuxacl. refuse_symlink() means we can always use STAT here. For a posix acl call on a symlink, we've already refused it. For a Windows acl mapped call on a symlink, we want to follow it. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni -
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via b96511f selftest: add some test cases to net ads join via b27cf10 selftest: run net ads join test in a private client env from 645e777 s4:rpc_server: dcesrv_generic_session_key should only work on local transports https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit b96511f81b404466aefe5adb623334be254cafa4 Author: Uri Simchoni Date: Wed Nov 4 07:32:57 2015 +0200 selftest: add some test cases to net ads join Perform a testjoin between steps to verify join status Perform most testjoins with machine account because that's the more common case. Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Mar 10 14:41:13 CET 2016 on sn-devel-144 commit b27cf10c0cb306596a1c0aa8ceb2605714576e0c Author: Uri Simchoni Date: Wed Nov 4 07:31:47 2015 +0200 selftest: run net ads join test in a private client env net ads join command changes machine password, thus affecting the test environment beyond the thing we want to test. This cange runs the test in a private client env, with its own hostname, newly-generated machine SID, and a separate secrets.tdb, thus not affecting the running AD member server, Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider --- Summary of changes: source4/selftest/tests.py | 2 +- testprogs/blackbox/test_net_ads.sh | 32 +++- 2 files changed, 28 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index ed510a0..e94f339 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -344,7 +344,7 @@ plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.jo plantestsuite("samba4.blackbox.rfc2307_mapping(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration]) plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) -plantestsuite("samba4.blackbox.net_ads(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD']) +plantestsuite("samba4.blackbox.net_ads(ad_member:client)", "ad_member:client", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD', '$PREFIX_ABS']) plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) # Tests using the "Simple" NTVFS backend diff --git a/testprogs/blackbox/test_net_ads.sh b/testprogs/blackbox/test_net_ads.sh index 487014d..2120814 100755 --- a/testprogs/blackbox/test_net_ads.sh +++ b/testprogs/blackbox/test_net_ads.sh @@ -1,6 +1,6 @@ -if [ $# -lt 3 ]; then +if [ $# -lt 4 ]; then cat </dev/null | sha1sum | cut -b 1-10` + +RUNDIR=`pwd` +cd $BASEDIR +WORKDIR=`mktemp -d -p .` +WORKDIR=`basename $WORKDIR` +cp -a client/* $WORKDIR/ +sed -ri "s@(dir|directory) = (.*)/client/@\1 = \2/$WORKDIR/@" $WORKDIR/client.conf +sed -ri "s/netbios name = .*/netbios name = $HOSTNAME/" $WORKDIR/client.conf +rm -f $WORKDIR/private/secrets.tdb +cd $RUNDIR failed=0 -net_tool="$BINDIR/net" +net_tool="$BINDIR/net -s $BASEDIR/$WORKDIR/client.conf --option=security=ads" # Load test functions . `dirname $0`/subunit.sh +testit "join" $VALGRIND $net_tool ads join -U$DC_USERNAME%$DC_PASSWORD || failed=`expr $failed + 1` + +testit "testjoin" $VALGRIND $net_tool ads testjoin -kP || failed=`expr $failed + 1` + testit "leave" $VALGRIND $net_tool ads leave -U$DC_USERNAME%$DC_PASSWORD || faile
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5741e84 smbd: Avoid an "else" via 19cbdf9 vfs_united_media: Fix CID 1355492 Uninitialized scalar variable from 1c79654 configure: set HAVE___ATTRIBUTE__ for heimdal https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5741e849a9241a01a33510978684f66288de72ab Author: Volker Lendecke Date: Wed Mar 9 10:15:25 2016 +0100 smbd: Avoid an "else" Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Mar 9 21:51:52 CET 2016 on sn-devel-144 commit 19cbdf94099dea620ea3a0c4984607dc81fbcce7 Author: Volker Lendecke Date: Wed Mar 9 08:51:34 2016 +0100 vfs_united_media: Fix CID 1355492 Uninitialized scalar variable Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: source3/modules/vfs_unityed_media.c | 1 + source3/smbd/smbXsrv_open.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 7544b8f..4bbb8fb 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -1510,6 +1510,7 @@ static NTSTATUS um_streaminfo(struct vfs_handle_struct *handle, smb_fname, &client_fname); if (ret != 0) { + status = NT_STATUS_NO_MEMORY; goto err; } diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index a7cea18..fc7d434 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -468,7 +468,8 @@ static NTSTATUS smbXsrv_open_local_lookup(struct smbXsrv_open_table *table, &state); if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) { return NT_STATUS_FILE_CLOSED; - } else if (!NT_STATUS_IS_OK(status)) { + } + if (!NT_STATUS_IS_OK(status)) { return status; } if (!NT_STATUS_IS_OK(state.status)) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 9c67ff4 selftest: test access based share enum parameter via 5036a09 access based share enum: handle permission set in configuration files from f24567e torture:smb2: skip replay4 if server does not support multi-channel https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 9c67ff461d73305530ea257820215cf1ba97f703 Author: Uri Simchoni Date: Mon Feb 29 22:09:57 2016 +0200 selftest: test access based share enum parameter BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093 Signed-off-by: Uri Simchoni Reviewed-by: Andreas Schneider Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Mar 2 23:51:56 CET 2016 on sn-devel-144 commit 5036a0922b7890005bcc8b77368a6635c8ebeb4b Author: Alberto Maria Fiaschi Date: Tue Feb 23 18:22:10 2016 +0100 access based share enum: handle permission set in configuration files change function is_enumeration_allowed to check permissions set by fields: valid users, invalid users, only user. BUG: https://bugzilla.samba.org/show_bug.cgi?id=8093 Signed-off-by: Alberto Maria Fiaschi Reviewed-by: Uri Simchoni Reviewed-by: Andreas Schneider --- Summary of changes: selftest/selftesthelpers.py | 1 + selftest/target/Samba3.pm | 1 + source3/rpc_server/srvsvc/srv_srvsvc_nt.c | 17 - source3/script/tests/test_shareenum.sh| 30 ++ source3/selftest/tests.py | 1 + 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100755 source3/script/tests/test_shareenum.sh Changeset truncated at 500 lines: diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 42499b0..f26484b 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -185,3 +185,4 @@ dbwrap_tool = binpath('dbwrap_tool') vfstest = binpath('vfstest') smbcquotas = binpath('smbcquotas') smbget = binpath('smbget') +rpcclient = binpath('rpcclient') diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 2dde4ca..5dc4b17 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1512,6 +1512,7 @@ sub provision() [valid-users-tmp] path = $shrdir valid users = $unix_name + access based share enum = yes [msdfs-share] path = $msdfs_shrdir msdfs root = yes diff --git a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c index b1e9d13..279cd9e 100644 --- a/source3/rpc_server/srvsvc/srv_srvsvc_nt.c +++ b/source3/rpc_server/srvsvc/srv_srvsvc_nt.c @@ -477,12 +477,19 @@ static bool is_hidden_share(int snum) static bool is_enumeration_allowed(struct pipes_struct *p, int snum) { -if (!lp_access_based_share_enum(snum)) -return true; + if (!lp_access_based_share_enum(snum)) { + return true; + } + + if (!user_ok_token(p->session_info->unix_info->unix_name, + p->session_info->info->domain_name, + p->session_info->security_token, snum)) { + return false; + } -return share_access_check(p->session_info->security_token, - lp_servicename(talloc_tos(), snum), - FILE_READ_DATA, NULL); + return share_access_check(p->session_info->security_token, + lp_servicename(talloc_tos(), snum), + FILE_READ_DATA, NULL); } / diff --git a/source3/script/tests/test_shareenum.sh b/source3/script/tests/test_shareenum.sh new file mode 100755 index 000..3904b51 --- /dev/null +++ b/source3/script/tests/test_shareenum.sh @@ -0,0 +1,30 @@ +#!/bin/sh + +# this tests share enumeration with "access based share enum" + +if [ $# -lt 4 ]; then +cat < /dev/null 2>&1 +} + +testit "$USERNAME sees tmp" user_see_share $USERNAME tmp +testit "$USERNAME sees valid-users-tmp" user_see_share $USERNAME valid-users-tmp +testit "force_user sees tmp" user_see_share force_user tmp +testit_expect_failure "force_user does not see valid-users-tmp" user_see_share force_user valid-users-tmp diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py index 48e082f..5851110 100755 --- a/source3/selftest/tests.py +++ b/source3/selftest/tests.py @@ -183,6 +183,7 @@ for env in ["fileserver"]: plantestsuite("samba3.blackbox.shadow_copy2 (%s)" % env, env, [os.path.join(samba3srcd
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via a5f441d vfs:zfs fix build after get_nt_acl_fn signature change. from ae2083e vfs:glusterfs: fix build after opendir signature change https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit a5f441dc71abfd991baec7e0c1d2961f026e8984 Author: Jeremy Allison Date: Tue Mar 1 21:52:44 2016 -0800 vfs:zfs fix build after get_nt_acl_fn signature change. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Mar 2 10:50:58 CET 2016 on sn-devel-144 --- Summary of changes: source3/modules/vfs_zfsacl.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_zfsacl.c b/source3/modules/vfs_zfsacl.c index 02cbcdf..7dc7cec 100644 --- a/source3/modules/vfs_zfsacl.c +++ b/source3/modules/vfs_zfsacl.c @@ -215,23 +215,29 @@ static NTSTATUS zfsacl_fget_nt_acl(struct vfs_handle_struct *handle, } static NTSTATUS zfsacl_get_nt_acl(struct vfs_handle_struct *handle, - const char *name, uint32_t security_info, - TALLOC_CTX *mem_ctx, - struct security_descriptor **ppdesc) + const struct smb_filename *smb_fname, + uint32_t security_info, + TALLOC_CTX *mem_ctx, + struct security_descriptor **ppdesc) { struct SMB4ACL_T *pacl; NTSTATUS status; TALLOC_CTX *frame = talloc_stackframe(); - status = zfs_get_nt_acl_common(frame, name, &pacl); + status = zfs_get_nt_acl_common(frame, + smb_fname->base_name, + &pacl); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(frame); return status; } - status = smb_get_nt_acl_nfs4(handle->conn, name, security_info, -mem_ctx, ppdesc, -pacl); + status = smb_get_nt_acl_nfs4(handle->conn, + smb_fname->base_name, + security_info, + mem_ctx, + ppdesc, + pacl); TALLOC_FREE(frame); return status; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1570ae0 lib: Fix 1354521 Unchecked return value via 801b1ad ntvfs: Fix CID 1354522 Unchecked return value from 247481c s3: smbd: Change dptr_create() to take a const struct smb_filename * instead of const char *. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1570ae07616c6a2d292d39590e132e490b468e91 Author: Volker Lendecke Date: Tue Mar 1 12:43:32 2016 +0100 lib: Fix 1354521 Unchecked return value Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Mar 1 21:49:44 CET 2016 on sn-devel-144 commit 801b1ada51138e59017f40e501924b7e13d58b89 Author: Volker Lendecke Date: Tue Mar 1 12:42:37 2016 +0100 ntvfs: Fix CID 1354522 Unchecked return value Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: lib/tdr/tdr.c | 8 ++-- source4/ntvfs/nbench/vfs_nbench.c | 7 ++- 2 files changed, 12 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/tdr/tdr.c b/lib/tdr/tdr.c index 95ef982..401e1cc 100644 --- a/lib/tdr/tdr.c +++ b/lib/tdr/tdr.c @@ -392,12 +392,16 @@ void tdr_print_debug_helper(struct tdr_print *tdr, const char *format, ...) { va_list ap; char *s = NULL; - int i; + int i, ret; va_start(ap, format); - vasprintf(&s, format, ap); + ret = vasprintf(&s, format, ap); va_end(ap); + if (ret == -1) { + return; + } + for (i=0;ilevel;i++) { DEBUG(0,("")); } DEBUG(0,("%s\n", s)); diff --git a/source4/ntvfs/nbench/vfs_nbench.c b/source4/ntvfs/nbench/vfs_nbench.c index 42a3f36..e6f725a 100644 --- a/source4/ntvfs/nbench/vfs_nbench.c +++ b/source4/ntvfs/nbench/vfs_nbench.c @@ -46,11 +46,16 @@ static void nbench_log(struct ntvfs_request *req, struct nbench_private *nprivates = req->async_states->ntvfs->private_data; va_list ap; char *s = NULL; + int ret; va_start(ap, format); - vasprintf(&s, format, ap); + ret = vasprintf(&s, format, ap); va_end(ap); + if (ret == -1) { + return; + } + write(nprivates->log_fd, s, strlen(s)); free(s); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 873df9a s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const char * from d7f552c ctdb-client: Add missing initialisation of calldata https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 873df9a8a5508a3a4f51dfe447a5ffcdf18bab09 Author: Jeremy Allison Date: Tue Feb 23 13:14:03 2016 -0800 s3: VFS: Modify mkdir to take a const struct smb_filename * instead of const char * Preparing to reduce use of lp_posix_pathnames(). Uses the same techniques as commit 616d068f0cebb8e50a855b6e30f36fccb7f5a3c8 (synthetic_smb_fname()) to cope with modules that modify the incoming pathname. Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Feb 24 16:05:55 CET 2016 on sn-devel-144 --- Summary of changes: examples/VFS/skel_opaque.c | 4 +++- examples/VFS/skel_transparent.c | 6 -- source3/include/vfs.h| 11 --- source3/include/vfs_macros.h | 8 source3/modules/vfs_audit.c | 8 +--- source3/modules/vfs_cap.c| 20 --- source3/modules/vfs_catia.c | 21 source3/modules/vfs_default.c| 5 - source3/modules/vfs_extd_audit.c | 10 ++ source3/modules/vfs_full_audit.c | 7 --- source3/modules/vfs_linux_xfs_sgid.c | 26 +++- source3/modules/vfs_media_harmony.c | 25 +++- source3/modules/vfs_recycle.c| 15 +- source3/modules/vfs_shadow_copy2.c | 24 ++- source3/modules/vfs_snapper.c| 20 +++ source3/modules/vfs_streams_depot.c | 38 source3/modules/vfs_syncops.c| 6 -- source3/modules/vfs_time_audit.c | 9 ++--- source3/modules/vfs_unityed_media.c | 24 +++ source3/smbd/open.c | 2 +- source3/smbd/vfs.c | 7 --- source3/torture/cmd_vfs.c| 13 +++- 22 files changed, 221 insertions(+), 88 deletions(-) Changeset truncated at 500 lines: diff --git a/examples/VFS/skel_opaque.c b/examples/VFS/skel_opaque.c index 0d5571c..9a855bc 100644 --- a/examples/VFS/skel_opaque.c +++ b/examples/VFS/skel_opaque.c @@ -157,7 +157,9 @@ static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp) ; } -static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode) +static int skel_mkdir(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + mode_t mode) { errno = ENOSYS; return -1; diff --git a/examples/VFS/skel_transparent.c b/examples/VFS/skel_transparent.c index fc3c818..ac8cbc8 100644 --- a/examples/VFS/skel_transparent.c +++ b/examples/VFS/skel_transparent.c @@ -157,9 +157,11 @@ static void skel_rewind_dir(vfs_handle_struct *handle, DIR *dirp) SMB_VFS_NEXT_REWINDDIR(handle, dirp); } -static int skel_mkdir(vfs_handle_struct *handle, const char *path, mode_t mode) +static int skel_mkdir(vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + mode_t mode) { - return SMB_VFS_NEXT_MKDIR(handle, path, mode); + return SMB_VFS_NEXT_MKDIR(handle, smb_fname, mode); } static int skel_rmdir(vfs_handle_struct *handle, const char *path) diff --git a/source3/include/vfs.h b/source3/include/vfs.h index d416a5b..48bacb0 100644 --- a/source3/include/vfs.h +++ b/source3/include/vfs.h @@ -173,6 +173,8 @@ /* Bump to version 35 - Samba 4.5 will ship with that */ /* Version 35 - Change get_nt_acl_fn from const char *, to const struct smb_filename * */ +/* Version 35 - Change mkdir from const char *, to + const struct smb_filename * */ #define SMB_VFS_INTERFACE_VERSION 35 @@ -554,7 +556,9 @@ struct vfs_fn_pointers { void (*seekdir_fn)(struct vfs_handle_struct *handle, DIR *dirp, long offset); long (*telldir_fn)(struct vfs_handle_struct *handle, DIR *dirp); void (*rewind_dir_fn)(struct vfs_handle_struct *handle, DIR *dirp); - int (*mkdir_fn)(struct vfs_handle_struct *handle, const char *path, mode_t mode); + int (*mkdir_fn)(struct vfs_handle_struct *handle, + const struct smb_filename *smb_fname, + mode_t mode); int (*rmdir_fn)(struct vfs_handle_struct *handle, const char *path); int (*closedir_fn)(struct vfs_handle_struct *handle, DIR *dir); void (*init_search_op_fn)(struct vfs_handle_struct *handle, DIR *dirp); @@ -971,8 +975,9 @@ long smb_vfs_call_telldir(struct vfs_handle_struct *handle
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5172bf0 s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support. from 19a411f ctdb-recovery: Create recovery databases in state dir https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5172bf0c5b0672c1479c2ad776460956aa469bca Author: Jeremy Allison Date: Tue Feb 9 12:47:43 2016 -0800 s3: smbd: posix_acls: Fix check for setting u:g:o entry on a filesystem with no ACL support. Since 4.0.x we add 2 additional ACE entries, one SMB_ACL_USER and SMB_ACL_GROUP to match the existing SMB_ACL_USER_OBJ and SMB_ACL_GROUP_OBJ entries. The two additional entries break the simple "must have 3 entries" check done inside convert_canon_ace_to_posix_perms(). Replace this with a more complete test. Problem and initial fix provided by BUG: https://bugzilla.samba.org/show_bug.cgi?id=10489 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Feb 11 11:14:53 CET 2016 on sn-devel-144 --- Summary of changes: source3/smbd/posix_acls.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index 660c0e4..0c9c749 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3085,7 +3085,7 @@ static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file canon_ace *group_ace = NULL; canon_ace *other_ace = NULL; - if (ace_count != 3) { + if (ace_count > 5) { DEBUG(3,("convert_canon_ace_to_posix_perms: Too many ACE " "entries for file %s to convert to posix perms.\n", fsp_str_dbg(fsp))); @@ -3107,6 +3107,43 @@ static bool convert_canon_ace_to_posix_perms( files_struct *fsp, canon_ace *file return False; } + /* +* Ensure all ACE entries are owner, group or other. +* We can't set if there are any other SIDs. +*/ + for (ace_p = file_ace_list; ace_p; ace_p = ace_p->next) { + if (ace_p == owner_ace || ace_p == group_ace || + ace_p == other_ace) { + continue; + } + if (ace_p->owner_type == UID_ACE) { + if (ace_p->unix_ug.id != owner_ace->unix_ug.id) { + DEBUG(3,("Invalid uid %u in ACE for file %s.\n", + (unsigned int)ace_p->unix_ug.id, + fsp_str_dbg(fsp))); + return false; + } + } else if (ace_p->owner_type == GID_ACE) { + if (ace_p->unix_ug.id != group_ace->unix_ug.id) { + DEBUG(3,("Invalid gid %u in ACE for file %s.\n", + (unsigned int)ace_p->unix_ug.id, + fsp_str_dbg(fsp))); + return false; + } + } else { + /* +* There should be no duplicate WORLD_ACE entries. +*/ + + DEBUG(3,("Invalid type %u, uid %u in " + "ACE for file %s.\n", + (unsigned int)ace_p->owner_type, + (unsigned int)ace_p->unix_ug.id, + fsp_str_dbg(fsp))); + return false; + } + } + *posix_perms = (mode_t)0; *posix_perms |= owner_ace->perms; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 171fdc2 ctdb-recovery: Fix newlines in log messages from b71c2e4 Revert "ctdb-daemon: Check packet generation against database generation" https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 171fdc20b963c9e25a6aee3069365334d2e15b20 Author: Amitay Isaacs Date: Tue Feb 9 16:49:58 2016 +1100 ctdb-recovery: Fix newlines in log messages Signed-off-by: Amitay Isaacs Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Feb 9 22:28:08 CET 2016 on sn-devel-144 --- Summary of changes: ctdb/server/ctdb_recovery_helper.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/ctdb/server/ctdb_recovery_helper.c b/ctdb/server/ctdb_recovery_helper.c index 6d6a835..d7288e2 100644 --- a/ctdb/server/ctdb_recovery_helper.c +++ b/ctdb/server/ctdb_recovery_helper.c @@ -667,7 +667,7 @@ static void recover_db_name_done(struct tevent_req *subreq) status = ctdb_client_control_recv(subreq, &ret, state, &reply); TALLOC_FREE(subreq); if (! status) { - LOG("control GET_DBNAME failed for db=0x%x\n, ret=%d", + LOG("control GET_DBNAME failed for db=0x%x, ret=%d\n", state->db_id, ret); tevent_req_error(req, ret); return; @@ -675,7 +675,7 @@ static void recover_db_name_done(struct tevent_req *subreq) ret = ctdb_reply_control_get_dbname(reply, state, &state->db_name); if (ret != 0) { - LOG("control GET_DBNAME failed for db=0x%x\n, ret=%d\n", + LOG("control GET_DBNAME failed for db=0x%x, ret=%d\n", state->db_id, ret); tevent_req_error(req, EPROTO); return; @@ -983,10 +983,10 @@ static void recover_db_transaction_committed(struct tevent_req *subreq) err_list, &pnn); if (ret2 != 0) { LOG("control DB_TRANSACTION_COMMIT failed for db %s" - " on node %u, ret=%d", state->db_name, pnn, ret2); + " on node %u, ret=%d\n", state->db_name, pnn, ret2); } else { - LOG("control DB_TRANSACTION_COMMIT failed for db %s\n," - " ret=%d", state->db_name, ret); + LOG("control DB_TRANSACTION_COMMIT failed for db %s," + " ret=%d\n", state->db_name, ret); } tevent_req_error(req, ret); return; -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e269968 samba3.blackbox.smbclient.forceuser_validusers: Add new test for force user option. from 498383a lib:socket: fix CID 1350010 - integer OVERFLOW_BEFORE_WIDEN https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e2699685cad6fc341079ac4a677df8d6be26e9d9 Author: Robin Hack Date: Fri Dec 4 14:50:56 2015 +0100 samba3.blackbox.smbclient.forceuser_validusers: Add new test for force user option. Test covers commit cf0934caf282f4ade8c8a701b0e40b68a2f17ace BUG: https://bugzilla.samba.org/show_bug.cgi?id=9878 RH BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1077651 How to test: $ make -j test TESTS="samba3.blackbox.smbclient.forceuser_validusers" RESULD: Should PASS $ git revert cf0934caf282f4ade8c8a701b0e40b68a2f17ace $ make -j test TESTS="samba3.blackbox.smbclient.forceuser_validusers" RESULT: Should FAIL Signed-off-by: Robin Hack Reviewed-by: Uri Simchoni Reviewed-by: Andreas Schneider Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Feb 4 03:44:42 CET 2016 on sn-devel-144 --- Summary of changes: selftest/target/Samba3.pm | 35 +- source3/script/tests/test_forceuser_validusers.sh | 59 +++ source3/selftest/tests.py | 1 + 3 files changed, 93 insertions(+), 2 deletions(-) create mode 100755 source3/script/tests/test_forceuser_validusers.sh Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 5002a81..076bcb1 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -599,6 +599,9 @@ sub setup_fileserver($$) my $offline_sharedir="$share_dir/offline"; push(@dirs,$offline_sharedir); + my $force_user_valid_users_dir = "$share_dir/force_user_valid_users"; + push(@dirs, $force_user_valid_users_dir); + my $fileserver_options = " [lowercase] path = $lower_case_share_dir @@ -624,6 +627,16 @@ sub setup_fileserver($$) [offline] path = $offline_sharedir vfs objects = offline + +# BUG: https://bugzilla.samba.org/show_bug.cgi?id=9878 +# RH BUG: https://bugzilla.redhat.com/show_bug.cgi?id=1077651 +[force_user_valid_users] + path = $force_user_valid_users_dir + comment = force user with valid users combination test share + valid users = +force_user + force user = force_user + force group = everyone + write list = force_user "; my $vars = $self->provision($path, @@ -1266,10 +1279,12 @@ sub provision() my ($max_uid, $max_gid); my ($uid_nobody, $uid_root, $uid_pdbtest, $uid_pdbtest2, $uid_userdup); my ($uid_pdbtest_wkn); + my ($uid_force_user); my ($gid_nobody, $gid_nogroup, $gid_root, $gid_domusers, $gid_domadmins); my ($gid_userdup, $gid_everyone); + my ($gid_force_user); - if ($unix_uid < 0x - 5) { + if ($unix_uid < 0x - 7) { $max_uid = 0x; } else { $max_uid = $unix_uid; @@ -1281,8 +1296,9 @@ sub provision() $uid_pdbtest2 = $max_uid - 4; $uid_userdup = $max_uid - 5; $uid_pdbtest_wkn = $max_uid - 6; + $uid_force_user = $max_uid - 7; - if ($unix_gids[0] < 0x - 7) { + if ($unix_gids[0] < 0x - 8) { $max_gid = 0x; } else { $max_gid = $unix_gids[0]; @@ -1295,6 +1311,7 @@ sub provision() $gid_domadmins = $max_gid - 5; $gid_userdup = $max_gid - 6; $gid_everyone = $max_gid - 7; + $gid_force_user = $max_gid - 8; ## ## create conffile @@ -1659,6 +1676,7 @@ pdbtest:x:$uid_pdbtest:$gid_nogroup:pdbtest gecos:$prefix_abs:/bin/false pdbtest2:x:$uid_pdbtest2:$gid_nogroup:pdbtest gecos:$prefix_abs:/bin/false userdup:x:$uid_userdup:$gid_userdup:userdup gecos:$prefix_abs:/bin/false pdbtest_wkn:x:$uid_pdbtest_wkn:$gid_everyone:pdbtest_wkn gecos:$prefix_abs:/bin/false +force_user:x:$uid_force_user:$gid_force_user:force user gecos:$prefix_abs:/bin/false "; if ($unix_uid != 0) { print PASSWD "root:x:$uid_root:$gid_root:root gecos:$prefix_abs:/bin/false @@ -1677,6 +1695,7 @@ domusers:X:$gid_domusers: domadmins:X:$gid_domadmins: userdup:x:$gid_userdup:$unix_name everyone:x:$gid_everyone: +force_user:x:$gid_force_user: "; if ($unix_gids[0] != 0) { print GROUP "root:x:$gid_root: @@ -1739,6 +1758,18 @@ everyone:x:$gid_everyone: warn("Unable to set password for test account\n$cmd"); return undef;
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 6831ba3 s3:vfs:glusterfs: fix build after quota changes. from 81cf1fa s3:libads: we always have arcfour-hmac-md5 support https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 6831ba35b92c15eef3d4fb09cf6eeedf5a7f92d0 Author: Michael Adam Date: Mon Feb 1 16:06:18 2016 +0100 s3:vfs:glusterfs: fix build after quota changes. Signed-off-by: Michael Adam Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Feb 1 22:09:18 CET 2016 on sn-devel-144 --- Summary of changes: source3/modules/vfs_glusterfs.c | 1 + 1 file changed, 1 insertion(+) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index f32f598..427b985 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -296,6 +296,7 @@ static uint64_t vfs_gluster_disk_free(struct vfs_handle_struct *handle, } static int vfs_gluster_get_quota(struct vfs_handle_struct *handle, +const char *path, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 500bc01 s3-parm: clean up defaults when removing global parameters from 62c68bd s3-client: Add a KRB5 wrapper for smbspool https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 500bc01478881cab89f0e691427e34a405bb0003 Author: Alexander Bokovoy Date: Fri Jan 22 11:44:03 2016 +0200 s3-parm: clean up defaults when removing global parameters BUG: https://bugzilla.samba.org/show_bug.cgi?id=11693 When globals are re-initialized, they are cleared and globals' talloc context is freed. However, parm_table still contains a reference to the global value in the defaults. This confuses lpcfg_string_free() after commit 795c543d858b2452f062a02846c2f908fe4cffe4 because it tries to free already freed pointer which is passed by lp_save_defaults(): case P_STRING: case P_USTRING: lpcfg_string_set(Globals.ctx, &parm_table[i].def.svalue, *(char **)lp_parm_ptr(NULL, &parm_table[i])); here &parm_table[i].def.svalue is passed to lpcfg_string_free() but it is a pointer to a value allocated with previous Globals.ctx which already was freed. This specifically affects registry backend of smb.conf in lp_load_ex() where init_globals() called explicitly to re-init globals after lp_save_defaults() if we have registry backend defined. Reviewed-by: Uri Simchoni Signed-off-by: Alexander Bokovoy Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Jan 25 23:58:42 CET 2016 on sn-devel-144 --- Summary of changes: source3/param/loadparm.c | 17 + 1 file changed, 17 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 9f4a2b4..f8ecab7 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -399,8 +399,25 @@ static void free_parameters_by_snum(int snum) */ static void free_global_parameters(void) { + uint32_t i; + struct parm_struct *parm; + free_param_opts(&Globals.param_opt); free_parameters_by_snum(GLOBAL_SECTION_SNUM); + + /* Reset references in the defaults because the context is going to be freed */ + for (i=0; parm_table[i].label; i++) { + parm = &parm_table[i]; + if ((parm->type == P_STRING) || + (parm->type == P_USTRING)) { + if ((parm->def.svalue != NULL) && + (*(parm->def.svalue) != '\0')) { + if (talloc_parent(parm->def.svalue) == Globals.ctx) { + parm->def.svalue = NULL; + } + } + } + } TALLOC_FREE(Globals.ctx); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 3e08469 build: fix ldbsearch panic on FC22 from 8ec92e5 smbspool: Add string representation of nt_status https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 3e084695daff377da6f6e4a6fcb10c05f2a6dd03 Author: Uri Simchoni Date: Thu Jan 21 11:14:36 2016 +0200 build: fix ldbsearch panic on FC22 add dependency that fixes ldbsearch panic due to conflict - function read_data() is implemented both by libtspi.so.1, which is a dependency of gnutls on FC22, and by an internal samba shared lib. Signed-off-by: Uri Simchoni Reviewed-by: Alexander Bokovoy Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sat Jan 23 00:06:59 CET 2016 on sn-devel-144 --- Summary of changes: source4/dsdb/samdb/ldb_modules/wscript_build_server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/samdb/ldb_modules/wscript_build_server b/source4/dsdb/samdb/ldb_modules/wscript_build_server index b54d27f..8fa9939 100755 --- a/source4/dsdb/samdb/ldb_modules/wscript_build_server +++ b/source4/dsdb/samdb/ldb_modules/wscript_build_server @@ -325,7 +325,7 @@ bld.SAMBA_MODULE('ldb_acl', init_function='ldb_acl_module_init', module_init_name='ldb_init_module', internal_module=False, - deps='talloc samba-security samdb DSDB_MODULE_HELPERS krb5samba' + deps='talloc samba-util samba-security samdb DSDB_MODULE_HELPERS krb5samba' ) -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via e8e9e7f vfs:shadow_copy2: fix a debug message via 25243af docs: fix copy'n'paste error in vfs_shadow_copy2 manpage via f7583be asn1: Make asn1_peek_tag_needed_size static via 2aa1cf4 asn1: Fix a typo via 5e1a84c winbind: Properly error check init_lsa_ref_domain_list via 5a2c305 idmap: Fix whitespace via 9039f1f libcli: Fix a typo via 812e074 libsmb: Remove ip_service based resolve_lmhosts via c29188f libsmb: Convert resolve_hosts to sockaddr_storage from da8674c Rename 'errors' to 'samba-errors' and make it public. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit e8e9e7f2fe33d1e158202df4eb91d3738c9eb266 Author: Michael Adam Date: Wed Jan 13 01:37:24 2016 +0100 vfs:shadow_copy2: fix a debug message The debug message for the mountpoint option was the wrong way around. This fixes it, also converting the message to use DBG_WARNING() while we're touching it. Signed-off-by: Michael Adam Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Jan 13 10:56:42 CET 2016 on sn-devel-144 commit 25243affa961e5c1650ec0ba9059fb6b51eb95c4 Author: Michael Adam Date: Wed Jan 13 01:46:25 2016 +0100 docs: fix copy'n'paste error in vfs_shadow_copy2 manpage Signed-off-by: Michael Adam Reviewed-by: Uri Simchoni commit f7583be4429b9353d84ab6bdaba9edad42d46b96 Author: Volker Lendecke Date: Mon Jan 11 21:41:22 2016 +0100 asn1: Make asn1_peek_tag_needed_size static Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 2aa1cf48fc9913e512b340f933d3747327326843 Author: Volker Lendecke Date: Mon Jan 11 21:38:20 2016 +0100 asn1: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 5e1a84c43ed0c69ca97499370d97c182e5d903e1 Author: Volker Lendecke Date: Mon Dec 28 17:01:47 2015 +0100 winbind: Properly error check init_lsa_ref_domain_list Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 5a2c30564337bfc8ba991c45ce8db6eee1831ace Author: Volker Lendecke Date: Sun Dec 27 19:55:40 2015 +0100 idmap: Fix whitespace Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 9039f1f29eb971894d6c0276f99a39a140fe2013 Author: Volker Lendecke Date: Thu Dec 17 15:42:33 2015 +0100 libcli: Fix a typo Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit 812e07418eae036f079bec7835516a86ae89f86e Author: Volker Lendecke Date: Tue Dec 15 21:52:38 2015 +0100 libsmb: Remove ip_service based resolve_lmhosts Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni commit c29188f501936f986470821064032d6681622ca5 Author: Volker Lendecke Date: Tue Dec 15 21:43:50 2015 +0100 libsmb: Convert resolve_hosts to sockaddr_storage Eventually I want to get rid of struct ip_service. Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni --- Summary of changes: docs-xml/manpages/vfs_shadow_copy2.8.xml | 4 +- lib/util/asn1.c | 5 +- lib/util/asn1.h | 1 - source3/libsmb/namequery.c | 80 +--- source3/modules/vfs_shadow_copy2.c | 11 +++-- source3/winbindd/idmap_nss.c | 8 ++-- source3/winbindd/idmap_rid.c | 6 +-- source3/winbindd/idmap_util.c| 4 +- source3/winbindd/wb_sids2xids.c | 14 -- source4/libcli/ldap/ldap_client.c| 2 +- 10 files changed, 54 insertions(+), 81 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/manpages/vfs_shadow_copy2.8.xml b/docs-xml/manpages/vfs_shadow_copy2.8.xml index dc16d5d..ad2e9c7 100644 --- a/docs-xml/manpages/vfs_shadow_copy2.8.xml +++ b/docs-xml/manpages/vfs_shadow_copy2.8.xml @@ -351,10 +351,10 @@ only particular subtrees of the filesystem as well. - Note that shadow:snapdirseverywhere + Note that shadow:crossmountpoints depends on shadow:snapdir and needs it to be a relative path. Setting an absolute snapdir path disables - shadow:snapdirseverywhere. + shadow:crossmountpoints. Note that this option is incompatible with the diff --git a/lib/util/asn1.c b/lib/util/asn1.c index 9ce7c23..8f2c516 100644 --- a/lib/util/asn1.c +++ b/lib/util/asn1.c @@ -284,7 +284,7 @@ bool ber_write_OID_String(TALLOC_CTX *mem_ctx, DATA_BLOB *blob, const char *OID) if (newp[0] != '.') return false; p = newp
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d60465c build:wafsamba: Use the upstream version of gccdeps via 88969d7 thirdparty:waf: Update gccdeps from upstream from 1bc806a Happy New Year 2016! https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d60465cfec53a0476ea26b11cc857210ffdfc585 Author: Thomas Nagy Date: Sat Dec 5 12:09:33 2015 +0100 build:wafsamba: Use the upstream version of gccdeps This removes the duplicate gccdeps file provided in the Samba tree. The two files buildtools/wafsamba/gccdeps.py and thirdparty/wafadmin/3rdparty/gccdeps.py are identical except for the whitespaces (compare them with `diff -burN`) Signed-off-by: Thomas Nagy Reviewed-by: Michael Adam Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sat Jan 2 22:31:56 CET 2016 on sn-devel-144 commit 88969d75295421386de339d2501965c0db685756 Author: Thomas Nagy Date: Sat Dec 5 12:04:29 2015 +0100 thirdparty:waf: Update gccdeps from upstream The version from upstream was updated. It is not used at this moment in Samba because there is a copy kept in builtools/wafsamba/gccdeps.py which will be removed soon. Signed-off-by: Thomas Nagy Reviewed-by: Michael Adam Reviewed-by: Uri Simchoni --- Summary of changes: buildtools/wafsamba/gccdeps.py | 127 --- buildtools/wafsamba/wscript | 5 ++ third_party/waf/wafadmin/3rdparty/gccdeps.py | 2 +- 3 files changed, 6 insertions(+), 128 deletions(-) delete mode 100644 buildtools/wafsamba/gccdeps.py Changeset truncated at 500 lines: diff --git a/buildtools/wafsamba/gccdeps.py b/buildtools/wafsamba/gccdeps.py deleted file mode 100644 index 47505f0..000 --- a/buildtools/wafsamba/gccdeps.py +++ /dev/null @@ -1,127 +0,0 @@ -# encoding: utf-8 -# Thomas Nagy, 2008-2010 (ita) - -""" -Execute the tasks with gcc -MD, read the dependencies from the .d file -and prepare the dependency calculation for the next run -""" - -import os, re, threading -import Task, Logs, Utils, preproc -from TaskGen import before, after, feature - -lock = threading.Lock() - -preprocessor_flag = '-MD' - -@feature('c', 'cc') -@before('apply_core') -def add_mmd_cc(self): -if self.env.get_flat('CCFLAGS').find(preprocessor_flag) < 0: -self.env.append_value('CCFLAGS', preprocessor_flag) - -@feature('cxx') -@before('apply_core') -def add_mmd_cxx(self): -if self.env.get_flat('CXXFLAGS').find(preprocessor_flag) < 0: -self.env.append_value('CXXFLAGS', preprocessor_flag) - -def scan(self): -"the scanner does not do anything initially" -nodes = self.generator.bld.node_deps.get(self.unique_id(), []) -names = [] -return (nodes, names) - -re_o = re.compile("\.o$") -re_src = re.compile("^(\.\.)[\\/](.*)$") - -def post_run(self): -# The following code is executed by threads, it is not safe, so a lock is needed... - -if getattr(self, 'cached', None): -return Task.Task.post_run(self) - -name = self.outputs[0].abspath(self.env) -name = re_o.sub('.d', name) -txt = Utils.readf(name) -#os.unlink(name) - -txt = txt.replace('\\\n', '') - -lst = txt.strip().split(':') -val = ":".join(lst[1:]) -val = val.split() - -nodes = [] -bld = self.generator.bld - -f = re.compile("^("+self.env.variant()+"|\.\.)[\\/](.*)$") -for x in val: -if os.path.isabs(x): - -if not preproc.go_absolute: -continue - -lock.acquire() -try: -node = bld.root.find_resource(x) -finally: -lock.release() -else: -g = re.search(re_src, x) -if g: -x = g.group(2) -lock.acquire() -try: -node = bld.bldnode.parent.find_resource(x) -finally: -lock.release() -else: -g = re.search(f, x) -if g: -x = g.group(2) -lock.acquire() -try: -node = bld.srcnode.find_resource(x) -finally: -lock.release() - -if id(node) == id(self.inputs[0]): -# ignore the source file, it is already in the dependencies -# this way, successful config tests may be retrieved from the cache -continue - -if not node: -raise ValueError('
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f33224d net: Fix Coverity ID 241039 Unchecked return value from 431cf20 s3: smbd: open_file: use FSP_POSIX_FLAGS_PATHNAMES https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f33224dbcfb69d5c503b2037c91efba4d85e56fb Author: Volker Lendecke Date: Wed Dec 23 11:32:04 2015 +0100 net: Fix Coverity ID 241039 Unchecked return value Signed-off-by: Volker Lendecke Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Dec 23 17:17:53 CET 2015 on sn-devel-144 --- Summary of changes: source3/utils/net_ads.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c index 5cc07a0..ace5b27 100644 --- a/source3/utils/net_ads.c +++ b/source3/utils/net_ads.c @@ -1910,6 +1910,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char * char *prt_dn, *srv_dn, **srv_cn; char *srv_cn_escaped = NULL, *printername_escaped = NULL; LDAPMessage *res = NULL; + bool ok; if (argc < 1 || c->display_usage) { d_printf("%s\n%s", @@ -1937,7 +1938,14 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char * /* Get printer data from SPOOLSS */ - resolve_name(servername, &server_ss, 0x20, false); + ok = resolve_name(servername, &server_ss, 0x20, false); + if (!ok) { + d_fprintf(stderr, _("Could not find server %s\n"), + servername); + ads_destroy(&ads); + talloc_destroy(mem_ctx); + return -1; + } nt_status = cli_full_connection(&cli, lp_netbios_name(), servername, &server_ss, 0, -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 4735e5f samba-tool: fsmo.py throws an uncaught exception if no from dd9b12a ntlm_auth: Add --offline-logon https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 4735e5f5e35bdff88bf59d56ecf1980cdabc3c83 Author: Rowland Penny Date: Mon Nov 23 18:40:19 2015 + samba-tool: fsmo.py throws an uncaught exception if no fSMORoleOwner attribute This will fix bug 11613 where a user got the uncaught exception when trying to seize an FSMO role that didn't have the required attribute. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11613 Signed-off-by: Rowland Penny Reviewed-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Sun Dec 6 00:33:10 CET 2015 on sn-devel-104 --- Summary of changes: python/samba/netcmd/fsmo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/python/samba/netcmd/fsmo.py b/python/samba/netcmd/fsmo.py index 0b4488f..3904bcb 100644 --- a/python/samba/netcmd/fsmo.py +++ b/python/samba/netcmd/fsmo.py @@ -38,7 +38,8 @@ def get_fsmo_roleowner(samdb, roledn): """ res = samdb.search(roledn, scope=ldb.SCOPE_BASE, attrs=["fSMORoleOwner"]) -assert len(res) == 1 +if len(res) == 0: +raise CommandError('"%s" does not have a FSMO roleowner' % roledn) master_owner = res[0]["fSMORoleOwner"][0] return master_owner -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 22386dc samba-tool: replace use of os.popen from e6f88c1 libads: Fix picky const warning with krb5_set_password_using_ccache https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 22386dc39673f66de2dd57596447acf3c6c00ef7 Author: Uri Simchoni Date: Sun Nov 15 13:34:03 2015 +0200 samba-tool: replace use of os.popen The netcmd/domain.py module uses os.popen() on user-supplied parameters. This opens up the way to code injection. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11601 Signed-off-by: Uri Simchoni Reviewed-by: Alexander Bokovoy Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Mon Nov 23 22:19:34 CET 2015 on sn-devel-104 --- Summary of changes: python/samba/netcmd/domain.py | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) Changeset truncated at 500 lines: diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py index 6726538..62f8bfa 100644 --- a/python/samba/netcmd/domain.py +++ b/python/samba/netcmd/domain.py @@ -31,6 +31,7 @@ import ctypes import random import tempfile import logging +import subprocess from getpass import getpass from samba.net import Net, LIBNET_JOIN_AUTOMATIC import samba.ntacls @@ -87,9 +88,16 @@ from samba.provision.common import ( ) def get_testparm_var(testparm, smbconf, varname): -cmd = "%s -s -l --parameter-name='%s' %s 2>/dev/null" % (testparm, varname, smbconf) -output = os.popen(cmd, 'r').readline() -return output.strip() +errfile = open(os.devnull, 'w') +p = subprocess.Popen([testparm, '-s', '-l', + '--parameter-name=%s' % varname, smbconf], + stdout=subprocess.PIPE, stderr=errfile) +(out,err) = p.communicate() +errfile.close() +lines = out.split('\n') +if lines: +return lines[0].strip() +return "" try: import samba.dckeytab -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via aa3cc0b s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them. from b06544d wafsamba: detect programmer errors in CHECK_BUNDLED_SYSTEM() https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit aa3cc0b459124c66de0aad8ff41908e1bf261222 Author: Jeremy Allison Date: Wed Nov 4 09:34:57 2015 -0800 s3: smbd: If EA's are turned off on a share don't allow an SMB2 create containing them. Otherwise a create that should have failed may succeed. Based on an original patch from John Mulligan and comments from Uri Simchoni BUG: https://bugzilla.samba.org/show_bug.cgi?id=11589 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Nov 4 22:14:22 CET 2015 on sn-devel-104 --- Summary of changes: source3/smbd/smb2_create.c | 6 ++ 1 file changed, 6 insertions(+) Changeset truncated at 500 lines: diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index e151e96..1b12962 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -707,6 +707,12 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx, } if (exta) { + if (!lp_ea_support(SNUM(smb2req->tcon->compat))) { + tevent_req_nterror(req, + NT_STATUS_EAS_NOT_SUPPORTED); + return tevent_req_post(req, ev); + } + ea_list = read_nttrans_ea_list(mem_ctx, (const char *)exta->data.data, exta->data.length); if (!ea_list) { -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via c474173 tests: Add tests for net ads (join|leave) from 23932d3 ctdb-build: Add ctdb/ directory to include path for top-level build https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit c474173a83f3200ce64379f96c1e2367061aa2ca Author: Andreas Schneider Date: Tue Oct 20 15:54:39 2015 +0200 tests: Add tests for net ads (join|leave) Signed-off-by: Andreas Schneider Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Wed Nov 4 15:35:57 CET 2015 on sn-devel-104 --- Summary of changes: source4/selftest/tests.py | 1 + testprogs/blackbox/test_net_ads.sh | 35 +++ 2 files changed, 36 insertions(+) create mode 100755 testprogs/blackbox/test_net_ads.sh Changeset truncated at 500 lines: diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py index acacadb..1425323 100755 --- a/source4/selftest/tests.py +++ b/source4/selftest/tests.py @@ -330,6 +330,7 @@ plantestsuite("samba4.blackbox.gentest(ad_dc_ntvfs)", "ad_dc_ntvfs", [os.path.jo plantestsuite("samba4.blackbox.rfc2307_mapping(ad_dc_ntvfs:local)", "ad_dc_ntvfs:local", [os.path.join(samba4srcdir, "../nsswitch/tests/test_rfc2307_mapping.sh"), '$DOMAIN', '$USERNAME', '$PASSWORD', "$SERVER", "$UID_RFC2307TEST", "$GID_RFC2307TEST", configuration]) plantestsuite("samba4.blackbox.chgdcpass", "chgdcpass", [os.path.join(bbdir, "test_chgdcpass.sh"), '$SERVER', "CHGDCPASS\$", '$REALM', '$DOMAIN', '$PREFIX', "aes256-cts-hmac-sha1-96", '$SELFTEST_PREFIX/chgdcpass', smbclient4]) plantestsuite("samba4.blackbox.samba_upgradedns(chgdcpass:local)", "chgdcpass:local", [os.path.join(bbdir, "test_samba_upgradedns.sh"), '$SERVER', '$REALM', '$PREFIX', '$SELFTEST_PREFIX/chgdcpass']) +plantestsuite("samba4.blackbox.net_ads(ad_member:local)", "ad_member:local", [os.path.join(bbdir, "test_net_ads.sh"), '$DC_SERVER', '$DC_USERNAME', '$DC_PASSWORD']) plantestsuite_loadlist("samba4.rpc.echo against NetBIOS alias", "ad_dc_ntvfs", [valgrindify(smbtorture4), "$LISTOPT", "$LOADLIST", 'ncacn_np:$NETBIOSALIAS', '-U$DOMAIN/$USERNAME%$PASSWORD', 'rpc.echo']) # Tests using the "Simple" NTVFS backend diff --git a/testprogs/blackbox/test_net_ads.sh b/testprogs/blackbox/test_net_ads.sh new file mode 100755 index 000..487014d --- /dev/null +++ b/testprogs/blackbox/test_net_ads.sh @@ -0,0 +1,35 @@ +if [ $# -lt 3 ]; then +cat <
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 8bcbb6f s3: test: Fix standalone valid users fileserver test. via 2f6dc26 s3: lsa: lookup_name() logic for unqualified (no DOMAIN\ component) names is incorrect. via 23f6744 s3:lib: validate domain name in lookup_wellknown_name() from 808f29c s4: torture: Add SMB2 access-based enumeration test. Passes against Win2k12R2. https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 8bcbb6fb16c13d20556fc50ea2744020cb895be3 Author: Jeremy Allison Date: Wed Oct 14 11:20:08 2015 -0700 s3: test: Fix standalone valid users fileserver test. Test was originally added for bug #11320. At the time I remarked the only way I could get this to reproduce the issue was to use "+WORKGROUP\userdup" instead of just "+userdup" (which was the actual problem reported), but I didn't investigage enough to discover the underlying problem which is actually bug: BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555 (lookup_names() logic for unqualified (no DOMAIN\ component) names is incorrect). On a standalone fileserver "WORKGROUP\name" should not resolve, but "NETBIOS-NAME\name" and just "name" should. This corrects the test now that lookups for unqualified names are now being done correctly. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Thu Oct 15 22:58:54 CEST 2015 on sn-devel-104 commit 2f6dc260ada6cd178a650ca003c2ad22e12697c1 Author: Jeremy Allison Date: Thu Oct 15 09:20:58 2015 -0700 s3: lsa: lookup_name() logic for unqualified (no DOMAIN\ component) names is incorrect. Change so we only use unqualified name lookup logic if domain component = "" and LOOKUP_NAME_ISOLATED flag is passed in. Remember to search for "NT Authority" *before* going into unqualified name lookup logic. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555 Signed-off-by: Jeremy Allison Reviewed-by: Uri Simchoni commit 23f674488a1f62fcc58bb94bed0abed98078b96d Author: Ralph Boehme Date: Thu Oct 15 12:35:26 2015 +0200 s3:lib: validate domain name in lookup_wellknown_name() If domain argument is not an empty string, only search the matching wellknown domain name. As the only wellknown domain with a name is "NT Authority", passing "" to lookup_wellknown_name() will search all domains inlcuding "NT Authority". Passing "NT Authority" otoh will obviously only search that domain. This change makes lookup_wellknown_name() behave like this: in domain | in name | ok | out sid | out domain Dialup +S-1-5-1 NT Authority NT AuthorityDialup +S-1-5-1 NT Authority Creator Authority Dialup -- - Creator Owner +S-1-3-0 "" Creator Authority Creator Owner -- - NT AuthorityCreator Owner -- - BUG: https://bugzilla.samba.org/show_bug.cgi?id=11555 Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Reviewed-by: Uri Simchoni --- Summary of changes: selftest/target/Samba3.pm| 2 +- source3/lib/util_wellknown.c | 13 ++--- source3/passdb/lookup_sid.c | 31 ++- 3 files changed, 41 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index de4346e..15423fe 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -608,7 +608,7 @@ sub setup_fileserver($$) dfree command = $srcdir_abs/testprogs/blackbox/dfree.sh [valid-users-access] path = $valid_users_sharedir - valid users = +SAMBA-TEST/userdup + valid users = +userdup "; my $vars = $self->provision($path, diff --git a/source3/lib/util_wellknown.c b/source3/lib/util_wellknown.c index 0f627d1..a3db9ab 100644 --- a/source3/lib/util_wellknown.c +++ b/source3/lib/util_wellknown.c @@ -154,16 +154,23 @@ bool lookup_wellknown_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid, ***/ bool lookup_wellknown_name(TALLOC_CTX *mem_ctx, const char *name, - struct dom_sid *sid, const char **domain) + struct dom_sid *sid, const char **pdomain) { int i, j; + const char *doma
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 5d7eaf9 vfs_fruit: return value of ad_pack in vfs_fruit.c from cc93469 lib: Fix CID 1128553 Unchecked return value from library https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 5d7eaf959a0f11be878f698305fcb8908d7ba047 Author: Ralph Boehme Date: Sun Sep 27 12:11:31 2015 +0200 vfs_fruit: return value of ad_pack in vfs_fruit.c ad_pack() in vfs_fruit.c returns false on failure and 0 on success - i.e. return value is interpreted as success even when it fails. Signed-off-by: Ralph Boehme Reviewed-by: Uri Simchoni Autobuild-User(master): Uri Simchoni Autobuild-Date(master): Tue Oct 6 16:14:42 CEST 2015 on sn-devel-104 --- Summary of changes: source3/modules/vfs_fruit.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/modules/vfs_fruit.c b/source3/modules/vfs_fruit.c index c90699f..8393366 100644 --- a/source3/modules/vfs_fruit.c +++ b/source3/modules/vfs_fruit.c @@ -567,7 +567,7 @@ static bool ad_pack(struct adouble *ad) } RSSVAL(ad->ad_data, ADEDOFF_NENTRIES, nent); - return 0; + return true; } /** @@ -949,8 +949,9 @@ static ssize_t ad_header_read_rsrc(struct adouble *ad, const char *path) /* * Can't use ad_write() because we might not have a fsp */ - rc = ad_pack(ad); - if (rc != 0) { + ok = ad_pack(ad); + if (!ok) { + rc = -1; goto exit; } /* FIXME: direct sys_pwrite(), don't have an fsp */ @@ -1211,10 +1212,11 @@ static int ad_write(struct adouble *ad, const char *path) { int rc = 0; ssize_t len; + bool ok; - rc = ad_pack(ad); - if (rc != 0) { - goto exit; + ok = ad_pack(ad); + if (!ok) { + return -1; } switch (ad->ad_type) { -- Samba Shared Repository
[SCM] Samba Website Repository - branch master updated
The branch, master has been updated via 2fef43d Add Uri Simchoni to Samba team member list from a478eab Remove note about FTP from the download page https://git.samba.org/?p=samba-web.git;a=shortlog;h=master - Log - commit 2fef43d0c82007716b405eb91165bf0217f7388d Author: Uri Simchoni Date: Thu Sep 24 21:55:20 2015 +0300 Add Uri Simchoni to Samba team member list Signed-off-by: Uri Simchoni --- Summary of changes: team/index.html | 1 + 1 file changed, 1 insertion(+) Changeset truncated at 500 lines: diff --git a/team/index.html b/team/index.html index 967a52c..4d0e6ef 100755 --- a/team/index.html +++ b/team/index.html @@ -96,6 +96,7 @@ mailing list and start contributing to the development of Samba. mailto:mi...@samba.org";>Rafal Szczesniak mailto:j...@samba.org";>John Terpstra http://samba.org/~tridge/";>Andrew Tridgell +mailto:u...@samba.org";>Uri Simchoni (https://www.ctera.com/";>CTERA) https://samba.org/~jelmer/";>Jelmer Vernooij mailto:m...@samba.org";>Matthias Dieter Wallnöfer mailto:m...@samba.org";>Michael Warfield -- Samba Website Repository