svn commit: samba r21217 - in branches: SAMBA_3_0/source/libaddns SAMBA_3_0_25/source/libaddns
Author: vlendec Date: 2007-02-07 11:26:36 + (Wed, 07 Feb 2007) New Revision: 21217 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21217 Log: Just found a system that does not define in_addr_t but only struct in_addr. Okay, it's a SuSE 7.0, but if the fix is so simple I think we should not drop that :-) Volker Modified: branches/SAMBA_3_0/source/libaddns/dns.h branches/SAMBA_3_0/source/libaddns/dnsrecord.c branches/SAMBA_3_0_25/source/libaddns/dns.h branches/SAMBA_3_0_25/source/libaddns/dnsrecord.c Changeset: Modified: branches/SAMBA_3_0/source/libaddns/dns.h === --- branches/SAMBA_3_0/source/libaddns/dns.h2007-02-07 07:11:20 UTC (rev 21216) +++ branches/SAMBA_3_0/source/libaddns/dns.h2007-02-07 11:26:36 UTC (rev 21217) @@ -405,13 +405,16 @@ struct dns_rrec **prec); DNS_ERROR dns_create_name_in_use_record(TALLOC_CTX *mem_ctx, const char *name, - const in_addr_t *ip, + const struct in_addr *ip, struct dns_rrec **prec); DNS_ERROR dns_create_delete_record(TALLOC_CTX *mem_ctx, const char *name, uint16 type, uint16 r_class, struct dns_rrec **prec); +DNS_ERROR dns_create_name_not_in_use_record(TALLOC_CTX *mem_ctx, + const char *name, uint32 type, + struct dns_rrec **prec); DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, in_addr_t ip, + uint32 ttl, struct in_addr ip, struct dns_rrec **prec); DNS_ERROR dns_unmarshall_tkey_record(TALLOC_CTX *mem_ctx, struct dns_rrec *rec, struct dns_tkey_record **ptkey); Modified: branches/SAMBA_3_0/source/libaddns/dnsrecord.c === --- branches/SAMBA_3_0/source/libaddns/dnsrecord.c 2007-02-07 07:11:20 UTC (rev 21216) +++ branches/SAMBA_3_0/source/libaddns/dnsrecord.c 2007-02-07 11:26:36 UTC (rev 21217) @@ -121,19 +121,19 @@ } DNS_ERROR dns_create_a_record(TALLOC_CTX *mem_ctx, const char *host, - uint32 ttl, in_addr_t ip, + uint32 ttl, struct in_addr ip, struct dns_rrec **prec) { uint8 *data; DNS_ERROR err; - if (!(data = (uint8 *)TALLOC_MEMDUP(mem_ctx, (const void *)&ip, - sizeof(ip { + if (!(data = (uint8 *)TALLOC_MEMDUP(mem_ctx, (const void *)&ip.s_addr, + sizeof(ip.s_addr { return ERROR_DNS_NO_MEMORY; } err = dns_create_rrec(mem_ctx, host, QTYPE_A, DNS_CLASS_IN, ttl, - sizeof(ip), data, prec); + sizeof(ip.s_addr), data, prec); if (!ERR_DNS_IS_OK(err)) { TALLOC_FREE(data); @@ -144,7 +144,7 @@ DNS_ERROR dns_create_name_in_use_record(TALLOC_CTX *mem_ctx, const char *name, - const in_addr_t *ip, + const struct in_addr *ip, struct dns_rrec **prec) { if (ip != NULL) { @@ -338,7 +338,7 @@ for (i=0; inum_preqs, &req->preqs); @@ -395,7 +395,7 @@ */ for ( i=0; inum_preqs, &req->preqs); @@ -395,7 +395,7 @@ */ for ( i=0; i
svn commit: samba r21218 - in branches: SAMBA_3_0/source/tdb/common SAMBA_3_0_25/source/tdb/common
Author: vlendec Date: 2007-02-07 12:16:23 + (Wed, 07 Feb 2007) New Revision: 21218 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21218 Log: Fix typo Modified: branches/SAMBA_3_0/source/tdb/common/transaction.c branches/SAMBA_3_0_25/source/tdb/common/transaction.c Changeset: Modified: branches/SAMBA_3_0/source/tdb/common/transaction.c === --- branches/SAMBA_3_0/source/tdb/common/transaction.c 2007-02-07 11:26:36 UTC (rev 21217) +++ branches/SAMBA_3_0/source/tdb/common/transaction.c 2007-02-07 12:16:23 UTC (rev 21218) @@ -39,7 +39,7 @@ by the header. This removes the need for extra journal files as used by some other databases - - dymacially allocated the transaction recover record, re-using it + - dynamically allocated the transaction recover record, re-using it for subsequent transactions. If a larger record is needed then tdb_free() the old record to place it on the normal tdb freelist before allocating the new record Modified: branches/SAMBA_3_0_25/source/tdb/common/transaction.c === --- branches/SAMBA_3_0_25/source/tdb/common/transaction.c 2007-02-07 11:26:36 UTC (rev 21217) +++ branches/SAMBA_3_0_25/source/tdb/common/transaction.c 2007-02-07 12:16:23 UTC (rev 21218) @@ -39,7 +39,7 @@ by the header. This removes the need for extra journal files as used by some other databases - - dymacially allocated the transaction recover record, re-using it + - dynamically allocated the transaction recover record, re-using it for subsequent transactions. If a larger record is needed then tdb_free() the old record to place it on the normal tdb freelist before allocating the new record
svn commit: samba r21219 - in branches: SAMBA_3_0/source/registry SAMBA_3_0_25/source/registry
Author: vlendec Date: 2007-02-07 13:26:13 + (Wed, 07 Feb 2007) New Revision: 21219 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21219 Log: Speed up the initial startup time of smbd on systems with loaded disk subsystems. See the comment in the diff. Volker Modified: branches/SAMBA_3_0/source/registry/reg_db.c branches/SAMBA_3_0_25/source/registry/reg_db.c Changeset: Modified: branches/SAMBA_3_0/source/registry/reg_db.c === --- branches/SAMBA_3_0/source/registry/reg_db.c 2007-02-07 12:16:23 UTC (rev 21218) +++ branches/SAMBA_3_0/source/registry/reg_db.c 2007-02-07 13:26:13 UTC (rev 21219) @@ -98,6 +98,20 @@ int i; const char *p, *p2; UNISTR2 data; + + /* +* There are potentially quite a few store operations which are all +* indiviually wrapped in tdb transactions. Wrapping them in a single +* transaction gives just a single transaction_commit() to actually do +* its fsync()s. See tdb/common/transaction.c for info about nested +* transaction behaviour. +*/ + + if ( tdb_transaction_start( tdb_reg ) == -1 ) { + DEBUG(0, ("init_registry_data: tdb_transaction_start " + "failed\n")); + return False; + } /* loop over all of the predefined paths and add each component */ @@ -137,14 +151,14 @@ if ( !(subkeys = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR )) ) { DEBUG(0,("talloc() failure!\n")); - return False; + goto fail; } regdb_fetch_keys( base, subkeys ); if ( *subkeyname ) regsubkey_ctr_addkey( subkeys, subkeyname ); if ( !regdb_store_keys( base, subkeys )) - return False; + goto fail; TALLOC_FREE( subkeys ); } @@ -155,7 +169,7 @@ for ( i=0; builtin_registry_values[i].path != NULL; i++ ) { if ( !(values = TALLOC_ZERO_P( NULL, REGVAL_CTR )) ) { DEBUG(0,("talloc() failure!\n")); - return False; + goto fail; } regdb_fetch_values( builtin_registry_values[i].path, values ); @@ -192,7 +206,22 @@ TALLOC_FREE( values ); } + if (tdb_transaction_commit( tdb_reg ) == -1) { + DEBUG(0, ("init_registry_data: Could not commit " + "transaction\n")); + return False; + } + return True; + + fail: + + if (tdb_transaction_cancel( tdb_reg ) == -1) { + smb_panic("init_registry_data: tdb_transaction_cancel " + "failed\n"); + } + + return False; } /*** Modified: branches/SAMBA_3_0_25/source/registry/reg_db.c === --- branches/SAMBA_3_0_25/source/registry/reg_db.c 2007-02-07 12:16:23 UTC (rev 21218) +++ branches/SAMBA_3_0_25/source/registry/reg_db.c 2007-02-07 13:26:13 UTC (rev 21219) @@ -96,6 +96,20 @@ int i; const char *p, *p2; UNISTR2 data; + + /* +* There are potentially quite a few store operations which are all +* indiviually wrapped in tdb transactions. Wrapping them in a single +* transaction gives just a single transaction_commit() to actually do +* its fsync()s. See tdb/common/transaction.c for info about nested +* transaction behaviour. +*/ + + if ( tdb_transaction_start( tdb_reg ) == -1 ) { + DEBUG(0, ("init_registry_data: tdb_transaction_start " + "failed\n")); + return False; + } /* loop over all of the predefined paths and add each component */ @@ -135,14 +149,14 @@ if ( !(subkeys = TALLOC_ZERO_P( NULL, REGSUBKEY_CTR )) ) { DEBUG(0,("talloc() failure!\n")); - return False; + goto fail; } regdb_fetch_keys( base, subkeys ); if ( *subkeyname ) regsubkey_ctr_addkey( subkeys, subkeyname ); if ( !regdb_store_keys( base, subkeys )) - return False; + goto fail; TALLOC_FREE( subkeys ); } @@ -
svn commit: samba r21220 - in branches/SAMBA_4_0/webapps/swat: .
Author: derrell Date: 2007-02-07 18:31:28 + (Wed, 07 Feb 2007) New Revision: 21220 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21220 Log: enable 'make source' (and 'make') to work properly Modified: branches/SAMBA_4_0/webapps/swat/Makefile Changeset: Modified: branches/SAMBA_4_0/webapps/swat/Makefile === --- branches/SAMBA_4_0/webapps/swat/Makefile2007-02-07 13:26:13 UTC (rev 21219) +++ branches/SAMBA_4_0/webapps/swat/Makefile2007-02-07 18:31:28 UTC (rev 21220) @@ -76,7 +76,8 @@ APPLICATION_OPTIMIZE_STRINGS = false APPLICATION_OPTIMIZE_VARIABLES = false APPLICATION_ADDITIONAL_CLASS_PATH = \ - --class-path $(APIVIEWER_PATH)/source/class + --class-path $(APIVIEWER_PATH)/source/class \ + --class-uri $(APIVIEWER_PATH)/source/class APPLICATION_ADDITIONAL_RESOURCE = \ --resource-input $(APIVIEWER_PATH)/source/resource \ --resource-output $(APPLICATION_BUILD_PATH)/resource/apiviewer \
svn commit: samba r21221 - in branches/SAMBA_4_0/webapps/swat: .
Author: derrell Date: 2007-02-07 18:52:11 + (Wed, 07 Feb 2007) New Revision: 21221 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21221 Log: 'make build' should be the default target for us Modified: branches/SAMBA_4_0/webapps/swat/Makefile Changeset: Modified: branches/SAMBA_4_0/webapps/swat/Makefile === --- branches/SAMBA_4_0/webapps/swat/Makefile2007-02-07 18:31:28 UTC (rev 21220) +++ branches/SAMBA_4_0/webapps/swat/Makefile2007-02-07 18:52:11 UTC (rev 21221) @@ -85,14 +85,19 @@ APPLICATION_RESOURCE_FILTER = true APPLICATION_COMPLETE_SOURCE = false +# Typically, we just need a "build" +.PHONY: default +default: build + + # INCLUDE CORE ifneq ($(QOOXDOO_PATH),PLEASE_DEFINE_QOOXDOO_PATH) - include $(QOOXDOO_PATH)/frontend/framework/tool/make/targets.mk - include $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk +include $(QOOXDOO_PATH)/frontend/framework/tool/make/targets.mk +include $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk endif error:
svn commit: samba r21222 - in branches/SAMBA_4_0: . source/pidl source/pidl/lib/Parse/Pidl source/pidl/lib/Parse/Pidl/Samba4/NDR source/pidl/tests source/torture
Author: jelmer Date: 2007-02-07 19:03:19 + (Wed, 07 Feb 2007) New Revision: 21222 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21222 Log: Merge a couple of pidl fixes: * Pidl will now warn when trying to use pointers as integers in expressions. * "subcontext()" is now marked as deprecated. The alternatives, transmit_as() / represent_as() should be available soon. * More tests. * Remove some unused code in smbtorture. Added: branches/SAMBA_4_0/source/pidl/tests/ndr_deprecations.pl Removed: branches/SAMBA_4_0/source/pidl/ref_notes.txt Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/pidl/TODO branches/SAMBA_4_0/source/pidl/expr.yp branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Expr.pm branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/NDR.pm branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Util.pm branches/SAMBA_4_0/source/pidl/pidl branches/SAMBA_4_0/source/pidl/tests/ndr_represent.pl branches/SAMBA_4_0/source/pidl/tests/util.pl branches/SAMBA_4_0/source/torture/smbtorture.c branches/SAMBA_4_0/source/torture/torture.c Changeset: Sorry, the patch is too large (2685 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21222
svn commit: samba r21223 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-07 19:43:44 + (Wed, 07 Feb 2007) New Revision: 21223 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21223 Log: Try and fix bug #4361 - Vista backup fails. Based on work from Joe Meadows <[EMAIL PROTECTED]>. One for the Vista patchset. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c branches/SAMBA_3_0_25/source/smbd/posix_acls.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c === --- branches/SAMBA_3_0/source/smbd/posix_acls.c 2007-02-07 19:03:19 UTC (rev 21222) +++ branches/SAMBA_3_0/source/smbd/posix_acls.c 2007-02-07 19:43:44 UTC (rev 21223) @@ -658,6 +658,7 @@ } return 0; } + / Function to create owner and group SIDs from a SMB_STRUCT_STAT. / @@ -669,6 +670,27 @@ } / + Is the identity in two ACEs equal ? Check both SID and uid/gid. +/ + +static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2) +{ + if (sid_equal(&ace1->trustee, &ace2->trustee)) { + return True; + } + if (ace1->owner_type == ace2->owner_type) { + if (ace1->owner_type == UID_ACE && + ace1->unix_ug.uid == ace2->unix_ug.uid) { + return True; + } else if (ace1->owner_type == GID_ACE && + ace1->unix_ug.gid == ace2->unix_ug.gid) { + return True; + } + } + return False; +} + +/ Merge aces with a common sid - if both are allow or deny, OR the permissions together and delete the second one. If the first is deny, mask the permissions off and delete the allow if the permissions become zero, delete the deny if the permissions are non zero. @@ -695,7 +717,7 @@ curr_ace_next = curr_ace->next; /* Save the link in case of delete. */ - if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) && + if (identity_in_ace_equal(curr_ace, curr_ace_outer) && (curr_ace->attr == curr_ace_outer->attr)) { if( DEBUGLVL( 10 )) { @@ -735,7 +757,7 @@ * we've put on the ACL, we know the deny must be the first one. */ - if (sid_equal(&curr_ace->trustee, &curr_ace_outer->trustee) && + if (identity_in_ace_equal(curr_ace, curr_ace_outer) && (curr_ace_outer->attr == DENY_ACE) && (curr_ace->attr == ALLOW_ACE)) { if( DEBUGLVL( 10 )) { Modified: branches/SAMBA_3_0_25/source/smbd/posix_acls.c === --- branches/SAMBA_3_0_25/source/smbd/posix_acls.c 2007-02-07 19:03:19 UTC (rev 21222) +++ branches/SAMBA_3_0_25/source/smbd/posix_acls.c 2007-02-07 19:43:44 UTC (rev 21223) @@ -658,6 +658,7 @@ } return 0; } + / Function to create owner and group SIDs from a SMB_STRUCT_STAT. / @@ -669,6 +670,27 @@ } / + Is the identity in two ACEs equal ? Check both SID and uid/gid. +/ + +static BOOL identity_in_ace_equal(canon_ace *ace1, canon_ace *ace2) +{ + if (sid_equal(&ace1->trustee, &ace2->trustee)) { + return True; + } + if (ace1->owner_type == ace2->owner_type) { + if (ace1->owner_type == UID_ACE && + ace1->unix_ug.uid == ace2->unix_ug.uid) { + return True; + } else if (ace1->owner_type == GID_ACE && + ace1->unix_ug.gid == ace2->unix_ug.gid) { + return True; + } + } + return False; +} + +/ Merge aces with a common sid - if both are allow or deny, OR the permissions together and delete the second one. If the first is deny, mask the permissions off and delete the allow if the permissions become zero, delete the deny if the permissions are non zero. @@ -695,7 +717,7 @@ curr_ace_next = curr_ace->next; /* Save the link in case of delet
svn commit: samba r21224 - in branches/SAMBA_3_0/source/client: .
Author: sfrench Date: 2007-02-07 20:16:02 + (Wed, 07 Feb 2007) New Revision: 21224 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21224 Log: Initial checkin of cifs_host_name resolver helper script (needed by /sbin keyctl utils to finish the upcall) Added: branches/SAMBA_3_0/source/client/cifs_resolver.sh Changeset: Added: branches/SAMBA_3_0/source/client/cifs_resolver.sh === --- branches/SAMBA_3_0/source/client/cifs_resolver.sh 2007-02-07 19:43:44 UTC (rev 21223) +++ branches/SAMBA_3_0/source/client/cifs_resolver.sh 2007-02-07 20:16:02 UTC (rev 21224) @@ -0,0 +1,51 @@ +#!/bin/sh +### +# +# Written by Igor Mammedov ([EMAIL PROTECTED]) +# Modified by Steve French <[EMAIL PROTECTED]> +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version +# 2 of the License, or (at your option) any later version. +# +### +# +# linux-cifs-client dns name resolver helper +# called by cifs kernel module upcall to key API to resolve server name +# to IP when module connects to DFS link. We may eventually make this +# C code, but this is a good starting point. +# You should have appropriate kernel and keyutils installed. +# CIFS DFS Support will require Linux kernel module +# cifs.ko version 1.48 or later. +# +# Consult the CIFS client users guide for more details +# http://www.samba.org/samba/ftp/cifs-cvs/linux-cifs-client-guide.pdf +# +# Put the following string in /etc/request-key.conf without comment sign :) +#create cifs_resolver * * /sbin/cifs_resolver.sh %k %d %S +# +# Put this script into /sbin directory +# Call: /sbin/cifs_resolver.sh +# +# - is server name to resolve +# + +status=0 +{ +echo "cifs_resolver: resolving: $2" + +DATAA=`/usr/bin/host $2` +status=$? + +if [ "x$status" != "x0" ]; then + echo "cifs_resolver: failed to resolve: $2" + exit $status +else + DATAA=`echo "$DATAA" | sed 's/.*has address //'` + echo "cifs_resolver: resolved: $2 to $DATAA" + keyctl instantiate $1 "$DATAA" $3 || exit 1 +fi + +} >&/dev/ttyS0 +exit $status
svn commit: samba r21225 - in branches: SAMBA_3_0/source/registry SAMBA_3_0/source/smbd SAMBA_3_0_25/source/registry SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-07 20:20:56 + (Wed, 07 Feb 2007) New Revision: 21225 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21225 Log: Couple of fixes from Martin Zielinski [EMAIL PROTECTED], one typo, one to make sure that time initialization is done before modules that depend on it (printer initialization). Jeremy. Modified: branches/SAMBA_3_0/source/registry/reg_printing.c branches/SAMBA_3_0/source/smbd/server.c branches/SAMBA_3_0_25/source/registry/reg_printing.c branches/SAMBA_3_0_25/source/smbd/server.c Changeset: Modified: branches/SAMBA_3_0/source/registry/reg_printing.c === --- branches/SAMBA_3_0/source/registry/reg_printing.c 2007-02-07 20:16:02 UTC (rev 21224) +++ branches/SAMBA_3_0/source/registry/reg_printing.c 2007-02-07 20:20:56 UTC (rev 21225) @@ -555,7 +555,7 @@ { "UntilTime", REG_IDX_UNTILTIME }, { "Name", REG_IDX_NAME }, { "Location", REG_IDX_LOCATION }, - { "Descrioption", REG_IDX_DESCRIPTION }, + { "Description",REG_IDX_DESCRIPTION }, { "Parameters", REG_IDX_PARAMETERS }, { "Port", REG_IDX_PORT }, { "Share Name", REG_IDX_SHARENAME }, Modified: branches/SAMBA_3_0/source/smbd/server.c === --- branches/SAMBA_3_0/source/smbd/server.c 2007-02-07 20:16:02 UTC (rev 21224) +++ branches/SAMBA_3_0/source/smbd/server.c 2007-02-07 20:20:56 UTC (rev 21225) @@ -852,6 +852,8 @@ load_case_tables(); + TimeInit(); + #ifdef HAVE_SET_AUTH_PARAMETERS set_auth_parameters(argc,argv); #endif @@ -1102,9 +1104,6 @@ /* Setup aio signal handler. */ initialize_async_io_handler(); - /* re-initialise the timezone */ - TimeInit(); - /* register our message handlers */ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis, NULL); Modified: branches/SAMBA_3_0_25/source/registry/reg_printing.c === --- branches/SAMBA_3_0_25/source/registry/reg_printing.c2007-02-07 20:16:02 UTC (rev 21224) +++ branches/SAMBA_3_0_25/source/registry/reg_printing.c2007-02-07 20:20:56 UTC (rev 21225) @@ -555,7 +555,7 @@ { "UntilTime", REG_IDX_UNTILTIME }, { "Name", REG_IDX_NAME }, { "Location", REG_IDX_LOCATION }, - { "Descrioption", REG_IDX_DESCRIPTION }, + { "Description",REG_IDX_DESCRIPTION }, { "Parameters", REG_IDX_PARAMETERS }, { "Port", REG_IDX_PORT }, { "Share Name", REG_IDX_SHARENAME }, Modified: branches/SAMBA_3_0_25/source/smbd/server.c === --- branches/SAMBA_3_0_25/source/smbd/server.c 2007-02-07 20:16:02 UTC (rev 21224) +++ branches/SAMBA_3_0_25/source/smbd/server.c 2007-02-07 20:20:56 UTC (rev 21225) @@ -829,6 +829,8 @@ load_case_tables(); + TimeInit(); + #ifdef HAVE_SET_AUTH_PARAMETERS set_auth_parameters(argc,argv); #endif @@ -1083,9 +1085,6 @@ /* Setup aio signal handler. */ initialize_async_io_handler(); - /* re-initialise the timezone */ - TimeInit(); - /* register our message handlers */ message_register(MSG_SMB_FORCE_TDIS, msg_force_tdis);
svn commit: samba-docs r1019 - in trunk: . linux-client
Author: sfrench Date: 2007-02-07 20:57:05 + (Wed, 07 Feb 2007) New Revision: 1019 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1019 Log: Add documentation for linux cifs client Added: trunk/linux-client/ trunk/linux-client/linux-cifs-client-guide.odt Changeset: Added: trunk/linux-client/linux-cifs-client-guide.odt === (Binary files differ) Property changes on: trunk/linux-client/linux-cifs-client-guide.odt ___ Name: svn:mime-type + application/octet-stream
svn commit: samba-docs r1020 - in trunk/linux-client: .
Author: sfrench Date: 2007-02-07 21:53:58 + (Wed, 07 Feb 2007) New Revision: 1020 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1020 Log: minor updates to linux client user guide Modified: trunk/linux-client/linux-cifs-client-guide.odt Changeset: Modified: trunk/linux-client/linux-cifs-client-guide.odt === (Binary files differ)
svn commit: samba r21226 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-07 22:20:31 + (Wed, 07 Feb 2007) New Revision: 21226 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21226 Log: Fix bug #4377 (rename of "foo" -> "Foo" fails). This is actually an interesting case as it exposed bad code in our DFS redirect module (that was where the bug was introduced). Caused by our turning on dfsroot be default. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/msdfs.c branches/SAMBA_3_0_25/source/smbd/msdfs.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/msdfs.c === --- branches/SAMBA_3_0/source/smbd/msdfs.c 2007-02-07 20:20:56 UTC (rev 21225) +++ branches/SAMBA_3_0/source/smbd/msdfs.c 2007-02-07 22:20:31 UTC (rev 21226) @@ -261,7 +261,7 @@ talloc CTX can be NULL here if reflistp and refcnt pointers are null. **/ -BOOL is_msdfs_link(TALLOC_CTX *ctx, connection_struct *conn, char *path, +BOOL is_msdfs_link(TALLOC_CTX *ctx, connection_struct *conn, const char *path, struct referral **reflistp, int *refcnt, SMB_STRUCT_STAT *sbufp) { @@ -317,11 +317,15 @@ are also NULL. */ -static BOOL resolve_dfs_path(TALLOC_CTX *ctx, const char *dfspath, -struct dfs_path *dp, - connection_struct *conn, BOOL search_flag, - struct referral **reflistpp, int *refcntp, - BOOL *self_referralp, int *consumedcntp) +static BOOL resolve_dfs_path(TALLOC_CTX *ctx, + const char *dfspath, + struct dfs_path *dp, + connection_struct *conn, + BOOL search_flag, + struct referral **reflistpp, + int *refcntp, + BOOL *self_referralp, + int *consumedcntp) { pstring localpath; int consumed_level = 1; @@ -349,12 +353,25 @@ DEBUG(10,("resolve_dfs_path: Conn path = %s req_path = %s\n", conn->connectpath, dp->reqpath)); - status = unix_convert(conn, dp->reqpath, False, NULL, &sbuf); - /* Should we terminate on status != NT_STATUS_OK */ + /* +* Note the unix path conversion here we're doing we can +* throw away. We're looking for a symlink for a dfs +* resolution, if we don't find it we'll do another +* unix_convert later in the codepath. +* If we needed to remember what we'd resolved in +* dp->reqpath (as the original code did) we'd +* pstrcpy(localhost, dp->reqpath) on any code +* path below that returns True - but I don't +* think this is needed. JRA. +*/ - /* JRA... should we strlower the last component here ? */ pstrcpy(localpath, dp->reqpath); + status = unix_convert(conn, localpath, False, NULL, &sbuf); + if (!NT_STATUS_IS_OK(status)) { + return False; + } + /* check if need to redirect */ if (is_msdfs_link(ctx, conn, localpath, reflistpp, refcntp, NULL)) { if ( search_flag ) { @@ -371,7 +388,7 @@ } /* redirect if any component in the path is a link */ - pstrcpy(reqpath, dp->reqpath); + pstrcpy(reqpath, localpath); p = strrchr_m(reqpath, '/'); while (p) { *p = '\0'; @@ -448,9 +465,10 @@ return True; } else { DEBUG(3,("dfs_redirect: Not redirecting %s.\n", pathname)); - + /* Form non-dfs tcon-relative path */ pstrcpy(pathname, dp.reqpath); + DEBUG(3,("dfs_redirect: Path converted to non-dfs path %s\n", pathname)); return False; } Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c === --- branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-02-07 20:20:56 UTC (rev 21225) +++ branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-02-07 22:20:31 UTC (rev 21226) @@ -261,7 +261,7 @@ talloc CTX can be NULL here if reflistp and refcnt pointers are null. **/ -BOOL is_msdfs_link(TALLOC_CTX *ctx, connection_struct *conn, char *path, +BOOL is_msdfs_link(TALLOC_CTX *ctx, connection_struct *conn, const char *path, struct referral **reflistp, int *refcnt, SMB_STRUCT_STAT *sbufp) { @@ -317,11 +317,15 @@ are also NULL. */ -static BOOL resolve_dfs_path(TALLOC_CTX *ctx, const char *dfspath, -struct dfs_path *dp, -
Build status as of Thu Feb 8 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-02-07 00:01:13.0 + +++ /home/build/master/cache/broken_results.txt 2007-02-08 00:00:45.0 + @@ -1,22 +1,22 @@ -Build status as of Wed Feb 7 00:00:02 2007 +Build status as of Thu Feb 8 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 35 7 0 +ccache 31 6 0 ctdb 0 0 0 distcc 2 0 0 -ldb 34 3 0 -libreplace 32 2 0 -lorikeet-heimdal 30 20 0 -ppp 18 0 0 -rsync35 4 0 +ldb 31 3 0 +libreplace 29 2 0 +lorikeet-heimdal 28 17 0 +ppp 16 0 0 +rsync32 5 0 samba0 0 0 samba-docs 0 0 0 -samba4 38 25 1 -samba_3_040 20 0 -smb-build33 2 0 -talloc 34 0 0 -tdb 34 2 0 +samba4 36 24 0 +samba_3_038 12 0 +smb-build30 2 0 +talloc 32 0 0 +tdb 31 2 0
svn commit: samba r21227 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-08 00:14:37 + (Thu, 08 Feb 2007) New Revision: 21227 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21227 Log: Quick fix for Stevef - ensure the returned data on open is 8 byte aligned. Jeremy. Modified: branches/SAMBA_3_0/source/include/trans2.h branches/SAMBA_3_0/source/smbd/trans2.c branches/SAMBA_3_0_25/source/include/trans2.h branches/SAMBA_3_0_25/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/include/trans2.h === --- branches/SAMBA_3_0/source/include/trans2.h 2007-02-07 22:20:31 UTC (rev 21226) +++ branches/SAMBA_3_0/source/include/trans2.h 2007-02-08 00:14:37 UTC (rev 21227) @@ -394,6 +394,8 @@ 100 - end. */ +#define SMB_FILE_UNIX_BASIC_SIZE 100 + /* UNIX filetype mappings. */ #define UNIX_TYPE_FILE 0 Modified: branches/SAMBA_3_0/source/smbd/trans2.c === --- branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-07 22:20:31 UTC (rev 21226) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-08 00:14:37 UTC (rev 21227) @@ -4914,9 +4914,9 @@ info_level_return = SVAL(pdata,12); if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { - *pdata_return_size = 6; + *pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE; } else { - *pdata_return_size = 6; + *pdata_return_size = 8; } /* Realloc the data size */ @@ -4931,9 +4931,11 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); - store_file_unix_basic(pdata + 6, fsp, psbuf); + SSVAL(pdata,6,0); /* Padding. */ + store_file_unix_basic(pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); + SSVAL(pdata,6,0); /* Padding. */ } return status; @@ -5067,9 +5069,9 @@ info_level_return = SVAL(pdata,12); if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { - *pdata_return_size = 6; + *pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE; } else { - *pdata_return_size = 6; + *pdata_return_size = 8; } /* Realloc the data size */ @@ -5095,9 +5097,11 @@ SSVAL(pdata,2,fsp->fnum); if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); - store_file_unix_basic(pdata + 6, fsp, psbuf); + SSVAL(pdata,6,0); /* padding. */ + store_file_unix_basic(pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); + SSVAL(pdata,6,0); /* padding. */ } return NT_STATUS_OK; } Modified: branches/SAMBA_3_0_25/source/include/trans2.h === --- branches/SAMBA_3_0_25/source/include/trans2.h 2007-02-07 22:20:31 UTC (rev 21226) +++ branches/SAMBA_3_0_25/source/include/trans2.h 2007-02-08 00:14:37 UTC (rev 21227) @@ -394,6 +394,8 @@ 100 - end. */ +#define SMB_FILE_UNIX_BASIC_SIZE 100 + /* UNIX filetype mappings. */ #define UNIX_TYPE_FILE 0 Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c === --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-07 22:20:31 UTC (rev 21226) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 00:14:37 UTC (rev 21227) @@ -4908,9 +4908,9 @@ info_level_return = SVAL(pdata,12); if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { - *pdata_return_size = 6; + *pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE; } else { - *pdata_return_size = 6; + *pdata_return_size = 8; } /* Realloc the data size */ @@ -4925,9 +4925,11 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); - store_file_unix_basic(pdata + 6, fsp, psbuf); + SSVAL(pdata,6,0); /* Padding. */ + store_file_unix_basic(pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); + SSVAL(pdata,6,0); /* Padding. */ } return status; @@ -5061,9 +5063,9 @@ info_level_return = SVAL(pdata,12); if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { - *pdata_return_size = 6; + *pdata_return_size = 8 + SMB_FILE_UNIX_BASIC_SIZE; } else { - *pdata_return_size = 6; + *pdata_return_size = 8; } /* Realloc the data size */ @@ -5089,9 +5091,11 @@ SSVAL(pdata,2,fsp->fnum); if (info
svn commit: samba r21228 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch
Author: jra Date: 2007-02-08 00:28:25 + (Thu, 08 Feb 2007) New Revision: 21228 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21228 Log: Fix for fd leak on error path. Thanks to [EMAIL PROTECTED] for this fix ! Jeremy. Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c branches/SAMBA_3_0_25/source/nsswitch/winbindd.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd.c 2007-02-08 00:14:37 UTC (rev 21227) +++ branches/SAMBA_3_0/source/nsswitch/winbindd.c 2007-02-08 00:28:25 UTC (rev 21228) @@ -622,8 +622,10 @@ /* Create new connection structure */ - if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) + if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) { + close(sock); return; + } state->sock = sock; Modified: branches/SAMBA_3_0_25/source/nsswitch/winbindd.c === --- branches/SAMBA_3_0_25/source/nsswitch/winbindd.c2007-02-08 00:14:37 UTC (rev 21227) +++ branches/SAMBA_3_0_25/source/nsswitch/winbindd.c2007-02-08 00:28:25 UTC (rev 21228) @@ -610,8 +610,10 @@ /* Create new connection structure */ - if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) + if ((state = TALLOC_ZERO_P(NULL, struct winbindd_cli_state)) == NULL) { + close(sock); return; + } state->sock = sock;
svn commit: samba r21229 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-08 00:41:57 + (Thu, 08 Feb 2007) New Revision: 21229 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21229 Log: Don't indirect through a potentially null pointer :-). Jeremy. Modified: branches/SAMBA_3_0/source/smbd/trans2.c branches/SAMBA_3_0_25/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/trans2.c === --- branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-08 00:28:25 UTC (rev 21228) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-08 00:41:57 UTC (rev 21229) @@ -2868,7 +2868,8 @@ Store the FILE_UNIX_BASIC info. / -static char *store_file_unix_basic(char *pdata, +static char *store_file_unix_basic(connection_struct *conn, + char *pdata, files_struct *fsp, SMB_STRUCT_STAT *psbuf) { @@ -2878,7 +2879,7 @@ SOFF_T(pdata,0,get_file_size(*psbuf)); /* File size 64 Bit */ pdata += 8; - SOFF_T(pdata,0,get_allocation_size(fsp->conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(pdata,0,get_allocation_size(conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */ pdata += 8; put_long_date_timespec(pdata,get_ctimespec(psbuf)); /* Creation Time 64 Bit */ @@ -3524,7 +3525,7 @@ case SMB_QUERY_FILE_UNIX_BASIC: - pdata = store_file_unix_basic(pdata, fsp, &sbuf); + pdata = store_file_unix_basic(conn, pdata, fsp, &sbuf); data_size = PTR_DIFF(pdata,(*ppdata)); { @@ -4932,7 +4933,7 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); SSVAL(pdata,6,0); /* Padding. */ - store_file_unix_basic(pdata + 8, fsp, psbuf); + store_file_unix_basic(conn, pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); SSVAL(pdata,6,0); /* Padding. */ @@ -5098,7 +5099,7 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); SSVAL(pdata,6,0); /* padding. */ - store_file_unix_basic(pdata + 8, fsp, psbuf); + store_file_unix_basic(conn, pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); SSVAL(pdata,6,0); /* padding. */ Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c === --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 00:28:25 UTC (rev 21228) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 00:41:57 UTC (rev 21229) @@ -2868,7 +2868,8 @@ Store the FILE_UNIX_BASIC info. / -static char *store_file_unix_basic(char *pdata, +static char *store_file_unix_basic(connection_struct *conn, + char *pdata, files_struct *fsp, SMB_STRUCT_STAT *psbuf) { @@ -2878,7 +2879,7 @@ SOFF_T(pdata,0,get_file_size(*psbuf)); /* File size 64 Bit */ pdata += 8; - SOFF_T(pdata,0,get_allocation_size(fsp->conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */ + SOFF_T(pdata,0,get_allocation_size(conn,fsp,psbuf)); /* Number of bytes used on disk - 64 Bit */ pdata += 8; put_long_date_timespec(pdata,get_ctimespec(psbuf)); /* Creation Time 64 Bit */ @@ -3524,7 +3525,7 @@ case SMB_QUERY_FILE_UNIX_BASIC: - pdata = store_file_unix_basic(pdata, fsp, &sbuf); + pdata = store_file_unix_basic(conn, pdata, fsp, &sbuf); data_size = PTR_DIFF(pdata,(*ppdata)); { @@ -4926,7 +4927,7 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); SSVAL(pdata,6,0); /* Padding. */ - store_file_unix_basic(pdata + 8, fsp, psbuf); + store_file_unix_basic(conn, pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SMB_NO_INFO_LEVEL_RETURNED); SSVAL(pdata,6,0); /* Padding. */ @@ -5092,7 +5093,7 @@ if (info_level_return == SMB_QUERY_FILE_UNIX_BASIC) { SSVAL(pdata,4,SMB_QUERY_FILE_UNIX_BASIC); SSVAL(pdata,6,0); /* padding. */ - store_file_unix_basic(pdata + 8, fsp, psbuf); + store_file_unix_basic(conn, pdata + 8, fsp, psbuf); } else { SSVAL(pdata,4,SM
svn commit: samba r21230 - in branches/SAMBA_4_0/source: cluster cluster/ctdb lib/messaging
Author: tridge Date: 2007-02-08 00:58:17 + (Thu, 08 Feb 2007) New Revision: 21230 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21230 Log: added the hooks needed in the cluster layer and the messaging code for handling messages to remote nodes. Implemented dummy functions in the 'local' cluster backend for the messaging hooks, and modified the messaging layer to check if the destination is remote and redirect messages via the cluster layer Modified: branches/SAMBA_4_0/source/cluster/cluster.c branches/SAMBA_4_0/source/cluster/cluster.h branches/SAMBA_4_0/source/cluster/cluster_private.h branches/SAMBA_4_0/source/cluster/ctdb/brlock_ctdb.c branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c branches/SAMBA_4_0/source/cluster/local.c branches/SAMBA_4_0/source/lib/messaging/messaging.c Changeset: Modified: branches/SAMBA_4_0/source/cluster/cluster.c === --- branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-08 00:41:57 UTC (rev 21229) +++ branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-08 00:58:17 UTC (rev 21230) @@ -33,11 +33,11 @@ } /* - not a nice abstraction :( + an ugly way of getting at the backend handle (eg. ctdb context) via the cluster API */ -void *cluster_private(void) +void *cluster_backend_handle(void) { - return ops->private; + return ops->backend_handle(ops); } /* by default use the local ops */ @@ -46,8 +46,6 @@ if (ops == NULL) cluster_local_init(); } - - /* server a server_id for the local node */ @@ -76,3 +74,24 @@ cluster_init(); return ops->cluster_tdb_tmp_open(ops, mem_ctx, dbname, flags); } + + +/* + register a callback function for a messaging endpoint +*/ +NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server, + void (*handler)(struct messaging_context *, + struct server_id, uint32_t, DATA_BLOB)) +{ + cluster_init(); + return ops->message_init(ops, msg, server, handler); +} + +/* + send a message to another node in the cluster +*/ +NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data) +{ + cluster_init(); + return ops->message_send(ops, server, msg_type, data); +} Modified: branches/SAMBA_4_0/source/cluster/cluster.h === --- branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-08 00:41:57 UTC (rev 21229) +++ branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-08 00:58:17 UTC (rev 21230) @@ -28,10 +28,23 @@ */ #define cluster_id_equal(id1, id2) ((id1)->id == (id2)->id && (id1)->node == (id2)->node) +/* + test for same cluster node +*/ +#define cluster_node_equal(id1, id2) ((id1)->node == (id2)->node) + +struct messaging_context; +typedef void (*cluster_message_fn_t)(struct messaging_context *, +struct server_id, uint32_t, DATA_BLOB); + /* prototypes */ struct server_id cluster_id(uint32_t id); const char *cluster_id_string(TALLOC_CTX *mem_ctx, struct server_id id); struct tdb_wrap *cluster_tdb_tmp_open(TALLOC_CTX *mem_ctx, const char *dbname, int flags); -void *cluster_private(void); +void *cluster_backend_handle(void); +NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server, + cluster_message_fn_t handler); +NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data); + #endif Modified: branches/SAMBA_4_0/source/cluster/cluster_private.h === --- branches/SAMBA_4_0/source/cluster/cluster_private.h 2007-02-08 00:41:57 UTC (rev 21229) +++ branches/SAMBA_4_0/source/cluster/cluster_private.h 2007-02-08 00:58:17 UTC (rev 21230) @@ -29,6 +29,13 @@ TALLOC_CTX *, struct server_id ); struct tdb_wrap *(*cluster_tdb_tmp_open)(struct cluster_ops *, TALLOC_CTX *, const char *, int); + void *(*backend_handle)(struct cluster_ops *); + NTSTATUS (*message_init)(struct cluster_ops *ops, +struct messaging_context *msg, struct server_id server, +cluster_message_fn_t handler); + NTSTATUS (*message_send)(struct cluster_ops *ops, +struct server_id server, uint32_t msg_type, +DATA_BLOB *data); void *private; /* backend state */ }; Modified: branches/SAMBA_4_0/source/cluster/ctdb/brlock_ctdb.c === --- branches/SAMBA_4_0/source/cluster/ctdb/brlock_ctdb.c2007-02-08 00:41:57 UTC (rev 21229) +++ branches/SAMBA_4_0/source/cluster/ctdb/brlock_ctdb.c2
svn commit: samba r21231 - in branches: SAMBA_3_0/source/nsswitch SAMBA_3_0_25/source/nsswitch
Author: herb Date: 2007-02-08 02:17:29 + (Thu, 08 Feb 2007) New Revision: 21231 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21231 Log: get rid of unused defines that cause a redefined warning Modified: branches/SAMBA_3_0/source/nsswitch/wb_common.c branches/SAMBA_3_0_25/source/nsswitch/wb_common.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/wb_common.c === --- branches/SAMBA_3_0/source/nsswitch/wb_common.c 2007-02-08 00:58:17 UTC (rev 21230) +++ branches/SAMBA_3_0/source/nsswitch/wb_common.c 2007-02-08 02:17:29 UTC (rev 21231) @@ -75,8 +75,6 @@ } #define CONNECT_TIMEOUT 30 -#define WRITE_TIMEOUT CONNECT_TIMEOUT -#define READ_TIMEOUT CONNECT_TIMEOUT /* Make sure socket handle isn't stdin, stdout or stderr */ #define RECURSION_LIMIT 3 Modified: branches/SAMBA_3_0_25/source/nsswitch/wb_common.c === --- branches/SAMBA_3_0_25/source/nsswitch/wb_common.c 2007-02-08 00:58:17 UTC (rev 21230) +++ branches/SAMBA_3_0_25/source/nsswitch/wb_common.c 2007-02-08 02:17:29 UTC (rev 21231) @@ -75,8 +75,6 @@ } #define CONNECT_TIMEOUT 30 -#define WRITE_TIMEOUT CONNECT_TIMEOUT -#define READ_TIMEOUT CONNECT_TIMEOUT /* Make sure socket handle isn't stdin, stdout or stderr */ #define RECURSION_LIMIT 3
Re: svn commit: samba r19842 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl: .
On Wed, Nov 22, 2006 at 08:34:38PM +0100, Stefan (metze) Metzmacher wrote: > [EMAIL PROTECTED] schrieb: > > Author: jelmer > > Date: 2006-11-22 16:53:30 + (Wed, 22 Nov 2006) > > New Revision: 19842 > > WebSVN: > > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19842 > > Log: > > Complain about unknown pointer types. > > Fallback to "unique" when "ptr" is specified instead of failing. > Hi Jelmer, > that's wrong and don't work against windows, > that's why I added the "sptr" type, the implements full pointer support > that works in the epmapper pipe against windows. > sptr uses 1,2,3,4,5... as pointer values > unique uses 0x0002,0x00020004, 0x00020008, 0x0002000C ... > to match what w2k3 do > please readd 'sptr' as valid pointertype, as pidl supports it and > should until we have 'ptr' support! Ah, I was already wondering why we had this strange, non-standard pointer type! I'll simply add support for full pointers tomorrow. Cheers, Jelmer signature.asc Description: Digital signature
Re: svn commit: samba r21026 - in branches/SAMBA_4_0/source/script: .
On Fri, 2007-01-26 at 04:37 +, [EMAIL PROTECTED] wrote: > Log: > Add a helpful script to do the things we need to do to make a release > tarball. > Added: branches/SAMBA_4_0/source/script/mkrelease.sh > === > --- branches/SAMBA_4_0/source/script/mkrelease.sh 2007-01-26 02:17:11 UTC > (rev 21025) > +++ branches/SAMBA_4_0/source/script/mkrelease.sh 2007-01-26 04:37:06 UTC > (rev 21026) > @@ -0,0 +1,13 @@ > +#!/bin/sh > + > +FROM=$1 > +VERSION=$2 > + > +svn export $FROM samba-$VERSION > + > +( cd samba-$VERSION || exit 1 > + (cd source && ./autogen.sh ) || exit 1 > + rm -rf webapps/qooxdoo-*-sdk/frontend/framework/.cache || exit 1 > +) || exit 1 > + > +tar -zcf samba-$VERSION.tar.gz samba-$VERSION Similar things are done by 'make dist'. I think the rm -rf should rather be there, same thing for autogen.sh Cheers, Jelmer signature.asc Description: This is a digitally signed message part
svn commit: samba r21232 - in branches/SAMBA_4_0/source/cluster/ctdb: . common include
Author: tridge Date: 2007-02-08 02:57:08 + (Thu, 08 Feb 2007) New Revision: 21232 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21232 Log: added a raw ctdb messaging api - allowing ctdb applications to take advantage of the ctdb messaging layer for their own data Added: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_call.c branches/SAMBA_4_0/source/cluster/ctdb/config.mk branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb_private.h Changeset: Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c === --- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c2007-02-08 02:17:29 UTC (rev 21231) +++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c2007-02-08 02:57:08 UTC (rev 21232) @@ -212,6 +212,10 @@ ctdb_reply_dmaster(ctdb, hdr); break; + case CTDB_REQ_MESSAGE: + ctdb_request_message(ctdb, hdr); + break; + default: printf("Packet with unknown operation %d\n", hdr->operation); talloc_free(hdr); @@ -267,6 +271,20 @@ } } + +/* + queue a packet or die +*/ +void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) +{ + struct ctdb_node *node; + node = ctdb->nodes[hdr->destnode]; + if (ctdb->methods->queue_pkt(node, (uint8_t *)hdr, hdr->length) != 0) { + ctdb_fatal(ctdb, "Unable to queue packet\n"); + } +} + + static const struct ctdb_upcalls ctdb_upcalls = { .recv_pkt = ctdb_recv_pkt, .node_dead = ctdb_node_dead, Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_call.c === --- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_call.c 2007-02-08 02:17:29 UTC (rev 21231) +++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_call.c 2007-02-08 02:57:08 UTC (rev 21232) @@ -29,19 +29,6 @@ #include "../include/ctdb_private.h" /* - queue a packet or die -*/ -static void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) -{ - struct ctdb_node *node; - node = ctdb->nodes[hdr->destnode]; - if (ctdb->methods->queue_pkt(node, (uint8_t *)hdr, hdr->length) != 0) { - ctdb_fatal(ctdb, "Unable to queue packet\n"); - } -} - - -/* local version of ctdb_call */ static int ctdb_call_local(struct ctdb_context *ctdb, struct ctdb_call *call, Added: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c === --- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-08 02:17:29 UTC (rev 21231) +++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-08 02:57:08 UTC (rev 21232) @@ -0,0 +1,91 @@ +/* + ctdb_message protocol code + + Copyright (C) Andrew Tridgell 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 2 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* + see http://wiki.samba.org/index.php/Samba_%26_Clustering for + protocol design and packet details +*/ +#include "includes.h" +#include "lib/events/events.h" +#include "lib/tdb/include/tdb.h" +#include "system/network.h" +#include "system/filesys.h" +#include "../include/ctdb_private.h" + + +/* + called when a CTDB_REQ_MESSAGE packet comes in + + this dispatches the messages to the registered ctdb message handler +*/ +void ctdb_request_message(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) +{ + struct ctdb_req_message *c = (struct ctdb_req_message *)hdr; + TDB_DATA data; + if (ctdb->message_handler == NULL) { + /* no registered message handler */ + talloc_free(hdr); + return; + } + data.dptr = &c->data[0]; + data.dsize = c->datalen; + ctdb->message_handler(ctdb, c->srvid, data, ctdb->message_private); + talloc_free(hdr); +} + + +/* + send a ctdb message +*/ +int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn, +
svn commit: samba r21233 - in branches/SAMBA_4_0/source: cluster cluster/ctdb lib/messaging
Author: tridge Date: 2007-02-08 02:59:58 + (Thu, 08 Feb 2007) New Revision: 21233 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21233 Log: first version of samba4 messaging using ctdb is working. This means we should now work on a real cluster, and not just a localhost simulator Modified: branches/SAMBA_4_0/source/cluster/cluster.c branches/SAMBA_4_0/source/cluster/cluster.h branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c branches/SAMBA_4_0/source/lib/messaging/messaging.c Changeset: Modified: branches/SAMBA_4_0/source/cluster/cluster.c === --- branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-08 02:57:08 UTC (rev 21232) +++ branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-08 02:59:58 UTC (rev 21233) @@ -80,8 +80,7 @@ register a callback function for a messaging endpoint */ NTSTATUS cluster_message_init(struct messaging_context *msg, struct server_id server, - void (*handler)(struct messaging_context *, - struct server_id, uint32_t, DATA_BLOB)) + cluster_message_fn_t handler) { cluster_init(); return ops->message_init(ops, msg, server, handler); Modified: branches/SAMBA_4_0/source/cluster/cluster.h === --- branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-08 02:57:08 UTC (rev 21232) +++ branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-08 02:59:58 UTC (rev 21233) @@ -34,8 +34,7 @@ #define cluster_node_equal(id1, id2) ((id1)->node == (id2)->node) struct messaging_context; -typedef void (*cluster_message_fn_t)(struct messaging_context *, -struct server_id, uint32_t, DATA_BLOB); +typedef void (*cluster_message_fn_t)(struct messaging_context *, DATA_BLOB); /* prototypes */ struct server_id cluster_id(uint32_t id); Modified: branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c === --- branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-08 02:57:08 UTC (rev 21232) +++ branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-08 02:59:58 UTC (rev 21233) @@ -28,12 +28,25 @@ #include "lib/tdb/include/tdb.h" #include "include/ctdb.h" #include "db_wrap.h" +#include "lib/util/dlinklist.h" +/* a linked list of messaging handlers, allowing incoming messages + to be directed to the right messaging context */ +struct cluster_messaging_list { + struct cluster_messaging_list *next, *prev; + struct cluster_state *state; + struct messaging_context *msg; + struct server_id server; + cluster_message_fn_t handler; +}; + struct cluster_state { struct ctdb_context *ctdb; + struct cluster_messaging_list *list; }; + /* return a server_id for a ctdb node */ @@ -92,6 +105,33 @@ } /* + dispatch incoming ctdb messages +*/ +static void ctdb_message_handler(struct ctdb_context *ctdb, uint32_t srvid, +TDB_DATA data, void *private) +{ + struct cluster_state *state = talloc_get_type(private, struct cluster_state); + struct cluster_messaging_list *m; + for (m=state->list;m;m=m->next) { + if (srvid == m->server.id) { + DATA_BLOB bdata; + bdata.data = data.dptr; + bdata.length = data.dsize; + m->handler(m->msg, bdata); + } + } +} + +/* + destroy a element of messaging list (when messaging context goes away) +*/ +static int cluster_messaging_destructor(struct cluster_messaging_list *m) +{ + DLIST_REMOVE(m->state->list, m); + return 0; +} + +/* setup a handler for ctdb messages */ static NTSTATUS ctdb_message_init(struct cluster_ops *ops, @@ -99,6 +139,19 @@ struct server_id server, cluster_message_fn_t handler) { + struct cluster_state *state = ops->private; + struct cluster_messaging_list *m; + m = talloc(msg, struct cluster_messaging_list); + NT_STATUS_HAVE_NO_MEMORY(m); + + m->state = state; + m->msg = msg; + m->server = server; + m->handler = handler; + DLIST_ADD(state->list, m); + + talloc_set_destructor(m, cluster_messaging_destructor); + return NT_STATUS_OK; } @@ -109,7 +162,19 @@ struct server_id server, uint32_t msg_type, DATA_BLOB *data) { - return NT_STATUS_INVALID_DEVICE_REQUEST; + struct cluster_state *state = ops->private; + struct ctdb_context *ctdb = state->ctdb; + TDB_DATA tdata; + int ret; + + tdata.dptr = data->data; + tdata.dsize = data->length; + +
svn commit: samba r21234 - in branches/SAMBA_4_0/source/ntvfs/posix: .
Author: tridge Date: 2007-02-08 03:01:47 + (Thu, 08 Feb 2007) New Revision: 21234 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21234 Log: fixed a subtle bug with talloc reference counting and async ntvfs requests. Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c Changeset: Modified: branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c === --- branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c 2007-02-08 02:59:58 UTC (rev 21233) +++ branches/SAMBA_4_0/source/ntvfs/posix/pvfs_wait.c 2007-02-08 03:01:47 UTC (rev 21234) @@ -76,9 +76,9 @@ structure is not destroyed when the async request reply is sent, which would cause problems with the other ntvfs modules above us */ - talloc_increase_ref_count(req); + talloc_reference(msg, req); ntvfs_async_setup(pwait->req, pwait); - talloc_free(req); + talloc_unlink(msg, req); }