[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  8588d10 s4:ntvfs/smb2: remove misleading comment regarding 
security=server
   via  12ce84f s4:ntvfs/cifs: remove misleading comment regarding 
security=server
   via  7cb4acd s4:auth: remove unused auth_server.c
   via  413e1be s3:auth: remove unused auth_server.c
   via  0239f68 docs-xml: remove documentation of SECURITY = SERVER
   via  b4abd3f s3-auth: remove security=server (depricated since 3.6)
   via  053fcfe s4:param/tests: remove security=server test
   via  f67cb32 selftest: Remove tests for security=server
  from  747e539 samba-upgradedns: Use the correct magic incantation of 
sys.path.insert()

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


- Log -
commit 8588d1086142cebcf8734fcd0773f99e8825c87b
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:53:34 2012 +0200

s4:ntvfs/smb2: remove misleading comment regarding security=server

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Tue May 15 10:12:53 CEST 2012 on sn-devel-104

commit 12ce84f0cf8b2658cf4067dd5189624bdee4bde7
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:53:34 2012 +0200

s4:ntvfs/cifs: remove misleading comment regarding security=server

metze

commit 7cb4acd5dd1825e157e00e0e8babd674b494375a
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:01:18 2012 +0200

s4:auth: remove unused auth_server.c

metze

commit 413e1be7739003696fd903dd80d1ead5275fe74c
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:01:03 2012 +0200

s3:auth: remove unused auth_server.c

metze

commit 0239f680a79ec41ecff97eea38687eccad2b5894
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:00:32 2012 +0200

docs-xml: remove documentation of SECURITY = SERVER

metze

commit b4abd3faaf3bdcbcd24fed8325960ccdee43bea9
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 12:00:00 2012 +0200

s3-auth: remove security=server (depricated since 3.6)

security=server has a lot of problems in the world with
modern security (ntlmv2 and krb5). It was also not very
reliable, as it needed a stable connection to the password
server for the lifetime of the whole client connection!

Please use security=domain or security=ads is you
authentication against remote servers (domain controllers).

metze
   --
  /  \
 /  REST  \
/IN\
   /   PEACE\
  /  \
  |  SEC_SERVER  |
  |security=server   |
  |  |
  |  |
  |   12 May |
  |  |
  |2012  |
 *| *  *  *  | *
_)/\\_//(\/(/\)/\//\/\///|_)___

commit 053fcfef0fa680e2443a07933973f0f21624c336
Author: Stefan Metzmacher me...@samba.org
Date:   Sat May 12 11:14:17 2012 +0200

s4:param/tests: remove security=server test

metze

commit f67cb32b51a77dd0ebf63d9469a99f9359cb1e54
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 15 09:43:03 2012 +1000

selftest: Remove tests for security=server

Signed-off-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 docs-xml/smbdotconf/security/security.xml |   32 --
 lib/param/loadparm_server_role.c  |9 +-
 lib/param/param_enums.c   |1 -
 libds/common/roles.h  |   19 +-
 selftest/target/Samba.pm  |1 -
 selftest/target/Samba3.pm |   40 ---
 source3/Makefile.in   |5 -
 source3/auth/auth.c   |6 -
 source3/auth/auth_server.c|  487 -
 source3/auth/proto.h  |4 -
 source3/auth/wscript_build|9 -
 source3/configure.in  |2 -
 source3/param/loadparm.c  |4 -
 source3/selftest/tests.py |5 +-
 source3/utils/testparm.c  |6 +-
 source3/wscript   |2 +-
 source4/auth/ntlm/auth_server.c   |  237 --
 source4/auth/ntlm/wscript_build   |8 -
 source4/ntvfs/cifs/vfs_cifs.c |1 -
 source4/ntvfs/smb2/vfs_smb2.c |1 -
 source4/param/tests/loadparm.c|   10 -
 21 files changed, 22 insertions(+), 867 deletions(-)
 delete mode 100644 

[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Jelmer Vernooij
The branch, master has been updated
   via  a66865d Use ENC_ values for proto_tree_add_item() calls.
  from  8588d10 s4:ntvfs/smb2: remove misleading comment regarding 
security=server

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


- Log -
commit a66865dd287073f21ce279d52450582ea290c7df
Author: Guy Harris g...@alum.mit.edu
Date:   Tue May 15 09:49:53 2012 +0200

Use ENC_ values for proto_tree_add_item() calls.

It appears that the integral value containing the bits in a bitmap should be
dissected according to the data representation, as the individual fields are
fetched by dissect_ndr_XXX, which is passed the data representation and
extracts the value appropriately for the data representation, so the patch
replaces TRUE (which meant always little-endian when the last argument to
proto_tree_add_item() was a byte-order Boolean) with DREP_ENC_INTEGER(drep)
(which means ENC_BIG_ENDIAN or ENC_LITTLE_ENDIAN, depending on the data
representation).

For structures, I'm just using ENC_NA.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8942
Signed-off-by: Jelmer Vernooij jel...@samba.org

Autobuild-User: Jelmer Vernooij jel...@samba.org
Autobuild-Date: Tue May 15 12:07:06 CEST 2012 on sn-devel-104

---

Summary of changes:
 pidl/lib/Parse/Pidl/Wireshark/NDR.pm |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm 
b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
index 46c9850..1aa44c3 100644
--- a/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
+++ b/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
@@ -215,7 +215,7 @@ sub Bitmap()
 
$self-pidl_code(if (parent_tree) {);
$self-indent;
-   $self-pidl_code(item = proto_tree_add_item(parent_tree, hf_index, 
tvb, offset, $e-{ALIGN}, TRUE););
+   $self-pidl_code(item = proto_tree_add_item(parent_tree, hf_index, 
tvb, offset, $e-{ALIGN}, DREP_ENC_INTEGER(drep)););
$self-pidl_code(tree = 
proto_item_add_subtree(item,ett_$ifname\_$name););
$self-deindent;
$self-pidl_code(}\n);
@@ -648,7 +648,7 @@ sub Struct()
$self-pidl_code();
$self-pidl_code(if (parent_tree) {);
$self-indent;
-   $self-pidl_code(item = proto_tree_add_item(parent_tree, hf_index, 
tvb, offset, -1, TRUE););
+   $self-pidl_code(item = proto_tree_add_item(parent_tree, hf_index, 
tvb, offset, -1, ENC_NA););
$self-pidl_code(tree = proto_item_add_subtree(item, 
ett_$ifname\_$name););
$self-deindent;
$self-pidl_code(});


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Andreas Schneider
The branch, master has been updated
   via  78af473 s3-auth: Rename to init_system_session_info().
   via  caaebb4 s3-auth: Don't lookup the system user in pdb.
  from  a66865d Use ENC_ values for proto_tree_add_item() calls.

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


- Log -
commit 78af4738e7bd6f73469dd990d0f444a04afbc709
Author: Andreas Schneider a...@samba.org
Date:   Mon May 14 10:37:59 2012 +0200

s3-auth: Rename to init_system_session_info().

Autobuild-User: Andreas Schneider a...@cryptomilk.org
Autobuild-Date: Tue May 15 13:56:00 CEST 2012 on sn-devel-104

commit caaebb455cf955f66c2f662c53998c480cb2d6c9
Author: Andreas Schneider a...@samba.org
Date:   Mon May 14 10:31:32 2012 +0200

s3-auth: Don't lookup the system user in pdb.

This fixes bug #8944, ldapsam:trusted and ipasam. It is an additional
fix for bug #8567 (0528cb5f3a15b72dcb34ece21a3ffb3e7b8d6eb9).

---

Summary of changes:
 source3/auth/auth_util.c|  101 --
 source3/auth/proto.h|2 +-
 source3/smbd/server.c   |2 +-
 source3/winbindd/winbindd.c |2 +-
 4 files changed, 99 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 6075232..f270ccd 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -771,6 +771,44 @@ NTSTATUS make_server_info_pw(struct 
auth_serversupplied_info **server_info,
return NT_STATUS_OK;
 }
 
+static NTSTATUS get_system_info3(TALLOC_CTX *mem_ctx,
+struct passwd *pwd,
+struct netr_SamInfo3 *info3)
+{
+   struct dom_sid domain_sid;
+   const char *tmp;
+
+   /* Set account name */
+   tmp = talloc_strdup(mem_ctx, pwd-pw_name);
+   if (tmp == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+   init_lsa_String(info3-base.account_name, tmp);
+
+   /* Set domain name */
+   tmp = talloc_strdup(mem_ctx, get_global_sam_name());
+   if (tmp == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+   init_lsa_StringLarge(info3-base.logon_domain, tmp);
+
+   /* Domain sid */
+   sid_copy(domain_sid, get_global_sam_sid());
+
+   info3-base.domain_sid = dom_sid_dup(mem_ctx, domain_sid);
+   if (info3-base.domain_sid == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   /* Admin rid */
+   info3-base.rid = DOMAIN_RID_ADMINISTRATOR;
+
+   /* Primary gid */
+   info3-base.primary_gid = dom_sid_parse_talloc(mem_ctx, SID_NT_SYSTEM);
+
+   return NT_STATUS_OK;
+}
+
 static NTSTATUS get_guest_info3(TALLOC_CTX *mem_ctx,
struct netr_SamInfo3 *info3)
 {
@@ -898,6 +936,60 @@ done:
   it.
 /
 
+static NTSTATUS make_system_session_info_from_pw(TALLOC_CTX *mem_ctx,
+struct passwd *pwd,
+struct auth_session_info 
**session_info)
+{
+   struct auth_serversupplied_info *server_info;
+   const char *domain = lp_netbios_name();
+   struct netr_SamInfo3 info3;
+   TALLOC_CTX *tmp_ctx;
+   NTSTATUS status;
+
+   tmp_ctx = talloc_stackframe();
+   if (tmp_ctx == NULL) {
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   ZERO_STRUCT(info3);
+
+   status = get_system_info3(tmp_ctx, pwd, info3);
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (Failed creating system info3 with %s\n,
+ nt_errstr(status)));
+   goto done;
+   }
+
+   status = make_server_info_info3(tmp_ctx,
+   pwd-pw_name,
+   domain,
+   server_info,
+   info3);
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (make_server_info_info3 failed with %s\n,
+ nt_errstr(status)));
+   goto done;
+   }
+
+   server_info-nss_token = true;
+
+   /* Now turn the server_info into a session_info with the full token etc 
*/
+   status = create_local_token(mem_ctx, server_info, NULL, pwd-pw_name, 
session_info);
+   if (!NT_STATUS_IS_OK(status)) {
+   DEBUG(0, (create_local_token failed: %s\n,
+ nt_errstr(status)));
+   goto done;
+   }
+
+   talloc_free(server_info);
+   talloc_steal(mem_ctx, *session_info);
+
+   status = NT_STATUS_OK;
+done:
+   TALLOC_FREE(tmp_ctx);
+   return status;
+}
+
 static NTSTATUS make_session_info_from_pw(TALLOC_CTX *mem_ctx,
  

[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  5e6357b lib/ccan: add a missing dependency to 'execinfo' for 
'backtrace()'
  from  78af473 s3-auth: Rename to init_system_session_info().

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


- Log -
commit 5e6357b42149ad4504fdd7b05acd264d10fcbe67
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 12:40:19 2012 +0200

lib/ccan: add a missing dependency to 'execinfo' for 'backtrace()'

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Tue May 15 16:12:54 CEST 2012 on sn-devel-104

---

Summary of changes:
 lib/ccan/wscript |4 
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/ccan/wscript b/lib/ccan/wscript
index 59fe93a..24034bb 100644
--- a/lib/ccan/wscript
+++ b/lib/ccan/wscript
@@ -117,8 +117,12 @@ def configure(conf):
 addmain=False, link=False, cflags=-Werror,
 define='HAVE_WARN_UNUSED_RESULT')
 
+# backtrace could be in libexecinfo or in libc
+conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', 
checklibc=True, headers='execinfo.h')
+
 def build(bld):
 bld.SAMBA_LIBRARY('ccan',
   vnum=0.1-init-1161-g661d41f,
   source=bld.path.ant_glob('*/*.c'),
+  deps='execinfo',
   private_library=True)


-- 
Samba Shared Repository


autobuild: intermittent test failure detected

2012-05-15 Thread autobuild
The autobuild test system has detected an intermittent failing test in 
the current master tree.

The autobuild log of the failure is available here:

   http://git.samba.org/autobuild.flakey/2012-05-15-1810/flakey.log

The samba3 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-05-15-1810/samba3.stderr
   http://git.samba.org/autobuild.flakey/2012-05-15-1810/samba3.stdout

The source4 build logs are available here:

   http://git.samba.org/autobuild.flakey/2012-05-15-1810/samba4.stderr
   http://git.samba.org/autobuild.flakey/2012-05-15-1810/samba4.stdout
  
The top commit at the time of the failure was:

commit 5e6357b42149ad4504fdd7b05acd264d10fcbe67
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 12:40:19 2012 +0200

lib/ccan: add a missing dependency to 'execinfo' for 'backtrace()'

metze

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Tue May 15 16:12:54 CEST 2012 on sn-devel-104


[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Volker Lendecke
The branch, master has been updated
   via  8ae354e s3: Remove some unused code
   via  c562a53 s3: Fix a likely cutpaste error
  from  5e6357b lib/ccan: add a missing dependency to 'execinfo' for 
'backtrace()'

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


- Log -
commit 8ae354ed4e3443dce7678a4c0ad3bd034bf5305b
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 13:37:25 2012 +0200

s3: Remove some unused code

Autobuild-User: Volker Lendecke v...@samba.org
Autobuild-Date: Tue May 15 18:24:10 CEST 2012 on sn-devel-104

commit c562a534c854388e860d0231aab5dad4f06dfe2c
Author: Volker Lendecke v...@samba.org
Date:   Mon May 14 19:48:16 2012 +0200

s3: Fix a likely cutpaste error

---

Summary of changes:
 source3/lib/util_malloc.c |   14 --
 source3/smbd/lanman.c |2 +-
 2 files changed, 1 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_malloc.c b/source3/lib/util_malloc.c
index faff9b0..ff78db6 100644
--- a/source3/lib/util_malloc.c
+++ b/source3/lib/util_malloc.c
@@ -40,20 +40,6 @@ void *malloc_(size_t size)
 }
 
 /
- Internal calloc wrapper. Not externally visible.
-/
-
-static void *calloc_(size_t count, size_t size)
-{
-   if (size == 0 || count == 0) {
-   return NULL;
-   }
-#undef calloc
-   return calloc(count, size);
-#define calloc(n,s) __ERROR_DONT_USE_CALLOC_DIRECTLY
-}
-
-/
  Internal realloc wrapper. Not externally visible.
 /
 
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 31775bf..ac2faa9 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -3145,7 +3145,7 @@ static bool api_SetUserPassword(struct 
smbd_server_connection *sconn,
ZERO_STRUCT(old_lm_hash);
ZERO_STRUCT(new_lm_hash);
memcpy(old_lm_hash.hash, pass1, MIN(strlen(pass1), 16));
-   memcpy(new_lm_hash.hash, pass1, MIN(strlen(pass2), 16));
+   memcpy(new_lm_hash.hash, pass2, MIN(strlen(pass2), 16));
}
 
status = dcerpc_samr_ChangePasswordUser(b, mem_ctx,


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Stefan Metzmacher
The branch, master has been updated
   via  5f494c4 libcli/smb: move smb2cli_ioctl.c from source3 to the 
toplevel
   via  c16e263 libcli/smb: move smb2cli_query_directory.c from source3 to 
the toplevel
   via  b2d9c02 libcli/smb: move smb2cli_query_info.c from source3 to the 
toplevel
   via  22b76de libcli/smb: move smb2cli_set_info.c from source3 to the 
toplevel
   via  1d7c6bf libcli/smb: move smb2cli_flush.c from source3 to the 
toplevel
   via  f50fc00 libcli/smb: move smb2cli_write.c from source3 to the 
toplevel
   via  269000b libcli/smb: move smb2cli_read.c from source3 to the toplevel
   via  4022edc libcli/smb: move smb2cli_close.c from source3 to the 
toplevel
   via  2674d0c libcli/smb: move smb2cli_create.c from source3 to the 
toplevel
   via  35b54ae s3:libsmb: avoid interpret_long_date() in smb2cli_create
   via  b488567 s3:cli_np_tstream: include smbXcli_base.h, because we'll 
use functions from there
  from  8ae354e s3: Remove some unused code

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


- Log -
commit 5f494c424cf204c1b5164085aecb3ea54c1b0fa9
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 12:24:38 2012 +0200

libcli/smb: move smb2cli_ioctl.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

Autobuild-User: Stefan Metzmacher me...@samba.org
Autobuild-Date: Tue May 15 20:17:01 CEST 2012 on sn-devel-104

commit c16e263d0e84c14e5a1dd45a2ec13a6972aa8885
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 12:19:11 2012 +0200

libcli/smb: move smb2cli_query_directory.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit b2d9c02665c0a168f29c4fb51d2ba280547ad8c6
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 12:14:47 2012 +0200

libcli/smb: move smb2cli_query_info.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 22b76de2ffd25e580bd8db61748fa9a6cf62d153
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 12:05:50 2012 +0200

libcli/smb: move smb2cli_set_info.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 1d7c6bfd7ae02a0b026bb999b462dae4027c7d10
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 12:00:19 2012 +0200

libcli/smb: move smb2cli_flush.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit f50fc00306768424dee0680f7f9cae7ff0b3dcd8
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 11:11:24 2012 +0200

libcli/smb: move smb2cli_write.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 269000b1b344fb04efe0f12ca455b584074139d3
Author: Björn Baumbach b...@sernet.de
Date:   Tue May 15 10:50:49 2012 +0200

libcli/smb: move smb2cli_read.c from source3 to the toplevel

Signed-off-by: Stefan Metzmacher me...@samba.org

commit 4022edc9064e7cde147f0c7cbd93b76db30fac4a
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 10:26:25 2012 +0200

libcli/smb: move smb2cli_close.c from source3 to the toplevel

metze

commit 2674d0c458410a96d6e33e190a6924e857bbe8be
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 10:23:54 2012 +0200

libcli/smb: move smb2cli_create.c from source3 to the toplevel

metze

commit 35b54ae5a9bf67373dc824fd2843411fee0aec72
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 11:27:23 2012 +0200

s3:libsmb: avoid interpret_long_date() in smb2cli_create

metze

commit b488567a18653e4f95ed68964ee5846aac8c3ca6
Author: Stefan Metzmacher me...@samba.org
Date:   Tue May 15 12:41:55 2012 +0200

s3:cli_np_tstream: include smbXcli_base.h, because we'll use functions from 
there

metze

---

Summary of changes:
 libcli/smb/smb2cli_close.c   |  135 
 libcli/smb/smb2cli_create.c  |  279 
 libcli/smb/smb2cli_flush.c   |  131 
 libcli/smb/smb2cli_ioctl.c   |  335 +
 libcli/smb/smb2cli_query_directory.c |  208 ++
 libcli/smb/smb2cli_query_info.c  |  251 ++
 libcli/smb/smb2cli_read.c|  187 +
 libcli/smb/smb2cli_set_info.c|  182 
 libcli/smb/smb2cli_write.c   |  161 ++
 libcli/smb/smbXcli_base.h|  245 ++
 libcli/smb/wscript_build |9 +
 source3/Makefile.in  |   18 +-
 source3/libsmb/cli_np_tstream.c  |1 +
 source3/libsmb/smb2cli.h |  245 --
 source3/libsmb/smb2cli_close.c   |  137 
 

[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Volker Lendecke
The branch, master has been updated
   via  18e2e86 libwbclient: Fix an invalid free()
   via  e5825ab wbinfo: Fix Coverity ID 242684 Resource leak
   via  c5eab2e wbinfo: Fix Coverity ID 242685 Resource leak
   via  fc77ee5 s3: Fix Coverity ID 242710 Untrusted pointer read
   via  2298622 dbwrap: Fix Coverity ID 242750 Incorrect sizeof expression
  from  5f494c4 libcli/smb: move smb2cli_ioctl.c from source3 to the 
toplevel

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


- Log -
commit 18e2e86c083fa1a24056e691a755bc45a35547d1
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 19:58:26 2012 +0200

libwbclient: Fix an invalid free()

Autobuild-User: Volker Lendecke v...@samba.org
Autobuild-Date: Wed May 16 00:00:00 CEST 2012 on sn-devel-104

commit e5825ab22de75315e1af9cc58e79b9e2c3896226
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 19:49:31 2012 +0200

wbinfo: Fix Coverity ID 242684 Resource leak

commit c5eab2e9acb66c0a8c48ababc0e495adb415aeeb
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 19:48:42 2012 +0200

wbinfo: Fix Coverity ID 242685 Resource leak

commit fc77ee51717d3ca8e7d50ff46f2738cee475a84f
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 19:26:48 2012 +0200

s3: Fix Coverity ID 242710 Untrusted pointer read

According to susv3 we have to make sure that we call isupper with
values only in the range of an unsigned char. This is best achieved
by automatic narrowing through assignment.

commit 229862224301e3fa3fc30cd495a7ff9ee7ca4b60
Author: Volker Lendecke v...@samba.org
Date:   Tue May 15 18:51:06 2012 +0200

dbwrap: Fix Coverity ID 242750 Incorrect sizeof expression

Taking the size of db is correct, but a bit fishy. Silence Coverity.

---

Summary of changes:
 lib/dbwrap/dbwrap_rbt.c|2 +-
 nsswitch/libwbclient/wbc_sid.c |2 +-
 nsswitch/wbinfo.c  |2 ++
 source3/utils/net_registry_check.c |2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
index c25ea6e..d468953 100644
--- a/lib/dbwrap/dbwrap_rbt.c
+++ b/lib/dbwrap/dbwrap_rbt.c
@@ -411,7 +411,7 @@ static int db_rbt_trans_dummy(struct db_context *db)
 static void db_rbt_id(struct db_context *db, const uint8_t **id, size_t *idlen)
 {
*id = (uint8_t *)db;
-   *idlen = sizeof(db);
+   *idlen = sizeof(struct db_context *);
 }
 
 struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index 6df8a3c..bab6933 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -295,7 +295,7 @@ static void wbcTranslatedNamesDestructor(void *ptr)
struct wbcTranslatedName *n = (struct wbcTranslatedName *)ptr;
 
while (n-name != NULL) {
-   free(n-name);
+   wbcFreeMemory(n-name);
n += 1;
}
 }
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index e7f902f..3f7036d 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1389,6 +1389,8 @@ static bool wbinfo_lookup_sids(const char *arg)
 domains[names[i].domain_index].short_name,
 names[i].name, names[i].type);
}
+   wbcFreeMemory(names);
+   wbcFreeMemory(domains);
return true;
 }
 
diff --git a/source3/utils/net_registry_check.c 
b/source3/utils/net_registry_check.c
index 8d1a91c..6e455db 100644
--- a/source3/utils/net_registry_check.c
+++ b/source3/utils/net_registry_check.c
@@ -788,7 +788,7 @@ static int check_tdb_action(struct db_record *rec, void 
*check_ctx)
}
 
if (invalid_path) {
-   int action;
+   unsigned char action;
if (ctx-opt.output == NULL) {
action = first_iter ? 'r' : 's';
} else if (ctx-opt.automatic) {


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Andrew Bartlett
The branch, master has been updated
   via  b6e3608 build: Add explicit mention of --abi-check-disable to ABI 
checker
  from  18e2e86 libwbclient: Fix an invalid free()

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


- Log -
commit b6e36089e5bd43baeb41e8299ad8970b1cd32c88
Author: Andrew Bartlett abart...@samba.org
Date:   Tue May 15 23:03:31 2012 +1000

build: Add explicit mention of --abi-check-disable to ABI checker

This information has always been in the linked wiki page, but put it
in the build to unblock developers using platforms with slightly
different GDB output.

We can also assist this by improving the string normalisiation in the
ABI checker when example errors are provided.

It is better to build with the waf build and the full testsuite than
to avoid the waf build or not to use the developer options simply to
skip the ABI checker.

Andrew Bartlett

Autobuild-User: Andrew Bartlett abart...@samba.org
Autobuild-Date: Wed May 16 01:53:42 CEST 2012 on sn-devel-104

---

Summary of changes:
 buildtools/wafsamba/samba_abi.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/buildtools/wafsamba/samba_abi.py b/buildtools/wafsamba/samba_abi.py
index c51e08c..2966d7c 100644
--- a/buildtools/wafsamba/samba_abi.py
+++ b/buildtools/wafsamba/samba_abi.py
@@ -109,7 +109,7 @@ def abi_check_task(self):
 got_error = True
 
 if got_error:
-raise Utils.WafError('ABI for %s has changed - please fix library 
version then build with --abi-update\nSee 
http://wiki.samba.org/index.php/Waf#ABI_Checking for more information' % 
libname)
+raise Utils.WafError('ABI for %s has changed - please fix library 
version then build with --abi-update\nSee 
http://wiki.samba.org/index.php/Waf#ABI_Checking for more information\nIf you 
have not changed any ABI, and your platform always gives this error, please 
configure with --abi-check-disable to skip this check' % libname)
 
 
 t = Task.task_type_from_func('abi_check', abi_check_task, color='BLUE', 
ext_in='.bin')


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-05-15 Thread Richard Sharpe
The branch, master has been updated
   via  bfe4a2b Fix the overwriting of errno before use in a DEBUG 
statement and use the return value from store_acl_blob_fsp rather than ignoring 
it.
  from  b6e3608 build: Add explicit mention of --abi-check-disable to ABI 
checker

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


- Log -
commit bfe4a2baeec6bc4558a617ec67532ea11f865861
Author: Richard Sharpe realrichardsha...@gmail.com
Date:   Tue May 15 07:47:14 2012 -0700

Fix the overwriting of errno before use in a DEBUG statement and use the 
return value from store_acl_blob_fsp rather than ignoring it.

Autobuild-User: Richard Sharpe sha...@samba.org
Autobuild-Date: Wed May 16 03:43:41 CEST 2012 on sn-devel-104

---

Summary of changes:
 source3/modules/vfs_acl_common.c |7 +--
 source3/modules/vfs_acl_xattr.c  |6 +++---
 2 files changed, 8 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c
index 241bc8f..221b43f 100644
--- a/source3/modules/vfs_acl_common.c
+++ b/source3/modules/vfs_acl_common.c
@@ -592,10 +592,13 @@ static NTSTATUS fset_nt_acl_common(vfs_handle_struct 
*handle, files_struct *fsp,
NDR_PRINT_DEBUG(security_descriptor,
discard_const_p(struct security_descriptor, psd));
}
+   /*
+* Perhaps create_acl_blob should have a status return as well
+*/
create_acl_blob(psd, blob, XATTR_SD_HASH_TYPE_SHA256, hash);
-   store_acl_blob_fsp(handle, fsp, blob);
+   status = store_acl_blob_fsp(handle, fsp, blob);
 
-   return NT_STATUS_OK;
+   return status;
 }
 
 static int acl_common_remove_object(vfs_handle_struct *handle,
diff --git a/source3/modules/vfs_acl_xattr.c b/source3/modules/vfs_acl_xattr.c
index 5653657..c1b0a60 100644
--- a/source3/modules/vfs_acl_xattr.c
+++ b/source3/modules/vfs_acl_xattr.c
@@ -119,12 +119,12 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct 
*handle,
}
unbecome_root();
if (ret) {
-   errno = saved_errno;
DEBUG(5, (store_acl_blob_fsp: setting attr failed for file %s
with error %s\n,
fsp_str_dbg(fsp),
-   strerror(errno) ));
-   return map_nt_error_from_unix(errno);
+   strerror(saved_errno) ));
+   errno = saved_errno;
+   return map_nt_error_from_unix(saved_errno);
}
return NT_STATUS_OK;
 }


-- 
Samba Shared Repository