[SCM] Samba Shared Repository - branch master updated

2012-12-12 Thread Günther Deschner
The branch, master has been updated
   via  014512f dfs_server: Don't allocate a subcontext twice.
   via  ac434c4 util: Don't use the pid ret value uninitialized.
   via  f1fe877 s3-netapi: Initialize group_handle of NetGroupSetUsers_r().
   via  7d20934 s4-netapi: Initialize group_handle of NetGroupGetUsers_r().
   via  5bc5761 s3-auth: Make sure we work on valid data_blobs.
   via  d020c51 s3-netapi: Initialize group_handle of NetUserSetGroups_r.
   via  dc9fa1a torture: Fix torture_rpc_spoolss_printer_teardown_common().
   via  33d1d52 s3-netapi: Fix zeroing policy handles in 
NetLocalGroupAdd_r().
   via  4c0b489 vfs: Make sure we don't call talloc_free on an 
uninitialized pointer.
   via  e039676 s3-printing: Don't call talloc_free on an uninitialized 
pointer.
   via  c83f933 idl: Fix spoolss check for the size of the struct.
   via  e4e3293 s3-net: Check the return value of strlower_m().
   via  f70c56b s3-net: Check return value of string_to_sid().
   via  785cc6f s3-rpcclient: Check return value of add_string_to_array().
   via  ff32391 s3-registry: Check return code of push_reg_sz().
  from  0f75d92 s3:auth: Tidy up some of the API confusion in 
create_token_from_XXX() calls.

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


- Log -
commit 014512f56478152972c7cae75e872a48ea18c91d
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 14:37:21 2012 +0100

dfs_server: Don't allocate a subcontext twice.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

Autobuild-User(master): Günther Deschner g...@samba.org
Autobuild-Date(master): Wed Dec 12 11:28:39 CET 2012 on sn-devel-104

commit ac434c4223ba7a7cbbd97a59e305445a22a32c76
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 16:02:57 2012 +0100

util: Don't use the pid ret value uninitialized.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit f1fe877d07d6b1d04e9bbbec558bad90a855ae95
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 17:04:47 2012 +0100

s3-netapi: Initialize group_handle of NetGroupSetUsers_r().

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit 7d20934693174deac1f94a250ee9a2d39a7a8c8c
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 18:06:59 2012 +0100

s4-netapi: Initialize group_handle of NetGroupGetUsers_r().

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit 5bc5761c06decc6b1fadff5f246c820e1db3fed3
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 18:13:23 2012 +0100

s3-auth: Make sure we work on valid data_blobs.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit d020c51978727185803edc5575adaf485b6e894e
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 18:15:12 2012 +0100

s3-netapi: Initialize group_handle of NetUserSetGroups_r.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit dc9fa1a026e9cd543a53b9ca72b0c52e1740c2e4
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 13:22:52 2012 +0100

torture: Fix torture_rpc_spoolss_printer_teardown_common().

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit 33d1d525080297686f60b46661b0b4021d31199b
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 13:24:46 2012 +0100

s3-netapi: Fix zeroing policy handles in NetLocalGroupAdd_r().

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit 4c0b4894d58094f95d8f053651104521e46da4ec
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 13:35:27 2012 +0100

vfs: Make sure we don't call talloc_free on an uninitialized pointer.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit e039676fe2c2fe5c7ef53e1e58487dd048e37013
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 13:42:37 2012 +0100

s3-printing: Don't call talloc_free on an uninitialized pointer.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner g...@samba.org

commit c83f9330a40fc53ec4cbfdfcafa2a95eae4cf7fa
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 15:48:28 2012 +0100

idl: Fix spoolss check for the size of the struct.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Guenther Deschner 

[SCM] Samba Shared Repository - branch v3-5-test updated

2012-12-12 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  06e3c65 Fix bug #9455 munmap called for an address location not 
mapped by samba.
  from  cf4773f source3/libaddns: don't depend on the order in 
resp-answers[]

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -
commit 06e3c65af559baaee7fa61ed3df1287b786d1858
Author: Jeremy Allison j...@samba.org
Date:   Mon Dec 10 10:40:12 2012 -0800

Fix bug #9455 munmap called for an address location not mapped by samba.

Signed-off-by: Jeremy Allison j...@samba.org

---

Summary of changes:
 source3/lib/util_unistr.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index f53ef94..e8483d3 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -45,6 +45,7 @@ void gfree_case_tables(void)
unmap_file(upcase_table, 0x2);
else
SAFE_FREE(upcase_table);
+   upcase_table = NULL;
}
 
if ( lowcase_table ) {
@@ -52,6 +53,7 @@ void gfree_case_tables(void)
unmap_file(lowcase_table, 0x2);
else
SAFE_FREE(lowcase_table);
+   lowcase_table = NULL;
}
 
if ( valid_table ) {
@@ -59,6 +61,7 @@ void gfree_case_tables(void)
unmap_file(valid_table, 0x1);
else
SAFE_FREE(valid_table);
+   valid_table = NULL;
}
initialized = false;
 }


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2012-12-12 Thread Stefan Metzmacher
The branch, master has been updated
   via  34ac9d8 s4-selftest: make sure to test rpc.samr.passwords.validate 
over ncacn_ip_tcp.
   via  6a59126 s3-selftest: make sure to test rpc.samr.passwords.validate 
over ncacn_ip_tcp.
   via  4fd7aaf s4-rpc_server: limit allowed transports for 
samr_ValidatePassword().
   via  c9055a0 s3-rpc_server: limit allowed transports for 
samr_ValidatePassword().
   via  f22efd4 s4-torture: move samr_ValidatePassword test out of main 
samr test.
  from  014512f dfs_server: Don't allocate a subcontext twice.

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


- Log -
commit 34ac9d878687443c40e9df9941f45d9bc6040529
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 11 16:43:12 2012 +0100

s4-selftest: make sure to test rpc.samr.passwords.validate over 
ncacn_ip_tcp.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

Autobuild-User(master): Stefan Metzmacher me...@samba.org
Autobuild-Date(master): Wed Dec 12 13:13:47 CET 2012 on sn-devel-104

commit 6a59126d591b3a9f6a7c505cb8973b826f5cc0b0
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 11 16:42:53 2012 +0100

s3-selftest: make sure to test rpc.samr.passwords.validate over 
ncacn_ip_tcp.

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit 4fd7aaf2b148fff7d5efc15e9f1923bf56b5b54a
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 11 14:43:07 2012 +0100

s4-rpc_server: limit allowed transports for samr_ValidatePassword().

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit c9055a0be444260ddbf44eb13007399bf7dff5e1
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 11 14:41:34 2012 +0100

s3-rpc_server: limit allowed transports for samr_ValidatePassword().

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

commit f22efd402adf61842dd0a97e462a097e80d878a4
Author: Günther Deschner g...@samba.org
Date:   Tue Dec 11 09:25:53 2012 +0100

s4-torture: move samr_ValidatePassword test out of main samr test.

Makes it easier to call with ncacn_ip_tcp transport (Windows does not allow
other transports).

Guenther

Signed-off-by: Günther Deschner g...@samba.org
Reviewed-by: Stefan Metzmacher me...@samba.org

---

Summary of changes:
 source3/rpc_server/samr/srv_samr_nt.c |5 +
 source3/selftest/tests.py |5 -
 source4/rpc_server/samr/dcesrv_samr.c |5 +
 source4/selftest/tests.py |2 +-
 source4/torture/rpc/rpc.c |1 +
 source4/torture/rpc/samr.c|   21 +
 6 files changed, 33 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/rpc_server/samr/srv_samr_nt.c 
b/source3/rpc_server/samr/srv_samr_nt.c
index 1065f2a..580638b 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -6807,6 +6807,11 @@ NTSTATUS _samr_ValidatePassword(struct pipes_struct *p,
struct samr_GetDomPwInfo pw;
struct samr_PwInfo dom_pw_info;
 
+   if (p-transport != NCACN_IP_TCP  p-transport != NCALRPC) {
+   p-fault_state = DCERPC_FAULT_ACCESS_DENIED;
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
if (r-in.level  1 || r-in.level  3) {
return NT_STATUS_INVALID_INFO_CLASS;
}
diff --git a/source3/selftest/tests.py b/source3/selftest/tests.py
index def4d83..57a67ed 100755
--- a/source3/selftest/tests.py
+++ b/source3/selftest/tests.py
@@ -270,7 +270,7 @@ rpc = [rpc.authcontext, rpc.samba3.bind, 
rpc.samba3.srvsvc, rpc.samba3.sh
rpc.lsa.privileges, rpc.lsa.secrets,
rpc.samr, rpc.samr.users, rpc.samr.users.privileges, 
rpc.samr.passwords,
rpc.samr.passwords.pwdlastset, rpc.samr.large-dc, 
rpc.samr.machine.auth,
-   rpc.samr.priv,
+   rpc.samr.priv, rpc.samr.passwords.validate,
rpc.netlogon.admin,
rpc.schannel, rpc.schannel2, rpc.bench-schannel1, rpc.join, 
rpc.bind]
 
@@ -327,6 +327,9 @@ for t in tests:
 plansmbtorture4testsuite(t, s3dc, 'ncacn_ip_tcp:$SERVER_IP 
-U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
 plansmbtorture4testsuite(t, plugin_s4_dc, '//$SERVER_IP/tmp 
-U$USERNAME%$PASSWORD', 'over ncacn_np ')
 plansmbtorture4testsuite(t, plugin_s4_dc, 'ncacn_ip_tcp:$SERVER_IP 
-U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
+elif t == rpc.samr.passwords.validate:
+plansmbtorture4testsuite(t, s3dc, 'ncacn_ip_tcp:$SERVER_IP 
-U$USERNAME%$PASSWORD', 'over ncacn_ip_tcp ')
+plansmbtorture4testsuite(t, 

[SCM] Samba Shared Repository - branch master updated

2012-12-12 Thread Andreas Schneider
The branch, master has been updated
   via  c905379 tdb: Improve the documentation of tdb_reopen() and 
tdb_close().
   via  7f08365 tdb: Fix possible crash bugs in the python tdb code.
   via  d07a964 misc: Add a config for clang complete.
  from  34ac9d8 s4-selftest: make sure to test rpc.samr.passwords.validate 
over ncacn_ip_tcp.

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


- Log -
commit c9053796b389758e8bacff4cd37d633fd65171f9
Author: Andreas Schneider a...@samba.org
Date:   Tue Dec 11 17:11:58 2012 +0100

tdb: Improve the documentation of tdb_reopen() and tdb_close().

Reviewed-by: Simo Sorce i...@samba.org

Autobuild-User(master): Andreas Schneider a...@cryptomilk.org
Autobuild-Date(master): Wed Dec 12 14:58:50 CET 2012 on sn-devel-104

commit 7f08365a28770fdcc1bb625d8a16d11d8f15c29a
Author: Andreas Schneider a...@samba.org
Date:   Tue Dec 11 16:51:01 2012 +0100

tdb: Fix possible crash bugs in the python tdb code.

You can't call tdb_error() for tdb_reopen() or tdb_close(), both return
the error code of close(2) and not a TDB_ERROR!

Reviewed-by: Simo Sorce i...@samba.org
Reviewed-by: Jelmer Vernooij jel...@samba.org

commit d07a964fe25caaf796449fda9beda600990be650
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 15:06:57 2012 +0100

misc: Add a config for clang complete.

See https://github.com/Rip-Rip/clang_complete

---

Summary of changes:
 .clang_complete   |   99 +
 lib/tdb/include/tdb.h |   10 -
 lib/tdb/pytdb.c   |   17 +++-
 3 files changed, 122 insertions(+), 4 deletions(-)
 create mode 100644 .clang_complete


Changeset truncated at 500 lines:

diff --git a/.clang_complete b/.clang_complete
new file mode 100644
index 000..cd3a44b
--- /dev/null
+++ b/.clang_complete
@@ -0,0 +1,99 @@
+-DHAVE_CONFIG_H=1
+-D_GNU_SOURCE=1
+-D_XOPEN_SOURCE_EXTENDED=1
+-Ibin/default/auth -Iauth
+-Ibin/default/auth/credentials -Iauth/credentials
+-Ibin/default/auth/gensec -Iauth/gensec
+-Ibin/default/auth/kerberos -I/auth/kerberos
+-Ibin/default/auth/ntlmssp -Iauth/ntlmssp
+-Ibin/default/bin/default/source4/heimdal/lib/asn1
+-Ibin/default/dfs_server -Idfs_server
+-Ibin/default/dynconfig -Idynconfig
+-Ibin/default/include -Iinclude
+-Ibin/default/include/public
+-Ibin/default/lib
+-Ibin/default/lib/addns -Ilib/addns
+-Ibin/default/lib/async_req -Ilib/async_req
+-Ibin/default/lib/ccan -Ilib/ccan
+-Ibin/default/lib/compression -Ilib/compression
+-Ibin/default/lib/crypto -Ilib/crypto
+-Ibin/default/lib/dbwrap -Ilib/dbwrap
+-Ibin/default/lib/krb5_wrap -Ilib/krb5_wrap
+-Ibin/default/lib/ldb -Ilib/ldb
+-Ibin/default/lib/ldb-samba -Ilib/ldb-samba
+-Ibin/default/lib/ldb/include -Ilib/ldb/include
+-Ibin/default/lib/nss_wrapper -Ilib/nss_wrapper
+-Ibin/default/lib/param -Ilib/param
+-Ibin/default/lib/replace -Ilib/replace
+-Ibin/default/lib/smbconf -Ilib/smbconf
+-Ibin/default/lib/socket -Ilib/socket
+-Ibin/default/lib/socket_wrapper -Ilib/socket_wrapper
+-Ibin/default/lib/talloc -Ilib/talloc
+-Ibin/default/lib/tdb -Ilib/tdb
+-Ibin/default/lib/tdb/include -Ilib/tdb/include
+-Ibin/default/lib/tdb_compat -Ilib/tdb_compat
+-Ibin/default/lib/tevent -Ilib/tevent
+-Ibin/default/lib/tsocket -Ilib/tsocket
+-Ibin/default/lib/uid_wrapper -Ilib/uid_wrapper
+-Ibin/default/lib/util/charset -Ilib/util/charset
+-Ibin/default/libcli/auth -Ilibcli/auth
+-Ibin/default/libcli/cldap -Ilibcli/cldap
+-Ibin/default/libcli/dns -Ilibcli/dns
+-Ibin/default/libcli/drsuapi -Ilibcli/drsuapi
+-Ibin/default/libcli/ldap -Ilibcli/ldap
+-Ibin/default/libcli/lsarpc -Ilibcli/lsarpc
+-Ibin/default/libcli/named_pipe_auth -Ilibcli/named_pipe_auth
+-Ibin/default/libcli/nbt -Ilibcli/nbt
+-Ibin/default/libcli/netlogon -Ilibcli/netlogon
+-Ibin/default/libcli/registry -Ilibcli/registry
+-Ibin/default/libcli/security -Ilibcli/security
+-Ibin/default/libcli/smb -Ilibcli/smb
+-Ibin/default/libcli/util -Ilibcli/util
+-Ibin/default/libds/common -Ilibds/common
+-Ibin/default/librpc -Ilibrpc
+-Ibin/default/nsswitch -Insswitch
+-Ibin/default/nsswitch/libwbclient -Insswitch/libwbclient
+-Ibin/default/source3 -Isource3
+-Ibin/default/source3/auth -Isource3/auth
+-Ibin/default/source3/include -Isource3/include
+-Ibin/default/source3/lib -Isource3/lib
+-Ibin/default/source3/lib/asys -Isource3/lib/asys
+-Ibin/default/source3/lib/pthreadpool -Isource3/lib/pthreadpool
+-Ibin/default/source3/librpc -Isource3/librpc
+-Ibin/default/source3/modules -Isource3/modules
+-Ibin/default/source3/passdb -Isource3/passdb
+-Ibin/default/source3/rpc_server -Isource3/rpc_server
+-Ibin/default/source4 -Isource4
+-Ibin/default/source4/auth -Isource4/auth
+-Ibin/default/source4/auth/gensec -Isource4/auth/gensec
+-Ibin/default/source4/auth/kerberos -Isource4/auth/kerberos
+-Ibin/default/source4/dsdb 

[SCM] Samba Shared Repository - branch master updated

2012-12-12 Thread Günther Deschner
The branch, master has been updated
   via  a44e58a s3: Fix a typo in a debug message
   via  880b0f1 s3-printing: Correctly create the printing cache path.
   via  76ac4d9 s3-registry: Fix counters_directory() dir creation.
   via  7dd1350 s4-socket: Make sure unix socket addresses are null 
terminated.
   via  07385a8 s3-ctdb: Make sure addr.sun_path is null terminated.
   via  ef0a945 torture: Make sure we use the correct size for cxd.
   via  b4884dc s3-libsmb: Fix possible comparsion problems.
   via  b4accd3 s4-libcli: Fix comparison of chosen_oid.
   via  f670cae s3-utils: Correctly handle getenv() for the later system() 
call.
   via  34a1886 s4-client: Make sure we have a valid count if we goto 
cleanup.
   via  d55c6e7 s3-utils: Cleanup code in wait_replies().
   via  1dc414e nsswitch: Fix pam_get_{item,data} build warnings.
   via  de22df1 nsswitch: Remove unused variable in 
_pam_winbind_change_pwd().
   via  b8ed2ef nsswitch: Cleanup code in parse_wbinfo_domain_user().
   via  af18339 s4-libnet: Don't call talloc_get_type() for the same struct 
twice.
   via  3bcd14c s3-nmbd: Cleanup code to make it more readable.
   via  e5deaa2 s3-lib: Remove unsused variable from sys_get_nfs_quota().
   via  62646b7 winbind: Use talloc in resolve_username_to_alias().
   via  d862bbd winbind: Use talloc in resolve_alias_to_username().
  from  c905379 tdb: Improve the documentation of tdb_reopen() and 
tdb_close().

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


- Log -
commit a44e58a31ebecd6f467ffdac6645ffe6a313e9c6
Author: Volker Lendecke v...@samba.org
Date:   Wed Dec 12 12:55:45 2012 +0100

s3: Fix a typo in a debug message

Signed-off-by: Volker Lendecke v...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

Autobuild-User(master): Günther Deschner g...@samba.org
Autobuild-Date(master): Wed Dec 12 16:40:23 CET 2012 on sn-devel-104

commit 880b0f18bede936bafb806669ee4d160567e90bb
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 17:52:50 2012 +0100

s3-printing: Correctly create the printing cache path.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit 76ac4d923d7ea07ab13190217359ce283e925fac
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 17:45:15 2012 +0100

s3-registry: Fix counters_directory() dir creation.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit 7dd13503c0919766ecf3c8f5f48cda72aae8ac73
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 17:14:12 2012 +0100

s4-socket: Make sure unix socket addresses are null terminated.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit 07385a851f6c07c9f8ef4414d8483de7106ee486
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 17:07:24 2012 +0100

s3-ctdb: Make sure addr.sun_path is null terminated.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit ef0a945bf8e6310acb41f90a2179e61d412a61ea
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 17:06:39 2012 +0100

torture: Make sure we use the correct size for cxd.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit b4884dcff7362d585d93c3acf08e8c4835d918d0
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 15:11:23 2012 +0100

s3-libsmb: Fix possible comparsion problems.

This makes the code also easier to understand.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit b4accd365d4758f3f4453083c24c59615051d863
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 15:02:43 2012 +0100

s4-libcli: Fix comparison of chosen_oid.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit f670cae69d85a8bfc14ab7d9cd38ab0e568e6929
Author: Andreas Schneider a...@samba.org
Date:   Mon Dec 10 14:06:32 2012 +0100

s3-utils: Correctly handle getenv() for the later system() call.

The returned string of getenv() has an unknown size. You need to store
the result always in a char array with a certain size to make sure we
don't feed tainted data to the next function call.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit 34a18865d6d2acd05e93fc728510896e69449d79
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 18:04:41 2012 +0100

s4-client: Make sure we have a 

[SCM] Samba Shared Repository - branch master updated

2012-12-12 Thread Günther Deschner
The branch, master has been updated
   via  229d934 s4-libnet: Fix setting the group handle and return codes.
   via  bdc2f4b util: Remove unused fde_stdin in samba_runcmd.
   via  74fb61d s3-lib: Don't close the listener twice if we goto failed.
  from  a44e58a s3: Fix a typo in a debug message

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


- Log -
commit 229d934d2fb653e02b38d242bf01f199434cd1f3
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 14:45:24 2012 +0100

s4-libnet: Fix setting the group handle and return codes.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

Autobuild-User(master): Günther Deschner g...@samba.org
Autobuild-Date(master): Thu Dec 13 01:01:14 CET 2012 on sn-devel-104

commit bdc2f4bd91c3eb0ce0fa87d2d21668e064b106b6
Author: Andreas Schneider a...@samba.org
Date:   Wed Dec 12 19:15:58 2012 +0100

util: Remove unused fde_stdin in samba_runcmd.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

commit 74fb61d496348391a324fc69bb7b167597939d5b
Author: Andreas Schneider a...@samba.org
Date:   Thu Dec 6 11:11:15 2012 +0100

s3-lib: Don't close the listener twice if we goto failed.

Found by Coverity.

Signed-off-by: Andreas Schneider a...@samba.org
Reviewed-by: Günther Deschner g...@samba.org

---

Summary of changes:
 lib/util/util_runcmd.c|   27 +--
 source3/lib/sock_exec.c   |2 +-
 source4/libnet/groupman.c |   13 +
 3 files changed, 15 insertions(+), 27 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/util/util_runcmd.c b/lib/util/util_runcmd.c
index cc274c2..bc5cc10 100644
--- a/lib/util/util_runcmd.c
+++ b/lib/util/util_runcmd.c
@@ -33,7 +33,6 @@
 struct samba_runcmd_state {
int stdout_log_level;
int stderr_log_level;
-   struct tevent_fd *fde_stdin;
struct tevent_fd *fde_stdout;
struct tevent_fd *fde_stderr;
int fd_stdin, fd_stdout, fd_stderr;
@@ -50,6 +49,10 @@ static int samba_runcmd_state_destructor(struct 
samba_runcmd_state *state)
waitpid(state-pid, NULL, 0);
state-pid = -1;
}
+
+   if (state-fd_stdin != -1) {
+   close(state-fd_stdin);
+   }
return 0;
 }
 
@@ -85,6 +88,7 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
 
state-stdout_log_level = stdout_log_level;
state-stderr_log_level = stderr_log_level;
+   state-fd_stdin = -1;
 
state-arg0 = talloc_strdup(state, argv0[0]);
if (tevent_req_nomem(state-arg0, req)) {
@@ -149,7 +153,6 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
if (tevent_req_nomem(state-fde_stdout, req)) {
close(state-fd_stdout);
close(state-fd_stderr);
-   close(state-fd_stdin);
return tevent_req_post(req, ev);
}
tevent_fd_set_auto_close(state-fde_stdout);
@@ -161,22 +164,10 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
  req);
if (tevent_req_nomem(state-fde_stdout, req)) {
close(state-fd_stderr);
-   close(state-fd_stdin);
return tevent_req_post(req, ev);
}
tevent_fd_set_auto_close(state-fde_stderr);
 
-   state-fde_stdin = tevent_add_fd(ev, state,
-state-fd_stdin,
-0,
-samba_runcmd_io_handler,
-req);
-   if (tevent_req_nomem(state-fde_stdin, req)) {
-   close(state-fd_stdin);
-   return tevent_req_post(req, ev);
-   }
-   tevent_fd_set_auto_close(state-fde_stdin);
-
if (!timeval_is_zero(endtime)) {
tevent_req_set_endtime(req, ev, endtime);
}
@@ -251,14 +242,6 @@ static void samba_runcmd_io_handler(struct tevent_context 
*ev,
} else if (fde == state-fde_stderr) {
level = state-stderr_log_level;
fd = state-fd_stderr;
-   } else if (fde == state-fde_stdin) {
-   char c;
-   if (read(state-fd_stdin, c, 1) != 1) {
-   /* the child has closed its stdin */
-   talloc_free(fde);
-   state-fde_stdin = NULL;
-   return;
-   }
} else {
return;
}
diff