Rev 761: fixed a memory leak in the recovery daemon in http://samba.org/~tridge/ctdb
revno: 761 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Tue 2008-01-15 20:11:44 +1100 message: fixed a memory leak in the recovery daemon modified: server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 === modified file 'server/ctdb_recoverd.c' --- a/server/ctdb_recoverd.c2008-01-08 23:22:20 + +++ b/server/ctdb_recoverd.c2008-01-15 09:11:44 + @@ -756,7 +756,13 @@ } data = tdb_fetch(v-ctdb_db-ltdb-tdb, call.key); - if (data.dptr == NULL || data.dsize sizeof(struct ctdb_ltdb_header)) { + if (data.dptr == NULL) { + tdb_chainunlock(v-ctdb_db-ltdb-tdb, call.key); + continue; + } + + if (data.dsize sizeof(struct ctdb_ltdb_header)) { + free(data.dptr); tdb_chainunlock(v-ctdb_db-ltdb-tdb, call.key); continue; } @@ -764,10 +770,13 @@ hdr = (struct ctdb_ltdb_header *)data.dptr; if (hdr-dmaster == v-rec-ctdb-pnn) { /* its already local */ + free(data.dptr); tdb_chainunlock(v-ctdb_db-ltdb-tdb, call.key); continue; } + free(data.dptr); + state = ctdb_call_send(v-ctdb_db, call); tdb_chainunlock(v-ctdb_db-ltdb-tdb, call.key); if (state == NULL) {
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1356-ge6bd139
The branch, v3-2-test has been updated via e6bd1395f2c1da7bcf1a31cdb297919ed6a15469 (commit) via 7cb81bfc6bcdd56a8886e18aa9a7e05ec963d33d (commit) via 7dd65599a15bf1d164fcfa554c8057d43c51eb6d (commit) from 9f05d2eae7c55d39ad61da54c4a38d6b6f8d4d3a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit e6bd1395f2c1da7bcf1a31cdb297919ed6a15469 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 10:43:24 2008 +0100 libwbclient: add wbclient.pc.in metze commit 7cb81bfc6bcdd56a8886e18aa9a7e05ec963d33d Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 10:42:03 2008 +0100 libwbclient: install wbclient.h into the same path as smbclient.h metze commit 7dd65599a15bf1d164fcfa554c8057d43c51eb6d Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 10:24:09 2008 +0100 libwbclient: move wbc_err.h into wbclient.h as we only install one header This makes the installed wbclient.h header usable. metze --- Summary of changes: source/Makefile.in |5 ++- source/configure.in|5 ++- source/nsswitch/libwbclient/wbc_err.h | 51 source/nsswitch/libwbclient/wbclient.h | 27 - source/pkgconfig/wbclient.pc.in| 13 5 files changed, 46 insertions(+), 55 deletions(-) delete mode 100644 source/nsswitch/libwbclient/wbc_err.h create mode 100644 source/pkgconfig/wbclient.pc.in Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index c34f328..3918d29 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -1884,9 +1884,10 @@ installlibaddns: installdirs libaddns -$(INSTALLLIBCMD_A) bin/libaddns.a $(DESTDIR)$(LIBDIR) installlibwbclient: installdirs libwbclient - @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) $(INCLUDEDIR)/samba + @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) -$(INSTALLLIBCMD_SH) bin/[EMAIL PROTECTED]@ $(DESTDIR)$(LIBDIR) - -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/nsswitch/libwbclient/wbclient.h $(DESTDIR)${prefix}/include/samba + @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) ${prefix}/include + -$(INSTALLCMD) -m $(INSTALLPERMS_DATA) $(srcdir)/nsswitch/libwbclient/wbclient.h $(DESTDIR)${prefix}/include installlibnetapi: installdirs libnetapi @$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS_BIN) $(DESTDIR) $(LIBDIR) diff --git a/source/configure.in b/source/configure.in index 4222d93..98f5c45 100644 --- a/source/configure.in +++ b/source/configure.in @@ -6656,7 +6656,10 @@ AC_SUBST(SMBD_LIBS) AC_OUTPUT(Makefile library-versions script/findsmb smbadduser script/gen-8bit-gap.sh script/installbin.sh script/uninstallbin.sh lib/netapi/examples/Makefile - pkgconfig/smbclient.pc pkgconfig/netapi.pc pkgconfig/smbsharemodes.pc + pkgconfig/smbclient.pc + pkgconfig/wbclient.pc + pkgconfig/netapi.pc + pkgconfig/smbsharemodes.pc ) # diff --git a/source/nsswitch/libwbclient/wbc_err.h b/source/nsswitch/libwbclient/wbc_err.h deleted file mode 100644 index 069f68f..000 --- a/source/nsswitch/libwbclient/wbc_err.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - Unix SMB/CIFS implementation. - - Winbind client API - - Copyright (C) Gerald (Jerry) Carter 2007 - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. - - This library 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 - Library General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with this program. If not, see http://www.gnu.org/licenses/. -*/ - -#ifndef _WBC_ERR_H -#define _WBC_ERR_H - - -/* Define error types */ - -/** - * @brief Status codes returned from wbc functions - **/ - -enum _wbcErrType { - WBC_ERR_SUCCESS = 0,/** Successful completion **/ - WBC_ERR_NOT_IMPLEMENTED,/** Function not implemented **/ - WBC_ERR_UNKNOWN_FAILURE,/** General failure **/ - WBC_ERR_NO_MEMORY, /** Memory allocation error **/ - WBC_ERR_INVALID_SID,/** Invalid SID format **/ - WBC_ERR_INVALID_PARAM, /** An Invalid parameter was supplied **/ - WBC_ERR_WINBIND_NOT_AVAILABLE, /** Winbind
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1358-gb66ac85
The branch, v3-2-test has been updated via b66ac8567c16f2c35fceceba2f858d5503620309 (commit) via 2036b4c5ad677b8a477b34b0f076febab0abff5e (commit) from e6bd1395f2c1da7bcf1a31cdb297919ed6a15469 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit b66ac8567c16f2c35fceceba2f858d5503620309 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Jan 14 22:38:16 2008 +0100 Fix some warnings -- Jeremy, please check commit 2036b4c5ad677b8a477b34b0f076febab0abff5e Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Oct 22 18:14:57 2007 +0200 Implement vfs_ea_tdb This is an option for file systems that do not implement xattrs: in lockdir/eas.tdb an array of xatts per inode is stored. It can not solve the problem that xattrs might reappear if a posix-level process deletes a file and happens to re-create it under the same name. On file systems with birthtime we might have a chance to detect this, but not with standard posix. A future version might put relief on file systems that do have xattrs but where these are severely limited in size/speed/whatever: We can put a simple marker as a native xattr, but the xattrs proper are stored in the tdb. Volker --- Summary of changes: source/Makefile.in |7 +- source/configure.in |3 +- source/librpc/gen_ndr/ndr_xattr.c| 102 + source/librpc/gen_ndr/ndr_xattr.h| 16 + source/librpc/gen_ndr/xattr.h| 18 + source/librpc/idl/xattr.idl | 23 + source/modules/vfs_ea_tdb.c | 736 ++ source/script/tests/selftest.sh |1 + source/script/tests/test_posix_s3.sh |2 +- source/utils/net_ads.c | 11 +- source/utils/net_dns.c |3 +- 11 files changed, 912 insertions(+), 10 deletions(-) create mode 100644 source/librpc/gen_ndr/ndr_xattr.c create mode 100644 source/librpc/gen_ndr/ndr_xattr.h create mode 100644 source/librpc/gen_ndr/xattr.h create mode 100644 source/librpc/idl/xattr.idl create mode 100644 source/modules/vfs_ea_tdb.c Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 3918d29..1d48055 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -503,6 +503,7 @@ VFS_CAP_OBJ = modules/vfs_cap.o VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o VFS_AFSACL_OBJ = modules/vfs_afsacl.o +VFS_EA_TDB_OBJ = modules/vfs_ea_tdb.o librpc/gen_ndr/ndr_xattr.o VFS_POSIXACL_OBJ = modules/vfs_posixacl.o VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o @@ -1060,7 +1061,7 @@ modules: SHOWFLAGS $(MODULES) ## Perl IDL Compiler IDL_FILES = unixinfo.idl lsa.idl dfs.idl echo.idl winreg.idl initshutdown.idl \ srvsvc.idl svcctl.idl eventlog.idl wkssvc.idl netlogon.idl notify.idl \ - epmapper.idl messaging.idl + epmapper.idl messaging.idl xattr.idl idl: @IDL_FILES=$(IDL_FILES) CPP=$(CPP) PERL=$(PERL) \ @@ -1684,6 +1685,10 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ) @echo Building plugin $@ @$(SHLD_MODULE) $(VFS_AFSACL_OBJ) +bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_EA_TDB_OBJ) + @echo Building plugin $@ + @$(SHLD_MODULE) $(VFS_EA_TDB_OBJ) + bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ) @echo Building plugin $@ @$(SHLD_MODULE) $(VFS_POSIXACL_OBJ) diff --git a/source/configure.in b/source/configure.in index 98f5c45..4ddc644 100644 --- a/source/configure.in +++ b/source/configure.in @@ -707,7 +707,7 @@ dnl These have to be built static: default_static_modules=pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl2 rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc2 rpc_spoolss rpc_eventlog2 auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script vfs_readahead vfs_syncops +default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script vfs_readahead vfs_syncops vfs_ea_tdb if test x$developer = xyes; then default_static_modules=$default_static_modules rpc_rpcecho @@ -6489,6 +6489,7 @@ SMB_MODULE(vfs_cap, \$(VFS_CAP_OBJ), bin/cap.$SHLIBEXT,
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1353-g9f05d2e
The branch, v3-2-test has been updated via 9f05d2eae7c55d39ad61da54c4a38d6b6f8d4d3a (commit) from ef9b278b6289a9ecdd6b103927058f64fbb7eb97 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 9f05d2eae7c55d39ad61da54c4a38d6b6f8d4d3a Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 10:33:25 2008 +0100 Add True/False bool cleanup script. Guenther --- Summary of changes: source/script/fix_bool.pl | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) create mode 100755 source/script/fix_bool.pl Changeset truncated at 500 lines: diff --git a/source/script/fix_bool.pl b/source/script/fix_bool.pl new file mode 100755 index 000..c09645d --- /dev/null +++ b/source/script/fix_bool.pl @@ -0,0 +1,19 @@ +#!/usr/bin/perl -w + +open(INFILE, $ARGV[0]) || die $@; +open(OUTFILE, $ARGV[0].new) || die $@; + +while (INFILE) { + $_ =~ s/True/true/; + $_ =~ s/False/false/; + print OUTFILE $_; +} + +close(INFILE); +close(OUTFILE); + +rename($ARGV[0].new, $ARGV[0]) || die @_; + +exit(0); + + -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1361-gf21871c
The branch, v3-2-test has been updated via f21871c6d60e02ed53f060abbbfb2ef656cdc311 (commit) via 1a5b72daa36073cc0604211248d869bf0d7546c6 (commit) via 99e3e4b0dd0b0755189c1c740f2975bc75a0e28d (commit) from b66ac8567c16f2c35fceceba2f858d5503620309 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit f21871c6d60e02ed53f060abbbfb2ef656cdc311 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 11:00:37 2008 +0100 No need to re-establish AD connection all the time. Guenther commit 1a5b72daa36073cc0604211248d869bf0d7546c6 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 10:58:27 2008 +0100 Use dsgetdcname() to find a dc when unjoining in libnetjoin. Guenther commit 99e3e4b0dd0b0755189c1c740f2975bc75a0e28d Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 10:51:40 2008 +0100 Re-arrange pre- and postprocessing code in libnetjoin. Guenther --- Summary of changes: source/libnet/libnet_join.c | 134 ++- 1 files changed, 107 insertions(+), 27 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index eaf851c..c60f4c9 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -107,10 +107,6 @@ static ADS_STATUS libnet_join_connect_ads(TALLOC_CTX *mem_ctx, { ADS_STATUS status; - if (r-in.ads) { - ads_destroy(r-in.ads); - } - status = libnet_connect_ads(r-in.domain_name, r-in.domain_name, r-in.dc_name, @@ -134,10 +130,6 @@ static ADS_STATUS libnet_unjoin_connect_ads(TALLOC_CTX *mem_ctx, { ADS_STATUS status; - if (r-in.ads) { - ads_destroy(r-in.ads); - } - status = libnet_connect_ads(r-in.domain_name, r-in.domain_name, r-in.dc_name, @@ -1013,6 +1005,58 @@ static WERROR do_UnjoinConfig(struct libnet_UnjoinCtx *r) / / +static WERROR libnet_join_pre_processing(TALLOC_CTX *mem_ctx, +struct libnet_JoinCtx *r) +{ + + if (!r-in.domain_name) { + return WERR_INVALID_PARAM; + } + + if (r-in.modify_config !lp_include_registry_globals()) { + return WERR_NOT_SUPPORTED; + } + + if (IS_DC) { + return WERR_SETUP_DOMAIN_CONTROLLER; + } + + if (!secrets_init()) { + libnet_join_set_error_string(mem_ctx, r, + Unable to open secrets database); + return WERR_CAN_NOT_COMPLETE; + } + + return WERR_OK; +} + +/ +/ + +static WERROR libnet_join_post_processing(TALLOC_CTX *mem_ctx, + struct libnet_JoinCtx *r) +{ + WERROR werr; + + if (!W_ERROR_IS_OK(r-out.result)) { + return r-out.result; + } + + werr = do_JoinConfig(r); + if (!W_ERROR_IS_OK(werr)) { + return werr; + } + + if (r-in.join_flags WKSSVC_JOIN_FLAGS_JOIN_TYPE) { + saf_store(r-in.domain_name, r-in.dc_name); + } + + return WERR_OK; +} + +/ +/ + static int libnet_destroy_JoinCtx(struct libnet_JoinCtx *r) { if (r-in.ads) { @@ -1170,30 +1214,23 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx, { WERROR werr; - if (!r-in.domain_name) { - return WERR_INVALID_PARAM; - } - - if (r-in.modify_config !lp_include_registry_globals()) { - return WERR_NOT_SUPPORTED; - } - - if (IS_DC) { - return WERR_SETUP_DOMAIN_CONTROLLER; + werr = libnet_join_pre_processing(mem_ctx, r); + if (!W_ERROR_IS_OK(werr)) { + goto done; } if (r-in.join_flags WKSSVC_JOIN_FLAGS_JOIN_TYPE) { werr = libnet_DomainJoin(mem_ctx, r); if (!W_ERROR_IS_OK(werr)) { - return werr; + goto done; } } - werr = do_JoinConfig(r); + werr = libnet_join_post_processing(mem_ctx, r); if (!W_ERROR_IS_OK(werr)) { - return werr; + goto done; } - + done: return werr; } @@ -1205,6 +1242,29 @@ static WERROR
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1366-ga5fb8b4
The branch, v3-2-test has been updated via a5fb8b443a7c4ebf68ed005990683718c1092747 (commit) via ed559b4a59e826851cb9894f0e519eaedb523f9d (commit) via e37859164c35e8d908f3dfcc99226ee6773ba0a8 (commit) via 4f05b50d4c626f2c404bb4bfefb65998125b612f (commit) via 40aeb431604bd26fc543410de24593726ca0a01f (commit) from f21871c6d60e02ed53f060abbbfb2ef656cdc311 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit a5fb8b443a7c4ebf68ed005990683718c1092747 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 13:57:58 2008 +0100 krb5_locator: winbind_krb5_locator.o doesn't need socket wrapper any more metze commit ed559b4a59e826851cb9894f0e519eaedb523f9d Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 13:56:57 2008 +0100 nss_winbind: nss_winbind.so doesn't need socket wrapper any more metze commit e37859164c35e8d908f3dfcc99226ee6773ba0a8 Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 13:56:15 2008 +0100 pam_winbind: pam_winbind.so doesn't need soecket wrapper any more metze commit 4f05b50d4c626f2c404bb4bfefb65998125b612f Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 13:54:30 2008 +0100 libwbclient: libwbclient.so doesn't need socket nor nss wrapper any more metze commit 40aeb431604bd26fc543410de24593726ca0a01f Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 13:52:19 2008 +0100 nsswitch/: we don't need socket or nss wrapper in the winbind client code As we don't need socket wrapper of nss wrapper in the winbind client code we disable the function macros so that we don't endup with swrap_close() or similar functions. metze --- Summary of changes: source/Makefile.in | 14 +++--- source/nsswitch/winbind_nss_config.h |8 2 files changed, 15 insertions(+), 7 deletions(-) Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 1d48055..4260145 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -340,13 +340,13 @@ LIBADDNS_OBJ0 = libaddns/dnsrecord.o libaddns/dnsutils.o libaddns/dnssock.o \ libaddns/dnsgss.o libaddns/dnsmarshall.o LIBADDNS_OBJ = $(LIBADDNS_OBJ0) $(TALLOC_OBJ) -LIBWBCLIENT_OBJ = nsswitch/libwbclient/wbclient.o \ +LIBWBCLIENT_OBJ0 = nsswitch/libwbclient/wbclient.o \ nsswitch/libwbclient/wbc_util.o \ nsswitch/libwbclient/wbc_pwd.o \ nsswitch/libwbclient/wbc_idmap.o \ nsswitch/libwbclient/wbc_sid.o \ nsswitch/libwbclient/wbc_pam.o - +LIBWBCLIENT_OBJ = $(LIBWBCLIENT_OBJ0) $(WBCOMMON_OBJ) $(TALLOC_OBJ) $(LIBREPLACE_OBJ) LIBGPO_OBJ0 = libgpo/gpo_ldap.o libgpo/gpo_ini.o libgpo/gpo_util.o \ libgpo/gpo_fetch.o libgpo/gpo_filesync.o libgpo/gpo_sec.o @@ -672,7 +672,7 @@ RPCCLIENT_OBJ = $(RPCCLIENT_OBJ1) \ $(SMBLDAP_OBJ) $(DCUTIL_OBJ) $(LDB_OBJ) PAM_WINBIND_OBJ = nsswitch/pam_winbind.o $(WBCOMMON_OBJ) \ - $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) @BUILD_INIPARSER@ + $(LIBREPLACE_OBJ) @BUILD_INIPARSER@ LIBSMBCLIENT_OBJ = libsmb/libsmbclient.o libsmb/libsmb_compat.o \ libsmb/libsmb_cache.o \ @@ -929,7 +929,7 @@ WBINFO_OBJ = nsswitch/wbinfo.o $(LIBSAMBA_OBJ) $(PARAM_OBJ) $(LIB_NONSMBD_OBJ) \ $(SECRETS_OBJ) $(POPT_LIB_OBJ) $(AFS_SETTOKEN_OBJ) $(RPC_PARSE_OBJ1) \ $(DOSERR_OBJ) lib/winbind_util.o @LIBWBCLIENT_STATIC@ -WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) @WINBIND_NSS_EXTRA_OBJS@ +WINBIND_NSS_OBJ = $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) @WINBIND_NSS_EXTRA_OBJS@ LDB_COMMON_OBJ=lib/ldb/common/ldb.o lib/ldb/common/ldb_ldif.o \ lib/ldb/common/ldb_parse.o lib/ldb/common/ldb_msg.o lib/ldb/common/ldb_utf8.o \ @@ -967,7 +967,7 @@ LDBDEL_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbdel.o LDBMODIFY_OBJ = $(LDB_CMDLINE_OBJ) lib/ldb/tools/ldbmodify.o WINBIND_KRB5_LOCATOR_OBJ1 = nsswitch/winbind_krb5_locator.o -WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) $(SOCKET_WRAPPER_OBJ) +WINBIND_KRB5_LOCATOR_OBJ = $(WINBIND_KRB5_LOCATOR_OBJ1) $(WBCOMMON_OBJ) $(LIBREPLACE_OBJ) POPT_OBJ=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o @@ -1397,9 +1397,9 @@ bin/ldbdel: $(BINARY_PREREQS) $(LDBDEL_OBJ) @BUILD_POPT@ @LIBWBCLIENT_SHARED@ @POPTLIBS@ $(KRB5LIBS) $(UUID_LIBS) $(LDAP_LIBS) $(PASSDB_LIBS) \ $(TERMLDFLAGS) $(TERMLIBS) $(NSCD_LIBS) @WINBIND_LIBS@ -bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) nsswitch/wb_common.o $(LIBSAMBAUTIL_OBJ) +bin/[EMAIL PROTECTED]@:
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1368-gbeaa83f
The branch, v3-2-test has been updated via beaa83f32bd367f1b6ec72ef80a8a258d662f523 (commit) via 1941c365b50d48fc90f0f98059b8cccf6c7a1a06 (commit) from a5fb8b443a7c4ebf68ed005990683718c1092747 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit beaa83f32bd367f1b6ec72ef80a8a258d662f523 Author: Michael Adam [EMAIL PROTECTED] Date: Tue Jan 15 14:56:00 2008 +0100 Use the proper boolean functions. Michael commit 1941c365b50d48fc90f0f98059b8cccf6c7a1a06 Author: Michael Adam [EMAIL PROTECTED] Date: Tue Jan 15 14:55:04 2008 +0100 Remove some trailing spaces. Michael --- Summary of changes: source/registry/reg_api.c | 25 - 1 files changed, 12 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/source/registry/reg_api.c b/source/registry/reg_api.c index 8bbdb6a..d1657c8 100644 --- a/source/registry/reg_api.c +++ b/source/registry/reg_api.c @@ -1,4 +1,4 @@ -/* +/* * Unix SMB/CIFS implementation. * Virtual Windows Registry Layer * Copyright (C) Volker Lendecke 2006 @@ -7,12 +7,12 @@ * 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/. */ @@ -140,7 +140,7 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, result = WERR_BADFILE; goto done; } - + /* check if the path really exists; failed is indicated by -1 */ /* if the subkey count failed, bail out */ @@ -153,7 +153,7 @@ static WERROR regkey_open_onelevel(TALLOC_CTX *mem_ctx, result = WERR_BADFILE; goto done; } - + TALLOC_FREE( subkeys ); if ( !regkey_access_check( key, access_desired, key-access_granted, @@ -302,7 +302,7 @@ WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key, SAFE_FREE(val); return WERR_NOMEM; } - + *pval = val; return WERR_OK; } @@ -494,7 +494,6 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent, TALLOC_FREE(mem_ctx); return err; } - WERROR reg_deletekey(struct registry_key *parent, const char *path) { @@ -712,8 +711,8 @@ WERROR reg_open_path(TALLOC_CTX *mem_ctx, const char *orig_path, } /* - * Utility function to delete a registry key with all its subkeys. - * Note that reg_deletekey returns ACCESS_DENIED when called on a + * Utility function to delete a registry key with all its subkeys. + * Note that reg_deletekey returns ACCESS_DENIED when called on a * key that has subkeys. */ WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx, @@ -739,11 +738,11 @@ WERROR reg_deletekey_recursive_internal(TALLOC_CTX *ctx, } while (W_ERROR_IS_OK(werr = reg_enumkey(mem_ctx, key, 0, - subkey_name, NULL))) + subkey_name, NULL))) { werr = reg_deletekey_recursive_internal(mem_ctx, key, subkey_name, - True); + true); if (!W_ERROR_IS_OK(werr)) { goto done; } @@ -771,12 +770,12 @@ WERROR reg_deletekey_recursive(TALLOC_CTX *ctx, struct registry_key *parent, const char *path) { - return reg_deletekey_recursive_internal(ctx, parent, path, True); + return reg_deletekey_recursive_internal(ctx, parent, path, true); } WERROR reg_deletesubkeys_recursive(TALLOC_CTX *ctx, struct registry_key *parent, const char *path) { - return reg_deletekey_recursive_internal(ctx, parent, path, False); + return reg_deletekey_recursive_internal(ctx, parent, path, false); } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1369-g9a4b6fd
The branch, v3-2-test has been updated via 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a (commit) from beaa83f32bd367f1b6ec72ef80a8a258d662f523 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 14:59:46 2008 +0100 libwbclient: don't link talloc.o into libwbclient.a hopefully fix the build... metze --- Summary of changes: source/Makefile.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 4260145..53fd669 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -1433,9 +1433,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) -bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) +bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0) @echo Linking non-shared library $@ - @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ) + @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ0) bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking shared library $@ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1374-g586d6ce
The branch, v3-2-test has been updated via 586d6cef521cebfd6fe2d433fdef498d4a59cb1b (commit) via d94bd3a03b574b3f62add25b0c04673500a3 (commit) via 0a914a55bab30d765872d72cfdd59889d2afe42a (commit) via f44f76415a7ce3ea73b5c52494f3b36feab4c870 (commit) via 7a48779ee5ec8bdd5e2b5eef94fd465f733b74b4 (commit) from 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 586d6cef521cebfd6fe2d433fdef498d4a59cb1b Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 15:43:19 2008 +0100 Include libnet_join.h in the right places. Guenther commit d94bd3a03b574b3f62add25b0c04673500a3 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 15:28:39 2008 +0100 Use autogenerated libnet_join header. Guenther commit 0a914a55bab30d765872d72cfdd59889d2afe42a Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 15:20:57 2008 +0100 Add ndr_print_ads_struct(). Guenther commit f44f76415a7ce3ea73b5c52494f3b36feab4c870 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 15:16:24 2008 +0100 Add ndr_print_sockaddr_storage and ndr_print_bool. Guenther commit 7a48779ee5ec8bdd5e2b5eef94fd465f733b74b4 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 14:48:34 2008 +0100 Define libnet join interface in IDL. Guenther --- Summary of changes: source/Makefile.in |3 +- source/include/smb.h|2 + source/libnet/libnet.h |2 +- source/libnet/libnet_join.h | 75 -- source/librpc/gen_ndr/libnet_join.h | 73 ++ source/librpc/gen_ndr/ndr_libnet_join.c | 103 +++ source/librpc/gen_ndr/ndr_libnet_join.h | 20 ++ source/librpc/idl/libnet_join.idl | 60 ++ source/librpc/ndr/ndr_basic.c | 11 +++ source/librpc/ndr/ndr_misc.c| 81 10 files changed, 353 insertions(+), 77 deletions(-) delete mode 100644 source/libnet/libnet_join.h create mode 100644 source/librpc/gen_ndr/libnet_join.h create mode 100644 source/librpc/gen_ndr/ndr_libnet_join.c create mode 100644 source/librpc/gen_ndr/ndr_libnet_join.h create mode 100644 source/librpc/idl/libnet_join.idl Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index 53fd669..a734109 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -268,7 +268,8 @@ LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \ librpc/gen_ndr/ndr_srvsvc.o \ librpc/gen_ndr/ndr_svcctl.o \ librpc/gen_ndr/ndr_eventlog.o \ -librpc/gen_ndr/ndr_notify.o +librpc/gen_ndr/ndr_notify.o \ +librpc/gen_ndr/ndr_libnet_join.o RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o diff --git a/source/include/smb.h b/source/include/smb.h index 49245ea..744acd7 100644 --- a/source/include/smb.h +++ b/source/include/smb.h @@ -322,6 +322,8 @@ struct id_map { #include librpc/gen_ndr/wkssvc.h #include librpc/gen_ndr/echo.h #include librpc/gen_ndr/svcctl.h +#include librpc/gen_ndr/libnet_join.h + struct lsa_dom_info { bool valid; diff --git a/source/libnet/libnet.h b/source/libnet/libnet.h index d6238ca..97e720f 100644 --- a/source/libnet/libnet.h +++ b/source/libnet/libnet.h @@ -20,7 +20,7 @@ #ifndef __LIBNET_H__ #define __LIBNET_H__ -#include libnet/libnet_join.h +#include librpc/gen_ndr/libnet_join.h #include libnet/libnet_conf.h #include libnet/libnet_proto.h diff --git a/source/libnet/libnet_join.h b/source/libnet/libnet_join.h deleted file mode 100644 index c47e8d9..000 --- a/source/libnet/libnet_join.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Unix SMB/CIFS implementation. - * libnet Join Support - * Copyright (C) Guenther Deschner 2007-2008 - * - * 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/. - */ - -#ifndef __LIBNET_JOIN_H__ -#define __LIBNET_JOIN_H__ - -struct libnet_JoinCtx { - struct { - const char *dc_name; - const char
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1375-g15d0e57
The branch, v3-2-test has been updated via 15d0e574386e39a4d2fa61cd268b48dfa5c84dcb (commit) from 586d6cef521cebfd6fe2d433fdef498d4a59cb1b (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 15d0e574386e39a4d2fa61cd268b48dfa5c84dcb Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 15:48:48 2008 +0100 Remove unrequired TALLOC_FREE. Guenther --- Summary of changes: source/libnet/libnet_join.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index c60f4c9..ce3a596 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -236,7 +236,6 @@ static ADS_STATUS libnet_join_find_machine_acct(TALLOC_CTX *mem_ctx, goto done; } - TALLOC_FREE(r-out.dn); r-out.dn = talloc_strdup(mem_ctx, dn); if (!r-out.dn) { status = ADS_ERROR_LDAP(LDAP_NO_MEMORY); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1377-g561e529
The branch, v3-2-test has been updated via 561e529a711338b2a3191f1b04f384f5ab3413ac (commit) via 58c806dbf85fd634c8f3559a035751a4cd0b5c4b (commit) from 15d0e574386e39a4d2fa61cd268b48dfa5c84dcb (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 561e529a711338b2a3191f1b04f384f5ab3413ac Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 14:59:46 2008 +0100 libwbclient: don't link talloc.o into libwbclient.a hopefully fix the build...(and hopefully the correct fix) metze commit 58c806dbf85fd634c8f3559a035751a4cd0b5c4b Author: Stefan Metzmacher [EMAIL PROTECTED] Date: Tue Jan 15 15:56:58 2008 +0100 Revert libwbclient: don't link talloc.o into libwbclient.a This reverts commit 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a. Sorry... metze --- Summary of changes: source/Makefile.in |8 1 files changed, 4 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index a734109..d65b10e 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -1404,9 +1404,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) @ln -s -f `basename [EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) -bin/libwbclient.a: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ) +bin/libwbclient.a: $(BINARY_PREREQS) $(LIBWBCLIENT_OBJ0) @echo Linking non-shared library $@ - @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ) + @-$(AR) -rc $@ $(LIBWBCLIENT_OBJ0) bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBADDNS_OBJ) @echo Linking shared library $@ @@ -1434,9 +1434,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) $(KRB5LIBS) $(LDAP_LIBS) $(NSCD_LIBS) \ @[EMAIL PROTECTED] [EMAIL PROTECTED](SONAME_VER) -bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ0) +bin/libsmbclient.a: $(BINARY_PREREQS) $(LIBSMBCLIENT_OBJ) @echo Linking non-shared library $@ - @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ0) + @-$(AR) -rc $@ $(LIBSMBCLIENT_OBJ) bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(LIBSMBSHAREMODES_OBJ) @echo Linking shared library $@ -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-456-g9cff25c
The branch, v4-0-test has been updated via 9cff25cce1d39460dbcab006a309bb2984969eed (commit) via 9f5c443972a09a70de7c8d6695b08c3730484c6c (commit) via 8db9e196506f530c780d93e16da590566d16a407 (commit) via db4eabf7cde1008a40a46e5c40a99e9a73cf3ff5 (commit) via ebc08d23f76ecffc90b1fe84c67fc7e6a4c4a6a3 (commit) from ed0c3a0f74c305b3b8554b05c3f97cf79db8296a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 9cff25cce1d39460dbcab006a309bb2984969eed Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Dec 17 10:44:09 2007 -0800 Fix bug #5121 (unix passwd sync not working on a streams based system). Jeremy. (lib/replace part of 545cd2139cfc9484b733693814d4724d37125942 metze) commit 9f5c443972a09a70de7c8d6695b08c3730484c6c Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Dec 11 13:16:35 2007 -0800 Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic [EMAIL PROTECTED] - slightly modified - Jiri please check ! to allow Solaris to get passwords 8 chars. Jeremy. (lib/replace part of 657bf8c3479d6192f269e3daef1517e77a9fa9cb metze) commit 8db9e196506f530c780d93e16da590566d16a407 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Nov 26 15:28:13 2007 +0100 Fix bug 5055 (lib/replace part of 8bcd2df841bae63e7d58c35d4728b7d853471697 metze) commit db4eabf7cde1008a40a46e5c40a99e9a73cf3ff5 Author: Jeremy Allison [EMAIL PROTECTED] Date: Thu Nov 15 18:27:26 2007 -0800 Add MAX_DNS_NAME_LENGTH, remove more pstrings. Jeremy. (lib/replace part of a1725f4ff7ed375808c78ac661b539557748d0a5 metze) commit ebc08d23f76ecffc90b1fe84c67fc7e6a4c4a6a3 Author: Jeremy Allison [EMAIL PROTECTED] Date: Sat Nov 10 22:31:34 2007 -0800 Always define PATH_MAX. Makes code simpler (removes a bunch of #defines). Remove pstring from msdfs.c. Jeremy. (lib/replace part from e203ba22275320808bc11b17361ad1f2d5b0b897 metze) --- Summary of changes: source/lib/replace/getpass.m4 | 10 ++ source/lib/replace/libreplace.m4|1 + source/lib/replace/replace.c|2 +- source/lib/replace/replace.h|8 source/lib/replace/system/network.h |4 source/lib/replace/system/passwd.h |4 6 files changed, 28 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/replace/getpass.m4 b/source/lib/replace/getpass.m4 index 17dfdf7..c4da9aa 100644 --- a/source/lib/replace/getpass.m4 +++ b/source/lib/replace/getpass.m4 @@ -1,3 +1,11 @@ +AC_CHECK_FUNC(getpass, samba_cv_HAVE_GETPASS=yes) +AC_CHECK_FUNC(getpassphrase, samba_cv_HAVE_GETPASSPHRASE=yes) +if test x$samba_cv_HAVE_GETPASS = xyes -a x$samba_cv_HAVE_GETPASSPHRASE = xyes; then +AC_DEFINE(REPLACE_GETPASS_BY_GETPASSPHRASE, 1, [getpass returns 9 chars where getpassphrase returns 265 chars]) + AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced]) + LIBREPLACEOBJ=${LIBREPLACEOBJ} getpass.o +else + AC_CACHE_CHECK([whether getpass should be replaced],samba_cv_REPLACE_GETPASS,[ SAVE_CPPFLAGS=$CPPFLAGS CPPFLAGS=$CPPFLAGS -I$libreplacedir/ @@ -12,3 +20,5 @@ if test x$samba_cv_REPLACE_GETPASS = xyes; then AC_DEFINE(REPLACE_GETPASS,1,[Whether getpass should be replaced]) LIBREPLACEOBJ=${LIBREPLACEOBJ} getpass.o fi + +fi diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4 index a577285..6d1d6b8 100644 --- a/source/lib/replace/libreplace.m4 +++ b/source/lib/replace/libreplace.m4 @@ -100,6 +100,7 @@ AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h) AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) AC_CHECK_HEADERS(sys/sockio.h sys/un.h) AC_CHECK_HEADERS(sys/mount.h mntent.h) +AC_CHECK_HEADERS(stropts.h) dnl we need to check that net/if.h really can be used, to cope with hpux dnl where including it always fails diff --git a/source/lib/replace/replace.c b/source/lib/replace/replace.c index cec158b..b2a240e 100644 --- a/source/lib/replace/replace.c +++ b/source/lib/replace/replace.c @@ -218,7 +218,7 @@ long nap(long milliseconds) { #ifndef HAVE_MEMMOVE /*** safely copies memory, ensuring no overlap problems. -this is only used if the machine does not have it's own memmove(). +this is only used if the machine does not have its own memmove(). this is not the fastest algorithm in town, but it will do for our needs. / diff --git a/source/lib/replace/replace.h b/source/lib/replace/replace.h index f8a89a7..3f91544 100644 --- a/source/lib/replace/replace.h +++ b/source/lib/replace/replace.h @@ -546,4 +546,12 @@ typedef int
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1378-g7a3fe68
The branch, v3-2-test has been updated via 7a3fe68bef7acde9d9f8a7a44ce7e9432f3c5a95 (commit) from 561e529a711338b2a3191f1b04f384f5ab3413ac (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 7a3fe68bef7acde9d9f8a7a44ce7e9432f3c5a95 Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 16:40:02 2008 +0100 Apply const to rpccli_lsa_query_info_policy() and rpccli_lsa_query_info_policy2(). Guenther --- Summary of changes: source/rpc_client/cli_lsarpc.c |8 +--- source/rpcclient/rpcclient.c |2 +- source/utils/net.h |2 +- source/utils/net_ads.c |7 --- source/utils/net_domain.c |2 +- source/utils/net_rpc.c | 11 ++- source/utils/net_rpc_join.c|4 ++-- source/winbindd/winbindd_cm.c |6 +++--- 8 files changed, 23 insertions(+), 19 deletions(-) Changeset truncated at 500 lines: diff --git a/source/rpc_client/cli_lsarpc.c b/source/rpc_client/cli_lsarpc.c index 77ade5c..286cc21 100644 --- a/source/rpc_client/cli_lsarpc.c +++ b/source/rpc_client/cli_lsarpc.c @@ -542,7 +542,8 @@ NTSTATUS rpccli_lsa_query_info_policy2_new(struct rpc_pipe_client *cli, TALLOC_C NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint16 info_class, - char **domain_name, DOM_SID **domain_sid) + const char **domain_name, + DOM_SID **domain_sid) { prs_struct qbuf, rbuf; LSA_Q_QUERY_INFO q; @@ -632,8 +633,9 @@ NTSTATUS rpccli_lsa_query_info_policy(struct rpc_pipe_client *cli, NTSTATUS rpccli_lsa_query_info_policy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, POLICY_HND *pol, uint16 info_class, - char **domain_name, char **dns_name, - char **forest_name, + const char **domain_name, + const char **dns_name, + const char **forest_name, struct GUID **domain_guid, DOM_SID **domain_sid) { diff --git a/source/rpcclient/rpcclient.c b/source/rpcclient/rpcclient.c index dd8b911..081e0fb 100644 --- a/source/rpcclient/rpcclient.c +++ b/source/rpcclient/rpcclient.c @@ -134,7 +134,7 @@ static void fetch_machine_sid(struct cli_state *cli) POLICY_HND pol; NTSTATUS result = NT_STATUS_OK; uint32 info_class = 5; - char *domain_name = NULL; + const char *domain_name = NULL; static bool got_domain_sid; TALLOC_CTX *mem_ctx; DOM_SID *dom_sid = NULL; diff --git a/source/utils/net.h b/source/utils/net.h index 2ffa4d7..3a4b1da 100644 --- a/source/utils/net.h +++ b/source/utils/net.h @@ -42,7 +42,7 @@ struct rpc_sh_ctx { struct cli_state *cli; DOM_SID *domain_sid; - char *domain_name; + const char *domain_name; const char *whoami; const char *thiscmd; diff --git a/source/utils/net_ads.c b/source/utils/net_ads.c index 0a9020b..732ba8d 100644 --- a/source/utils/net_ads.c +++ b/source/utils/net_ads.c @@ -817,7 +817,7 @@ static int net_ads_leave(int argc, const char **argv) struct cli_state *cli = NULL; TALLOC_CTX *ctx; DOM_SID *dom_sid = NULL; - char *short_domain_name = NULL; + const char *short_domain_name = NULL; if (!secrets_init()) { DEBUG(1,(Failed to initialise secrets database\n)); @@ -961,7 +961,8 @@ static NTSTATUS check_ads_config( void ) / static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername, - struct sockaddr_storage *pss, char **domain, + struct sockaddr_storage *pss, + const char **domain, DOM_SID **dom_sid, const char *password) { @@ -1445,7 +1446,7 @@ int net_ads_join(int argc, const char **argv) ADS_STRUCT *ads = NULL; ADS_STATUS status; NTSTATUS nt_status; - char *short_domain_name = NULL; + const char *short_domain_name = NULL; char *tmp_password, *password; TALLOC_CTX *ctx = NULL; DOM_SID *domain_sid = NULL; diff --git a/source/utils/net_domain.c b/source/utils/net_domain.c index 3f1908e..da5e61c 100644 --- a/source/utils/net_domain.c +++ b/source/utils/net_domain.c @@ -157,7 +157,7 @@ int
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1381-g642424b
The branch, v3-2-test has been updated via 642424b3779dd33cd2b5049789aa16e678438bb9 (commit) via 151b42a150a17f566e7b4055bbdbc0564a3c106d (commit) from 08c1720509dffa2886ed057e2d14907699122f3c (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 642424b3779dd33cd2b5049789aa16e678438bb9 Author: Volker Lendecke [EMAIL PROTECTED] Date: Tue Jan 15 17:06:12 2008 +0100 ea_tdb-xattr_tdb also inside the module itself commit 151b42a150a17f566e7b4055bbdbc0564a3c106d Author: Volker Lendecke [EMAIL PROTECTED] Date: Tue Jan 15 17:03:17 2008 +0100 rename vfs_ea_tdb to vfs_xattr_tdb --- Summary of changes: source/Makefile.in |6 +- source/configure.in |4 +- source/modules/{vfs_ea_tdb.c = vfs_xattr_tdb.c} | 197 +++--- source/script/tests/selftest.sh |2 +- 4 files changed, 105 insertions(+), 104 deletions(-) rename source/modules/{vfs_ea_tdb.c = vfs_xattr_tdb.c} (68%) Changeset truncated at 500 lines: diff --git a/source/Makefile.in b/source/Makefile.in index d65b10e..46f733c 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -504,7 +504,7 @@ VFS_CAP_OBJ = modules/vfs_cap.o VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o VFS_AFSACL_OBJ = modules/vfs_afsacl.o -VFS_EA_TDB_OBJ = modules/vfs_ea_tdb.o librpc/gen_ndr/ndr_xattr.o +VFS_XATTR_TDB_OBJ = modules/vfs_xattr_tdb.o librpc/gen_ndr/ndr_xattr.o VFS_POSIXACL_OBJ = modules/vfs_posixacl.o VFS_AIXACL_OBJ = modules/vfs_aixacl.o modules/vfs_aixacl_util.o VFS_AIXACL2_OBJ = modules/vfs_aixacl2.o modules/vfs_aixacl_util.o modules/nfs4_acls.o @@ -1686,9 +1686,9 @@ bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_AFSACL_OBJ) @echo Building plugin $@ @$(SHLD_MODULE) $(VFS_AFSACL_OBJ) -bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_EA_TDB_OBJ) +bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_XATTR_TDB_OBJ) @echo Building plugin $@ - @$(SHLD_MODULE) $(VFS_EA_TDB_OBJ) + @$(SHLD_MODULE) $(VFS_XATTR_TDB_OBJ) bin/[EMAIL PROTECTED]@: $(BINARY_PREREQS) $(VFS_POSIXACL_OBJ) @echo Building plugin $@ diff --git a/source/configure.in b/source/configure.in index 4ddc644..cd04b59 100644 --- a/source/configure.in +++ b/source/configure.in @@ -707,7 +707,7 @@ dnl These have to be built static: default_static_modules=pdb_smbpasswd pdb_tdbsam rpc_lsa rpc_samr rpc_winreg rpc_initshutdown rpc_lsa_ds rpc_wkssvc rpc_svcctl2 rpc_ntsvcs rpc_net rpc_netdfs rpc_srvsvc2 rpc_spoolss rpc_eventlog2 auth_sam auth_unix auth_winbind auth_server auth_domain auth_builtin vfs_default nss_info_template dnl These are preferably build shared, and static if dlopen() is not available -default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script vfs_readahead vfs_syncops vfs_ea_tdb +default_shared_modules=vfs_recycle vfs_audit vfs_extd_audit vfs_full_audit vfs_netatalk vfs_fake_perms vfs_default_quota vfs_readonly vfs_cap vfs_expand_msdfs vfs_shadow_copy charset_CP850 charset_CP437 auth_script vfs_readahead vfs_syncops vfs_xattr_tdb if test x$developer = xyes; then default_static_modules=$default_static_modules rpc_rpcecho @@ -6489,7 +6489,7 @@ SMB_MODULE(vfs_cap, \$(VFS_CAP_OBJ), bin/cap.$SHLIBEXT, VFS) SMB_MODULE(vfs_expand_msdfs, \$(VFS_EXPAND_MSDFS_OBJ), bin/expand_msdfs.$SHLIBEXT, VFS) SMB_MODULE(vfs_shadow_copy, \$(VFS_SHADOW_COPY_OBJ), bin/shadow_copy.$SHLIBEXT, VFS) SMB_MODULE(vfs_afsacl, \$(VFS_AFSACL_OBJ), bin/afsacl.$SHLIBEXT, VFS) -SMB_MODULE(vfs_ea_tdb, \$(VFS_EA_TDB_OBJ), bin/ea_tdb.$SHLIBEXT, VFS) +SMB_MODULE(vfs_xattr_tdb, \$(VFS_XATTR_TDB_OBJ), bin/xattr_tdb.$SHLIBEXT, VFS) SMB_MODULE(vfs_posixacl, \$(VFS_POSIXACL_OBJ), bin/posixacl.$SHLIBEXT, VFS) SMB_MODULE(vfs_aixacl, \$(VFS_AIXACL_OBJ), bin/aixacl.$SHLIBEXT, VFS) SMB_MODULE(vfs_aixacl2, \$(VFS_AIXACL2_OBJ), bin/aixacl2.$SHLIBEXT, VFS) diff --git a/source/modules/vfs_ea_tdb.c b/source/modules/vfs_xattr_tdb.c similarity index 68% rename from source/modules/vfs_ea_tdb.c rename to source/modules/vfs_xattr_tdb.c index 8cf04d7..3a72831 100644 --- a/source/modules/vfs_ea_tdb.c +++ b/source/modules/vfs_xattr_tdb.c @@ -28,9 +28,9 @@ * unmarshall tdb_xattrs */ -static NTSTATUS ea_tdb_pull_attrs(TALLOC_CTX *mem_ctx, - const TDB_DATA *data, - struct tdb_xattrs **presult) +static NTSTATUS xattr_tdb_pull_attrs(TALLOC_CTX *mem_ctx, +const TDB_DATA *data, +struct tdb_xattrs **presult) { DATA_BLOB blob; enum
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1379-g08c1720
The branch, v3-2-test has been updated via 08c1720509dffa2886ed057e2d14907699122f3c (commit) from 7a3fe68bef7acde9d9f8a7a44ce7e9432f3c5a95 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 08c1720509dffa2886ed057e2d14907699122f3c Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 17:00:14 2008 +0100 Use autogenerated debugging functions in libnetjoin when requested. Guenther --- Summary of changes: source/libnet/libnet_join.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libnet/libnet_join.c b/source/libnet/libnet_join.c index ce3a596..a189a38 100644 --- a/source/libnet/libnet_join.c +++ b/source/libnet/libnet_join.c @@ -1213,6 +1213,10 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx, { WERROR werr; + if (r-in.debug) { + NDR_PRINT_IN_DEBUG(libnet_JoinCtx, r); + } + werr = libnet_join_pre_processing(mem_ctx, r); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -1230,6 +1234,9 @@ WERROR libnet_Join(TALLOC_CTX *mem_ctx, goto done; } done: + if (r-in.debug) { + NDR_PRINT_OUT_DEBUG(libnet_JoinCtx, r); + } return werr; } @@ -1320,6 +1327,10 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx, { WERROR werr; + if (r-in.debug) { + NDR_PRINT_IN_DEBUG(libnet_UnjoinCtx, r); + } + werr = libnet_unjoin_pre_processing(mem_ctx, r); if (!W_ERROR_IS_OK(werr)) { goto done; @@ -1338,5 +1349,9 @@ WERROR libnet_Unjoin(TALLOC_CTX *mem_ctx, } done: + if (r-in.debug) { + NDR_PRINT_OUT_DEBUG(libnet_UnjoinCtx, r); + } + return werr; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-stable updated - initial-v3-2-test-1372-g04e0460
The branch, v3-2-stable has been updated via 04e0460c7e4adfe29a8c788e1912129c4c0c7e62 (commit) from 061c90fefef0e6093dfc3912d381cc306549ed4b (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log - commit 04e0460c7e4adfe29a8c788e1912129c4c0c7e62 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Tue Jan 15 10:45:53 2008 -0600 Add notes from Michael Adam for the commit log in release notes --- Summary of changes: WHATSNEW.txt | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 53a1c84..86f8ad9 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -109,6 +109,7 @@ smb.conf changes client plaintext auth Changed Default No clustering New No cluster addresses New +debug class New No ctdb socketNew lanman authChanged Default No mangle map Removed @@ -124,10 +125,18 @@ Changes since 3.2.0pre1: --- o Michael Adam [EMAIL PROTECTED] -* Add vfs_zfsacl plugin. +* Add library for access to the registry configuration data. +* BUG 5023: Separate NFS4 and POSIX ACL code in file access checks. +* BUG 4308: Fix Excel save operation ACL bug. * Refactor and consolidate logic for retrieving the machine trust password information. +* VFS API cleanup. * BUG 4801: Correctly implement LSA lookup levels for LookupNames. +* Add new option debug class to control printing of the debug class. + in debug headers. +* Enable building of the zfsacl and notify_fam vfs modules. +* BUG 5083: Fix memleak in solarisacl module. +* BUG 5063: Fix build on RHEL5. o Jeremy Allison [EMAIL PROTECTED] -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-stable updated - initial-v3-2-test-1389-gef2e825
The branch, v3-2-stable has been updated via ef2e825e1fe5493115d2b271c2f4198e9e5b1f47 (commit) via 5a527476a07ea43178dc5afeaf8ad78da8a4080c (commit) via 642424b3779dd33cd2b5049789aa16e678438bb9 (commit) via 151b42a150a17f566e7b4055bbdbc0564a3c106d (commit) via 08c1720509dffa2886ed057e2d14907699122f3c (commit) via 7a3fe68bef7acde9d9f8a7a44ce7e9432f3c5a95 (commit) via 561e529a711338b2a3191f1b04f384f5ab3413ac (commit) via 58c806dbf85fd634c8f3559a035751a4cd0b5c4b (commit) via 15d0e574386e39a4d2fa61cd268b48dfa5c84dcb (commit) via 586d6cef521cebfd6fe2d433fdef498d4a59cb1b (commit) via d94bd3a03b574b3f62add25b0c04673500a3 (commit) via 0a914a55bab30d765872d72cfdd59889d2afe42a (commit) via f44f76415a7ce3ea73b5c52494f3b36feab4c870 (commit) via 7a48779ee5ec8bdd5e2b5eef94fd465f733b74b4 (commit) via 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a (commit) via beaa83f32bd367f1b6ec72ef80a8a258d662f523 (commit) via 1941c365b50d48fc90f0f98059b8cccf6c7a1a06 (commit) from 04e0460c7e4adfe29a8c788e1912129c4c0c7e62 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable - Log - commit ef2e825e1fe5493115d2b271c2f4198e9e5b1f47 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Tue Jan 15 10:48:49 2008 -0600 Update release notes for vfs_ea_rename to complete the recent merge. commit 5a527476a07ea43178dc5afeaf8ad78da8a4080c Merge: 04e0460c7e4adfe29a8c788e1912129c4c0c7e62 642424b3779dd33cd2b5049789aa16e678438bb9 Author: Gerald (Jerry) Carter [EMAIL PROTECTED] Date: Tue Jan 15 10:47:07 2008 -0600 Merge commit 'samba/v3-2-test' into v3-2-stable --- Summary of changes: WHATSNEW.txt|2 +- source/Makefile.in | 13 +- source/configure.in |4 +- source/include/smb.h|2 + source/libnet/libnet.h |2 +- source/libnet/libnet_join.c | 16 +- source/libnet/libnet_join.h | 75 source/librpc/gen_ndr/libnet_join.h | 73 +++ source/librpc/gen_ndr/ndr_libnet_join.c | 103 + source/librpc/gen_ndr/ndr_libnet_join.h | 20 + source/librpc/idl/libnet_join.idl | 60 +++ source/librpc/ndr/ndr_basic.c | 11 + source/librpc/ndr/ndr_misc.c| 81 source/modules/vfs_ea_tdb.c | 736 -- source/modules/vfs_xattr_tdb.c | 737 +++ source/registry/reg_api.c | 25 +- source/rpc_client/cli_lsarpc.c |8 +- source/rpcclient/rpcclient.c|2 +- source/script/tests/selftest.sh |2 +- source/utils/net.h |2 +- source/utils/net_ads.c |7 +- source/utils/net_domain.c |2 +- source/utils/net_rpc.c | 11 +- source/utils/net_rpc_join.c |4 +- source/winbindd/winbindd_cm.c |6 +- 25 files changed, 1149 insertions(+), 855 deletions(-) delete mode 100644 source/libnet/libnet_join.h create mode 100644 source/librpc/gen_ndr/libnet_join.h create mode 100644 source/librpc/gen_ndr/ndr_libnet_join.c create mode 100644 source/librpc/gen_ndr/ndr_libnet_join.h create mode 100644 source/librpc/idl/libnet_join.idl delete mode 100644 source/modules/vfs_ea_tdb.c create mode 100644 source/modules/vfs_xattr_tdb.c Changeset truncated at 500 lines: diff --git a/WHATSNEW.txt b/WHATSNEW.txt index 86f8ad9..253fe26 100644 --- a/WHATSNEW.txt +++ b/WHATSNEW.txt @@ -175,7 +175,7 @@ o Volker Lendecke [EMAIL PROTECTED] * Add generic a in-memory cache. * Import the Linux red-black tree implementation. * Remove large amount of global variables. -* Add vfs_ea_tdb module for file systems that do not implement xattrs. +* Add vfs_xattr_tdb module for file systems that do not implement xattrs. o Stefan Metzmacher [EMAIL PROTECTED] diff --git a/source/Makefile.in b/source/Makefile.in index 4260145..46f733c 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -268,7 +268,8 @@ LIBNDR_GEN_OBJ = librpc/gen_ndr/ndr_wkssvc.o \ librpc/gen_ndr/ndr_srvsvc.o \ librpc/gen_ndr/ndr_svcctl.o \ librpc/gen_ndr/ndr_eventlog.o \ -librpc/gen_ndr/ndr_notify.o +librpc/gen_ndr/ndr_notify.o \ +librpc/gen_ndr/ndr_libnet_join.o RPC_PARSE_OBJ0 = rpc_parse/parse_prs.o rpc_parse/parse_misc.o @@ -503,7 +504,7 @@ VFS_CAP_OBJ = modules/vfs_cap.o VFS_EXPAND_MSDFS_OBJ = modules/vfs_expand_msdfs.o VFS_SHADOW_COPY_OBJ = modules/vfs_shadow_copy.o VFS_AFSACL_OBJ = modules/vfs_afsacl.o -VFS_EA_TDB_OBJ = modules/vfs_ea_tdb.o
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1382-gecbe088
The branch, v3-2-test has been updated via ecbe08897c9cc47790f3d4f5680d25202bc0f6c3 (commit) from 642424b3779dd33cd2b5049789aa16e678438bb9 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit ecbe08897c9cc47790f3d4f5680d25202bc0f6c3 Author: Kai Blin [EMAIL PROTECTED] Date: Tue Jan 15 19:28:23 2008 +0100 libsmb: Do not upper-case target name on NTLMv2 hash generation This makes our NTLMv2 hash generation compatible to the Davenport example and fixes a bug when ntlm_auth is called with a non-upper-case --domain parameter and client ntlmv2 auth = yes Jerry, please consider for 3.2.0 --- Summary of changes: source/libsmb/smbencrypt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index d7f6f60..c547a4a 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -443,7 +443,7 @@ bool SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_ the username and domain. This prevents username swapping during the auth exchange */ - if (!ntv2_owf_gen(nt_hash, user, domain, True, ntlm_v2_hash)) { + if (!ntv2_owf_gen(nt_hash, user, domain, False, ntlm_v2_hash)) { return False; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-0-test updated - release-3-0-28-93-g1a1fe00
The branch, v3-0-test has been updated via 1a1fe0094dad0c66a26c87941760ad66c389cc50 (commit) from 73647214ae96f1ecd244b71d35048685f8c7ea8a (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test - Log - commit 1a1fe0094dad0c66a26c87941760ad66c389cc50 Author: Kai Blin [EMAIL PROTECTED] Date: Tue Jan 15 19:28:23 2008 +0100 libsmb: Do not upper-case target name on NTLMv2 hash generation This makes our NTLMv2 hash generation compatible to the Davenport example and fixes a bug when ntlm_auth is called with a non-upper-case --domain parameter and client ntlmv2 auth = yes Jerry, please consider for 3.0.28a --- Summary of changes: source/libsmb/smbencrypt.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/smbencrypt.c b/source/libsmb/smbencrypt.c index 5f7b5b1..9812cbf 100644 --- a/source/libsmb/smbencrypt.c +++ b/source/libsmb/smbencrypt.c @@ -444,7 +444,7 @@ BOOL SMBNTLMv2encrypt_hash(const char *user, const char *domain, const uchar nt_ the username and domain. This prevents username swapping during the auth exchange */ - if (!ntv2_owf_gen(nt_hash, user, domain, True, ntlm_v2_hash)) { + if (!ntv2_owf_gen(nt_hash, user, domain, False, ntlm_v2_hash)) { return False; } -- Samba Shared Repository
Re: [SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1358-gb66ac85
On Tue, Jan 15, 2008 at 03:58:09AM -0600, Volker Lendecke wrote: The branch, v3-2-test has been updated via b66ac8567c16f2c35fceceba2f858d5503620309 (commit) via 2036b4c5ad677b8a477b34b0f076febab0abff5e (commit) from e6bd1395f2c1da7bcf1a31cdb297919ed6a15469 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit b66ac8567c16f2c35fceceba2f858d5503620309 Author: Volker Lendecke [EMAIL PROTECTED] Date: Mon Jan 14 22:38:16 2008 +0100 Fix some warnings -- Jeremy, please check LGTM. Jeremy.
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-461-gd8a805a
The branch, v4-0-test has been updated via d8a805a2544c8864136f77e9086b2a01ae79a1d5 (commit) via b0657e068148eb0e5f1d69d125faaa29acb8d379 (commit) via 89053bc564f1d736da48fbe20e7f8f244b0c67fa (commit) via 9b47b551a3762590fefa5308310d91c6d8b378e5 (commit) via fc57a119f53a7bc0a0eb76b868bbd7386b3c5008 (commit) from 9cff25cce1d39460dbcab006a309bb2984969eed (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit d8a805a2544c8864136f77e9086b2a01ae79a1d5 Merge: b0657e068148eb0e5f1d69d125faaa29acb8d379 9cff25cce1d39460dbcab006a309bb2984969eed Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 09:00:04 2008 +1100 Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local commit b0657e068148eb0e5f1d69d125faaa29acb8d379 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 08:59:13 2008 +1100 Make the Fedora DS LDAP backend 'aci' actually work, with better quoting. Andrew Bartlett commit 89053bc564f1d736da48fbe20e7f8f244b0c67fa Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 08:58:07 2008 +1100 Test the behaviour of mixed domain_scope and search_options controls. Andrew Bartlett commit 9b47b551a3762590fefa5308310d91c6d8b378e5 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 08:57:28 2008 +1100 Make ldap.js test easier to re-run in failure cases, by deleting more things that we will create later. Andrew Bartlett commit fc57a119f53a7bc0a0eb76b868bbd7386b3c5008 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 08:49:54 2008 +1100 Rework control handling to remove the 'domain_scope' control Also remove the search_options control earlier, before, rather than after duplicating the request. When we generate referalls in the partition module, the domain_scope control with suppress them. Andrew Bartlett --- Summary of changes: source/dsdb/samdb/ldb_modules/partition.c | 54 - source/selftest/env/Samba4.pm |2 +- testprogs/blackbox/test_ldb.sh|7 testprogs/ejs/ldap.js |7 +++- 4 files changed, 51 insertions(+), 19 deletions(-) Changeset truncated at 500 lines: diff --git a/source/dsdb/samdb/ldb_modules/partition.c b/source/dsdb/samdb/ldb_modules/partition.c index 4586810..61b6444 100644 --- a/source/dsdb/samdb/ldb_modules/partition.c +++ b/source/dsdb/samdb/ldb_modules/partition.c @@ -169,13 +169,12 @@ static int partition_other_callback(struct ldb_context *ldb, void *context, stru } -static int partition_send_request(struct partition_context *ac, struct ldb_control *remove_control, +static int partition_send_request(struct partition_context *ac, struct dsdb_control_current_partition *partition) { int ret; struct ldb_module *backend; struct ldb_request *req; - struct ldb_control **saved_controls; if (partition) { backend = make_module_for_next_request(ac, ac-module-ldb, partition-module); @@ -225,12 +224,6 @@ static int partition_send_request(struct partition_context *ac, struct ldb_contr req-context = ac; } - /* Remove a control, so we don't confuse a backend server */ - if (remove_control !save_controls(remove_control, req, saved_controls)) { - ldb_oom(ac-module-ldb); - return LDB_ERR_OPERATIONS_ERROR; - } - if (partition) { ret = ldb_request_add_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID, false, partition); if (ret != LDB_SUCCESS) { @@ -253,18 +246,17 @@ static int partition_send_request(struct partition_context *ac, struct ldb_contr */ static int partition_send_all(struct ldb_module *module, struct partition_context *ac, - struct ldb_control *remove_control, struct ldb_request *req) { int i; struct partition_private_data *data = talloc_get_type(module-private_data, struct partition_private_data); - int ret = partition_send_request(ac, remove_control, NULL); + int ret = partition_send_request(ac, NULL); if (ret != LDB_SUCCESS) { return ret; } for (i=0; data data-partitions data-partitions[i]; i++) { - ret = partition_send_request(ac, remove_control, data-partitions[i]); + ret = partition_send_request(ac, data-partitions[i]); if (ret != LDB_SUCCESS) { return ret; } @@ -297,7 +289,7 @@ static int partition_replicate(struct
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1384-g2c045a8
The branch, v3-2-test has been updated via 2c045a8c817b4ec200830c4f8b508c1cd4c4d9aa (commit) via 50ab169f581b4efff5185fd86d1b9ceaaf3974dd (commit) from ecbe08897c9cc47790f3d4f5680d25202bc0f6c3 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 2c045a8c817b4ec200830c4f8b508c1cd4c4d9aa Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 23:06:23 2008 +0100 Use NDR_PRINT_UNION_STRING instead of NDR_PRINT_UNION_DEBUG in rpcclient. Guenther commit 50ab169f581b4efff5185fd86d1b9ceaaf3974dd Author: Günther Deschner [EMAIL PROTECTED] Date: Tue Jan 15 23:04:47 2008 +0100 Add some NDR_PRINT_*_STRING macros (returning talloced strings). Guenther --- Summary of changes: source/librpc/ndr/libndr.h| 10 +- source/rpcclient/cmd_lsarpc.c | 22 ++ 2 files changed, 23 insertions(+), 9 deletions(-) Changeset truncated at 500 lines: diff --git a/source/librpc/ndr/libndr.h b/source/librpc/ndr/libndr.h index 6341e20..d0c2c74 100644 --- a/source/librpc/ndr/libndr.h +++ b/source/librpc/ndr/libndr.h @@ -149,7 +149,7 @@ struct ndr_print { /* set to avoid recursion in ndr_size_*() calculation */ #define LIBNDR_FLAG_NO_NDR_SIZE(131) -/* useful macro for debugging */ +/* useful macro for debugging with DEBUG */ #define NDR_PRINT_DEBUG(type, p) ndr_print_debug((ndr_print_fn_t)ndr_print_ ##type, #p, p) #define NDR_PRINT_UNION_DEBUG(type, level, p) ndr_print_union_debug((ndr_print_fn_t)ndr_print_ ##type, #p, level, p) #define NDR_PRINT_FUNCTION_DEBUG(type, flags, p) ndr_print_function_debug((ndr_print_function_t)ndr_print_ ##type, #type, flags, p) @@ -157,6 +157,14 @@ struct ndr_print { #define NDR_PRINT_OUT_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_OUT, p) #define NDR_PRINT_IN_DEBUG(type, p) NDR_PRINT_FUNCTION_DEBUG(type, NDR_IN | NDR_SET_VALUES, p) +/* useful macro for debugging in strings */ +#define NDR_PRINT_STRUCT_STRING(ctx, type, p) ndr_print_struct_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, p) +#define NDR_PRINT_UNION_STRING(ctx, type, level, p) ndr_print_union_string(ctx, (ndr_print_fn_t)ndr_print_ ##type, #p, level, p) +#define NDR_PRINT_FUNCTION_STRING(ctx, type, flags, p) ndr_print_function_string(ctx, (ndr_print_function_t)ndr_print_ ##type, #type, flags, p) +#define NDR_PRINT_BOTH_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_BOTH, p) +#define NDR_PRINT_OUT_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_OUT, p) +#define NDR_PRINT_IN_STRING(ctx, type, p) NDR_PRINT_FUNCTION_STRING(ctx, type, NDR_IN | NDR_SET_VALUES, p) + #define NDR_BE(ndr) (((ndr)-flags (LIBNDR_FLAG_BIGENDIAN|LIBNDR_FLAG_LITTLE_ENDIAN)) == LIBNDR_FLAG_BIGENDIAN) enum ndr_err_code { diff --git a/source/rpcclient/cmd_lsarpc.c b/source/rpcclient/cmd_lsarpc.c index 7743269..05269d7 100644 --- a/source/rpcclient/cmd_lsarpc.c +++ b/source/rpcclient/cmd_lsarpc.c @@ -916,7 +916,8 @@ static void display_trust_dom_info_4(struct lsa_TrustDomainInfoPassword *p, cons data_blob_free(data_old); } -static void display_trust_dom_info(union lsa_TrustedDomainInfo *info, +static void display_trust_dom_info(TALLOC_CTX *mem_ctx, + union lsa_TrustedDomainInfo *info, enum lsa_TrustDomInfoEnum info_class, const char *pass) { @@ -924,12 +925,17 @@ static void display_trust_dom_info(union lsa_TrustedDomainInfo *info, case LSA_TRUSTED_DOMAIN_INFO_PASSWORD: display_trust_dom_info_4(info-password, pass); break; - default: - NDR_PRINT_UNION_DEBUG(lsa_TrustedDomainInfo, - info_class, info); + default: { + const char *str = NULL; + str = NDR_PRINT_UNION_STRING(mem_ctx, +lsa_TrustedDomainInfo, +info_class, info); + if (str) { + d_printf(%s\n, str); + } break; + } } - } static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli, @@ -967,7 +973,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobysid(struct rpc_pipe_client *cli, if (!NT_STATUS_IS_OK(result)) goto done; - display_trust_dom_info(info, info_class, cli-pwd.password); + display_trust_dom_info(mem_ctx, info, info_class, cli-pwd.password); done: if (pol) @@ -1015,7 +1021,7 @@ static NTSTATUS cmd_lsa_query_trustdominfobyname(struct rpc_pipe_client *cli, if
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-463-gc4aba5a
The branch, v4-0-test has been updated via c4aba5ad01f5095ad7a9d0d0f1e3c6afedbbd9b7 (commit) via f7f765c29b1aca1179a47bdd8712917c3f244f15 (commit) from d8a805a2544c8864136f77e9086b2a01ae79a1d5 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit c4aba5ad01f5095ad7a9d0d0f1e3c6afedbbd9b7 Merge: f7f765c29b1aca1179a47bdd8712917c3f244f15 d8a805a2544c8864136f77e9086b2a01ae79a1d5 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 09:26:24 2008 +1100 Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-abartlet commit f7f765c29b1aca1179a47bdd8712917c3f244f15 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 09:26:14 2008 +1100 Start generating a configuration for the refint overlay. This OpenLDAP module should ensure that after a subtree rename, attributes are still consistant. Andrew Bartlett --- Summary of changes: source/selftest/env/Samba4.pm |6 ++ source/setup/provision-backend |7 +++ 2 files changed, 13 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/selftest/env/Samba4.pm b/source/selftest/env/Samba4.pm index dc084ae..87a86ef 100644 --- a/source/selftest/env/Samba4.pm +++ b/source/selftest/env/Samba4.pm @@ -244,6 +244,7 @@ sub mk_openldap($$$) modulepath $olroot/libexec/openldap moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } @@ -255,6 +256,7 @@ modulepath $olroot/libexec/openldap moduleload back_hdb moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } @@ -266,6 +268,7 @@ moduleload memberof moduleload back_hdb moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } @@ -278,6 +281,7 @@ modulepath /usr/lib/ldap moduleload back_hdb moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } @@ -289,6 +293,7 @@ moduleload memberof modulepath /usr/lib/openldap moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } @@ -300,6 +305,7 @@ moduleload memberof modulepath /usr/lib64/openldap moduleload syncprov moduleload memberof +moduleload refint ; close(CONF); } diff --git a/source/setup/provision-backend b/source/setup/provision-backend index 66555c4..ba9e67f 100755 --- a/source/setup/provision-backend +++ b/source/setup/provision-backend @@ -151,10 +151,12 @@ if (options[ldap-backend-type] == fedora-ds) { var res = ldb.searchlinkID=*)(!(linkID:1.2.840.113556.1.4.803:=1)))(objectclass=attributeSchema)), subobj.SCHEMADN, ldb.SCOPE_SUBTREE, attrs); assert(res.error == 0); var memberof_config = ; + var refint_attributes = ; for (i=0; i res.msgs.length; i++) { searchone(ldb, subobj.DOMAINDN, ((objectClass=computer)(cn= + subobj.NETBIOSNAME + )), objectGUID); var target = searchone(ldb, subobj.SCHEMADN, ((objectclass=attributeSchema)(linkID= + (res.msgs[i].linkID + 1) + )), lDAPDisplayName); if (target != undefined) { + refint_attributes = refint_attributes + + target + + res.msgs[i].lDAPDisplayName; memberof_config = memberof_config + overlay memberof memberof-dangling error memberof-refint TRUE @@ -166,6 +168,11 @@ memberof-dangling-error 32 ; } } + + memberof_config = overlay refint +refint_attributes + refint_attributes + + + memberof_config; + ok = sys.file_save(subobj.LDAPDIR + /memberof.conf, memberof_config); if (!ok) { message(failed to create file: + f + \n); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1385-g1df8f98
The branch, v3-2-test has been updated via 1df8f98602ac4be1d37f9c7748da8b89db80215f (commit) from 2c045a8c817b4ec200830c4f8b508c1cd4c4d9aa (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 1df8f98602ac4be1d37f9c7748da8b89db80215f Author: Gerald W. Carter [EMAIL PROTECTED] Date: Tue Jan 15 16:53:24 2008 -0600 Adding basic script to help in the creation of tarballs for release. Developers can use this to create tarballs for testing or general purpose QA. Usage: release-scripts/create-tarball The script will prompt for information as necessary. --- Summary of changes: release-scripts/create-tarball | 85 1 files changed, 85 insertions(+), 0 deletions(-) create mode 100755 release-scripts/create-tarball Changeset truncated at 500 lines: diff --git a/release-scripts/create-tarball b/release-scripts/create-tarball new file mode 100755 index 000..4592272 --- /dev/null +++ b/release-scripts/create-tarball @@ -0,0 +1,85 @@ +#!/bin/bash + +TOPDIR=`dirname $0`/.. + +cd $TOPDIR + +echo -n Please enter branch to cut tarball from: +read branch + +if [ x$branch = x ]; then + echo You must enter a name! Exiting + exit 1 +fi + +git-checkout $branch +if [ $? -ne 0 ]; then + echo Invalid branch name! Exiting + exit 2 +fi + +VER_H=source/include/version.h +(cd source ./autogen.sh) + +if [ ! -f $VER_H ]; then + echo Failed to find $VER_H! Exiting + exit 1 +fi + +version=`grep SAMBA_VERSION_OFFICIAL_STRING $VER_H | awk '{print $3}'` +version=$version-`grep SAMBA_VERSION_VENDOR_SUFFIX $VER_H | awk '{print $3}'` +version=`echo $version | sed 's/\//g'` + +echo Creating release tarball for Samba $version + +/bin/rm -rf ../samba-${version} +git-archive --format=tar --prefix=samba-${version}/ HEAD | (cd .. tar xf -) + +pushd ../samba-${version} + +echo Enter the absolute path to the generated Samba docs directory. +echo -n Just hit return to exclude the docs from the generate tarball: +read docsdir + +if [ x$docsdir != x ]; then + if [ ! -d $docsdir ]; then + echo $docsdir does not exist! Exiting + exit 1 + fi + + /bin/rm -rf docs + mkdir docs + rsync -a $docsdir/ docs/ + + cd docs + /bin/rm -rf test.pdf Samba4*pdf htmldocs/Samba4* htmldocs/test + /bin/mv manpages-3 manpages + /bin/mv htmldocs/manpages-3 htmldocs/manpages + cd .. +fi + +cd .. +tar cf samba-${version}.tar --exclude=.git* --exclude=CVS --exclude=.svn samba-${version} +gpg --detach-sign --armor samba-${version}.tar +gzip -9 samba-${version}.tar + +popd +echo -n Enter tag name (or hit enter to skip): +read tagname + +if [ x$tagname != x ]; then + if [ x`git-tag -l $tagname` != x ]; then + echo -n Tag exists. Do you wish to overwrite? (y/N): + read answer + + if [ x$answer != xy ]; then +echo Tag creation aborted. +exit 1 + fi + fi + + git-tag -s ${tagname} +fi + +echo Done! +exit 0 -- Samba Shared Repository
Rev 763: update for release in http://samba.org/~tridge/ctdb
revno: 763 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Wed 2008-01-16 09:47:43 +1100 message: update for release modified: packaging/RPM/ctdb.specctdb.spec-20070527204758-biuh7znabuwan3zn-3 === modified file 'packaging/RPM/ctdb.spec' --- a/packaging/RPM/ctdb.spec 2008-01-10 23:44:16 + +++ b/packaging/RPM/ctdb.spec 2008-01-15 22:47:43 + @@ -5,7 +5,7 @@ Packager: Samba Team [EMAIL PROTECTED] Name: ctdb Version: 1.0 -Release: 22 +Release: 23 Epoch: 0 License: GNU GPL version 3 Group: System Environment/Daemons @@ -119,6 +119,12 @@ %{_includedir}/ctdb_private.h %changelog +* Wed Jan 16 2008 : Version 1.0.23 + - fixed a memory leak in the recoveryd + - fixed a corruption bug in the new transaction code + - fixed a case where an packet for a disconnected client could be processed + - added http event script + - updated documentation * Thu Jan 10 2008 : Version 1.0.22 - auto-run vacuum and repack ops * Wed Jan 09 2008 : Version 1.0.21
Rev 762: - catch a case where the client disconnects during a call in http://samba.org/~tridge/ctdb
revno: 762 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Wed 2008-01-16 09:44:48 +1100 message: - catch a case where the client disconnects during a call - track all talloc memory, using NULL context modified: server/ctdb_control.c ctdb_control.c-20070426122724-j6gkpiofhbwdin63-1 server/ctdb_daemon.c ctdb_daemon.c-20070409200331-3el1kqgdb9m4ib0g-1 server/ctdbd.c ctdbd.c-20070411085044-dqmhr6mfeexnyt4m-1 === modified file 'server/ctdb_control.c' --- a/server/ctdb_control.c 2008-01-14 21:42:12 + +++ b/server/ctdb_control.c 2008-01-15 22:44:48 + @@ -71,7 +71,7 @@ case CTDB_CONTROL_STATISTICS: { CHECK_CONTROL_DATA_SIZE(0); - ctdb-statistics.memory_used = talloc_total_size(ctdb); + ctdb-statistics.memory_used = talloc_total_size(NULL); ctdb-statistics.frozen = (ctdb-freeze_mode == CTDB_FREEZE_FROZEN); ctdb-statistics.recovering = (ctdb-recovery_mode == CTDB_RECOVERY_ACTIVE); outdata-dptr = (uint8_t *)ctdb-statistics; === modified file 'server/ctdb_daemon.c' --- a/server/ctdb_daemon.c 2008-01-14 21:42:12 + +++ b/server/ctdb_daemon.c 2008-01-15 22:44:48 + @@ -288,9 +288,37 @@ client-ctdb-statistics.pending_calls--; } - -static void daemon_request_call_from_client(struct ctdb_client *client, - struct ctdb_req_call *c); +struct ctdb_daemon_packet_wrap { + struct ctdb_context *ctdb; + uint32_t client_id; +}; + +/* + a wrapper to catch disconnected clients + */ +static void daemon_incoming_packet_wrap(void *p, struct ctdb_req_header *hdr) +{ + struct ctdb_client *client; + struct ctdb_daemon_packet_wrap *w = talloc_get_type(p, + struct ctdb_daemon_packet_wrap); + if (w == NULL) { + DEBUG(0,(__location__ Bad packet type '%s'\n, talloc_get_name(p))); + return; + } + + client = ctdb_reqid_find(w-ctdb, w-client_id, struct ctdb_client); + if (client == NULL) { + DEBUG(0,(__location__ Packet for disconnected client %u\n, +w-client_id)); + talloc_free(w); + return; + } + talloc_free(w); + + /* process it */ + daemon_incoming_packet(client, hdr); +} + /* this is called when the ctdb daemon received a ctdb request call @@ -307,6 +335,7 @@ TDB_DATA key, data; int ret; struct ctdb_context *ctdb = client-ctdb; + struct ctdb_daemon_packet_wrap *w; ctdb-statistics.total_calls++; ctdb-statistics.pending_calls++; @@ -322,15 +351,23 @@ key.dptr = c-data; key.dsize = c-keylen; + w = talloc(ctdb, struct ctdb_daemon_packet_wrap); + CTDB_NO_MEMORY_VOID(ctdb, w); + + w-ctdb = ctdb; + w-client_id = client-client_id; + ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, header, (struct ctdb_req_header *)c, data, - daemon_incoming_packet, client, True); + daemon_incoming_packet_wrap, w, True); if (ret == -2) { /* will retry later */ ctdb-statistics.pending_calls--; return; } + talloc_free(w); + if (ret != 0) { DEBUG(0,(__location__ Unable to fetch record\n)); ctdb-statistics.pending_calls--; === modified file 'server/ctdbd.c' --- a/server/ctdbd.c2008-01-10 03:40:56 + +++ b/server/ctdbd.c2008-01-15 22:44:48 + @@ -137,6 +137,8 @@ exit(1); } + talloc_enable_null_tracking(); + ctdb_block_signal(SIGPIPE); ev = event_context_init(NULL);
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1390-g0d989bf
The branch, v3-2-test has been updated via 0d989bf90b9b75a057b572bb4369ee3126db1fb8 (commit) via e57856fff2ef86481ac6770c7d010a2d8bdd (commit) via ed7322dcfa6f42743b784246f5de74d4e64b0765 (commit) via 6e17a56039be13ac1ef7004f15d154141bad7196 (commit) via 22a4129fabf70e01cc638c2f7347c28201838830 (commit) from 1df8f98602ac4be1d37f9c7748da8b89db80215f (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 0d989bf90b9b75a057b572bb4369ee3126db1fb8 Merge: e57856fff2ef86481ac6770c7d010a2d8bdd 1df8f98602ac4be1d37f9c7748da8b89db80215f Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 15:09:35 2008 -0800 Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into v3-2-test commit e57856fff2ef86481ac6770c7d010a2d8bdd Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 15:09:13 2008 -0800 Fix status used uninitialized warnings. Jeremy. commit ed7322dcfa6f42743b784246f5de74d4e64b0765 Merge: 6e17a56039be13ac1ef7004f15d154141bad7196 ecbe08897c9cc47790f3d4f5680d25202bc0f6c3 Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 10:31:47 2008 -0800 Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into v3-2-test commit 6e17a56039be13ac1ef7004f15d154141bad7196 Merge: 22a4129fabf70e01cc638c2f7347c28201838830 642424b3779dd33cd2b5049789aa16e678438bb9 Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 10:19:47 2008 -0800 Merge branch 'v3-2-test' of ssh://[EMAIL PROTECTED]/data/git/samba into v3-2-test commit 22a4129fabf70e01cc638c2f7347c28201838830 Author: Jeremy Allison [EMAIL PROTECTED] Date: Mon Jan 14 11:06:46 2008 -0800 From Alexander Bokovoy names is a 'const char **names' here, passed from upper level. Passing 'names' as a talloc context will break things as 'names' is usually likely is a local variable, not a talloc'd. And we want to have array elements on a context of the array anyway. Jeremy. --- Summary of changes: source/groupdb/mapping_ldb.c |2 +- source/groupdb/mapping_tdb.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source/groupdb/mapping_ldb.c b/source/groupdb/mapping_ldb.c index 05056ea..454fe46 100644 --- a/source/groupdb/mapping_ldb.c +++ b/source/groupdb/mapping_ldb.c @@ -492,7 +492,7 @@ static NTSTATUS enum_aliasmem(const DOM_SID *alias, DOM_SID **sids, size_t *num) NULL }; int ret, i; - NTSTATUS status; + NTSTATUS status = NT_STATUS_OK; struct ldb_result *res=NULL; struct ldb_dn *dn; struct ldb_message_element *el; diff --git a/source/groupdb/mapping_tdb.c b/source/groupdb/mapping_tdb.c index 21a4f95..67e377c 100644 --- a/source/groupdb/mapping_tdb.c +++ b/source/groupdb/mapping_tdb.c @@ -394,7 +394,7 @@ static NTSTATUS one_alias_membership(const DOM_SID *member, char *string_sid; TDB_DATA dbuf; const char *p; - NTSTATUS status; + NTSTATUS status = NT_STATUS_OK; TALLOC_CTX *frame; slprintf(key, sizeof(key), %s%s, MEMBEROF_PREFIX, -- Samba Shared Repository
Build status as of Wed Jan 16 00:00:02 2008
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2008-01-15 00:00:39.0 + +++ /home/build/master/cache/broken_results.txt 2008-01-16 00:00:33.0 + @@ -1,4 +1,4 @@ -Build status as of Tue Jan 15 00:00:02 2008 +Build status as of Wed Jan 16 00:00:02 2008 Build counts: Tree Total Broken Panic @@ -7,16 +7,16 @@ ctdb 0 0 0 distcc 1 0 0 ldb 31 30 0 -libreplace 30 18 0 +libreplace 30 19 0 lorikeet-heimdal 26 15 0 pidl 18 6 0 ppp 10 7 0 rsync31 15 0 samba-docs 0 0 0 -samba-gtk3 3 0 +samba-gtk4 4 0 samba4 0 0 0 -samba_3_2_test 31 16 0 -samba_4_0_test 29 25 3 +samba_3_2_test 31 20 0 +samba_4_0_test 29 26 3 smb-build29 3 0 talloc 31 10 0 tdb 31 20 0
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1391-g5467db3
The branch, v3-2-test has been updated via 5467db388355a4769e48fed7eb80920d1820f727 (commit) from 0d989bf90b9b75a057b572bb4369ee3126db1fb8 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 5467db388355a4769e48fed7eb80920d1820f727 Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 16:13:11 2008 -0800 Fix the API exported for auth_functions. Ensure we call passing 3 fstrings/sizeof(fstrings) as 3.0.x did. Found by Derrell. Derrell please test ! Thanks, Jeremy. --- Summary of changes: source/libsmb/libsmbclient.c | 582 ++ 1 files changed, 310 insertions(+), 272 deletions(-) Changeset truncated at 500 lines: diff --git a/source/libsmb/libsmbclient.c b/source/libsmb/libsmbclient.c index da8f1e3..f266c16 100644 --- a/source/libsmb/libsmbclient.c +++ b/source/libsmb/libsmbclient.c @@ -592,13 +592,58 @@ smbc_remove_unused_server(SMBCCTX * context, return 0; } +/ + * Call the auth_fn with fixed size (fstring) buffers. + ***/ + +static void call_auth_fn(TALLOC_CTX *ctx, + SMBCCTX *context, + const char *server, + const char *share, + char **pp_workgroup, + char **pp_username, + char **pp_password) +{ + fstring workgroup; + fstring username; + fstring password; + + strlcpy(workgroup, *pp_workgroup, sizeof(workgroup)); + strlcpy(username, *pp_username, sizeof(username)); + strlcpy(password, *pp_password, sizeof(password)); + + if (context-internal-_auth_fn_with_context != NULL) { + (context-internal-_auth_fn_with_context)( + context, + server, share, + workgroup, sizeof(workgroup), + username, sizeof(username), + password, sizeof(password)); + } else { + (context-callbacks.auth_fn)( + server, share, + workgroup, sizeof(workgroup), + username, sizeof(username), + password, sizeof(password)); + } + + TALLOC_FREE(*pp_workgroup); + TALLOC_FREE(*pp_username); + TALLOC_FREE(*pp_password); + + *pp_workgroup = talloc_strdup(ctx, workgroup); + *pp_username = talloc_strdup(ctx, username); + *pp_password = talloc_strdup(ctx, password); +} + static SMBCSRV * -find_server(SMBCCTX *context, +find_server(TALLOC_CTX *ctx, + SMBCCTX *context, const char *server, const char *share, - char *workgroup, - char *username, - char *password) + char **pp_workgroup, + char **pp_username, + char **pp_password) { SMBCSRV *srv; int auth_called = 0; @@ -606,22 +651,15 @@ find_server(SMBCCTX *context, check_server_cache: srv = (context-callbacks.get_cached_srv_fn)(context, server, share, - workgroup, username); - - if (!auth_called !srv (!username[0] || !password[0])) { -if (context-internal-_auth_fn_with_context != NULL) { -(context-internal-_auth_fn_with_context)( -context, -server, share, -workgroup, strlen(workgroup)+1, -username, strlen(username)+1, -password, strlen(password)+1); -} else { -(context-callbacks.auth_fn)( -server, share, -workgroup, strlen(workgroup)+1, -username, strlen(username)+1, -password, strlen(password)+1); + *pp_workgroup, *pp_username); + + if (!auth_called !srv (!*pp_username || !(*pp_username)[0] || + !*pp_password || !(*pp_password)[0])) { + call_auth_fn(ctx, context, server, share, + pp_workgroup, pp_username, pp_password); + + if (!pp_workgroup || !pp_username || !pp_password) { + return NULL; } /* @@ -652,12 +690,12 @@ find_server(SMBCCTX *context, (context-callbacks.remove_cached_srv_fn)(context,
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1392-g874425c
The branch, v3-2-test has been updated via 874425c8f680fb2f737b46a3177b239e69302af5 (commit) from 5467db388355a4769e48fed7eb80920d1820f727 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 874425c8f680fb2f737b46a3177b239e69302af5 Author: Jeremy Allison [EMAIL PROTECTED] Date: Tue Jan 15 17:20:50 2008 -0800 Port from ctdb: minor fix to transaction_write_existing: tridge. Jeremy. --- Summary of changes: source/lib/tdb/common/transaction.c | 22 ++ 1 files changed, 6 insertions(+), 16 deletions(-) Changeset truncated at 500 lines: diff --git a/source/lib/tdb/common/transaction.c b/source/lib/tdb/common/transaction.c index 0ecfb9b..ea0e3a9 100644 --- a/source/lib/tdb/common/transaction.c +++ b/source/lib/tdb/common/transaction.c @@ -316,25 +316,15 @@ static int transaction_write_existing(struct tdb_context *tdb, tdb_off_t off, return 0; } - /* overwrite part of an existing block */ - if (buf == NULL) { - memset(tdb-transaction-blocks[blk] + off, 0, len); - } else { - memcpy(tdb-transaction-blocks[blk] + off, buf, len); - } - if (blk == tdb-transaction-num_blocks-1) { - if (len + off tdb-transaction-last_block_size) { - tdb-transaction-last_block_size = len + off; - } + if (blk == tdb-transaction-num_blocks-1 + off + len tdb-transaction-last_block_size) { + len = tdb-transaction-last_block_size - off; } - return 0; + /* overwrite part of an existing block */ + memcpy(tdb-transaction-blocks[blk] + off, buf, len); -fail: - TDB_LOG((tdb, TDB_DEBUG_FATAL, transaction_write: failed at off=%d len=%d\n, -(blk*tdb-transaction-block_size) + off, len)); - tdb-transaction-transaction_error = 1; - return -1; + return 0; } -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-1397-g4ff2101
The branch, v3-2-test has been updated via 4ff2101c69a0cfcfdc5f775493cb6e88c57e4bbe (commit) via f963d57096184dd9381fcc5f175150d27460ea7a (commit) via 3a61e663e51fe620225691bc8673bf8800a36f47 (commit) via 913c335d21c503d32b35bf65da7b2bddf0473875 (commit) via 2f432842442859f98ecd263464ce02821ab10fca (commit) from 874425c8f680fb2f737b46a3177b239e69302af5 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test - Log - commit 4ff2101c69a0cfcfdc5f775493cb6e88c57e4bbe Merge: f963d57096184dd9381fcc5f175150d27460ea7a 874425c8f680fb2f737b46a3177b239e69302af5 Author: Derrell Lipman [EMAIL PROTECTED] Date: Wed Jan 16 02:30:21 2008 + Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit f963d57096184dd9381fcc5f175150d27460ea7a Merge: 3a61e663e51fe620225691bc8673bf8800a36f47 5467db388355a4769e48fed7eb80920d1820f727 Author: Derrell Lipman [EMAIL PROTECTED] Date: Wed Jan 16 00:45:06 2008 + Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit 3a61e663e51fe620225691bc8673bf8800a36f47 Merge: 913c335d21c503d32b35bf65da7b2bddf0473875 9a4b6fd3e21f54a0ff83f1fd0d0d5331a2cfdd0a Author: Derrell Lipman [EMAIL PROTECTED] Date: Tue Jan 15 13:58:47 2008 + Merge branch 'v3-2-test' of git://git.samba.org/samba into v3-2-test commit 913c335d21c503d32b35bf65da7b2bddf0473875 Author: Derrell Lipman [EMAIL PROTECTED] Date: Sun Jan 13 17:10:06 2008 -0500 Fix smbc_listxattr() and friends (bug #5189) When the capability of using full names for DOS attributes was added, a bug was introduced which caused the wrong number of bytes to be returned. This patch to smbc_listxattr_ctx() fixes the problem. Thanks to Jack Schmidt for this patch. Derrell commit 2f432842442859f98ecd263464ce02821ab10fca Author: Derrell Lipman [EMAIL PROTECTED] Date: Sun Jan 13 12:07:18 2008 -0500 Fix compile and linking errors since last this code was tested --- Summary of changes: examples/libsmbclient/Makefile |2 +- examples/libsmbclient/smbwrapper/Makefile |2 +- examples/libsmbclient/smbwrapper/wrapper.c |1 + examples/libsmbclient/testacl.c| 27 ++- source/include/libsmbclient.h |2 +- source/libsmb/libsmbclient.c | 11 +++ 6 files changed, 37 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/examples/libsmbclient/Makefile b/examples/libsmbclient/Makefile index 6500707..26b8057 100644 --- a/examples/libsmbclient/Makefile +++ b/examples/libsmbclient/Makefile @@ -13,7 +13,7 @@ CFLAGS = -O0 -g -I$(SAMBA_INCL) $(EXTLIB_INCL) $(DEFS) LDFLAGS = -L/usr/local/samba/lib \ -lldap -lkrb5 -lgssapi_krb5 #LIBSMBCLIENT = /usr/local/samba/lib/libsmbclient.so -LIBSMBCLIENT = -lsmbclient -ldl -lresolv +LIBSMBCLIENT = -lwbclient -lsmbclient -ldl -lresolv TESTS= testsmbc \ testacl \ diff --git a/examples/libsmbclient/smbwrapper/Makefile b/examples/libsmbclient/smbwrapper/Makefile index c94ef8f..7264353 100644 --- a/examples/libsmbclient/smbwrapper/Makefile +++ b/examples/libsmbclient/smbwrapper/Makefile @@ -1,4 +1,4 @@ -LIBS = -lsmbclient -ldl +LIBS = -lwbclient -lsmbclient -ldl DEFS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE CFLAGS = -I$(SAMBA_INCL) $(EXTLIB_INCL) diff --git a/examples/libsmbclient/smbwrapper/wrapper.c b/examples/libsmbclient/smbwrapper/wrapper.c index 30f9037..958e006 100644 --- a/examples/libsmbclient/smbwrapper/wrapper.c +++ b/examples/libsmbclient/smbwrapper/wrapper.c @@ -61,6 +61,7 @@ #include dirent.h #include signal.h #include stdarg.h +#include string.h #ifdef __USE_GNU # define SMBW_USE_GNU #endif diff --git a/examples/libsmbclient/testacl.c b/examples/libsmbclient/testacl.c index 4d327b3..51cc90f 100644 --- a/examples/libsmbclient/testacl.c +++ b/examples/libsmbclient/testacl.c @@ -7,6 +7,7 @@ enum acl_mode { +SMB_ACL_LIST, SMB_ACL_GET, SMB_ACL_SET, SMB_ACL_DELETE, @@ -24,7 +25,7 @@ int main(int argc, const char *argv[]) int debug = 0; int numeric = 0; int full_time_names = 0; -enum acl_mode mode = SMB_ACL_GET; +enum acl_mode mode = SMB_ACL_LIST; static char *the_acl = NULL; int ret; char *p; @@ -149,6 +150,30 @@ int main(int argc, const char *argv[]) switch(mode) { +case SMB_ACL_LIST: +ret = smbc_listxattr(path, value, sizeof(value)-2); +if (ret 0) +{ +printf(Could not get attribute list for [%s] %d: %s\n, + path, errno, strerror(errno)); +return 1; +} + +/* + * The list of attributes has a series of null-terminated strings. + * The list of strings terminates with an extra
Rev 764: merge from ronnie in http://samba.org/~tridge/ctdb
revno: 764 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge.stable timestamp: Wed 2008-01-16 14:32:29 +1100 message: merge from ronnie modified: client/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 doc/ctdb.1 ctdb.1-20070609004027-2618fsab2br6vqha-1 doc/ctdb.1.htmlctdb.1.html-20070609004024-w2r7qblwi5s3iw4a-1 doc/ctdb.1.xml ctdb.1.xml-20070608070258-bjuf7701h1qc1b05-2 doc/ctdbd.1ctdbd.1-20070610004249-06awdka4n3gyea3w-1 doc/ctdbd.1.html ctdbd.1.html-20070610004253-y2xxgjfgnpsucekc-1 doc/ctdbd.1.xmlctdbd.1.xml-20070610004256-jh1qq0ws5zidbmbq-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 server/ctdb_recoverd.c recoverd.c-20070503213540-bvxuyd9jm1f7ig90-1 tools/ctdb_vacuum.cctdb_vacuum.c-20080108053634-3zs2bdddzs4r1e1t-1 revno: 728.1.19 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 14:04:16 +1100 message: doc updates modified: doc/ctdb.1 ctdb.1-20070609004027-2618fsab2br6vqha-1 doc/ctdb.1.html ctdb.1.html-20070609004024-w2r7qblwi5s3iw4a-1 doc/ctdb.1.xml ctdb.1.xml-20070608070258-bjuf7701h1qc1b05-2 revno: 728.1.18 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 12:03:22 +1100 message: update getdbmap docs modified: doc/ctdb.1 ctdb.1-20070609004027-2618fsab2br6vqha-1 doc/ctdb.1.html ctdb.1.html-20070609004024-w2r7qblwi5s3iw4a-1 doc/ctdb.1.xml ctdb.1.xml-20070608070258-bjuf7701h1qc1b05-2 revno: 728.1.17 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 11:09:16 +1100 message: update modified: doc/ctdbd.1ctdbd.1-20070610004249-06awdka4n3gyea3w-1 doc/ctdbd.1.html ctdbd.1.html-20070610004253-y2xxgjfgnpsucekc-1 revno: 728.1.16 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 11:08:41 +1100 message: update --transport we only supprot tcp now, infiniband may be supported in the future modified: doc/ctdbd.1.xml ctdbd.1.xml-20070610004256-jh1qq0ws5zidbmbq-1 revno: 728.1.15 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 11:06:26 +1100 message: explain public-interface and single-public-ip better modified: doc/ctdbd.1ctdbd.1-20070610004249-06awdka4n3gyea3w-1 doc/ctdbd.1.html ctdbd.1.html-20070610004253-y2xxgjfgnpsucekc-1 doc/ctdbd.1.xml ctdbd.1.xml-20070610004256-jh1qq0ws5zidbmbq-1 revno: 728.1.14 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 10:44:43 +1100 message: improve documentation of --nosetsched modified: doc/ctdbd.1ctdbd.1-20070610004249-06awdka4n3gyea3w-1 doc/ctdbd.1.html ctdbd.1.html-20070610004253-y2xxgjfgnpsucekc-1 doc/ctdbd.1.xml ctdbd.1.xml-20070610004256-jh1qq0ws5zidbmbq-1 revno: 728.1.13 revision-id:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Ronnie Sahlberg [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2008-01-16 10:23:26 +1100 message: ctdb_control_send() does not need to take an outdata parameter remove the outdata parameter from the function and all callers modified: client/ctdb_client.c ctdb_client.c-20070411010216-3kd8v37k61steeya-1 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 server/ctdb_recoverd.c
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-464-g8c88e4e
The branch, v4-0-test has been updated via 8c88e4eb1c0a606e7899091525260e8d6558ffd0 (commit) from c4aba5ad01f5095ad7a9d0d0f1e3c6afedbbd9b7 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 8c88e4eb1c0a606e7899091525260e8d6558ffd0 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 15:14:05 2008 +1100 Rework linked_attributes module for the REPLACE case. This moves to a smarter 'find the delta' based operation of the linked attributes module, when the caller asks for a 'replace' of the link source. Previously we would spray operations all over the database, even if the net result was just to modify one record. This also means we need the transaction safety less, which may be useful for some LDAP backends that don't provide this functionality on the LDAP server. Andrew Bartlett --- Summary of changes: source/dsdb/samdb/ldb_modules/linked_attributes.c | 92 +++-- 1 files changed, 86 insertions(+), 6 deletions(-) Changeset truncated at 500 lines: diff --git a/source/dsdb/samdb/ldb_modules/linked_attributes.c b/source/dsdb/samdb/ldb_modules/linked_attributes.c index 803d24e..b3fdffe 100644 --- a/source/dsdb/samdb/ldb_modules/linked_attributes.c +++ b/source/dsdb/samdb/ldb_modules/linked_attributes.c @@ -279,6 +279,27 @@ static int linked_attributes_add(struct ldb_module *module, struct ldb_request * return setup_modifies(module-ldb, ac, ac, req-op.add.message, NULL, req-op.add.message-dn); } +struct merge { + struct ldb_dn *dn; + bool add; + bool ignore; +}; + +static int merge_cmp(struct merge *merge1, struct merge *merge2) { + int ret; + ret = ldb_dn_compare(merge1-dn, merge2-dn); + if (ret == 0) { + if (merge1-add == merge2-add) { + return 0; + } + if (merge1-add == true) { + return 1; + } + return -1; + } + return ret; +} + static int linked_attributes_mod_replace_search_callback(struct ldb_context *ldb, void *context, struct ldb_reply *ares) { struct replace_context *ac2 = talloc_get_type(context, struct replace_context); @@ -296,16 +317,63 @@ static int linked_attributes_mod_replace_search_callback(struct ldb_context *ldb /* See if this element already exists */ if (search_el) { - int ret; + + struct merge *merged_list = NULL; + + int ret, size = 0, i; struct ldb_message *msg = ldb_msg_new(ac); if (!msg) { ldb_oom(ac-module-ldb); return LDB_ERR_OPERATIONS_ERROR; } - /* Lazy option: Delete and add the elements on all members */ - msg-num_elements = 1; - msg-elements = search_el; + /* Add all the existing elements, marking as 'proposed for delete' by setting .add = false */ + for (i=0; i search_el-num_values; i++) { + merged_list = talloc_realloc(ares, merged_list, struct merge, size + 1); + merged_list[size].dn = ldb_dn_new(merged_list, ldb, (char *)search_el-values[i].data); + merged_list[size].add = false; + merged_list[size].ignore = false; + size++; + } + + /* Add all the new replacement elements, marking as 'proposed for add' by setting .add = true */ + for (i=0; i ac2-el-num_values; i++) { + merged_list = talloc_realloc(ares, merged_list, struct merge, size + 1); + merged_list[size].dn = ldb_dn_new(merged_list, ldb, (char *)ac2-el-values[i].data); + merged_list[size].add = true; + merged_list[size].ignore = false; + size++; + } + + /* Sort the list, so we can pick out an add and delete for the same DN, and eliminate them */ + qsort(merged_list, size, + sizeof(*merged_list), + (comparison_fn_t)merge_cmp); + + /* Now things are sorted, it is trivial to mark pairs of DNs as 'ignore' */ + for (i=0; i + 1 size; i++) { + if (ldb_dn_compare(merged_list[i].dn, + merged_list[i+1].dn) == 0
[SCM] Samba Shared Repository - branch v4-0-test updated - release-4-0-0alpha2-465-g30fc375
The branch, v4-0-test has been updated via 30fc3752c7573fcf8b1a41f7b3bc8dad860077f8 (commit) from 8c88e4eb1c0a606e7899091525260e8d6558ffd0 (commit) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test - Log - commit 30fc3752c7573fcf8b1a41f7b3bc8dad860077f8 Author: Andrew Bartlett [EMAIL PROTECTED] Date: Wed Jan 16 15:48:28 2008 +1100 Print out the reason we can't delete the user in SAMR. We need to be far more granular bout this - in particular, we need a decide LDAP - NTSTATUS conversion. Andrew Bartlett --- Summary of changes: source/rpc_server/samr/dcesrv_samr.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source/rpc_server/samr/dcesrv_samr.c b/source/rpc_server/samr/dcesrv_samr.c index 03f3601..760d774 100644 --- a/source/rpc_server/samr/dcesrv_samr.c +++ b/source/rpc_server/samr/dcesrv_samr.c @@ -2910,6 +2910,9 @@ static NTSTATUS dcesrv_samr_DeleteUser(struct dcesrv_call_state *dce_call, TALLO ret = ldb_delete(a_state-sam_ctx, a_state-account_dn); if (ret != 0) { + DEBUG(1, (Failed to delete user: %s: %s\n, + ldb_dn_get_linearized(a_state-account_dn), + ldb_errstring(a_state-sam_ctx))); return NT_STATUS_UNSUCCESSFUL; } -- Samba Shared Repository