[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-430-g28c0a77
The branch, v3-2-test has been updated via 28c0a77ec1eb4bc69679c00dcdacaa6ee4d8e3f5 (commit) from 48a162b709cc14632fd02c4cd40aa8cfafc53324 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 28c0a77ec1eb4bc69679c00dcdacaa6ee4d8e3f5 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Dec 3 10:45:47 2007 +0100 Reformatting --- Summary of changes: source/utils/net.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/utils/net.c b/source/utils/net.c index ee671f6..dc4c9da 100644 --- a/source/utils/net.c +++ b/source/utils/net.c @@ -716,8 +716,10 @@ static int net_getdomainsid(int argc, const char **argv) fstring sid_str; if(!initialize_password_db(False, NULL)) { - DEBUG(0, (WARNING: Could not open passdb - domain sid may not reflect passdb\n - backend knowledge (such as the sid stored in LDAP)\n)); + DEBUG(0, (WARNING: Could not open passdb - domain sid may + not reflect passdb\n + backend knowledge (such as the sid stored in + LDAP)\n)); } /* first check to see if we can even access secrets, so we don't -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-431-gbbbeeba
The branch, v3-2-test has been updated via bbbeeba163f173d774937103a36560a4a4f49d4b (commit) from 28c0a77ec1eb4bc69679c00dcdacaa6ee4d8e3f5 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit bbbeeba163f173d774937103a36560a4a4f49d4b Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 11:07:27 2007 +0100 Actually implement reboot feature for net dom join/unjoin. Guenther --- Summary of changes: source/utils/net_dom.c | 81 --- source/utils/net_rpc.c |4 +- 2 files changed, 77 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source/utils/net_dom.c b/source/utils/net_dom.c index 79130a8..dc6bfb0 100644 --- a/source/utils/net_dom.c +++ b/source/utils/net_dom.c @@ -48,8 +48,11 @@ static int net_dom_unjoin(int argc, const char **argv) const char *password = NULL; uint32_t unjoin_flags = WKSSVC_JOIN_FLAGS_ACCOUNT_DELETE | WKSSVC_JOIN_FLAGS_JOIN_TYPE; + struct cli_state *cli = NULL; bool reboot = false; + NTSTATUS status; WERROR werr; + int ret = -1; int i; if (argc 1) { @@ -76,16 +79,47 @@ static int net_dom_unjoin(int argc, const char **argv) } } + if (reboot) { + status = net_make_ipc_connection_ex(opt_workgroup, server_name, + NULL, 0, cli); + if (!NT_STATUS_IS_OK(status)) { + return -1; + } + } + werr = NetUnjoinDomain(server_name, account, password, unjoin_flags); if (!W_ERROR_IS_OK(werr)) { printf(Failed to unjoin domain: %s\n, get_friendly_nt_error_msg(werror_to_ntstatus(werr))); - return -1; + goto done; + } + + if (reboot) { + opt_comment = Shutting down due to a domain membership change; + opt_reboot = true; + opt_timeout = 30; + + ret = run_rpc_command(cli, PI_INITSHUTDOWN, 0, + rpc_init_shutdown_internals, + argc, argv); + if (ret == 0) { + goto done; + } + + ret = run_rpc_command(cli, PI_WINREG, 0, + rpc_reg_shutdown_internals, + argc, argv); + goto done; } - /* reboot then */ + ret = 0; + + done: + if (cli) { + cli_shutdown(cli); + } - return 0; + return ret; } static int net_dom_join(int argc, const char **argv) @@ -97,8 +131,11 @@ static int net_dom_join(int argc, const char **argv) const char *password = NULL; uint32_t join_flags = WKSSVC_JOIN_FLAGS_ACCOUNT_CREATE | WKSSVC_JOIN_FLAGS_JOIN_TYPE; + struct cli_state *cli = NULL; bool reboot = false; + NTSTATUS status; WERROR werr; + int ret = -1; int i; if (argc 1) { @@ -141,6 +178,14 @@ static int net_dom_join(int argc, const char **argv) } } + if (reboot) { + status = net_make_ipc_connection_ex(opt_workgroup, server_name, + NULL, 0, cli); + if (!NT_STATUS_IS_OK(status)) { + return -1; + } + } + /* check if domain is a domain or a workgroup */ werr = NetJoinDomain(server_name, domain_name, account_ou, @@ -148,12 +193,35 @@ static int net_dom_join(int argc, const char **argv) if (!W_ERROR_IS_OK(werr)) { printf(Failed to join domain: %s\n, get_friendly_nt_error_msg(werror_to_ntstatus(werr))); - return -1; + goto done; + } + + if (reboot) { + opt_comment = Shutting down due to a domain membership change; + opt_reboot = true; + opt_timeout = 30; + + ret = run_rpc_command(cli, PI_INITSHUTDOWN, 0, + rpc_init_shutdown_internals, + argc, argv); + if (ret == 0) { + goto done; + } + + ret = run_rpc_command(cli, PI_WINREG, 0, + rpc_reg_shutdown_internals, + argc, argv); + goto done; } - /* reboot then */ + ret = 0; + + done: + if (cli) { + cli_shutdown(cli); + } - return 0; + return ret; }
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-432-g1d615e3
The branch, v3-2-test has been updated via 1d615e3ac397106f47c51ace36c01a8f6e1d5d13 (commit) from bbbeeba163f173d774937103a36560a4a4f49d4b (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 1d615e3ac397106f47c51ace36c01a8f6e1d5d13 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 12:42:17 2007 +0100 Reanimate rpcclient wkssvc command. Guenther --- Summary of changes: source/Makefile.in|1 + source/rpcclient/cmd_wkssvc.c | 97 +--- source/rpcclient/rpcclient.c |2 + 3 files changed, 35 insertions(+), 65 deletions(-) Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 4eea8f1..532290c 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -637,6 +637,7 @@ RPCCLIENT_OBJ1 = rpcclient/rpcclient.o rpcclient/cmd_lsarpc.o \ rpcclient/cmd_dfs.o \ rpcclient/cmd_ds.o rpcclient/cmd_echo.o \ rpcclient/cmd_shutdown.o rpcclient/cmd_test.o \ +rpcclient/cmd_wkssvc.o \ $(DISPLAY_SEC_OBJ) $(DISPLAY_DSDCINFO_OBJ) RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ diff --git a/source/rpcclient/cmd_wkssvc.c b/source/rpcclient/cmd_wkssvc.c index de5b298..4f4c364 100644 --- a/source/rpcclient/cmd_wkssvc.c +++ b/source/rpcclient/cmd_wkssvc.c @@ -1,85 +1,52 @@ -/* +/* Unix SMB/CIFS implementation. - NT Domain Authentication SMB / MSRPC client - Copyright (C) Andrew Tridgell 1994-1997 - Copyright (C) Luke Kenneth Casson Leighton 1996-1997 - + RPC pipe client + + Copyright (C) Günther Deschner 2007 + 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 IS NO LONGER USED - NEEDS REMOVAL. - #include includes.h +#include rpcclient.h -#define DEBUG_TESTING - -extern struct cli_state *smb_cli; - -extern FILE* out_hnd; - - -/ -workstation get info query -/ -void cmd_wks_query_info(struct client_info *info) +static WERROR cmd_wkssvc_wkstagetinfo(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + int argc, + const char **argv) { - fstring dest_wks; - fstring tmp; - WKS_INFO_100 ctr; - uint32 info_level = 100; - - bool res = True; - - memset((char *)ctr, '\0', sizeof(ctr)); - - fstrcpy(dest_wks, ); - fstrcat(dest_wks, info-dest_host); - strupper_m(dest_wks); - - if (next_token_nr(NULL, tmp, NULL, sizeof(tmp))) - { - info_level = (uint32)strtol(tmp, (char**)NULL, 10); + NTSTATUS status; + uint32_t level = 100; + union wkssvc_NetWkstaInfo info; + const char *server_name; + + server_name = cli-cli-desthost; + + status = rpccli_wkssvc_NetWkstaGetInfo(cli, mem_ctx, + server_name, + level, + info); + if (!NT_STATUS_IS_OK(status)) { + return ntstatus_to_werror(status); } - DEBUG(4,(cmd_wks_query_info: server:%s info level: %d\n, - dest_wks, info_level)); - - DEBUG(5, (cmd_wks_query_info: smb_cli-fd:%d\n, smb_cli-fd)); - - /* open LSARPC session. */ - res = res ? cli_nt_session_open(smb_cli, PI_WKSSVC) : False; - - /* send info level: receive requested info. hopefully. */ - res = res ? do_wks_query_info(smb_cli, - dest_wks, info_level, ctr) : False; - - /* close the session */ - cli_nt_session_close(smb_cli); - - if (res) - { - DEBUG(5,(cmd_wks_query_info: query succeeded\n)); + return WERR_OK; +} -#if 0 - display_wks_info_100(out_hnd, ACTION_HEADER , ctr); - display_wks_info_100(out_hnd, ACTION_ENUMERATE, ctr); - display_wks_info_100(out_hnd, ACTION_FOOTER , ctr); -#endif +struct cmd_set wkssvc_commands[] =
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-433-gba2a544
The branch, v3-2-test has been updated via ba2a544baf1e1cc3652512ed5df2bb408fa8bdfd (commit) from 1d615e3ac397106f47c51ace36c01a8f6e1d5d13 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit ba2a544baf1e1cc3652512ed5df2bb408fa8bdfd Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 14:06:22 2007 +0100 Add decode_wkssvc_join_password_buffer(). Guenther --- Summary of changes: source/libsmb/smbencrypt.c | 29 + 1 files changed, 29 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 6060669..8793fdc 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -730,3 +730,32 @@ void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx, data_blob_free(confounded_session_key); } + +void decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx, + struct wkssvc_PasswordBuffer *pwd_buf, + DATA_BLOB *session_key, + char **pwd) +{ + uint8_t buffer[516]; + struct MD5Context ctx; + uint32_t pwd_len; + + DATA_BLOB confounded_session_key = data_blob_talloc(mem_ctx, NULL, 16); + + int confounder_len = 8; + uint8_t confounder[8]; + + memcpy(confounder, pwd_buf-data[0], confounder_len); + memcpy(buffer, pwd_buf-data[8], 516); + + MD5Init(ctx); + MD5Update(ctx, session_key-data, session_key-length); + MD5Update(ctx, confounder, confounder_len); + MD5Final(confounded_session_key.data, ctx); + + SamOEMhashBlob(buffer, 516, confounded_session_key); + + decode_pw_buffer(mem_ctx, buffer, pwd, pwd_len, STR_UNICODE); + + data_blob_free(confounded_session_key); +} -- Samba Shared Repository
svn commit: samba r26247 - in branches/SAMBA_4_0: . source/scripting/python
Author: jelmer Date: 2007-12-03 13:33:58 + (Mon, 03 Dec 2007) New Revision: 26247 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26247 Log: Don't allow use of older SWIG versions. Added: branches/SAMBA_4_0/source/scripting/python/ac_pkg_swig.m4 Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/scripting/python/config.m4 Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:file-ids ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Added: branches/SAMBA_4_0/source/scripting/python/ac_pkg_swig.m4 === --- branches/SAMBA_4_0/source/scripting/python/ac_pkg_swig.m4 2007-12-03 07:03:52 UTC (rev 26246) +++ branches/SAMBA_4_0/source/scripting/python/ac_pkg_swig.m4 2007-12-03 13:33:58 UTC (rev 26247) @@ -0,0 +1,125 @@ +# http://autoconf-archive.cryp.to/ac_pkg_swig.html +# +# SYNOPSIS +# +# AC_PROG_SWIG([major.minor.micro]) +# +# DESCRIPTION +# +# This macro searches for a SWIG installation on your system. If +# found you should call SWIG via $(SWIG). You can use the optional +# first argument to check if the version of the available SWIG is +# greater than or equal to the value of the argument. It should have +# the format: N[.N[.N]] (N is a number between 0 and 999. Only the +# first N is mandatory.) +# +# If the version argument is given (e.g. 1.3.17), AC_PROG_SWIG checks +# that the swig package is this version number or higher. +# +# In configure.in, use as: +# +# AC_PROG_SWIG(1.3.17) +# SWIG_ENABLE_CXX +# SWIG_MULTI_MODULE_SUPPORT +# SWIG_PYTHON +# +# LAST MODIFICATION +# +# 2006-10-22 +# +# COPYLEFT +# +# Copyright (c) 2006 Sebastian Huber [EMAIL PROTECTED] +# Copyright (c) 2006 Alan W. Irwin [EMAIL PROTECTED] +# Copyright (c) 2006 Rafael Laboissiere [EMAIL PROTECTED] +# Copyright (c) 2006 Andrew Collier [EMAIL PROTECTED] +# +# 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 2 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, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# As a special exception, the respective Autoconf Macro's copyright +# owner gives unlimited permission to copy, distribute and modify the +# configure scripts that are the output of Autoconf when processing +# the Macro. You need not follow the terms of the GNU General Public +# License when using or distributing such scripts, even though +# portions of the text of the Macro appear in them. The GNU General +# Public License (GPL) does govern all other use of the material that +# constitutes the Autoconf Macro. +# +# This special exception to the GPL applies to versions of the +# Autoconf Macro released by the Autoconf Macro Archive. When you +# make and distribute a modified version of the Autoconf Macro, you +# may extend this special exception to the GPL to apply to your +# modified version as well. + +AC_DEFUN([AC_PROG_SWIG],[ +AC_PATH_PROG([SWIG],[swig]) +if test -z $SWIG ; then +AC_MSG_WARN([cannot find 'swig' program. You should look at http://www.swig.org]) +SWIG='no' +elif test -n $1 ; then +AC_MSG_CHECKING([for SWIG version]) +[swig_version=`$SWIG -version 21 | grep 'SWIG Version' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] +AC_MSG_RESULT([$swig_version]) +if test -n $swig_version ; then +# Calculate the required version number components +[required=$1] +[required_major=`echo $required | sed 's/[^0-9].*//'`] +if test -z $required_major ; then +[required_major=0] +fi +[required=`echo $required | sed 's/[0-9]*[^0-9]//'`] +[required_minor=`echo $required | sed 's/[^0-9].*//'`] +if test -z $required_minor ; then +[required_minor=0] +fi +[required=`echo $required | sed 's/[0-9]*[^0-9]//'`] +[required_patch=`echo $required | sed 's/[^0-9].*//'`] +if test
svn commit: samba r26248 - in branches/SAMBA_4_0: . source source/auth source/auth/credentials source/lib/events source/lib/ldb source/lib/registry source/lib/tdb source/libcli/security source/libcli/
Author: jelmer Date: 2007-12-03 13:48:09 + (Mon, 03 Dec 2007) New Revision: 26248 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26248 Log: Check in SWIG output so SWIG is not required when running out of svn. Added: branches/SAMBA_4_0/source/auth/auth.py branches/SAMBA_4_0/source/auth/auth_wrap.c branches/SAMBA_4_0/source/auth/credentials/credentials.py branches/SAMBA_4_0/source/auth/credentials/credentials_wrap.c branches/SAMBA_4_0/source/lib/events/events.py branches/SAMBA_4_0/source/lib/events/events_wrap.c branches/SAMBA_4_0/source/lib/ldb/ldb.py branches/SAMBA_4_0/source/lib/ldb/ldb_wrap.c branches/SAMBA_4_0/source/lib/registry/registry.py branches/SAMBA_4_0/source/lib/registry/registry_wrap.c branches/SAMBA_4_0/source/lib/tdb/tdb.py branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c branches/SAMBA_4_0/source/libcli/security/security.py branches/SAMBA_4_0/source/libcli/security/security_wrap.c branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.py branches/SAMBA_4_0/source/libcli/swig/libcli_nbt_wrap.c branches/SAMBA_4_0/source/libcli/swig/libcli_smb.py branches/SAMBA_4_0/source/libcli/swig/libcli_smb_wrap.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc.py branches/SAMBA_4_0/source/librpc/rpc/dcerpc_wrap.c branches/SAMBA_4_0/source/scripting/python/misc.py branches/SAMBA_4_0/source/scripting/python/misc_wrap.c Removed: branches/SAMBA_4_0/source/scripting/python/replace/ Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/.bzrignore branches/SAMBA_4_0/source/autogen.sh branches/SAMBA_4_0/source/scripting/python/config.m4 Changeset: Sorry, the patch is too large (45825 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26248
svn commit: samba r26251 - in branches/SAMBA_4_0: . source/lib/tdb
Author: jelmer Date: 2007-12-03 15:53:23 + (Mon, 03 Dec 2007) New Revision: 26251 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26251 Log: Fix include of stdint in tdb swig wrapper. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/tdb/tdb.i branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/tdb/tdb.i === --- branches/SAMBA_4_0/source/lib/tdb/tdb.i 2007-12-03 15:53:17 UTC (rev 26250) +++ branches/SAMBA_4_0/source/lib/tdb/tdb.i 2007-12-03 15:53:23 UTC (rev 26251) @@ -45,7 +45,8 @@ /* The tdb functions will crash if a NULL tdb context is passed */ -%include exception.i +%import exception.i +%import stdint.i %typemap(check) TDB_CONTEXT* { if ($1 == NULL) Modified: branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c === --- branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c2007-12-03 15:53:17 UTC (rev 26250) +++ branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c2007-12-03 15:53:23 UTC (rev 26251) @@ -2454,17 +2454,21 @@ - #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) - - /* TYPES TABLE (BEGIN) */ #define SWIGTYPE_p_TDB_DATA swig_types[0] #define SWIGTYPE_p_char swig_types[1] #define SWIGTYPE_p_int swig_types[2] -#define SWIGTYPE_p_tdb_context swig_types[3] -static swig_type_info *swig_types[5]; -static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0}; +#define SWIGTYPE_p_long_long swig_types[3] +#define SWIGTYPE_p_short swig_types[4] +#define SWIGTYPE_p_signed_char swig_types[5] +#define SWIGTYPE_p_tdb_context swig_types[6] +#define SWIGTYPE_p_unsigned_char swig_types[7] +#define SWIGTYPE_p_unsigned_int swig_types[8] +#define SWIGTYPE_p_unsigned_long_long swig_types[9] +#define SWIGTYPE_p_unsigned_short swig_types[10] +static swig_type_info *swig_types[12]; +static swig_module_info swig_module = {swig_types, 11, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(swig_module, swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(swig_module, swig_module, name) @@ -3606,26 +3610,54 @@ static swig_type_info _swigt__p_TDB_DATA = {_p_TDB_DATA, TDB_DATA *, 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_char = {_p_char, char *, 0, 0, (void*)0, 0}; -static swig_type_info _swigt__p_int = {_p_int, int *|mode_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {_p_int, intptr_t *|int *|int_least32_t *|int_fast32_t *|int32_t *|int_fast16_t *|mode_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_long_long = {_p_long_long, int_least64_t *|int_fast64_t *|int64_t *|long long *|intmax_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_short = {_p_short, short *|int_least16_t *|int16_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_signed_char = {_p_signed_char, signed char *|int_least8_t *|int_fast8_t *|int8_t *, 0, 0, (void*)0, 0}; static swig_type_info _swigt__p_tdb_context = {_p_tdb_context, struct tdb_context *|tdb *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {_p_unsigned_char, unsigned char *|uint_least8_t *|uint_fast8_t *|uint8_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {_p_unsigned_int, uintptr_t *|uint_least32_t *|uint_fast32_t *|uint32_t *|unsigned int *|uint_fast16_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_long_long = {_p_unsigned_long_long, uint_least64_t *|uint_fast64_t *|uint64_t *|unsigned long long *|uintmax_t *, 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {_p_unsigned_short, unsigned short *|uint_least16_t *|uint16_t *, 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { _swigt__p_TDB_DATA, _swigt__p_char, _swigt__p_int, + _swigt__p_long_long, + _swigt__p_short, + _swigt__p_signed_char, _swigt__p_tdb_context, + _swigt__p_unsigned_char, + _swigt__p_unsigned_int, + _swigt__p_unsigned_long_long, + _swigt__p_unsigned_short, }; static swig_cast_info _swigc__p_TDB_DATA[] = { {_swigt__p_TDB_DATA, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_char[] = { {_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_int[] = { {_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_long_long[] = { {_swigt__p_long_long, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_short[] = { {_swigt__p_short, 0, 0, 0},{0, 0, 0, 0}}; +static swig_cast_info _swigc__p_signed_char[] = { {_swigt__p_signed_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_tdb_context[] = {
svn commit: samba r26250 - in branches/SAMBA_4_0: . source/auth source/auth/gensec source/ldap_server source/param source/rpc_server source/smb_server source/smbd source/torture/libnet source/torture/
Author: jelmer Date: 2007-12-03 15:53:17 + (Mon, 03 Dec 2007) New Revision: 26250 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26250 Log: Avoid global_loadparm in a couple more places. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/auth_anonymous.c branches/SAMBA_4_0/source/auth/gensec/schannel.c branches/SAMBA_4_0/source/auth/sam.c branches/SAMBA_4_0/source/auth/session.c branches/SAMBA_4_0/source/ldap_server/ldap_server.c branches/SAMBA_4_0/source/param/secrets.c branches/SAMBA_4_0/source/param/secrets.h branches/SAMBA_4_0/source/param/share.c branches/SAMBA_4_0/source/param/share_classic.c branches/SAMBA_4_0/source/rpc_server/service_rpc.c branches/SAMBA_4_0/source/smb_server/smb_server.c branches/SAMBA_4_0/source/smbd/server.c branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c branches/SAMBA_4_0/source/torture/raw/lockbench.c branches/SAMBA_4_0/source/torture/raw/openbench.c branches/SAMBA_4_0/source/torture/rpc/drsuapi.c branches/SAMBA_4_0/source/torture/rpc/lsa.c branches/SAMBA_4_0/source/torture/rpc/samr.c branches/SAMBA_4_0/source/torture/rpc/testjoin.c branches/SAMBA_4_0/source/torture/smb2/getinfo.c branches/SAMBA_4_0/source/utils/ntlm_auth.c branches/SAMBA_4_0/source/winbind/wb_server.c Changeset: Sorry, the patch is too large (1303 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26250
svn commit: samba r26249 - in branches/SAMBA_4_0: . source/torture source/torture/basic source/torture/nbench source/torture/rap source/torture/raw source/torture/rpc source/utils
Author: jelmer Date: 2007-12-03 15:53:07 + (Mon, 03 Dec 2007) New Revision: 26249 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26249 Log: Remove a couple more uses of global_loadparm. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/torture/basic/base.c branches/SAMBA_4_0/source/torture/basic/delete.c branches/SAMBA_4_0/source/torture/basic/disconnect.c branches/SAMBA_4_0/source/torture/basic/misc.c branches/SAMBA_4_0/source/torture/basic/scanner.c branches/SAMBA_4_0/source/torture/nbench/nbench.c branches/SAMBA_4_0/source/torture/nbench/nbio.c branches/SAMBA_4_0/source/torture/rap/rap.c branches/SAMBA_4_0/source/torture/raw/eas.c branches/SAMBA_4_0/source/torture/raw/lockbench.c branches/SAMBA_4_0/source/torture/raw/notify.c branches/SAMBA_4_0/source/torture/raw/open.c branches/SAMBA_4_0/source/torture/raw/openbench.c branches/SAMBA_4_0/source/torture/raw/oplock.c branches/SAMBA_4_0/source/torture/raw/pingpong.c branches/SAMBA_4_0/source/torture/raw/samba3hide.c branches/SAMBA_4_0/source/torture/raw/samba3misc.c branches/SAMBA_4_0/source/torture/rpc/dfs.c branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c branches/SAMBA_4_0/source/torture/util_smb.c branches/SAMBA_4_0/source/utils/ntlm_auth.c Changeset: Sorry, the patch is too large (873 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26249
svn commit: samba r26252 - in branches/SAMBA_4_0: . source/auth source/auth/gensec source/dsdb/common source/dsdb/repl source/dsdb/samdb source/kdc source/ldap_server source/lib/ldb/tools source/ntptr
Author: jelmer Date: 2007-12-03 15:53:28 + (Mon, 03 Dec 2007) New Revision: 26252 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26252 Log: Specify loadparm_context explicitly when creating sessions. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/auth.i branches/SAMBA_4_0/source/auth/auth_sam.c branches/SAMBA_4_0/source/auth/auth_wrap.c branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c branches/SAMBA_4_0/source/auth/gensec/schannel_state.c branches/SAMBA_4_0/source/auth/sam.c branches/SAMBA_4_0/source/auth/system_session.c branches/SAMBA_4_0/source/dsdb/common/sidmap.c branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c branches/SAMBA_4_0/source/dsdb/samdb/cracknames.c branches/SAMBA_4_0/source/dsdb/samdb/samdb_privilege.c branches/SAMBA_4_0/source/kdc/hdb-ldb.c branches/SAMBA_4_0/source/kdc/kpasswdd.c branches/SAMBA_4_0/source/kdc/pac-glue.c branches/SAMBA_4_0/source/ldap_server/ldap_server.c branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c branches/SAMBA_4_0/source/ntptr/simple_ldb/ntptr_simple_ldb.c branches/SAMBA_4_0/source/param/share_ldb.c branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c branches/SAMBA_4_0/source/torture/auth/pac.c branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c branches/SAMBA_4_0/source/torture/nbt/dgram.c branches/SAMBA_4_0/source/torture/rpc/join.c branches/SAMBA_4_0/source/torture/rpc/rpc.c branches/SAMBA_4_0/source/torture/rpc/samlogon.c branches/SAMBA_4_0/source/torture/rpc/samr.c branches/SAMBA_4_0/source/torture/rpc/schannel.c branches/SAMBA_4_0/source/utils/net/net_vampire.c branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c Changeset: Sorry, the patch is too large (1196 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26252
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-437-ga3fbb53
The branch, v3-2-test has been updated via a3fbb5323222334c86c0dc360df8c6a39039bbe6 (commit) via 834a16225a8fb905a8f870a17ba67670e622eccc (commit) via 8ec10c4ab1aa890c9f03d34bd872c93ae5c4d84c (commit) via 07e6cfdc626c2778292e5b0b338a35046c482cf9 (commit) from ba2a544baf1e1cc3652512ed5df2bb408fa8bdfd (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit a3fbb5323222334c86c0dc360df8c6a39039bbe6 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Dec 3 16:52:44 2007 +0100 Remove workaround for broken capabilites.h from lib/system.c - now in lib/replace. Michael commit 834a16225a8fb905a8f870a17ba67670e622eccc Author: Michael Adam [EMAIL PROTECTED] Date: Mon Dec 3 16:50:55 2007 +0100 Reformat configure checks for broken capabilities.h. Michael commit 8ec10c4ab1aa890c9f03d34bd872c93ae5c4d84c Author: Michael Adam [EMAIL PROTECTED] Date: Mon Dec 3 16:43:51 2007 +0100 Move check for broken system capabilites.h headers to lib/replace. Michael commit 07e6cfdc626c2778292e5b0b338a35046c482cf9 Author: Michael Adam [EMAIL PROTECTED] Date: Mon Dec 3 16:42:08 2007 +0100 Add check for ppc statfs.h header to workaround for broken capabilities.h. Taken from s3:lib/system.c Michael --- Summary of changes: source/configure.in| 30 - source/lib/replace/system/capability.h |4 ++- source/lib/replace/system/config.m4| 38 source/lib/system.c| 18 --- 4 files changed, 41 insertions(+), 49 deletions(-) Changeset truncated at 500 lines: diff --git a/source/configure.in b/source/configure.in index b6cd77b..8a945a2 100644 --- a/source/configure.in +++ b/source/configure.in @@ -3227,36 +3227,6 @@ if test x$samba_cv_HAVE_STAT_ST_FLAGS = xyes; then [Whether the stat struct has a st_flags member]) fi -case $host_os in -*linux*) -AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ -AC_TRY_COMPILE([ -#ifdef HAVE_SYS_VFS_H -#include sys/vfs.h -#endif -#ifdef HAVE_SYS_CAPABILITY_H -#include sys/capability.h -#endif -],[int i;], - samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no,samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes)]) -if test x$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS = xyes; then - AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) -fi - -AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ -AC_TRY_COMPILE([ -#ifdef HAVE_SYS_CAPABILITY_H -#include sys/capability.h -#endif -#include linux/types.h -],[__s8 i;], - samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no,samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes)]) -if test x$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER = xyes; then - AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) -fi -;; -esac - AC_CACHE_CHECK([for broken nisplus include files],samba_cv_BROKEN_NISPLUS_INCLUDE_FILES,[ AC_TRY_COMPILE([ #include sys/types.h diff --git a/source/lib/replace/system/capability.h b/source/lib/replace/system/capability.h index b314237..a7b78f0 100644 --- a/source/lib/replace/system/capability.h +++ b/source/lib/replace/system/capability.h @@ -27,8 +27,9 @@ #ifdef HAVE_SYS_CAPABILITY_H -#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) !defined(_I386_STATFS_H) +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) !defined(_I386_STATFS_H) !defined(_PPC_STATFS_H) #define _I386_STATFS_H +#define _PPC_STATFS_H #define BROKEN_REDHAT_7_STATFS_WORKAROUND #endif @@ -44,6 +45,7 @@ #endif #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _PPC_STATFS_H #undef _I386_STATFS_H #undef BROKEN_REDHAT_7_STATFS_WORKAROUND #endif diff --git a/source/lib/replace/system/config.m4 b/source/lib/replace/system/config.m4 index 6500535..799187a 100644 --- a/source/lib/replace/system/config.m4 +++ b/source/lib/replace/system/config.m4 @@ -16,6 +16,44 @@ AC_HEADER_SYS_WAIT # capability AC_CHECK_HEADERS(sys/capability.h) +case $host_os in +*linux*) +AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_VFS_H + #include sys/vfs.h + #endif + #ifdef HAVE_SYS_CAPABILITY_H + #include sys/capability.h + #endif + ],[ + int i; + ], + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes +)]) +if test x$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS = xyes; then + AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) +fi + +AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_CAPABILITY_H +
svn commit: samba r26254 - in branches/SAMBA_4_0/source/lib/replace/system: .
Author: obnox Date: 2007-12-03 16:32:28 + (Mon, 03 Dec 2007) New Revision: 26254 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26254 Log: Add check for PPC statfs.h to workaround for broken capability.h. Synced from Samba3. Michael Modified: branches/SAMBA_4_0/source/lib/replace/system/capability.h Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/system/capability.h === --- branches/SAMBA_4_0/source/lib/replace/system/capability.h 2007-12-03 16:29:54 UTC (rev 26253) +++ branches/SAMBA_4_0/source/lib/replace/system/capability.h 2007-12-03 16:32:28 UTC (rev 26254) @@ -27,14 +27,16 @@ #ifdef HAVE_SYS_CAPABILITY_H -#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) !defined(_I386_STATFS_H) +#if defined(BROKEN_REDHAT_7_SYSTEM_HEADERS) !defined(_I386_STATFS_H) !defined(_PPC_STATFS_H) #define _I386_STATFS_H +#define _PPC_STATFS_H #define BROKEN_REDHAT_7_STATFS_WORKAROUND #endif #include sys/capability.h #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND +#undef _PPC_STATFS_H #undef _I386_STATFS_H #undef BROKEN_REDHAT_7_STATFS_WORKAROUND #endif
svn commit: samba r26253 - in branches/SAMBA_4_0/source/lib/replace/system: .
Author: obnox Date: 2007-12-03 16:29:54 + (Mon, 03 Dec 2007) New Revision: 26253 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26253 Log: Add check for broken RedHat 7.2 system header files to lib/replace. This is taken (with slight reformatting) from samba3:configure.in. It is already used in lib/replace/system/capablity.h. Michael Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-12-03 15:53:28 UTC (rev 26252) +++ branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-12-03 16:29:54 UTC (rev 26253) @@ -16,6 +16,28 @@ # capability AC_CHECK_HEADERS(sys/capability.h) +case $host_os in +*linux*) +AC_CACHE_CHECK([for broken RedHat 7.2 system header files],samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_VFS_H + #include sys/vfs.h + #endif + #ifdef HAVE_SYS_CAPABILITY_H + #include sys/capability.h + #endif + ],[ + int i; + ], + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=no, + samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS=yes +)]) +if test x$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS = xyes; then + AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) +fi +;; +esac + # passwd AC_CHECK_HEADERS(grp.h sys/id.h compat.h shadow.h sys/priv.h pwd.h sys/security.h) AC_CHECK_FUNCS(getpwnam_r getpwuid_r getpwent_r)
svn commit: samba r26255 - in branches/SAMBA_4_0/source/lib/replace/system: .
Author: obnox Date: 2007-12-03 16:46:45 + (Mon, 03 Dec 2007) New Revision: 26255 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26255 Log: Work around another broken aspect of sys/capability.h on RHEL5. This is synced from samba3 v3-2-test/11bcdf780e164659b89: The /usr/include/sys/capability.h defines _LINUX_TYPES_H which prevents /usr/include/linux/types.h from being parsed (when included afterwards). Thus certain types are undefined that are for instance needed in /usr/include/linux/dqblk_xfs.h. This breaks the build of lib/sysquotas_xfs.c in Samba3. This commit adds a configure check and a workaround for this. Michael Modified: branches/SAMBA_4_0/source/lib/replace/system/capability.h branches/SAMBA_4_0/source/lib/replace/system/config.m4 Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/system/capability.h === --- branches/SAMBA_4_0/source/lib/replace/system/capability.h 2007-12-03 16:32:28 UTC (rev 26254) +++ branches/SAMBA_4_0/source/lib/replace/system/capability.h 2007-12-03 16:46:45 UTC (rev 26255) @@ -33,8 +33,17 @@ #define BROKEN_REDHAT_7_STATFS_WORKAROUND #endif +#if defined(BROKEN_RHEL5_SYS_CAP_HEADER) !defined(_LINUX_TYPES_H) +#define BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#endif + #include sys/capability.h +#ifdef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#undef _LINUX_TYPES_H +#undef BROKEN_RHEL5_SYS_CAP_HEADER_WORKAROUND +#endif + #ifdef BROKEN_REDHAT_7_STATFS_WORKAROUND #undef _PPC_STATFS_H #undef _I386_STATFS_H Modified: branches/SAMBA_4_0/source/lib/replace/system/config.m4 === --- branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-12-03 16:32:28 UTC (rev 26254) +++ branches/SAMBA_4_0/source/lib/replace/system/config.m4 2007-12-03 16:46:45 UTC (rev 26255) @@ -35,6 +35,22 @@ if test x$samba_cv_BROKEN_REDHAT_7_SYSTEM_HEADERS = xyes; then AC_DEFINE(BROKEN_REDHAT_7_SYSTEM_HEADERS,1,[Broken RedHat 7.2 system header files]) fi + +AC_CACHE_CHECK([for broken RHEL5 sys/capability.h],samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER,[ +AC_TRY_COMPILE([ + #ifdef HAVE_SYS_CAPABILITY_H + #include sys/capability.h + #endif + #include linux/types.h + ],[ + __s8 i; + ], + samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=no, + samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER=yes +)]) +if test x$samba_cv_BROKEN_RHEL5_SYS_CAP_HEADER = xyes; then + AC_DEFINE(BROKEN_RHEL5_SYS_CAP_HEADER,1,[Broken RHEL5 sys/capability.h]) +fi ;; esac
svn commit: samba r26256 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
Author: gd Date: 2007-12-03 16:49:45 + (Mon, 03 Dec 2007) New Revision: 26256 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26256 Log: When generating Samba3 pidl output for WERROR based functions, make sure the client caller can retrieve the WERROR. Jelmer, no idea how to add a test for that... Guenther Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2007-12-03 16:46:45 UTC (rev 26255) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2007-12-03 16:49:45 UTC (rev 26256) @@ -46,6 +46,11 @@ foreach (@{$fn-{ELEMENTS}}) { $defargs .= , . DeclLong($_); } + + if ($fn-{RETURN_TYPE} eq WERROR) { + $defargs .= , WERROR *werror; + } + $self-fn_declare(NTSTATUS rpccli_$fn-{NAME}(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx$defargs)); $self-pidl({); $self-indent; @@ -123,6 +128,12 @@ } elsif ($fn-{RETURN_TYPE} eq NTSTATUS) { $self-pidl(return r.out.result;); } elsif ($fn-{RETURN_TYPE} eq WERROR) { + $self-pidl(if (werror) {); + $self-indent; + $self-pidl(*werror = r.out.result;); + $self-deindent; + $self-pidl(}); + $self-pidl(); $self-pidl(return werror_to_ntstatus(r.out.result);); } else { warning($fn-{ORIGINAL}, Unable to convert $fn-{RETURN_TYPE} to NTSTATUS);
svn commit: samba r26257 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
Author: gd Date: 2007-12-03 17:00:10 + (Mon, 03 Dec 2007) New Revision: 26257 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26257 Log: Get rid of uninitialized value warning in the samba3 pidl generator. Jelmer, please check. Guenther Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2007-12-03 16:49:45 UTC (rev 26256) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm 2007-12-03 17:00:10 UTC (rev 26257) @@ -47,7 +47,7 @@ $defargs .= , . DeclLong($_); } - if ($fn-{RETURN_TYPE} eq WERROR) { + if (defined($fn-{RETURN_TYPE}) ($fn-{RETURN_TYPE} eq WERROR)) { $defargs .= , WERROR *werror; }
svn commit: samba r26262 - in branches/SAMBA_4_0: . source/pidl/tests
Author: jelmer Date: 2007-12-03 17:51:50 + (Mon, 03 Dec 2007) New Revision: 26262 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26262 Log: Add test for WERROR return code handling for Samba 3 client code. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl === --- branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl 2007-12-03 17:51:44 UTC (rev 26261) +++ branches/SAMBA_4_0/source/pidl/tests/samba3-cli.pl 2007-12-03 17:51:50 UTC (rev 26262) @@ -4,7 +4,7 @@ use strict; use warnings; -use Test::More tests = 7; +use Test::More tests = 8; use FindBin qw($RealBin); use lib $RealBin; use Util; @@ -59,3 +59,42 @@ } ); + +$x = new Parse::Pidl::Samba3::ClientNDR(); + +$fn = { NAME = bar, ELEMENTS = [ ], RETURN_TYPE = WERROR }; +$x-ParseFunction(foo, $fn); +is($x-{res}, NTSTATUS rpccli_bar(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) +{ +\tstruct bar r; +\tNTSTATUS status; +\t +\t/* In parameters */ +\t +\tif (DEBUGLEVEL = 10) +\t\tNDR_PRINT_IN_DEBUG(bar, r); +\t +\tstatus = cli_do_rpc_ndr(cli, mem_ctx, PI_FOO, ndr_table_foo, NDR_BAR, r); +\t +\tif (!NT_STATUS_IS_OK(status)) { +\t\treturn status; +\t} +\t +\tif (DEBUGLEVEL = 10) +\t\tNDR_PRINT_OUT_DEBUG(bar, r); +\t +\tif (NT_STATUS_IS_ERR(status)) { +\t\treturn status; +\t} +\t +\t/* Return variables */ +\t +\t/* Return result */ +\tif (werror) { +\t\t*werror = r.out.result; +\t} +\t +\treturn werror_to_ntstatus(r.out.result); +} + +);
svn commit: samba r26260 - in branches/SAMBA_4_0: . source/auth source/auth/gensec source/auth/ntlmssp source/cldap_server source/kdc source/ldap_server source/libcli/ldap source/libcli/smb2 source/li
Author: jelmer Date: 2007-12-03 17:41:50 + (Mon, 03 Dec 2007) New Revision: 26260 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26260 Log: Store loadparm context in gensec context. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/gensec/cyrus_sasl.c branches/SAMBA_4_0/source/auth/gensec/gensec.c branches/SAMBA_4_0/source/auth/gensec/gensec.h branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c branches/SAMBA_4_0/source/auth/gensec/schannel.c branches/SAMBA_4_0/source/auth/gensec/spnego.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c branches/SAMBA_4_0/source/auth/session.c branches/SAMBA_4_0/source/cldap_server/cldap_server.c branches/SAMBA_4_0/source/kdc/kpasswdd.c branches/SAMBA_4_0/source/ldap_server/ldap_bind.c branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c branches/SAMBA_4_0/source/libcli/smb2/session.c branches/SAMBA_4_0/source/libcli/smb_composite/sesssetup.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c branches/SAMBA_4_0/source/nbt_server/nbt_server.c branches/SAMBA_4_0/source/param/loadparm.c branches/SAMBA_4_0/source/rpc_server/common/server_info.c branches/SAMBA_4_0/source/rpc_server/dcesrv_auth.c branches/SAMBA_4_0/source/smb_server/smb/negprot.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c branches/SAMBA_4_0/source/smb_server/smb2/negprot.c branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c branches/SAMBA_4_0/source/smbd/process_standard.c branches/SAMBA_4_0/source/torture/auth/ntlmssp.c branches/SAMBA_4_0/source/torture/masktest.c branches/SAMBA_4_0/source/torture/smbtorture.c branches/SAMBA_4_0/source/utils/ntlm_auth.c Changeset: Sorry, the patch is too large (976 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26260
svn commit: samba r26258 - in branches/SAMBA_4_0: . source/auth/gensec source/auth/ntlmssp
Author: jelmer Date: 2007-12-03 17:41:37 + (Mon, 03 Dec 2007) New Revision: 26258 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26258 Log: Use loadparm context in client_start function of gensec. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/gensec/cyrus_sasl.c branches/SAMBA_4_0/source/auth/gensec/gensec.c branches/SAMBA_4_0/source/auth/gensec/gensec.h branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c branches/SAMBA_4_0/source/auth/gensec/schannel.c branches/SAMBA_4_0/source/auth/gensec/spnego.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_client.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/gensec/cyrus_sasl.c === --- branches/SAMBA_4_0/source/auth/gensec/cyrus_sasl.c 2007-12-03 17:00:10 UTC (rev 26257) +++ branches/SAMBA_4_0/source/auth/gensec/cyrus_sasl.c 2007-12-03 17:41:37 UTC (rev 26258) @@ -112,7 +112,7 @@ return 0; } -static NTSTATUS gensec_sasl_client_start(struct gensec_security *gensec_security) +static NTSTATUS gensec_sasl_client_start(struct gensec_security *gensec_security, struct loadparm_context *lp_ctx) { struct gensec_sasl_state *gensec_sasl_state; const char *service = gensec_get_target_service(gensec_security); Modified: branches/SAMBA_4_0/source/auth/gensec/gensec.c === --- branches/SAMBA_4_0/source/auth/gensec/gensec.c 2007-12-03 17:00:10 UTC (rev 26257) +++ branches/SAMBA_4_0/source/auth/gensec/gensec.c 2007-12-03 17:41:37 UTC (rev 26258) @@ -603,7 +603,7 @@ switch (gensec_security-gensec_role) { case GENSEC_CLIENT: if (gensec_security-ops-client_start) { - status = gensec_security-ops-client_start(gensec_security); + status = gensec_security-ops-client_start(gensec_security, global_loadparm); if (!NT_STATUS_IS_OK(status)) { DEBUG(2, (Failed to start GENSEC client mech %s: %s\n, gensec_security-ops-name, nt_errstr(status))); Modified: branches/SAMBA_4_0/source/auth/gensec/gensec.h === --- branches/SAMBA_4_0/source/auth/gensec/gensec.h 2007-12-03 17:00:10 UTC (rev 26257) +++ branches/SAMBA_4_0/source/auth/gensec/gensec.h 2007-12-03 17:41:37 UTC (rev 26258) @@ -75,12 +75,15 @@ } callback; }; +struct loadparm_context; + struct gensec_security_ops { const char *name; const char *sasl_name; uint8_t auth_type; /* 0 if not offered on DCE-RPC */ const char **oid; /* NULL if not offered by SPNEGO */ - NTSTATUS (*client_start)(struct gensec_security *gensec_security); + NTSTATUS (*client_start)(struct gensec_security *gensec_security, +struct loadparm_context *lp_ctx); NTSTATUS (*server_start)(struct gensec_security *gensec_security); /** Determine if a packet has the right 'magic' for this mechanism Modified: branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c === --- branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c 2007-12-03 17:00:10 UTC (rev 26257) +++ branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c 2007-12-03 17:41:37 UTC (rev 26258) @@ -298,7 +298,7 @@ return nt_status; } -static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_security) +static NTSTATUS gensec_gssapi_client_start(struct gensec_security *gensec_security, struct loadparm_context *lp_ctx) { struct gensec_gssapi_state *gensec_gssapi_state; struct cli_credentials *creds = gensec_get_credentials(gensec_security); @@ -324,7 +324,7 @@ return NT_STATUS_INVALID_PARAMETER; } - nt_status = gensec_gssapi_start(gensec_security, global_loadparm); + nt_status = gensec_gssapi_start(gensec_security, lp_ctx); if (!NT_STATUS_IS_OK(nt_status)) { return nt_status; } @@ -334,7 +334,7 @@ gensec_gssapi_state-gss_oid = gss_mech_krb5; principal = gensec_get_target_principal(gensec_security); - if (principal lp_client_use_spnego_principal(global_loadparm)) { + if (principal lp_client_use_spnego_principal(lp_ctx)) { name_type = GSS_C_NULL_OID; } else { principal = talloc_asprintf(gensec_gssapi_state, [EMAIL PROTECTED], @@ -380,11 +380,11 @@
svn commit: samba r26259 - in branches/SAMBA_4_0: . source/lib/charset
Author: jelmer Date: 2007-12-03 17:41:46 + (Mon, 03 Dec 2007) New Revision: 26259 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26259 Log: Provide convert_string_talloc() variant that works directly with an iconv handle. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/charset/charcnv.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/charset/charcnv.c === --- branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-03 17:41:37 UTC (rev 26258) +++ branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-03 17:41:46 UTC (rev 26259) @@ -60,7 +60,7 @@ /** re-initialize iconv conversion descriptors **/ -_PUBLIC_ void init_iconv(void) +_PUBLIC_ void close_iconv(void) { unsigned c1, c2; for (c1=0;c1NUM_CHARSETS;c1++) { @@ -79,7 +79,8 @@ /* on-demand initialisation of conversion handles */ -static smb_iconv_t get_conv_handle(charset_t from, charset_t to) +static smb_iconv_t get_conv_handle(struct loadparm_context *lp_ctx, + charset_t from, charset_t to) { const char *n1, *n2; static int initialised; @@ -98,27 +99,27 @@ setlocale(LC_ALL, C); #endif - atexit(init_iconv); + atexit(close_iconv); } if (conv_handles[from][to]) { return conv_handles[from][to]; } - n1 = charset_name(global_loadparm, from); - n2 = charset_name(global_loadparm, to); + n1 = charset_name(lp_ctx, from); + n2 = charset_name(lp_ctx, to); conv_handles[from][to] = smb_iconv_open(n2,n1); if (conv_handles[from][to] == (smb_iconv_t)-1) { if ((from == CH_DOS || to == CH_DOS) - strcasecmp(charset_name(global_loadparm, CH_DOS), ASCII) != 0) { + strcasecmp(charset_name(lp_ctx, CH_DOS), ASCII) != 0) { DEBUG(0,(dos charset '%s' unavailable - using ASCII\n, -charset_name(global_loadparm, CH_DOS))); - lp_set_cmdline(global_loadparm, dos charset, ASCII); +charset_name(lp_ctx, CH_DOS))); + lp_set_cmdline(lp_ctx, dos charset, ASCII); - n1 = charset_name(global_loadparm, from); - n2 = charset_name(global_loadparm, to); + n1 = charset_name(lp_ctx, from); + n2 = charset_name(lp_ctx, to); conv_handles[from][to] = smb_iconv_open(n2,n1); } @@ -150,7 +151,7 @@ if (srclen == (size_t)-1) srclen = strlen(inbuf)+1; - descriptor = get_conv_handle(from, to); + descriptor = get_conv_handle(global_loadparm, from, to); if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) { /* conversion not supported, use as is */ @@ -189,40 +190,16 @@ } return destlen-o_len; } - -/** - * Convert between character sets, allocating a new buffer using talloc for the result. - * - * @param srclen length of source buffer. - * @param dest always set at least to NULL - * @note -1 is not accepted for srclen. - * - * @returns Size in bytes of the converted string; or -1 in case of error. - **/ - -_PUBLIC_ ssize_t convert_string_talloc(TALLOC_CTX *ctx, charset_t from, charset_t to, - void const *src, size_t srclen, void **dest) + +_PUBLIC_ ssize_t convert_string_talloc_descriptor(TALLOC_CTX *ctx, smb_iconv_t descriptor, void const *src, size_t srclen, void **dest) { size_t i_len, o_len, destlen; size_t retval; const char *inbuf = (const char *)src; char *outbuf, *ob; - smb_iconv_t descriptor; *dest = NULL; - if (src == NULL || srclen == (size_t)-1 || srclen == 0) - return (size_t)-1; - - descriptor = get_conv_handle(from, to); - - if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) { - /* conversion not supported, return -1*/ - DEBUG(3, (convert_string_talloc: conversion from %s to %s not supported!\n, - charset_name(global_loadparm, from), charset_name(global_loadparm, to))); - return -1; - } - /* it is _very_ rare that a conversion increases the size by more than 3x */ destlen = srclen; @@ -273,6 +250,38 @@ } /** + * Convert between character sets, allocating a new buffer using talloc for the result. + * + * @param srclen length of source buffer. + * @param dest always set at least to NULL + * @note -1
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-444-gde2fdc6
The branch, v3-2-test has been updated via de2fdc6b5a78932f8ea5cf4c4715296f18dae4d3 (commit) via b734cd8aab163d794b969c4e1e721e81a8b4d44c (commit) via 0a8759d0118715ef1546ae5fc404a26f874f2d80 (commit) via 91bf2ac1af66acd8bcc831e758b3765fc94b2485 (commit) via 677d9e6d86997a1ae10266e9bab3b18c3fdd2890 (commit) via 8a1b306b826c75dde9caadc93b022bfa9bf3c4e3 (commit) via 298b0ce951f02705c5660a4171f7cc208de7a1db (commit) from a3fbb5323222334c86c0dc360df8c6a39039bbe6 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit de2fdc6b5a78932f8ea5cf4c4715296f18dae4d3 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:40:36 2007 +0100 Fix shutdown callers. Guenther commit b734cd8aab163d794b969c4e1e721e81a8b4d44c Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:40:09 2007 +0100 Fix wkssvc callers. Guenther commit 0a8759d0118715ef1546ae5fc404a26f874f2d80 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:36:25 2007 +0100 Fix dfs callers. Guenther commit 91bf2ac1af66acd8bcc831e758b3765fc94b2485 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:25:13 2007 +0100 Fix svcctl callers. Guenther commit 677d9e6d86997a1ae10266e9bab3b18c3fdd2890 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:21:40 2007 +0100 Fix winreg callers. Guenther commit 8a1b306b826c75dde9caadc93b022bfa9bf3c4e3 Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:20:02 2007 +0100 Forgot header in previous commit. Guenther commit 298b0ce951f02705c5660a4171f7cc208de7a1db Author: Günther Deschner [EMAIL PROTECTED] Date: Mon Dec 3 18:19:20 2007 +0100 Regenerate pidl rpc client calls that are WERROR based. Guenther --- Summary of changes: source/lib/netapi/joindomain.c |9 +- source/librpc/gen_ndr/cli_dfs.c | 132 ++-- source/librpc/gen_ndr/cli_dfs.h | 44 ++-- source/librpc/gen_ndr/cli_initshutdown.c | 18 ++- source/librpc/gen_ndr/cli_initshutdown.h |6 +- source/librpc/gen_ndr/cli_netlogon.c | 174 +--- source/librpc/gen_ndr/cli_netlogon.h | 58 +++--- source/librpc/gen_ndr/cli_srvsvc.c | 324 +- source/librpc/gen_ndr/cli_srvsvc.h | 108 +- source/librpc/gen_ndr/cli_svcctl.c | 264 source/librpc/gen_ndr/cli_svcctl.h | 88 source/librpc/gen_ndr/cli_winreg.c | 210 source/librpc/gen_ndr/cli_winreg.h | 70 source/librpc/gen_ndr/cli_wkssvc.c | 186 ++--- source/librpc/gen_ndr/cli_wkssvc.h | 62 +++--- source/rpc_client/cli_reg.c | 10 +- source/rpcclient/cmd_dfs.c | 98 + source/rpcclient/cmd_wkssvc.c|6 +- source/utils/net_rpc.c | 15 +- source/utils/net_rpc_registry.c | 57 +++--- source/utils/net_rpc_service.c | 20 +- 21 files changed, 1423 insertions(+), 536 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/netapi/joindomain.c b/source/lib/netapi/joindomain.c index f6944e4..2107631 100644 --- a/source/lib/netapi/joindomain.c +++ b/source/lib/netapi/joindomain.c @@ -89,14 +89,12 @@ WERROR NetJoinDomain(const char *server_name, server_name, domain_name, account_ou, Account, encrypted_password, - join_flags); + join_flags, werr); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; } - werr = WERR_OK; - done: if (cli) { cli_set_timeout(cli, old_timeout); @@ -166,14 +164,13 @@ WERROR NetUnjoinDomain(const char *server_name, server_name, account, encrypted_password, -unjoin_flags); +unjoin_flags, +werr); if (!NT_STATUS_IS_OK(status)) { werr = ntstatus_to_werror(status); goto done; } - werr = WERR_OK; - done: if (cli) { cli_set_timeout(cli, old_timeout); diff --git a/source/librpc/gen_ndr/cli_dfs.c b/source/librpc/gen_ndr/cli_dfs.c index 154ceff..fda0460 100644 ---
svn commit: samba r26261 - in branches/SAMBA_4_0: . source/librpc/ndr
Author: jelmer Date: 2007-12-03 17:51:44 + (Mon, 03 Dec 2007) New Revision: 26261 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26261 Log: Use enum type. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c 2007-12-03 17:41:50 UTC (rev 26260) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_string.c 2007-12-03 17:51:44 UTC (rev 26261) @@ -31,7 +31,7 @@ uint32_t len1, ofs, len2; uint16_t len3; int ret; - int chset = CH_UTF16; + charset_t chset = CH_UTF16; unsigned byte_mul = 2; unsigned flags = ndr-flags; unsigned c_len_term = 0;
svn commit: samba r26263 - in branches/SAMBA_4_0: . source/lib/registry
Author: jelmer Date: 2007-12-03 17:58:04 + (Mon, 03 Dec 2007) New Revision: 26263 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26263 Log: Don't assume CH_UNIX is CH_UTF8. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/registry/ldb.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/registry/ldb.c === --- branches/SAMBA_4_0/source/lib/registry/ldb.c2007-12-03 17:51:50 UTC (rev 26262) +++ branches/SAMBA_4_0/source/lib/registry/ldb.c2007-12-03 17:58:04 UTC (rev 26263) @@ -85,7 +85,7 @@ switch (type) { case REG_SZ: case REG_EXPAND_SZ: - val.length = convert_string_talloc(mem_ctx, CH_UTF16, CH_UTF8, + val.length = convert_string_talloc(mem_ctx, CH_UTF16, CH_UNIX, (void *)data.data, data.length, (void **)val.data);
svn commit: samba r26264 - in branches/SAMBA_4_0: . source/auth source/auth/gensec source/auth/ntlmssp source/client source/lib/charset/tests source/libcli source/libcli/raw source/libcli/resolve sour
Author: jelmer Date: 2007-12-03 18:47:35 + (Mon, 03 Dec 2007) New Revision: 26264 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26264 Log: pass name resolve order explicitly, use torture context for settings in dssync tests. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/auth_server.c branches/SAMBA_4_0/source/auth/auth_simple.c branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c branches/SAMBA_4_0/source/auth/session.c branches/SAMBA_4_0/source/client/cifsdd.c branches/SAMBA_4_0/source/lib/charset/tests/iconv.c branches/SAMBA_4_0/source/libcli/finddcs.c branches/SAMBA_4_0/source/libcli/raw/clisocket.c branches/SAMBA_4_0/source/libcli/resolve/resolve.c branches/SAMBA_4_0/source/libnet/libnet_site.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_nbt.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c branches/SAMBA_4_0/source/torture/ldap/cldapbench.c branches/SAMBA_4_0/source/torture/nbt/dgram.c branches/SAMBA_4_0/source/torture/nbt/nbt.c branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Sorry, the patch is too large (546 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26264
svn commit: samba r26265 - in branches/SAMBA_4_0: . source/nbt_server source/rpc_server
Author: jelmer Date: 2007-12-03 18:47:42 + (Mon, 03 Dec 2007) New Revision: 26265 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26265 Log: Use task-provided loadparm context in nbt and rpc servers. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/nbt_server/interfaces.c branches/SAMBA_4_0/source/nbt_server/nbt_server.c branches/SAMBA_4_0/source/rpc_server/service_rpc.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/nbt_server/interfaces.c === --- branches/SAMBA_4_0/source/nbt_server/interfaces.c 2007-12-03 18:47:35 UTC (rev 26264) +++ branches/SAMBA_4_0/source/nbt_server/interfaces.c 2007-12-03 18:47:42 UTC (rev 26265) @@ -98,6 +98,7 @@ start listening on the given address */ static NTSTATUS nbtd_add_socket(struct nbtd_server *nbtsrv, + struct loadparm_context *lp_ctx, const char *bind_address, const char *address, const char *bcast, @@ -136,7 +137,7 @@ } bcast_address = socket_address_from_strings(bcast_nbtsock, bcast_nbtsock-sock-backend_name, - bcast, lp_nbt_port(global_loadparm)); + bcast, lp_nbt_port(lp_ctx)); if (!bcast_address) { talloc_free(iface); return NT_STATUS_NO_MEMORY; @@ -145,7 +146,7 @@ status = socket_listen(bcast_nbtsock-sock, bcast_address, 0, 0); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,(Failed to bind to %s:%d - %s\n, -bcast, lp_nbt_port(global_loadparm), nt_errstr(status))); +bcast, lp_nbt_port(lp_ctx), nt_errstr(status))); talloc_free(iface); return status; } @@ -163,12 +164,12 @@ unicast_address = socket_address_from_strings(iface-nbtsock, iface-nbtsock-sock-backend_name, - bind_address, lp_nbt_port(global_loadparm)); + bind_address, lp_nbt_port(lp_ctx)); status = socket_listen(iface-nbtsock-sock, unicast_address, 0, 0); if (!NT_STATUS_IS_OK(status)) { DEBUG(0,(Failed to bind to %s:%d - %s\n, -bind_address, lp_nbt_port(global_loadparm), nt_errstr(status))); +bind_address, lp_nbt_port(lp_ctx), nt_errstr(status))); talloc_free(iface); return status; } @@ -215,7 +216,7 @@ /* setup our listening sockets on the configured network interfaces */ -NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv) +NTSTATUS nbtd_startup_interfaces(struct nbtd_server *nbtsrv, struct loadparm_context *lp_ctx) { int num_interfaces = iface_count(); int i; @@ -224,7 +225,7 @@ /* if we are allowing incoming packets from any address, then we also need to bind to the wildcard address */ - if (!lp_bind_interfaces_only(global_loadparm)) { + if (!lp_bind_interfaces_only(lp_ctx)) { const char *primary_address; /* the primary address is the address we will return @@ -234,12 +235,13 @@ primary_address = iface_n_ip(0); } else { primary_address = inet_ntoa(interpret_addr2( - lp_netbios_name(global_loadparm))); + lp_netbios_name(lp_ctx))); } primary_address = talloc_strdup(tmp_ctx, primary_address); NT_STATUS_HAVE_NO_MEMORY(primary_address); status = nbtd_add_socket(nbtsrv, +lp_ctx, 0.0.0.0, primary_address, talloc_strdup(tmp_ctx, 255.255.255.255), @@ -258,11 +260,12 @@ bcast = talloc_strdup(tmp_ctx, bcast); netmask = talloc_strdup(tmp_ctx, iface_n_netmask(i)); - status = nbtd_add_socket(nbtsrv, address, address, bcast, netmask); + status = nbtd_add_socket(nbtsrv, lp_ctx, +address, address, bcast, netmask); NT_STATUS_NOT_OK_RETURN(status); } - if
svn commit: samba r26266 - in branches/SAMBA_4_0: . source/client source/ldap_server source/lib/events source/lib/messaging/tests source/lib/util source/libcli source/libcli/ldap source/libcli/raw sou
Author: jelmer Date: 2007-12-03 21:25:06 + (Mon, 03 Dec 2007) New Revision: 26266 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26266 Log: Remove more global_loadparm uses. Removed: branches/SAMBA_4_0/source/lib/util/util_ldb.h Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/client/client.c branches/SAMBA_4_0/source/ldap_server/ldap_backend.c branches/SAMBA_4_0/source/ldap_server/ldap_bind.c branches/SAMBA_4_0/source/ldap_server/ldap_server.c branches/SAMBA_4_0/source/ldap_server/ldap_server.h branches/SAMBA_4_0/source/lib/events/events.c branches/SAMBA_4_0/source/lib/messaging/tests/irpc.c branches/SAMBA_4_0/source/lib/messaging/tests/messaging.c branches/SAMBA_4_0/source/libcli/cliconnect.c branches/SAMBA_4_0/source/libcli/ldap/ldap_client.c branches/SAMBA_4_0/source/libcli/raw/clisocket.c branches/SAMBA_4_0/source/libcli/raw/clitransport.c branches/SAMBA_4_0/source/libcli/smb2/connect.c branches/SAMBA_4_0/source/libcli/smb_composite/connect.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c branches/SAMBA_4_0/source/torture/basic/base.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/client/client.c === --- branches/SAMBA_4_0/source/client/client.c 2007-12-03 18:47:42 UTC (rev 26265) +++ branches/SAMBA_4_0/source/client/client.c 2007-12-03 21:25:06 UTC (rev 26266) @@ -3078,7 +3078,7 @@ server_name = destip ? destip : desthost; - if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name)) { + if (!(cli=smbcli_state_init(NULL)) || !smbcli_socket_connect(cli, server_name, lp_name_resolve_order(global_loadparm), lp_max_xmit(global_loadparm), lp_maxmux(global_loadparm))) { d_printf(Connection to %s failed\n, server_name); return 1; } Modified: branches/SAMBA_4_0/source/ldap_server/ldap_backend.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_backend.c2007-12-03 18:47:42 UTC (rev 26265) +++ branches/SAMBA_4_0/source/ldap_server/ldap_backend.c2007-12-03 21:25:06 UTC (rev 26266) @@ -56,8 +56,9 @@ NTSTATUS ldapsrv_backend_Init(struct ldapsrv_connection *conn) { conn-ldb = ldb_wrap_connect(conn, -global_loadparm, -lp_sam_url(global_loadparm), conn-session_info, +conn-lp_ctx, +lp_sam_url(conn-lp_ctx), +conn-session_info, NULL, conn-global_catalog ? LDB_FLG_RDONLY : 0, NULL); if (conn-ldb == NULL) { return NT_STATUS_INTERNAL_DB_CORRUPTION; Modified: branches/SAMBA_4_0/source/ldap_server/ldap_bind.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2007-12-03 18:47:42 UTC (rev 26265) +++ branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2007-12-03 21:25:06 UTC (rev 26266) @@ -45,12 +45,12 @@ DEBUG(10, (BindSimple dn: %s\n,req-dn)); - status = crack_auto_name_to_nt4_name(call, global_loadparm, req-dn, nt4_domain, nt4_account); + status = crack_auto_name_to_nt4_name(call, call-conn-lp_ctx, req-dn, nt4_domain, nt4_account); if (NT_STATUS_IS_OK(status)) { status = authenticate_username_pw(call, call-conn-connection-event.ctx, call-conn-connection-msg_ctx, - global_loadparm, + call-conn-lp_ctx, nt4_domain, nt4_account, req-creds.password, session_info); @@ -143,7 +143,7 @@ status = gensec_server_start(conn, conn-connection-event.ctx, -global_loadparm, +conn-lp_ctx, conn-connection-msg_ctx, conn-gensec); if (!NT_STATUS_IS_OK(status)) { Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_server.c 2007-12-03 18:47:42 UTC (rev 26265) +++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c
svn commit: samba r26267 - in branches/SAMBA_4_0: . source/torture/smb2
Author: jelmer Date: 2007-12-03 21:25:14 + (Mon, 03 Dec 2007) New Revision: 26267 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26267 Log: Fix two calls of smb2_connect I missed. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/torture/smb2/scan.c branches/SAMBA_4_0/source/torture/smb2/util.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/torture/smb2/scan.c === --- branches/SAMBA_4_0/source/torture/smb2/scan.c 2007-12-03 21:25:06 UTC (rev 26266) +++ branches/SAMBA_4_0/source/torture/smb2/scan.c 2007-12-03 21:25:14 UTC (rev 26267) @@ -25,6 +25,7 @@ #include lib/cmdline/popt_common.h #include lib/events/events.h #include torture/torture.h +#include param/param.h #include torture/smb2/proto.h @@ -199,7 +200,9 @@ int opcode; struct smb2_request *req; - status = smb2_connect(mem_ctx, host, share, credentials, tree, + status = smb2_connect(mem_ctx, host, share, + lp_name_resolve_order(torture-lp_ctx), + credentials, tree, event_context_find(mem_ctx)); if (!NT_STATUS_IS_OK(status)) { printf(Connection failed - %s\n, nt_errstr(status)); @@ -214,7 +217,9 @@ smb2_transport_send(req); if (!smb2_request_receive(req)) { talloc_free(tree); - status = smb2_connect(mem_ctx, host, share, credentials, tree, + status = smb2_connect(mem_ctx, host, share, + lp_name_resolve_order(torture-lp_ctx), + credentials, tree, event_context_find(mem_ctx)); if (!NT_STATUS_IS_OK(status)) { printf(Connection failed - %s\n, nt_errstr(status)); Modified: branches/SAMBA_4_0/source/torture/smb2/util.c === --- branches/SAMBA_4_0/source/torture/smb2/util.c 2007-12-03 21:25:06 UTC (rev 26266) +++ branches/SAMBA_4_0/source/torture/smb2/util.c 2007-12-03 21:25:14 UTC (rev 26267) @@ -309,7 +309,9 @@ const char *share = torture_setting_string(tctx, share, NULL); struct cli_credentials *credentials = cmdline_credentials; - status = smb2_connect(tctx, host, share, credentials, tree, + status = smb2_connect(tctx, host, share, + lp_name_resolve_order(tctx-lp_ctx), + credentials, tree, event_context_find(tctx)); if (!NT_STATUS_IS_OK(status)) { printf(Failed to connect to SMB2 share %s\\%s - %s\n,
svn commit: samba r26268 - in branches/SAMBA_4_0: . source/auth source/nsswitch source/smb_server source/smb_server/smb source/smb_server/smb2 source/torture/nbt source/torture/rpc source/utils source
Author: jelmer Date: 2007-12-03 21:25:17 + (Mon, 03 Dec 2007) New Revision: 26268 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26268 Log: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/auth_server.c branches/SAMBA_4_0/source/nsswitch/wbinfo.c branches/SAMBA_4_0/source/smb_server/smb/negprot.c branches/SAMBA_4_0/source/smb_server/smb/service.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c branches/SAMBA_4_0/source/smb_server/smb/signing.c branches/SAMBA_4_0/source/smb_server/smb2/negprot.c branches/SAMBA_4_0/source/smb_server/smb2/receive.c branches/SAMBA_4_0/source/smb_server/smb2/sesssetup.c branches/SAMBA_4_0/source/smb_server/smb_server.c branches/SAMBA_4_0/source/smb_server/smb_server.h branches/SAMBA_4_0/source/torture/nbt/dgram.c branches/SAMBA_4_0/source/torture/rpc/samba3rpc.c branches/SAMBA_4_0/source/utils/testparm.c branches/SAMBA_4_0/source/winbind/wb_cmd_getpwnam.c branches/SAMBA_4_0/source/winbind/wb_cmd_getpwuid.c branches/SAMBA_4_0/source/winbind/wb_dom_info.c branches/SAMBA_4_0/source/winbind/wb_dom_info_trusted.c branches/SAMBA_4_0/source/winbind/wb_init_domain.c branches/SAMBA_4_0/source/winbind/wb_name2domain.c branches/SAMBA_4_0/source/winbind/wb_pam_auth.c branches/SAMBA_4_0/source/winbind/wb_samba3_cmd.c branches/SAMBA_4_0/source/winbind/wb_server.c branches/SAMBA_4_0/source/winbind/wb_server.h branches/SAMBA_4_0/source/winbind/wb_sid2domain.c Changeset: Sorry, the patch is too large (867 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26268
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-445-gb6b5f92
The branch, v3-2-test has been updated via b6b5f92bc9457220df384bdb13530c393d294ce7 (commit) from de2fdc6b5a78932f8ea5cf4c4715296f18dae4d3 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit b6b5f92bc9457220df384bdb13530c393d294ce7 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 14:09:48 2007 -0800 Remove pstring from clirap2 by completely rewriting the damn thing :-). Now with added paranoia. Jeremy. --- Summary of changes: source/libsmb/clirap2.c | 3895 +++ source/utils/net_rpc.c |8 +- 2 files changed, 2216 insertions(+), 1687 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/clirap2.c b/source/libsmb/clirap2.c index f522e13..d579564 100644 --- a/source/libsmb/clirap2.c +++ b/source/libsmb/clirap2.c @@ -3,6 +3,7 @@ More client RAP (SMB Remote Procedure Calls) functions Copyright (C) 2001 Steve French ([EMAIL PROTECTED]) Copyright (C) 2001 Jim McDonough ([EMAIL PROTECTED]) + Copyright (C) 2007 Jeremy Allison. [EMAIL PROTECTED] 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 @@ -80,916 +81,1140 @@ #define DWORDSIZE 4 #define PUTBYTE(p,b) do {SCVAL(p,0,b); p++;} while(0) -#define GETBYTE(p,b) do {b = CVAL(p,0); p++;} while(0) + +#define GETBYTE(p,b,endp) \ + do {\ + if (p+1 endp) {\ + b = CVAL(p,0);\ + }\ + p++;\ + } while(0) + #define PUTWORD(p,w) do {SSVAL(p,0,w); p += WORDSIZE;} while(0) -#define GETWORD(p,w) do {w = SVAL(p,0); p += WORDSIZE;} while(0) + +#define GETWORD(p,w,endp) \ + do {\ + if (p+WORDSIZE endp) {\ + w = SVAL(p,0);\ + }\ + p += WORDSIZE;\ + } while(0) + #define PUTDWORD(p,d) do {SIVAL(p,0,d); p += DWORDSIZE;} while(0) -#define GETDWORD(p,d) do {d = IVAL(p,0); p += DWORDSIZE;} while(0) -#define GETRES(p) p ? SVAL(p,0) : -1 + +#define GETDWORD(p,d,endp) \ + do {\ + if (p+DWORDSIZE endp) {\ + d = IVAL(p,0);\ + }\ + p += DWORDSIZE;\ + } while(0) + +#define GETRES(p,endp) ((p p+2 endp) ? SVAL(p,0) : -1) + /* put string s at p with max len n and increment p past string */ -#define PUTSTRING(p,s,n) do {\ - push_ascii(p,s?s:,n?n:256,STR_TERMINATE);\ - p = push_skip_string(p);\ - } while(0) +#define PUTSTRING(p,s,n) \ + do {\ + push_ascii(p,s?s:,n?n:256,STR_TERMINATE);\ + p = push_skip_string(p);\ + } while(0) + /* put string s and p, using fixed len l, and increment p by l */ -#define PUTSTRINGF(p,s,l) do {\ - push_ascii(p,s?s:,l,STR_TERMINATE);\ - p += l;\ - } while (0) +#define PUTSTRINGF(p,s,l) \ + do {\ + push_ascii(p,s?s:,l,STR_TERMINATE);\ + p += l;\ + } while (0) + /* put string pointer at p, supplying offset o from rdata r, store */ /* dword offset at p, increment p by 4 and o by length of s. This */ /* means on the first call, you must calc the offset yourself! */ -#define PUTSTRINGP(p,s,r,o) do {\ - if (s) {\ -push_ascii(r+o,s,strlen(s)+1,STR_TERMINATE);\ -PUTDWORD(p,o);\ -o += strlen(s) + 1;\ - } else PUTDWORD(p,0);\ - }while(0); -/* get asciiz string s from p, increment p past string */ -#define GETSTRING(p,s) do {\ - pull_ascii_pstring(s,p);\ - p = push_skip_string(p);\ - } while(0) -/* get fixed length l string s from p, increment p by l */ -#define GETSTRINGF(p,s,l) do {\ - pull_ascii_pstring(s,p);\ - p += l;\ - } while(0) -/* get string s from offset (obtained at p) from rdata r - converter c */ -#define GETSTRINGP(p,s,r,c) do {\ - uint32 off;\ - GETDWORD(p,off);\ - off = 0x; /* mask the obsolete segment number from the offset */ \ - pull_ascii_pstring(s, off?(r+off-c):);\ - } while(0) + +#define PUTSTRINGP(p,s,r,o) \ + do {\ + if (s) {\ + push_ascii(r+o,s,strlen(s)+1,STR_TERMINATE);\ + PUTDWORD(p,o);\ + o += strlen(s) + 1;\ + } else {\ + PUTDWORD(p,0);\ + }\ + }while(0); + +/* get asciiz string dest from src, return increment past string */ + +static size_t rap_getstring(TALLOC_CTX *ctx, char *src, char **dest, const char *endp) +{ + char *p1; + size_t len; + + *dest = NULL; + for (p1 = src, len = 0; *p1 p1 endp; len++) + p1++; + if (!*p1) { + len++; + } + pull_string_talloc(ctx,src,0,dest,src,len,STR_ASCII); + return len; +} + +/* get fixed length l string dest from src, return increment for src */
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-446-g98d86dc
The branch, v3-2-test has been updated via 98d86dcbd898f48748bbfbe1066a7014d25392d1 (commit) from b6b5f92bc9457220df384bdb13530c393d294ce7 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 98d86dcbd898f48748bbfbe1066a7014d25392d1 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 14:11:45 2007 -0800 Last pstring here. Jeremy. --- Summary of changes: source/winbindd/winbindd_cm.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c index 7da7a82..b64937d 100644 --- a/source/winbindd/winbindd_cm.c +++ b/source/winbindd/winbindd_cm.c @@ -208,10 +208,12 @@ static bool fork_child_dc_connect(struct winbindd_domain *domain) close_conns_after_fork(); if (!override_logfile) { - pstring logfile; - pstr_sprintf(logfile, %s/log.winbindd-dc-connect, dyn_LOGFILEBASE); - lp_set_logfile(logfile); - reopen_logs(); + char *logfile; + if (asprintf(logfile, %s/log.winbindd-dc-connect, dyn_LOGFILEBASE) 0) { + lp_set_logfile(logfile); + SAFE_FREE(logfile); + reopen_logs(); + } } mem_ctx = talloc_init(fork_child_dc_connect); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-447-g7722a7d
The branch, v3-2-test has been updated via 7722a7d2c63f84b8105aa775b39f0ceedd4ed513 (commit) from 98d86dcbd898f48748bbfbe1066a7014d25392d1 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 7722a7d2c63f84b8105aa775b39f0ceedd4ed513 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 14:54:06 2007 -0800 Change tdb_unpack P to return a malloc'ed string rather than expect a pstring space to put data into. Fix the (few) callers. Jeremy. --- Summary of changes: source/lib/util_tdb.c | 19 +-- source/passdb/secrets.c |7 ++- source/printing/nt_printing.c |8 +++- source/printing/printing.c| 10 +++--- 4 files changed, 29 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/util_tdb.c b/source/lib/util_tdb.c index 35c1a92..ce2cb42 100644 --- a/source/lib/util_tdb.c +++ b/source/lib/util_tdb.c @@ -561,14 +561,14 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) int len; int *i; void **p; - char *s, **b; + char *s, **b, **ps; char c; const uint8 *buf0 = buf; const char *fmt0 = fmt; int bufsize0 = bufsize; va_start(ap, fmt); - + while (*fmt) { switch ((c=*fmt++)) { case 'b': @@ -597,7 +597,7 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) p = va_arg(ap, void **); if (bufsize len) goto no_space; - /* + /* * This isn't a real pointer - only a token (1 or 0) * to mark the fact a pointer is present. */ @@ -605,11 +605,10 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) *p = (void *)(IVAL(buf, 0) ? (void *)1 : NULL); break; case 'P': - s = va_arg(ap,char *); + /* Return malloc'ed string. */ + ps = va_arg(ap,char **); len = strlen((const char *)buf) + 1; - if (bufsize len || len sizeof(pstring)) - goto no_space; - memcpy(s, buf, len); + *ps = SMB_STRDUP((const char *)buf); break; case 'f': s = va_arg(ap,char *); @@ -638,7 +637,7 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) memcpy(*b, buf+4, *i); break; default: - DEBUG(0,(Unknown tdb_unpack format %c in %s\n, + DEBUG(0,(Unknown tdb_unpack format %c in %s\n, c, fmt)); len = 0; @@ -651,7 +650,7 @@ int tdb_unpack(const uint8 *buf, int bufsize, const char *fmt, ...) va_end(ap); - DEBUG(18,(tdb_unpack(%s, %d) - %d\n, + DEBUG(18,(tdb_unpack(%s, %d) - %d\n, fmt0, bufsize0, (int)PTR_DIFF(buf, buf0))); return PTR_DIFF(buf, buf0); @@ -673,7 +672,7 @@ static void tdb_log(TDB_CONTEXT *tdb, enum tdb_debug_level level, const char *fo va_start(ap, format); vasprintf(ptr, format, ap); va_end(ap); - + if (!ptr || !*ptr) return; diff --git a/source/passdb/secrets.c b/source/passdb/secrets.c index c760198..eee8aae 100644 --- a/source/passdb/secrets.c +++ b/source/passdb/secrets.c @@ -484,6 +484,7 @@ static size_t tdb_trusted_dom_pass_unpack(uint8 *pack_buf, int bufsize, TRUSTED_DOM_PASS* pass) { int idx, len = 0; + char *passp = NULL; if (!pack_buf || !pass) return -1; @@ -495,7 +496,11 @@ static size_t tdb_trusted_dom_pass_unpack(uint8 *pack_buf, int bufsize, pass-uni_name[idx]); len += tdb_unpack(pack_buf + len, bufsize - len, dPd, - pass-pass_len, pass-pass, pass-mod_time); + pass-pass_len, passp, pass-mod_time); + if (passp) { + fstrcpy(pass-pass, passp); + } + SAFE_FREE(passp); /* unpack domain sid */ len += tdb_sid_unpack(pack_buf + len, bufsize - len, diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index c55f9f1..afa4bc2 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -4017,6 +4017,7 @@ static WERROR get_a_printer_2(NT_PRINTER_INFO_LEVEL_2 *info, const char *servern TDB_DATA kbuf, dbuf; fstring
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-448-ge72bce5
The branch, v3-2-test has been updated via e72bce5b62fb0a9d0ff4a3d76490219994f303cf (commit) from 7722a7d2c63f84b8105aa775b39f0ceedd4ed513 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit e72bce5b62fb0a9d0ff4a3d76490219994f303cf Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 15:19:22 2007 -0800 Remove unused wpstring and macros. Stop using pstrcpy in smbd/*.c Jeremy. --- Summary of changes: source/include/includes.h | 23 --- source/include/safe_string.h | 31 - source/printing/nt_printing.c |2 +- source/smbd/lanman.c | 60 +++- 4 files changed, 35 insertions(+), 81 deletions(-) Changeset truncated at 500 lines: diff --git a/source/include/includes.h b/source/include/includes.h index 5192c37..9079c3a 100644 --- a/source/include/includes.h +++ b/source/include/includes.h @@ -699,29 +699,6 @@ struct timespec { #include ctdbd_conn.h #include talloc_stack.h -/* - * Type for wide character dirent structure. - * Only d_name is defined by POSIX. - */ - -typedef struct smb_wdirent { - wpstringd_name; -} SMB_STRUCT_WDIRENT; - -/* - * Type for wide character passwd structure. - */ - -typedef struct smb_wpasswd { - wfstring pw_name; - char *pw_passwd; - uid_t pw_uid; - gid_t pw_gid; - wpstring pw_gecos; - wpstring pw_dir; - wpstring pw_shell; -} SMB_STRUCT_WPASSWD; - /* used in net.c */ struct functable { const char *funcname; diff --git a/source/include/safe_string.h b/source/include/safe_string.h index 7a60ad6..53ee7d3 100644 --- a/source/include/safe_string.h +++ b/source/include/safe_string.h @@ -86,26 +86,6 @@ size_t __unsafe_string_function_usage_here_char__(void); #define CHECK_STRING_SIZE(d, len) (sizeof(d) != (len) sizeof(d) != sizeof(char *)) -#define fstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(fstring)) \ -? __unsafe_string_function_usage_here_char__() \ -: (((d)[sizeof(fstring)-1]) = '\0')) -#define pstrterminate(d) (CHECK_STRING_SIZE(d, sizeof(pstring)) \ -? __unsafe_string_function_usage_here_char__() \ -: (((d)[sizeof(pstring)-1]) = '\0')) - -#define wpstrcpy(d,s) ((sizeof(d) != sizeof(wpstring) sizeof(d) != sizeof(smb_ucs2_t *)) \ -? __unsafe_string_function_usage_here__() \ -: safe_strcpy_w((d),(s),sizeof(wpstring))) -#define wpstrcat(d,s) ((sizeof(d) != sizeof(wpstring) sizeof(d) != sizeof(smb_ucs2_t *)) \ -? __unsafe_string_function_usage_here__() \ -: safe_strcat_w((d),(s),sizeof(wpstring))) -#define wfstrcpy(d,s) ((sizeof(d) != sizeof(wfstring) sizeof(d) != sizeof(smb_ucs2_t *)) \ -? __unsafe_string_function_usage_here__() \ -: safe_strcpy_w((d),(s),sizeof(wfstring))) -#define wfstrcat(d,s) ((sizeof(d) != sizeof(wfstring) sizeof(d) != sizeof(smb_ucs2_t *)) \ -? __unsafe_string_function_usage_here__() \ -: safe_strcat_w((d),(s),sizeof(wfstring))) - #define push_pstring_base(dest, src, pstring_base) \ (CHECK_STRING_SIZE(pstring_base, sizeof(pstring)) \ ? __unsafe_string_function_usage_here_size_t__() \ @@ -113,14 +93,6 @@ size_t __unsafe_string_function_usage_here_char__(void); #else /* HAVE_COMPILER_WILL_OPTIMIZE_OUT_FNS */ -#define fstrterminate(d) (((d)[sizeof(fstring)-1]) = '\0') -#define pstrterminate(d) (((d)[sizeof(pstring)-1]) = '\0') - -#define wpstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wpstring)) -#define wpstrcat(d,s) safe_strcat_w((d),(s),sizeof(wpstring)) -#define wfstrcpy(d,s) safe_strcpy_w((d),(s),sizeof(wfstring)) -#define wfstrcat(d,s) safe_strcat_w((d),(s),sizeof(wfstring)) - #define push_pstring_base(dest, src, pstring_base) \ push_ascii(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1, STR_TERMINATE) @@ -143,9 +115,6 @@ size_t __unsafe_string_function_usage_here_char__(void); /* the addition of the DEVELOPER checks in safe_strcpy means we must * update a lot of code. To make this a little easier here are some * functions that provide the lengths with less pain */ -#define pstrcpy_base(dest, src, pstring_base) \ -safe_strcpy(dest, src, sizeof(pstring)-PTR_DIFF(dest,pstring_base)-1) - /* Inside the _fn variants of these is a call to clobber_region(), - * which might destroy the stack on a buggy function. We help the diff --git a/source/printing/nt_printing.c b/source/printing/nt_printing.c index afa4bc2..55dd63b 100644 --- a/source/printing/nt_printing.c +++ b/source/printing/nt_printing.c @@ -3956,7 +3956,7 @@ static WERROR get_a_printer_2_default(NT_PRINTER_INFO_LEVEL_2 *info, const char DEBUG(10,(get_a_printer_2_default: driver name set to [%s]\n, info-drivername)); - pstrcpy(info-comment, ); + strlcpy(info-comment, ,
svn commit: samba r26272 - in branches/SAMBA_4_0: . source/auth/credentials source/client source/lib/charset source/param source/rpc_server/samr source/smbd source/torture source/torture/libnet source
Author: jelmer Date: 2007-12-03 23:33:22 + (Mon, 03 Dec 2007) New Revision: 26272 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26272 Log: Remove global_loadparm in some more places. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c branches/SAMBA_4_0/source/client/cifsdd.c branches/SAMBA_4_0/source/lib/charset/charcnv.c branches/SAMBA_4_0/source/param/share_classic.c branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c branches/SAMBA_4_0/source/smbd/server.c branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c branches/SAMBA_4_0/source/torture/locktest.c branches/SAMBA_4_0/source/torture/rpc/drsuapi.c branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c branches/SAMBA_4_0/source/web_server/http.c branches/SAMBA_4_0/source/winbind/wb_server.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-12-03 23:33:16 UTC (rev 26271) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-12-03 23:33:22 UTC (rev 26272) @@ -346,7 +346,8 @@ * @param cred Credentials structure to fill in * @retval NTSTATUS error detailing any failure */ -NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred) +NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred, + struct loadparm_context *lp_ctx) { char *filter; /* Bleh, nasty recursion issues: We are setting a machine @@ -356,7 +357,7 @@ filter = talloc_asprintf(cred, SECRETS_KRBTGT_SEARCH, cli_credentials_get_realm(cred), cli_credentials_get_domain(cred)); - return cli_credentials_set_secrets(cred, global_loadparm, NULL, + return cli_credentials_set_secrets(cred, lp_ctx, NULL, SECRETS_PRINCIPALS_DN, filter); } Modified: branches/SAMBA_4_0/source/client/cifsdd.c === --- branches/SAMBA_4_0/source/client/cifsdd.c 2007-12-03 23:33:16 UTC (rev 26271) +++ branches/SAMBA_4_0/source/client/cifsdd.c 2007-12-03 23:33:22 UTC (rev 26272) @@ -426,10 +426,10 @@ return(EOM_EXIT_CODE); } - set_max_xmit(global_loadparm, MAX(ibs, obs)); + set_max_xmit(lp_ctx, MAX(ibs, obs)); DEBUG(4, (IO buffer size is %llu, max xmit is %d\n, - (unsigned long long)iomax, lp_max_xmit(global_loadparm))); + (unsigned long long)iomax, lp_max_xmit(lp_ctx))); if (!(ifile = open_file(if))) { return(FILESYS_EXIT_CODE); @@ -443,7 +443,7 @@ ifile-io_seek(ifile, check_arg_numeric(skip) * ibs); ofile-io_seek(ofile, check_arg_numeric(seek) * obs); - DEBUG(4, (max xmit was negotiated to be %d\n, lp_max_xmit(global_loadparm))); + DEBUG(4, (max xmit was negotiated to be %d\n, lp_max_xmit(lp_ctx))); for (data_size = 0;;) { Modified: branches/SAMBA_4_0/source/lib/charset/charcnv.c === --- branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-03 23:33:16 UTC (rev 26271) +++ branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-03 23:33:22 UTC (rev 26272) @@ -274,7 +274,8 @@ if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) { /* conversion not supported, return -1*/ DEBUG(3, (convert_string_talloc: conversion from %s to %s not supported!\n, - charset_name(global_loadparm, from), charset_name(global_loadparm, to))); + charset_name(global_loadparm, from), + charset_name(global_loadparm, to))); return -1; } Modified: branches/SAMBA_4_0/source/param/share_classic.c === --- branches/SAMBA_4_0/source/param/share_classic.c 2007-12-03 23:33:16 UTC (rev 26271) +++ branches/SAMBA_4_0/source/param/share_classic.c 2007-12-03 23:33:22 UTC (rev 26272) @@ -23,7 +23,9 @@ #include param/share.h #include param/param.h -static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct share_context **ctx) +static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, + const struct share_ops *ops, + struct share_context **ctx) { *ctx = talloc(mem_ctx, struct
svn commit: samba r26271 - in branches/SAMBA_4_0: . source/auth/credentials source/cldap_server source/client source/dsdb/repl source/dsdb/samdb/ldb_modules source/lib/cmdline source/libcli/cldap sour
Author: jelmer Date: 2007-12-03 23:33:16 + (Mon, 03 Dec 2007) New Revision: 26271 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26271 Log: Remove some more uses of global_loadparm. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c branches/SAMBA_4_0/source/cldap_server/netlogon.c branches/SAMBA_4_0/source/client/client.c branches/SAMBA_4_0/source/client/smbmount.c branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c branches/SAMBA_4_0/source/libcli/cldap/cldap.c branches/SAMBA_4_0/source/libcli/cldap/cldap.h branches/SAMBA_4_0/source/libnet/libnet_become_dc.c branches/SAMBA_4_0/source/libnet/libnet_site.c branches/SAMBA_4_0/source/libnet/libnet_unbecome_dc.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c branches/SAMBA_4_0/source/torture/ldap/cldap.c branches/SAMBA_4_0/source/torture/ldap/cldapbench.c branches/SAMBA_4_0/source/torture/rpc/dssync.c branches/SAMBA_4_0/source/torture/util_smb.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_files.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-12-03 23:33:09 UTC (rev 26270) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c 2007-12-03 23:33:16 UTC (rev 26271) @@ -335,7 +335,8 @@ cred-machine_account_pending = false; filter = talloc_asprintf(cred, SECRETS_PRIMARY_DOMAIN_FILTER, cli_credentials_get_domain(cred)); - return cli_credentials_set_secrets(cred, global_loadparm, NULL, SECRETS_PRIMARY_DOMAIN_DN, + return cli_credentials_set_secrets(cred, global_loadparm, NULL, + SECRETS_PRIMARY_DOMAIN_DN, filter); } @@ -355,7 +356,8 @@ filter = talloc_asprintf(cred, SECRETS_KRBTGT_SEARCH, cli_credentials_get_realm(cred), cli_credentials_get_domain(cred)); - return cli_credentials_set_secrets(cred, global_loadparm, NULL, SECRETS_PRINCIPALS_DN, + return cli_credentials_set_secrets(cred, global_loadparm, NULL, + SECRETS_PRINCIPALS_DN, filter); } @@ -377,8 +379,8 @@ cli_credentials_get_realm(cred), cli_credentials_get_domain(cred), serviceprincipal); - return cli_credentials_set_secrets(cred, global_loadparm, NULL, SECRETS_PRINCIPALS_DN, - filter); + return cli_credentials_set_secrets(cred, global_loadparm, NULL, + SECRETS_PRINCIPALS_DN, filter); } /** Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-12-03 23:33:09 UTC (rev 26270) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-12-03 23:33:16 UTC (rev 26271) @@ -141,7 +141,8 @@ return ENOMEM; } - ret = cli_credentials_get_krb5_context(cred, global_loadparm, ccc-smb_krb5_context); + ret = cli_credentials_get_krb5_context(cred, global_loadparm, + ccc-smb_krb5_context); if (ret) { talloc_free(ccc); return ret; @@ -215,7 +216,8 @@ return ENOMEM; } - ret = cli_credentials_get_krb5_context(cred, global_loadparm, ccc-smb_krb5_context); + ret = cli_credentials_get_krb5_context(cred, global_loadparm, + ccc-smb_krb5_context); if (ret) { talloc_free(ccc); return ret; @@ -225,7 +227,8 @@ return ENOMEM; } - ret = krb5_cc_resolve(ccc-smb_krb5_context-krb5_context, ccache_name, ccc-ccache); + ret = krb5_cc_resolve(ccc-smb_krb5_context-krb5_context, ccache_name, + ccc-ccache); if (ret) { DEBUG(1,(failed to generate a new krb5 ccache (%s): %s\n, ccache_name, Modified: branches/SAMBA_4_0/source/cldap_server/netlogon.c === ---
Build status as of Tue Dec 4 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-12-03 00:00:26.0 + +++ /home/build/master/cache/broken_results.txt 2007-12-04 00:01:17.0 + @@ -1,10 +1,10 @@ -Build status as of Mon Dec 3 00:00:01 2007 +Build status as of Tue Dec 4 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 27 9 0 +ccache 28 9 0 ctdb 0 0 0 distcc 1 0 0 ldb 28 11 0 @@ -18,7 +18,7 @@ samba-gtk3 3 0 samba4 25 25 0 samba_3_20 0 0 -samba_3_2_test 28 18 0 +samba_3_2_test 27 18 0 smb-build27 26 0 talloc 28 7 0 tdb 28 5 0
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-449-g0ccd87c
The branch, v3-2-test has been updated via 0ccd87c56b34bdc34c73d700d21544fe269f9141 (commit) from e72bce5b62fb0a9d0ff4a3d76490219994f303cf (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 0ccd87c56b34bdc34c73d700d21544fe269f9141 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 15:47:30 2007 -0800 Fix the build. fstrterminate was used in one place. Jeremy. --- Summary of changes: source/printing/lpq_parse.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/printing/lpq_parse.c b/source/printing/lpq_parse.c index 09f630e..d4520b0 100644 --- a/source/printing/lpq_parse.c +++ b/source/printing/lpq_parse.c @@ -179,7 +179,7 @@ static bool parse_lpq_bsd(char *line,print_queue_struct *buf,bool first) fstrcat(buf-fs_file, tok[i]); } /* Ensure null termination. */ - fstrterminate(buf-fs_file); + buf-fs_file[sizeof(buf-fs_file)-1] = '\0'; } #ifdef PRIOTOK @@ -314,7 +314,7 @@ static bool parse_lpq_lprng(char *line,print_queue_struct *buf,bool first) fstrcat(buf-fs_file, tokarr[i]); } /* Ensure null termination. */ - fstrterminate(buf-fs_file); + buf-fs_file[sizeof(buf-fs_file)-1] = '\0'; } return True; -- Samba Shared Repository
svn commit: samba r26273 - in branches/SAMBA_4_0/source: . librpc/idl rpc_server/netlogon torture/rpc
Author: gd Date: 2007-12-03 23:38:54 + (Mon, 03 Dec 2007) New Revision: 26273 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26273 Log: Add IDL and torture test for netr_NetrEnumerateTurstedDomains() and netr_NetrEnumerateTurstedDomainsEx(). Guenther Modified: branches/SAMBA_4_0/source/librpc/idl/netlogon.idl branches/SAMBA_4_0/source/rpc_server/netlogon/dcerpc_netlogon.c branches/SAMBA_4_0/source/samba4-knownfail branches/SAMBA_4_0/source/torture/rpc/netlogon.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/netlogon.idl === --- branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2007-12-03 23:33:22 UTC (rev 26272) +++ branches/SAMBA_4_0/source/librpc/idl/netlogon.idl 2007-12-03 23:38:54 UTC (rev 26273) @@ -903,8 +903,16 @@ /*/ /* Function 0x13 */ - WERROR netr_NETRENUMERATETRUSTEDDOMAINS() ; + typedef struct { + uint32 length; + [size_is(length)] uint8 *data; + } netr_Blob; + WERROR netr_NetrEnumerateTrustedDomains( + [in] [string,charset(UTF16)] uint16 *server_name, + [out,ref] netr_Blob *trusted_domains_blob + ); + /*/ /* Function 0x14 */ @@ -1027,11 +1035,6 @@ // /* Function 0x1d */ - typedef struct { - uint32 length; - [size_is(length)] uint8 *data; - } netr_Blob; - typedef [flag(NDR_PAHEX)] struct { uint16 length; uint16 size; @@ -1153,8 +1156,53 @@ // /* Function 0x24 */ - WERROR netr_NETRENUMERATETRUSTEDDOMAINSEX(); + typedef [bitmap32bit] bitmap { + NETR_TRUST_FLAG_IN_FOREST = 0x0001, + NETR_TRUST_FLAG_OUTBOUND = 0x0002, + NETR_TRUST_FLAG_TREEROOT = 0x0004, + NETR_TRUST_FLAG_PRIMARY = 0x0008, + NETR_TRUST_FLAG_NATIVE= 0x0010, + NETR_TRUST_FLAG_INBOUND = 0x0020 + } netr_TrustFlags; + typedef [v1_enum] enum { + NETR_TRUST_TYPE_DOWNLEVEL = 1, + NETR_TRUST_TYPE_UPLEVEL = 2, + NETR_TRUST_TYPE_MIT = 3, + NETR_TRUST_TYPE_DCE = 4 + } netr_TrustType; + + typedef [bitmap32bit] bitmap { + NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x0001, + NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x0002, + NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x0004, + NETR_TRUST_ATTRIBUTE_FOREST_TRANSITIVE = 0x0008, + NETR_TRUST_ATTRIBUTE_CROSS_ORGANIZATION = 0x0010, + NETR_TRUST_ATTRIBUTE_WITHIN_FOREST = 0x0020, + NETR_TRUST_ATTRIBUTE_TREAT_AS_EXTERNAL = 0x0040 + } netr_TrustAttributes; + + typedef struct { + [string,charset(UTF16)] uint16 *netbios_name; + [string,charset(UTF16)] uint16 *dns_name; + netr_TrustFlags trust_flags; + uint32 parent_index; + netr_TrustType trust_type; + netr_TrustAttributestrust_attributes; + dom_sid2*sid; + GUIDguid; + } netr_DomainTrust; + +typedef struct { +uint32 count; +[size_is(count)] netr_DomainTrust *array; +} netr_DomainTrustList; + + WERROR netr_NetrEnumerateTrustedDomainsEx( + [in] [string,charset(UTF16)] uint16 *server_name, + [out,ref] netr_DomainTrustList *dom_trust_list + ); + // /* Function 0x25 */ typedef struct { @@ -1199,43 +1247,6 @@ // /* Function 0x28 */ - typedef [bitmap32bit] bitmap { - NETR_TRUST_FLAG_IN_FOREST = 0x0001, - NETR_TRUST_FLAG_OUTBOUND = 0x0002, - NETR_TRUST_FLAG_TREEROOT = 0x0004, - NETR_TRUST_FLAG_PRIMARY = 0x0008, - NETR_TRUST_FLAG_NATIVE= 0x0010, - NETR_TRUST_FLAG_INBOUND = 0x0020 - } netr_TrustFlags; - - typedef [v1_enum] enum { - NETR_TRUST_TYPE_DOWNLEVEL = 1, - NETR_TRUST_TYPE_UPLEVEL = 2, - NETR_TRUST_TYPE_MIT = 3, - NETR_TRUST_TYPE_DCE = 4 - } netr_TrustType; - - typedef [bitmap32bit] bitmap { - NETR_TRUST_ATTRIBUTE_NON_TRANSITIVE = 0x0001, - NETR_TRUST_ATTRIBUTE_UPLEVEL_ONLY = 0x0002, - NETR_TRUST_ATTRIBUTE_QUARANTINED_DOMAIN = 0x0004, -
svn commit: samba r26274 - in branches/SAMBA_4_0: . source/auth/credentials source/cluster source/cluster/ctdb source/kdc source/smbd
Author: jelmer Date: 2007-12-04 00:12:03 + (Tue, 04 Dec 2007) New Revision: 26274 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26274 Log: Some syntax fixes, remove more global_loadparm instances. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials.c branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c branches/SAMBA_4_0/source/cluster/local.c branches/SAMBA_4_0/source/kdc/hdb-ldb.c branches/SAMBA_4_0/source/kdc/kdc.c branches/SAMBA_4_0/source/smbd/service_stream.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-03 23:38:54 UTC (rev 26273) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-04 00:12:03 UTC (rev 26274) @@ -641,7 +641,7 @@ char *p; if (lp_ctx != NULL) { - cli_credentials_set_conf(cred, global_loadparm); + cli_credentials_set_conf(cred, lp_ctx); } if (getenv(LOGNAME)) { Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-12-03 23:38:54 UTC (rev 26273) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_krb5.c 2007-12-04 00:12:03 UTC (rev 26274) @@ -199,7 +199,8 @@ } -static int cli_credentials_new_ccache(struct cli_credentials *cred, struct ccache_container **_ccc) +static int cli_credentials_new_ccache(struct cli_credentials *cred, + struct ccache_container **_ccc) { krb5_error_code ret; struct ccache_container *ccc = talloc(cred, struct ccache_container); @@ -466,7 +467,8 @@ return EINVAL; } - ret = cli_credentials_get_krb5_context(cred, global_loadparm, smb_krb5_context); + ret = cli_credentials_get_krb5_context(cred, global_loadparm, + smb_krb5_context); if (ret) { return ret; } Modified: branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c === --- branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-12-03 23:38:54 UTC (rev 26273) +++ branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-12-04 00:12:03 UTC (rev 26274) @@ -79,8 +79,8 @@ correct operation of fcntl locks on the shared fileystem. */ static struct tdb_wrap *ctdb_tdb_tmp_open(struct cluster_ops *ops, - TALLOC_CTX *mem_ctx, const char *dbname, - int flags) + TALLOC_CTX *mem_ctx, + const char *dbname, int flags) { const char *dir = lp_parm_string(global_loadparm, NULL, ctdb, shared data); char *path; Modified: branches/SAMBA_4_0/source/cluster/local.c === --- branches/SAMBA_4_0/source/cluster/local.c 2007-12-03 23:38:54 UTC (rev 26273) +++ branches/SAMBA_4_0/source/cluster/local.c 2007-12-04 00:12:03 UTC (rev 26274) @@ -55,8 +55,8 @@ TDB_CLEAR_IF_FIRST as the tmp path is wiped at startup */ static struct tdb_wrap *local_tdb_tmp_open(struct cluster_ops *ops, - TALLOC_CTX *mem_ctx, const char *dbname, - int flags) + TALLOC_CTX *mem_ctx, + const char *dbname, int flags) { char *path = smbd_tmp_path(mem_ctx, global_loadparm, dbname); struct tdb_wrap *w; Modified: branches/SAMBA_4_0/source/kdc/hdb-ldb.c === --- branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2007-12-03 23:38:54 UTC (rev 26273) +++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2007-12-04 00:12:03 UTC (rev 26274) @@ -1103,6 +1103,7 @@ * code */ NTSTATUS kdc_hdb_ldb_create(TALLOC_CTX *mem_ctx, + struct loadparm_context *lp_ctx, krb5_context context, struct HDB **db, const char *arg) { NTSTATUS nt_status; @@ -1164,7 +1165,8 @@ { NTSTATUS nt_status; /* The global kdc_mem_ctx, Disgusting, ugly hack, but it means one less private hook */ - nt_status = kdc_hdb_ldb_create(kdc_mem_ctx, context, db, arg); + nt_status =
svn commit: samba r26275 - in branches/SAMBA_4_0: . source/client source/lib/cmdline source/param source/scripting/ejs source/torture source/utils
Author: jelmer Date: 2007-12-04 00:12:13 + (Tue, 04 Dec 2007) New Revision: 26275 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26275 Log: return loadparm context in lp_load. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/client/smbmount.c branches/SAMBA_4_0/source/client/smbspool.c branches/SAMBA_4_0/source/lib/cmdline/popt_common.c branches/SAMBA_4_0/source/param/loadparm.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_config.c branches/SAMBA_4_0/source/scripting/ejs/smbscript.c branches/SAMBA_4_0/source/torture/gentest.c branches/SAMBA_4_0/source/torture/locktest.c branches/SAMBA_4_0/source/torture/locktest2.c branches/SAMBA_4_0/source/torture/masktest.c branches/SAMBA_4_0/source/utils/testparm.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/client/smbmount.c === --- branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 00:12:03 UTC (rev 26274) +++ branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 00:12:13 UTC (rev 26275) @@ -323,7 +323,8 @@ * not exit after open_sockets() or send_login() errors, * as the smbfs mount would then have no way to recover. */ -static void send_fs_socket(const char *the_service, const char *mount_point, struct smbcli_state *c) +static void send_fs_socket(struct loadparm_context *lp_ctx, + const char *the_service, const char *mount_point, struct smbcli_state *c) { int fd, closed = 0, res = 1; pid_t parentpid = getppid(); @@ -407,7 +408,7 @@ pause(); DEBUG(2,(mount.smbfs[%d]: got signal, getting new socket\n, sys_getpid())); c = do_connection(the_service, - lp_unicode(global_loadparm), + lp_unicode(lp_ctx), lp_cli_maxprotocol(global_loadparm)); } } @@ -529,7 +530,7 @@ for any reason, we will have to unmount the mount point. There is no exit from the next call... */ - send_fs_socket(service, mount_point, c); + send_fs_socket(global_loadparm, service, mount_point, c); } @@ -852,6 +853,7 @@ extern char *optarg; extern int optind; char *p; + struct loadparm_context *lp_ctx; DEBUGLEVEL = 1; @@ -882,7 +884,7 @@ } if (getenv(PASSWD)) { - pstrcpy(password,getenv(PASSWD)); + pstrcpy(password, getenv(PASSWD)); got_pass = true; } @@ -895,7 +897,7 @@ pstrcpy(username,getenv(LOGNAME)); } - if (!lp_load(dyn_CONFIGFILE)) { + if (!lp_load(dyn_CONFIGFILE, lp_ctx)) { fprintf(stderr, Can't load %s - run testparm to debug it\n, lp_config_file()); } Modified: branches/SAMBA_4_0/source/client/smbspool.c === --- branches/SAMBA_4_0/source/client/smbspool.c 2007-12-04 00:12:03 UTC (rev 26274) +++ branches/SAMBA_4_0/source/client/smbspool.c 2007-12-04 00:12:13 UTC (rev 26275) @@ -50,6 +50,7 @@ FILE *fp;/* File to print */ int status=0; /* Status of LPD job */ struct smbcli_state *cli;/* SMB interface */ + struct loadparm_context *lp_ctx; /* we expect the URI in argv[0]. Detect the case where it is in argv[1] and cope */ if (argc 2 strncmp(argv[0],smb://, 6) !strncmp(argv[1],smb://, 6)) { @@ -176,13 +177,13 @@ setup_logging(argv[0], DEBUG_STDOUT); - if (!lp_load(dyn_CONFIGFILE)) { + if (!lp_load(dyn_CONFIGFILE, lp_ctx)) { fprintf(stderr, ERROR: Can't load %s - run testparm to debug it\n, lp_config_file()); return (1); } if (workgroup == NULL) -workgroup = lp_workgroup(); +workgroup = lp_workgroup(lp_ctx); do { Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c === --- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2007-12-04 00:12:03 UTC (rev 26274) +++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2007-12-04 00:12:13 UTC (rev 26275) @@ -52,9 +52,9 @@ if (reason == POPT_CALLBACK_REASON_POST) { if (!lp_loaded()) { if (getenv(SMB_CONF_PATH)) - lp_load(getenv(SMB_CONF_PATH)); + lp_load(getenv(SMB_CONF_PATH), NULL); else - lp_load(dyn_CONFIGFILE); + lp_load(dyn_CONFIGFILE, NULL);
svn commit: samba r26269 - in branches/SAMBA_4_0: . source/auth/credentials source/client source/cluster/ctdb source/smbd
Author: jelmer Date: 2007-12-03 23:32:59 + (Mon, 03 Dec 2007) New Revision: 26269 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26269 Log: Fix a couple more references to global_loadparm. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials.c branches/SAMBA_4_0/source/client/cifsdd.c branches/SAMBA_4_0/source/client/smbmount.c branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c branches/SAMBA_4_0/source/smbd/server.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-03 21:25:17 UTC (rev 26268) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-03 23:32:59 UTC (rev 26269) @@ -77,7 +77,7 @@ * Create a new anonymous credential * @param mem_ctx TALLOC_CTX parent for credentials structure */ -struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx) +struct cli_credentials *cli_credentials_init_anon(TALLOC_CTX *mem_ctx) { struct cli_credentials *anon_credentials; Modified: branches/SAMBA_4_0/source/client/cifsdd.c === --- branches/SAMBA_4_0/source/client/cifsdd.c 2007-12-03 21:25:17 UTC (rev 26268) +++ branches/SAMBA_4_0/source/client/cifsdd.c 2007-12-03 23:32:59 UTC (rev 26269) @@ -398,7 +398,7 @@ lp_set_cmdline(lp_ctx, max xmit, buf); } -static int copy_files(void) +static int copy_files(struct loadparm_context *lp_ctx) { uint8_t * iobuf; /* IO buffer. */ uint64_tiomax; /* Size of the IO buffer. */ @@ -595,7 +595,7 @@ CatchSignal(SIGINT, dd_handle_signal); CatchSignal(SIGUSR1, dd_handle_signal); - return(copy_files()); + return(copy_files(global_loadparm)); } /* vim: set sw=8 sts=8 ts=8 tw=79 : */ Modified: branches/SAMBA_4_0/source/client/smbmount.c === --- branches/SAMBA_4_0/source/client/smbmount.c 2007-12-03 21:25:17 UTC (rev 26268) +++ branches/SAMBA_4_0/source/client/smbmount.c 2007-12-03 23:32:59 UTC (rev 26269) @@ -245,7 +245,7 @@ Code blatently stolen from smbumount.c -mhw- / -static void smb_umount(char *mount_point) +static void smb_umount(const char *mount_point) { int fd; struct mntent *mnt; @@ -323,7 +323,7 @@ * not exit after open_sockets() or send_login() errors, * as the smbfs mount would then have no way to recover. */ -static void send_fs_socket(const char *the_service, char *mount_point, struct smbcli_state *c) +static void send_fs_socket(const char *the_service, const char *mount_point, struct smbcli_state *c) { int fd, closed = 0, res = 1; pid_t parentpid = getppid(); Modified: branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c === --- branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-12-03 21:25:17 UTC (rev 26268) +++ branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-12-03 23:32:59 UTC (rev 26269) @@ -197,12 +197,13 @@ }; /* initialise ctdb */ -void cluster_ctdb_init(struct event_context *ev, const char *model) +void cluster_ctdb_init(struct loadparm_context *lp_ctx, + struct event_context *ev, const char *model) { struct cluster_state *state; int ret; - if (!lp_parm_bool(global_loadparm, NULL, ctdb, enable, false)) { + if (!lp_parm_bool(lp_ctx, NULL, ctdb, enable, false)) { return; } Modified: branches/SAMBA_4_0/source/smbd/server.c === --- branches/SAMBA_4_0/source/smbd/server.c 2007-12-03 21:25:17 UTC (rev 26268) +++ branches/SAMBA_4_0/source/smbd/server.c 2007-12-03 23:32:59 UTC (rev 26269) @@ -313,7 +313,7 @@ } /* initialise clustering if needed */ - cluster_ctdb_init(event_ctx, model); + cluster_ctdb_init(global_loadparm, event_ctx, model); if (opt_interactive) { /* catch EOF on stdin */
svn commit: samba r26270 - in branches/SAMBA_4_0: . source/auth/credentials source/cluster/ctdb source/dsdb/samdb/ldb_modules source/lib/cmdline source/librpc/rpc source/scripting/ejs source/torture
Author: jelmer Date: 2007-12-03 23:33:09 + (Mon, 03 Dec 2007) New Revision: 26270 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26270 Log: Require specifying the loadparm_context or NULL to cli_credentials_guess(). Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/auth/credentials/credentials.c branches/SAMBA_4_0/source/auth/credentials/credentials.i branches/SAMBA_4_0/source/auth/credentials/credentials_wrap.c branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.h branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/proxy.c branches/SAMBA_4_0/source/lib/cmdline/popt_credentials.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_wrap.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_rpc.c branches/SAMBA_4_0/source/torture/gentest.c branches/SAMBA_4_0/source/torture/locktest.c branches/SAMBA_4_0/source/torture/masktest.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-03 23:32:59 UTC (rev 26269) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.c2007-12-03 23:33:09 UTC (rev 26270) @@ -635,11 +635,14 @@ * * @param cred Credentials structure to fill in */ -void cli_credentials_guess(struct cli_credentials *cred) +void cli_credentials_guess(struct cli_credentials *cred, + struct loadparm_context *lp_ctx) { char *p; - cli_credentials_set_conf(cred, global_loadparm); + if (lp_ctx != NULL) { + cli_credentials_set_conf(cred, global_loadparm); + } if (getenv(LOGNAME)) { cli_credentials_set_username(cred, getenv(LOGNAME), CRED_GUESS_ENV); Modified: branches/SAMBA_4_0/source/auth/credentials/credentials.i === --- branches/SAMBA_4_0/source/auth/credentials/credentials.i2007-12-03 23:32:59 UTC (rev 26269) +++ branches/SAMBA_4_0/source/auth/credentials/credentials.i2007-12-03 23:33:09 UTC (rev 26270) @@ -85,7 +85,7 @@ bool set_workstation(const char *workstation, enum credentials_obtained obtained=CRED_SPECIFIED); -void guess(void); +void guess(struct loadparm_context *lp_ctx = NULL); bool is_anonymous(void); const struct samr_Password *get_nt_hash(TALLOC_CTX *mem_ctx); Modified: branches/SAMBA_4_0/source/auth/credentials/credentials_wrap.c === --- branches/SAMBA_4_0/source/auth/credentials/credentials_wrap.c 2007-12-03 23:32:59 UTC (rev 26269) +++ branches/SAMBA_4_0/source/auth/credentials/credentials_wrap.c 2007-12-03 23:33:09 UTC (rev 26270) @@ -2459,8 +2459,9 @@ #define SWIGTYPE_p_TALLOC_CTX swig_types[0] #define SWIGTYPE_p_char swig_types[1] #define SWIGTYPE_p_cli_credentials swig_types[2] -static swig_type_info *swig_types[4]; -static swig_module_info swig_module = {swig_types, 3, 0, 0, 0, 0}; +#define SWIGTYPE_p_loadparm_context swig_types[3] +static swig_type_info *swig_types[5]; +static swig_module_info swig_module = {swig_types, 4, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(swig_module, swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(swig_module, swig_module, name) @@ -3351,17 +3352,21 @@ SWIGINTERN PyObject *_wrap_Credentials_guess(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) { PyObject *resultobj = 0; cli_credentials *arg1 = (cli_credentials *) 0 ; + struct loadparm_context *arg2 = (struct loadparm_context *) NULL ; void *argp1 = 0 ; int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; char * kwnames[] = { -(char *) self, NULL +(char *) self,(char *) lp_ctx, NULL }; { arg1 = NULL; } - if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)|O:Credentials_guess,kwnames,obj0)) SWIG_fail; + if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)|OO:Credentials_guess,kwnames,obj0,obj1)) SWIG_fail; if (obj0) { res1 = SWIG_ConvertPtr(obj0, argp1,SWIGTYPE_p_cli_credentials, 0 | 0 ); if (!SWIG_IsOK(res1)) { @@ -3369,7 +3374,14 @@ } arg1 = (cli_credentials *)(argp1); } - cli_credentials_guess(arg1); + if (obj1) { +res2 = SWIG_ConvertPtr(obj1, argp2,SWIGTYPE_p_loadparm_context, 0 | 0 ); +if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), in method ' Credentials_guess ', argument 2 of type ' struct loadparm_context *'); +} +arg2 =
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-450-gf9c8d62
The branch, v3-2-test has been updated via f9c8d62389f8cb47837e5360209936176537df13 (commit) from 0ccd87c56b34bdc34c73d700d21544fe269f9141 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit f9c8d62389f8cb47837e5360209936176537df13 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 17:17:05 2007 -0800 Make strhex_to_str clear on string limits. Remove pstring from web/*.c Jeremy. --- Summary of changes: source/lib/util_str.c | 14 -- source/libads/ldap.c |4 +- source/rpc_parse/parse_misc.c |6 ++- source/web/cgi.c | 36 --- source/web/startstop.c| 48 ++-- source/web/statuspage.c | 29 source/web/swat.c | 99 7 files changed, 138 insertions(+), 98 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/util_str.c b/source/lib/util_str.c index a0ca03a..7cd0f78 100644 --- a/source/lib/util_str.c +++ b/source/lib/util_str.c @@ -1034,7 +1034,7 @@ static char *strncpyn(char *dest, const char *src, size_t n, char c) **/ -size_t strhex_to_str(char *p, size_t len, const char *strhex) +size_t strhex_to_str(char *buf, size_t buf_len, const char *strhex, size_t strhex_len) { size_t i; size_t num_chars = 0; @@ -1042,7 +1042,7 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex) const char *hexchars = 0123456789ABCDEF; char *p1 = NULL, *p2 = NULL; - for (i = 0; i len strhex[i] != 0; i++) { + for (i = 0; i strhex_len strhex[i] != 0; i++) { if (strnequal(hexchars, 0x, 2)) { i++; /* skip two chars */ continue; @@ -1060,7 +1060,10 @@ size_t strhex_to_str(char *p, size_t len, const char *strhex) hinybble = PTR_DIFF(p1, hexchars); lonybble = PTR_DIFF(p2, hexchars); - p[num_chars] = (hinybble 4) | lonybble; + if (num_chars = buf_len) { + break; + } + buf[num_chars] = (hinybble 4) | lonybble; num_chars++; p1 = NULL; @@ -1079,8 +1082,9 @@ DATA_BLOB strhex_to_data_blob(TALLOC_CTX *mem_ctx, const char *strhex) ret_blob = data_blob(NULL, strlen(strhex)/2+1); ret_blob.length = strhex_to_str((char*)ret_blob.data, - strlen(strhex), - strhex); + ret_blob.length, + strhex, + strlen(strhex)); return ret_blob; } diff --git a/source/libads/ldap.c b/source/libads/ldap.c index 533aa30..a4ba376 100644 --- a/source/libads/ldap.c +++ b/source/libads/ldap.c @@ -2853,10 +2853,10 @@ bool ads_get_sid_from_extended_dn(TALLOC_CTX *mem_ctx, } break; case ADS_EXTENDED_DN_HEX_STRING: { - pstring buf; + fstring buf; size_t buf_len; - buf_len = strhex_to_str(buf, strlen(p), p); + buf_len = strhex_to_str(buf, sizeof(buf), p, strlen(p)); if (buf_len == 0) { return False; } diff --git a/source/rpc_parse/parse_misc.c b/source/rpc_parse/parse_misc.c index 783c7fb..9e1937e 100644 --- a/source/rpc_parse/parse_misc.c +++ b/source/rpc_parse/parse_misc.c @@ -509,8 +509,10 @@ void init_rpc_blob_hex(RPC_DATA_BLOB *str, const char *buf) { ZERO_STRUCTP(str); if (buf *buf) { - create_rpc_blob(str, strlen(buf)); - str-buf_len = strhex_to_str((char *)str-buffer, str-buf_len, buf); + size_t len = strlen(buf); + create_rpc_blob(str, len); + str-buf_len = strhex_to_str((char *)str-buffer, str-buf_len, + buf, len); } } diff --git a/source/web/cgi.c b/source/web/cgi.c index 41ac29b..07a6fbc 100644 --- a/source/web/cgi.c +++ b/source/web/cgi.c @@ -173,7 +173,7 @@ void cgi_load_variables(void) variables[num_variables].name = SMB_STRDUP(tok); variables[num_variables].value = SMB_STRDUP(p+1); - if (!variables[num_variables].name || + if (!variables[num_variables].name || !variables[num_variables].value) continue; @@ -186,32 +186,36 @@ void cgi_load_variables(void) printf(!== Commandline var %s has value \%s\ ==\n, variables[num_variables].name,
svn commit: samba r26278 - in branches/SAMBA_4_0: . source/lib/charset source/param source/smbd source/torture
Author: jelmer Date: 2007-12-04 01:51:44 + (Tue, 04 Dec 2007) New Revision: 26278 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26278 Log: Tallocify convenience table for iconv handles. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/charset/charcnv.c branches/SAMBA_4_0/source/lib/charset/charset.h branches/SAMBA_4_0/source/param/loadparm.c branches/SAMBA_4_0/source/smbd/process_standard.c branches/SAMBA_4_0/source/torture/masktest.c branches/SAMBA_4_0/source/torture/smbtorture.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/charset/charcnv.c === --- branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-04 01:51:36 UTC (rev 26277) +++ branches/SAMBA_4_0/source/lib/charset/charcnv.c 2007-12-04 01:51:44 UTC (rev 26278) @@ -38,16 +38,26 @@ * @sa lib/iconv.c */ +struct smb_iconv_convenience { + const char *unix_charset; + const char *dos_charset; + const char *display_charset; + smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS]; +}; + +static struct smb_iconv_convenience *global_smb_iconv_convenience = NULL; + + /** * Return the name of a charset to give to iconv(). **/ -static const char *charset_name(struct loadparm_context *lp_ctx, charset_t ch) +static const char *charset_name(struct smb_iconv_convenience *ic, charset_t ch) { switch (ch) { case CH_UTF16: return UTF-16LE; - case CH_UNIX: return lp_unix_charset(lp_ctx); - case CH_DOS: return lp_dos_charset(lp_ctx); - case CH_DISPLAY: return lp_display_charset(lp_ctx); + case CH_UNIX: return ic-unix_charset; + case CH_DOS: return ic-dos_charset; + case CH_DISPLAY: return ic-display_charset; case CH_UTF8: return UTF8; case CH_UTF16BE: return UTF-16BE; default: @@ -55,31 +65,57 @@ } } -static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS]; - /** re-initialize iconv conversion descriptors **/ -_PUBLIC_ void close_iconv(void) +static int close_iconv(struct smb_iconv_convenience *data) { unsigned c1, c2; for (c1=0;c1NUM_CHARSETS;c1++) { for (c2=0;c2NUM_CHARSETS;c2++) { - if (conv_handles[c1][c2] != NULL) { - if (conv_handles[c1][c2] != (smb_iconv_t)-1) { - smb_iconv_close(conv_handles[c1][c2]); + if (data-conv_handles[c1][c2] != NULL) { + if (data-conv_handles[c1][c2] != (smb_iconv_t)-1) { + smb_iconv_close(data-conv_handles[c1][c2]); } - conv_handles[c1][c2] = NULL; + data-conv_handles[c1][c2] = NULL; } } } + return 0; } +struct smb_iconv_convenience *smb_iconv_convenience_init(TALLOC_CTX *mem_ctx, +struct loadparm_context *lp_ctx) +{ + struct smb_iconv_convenience *ret = talloc_zero(mem_ctx, + struct smb_iconv_convenience); + + talloc_set_destructor(ret, close_iconv); + + ret-display_charset = talloc_strdup(ret, lp_display_charset(lp_ctx)); + ret-dos_charset = talloc_strdup(ret, lp_dos_charset(lp_ctx)); + ret-unix_charset = talloc_strdup(ret, lp_unix_charset(lp_ctx)); + + return ret; +} + + +_PUBLIC_ void reload_charcnv(void) +{ + talloc_free(global_smb_iconv_convenience); + global_smb_iconv_convenience = smb_iconv_convenience_init(talloc_autofree_context(), global_loadparm); +} + +static void free_global_smb_iconv_convenience(void) +{ + talloc_free(global_smb_iconv_convenience); +} + /* on-demand initialisation of conversion handles */ -static smb_iconv_t get_conv_handle(struct loadparm_context *lp_ctx, +static smb_iconv_t get_conv_handle(struct smb_iconv_convenience *ic, charset_t from, charset_t to) { const char *n1, *n2; @@ -98,34 +134,33 @@ */ setlocale(LC_ALL, C); #endif - - atexit(close_iconv); + atexit(free_global_smb_iconv_convenience); } - if (conv_handles[from][to]) { - return conv_handles[from][to]; + if (ic-conv_handles[from][to]) { + return ic-conv_handles[from][to]; } - n1 = charset_name(lp_ctx, from); - n2 = charset_name(lp_ctx, to); + n1 = charset_name(ic, from); + n2 = charset_name(ic, to); - conv_handles[from][to] = smb_iconv_open(n2,n1); +
svn commit: samba r26279 - in branches/SAMBA_4_0: . source/build/smb_build
Author: jelmer Date: 2007-12-04 01:51:48 + (Tue, 04 Dec 2007) New Revision: 26279 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26279 Log: Don't compile any python stuff if python is not available. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/build/smb_build/input.pm Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/build/smb_build/input.pm === --- branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-12-04 01:51:44 UTC (rev 26278) +++ branches/SAMBA_4_0/source/build/smb_build/input.pm 2007-12-04 01:51:48 UTC (rev 26279) @@ -150,6 +150,8 @@ { my ($INPUT, $python) = @_; + return if ($INPUT-{LIBPYTHON}{ENABLE} ne YES); + $python-{INSTALLDIR} = PYTHONDIR; push (@{$python-{PUBLIC_DEPENDENCIES}}, LIBPYTHON); if (defined($python-{SWIG_FILE})) {
svn commit: samba r26280 - in branches/SAMBA_4_0: . source/lib/talloc
Author: jelmer Date: 2007-12-04 02:04:25 + (Tue, 04 Dec 2007) New Revision: 26280 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26280 Log: Fix installation if swig is not available. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/talloc/Makefile.in Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/talloc/Makefile.in === --- branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-12-04 01:51:48 UTC (rev 26279) +++ branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-12-04 02:04:25 UTC (rev 26280) @@ -57,7 +57,7 @@ ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi - which swig /dev/null 21 ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` + which swig /dev/null 21 ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` || true doc: talloc.3 talloc.3.html
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-451-g9ccac8a
The branch, v3-2-test has been updated via 9ccac8abb0420393569dbca73e7daf2742aa1099 (commit) from f9c8d62389f8cb47837e5360209936176537df13 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 9ccac8abb0420393569dbca73e7daf2742aa1099 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 17:57:46 2007 -0800 Remove more pstrings, from the winbindd protocol def and inside winbindd. Remove unused pstring types. Jeremy. --- Summary of changes: source/include/smb.h |4 source/nsswitch/winbind_struct_protocol.h |6 +++--- source/winbindd/winbindd.h|8 source/winbindd/winbindd_dual.c | 13 + 4 files changed, 16 insertions(+), 15 deletions(-) Changeset truncated at 500 lines: diff --git a/source/include/smb.h b/source/include/smb.h index f85c734..1d787f5 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -150,10 +150,6 @@ typedef union unid_t { typedef uint16 smb_ucs2_t; -/* ucs2 string types. */ -typedef smb_ucs2_t wpstring[PSTRING_LEN]; -typedef smb_ucs2_t wfstring[FSTRING_LEN]; - #ifdef WORDS_BIGENDIAN #define UCS2_SHIFT 8 #else diff --git a/source/nsswitch/winbind_struct_protocol.h b/source/nsswitch/winbind_struct_protocol.h index 0e3ad8b..e780cad 100644 --- a/source/nsswitch/winbind_struct_protocol.h +++ b/source/nsswitch/winbind_struct_protocol.h @@ -243,10 +243,10 @@ struct winbindd_request { struct { /* We deliberatedly don't split into domain/user to avoid having the client know what the separator - character is. */ + character is. */ fstring user; fstring pass; - pstring require_membership_of_sid; + char require_membership_of_sid[1024]; fstring krb5_cc_type; uid_t uid; } auth; /* pam_winbind auth module */ @@ -287,7 +287,7 @@ struct winbindd_request { fstring sid; /* lookupsid, sid_to_[ug]id */ struct { fstring dom_name; /* lookupname */ - fstring name; + fstring name; } name; uint32_t num_entries; /* getpwent, getgrent */ struct { diff --git a/source/winbindd/winbindd.h b/source/winbindd/winbindd.h index 454a4b9..248bcff 100644 --- a/source/winbindd/winbindd.h +++ b/source/winbindd/winbindd.h @@ -150,7 +150,7 @@ struct winbindd_child { pid_t pid; struct winbindd_domain *domain; - pstring logfilename; + char *logfilename; struct fd_event event; struct timed_event *lockout_policy_event; @@ -166,8 +166,8 @@ struct winbindd_domain { fstring alt_name; /* alt Domain name, if any (FQDN for ADS) */ fstring forest_name; /* Name of the AD forest we're in */ DOM_SID sid; /* SID for this domain */ - uint32 domain_flags; /* Domain flags from rpc_ds.h */ - uint32 domain_type;/* Domain type from rpc_ds.h */ + uint32 domain_flags; /* Domain flags from rpc_ds.h */ + uint32 domain_type;/* Domain type from rpc_ds.h */ uint32 domain_trust_attribs; /* Trust attribs from rpc_ds.h */ bool initialized; /* Did we already ask for the domain mode? */ bool native_mode; /* is this a win2k domain in native mode ? */ @@ -187,7 +187,7 @@ struct winbindd_domain { /* Private data for the backends (used for connection cache) */ - void *private_data; + void *private_data; /* A working DC */ fstring dcname; diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c index c15af71..91e60cc 100644 --- a/source/winbindd/winbindd_dual.c +++ b/source/winbindd/winbindd_dual.c @@ -471,11 +471,15 @@ void setup_domain_child(struct winbindd_domain *domain, const char *explicit_logfile) { if (explicit_logfile != NULL) { - pstr_sprintf(child-logfilename, %s/log.winbindd-%s, -dyn_LOGFILEBASE, explicit_logfile); + if (asprintf(child-logfilename, %s/log.winbindd-%s, +dyn_LOGFILEBASE, explicit_logfile) 0) { + smb_panic(Internal error: asprintf failed); + } } else if (domain != NULL) { - pstr_sprintf(child-logfilename, %s/log.wb-%s, -
svn commit: samba r26277 - in branches/SAMBA_4_0: . source/client source/kdc source/lib/ldb/tools source/libcli/ldap source/libnet source/librpc/rpc
Author: jelmer Date: 2007-12-04 01:51:36 + (Tue, 04 Dec 2007) New Revision: 26277 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26277 Log: Move loadparm context higher up the stack. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/client/smbmount.c branches/SAMBA_4_0/source/kdc/hdb-ldb.c branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c branches/SAMBA_4_0/source/libnet/libnet_become_dc.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc.h branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/client/smbmount.c === --- branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 01:37:28 UTC (rev 26276) +++ branches/SAMBA_4_0/source/client/smbmount.c 2007-12-04 01:51:36 UTC (rev 26277) @@ -409,7 +409,7 @@ DEBUG(2,(mount.smbfs[%d]: got signal, getting new socket\n, sys_getpid())); c = do_connection(the_service, lp_unicode(lp_ctx), - lp_cli_maxprotocol(global_loadparm)); + lp_cli_maxprotocol(lp_ctx)); } } @@ -422,7 +422,7 @@ /** * Mount a smbfs **/ -static void init_mount(void) +static void init_mount(struct loadparm_context *lp_ctx) { char mount_point[MAXPATHLEN+1]; pstring tmp; @@ -437,7 +437,7 @@ } - c = do_connection(service, lp_unicode(global_loadparm), lp_cli_maxprotocol(global_loadparm)); + c = do_connection(service, lp_unicode(lp_ctx), lp_cli_maxprotocol(lp_ctx)); if (!c) { fprintf(stderr,SMB connection failed\n); exit(1); @@ -530,7 +530,7 @@ for any reason, we will have to unmount the mount point. There is no exit from the next call... */ - send_fs_socket(global_loadparm, service, mount_point, c); + send_fs_socket(lp_ctx, service, mount_point, c); } @@ -923,6 +923,6 @@ } strupper(my_netbios_name); - init_mount(); + init_mount(global_loadparm); return 0; } Modified: branches/SAMBA_4_0/source/kdc/hdb-ldb.c === --- branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2007-12-04 01:37:28 UTC (rev 26276) +++ branches/SAMBA_4_0/source/kdc/hdb-ldb.c 2007-12-04 01:51:36 UTC (rev 26277) @@ -1134,7 +1134,7 @@ CRED_DONT_USE_KERBEROS); /* Setup the link to LDB */ - (*db)-hdb_db = samdb_connect(*db, global_loadparm, session_info); + (*db)-hdb_db = samdb_connect(*db, lp_ctx, session_info); if ((*db)-hdb_db == NULL) { DEBUG(1, (hdb_ldb_create: Cannot open samdb for KDC backend!)); return NT_STATUS_CANT_ACCESS_DOMAIN_INFO; Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c === --- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2007-12-04 01:37:28 UTC (rev 26276) +++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2007-12-04 01:51:36 UTC (rev 26277) @@ -39,7 +39,8 @@ /** process command line options */ -struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, int argc, const char **argv, +struct ldb_cmdline *ldb_cmdline_process(struct ldb_context *ldb, + int argc, const char **argv, void (*usage)(void)) { static struct ldb_cmdline options; /* needs to be static for older compilers */ Modified: branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c === --- branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c 2007-12-04 01:37:28 UTC (rev 26276) +++ branches/SAMBA_4_0/source/libcli/ldap/ldap_bind.c 2007-12-04 01:51:36 UTC (rev 26277) @@ -199,7 +199,8 @@ /* perform a sasl bind using the given credentials */ -NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds) +NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, + struct cli_credentials *creds) { NTSTATUS status; TALLOC_CTX *tmp_ctx = NULL; Modified: branches/SAMBA_4_0/source/libnet/libnet_become_dc.c === --- branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-12-04 01:37:28 UTC (rev 26276) +++ branches/SAMBA_4_0/source/libnet/libnet_become_dc.c 2007-12-04 01:51:36 UTC (rev 26277) @@ -784,7 +784,8 @@ becomeDC_connect_ldap1(s); }
svn commit: samba r26276 - in branches/SAMBA_4_0: . source/lib/ldb source/lib/talloc source/lib/tdb
Author: jelmer Date: 2007-12-04 01:37:28 + (Tue, 04 Dec 2007) New Revision: 26276 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26276 Log: Install SWIG files if swig is present. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/ldb/Makefile.in branches/SAMBA_4_0/source/lib/talloc/Makefile.in branches/SAMBA_4_0/source/lib/tdb/Makefile.in Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/ldb/Makefile.in === --- branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-12-04 00:12:13 UTC (rev 26275) +++ branches/SAMBA_4_0/source/lib/ldb/Makefile.in 2007-12-04 01:37:28 UTC (rev 26276) @@ -244,6 +244,9 @@ install-python: build-python ./setup.py install --prefix=$(prefix) +install-swig: + cp ldb.i `$(SWIG) -swiglib` + check-python: build-python # FIXME: This isn't portable LD_LIBRARY_PATH=lib PYTHONPATH=.:build/lib.linux-i686-2.4/ trial tests/python/api.py Modified: branches/SAMBA_4_0/source/lib/talloc/Makefile.in === --- branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-12-04 00:12:13 UTC (rev 26275) +++ branches/SAMBA_4_0/source/lib/talloc/Makefile.in2007-12-04 01:37:28 UTC (rev 26276) @@ -57,6 +57,7 @@ ${INSTALLCMD} -m 644 talloc.pc $(DESTDIR)$(libdir)/pkgconfig if [ -f talloc.3 ];then ${INSTALLCMD} -d $(DESTDIR)$(mandir)/man3; fi if [ -f talloc.3 ];then ${INSTALLCMD} -m 644 talloc.3 $(DESTDIR)$(mandir)/man3; fi + which swig /dev/null 21 ${INSTALLCMD} -m 644 talloc.i $(DESTDIR)`swig -swiglib` doc: talloc.3 talloc.3.html Modified: branches/SAMBA_4_0/source/lib/tdb/Makefile.in === --- branches/SAMBA_4_0/source/lib/tdb/Makefile.in 2007-12-04 00:12:13 UTC (rev 26275) +++ branches/SAMBA_4_0/source/lib/tdb/Makefile.in 2007-12-04 01:37:28 UTC (rev 26276) @@ -125,5 +125,8 @@ # FIXME: Should be more portable: LD_LIBRARY_PATH=. PYTHONPATH=.:build/lib.linux-i686-2.4 trial python/tests/simple.py +install-swig: + cp tdb.i `swig -swiglib` + clean-python: ./setup.py clean
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-452-g0411635
The branch, v3-2-test has been updated via 041163551194102ca67fef52c57d87020a1d09bc (commit) from 9ccac8abb0420393569dbca73e7daf2742aa1099 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 041163551194102ca67fef52c57d87020a1d09bc Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 18:48:41 2007 -0800 Getting to the home stretch for elimination of pstrings... Jeremy. --- Summary of changes: source/utils/ntlm_auth.c | 92 +++-- source/utils/pdbedit.c| 26 ++-- source/utils/profiles.c | 63 +++ source/utils/smbcacls.c | 60 - source/utils/smbcquotas.c | 92 +--- source/utils/smbfilter.c | 10 ++-- source/utils/smbpasswd.c |7 +-- source/utils/smbtree.c| 25 source/utils/testparm.c | 22 ++- 9 files changed, 238 insertions(+), 159 deletions(-) Changeset truncated at 500 lines: diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c index 18db15d..9312503 100644 --- a/source/utils/ntlm_auth.c +++ b/source/utils/ntlm_auth.c @@ -252,7 +252,7 @@ static bool get_require_membership_sid(void) { } /* Authenticate a user with a plaintext password */ -static bool check_plaintext_auth(const char *user, const char *pass, +static bool check_plaintext_auth(const char *user, const char *pass, bool stdout_diagnostics) { struct winbindd_request request; @@ -270,49 +270,52 @@ static bool check_plaintext_auth(const char *user, const char *pass, fstrcpy(request.data.auth.user, user); fstrcpy(request.data.auth.pass, pass); - if (require_membership_of_sid) - pstrcpy(request.data.auth.require_membership_of_sid, require_membership_of_sid); + if (require_membership_of_sid) { + strlcpy(request.data.auth.require_membership_of_sid, + require_membership_of_sid, + sizeof(request.data.auth.require_membership_of_sid)); + } result = winbindd_request_response(WINBINDD_PAM_AUTH, request, response); /* Display response */ - + if (stdout_diagnostics) { if ((result != NSS_STATUS_SUCCESS) (response.data.auth.nt_status == 0)) { d_printf(Reading winbind reply failed! (0x01)\n); } - - d_printf(%s: %s (0x%x)\n, -response.data.auth.nt_status_string, -response.data.auth.error_string, + + d_printf(%s: %s (0x%x)\n, +response.data.auth.nt_status_string, +response.data.auth.error_string, response.data.auth.nt_status); } else { if ((result != NSS_STATUS_SUCCESS) (response.data.auth.nt_status == 0)) { DEBUG(1, (Reading winbind reply failed! (0x01)\n)); } - - DEBUG(3, (%s: %s (0x%x)\n, - response.data.auth.nt_status_string, + + DEBUG(3, (%s: %s (0x%x)\n, + response.data.auth.nt_status_string, response.data.auth.error_string, - response.data.auth.nt_status)); + response.data.auth.nt_status)); } - + return (result == NSS_STATUS_SUCCESS); } /* authenticate a user with an encrypted username/password */ -NTSTATUS contact_winbind_auth_crap(const char *username, - const char *domain, +NTSTATUS contact_winbind_auth_crap(const char *username, + const char *domain, const char *workstation, - const DATA_BLOB *challenge, - const DATA_BLOB *lm_response, - const DATA_BLOB *nt_response, - uint32 flags, - uint8 lm_key[8], - uint8 user_session_key[16], - char **error_string, - char **unix_name) + const DATA_BLOB *challenge, + const DATA_BLOB *lm_response, + const DATA_BLOB *nt_response, + uint32 flags, + uint8 lm_key[8], + uint8 user_session_key[16], + char **error_string, +
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-453-g0551ee3
The branch, v3-2-test has been updated via 0551ee3402daebe5b96a66162d7702ca5a31da52 (commit) from 041163551194102ca67fef52c57d87020a1d09bc (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 0551ee3402daebe5b96a66162d7702ca5a31da52 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 18:56:54 2007 -0800 Don't forget to delete the stackframe. Jeremy. --- Summary of changes: source/libsmb/clidfs.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/clidfs.c b/source/libsmb/clidfs.c index 8ff358e..32a2c31 100644 --- a/source/libsmb/clidfs.c +++ b/source/libsmb/clidfs.c @@ -873,6 +873,7 @@ bool cli_resolve_path_pstring( const char *mountpt, if (tpath) { pstrcpy(targetpath, tpath); } + TALLOC_FREE(ctx); return ret; } -- Samba Shared Repository
svn commit: samba r26281 - in branches/SAMBA_4_0: . source/lib/tdb
Author: jelmer Date: 2007-12-04 03:13:12 + (Tue, 04 Dec 2007) New Revision: 26281 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26281 Log: Fix include. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/lib/tdb/tdb.i branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:revision-info ...skipped... Name: bzr:revision-id:v3-trunk0 ...skipped... Modified: branches/SAMBA_4_0/source/lib/tdb/tdb.i === --- branches/SAMBA_4_0/source/lib/tdb/tdb.i 2007-12-04 02:04:25 UTC (rev 26280) +++ branches/SAMBA_4_0/source/lib/tdb/tdb.i 2007-12-04 03:13:12 UTC (rev 26281) @@ -36,6 +36,7 @@ #endif /* Include tdb headers */ +#include stdint.h #include signal.h #include tdb.h #include fcntl.h Modified: branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c === --- branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c2007-12-04 02:04:25 UTC (rev 26280) +++ branches/SAMBA_4_0/source/lib/tdb/tdb_wrap.c2007-12-04 03:13:12 UTC (rev 26281) @@ -2504,6 +2504,7 @@ #endif /* Include tdb headers */ +#include stdint.h #include signal.h #include tdb.h #include fcntl.h
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-unstable-454-gf1555f4
The branch, v3-2-test has been updated via f1555f4f0d66e57fd19f200f842e4d05527accd5 (commit) from 0551ee3402daebe5b96a66162d7702ca5a31da52 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit f1555f4f0d66e57fd19f200f842e4d05527accd5 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 3 19:19:19 2007 -0800 Gone from usershare. Jeremy. --- Summary of changes: source/utils/net_usershare.c | 212 ++ 1 files changed, 151 insertions(+), 61 deletions(-) Changeset truncated at 500 lines: diff --git a/source/utils/net_usershare.c b/source/utils/net_usershare.c index 19fa8fa..f95b1bd 100644 --- a/source/utils/net_usershare.c +++ b/source/utils/net_usershare.c @@ -127,12 +127,17 @@ int net_usershare_usage(int argc, const char **argv) /*** ***/ -static void get_basepath(pstring basepath) +static char *get_basepath(TALLOC_CTX *ctx) { - pstrcpy(basepath, lp_usershare_path()); + char *basepath = talloc_strdup(ctx, lp_usershare_path()); + + if (!basepath) { + return NULL; + } if ((basepath[0] != '\0') (basepath[strlen(basepath)-1] == '/')) { basepath[strlen(basepath)-1] = '\0'; } + return basepath; } /*** @@ -141,7 +146,7 @@ static void get_basepath(pstring basepath) static int net_usershare_delete(int argc, const char **argv) { - pstring us_path; + char *us_path; char *sharename; if (argc != 1) { @@ -161,9 +166,14 @@ static int net_usershare_delete(int argc, const char **argv) return -1; } - pstrcpy(us_path, lp_usershare_path()); - pstrcat(us_path, /); - pstrcat(us_path, sharename); + us_path = talloc_asprintf(talloc_tos(), + %s/%s, + lp_usershare_path(), + sharename); + if (!us_path) { + SAFE_FREE(sharename); + return -1; + } if (unlink(us_path) != 0) { d_fprintf(stderr, net usershare delete: unable to remove usershare %s. @@ -196,9 +206,11 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) SMB_STRUCT_DIRENT *de; uid_t myuid = geteuid(); struct file_list *fl = NULL; - pstring basepath; + char *basepath = get_basepath(ctx); - get_basepath(basepath); + if (!basepath) { + return -1; + } dp = sys_opendir(basepath); if (!dp) { d_fprintf(stderr, get_share_list: cannot open usershare directory %s. Error %s\n, @@ -208,7 +220,7 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) while((de = sys_readdir(dp)) != 0) { SMB_STRUCT_STAT sbuf; - pstring path; + char *path; const char *n = de-d_name; /* Ignore . and .. */ @@ -222,9 +234,14 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) d_fprintf(stderr, get_share_list: ignoring bad share name %s\n,n); continue; } - pstrcpy(path, basepath); - pstrcat(path, /); - pstrcat(path, n); + path = talloc_asprintf(ctx, + %s/%s, + basepath, + n); + if (!path) { + sys_closedir(dp); + return -1; + } if (sys_lstat(path, sbuf) != 0) { d_fprintf(stderr, get_share_list: can't lstat file %s. Error was %s\n, @@ -246,13 +263,15 @@ static int get_share_list(TALLOC_CTX *ctx, const char *wcard, bool only_ours) continue; } - /* (Finally) - add to list. */ + /* (Finally) - add to list. */ fl = TALLOC_P(ctx, struct file_list); if (!fl) { + sys_closedir(dp); return -1; } fl-pathname = talloc_strdup(ctx, n); if (!fl-pathname) { + sys_closedir(dp); return -1; } @@ -299,10 +318,10 @@ static int info_fn(struct file_list *fl, void *priv) int fd = -1; int numlines = 0; SEC_DESC *psd = NULL; - pstring basepath; + char *basepath;
svn commit: samba r26282 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: abartlet Date: 2007-12-04 03:37:41 + (Tue, 04 Dec 2007) New Revision: 26282 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26282 Log: These modules expect errors, but if we don't wipe the error string, we get phony error strings at the caller, which is very confusing. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c 2007-12-04 03:13:12 UTC (rev 26281) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/objectclass.c 2007-12-04 03:37:41 UTC (rev 26282) @@ -453,6 +453,9 @@ if (ac-search_res == NULL) { if (ldb_dn_compare(ldb_get_root_basedn(ac-module-ldb), ac-orig_req-op.add.message-dn) == 0) { /* Allow the tree to be started */ + + /* but don't keep any error string, it's meaningless */ + ldb_set_errstring(ac-module-ldb, NULL); } else { ldb_asprintf_errstring(ac-module-ldb, objectclass: Cannot add %s, parent does not exist!, ldb_dn_get_linearized(ac-orig_req-op.add.message-dn)); Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c 2007-12-04 03:13:12 UTC (rev 26281) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c 2007-12-04 03:37:41 UTC (rev 26282) @@ -89,6 +89,10 @@ } *req = *ac-orig_req; + /* Ensure any (io) errors during the search for +* children don't propgate back in the error string */ + ldb_set_errstr(ac-module-ldb, NULL); + ac-down_req = req; ac-step = SD_DO_DEL; return ldb_next_request(ac-module, req);
svn commit: samba r26283 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: abartlet Date: 2007-12-04 03:38:35 + (Tue, 04 Dec 2007) New Revision: 26283 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26283 Log: fix typo Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c 2007-12-04 03:37:41 UTC (rev 26282) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/subtree_delete.c 2007-12-04 03:38:35 UTC (rev 26283) @@ -91,7 +91,7 @@ /* Ensure any (io) errors during the search for * children don't propgate back in the error string */ - ldb_set_errstr(ac-module-ldb, NULL); + ldb_set_errstring(ac-module-ldb, NULL); ac-down_req = req; ac-step = SD_DO_DEL;
Rev 686: update release number and changelog in http://samba.org/~tridge/ctdb
revno: 686 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2007-12-04 15:50:43 +1100 message: update release number and changelog modified: packaging/RPM/ctdb.specctdb.spec-20070527204758-biuh7znabuwan3zn-3 === modified file 'packaging/RPM/ctdb.spec' --- a/packaging/RPM/ctdb.spec 2007-11-18 04:15:19 + +++ b/packaging/RPM/ctdb.spec 2007-12-04 04:50:43 + @@ -5,7 +5,7 @@ Packager: Samba Team [EMAIL PROTECTED] Name: ctdb Version: 1.0 -Release: 16 +Release: 17 Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -115,3 +115,13 @@ %{_mandir}/man1/onnode.1.gz %{_includedir}/ctdb.h %{_includedir}/ctdb_private.h + +%changelog +* Tue Dec 04 2007 : Version 1.0.17 + - fixed bugs related to ban/unban of nodes + - fixed a race condition that could lead to monitoring being permanently disabled, + which would lead to long recovery times + - make deterministic IPs the default + - fixed a bug related to continuous recovery + - added a debugging option --node-ip +
Rev 684: make DeterministicIPs the default in http://samba.org/~tridge/ctdb
revno: 684 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2007-12-04 15:18:27 +1100 message: make DeterministicIPs the default modified: server/ctdb_tunables.c ctdb_tunables.c-20070604095258-4m34d7cm1qa7yos9-1 === modified file 'server/ctdb_tunables.c' --- a/server/ctdb_tunables.c2007-11-11 23:23:35 + +++ b/server/ctdb_tunables.c2007-12-04 04:18:27 + @@ -44,7 +44,7 @@ { DatabaseHashSize, 1, offsetof(struct ctdb_tunable, database_hash_size) }, { RerecoveryTimeout, 10, offsetof(struct ctdb_tunable, rerecovery_timeout) }, { EnableBans, 1, offsetof(struct ctdb_tunable, enable_bans) }, - { DeterministicIPs, 0, offsetof(struct ctdb_tunable, deterministic_public_ips) }, + { DeterministicIPs, 1, offsetof(struct ctdb_tunable, deterministic_public_ips) }, }; /*
Rev 685: merge from ronnie in http://samba.org/~tridge/ctdb
revno: 685 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2007-12-04 15:20:40 +1100 message: merge from ronnie modified: server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 tools/ctdb.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 revno: 432.1.369 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Mon 2007-12-03 15:45:53 +1100 message: rework banning/unbanning nodes ctdb_recoverd.c Always handle banning/unbanning locally on the node that is being banned/unbanned instead of on the recovery master. This means that if a ban request comes in to the recovery master for a remote node, we pass the request on to the remote node instead of setting up the ban and ban timeouts locally. ctdb.c send ban/unban requests to the node being banned/unbanned instead of to the recmaster modified: server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 tools/ctdb.c ctdb_control.c-20070426122705-9ehj1l5lu2gn9kuj-1 revno: 432.1.368 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Mon 2007-12-03 11:39:17 +1100 message: for the banned status, we should allocate this structure as a child of the banned_nodes array and not the rec structure so that ban_state is destroyed when the banned_nodes array gets destroyed (and so that when this struct is destroyed, that any pending ctdb_ban_timeout events are also destroyed.) othervise we may end up with multiple ban_timeout timed events going in parallell since we destroy/recreate the banned_nodes structure during election but we never destroy/recreate the rec structure. modified: server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 revno: 432.1.367 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Mon 2007-12-03 10:21:45 +1100 message: merge from tridge modified: server/ctdb_monitor.c ctdb_monitor.c-20070518100625-8jf4ft1mjzmb22ck-1 server/ctdb_recover.c ctdb_recover.c-20070503002147-admmfgt1oj6gexfo-1 server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 server/ctdb_takeover.c ctdb_takeover.c-20070525071636-a5n1ihghjtppy08r-2 Diff too large for email (269, the limit is 200).
svn commit: samba r26284 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: abartlet Date: 2007-12-04 05:32:23 + (Tue, 04 Dec 2007) New Revision: 26284 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=26284 Log: Rather than just debug, push the error back up the stack as the error string, if we fail to load the schema. Andrew Bartlett Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c 2007-12-04 03:38:35 UTC (rev 26283) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/schema_fsmo.c 2007-12-04 05:32:23 UTC (rev 26284) @@ -54,7 +54,7 @@ }; if (dsdb_get_schema(module-ldb)) { - return ldb_next_init(module); + return ldb_next_init(module); } schema_dn = samdb_schema_dn(module-ldb); @@ -96,9 +96,9 @@ talloc_free(mem_ctx); return ldb_next_init(module); } else if (ret != LDB_SUCCESS) { - ldb_debug_set(module-ldb, LDB_DEBUG_FATAL, - schema_fsmo_init: failed to search the schema head: %d:%s, - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module-ldb, + schema_fsmo_init: failed to search the schema head: %s, + ldb_errstring(module-ldb)); talloc_free(mem_ctx); return ret; } @@ -151,9 +151,9 @@ (objectClass=attributeSchema), NULL, a_res); if (ret != LDB_SUCCESS) { - ldb_debug_set(module-ldb, LDB_DEBUG_FATAL, - schema_fsmo_init: failed to search attributeSchema objects: %d:%s, - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module-ldb, + schema_fsmo_init: failed to search attributeSchema objects: %s, + ldb_errstring(module-ldb)); talloc_free(mem_ctx); return ret; } @@ -190,9 +190,9 @@ (objectClass=classSchema), NULL, c_res); if (ret != LDB_SUCCESS) { - ldb_debug_set(module-ldb, LDB_DEBUG_FATAL, - schema_fsmo_init: failed to search classSchema objects: %d:%s, - ret, ldb_strerror(ret)); + ldb_asprintf_errstring(module-ldb, + schema_fsmo_init: failed to search classSchema objects: %s, + ldb_errstring(module-ldb)); talloc_free(mem_ctx); return ret; }