svn commit: samba r21235 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 09:10:59 + (Thu, 08 Feb 2007) New Revision: 21235 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21235 Log: fix crash bug metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 03:01:47 UTC (rev 21234) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 09:10:59 UTC (rev 21235) @@ -485,7 +485,9 @@ printf(Dumping AD partition: %s\n, nc.dn); for (y=0; ;y++) { + int32_t _level = 0; ZERO_STRUCT(r.out); + r.out.level = _level; if (*r.in.level == 5) { DEBUG(0,(start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n,y,
svn commit: samba r21236 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 10:44:54 + (Thu, 08 Feb 2007) New Revision: 21236 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21236 Log: store and orint the dcerpc session key, gensec session key and user nthash values for each drsuapi connection in RPC-DSSYNC metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 09:10:59 UTC (rev 21235) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 10:44:54 UTC (rev 21236) @@ -28,6 +28,11 @@ #include libcli/ldap/ldap_client.h #include torture/torture.h #include torture/ldap/proto.h +#include libcli/auth/libcli_auth.h +#include lib/crypto/crypto.h +#include auth/credentials/credentials.h +#include libcli/auth/libcli_auth.h +#include auth/gensec/gensec.h struct DsSyncBindInfo { struct dcerpc_pipe *pipe; @@ -37,6 +42,9 @@ struct drsuapi_DsBindInfo28 our_bind_info28; struct drsuapi_DsBindInfo28 peer_bind_info28; struct policy_handle bind_handle; + DATA_BLOB dce_key; + DATA_BLOB gen_key; + struct samr_Password nthash; }; struct DsSyncLDAPInfo { @@ -113,6 +121,7 @@ ctx-admin.drsuapi.req.out.bind_handle = ctx-admin.drsuapi.bind_handle; /* ctx-new_dc ...*/ + ctx-new_dc.credentials = cmdline_credentials; our_bind_info28 = ctx-new_dc.drsuapi.our_bind_info28; our_bind_info28-supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_BASE; @@ -172,6 +181,7 @@ NTSTATUS status; BOOL ret = True; struct event_context *event = NULL; + const struct samr_Password *nthash; status = dcerpc_pipe_connect_b(ctx, b-pipe, ctx-drsuapi_binding, @@ -214,6 +224,20 @@ } } + dcerpc_fetch_session_key(b-pipe, b-dce_key); + gensec_session_key(b-pipe-conn-security_state.generic_state, b-gen_key); + nthash = cli_credentials_get_nt_hash(credentials, NULL); + if (nthash) b-nthash = *nthash; + + if (lp_parm_bool(-1,dssync,print_pwd_blobs,False)) { + DEBUG(0,(DCERPC session key:\n)); + dump_data(0, b-dce_key.data, b-dce_key.length); + DEBUG(0,(GENSEC session key:\n)); + dump_data(0, b-gen_key.data, b-gen_key.length); + DEBUG(0,(CREDENTIALS nthash:\n)); + dump_data(0, b-nthash.hash, sizeof(b-nthash.hash)); + } + return ret; } @@ -635,7 +659,7 @@ ret = _test_DsBind(ctx, ctx-admin.credentials, ctx-admin.drsuapi); ret = test_LDAPBind(ctx, ctx-admin.credentials, ctx-admin.ldap); ret = test_GetInfo(ctx); - ret = _test_DsBind(ctx, ctx-admin.credentials, ctx-new_dc.drsuapi); + ret = _test_DsBind(ctx, ctx-new_dc.credentials, ctx-new_dc.drsuapi); ret = test_FetchData(ctx); ret = test_FetchNT4Data(ctx);
Rev 11393: Move [in, out] parameters to r-inout. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11393 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 12:30:14 +0100 message: Move [in,out] parameters to r-inout. modified: source/pidl/lib/Parse/Pidl/Samba4/Header.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/header.plheader.pl-20070208094205-onb80lvoyh5ciw5r-1 === modified file 'source/pidl/lib/Parse/Pidl/Samba4/Header.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-02-08 11:25:19 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-02-08 11:30:14 + @@ -287,23 +287,19 @@ $tab_depth++; my $needed = 0; -if (HeaderFunctionInOut_needed($fn, in) or - HeaderFunctionInOut_needed($fn, inout)) { +if (HeaderFunctionInOut_needed($fn, in)) { pidl tabs().struct {\n; $tab_depth++; HeaderFunctionInOut($fn, in); - HeaderFunctionInOut($fn, inout); $tab_depth--; pidl tabs().} in;\n\n; $needed++; } -if (HeaderFunctionInOut_needed($fn, out) or - HeaderFunctionInOut_needed($fn, inout)) { +if (HeaderFunctionInOut_needed($fn, out)) { pidl tabs().struct {\n; $tab_depth++; HeaderFunctionInOut($fn, out); - HeaderFunctionInOut($fn, inout); if ($fn-{RETURN_TYPE} ne void) { pidl tabs().mapType($fn-{RETURN_TYPE}) . result;\n; } @@ -312,6 +308,15 @@ $needed++; } + if (HeaderFunctionInOut_needed($fn, inout)) { + pidl tabs().struct {\n; + $tab_depth++; + HeaderFunctionInOut($fn, inout); + $tab_depth--; + pidl tabs().} inout;\n\n; + $needed++; + } + if (!$needed) { # sigh - some compilers don't like empty structures pidl tabs().int _dummy_element;\n; === modified file 'source/pidl/tests/header.pl' --- a/source/pidl/tests/header.pl 2007-02-08 11:25:19 + +++ b/source/pidl/tests/header.pl 2007-02-08 11:30:14 + @@ -32,5 +32,5 @@ like(parse_idl(interface x { void foo ([out] uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn out arg works); like(parse_idl(interface x { void foo ([in,out] uint32 x); };), - qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn in,out arg works); -like(parse_idl(interface x { void foo (uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn with no props implies in,out); + qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} inout;.*};/sm, fn in,out arg works); +like(parse_idl(interface x { void foo (uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} inout;\s+};/sm, fn with no props implies in,out);
Rev 11392: Fix handling of elements without [in, out] in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11392 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 12:25:19 +0100 message: Fix handling of elements without [in,out] modified: source/pidl/lib/Parse/Pidl/Samba4/Header.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/header.plheader.pl-20070208094205-onb80lvoyh5ciw5r-1 === modified file 'source/pidl/lib/Parse/Pidl/Samba4/Header.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-02-08 10:42:00 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-02-08 11:25:19 + @@ -235,15 +235,25 @@ } } +sub ElementDirection($) +{ + my ($e) = @_; + + return inout if (has_property($e, in) and has_property($e, out)); + return in if (has_property($e, in)); + return out if (has_property($e, out)); + return inout; +} + # # parse a function sub HeaderFunctionInOut($$) { my($fn,$prop) = @_; -foreach (@{$fn-{ELEMENTS}}) { - HeaderElement($_) if (has_property($_, $prop)); -} + foreach (@{$fn-{ELEMENTS}}) { + HeaderElement($_) if (ElementDirection($_) eq $prop); + } } # @@ -254,8 +264,8 @@ return 1 if ($prop eq out $fn-{RETURN_TYPE} ne void); -foreach (@{$fn-{ELEMENTS}}) { - return 1 if (has_property($_, $prop)); + foreach (@{$fn-{ELEMENTS}}) { + return 1 if (ElementDirection($_) eq $prop); } return undef; @@ -277,19 +287,23 @@ $tab_depth++; my $needed = 0; -if (HeaderFunctionInOut_needed($fn, in)) { +if (HeaderFunctionInOut_needed($fn, in) or + HeaderFunctionInOut_needed($fn, inout)) { pidl tabs().struct {\n; $tab_depth++; HeaderFunctionInOut($fn, in); + HeaderFunctionInOut($fn, inout); $tab_depth--; pidl tabs().} in;\n\n; $needed++; } -if (HeaderFunctionInOut_needed($fn, out)) { +if (HeaderFunctionInOut_needed($fn, out) or + HeaderFunctionInOut_needed($fn, inout)) { pidl tabs().struct {\n; $tab_depth++; HeaderFunctionInOut($fn, out); + HeaderFunctionInOut($fn, inout); if ($fn-{RETURN_TYPE} ne void) { pidl tabs().mapType($fn-{RETURN_TYPE}) . result;\n; } @@ -298,7 +312,7 @@ $needed++; } -if (! $needed) { +if (!$needed) { # sigh - some compilers don't like empty structures pidl tabs().int _dummy_element;\n; } === modified file 'source/pidl/tests/header.pl' --- a/source/pidl/tests/header.pl 2007-02-08 10:42:00 + +++ b/source/pidl/tests/header.pl 2007-02-08 11:25:19 + @@ -4,7 +4,7 @@ use strict; use warnings; -use Test::More tests = 8; +use Test::More tests = 9; use FindBin qw($RealBin); use lib $RealBin; use Util; @@ -33,4 +33,4 @@ qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn out arg works); like(parse_idl(interface x { void foo ([in,out] uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn in,out arg works); -#like(parse_idl(interface x { void foo (uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn with no props implies in,out); +like(parse_idl(interface x { void foo (uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn with no props implies in,out);
Rev 11394: Update environment code to use inout. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11394 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 13:28:37 +0100 message: Update environment code to use inout. modified: source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 19:03:19 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-08 12:28:37 + @@ -10,7 +10,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT = qw(is_charset_array); [EMAIL PROTECTED] = qw(check_null_pointer); [EMAIL PROTECTED] = qw(check_null_pointer GenerateFunctionInEnv GenerateFunctionOutEnv); use strict; use Parse::Pidl::Typelist qw(hasType getType mapType); @@ -248,24 +248,28 @@ my %env; foreach my $e (@{$fn-{ELEMENTS}}) { + next unless (grep (/in/, @{$e-{DIRECTION}})); + if (grep(/out/, @{$e-{DIRECTION}})) { + $env{$e-{NAME}} = r-inout.$e-{NAME}; + } else { + $env{$e-{NAME}} = r-in.$e-{NAME}; + } + } + + return \%env; +} + +sub GenerateFunctionOutEnv($) +{ + my $fn = shift; + my %env; + + foreach my $e (@{$fn-{ELEMENTS}}) { + next unless (grep (/out/, @{$e-{DIRECTION}})); if (grep (/in/, @{$e-{DIRECTION}})) { - $env{$e-{NAME}} = r-in.$e-{NAME}; - } - } - - return \%env; -} - -sub GenerateFunctionOutEnv($) -{ - my $fn = shift; - my %env; - - foreach my $e (@{$fn-{ELEMENTS}}) { - if (grep (/out/, @{$e-{DIRECTION}})) { + $env{$e-{NAME}} = r-inout.$e-{NAME}; + } else { $env{$e-{NAME}} = r-out.$e-{NAME}; - } elsif (grep (/in/, @{$e-{DIRECTION}})) { - $env{$e-{NAME}} = r-in.$e-{NAME}; } } @@ -1993,7 +1997,7 @@ foreach my $e (@{$fn-{ELEMENTS}}) { if (grep(/in/,@{$e-{DIRECTION}})) { - ParseElementPrint($e, r-in.$e-{NAME}, $env); + ParseElementPrint($e, $env-{$e-{NAME}}, $env); } } pidl ndr-depth--;; @@ -2008,7 +2012,7 @@ $env = GenerateFunctionOutEnv($fn); foreach my $e (@{$fn-{ELEMENTS}}) { if (grep(/out/,@{$e-{DIRECTION}})) { - ParseElementPrint($e, r-out.$e-{NAME}, $env); + ParseElementPrint($e, $env-{$e-{NAME}}, $env); } } if ($fn-{RETURN_TYPE}) { === modified file 'source/pidl/tests/samba-ndr.pl' --- a/source/pidl/tests/samba-ndr.pl2007-01-10 00:37:30 + +++ b/source/pidl/tests/samba-ndr.pl2007-02-08 12:28:37 + @@ -4,12 +4,12 @@ use strict; use warnings; -use Test::More tests = 10; +use Test::More tests = 14; use FindBin qw($RealBin); use lib $RealBin; use Util; use Parse::Pidl::Util qw(MyDumper); -use Parse::Pidl::Samba4::NDR::Parser qw(check_null_pointer); +use Parse::Pidl::Samba4::NDR::Parser qw(check_null_pointer GenerateFunctionInEnv GenerateFunctionOutEnv); my $output; sub print_fn($) { my $x = shift; $output.=$x; } @@ -133,3 +133,16 @@ sub { $fn-(r-in.bla); }); is($output, if (r-in.bla == NULL) return;); + +# Make sure GenerateFunctionInEnv and GenerateFunctionOutEnv work +$fn = { ELEMENTS = [ { DIRECTION = [in], NAME = foo } ] }; +is_deeply({ foo = r-in.foo }, GenerateFunctionInEnv($fn)); + +$fn = { ELEMENTS = [ { DIRECTION = [out], NAME = foo } ] }; +is_deeply({ foo = r-out.foo }, GenerateFunctionOutEnv($fn)); + +$fn = { ELEMENTS = [ { DIRECTION = [out, in], NAME = foo } ] }; +is_deeply({ foo = r-inout.foo }, GenerateFunctionInEnv($fn)); + +$fn = { ELEMENTS = [ { DIRECTION = [out, in], NAME = foo } ] }; +is_deeply({ foo = r-inout.foo }, GenerateFunctionOutEnv($fn));
svn commit: samba r21237 - in branches/SAMBA_3_0/source: .
Author: gd Date: 2007-02-08 12:40:29 + (Thu, 08 Feb 2007) New Revision: 21237 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21237 Log: Forgot configure checks in 3_0 (3_0_25 is fine) for heimdal kinit fix. Guenther Modified: branches/SAMBA_3_0/source/configure.in Changeset: Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2007-02-08 10:44:54 UTC (rev 21236) +++ branches/SAMBA_3_0/source/configure.in 2007-02-08 12:40:29 UTC (rev 21237) @@ -3501,6 +3501,8 @@ AC_CHECK_FUNC_EXT(krb5_get_kdc_cred, $KRB5_LIBS) AC_CHECK_FUNC_EXT(krb5_free_error_contents, $KRB5_LIBS) AC_CHECK_FUNC_EXT(initialize_krb5_error_table, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_alloc, $KRB5_LIBS) + AC_CHECK_FUNC_EXT(krb5_get_init_creds_opt_free, $KRB5_LIBS) LIBS=$KRB5_LIBS $LIBS
svn commit: samba r21238 - in branches: SAMBA_3_0/source/libads SAMBA_3_0_25/source/libads
Author: gd Date: 2007-02-08 13:50:47 + (Thu, 08 Feb 2007) New Revision: 21238 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21238 Log: Fix tab indent in self-written krb5.confs. Guenther Modified: branches/SAMBA_3_0/source/libads/kerberos.c branches/SAMBA_3_0_25/source/libads/kerberos.c Changeset: Modified: branches/SAMBA_3_0/source/libads/kerberos.c === --- branches/SAMBA_3_0/source/libads/kerberos.c 2007-02-08 12:40:29 UTC (rev 21237) +++ branches/SAMBA_3_0/source/libads/kerberos.c 2007-02-08 13:50:47 UTC (rev 21238) @@ -617,7 +617,7 @@ file_contents = talloc_asprintf(fname, [libdefaults]\n\tdefault_realm = %s\n\n [realms]\n\t%s = {\n - \t\t%s\t}\n, + \t%s\t}\n, realm_upper, realm_upper, kdc_ip_string); if (!file_contents) { Modified: branches/SAMBA_3_0_25/source/libads/kerberos.c === --- branches/SAMBA_3_0_25/source/libads/kerberos.c 2007-02-08 12:40:29 UTC (rev 21237) +++ branches/SAMBA_3_0_25/source/libads/kerberos.c 2007-02-08 13:50:47 UTC (rev 21238) @@ -617,7 +617,7 @@ file_contents = talloc_asprintf(fname, [libdefaults]\n\tdefault_realm = %s\n\n [realms]\n\t%s = {\n - \t\t%s\t}\n, + \t%s\t}\n, realm_upper, realm_upper, kdc_ip_string); if (!file_contents) {
svn commit: samba r21239 - in branches/SAMBA_3_0/source/libsmb: .
Author: idra Date: 2007-02-08 14:55:21 + (Thu, 08 Feb 2007) New Revision: 21239 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21239 Log: if the workgroup name is longer than 16 chars we get garbage in the string server_len is usually 256 (fstring). Correctly terminate saving the lenght Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/libsmbclient.c === --- branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2007-02-08 13:50:47 UTC (rev 21238) +++ branches/SAMBA_3_0/source/libsmb/libsmbclient.c 2007-02-08 14:55:21 UTC (rev 21239) @@ -339,14 +339,15 @@ goto decoding; if (*p == '/') { + int wl = strlen(context-workgroup); - strncpy(server, context-workgroup, - ((strlen(context-workgroup) 16) - ? strlen(context-workgroup) - : 16)); -server[server_len - 1] = '\0'; + if (wl 16) { + wl = 16; + } + + strncpy(server, context-workgroup, wl); +server[wl] = '\0'; return 0; - } /*
svn commit: samba r21240 - in branches/SAMBA_3_0/source: include libads libsmb nsswitch rpc_client utils
Author: gd Date: 2007-02-08 17:02:39 + (Thu, 08 Feb 2007) New Revision: 21240 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21240 Log: Fix longstanding Bug #4009. For the winbind cached ADS LDAP connection handling (ads_cached_connection()) we were (incorrectly) assuming that the service ticket lifetime equaled the tgt lifetime. For setups where the service ticket just lives 10 minutes, we were leaving hundreds of LDAP connections in CLOSE_WAIT state, until we fail to service entirely with Too many open files. Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP connection after the ads_do_search_retry() has failed to submit the search request (although the bind succeeded (returning an expired service ticket that we cannot delete from the memory cred cache - this will get fixed later)). Guenther Modified: branches/SAMBA_3_0/source/include/ads.h branches/SAMBA_3_0/source/include/includes.h branches/SAMBA_3_0/source/libads/kerberos.c branches/SAMBA_3_0/source/libads/ldap_utils.c branches/SAMBA_3_0/source/libads/sasl.c branches/SAMBA_3_0/source/libsmb/cliconnect.c branches/SAMBA_3_0/source/libsmb/clikrb5.c branches/SAMBA_3_0/source/libsmb/clispnego.c branches/SAMBA_3_0/source/nsswitch/idmap_ad.c branches/SAMBA_3_0/source/nsswitch/winbindd_ads.c branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c branches/SAMBA_3_0/source/rpc_client/cli_pipe.c branches/SAMBA_3_0/source/utils/ntlm_auth.c Changeset: Modified: branches/SAMBA_3_0/source/include/ads.h === --- branches/SAMBA_3_0/source/include/ads.h 2007-02-08 14:55:21 UTC (rev 21239) +++ branches/SAMBA_3_0/source/include/ads.h 2007-02-08 17:02:39 UTC (rev 21240) @@ -42,7 +42,8 @@ char *kdc_server; unsigned flags; int time_offset; - time_t expire; + time_t tgt_expire; + time_t tgs_expire; time_t renewable; } auth; Modified: branches/SAMBA_3_0/source/include/includes.h === --- branches/SAMBA_3_0/source/include/includes.h2007-02-08 14:55:21 UTC (rev 21239) +++ branches/SAMBA_3_0/source/include/includes.h2007-02-08 17:02:39 UTC (rev 21240) @@ -1165,7 +1165,7 @@ krb5_const_principal princ1, krb5_const_principal princ2); int cli_krb5_get_ticket(const char *principal, time_t time_offset, - DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, const char *ccname); + DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, const char *ccname, time_t *tgs_expire); PAC_LOGON_INFO *get_logon_info_from_pac(PAC_DATA *pac_data); krb5_error_code smb_krb5_renew_ticket(const char *ccache_string, const char *client_string, const char *service_string, time_t *new_start_time); krb5_error_code kpasswd_err_to_krb5_err(krb5_error_code res_code); Modified: branches/SAMBA_3_0/source/libads/kerberos.c === --- branches/SAMBA_3_0/source/libads/kerberos.c 2007-02-08 14:55:21 UTC (rev 21239) +++ branches/SAMBA_3_0/source/libads/kerberos.c 2007-02-08 17:02:39 UTC (rev 21240) @@ -110,6 +110,10 @@ krb5_get_init_creds_opt_set_renew_life(opt, renewable_time); krb5_get_init_creds_opt_set_forwardable(opt, True); +#if 0 + /* insane testing */ + krb5_get_init_creds_opt_set_tkt_life(opt, 60); +#endif #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST if (request_pac) { @@ -216,7 +220,7 @@ } ret = kerberos_kinit_password_ext(s, ads-auth.password, ads-auth.time_offset, - ads-auth.expire, NULL, NULL, False, False, ads-auth.renewable); + ads-auth.tgt_expire, NULL, NULL, False, False, ads-auth.renewable); if (ret) { DEBUG(0,(kerberos_kinit_password %s failed: %s\n, Modified: branches/SAMBA_3_0/source/libads/ldap_utils.c === --- branches/SAMBA_3_0/source/libads/ldap_utils.c 2007-02-08 14:55:21 UTC (rev 21239) +++ branches/SAMBA_3_0/source/libads/ldap_utils.c 2007-02-08 17:02:39 UTC (rev 21240) @@ -110,10 +110,10 @@ } SAFE_FREE(bp); - if (!ADS_ERR_OK(status)) + if (!ADS_ERR_OK(status)) { DEBUG(1,(ads reopen failed after error %s\n, ads_errstr(status))); - + } return status; } Modified: branches/SAMBA_3_0/source/libads/sasl.c === --- branches/SAMBA_3_0/source/libads/sasl.c 2007-02-08 14:55:21 UTC (rev 21239) +++
svn commit: samba r21241 - in branches/SAMBA_3_0_25/source: include libads libsmb nsswitch rpc_client utils
Author: gd Date: 2007-02-08 17:09:56 + (Thu, 08 Feb 2007) New Revision: 21241 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21241 Log: Merge from 3_0: Fix longstanding Bug #4009. For the winbind cached ADS LDAP connection handling (ads_cached_connection()) we were (incorrectly) assuming that the service ticket lifetime equaled the tgt lifetime. For setups where the service ticket just lives 10 minutes, we were leaving hundreds of LDAP connections in CLOSE_WAIT state, until we fail to service entirely with Too many open files. Also sequence_number() in winbindd_ads.c needs to delete the cached LDAP connection after the ads_do_search_retry() has failed to submit the search request (although the bind succeeded (returning an expired service ticket that we cannot delete from the memory cred cache - this will get fixed later)). Guenther Modified: branches/SAMBA_3_0_25/source/include/ads.h branches/SAMBA_3_0_25/source/include/includes.h branches/SAMBA_3_0_25/source/libads/kerberos.c branches/SAMBA_3_0_25/source/libads/ldap_utils.c branches/SAMBA_3_0_25/source/libads/sasl.c branches/SAMBA_3_0_25/source/libsmb/cliconnect.c branches/SAMBA_3_0_25/source/libsmb/clikrb5.c branches/SAMBA_3_0_25/source/libsmb/clispnego.c branches/SAMBA_3_0_25/source/nsswitch/idmap_ad.c branches/SAMBA_3_0_25/source/nsswitch/winbindd_ads.c branches/SAMBA_3_0_25/source/nsswitch/winbindd_pam.c branches/SAMBA_3_0_25/source/rpc_client/cli_pipe.c branches/SAMBA_3_0_25/source/utils/ntlm_auth.c Changeset: Modified: branches/SAMBA_3_0_25/source/include/ads.h === --- branches/SAMBA_3_0_25/source/include/ads.h 2007-02-08 17:02:39 UTC (rev 21240) +++ branches/SAMBA_3_0_25/source/include/ads.h 2007-02-08 17:09:56 UTC (rev 21241) @@ -42,7 +42,8 @@ char *kdc_server; unsigned flags; int time_offset; - time_t expire; + time_t tgt_expire; + time_t tgs_expire; time_t renewable; } auth; Modified: branches/SAMBA_3_0_25/source/include/includes.h === --- branches/SAMBA_3_0_25/source/include/includes.h 2007-02-08 17:02:39 UTC (rev 21240) +++ branches/SAMBA_3_0_25/source/include/includes.h 2007-02-08 17:09:56 UTC (rev 21241) @@ -1167,7 +1167,7 @@ krb5_const_principal princ1, krb5_const_principal princ2); int cli_krb5_get_ticket(const char *principal, time_t time_offset, - DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, const char *ccname); + DATA_BLOB *ticket, DATA_BLOB *session_key_krb5, uint32 extra_ap_opts, const char *ccname, time_t *tgs_expire); PAC_LOGON_INFO *get_logon_info_from_pac(PAC_DATA *pac_data); krb5_error_code smb_krb5_renew_ticket(const char *ccache_string, const char *client_string, const char *service_string, time_t *new_start_time); krb5_error_code kpasswd_err_to_krb5_err(krb5_error_code res_code); Modified: branches/SAMBA_3_0_25/source/libads/kerberos.c === --- branches/SAMBA_3_0_25/source/libads/kerberos.c 2007-02-08 17:02:39 UTC (rev 21240) +++ branches/SAMBA_3_0_25/source/libads/kerberos.c 2007-02-08 17:09:56 UTC (rev 21241) @@ -110,6 +110,10 @@ krb5_get_init_creds_opt_set_renew_life(opt, renewable_time); krb5_get_init_creds_opt_set_forwardable(opt, True); +#if 0 + /* insane testing */ + krb5_get_init_creds_opt_set_tkt_life(opt, 60); +#endif #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_PAC_REQUEST if (request_pac) { @@ -216,7 +220,7 @@ } ret = kerberos_kinit_password_ext(s, ads-auth.password, ads-auth.time_offset, - ads-auth.expire, NULL, NULL, False, False, ads-auth.renewable); + ads-auth.tgt_expire, NULL, NULL, False, False, ads-auth.renewable); if (ret) { DEBUG(0,(kerberos_kinit_password %s failed: %s\n, Modified: branches/SAMBA_3_0_25/source/libads/ldap_utils.c === --- branches/SAMBA_3_0_25/source/libads/ldap_utils.c2007-02-08 17:02:39 UTC (rev 21240) +++ branches/SAMBA_3_0_25/source/libads/ldap_utils.c2007-02-08 17:09:56 UTC (rev 21241) @@ -110,10 +110,10 @@ } SAFE_FREE(bp); - if (!ADS_ERR_OK(status)) + if (!ADS_ERR_OK(status)) { DEBUG(1,(ads reopen failed after error %s\n, ads_errstr(status))); - + } return status; } Modified: branches/SAMBA_3_0_25/source/libads/sasl.c === ---
svn commit: linux-cifs-client r100 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .
Author: sfrench Date: 2007-02-08 18:02:13 + (Thu, 08 Feb 2007) New Revision: 100 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=100 Log: merge with git Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES branches/linux-2.6-cifs-git-devel/fs/cifs/cifsfs.c branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h branches/linux-2.6-cifs-git-devel/fs/cifs/file.c branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c branches/linux-2.6-cifs-git-devel/fs/cifs/smbdes.c Changeset: Sorry, the patch is too large (346 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=100
svn commit: linux-cifs-client r101 - in branches/linux-converged-for-old-kernels/fs/cifs: .
Author: sfrench Date: 2007-02-08 18:02:39 + (Thu, 08 Feb 2007) New Revision: 101 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=101 Log: merge with git Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c Changeset: Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c === --- branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c 2007-02-08 18:02:13 UTC (rev 100) +++ branches/linux-converged-for-old-kernels/fs/cifs/cifsfs.c 2007-02-08 18:02:39 UTC (rev 101) @@ -284,7 +284,9 @@ file data or metadata */ cifs_inode-clientCanCacheRead = FALSE; cifs_inode-clientCanCacheAll = FALSE; +#if LINUX_VERSION_CODE KERNEL_VERSION(2,6,19) cifs_inode-vfs_inode.i_blksize = CIFS_MAX_MSGSIZE; +#endif cifs_inode-vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */ cifs_inode-vfs_inode.i_flags = S_NOATIME | S_NOCMTIME; INIT_LIST_HEAD(cifs_inode-openFileList); @@ -539,6 +541,16 @@ #endif } +#if LINUX_VERSION_CODE KERNEL_VERSION(2, 6, 18) +static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov, + unsigned long nr_segs, loff_t pos) +{ +struct inode *inode = iocb-ki_filp-f_dentry-d_inode; +ssize_t written; + +written = generic_file_aio_write(iocb, iov, nr_segs, pos); +#else + static ssize_t cifs_file_writev(struct file *file, const struct iovec *iov, unsigned long nr_segs, loff_t *ppos) { @@ -558,6 +570,7 @@ ssize_t written; written = generic_file_aio_write(iocb, buf, count, pos); +#endif if (!CIFS_I(inode)-clientCanCacheAll) filemap_fdatawrite(inode-i_mapping); return written; @@ -654,8 +667,10 @@ const struct file_operations cifs_file_ops = { .read = do_sync_read, .write = do_sync_write, +#if LINUX_VERSION_CODE KERNEL_VERSION(2, 6, 19) .readv = generic_file_readv, .writev = cifs_file_writev, +#endif .aio_read = generic_file_aio_read, .aio_write = cifs_file_aio_write, .open = cifs_open, @@ -698,8 +713,10 @@ const struct file_operations cifs_file_nobrl_ops = { .read = do_sync_read, .write = do_sync_write, +#if LINUX_VERSION_CODE KERNEL_VERSION(2, 6, 19) .readv = generic_file_readv, .writev = cifs_file_writev, +#endif .aio_read = generic_file_aio_read, .aio_write = cifs_file_aio_write, .open = cifs_open, @@ -775,8 +792,7 @@ static void cifs_destroy_inodecache(void) { - if (kmem_cache_destroy(cifs_inode_cachep)) - printk(KERN_WARNING cifs_inode_cache: error freeing\n); + kmem_cache_destroy(cifs_inode_cachep); } static int @@ -858,13 +874,9 @@ cifs_destroy_request_bufs(void) { mempool_destroy(cifs_req_poolp); - if (kmem_cache_destroy(cifs_req_cachep)) - printk(KERN_WARNING - cifs_destroy_request_cache: error not all structures were freed\n); + kmem_cache_destroy(cifs_req_cachep); mempool_destroy(cifs_sm_req_poolp); - if (kmem_cache_destroy(cifs_sm_req_cachep)) - printk(KERN_WARNING - cifs_destroy_request_cache: cifs_small_rq free error\n); + kmem_cache_destroy(cifs_sm_req_cachep); } static int @@ -901,13 +913,8 @@ cifs_destroy_mids(void) { mempool_destroy(cifs_mid_poolp); - if (kmem_cache_destroy(cifs_mid_cachep)) - printk(KERN_WARNING - cifs_destroy_mids: error not all structures were freed\n); - - if (kmem_cache_destroy(cifs_oplock_cachep)) - printk(KERN_WARNING - error not all oplock structures were freed\n); + kmem_cache_destroy(cifs_mid_cachep); + kmem_cache_destroy(cifs_oplock_cachep); } static int cifs_oplock_thread(void * dummyarg)
Rev 61: ib: fragment sent buf + many bugfixes in http://samba.org/~tridge/psomogyi/
revno: 61 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-02-08 19:06:14 +0100 message: ib: fragment sent buf + many bugfixes It came to light I have to fragment the send buffer in case destination's to fit receiver's buffers. Additionally fixed many bugs. Still testing. + TODO: clean code. modified: ib/ibwrapper.c ibwrapper.c-20061204130028-0125b4f5a72f4b11 ib/ibwrapper_internal.h ibwrapper_internal.h-20061204130028-47f0a7e658b16ca2 tests/ibwrapper_test.c ibwrapper_test.c-20061214171730-h11a2z5ed6pt66hj-1 === modified file 'ib/ibwrapper.c' --- a/ib/ibwrapper.c2007-02-01 17:46:44 + +++ b/ib/ibwrapper.c2007-02-08 18:06:14 + @@ -39,6 +39,7 @@ #include ibwrapper.h #include rdma/rdma_cma.h +#include infiniband/sa-kern-abi.h #include ibwrapper_internal.h #include lib/util/dlinklist.h @@ -46,11 +47,17 @@ #define IBW_LASTERR_BUFSIZE 512 static char ibw_lasterr[IBW_LASTERR_BUFSIZE]; +#define IBW_MAX_SEND_WR 256 +#define IBW_MAX_RECV_WR 1024 +#define IBW_RECV_BUFSIZE 256 +#define IBW_RECV_THRESHOLD (1 * 1024 * 1024) + static void ibw_event_handler_verbs(struct event_context *ev, struct fd_event *fde, uint16_t flags, void *private_data); static int ibw_fill_cq(struct ibw_conn *conn); -static inline int ibw_wc_recv(struct ibw_conn *conn, struct ibv_wc *wc); -static inline int ibw_wc_send(struct ibw_conn *conn, struct ibv_wc *wc); +static int ibw_wc_recv(struct ibw_conn *conn, struct ibv_wc *wc); +static int ibw_wc_send(struct ibw_conn *conn, struct ibv_wc *wc); +static int ibw_send_packet(struct ibw_conn *conn, void *buf, struct ibw_wr *p, uint32_t len); static void *ibw_alloc_mr(struct ibw_ctx_priv *pctx, struct ibw_conn_priv *pconn, uint32_t n, struct ibv_mr **ppmr) @@ -97,7 +104,7 @@ DEBUG(10, (ibw_init_memory(cmid: %p)\n, pconn-cm_id)); pconn-buf_send = ibw_alloc_mr(pctx, pconn, - opts-max_send_wr * opts-avg_send_size, pconn-mr_send); + opts-max_send_wr * opts-recv_bufsize, pconn-mr_send); if (!pconn-buf_send) { sprintf(ibw_lasterr, couldn't allocate work send buf\n); return -1; @@ -115,7 +122,7 @@ for(i=0; iopts-max_send_wr; i++) { p = pconn-wr_index[i] = talloc_zero(pconn, struct ibw_wr); - p-msg = pconn-buf_send + (i * opts-avg_send_size); + p-buf = pconn-buf_send + (i * opts-recv_bufsize); p-wr_id = i; DLIST_ADD(pconn-wr_list_avail, p); @@ -228,6 +235,7 @@ struct ibw_ctx_priv *pctx = talloc_get_type(conn-ctx-internal, struct ibw_ctx_priv); struct ibw_conn_priv *pconn = talloc_get_type(conn-internal, struct ibw_conn_priv); struct ibv_qp_init_attr init_attr; + struct ibv_qp_attr attr; int rc; DEBUG(10, (ibw_setup_cq_qp(cmid: %p)\n, pconn-cm_id)); @@ -286,6 +294,12 @@ } /* elase result is in pconn-cm_id-qp */ + rc = ibv_query_qp(pconn-cm_id-qp, attr, IBV_QP_PATH_MTU, init_attr); + if (rc) { + sprintf(ibw_lasterr, ibv_query_qp failed with %d\n, rc); + return rc; + } + return ibw_fill_cq(conn); } @@ -295,12 +309,12 @@ struct ibw_conn_priv *pconn = talloc_get_type(conn-internal, struct ibw_conn_priv); int rc; struct ibv_sge list = { - .addr = (uintptr_t) NULL, + .addr = (uintptr_t) NULL, /* filled below */ .length = pctx-opts.recv_bufsize, - .lkey = pconn-mr_recv-lkey + .lkey = pconn-mr_recv-lkey /* always the same */ }; struct ibv_recv_wr wr = { - .wr_id = 0, + .wr_id = 0, /* filled below */ .sg_list= list, .num_sge= 1, }; @@ -314,7 +328,7 @@ rc = ibv_post_recv(pconn-cm_id-qp, wr, bad_wr); if (rc) { - sprintf(ibw_lasterr, ibv_post_recv failed with %d\n, rc); + sprintf(ibw_lasterr, refill/ibv_post_recv failed with %d\n, rc); DEBUG(0, (ibw_lasterr)); return -2; } @@ -328,12 +342,12 @@ struct ibw_conn_priv *pconn = talloc_get_type(conn-internal, struct ibw_conn_priv); int i, rc; struct ibv_sge list = { - .addr = (uintptr_t) NULL, + .addr = (uintptr_t) NULL, /* filled below */ .length = pctx-opts.recv_bufsize, - .lkey = pconn-mr_recv-lkey + .lkey = pconn-mr_recv-lkey /* always the same */ }; struct ibv_recv_wr wr = { - .wr_id = 0, + .wr_id = 0, /* filled below */ .sg_list= list, .num_sge
Rev 62: merged tridge's code in http://samba.org/~tridge/psomogyi/
revno: 62 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-02-08 19:08:58 +0100 message: merged tridge's code modified: common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2 tcp/tcp_io.c tcp_io.c-20061128004937-x70q1cu5xzg5g2tm-3 revno: 44.1.9 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Wed 2007-02-07 13:26:07 +1100 message: merged from samba4 ctdb === modified file 'common/ctdb.c' --- a/common/ctdb.c 2007-01-25 11:31:33 + +++ b/common/ctdb.c 2007-02-08 18:08:58 + @@ -175,6 +175,7 @@ static void ctdb_recv_pkt(struct ctdb_context *ctdb, uint8_t *data, uint32_t length) { struct ctdb_req_header *hdr; + if (length sizeof(*hdr)) { ctdb_set_error(ctdb, Bad packet length %d\n, length); return; @@ -229,7 +230,7 @@ } /* - called by the transport layer when a node is dead + called by the transport layer when a node is connected */ static void ctdb_node_connected(struct ctdb_node *node) { === modified file 'tcp/tcp_io.c' --- a/tcp/tcp_io.c 2007-01-23 00:38:45 + +++ b/tcp/tcp_io.c 2007-02-07 02:26:07 + @@ -38,13 +38,6 @@ struct ctdb_tcp_node *tnode = talloc_get_type(node-private, struct ctdb_tcp_node); - /* flush the queue */ - while (tnode-queue) { - struct ctdb_tcp_packet *pkt = tnode-queue; - DLIST_REMOVE(tnode-queue, pkt); - talloc_free(pkt); - } - /* start a new connect cycle to try to re-establish the link */ talloc_free(tnode-fde); @@ -68,6 +61,7 @@ always an error, as we have separate read and write sockets. In future we may combine them, but for now it must mean that the socket is dead, so we try to reconnect */ + node-ctdb-upcalls-node_dead(node); talloc_free(tnode-fde); close(tnode-fd); tnode-fd = -1; @@ -170,10 +164,9 @@ in-ctdb-upcalls-recv_pkt(in-ctdb, d2, len); data += len; nread -= len; - return; } - if (nread 4 || *(uint32_t *)data nread) { + if (nread 0) { /* we have only part of a packet */ if (data_base == data) { in-partial.data = data;
svn commit: samba r21242 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 18:15:44 + (Thu, 08 Feb 2007) New Revision: 21242 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21242 Log: prepare trying to decrypt the encrypted attributes metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 17:09:56 UTC (rev 21241) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:15:44 UTC (rev 21242) @@ -318,6 +318,15 @@ return ret; } +static DATA_BLOB decrypt_blob(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer) +{ + return data_blob(NULL,0); +} + static void test_analyse_objects(struct DsSyncTest *ctx, struct drsuapi_DsReplicaObjectListItemEx *cur) { @@ -327,16 +336,23 @@ for (; cur; cur = cur-next_object) { const char *dn; + struct dom_sid *sid = NULL; + uint32_t rid = 0; BOOL dn_printed = False; uint32_t i; if (!cur-object.identifier) continue; dn = cur-object.identifier-dn; + if (cur-object.identifier-sid.num_auths 0) { + sid = cur-object.identifier-sid; + rid = sid-sub_auths[sid-num_auths - 1]; + } for (i=0; i cur-object.attribute_ctr.num_attributes; i++) { const char *name = NULL; - DATA_BLOB *data = NULL; + DATA_BLOB *enc_data = NULL; + DATA_BLOB plain_data; struct drsuapi_DsReplicaAttribute *attr; attr = cur-object.attribute_ctr.attributes[i]; @@ -382,15 +398,22 @@ if (!attr-value_ctr.values[0].blob) continue; - data = attr-value_ctr.values[0].blob; + enc_data = attr-value_ctr.values[0].blob; + ZERO_STRUCT(plain_data); + plain_data = decrypt_blob(ctx, ctx-new_dc.drsuapi, + cur-object.identifier, rid, + enc_data); if (!dn_printed) { DEBUG(0,(DN: %s\n, dn)); dn_printed = True; } - DEBUGADD(0,(ATTR: %s data_blob.length=%lu\n, - name, (long)data-length)); - dump_data(0,data-data, data-length); + DEBUGADD(0,(ATTR: %s enc.length=%lu plain.length=%lu\n, + name, (long)enc_data-length, (long)plain_data.length)); + dump_data(0, enc_data-data, enc_data-length); + if (plain_data.length) { + dump_data(0, plain_data.data, plain_data.length); + } } } }
svn commit: linux-cifs-client r102 - in branches/linux-2.6-cifs-git-devel/fs/cifs: .
Author: sfrench Date: 2007-02-08 18:15:57 + (Thu, 08 Feb 2007) New Revision: 102 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=102 Log: merge with git Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h branches/linux-2.6-cifs-git-devel/fs/cifs/file.c branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c branches/linux-2.6-cifs-git-devel/fs/cifs/readdir.c Changeset: Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES === --- branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES 2007-02-08 18:02:39 UTC (rev 101) +++ branches/linux-2.6-cifs-git-devel/fs/cifs/CHANGES 2007-02-08 18:15:57 UTC (rev 102) @@ -1,6 +1,8 @@ Version 1.47 Fix oops in list_del during mount caused by unaligned string. +Fix file corruption which could occur on some large file +copies caused by writepages page i/o completion bug. Seek to SEEK_END forces check for update of file size for non-cached files. Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h === --- branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2007-02-08 18:02:39 UTC (rev 101) +++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifspdu.h 2007-02-08 18:15:57 UTC (rev 102) @@ -796,6 +796,8 @@ __u16 ByteCount; } __attribute__((packed)) OPENX_RSP; +/* For encoding of POSIX Open Request - see trans2 function 0x209 data struct */ + /* Legacy write request for older servers */ typedef struct smb_com_writex_req { struct smb_hdr hdr; /* wct = 12 */ @@ -2096,6 +2098,19 @@ /* end of POSIX ACL definitions */ +typedef struct { + __u32 OpenFlags; /* same as NT CreateX */ + __u32 PosixOpenFlags; + __u32 Mode; + __u16 Level; /* reply level requested (see QPathInfo levels) */ + __u16 Pad; /* reserved - MBZ */ +} __attribute__((packed)) OPEN_PSX_REQ; /* level 0x209 SetPathInfo data */ + +typedef struct { + /* reply varies based on requested level */ +} __atribute__((packed)) OPEN_PSX_RSP; /* level 0x209 SetPathInfo data */ + + struct file_internal_info { __u64 UniqueId; /* inode number */ } __attribute__((packed)); /* level 0x3ee */ Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h === --- branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h 2007-02-08 18:02:39 UTC (rev 101) +++ branches/linux-2.6-cifs-git-devel/fs/cifs/cifsproto.h 2007-02-08 18:15:57 UTC (rev 102) @@ -57,7 +57,7 @@ int * /* bytes returned */); extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length); extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); -extern int is_size_safe_to_change(struct cifsInodeInfo *); +extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern unsigned int smbCalcSize(struct smb_hdr *ptr); extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr); Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/file.c === --- branches/linux-2.6-cifs-git-devel/fs/cifs/file.c2007-02-08 18:02:39 UTC (rev 101) +++ branches/linux-2.6-cifs-git-devel/fs/cifs/file.c2007-02-08 18:15:57 UTC (rev 102) @@ -1954,7 +1954,7 @@ refreshing the inode only on increases in the file size but this is tricky to do without racing with writebehind page caching in the current Linux kernel design */ -int is_size_safe_to_change(struct cifsInodeInfo *cifsInode) +int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) { struct cifsFileInfo *open_file = NULL; @@ -1976,6 +1976,9 @@ return 1; } + if(i_size_read(cifsInode-vfs_inode) end_of_file) + return 1; + return 0; } else return 1; Modified: branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c === --- branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c 2007-02-08 18:02:39 UTC (rev 101) +++ branches/linux-2.6-cifs-git-devel/fs/cifs/inode.c 2007-02-08 18:15:57 UTC (rev 102) @@ -140,7 +140,7 @@ inode-i_gid = le64_to_cpu(findData.Gid); inode-i_nlink = le64_to_cpu(findData.Nlinks); - if (is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo, end_of_file)) { /* can not safely change the file size here if the client is writing to it due to potential races */ @@ -491,8 +491,8 @@
svn commit: linux-cifs-client r103 - in branches/linux-converged-for-old-kernels/fs/cifs: .
Author: sfrench Date: 2007-02-08 18:16:41 + (Thu, 08 Feb 2007) New Revision: 103 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=linux-cifs-clientrev=103 Log: mege with git Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h branches/linux-converged-for-old-kernels/fs/cifs/file.c branches/linux-converged-for-old-kernels/fs/cifs/inode.c branches/linux-converged-for-old-kernels/fs/cifs/readdir.c Changeset: Modified: branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h === --- branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h 2007-02-08 18:15:57 UTC (rev 102) +++ branches/linux-converged-for-old-kernels/fs/cifs/cifsproto.h 2007-02-08 18:16:41 UTC (rev 103) @@ -70,7 +70,7 @@ extern int checkSMBhdr(struct smb_hdr *smb, __u16 mid); extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length); extern int is_valid_oplock_break(struct smb_hdr *smb, struct TCP_Server_Info *); -extern int is_size_safe_to_change(struct cifsInodeInfo *); +extern int is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); extern struct cifsFileInfo *find_writable_file(struct cifsInodeInfo *); extern unsigned int smbCalcSize(struct smb_hdr *ptr); extern unsigned int smbCalcSize_LE(struct smb_hdr *ptr); Modified: branches/linux-converged-for-old-kernels/fs/cifs/file.c === --- branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 18:15:57 UTC (rev 102) +++ branches/linux-converged-for-old-kernels/fs/cifs/file.c 2007-02-08 18:16:41 UTC (rev 103) @@ -2050,7 +2050,7 @@ refreshing the inode only on increases in the file size but this is tricky to do without racing with writebehind page caching in the current Linux kernel design */ -int is_size_safe_to_change(struct cifsInodeInfo *cifsInode) +int is_size_safe_to_change(struct cifsInodeInfo *cifsInode, __u64 end_of_file) { struct cifsFileInfo *open_file = NULL; @@ -2075,6 +2075,9 @@ return 1; } + if(i_size_read(cifsInode-vfs_inode) end_of_file) + return 1; + return 0; } else return 1; Modified: branches/linux-converged-for-old-kernels/fs/cifs/inode.c === --- branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-08 18:15:57 UTC (rev 102) +++ branches/linux-converged-for-old-kernels/fs/cifs/inode.c2007-02-08 18:16:41 UTC (rev 103) @@ -143,7 +143,7 @@ inode-i_gid = le64_to_cpu(findData.Gid); inode-i_nlink = le64_to_cpu(findData.Nlinks); - if (is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo, end_of_file)) { /* can not safely change the file size here if the client is writing to it due to potential races */ i_size_write(inode, end_of_file); @@ -494,8 +494,8 @@ /* BB add code here - validate if device or weird share or device type? */ } - if (is_size_safe_to_change(cifsInfo)) { - /* can not safely change the file size here if the + if (is_size_safe_to_change(cifsInfo, le64_to_cpu(pfindData-EndOfFile))) { + /* can not safely shrink the file size here if the client is writing to it due to potential races */ i_size_write(inode,le64_to_cpu(pfindData-EndOfFile)); Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c === --- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2007-02-08 18:15:57 UTC (rev 102) +++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2007-02-08 18:16:41 UTC (rev 103) @@ -239,7 +239,7 @@ atomic_set(cifsInfo-inUse, 1); } - if (is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo, end_of_file)) { /* can not safely change the file size here if the client is writing to it due to potential races */ i_size_write(tmp_inode, end_of_file); @@ -372,10 +372,10 @@ tmp_inode-i_gid = le64_to_cpu(pfindData-Gid); tmp_inode-i_nlink = le64_to_cpu(pfindData-Nlinks); - if (is_size_safe_to_change(cifsInfo)) { + if (is_size_safe_to_change(cifsInfo, end_of_file)) { /* can not safely change the file size here if the client is writing to it due to potential races */ - i_size_write(tmp_inode,end_of_file); + i_size_write(tmp_inode, end_of_file); /* 512 bytes (2**9) is the fake blocksize that must be
svn commit: samba r21243 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 18:23:32 + (Thu, 08 Feb 2007) New Revision: 21243 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21243 Log: create the infrastructure to test a lot of crypto combinations to solve the drsuapi password encryption automaticly. metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:15:44 UTC (rev 21242) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:23:32 UTC (rev 21243) @@ -318,13 +318,260 @@ return ret; } +static void choose_confounder_v01(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + uint32_t confounder_len, + DATA_BLOB *confounder, + DATA_BLOB *enc_buffer) +{ + *confounder = data_blob_talloc(mem_ctx, buffer-data, confounder_len); + *enc_buffer = data_blob_talloc(mem_ctx, buffer-data+confounder_len, buffer-length - confounder_len); +} + +static void choose_confounder_v02(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + uint32_t confounder_len, + DATA_BLOB *confounder, + DATA_BLOB *enc_buffer) +{ + *confounder = data_blob_talloc(mem_ctx, buffer-data + buffer-length - confounder_len, confounder_len); + *enc_buffer = data_blob_talloc(mem_ctx, buffer-data, buffer-length - confounder_len); +} + +static const struct { + uint32_t len; + void (*fn)(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + uint32_t confounder_len, + DATA_BLOB *confounder, + DATA_BLOB *enc_buffer); +} choose_confounder_fns[] = { + { + .len= 4, + .fn = choose_confounder_v01, + }, + { + .len= 8, + .fn = choose_confounder_v01, + }, + { + .len= 12, + .fn = choose_confounder_v01, + }, + { + .len= 16, + .fn = choose_confounder_v01, + }, + { + .len= 4, + .fn = choose_confounder_v02, + }, + { + .len= 8, + .fn = choose_confounder_v02, + }, + { + .len= 12, + .fn = choose_confounder_v02, + }, + { + .len= 16, + .fn = choose_confounder_v02, + }, +}; + +static void choose_session_key_v01(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + DATA_BLOB *session_key) +{ + *session_key = data_blob_talloc(mem_ctx, b-dce_key.data, b-dce_key.length); +} + +static void choose_session_key_v02(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + DATA_BLOB *session_key) +{ + *session_key = data_blob_talloc(mem_ctx, b-gen_key.data, b-gen_key.length); +} + +static const struct { + void (*fn)(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer, + DATA_BLOB *session_key); +} choose_session_key_fns[] = { + { + .fn = choose_session_key_v01, + }, + { + .fn = choose_session_key_v02, + }, +}; + +static void create_enc_key_v01(TALLOC_CTX *mem_ctx, + struct DsSyncBindInfo *b, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB
svn commit: samba r21244 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 18:24:48 + (Thu, 08 Feb 2007) New Revision: 21244 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21244 Log: fix typo... I was wondering why I got allways 4 times the same decrypted buffer... metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:23:32 UTC (rev 21243) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:24:48 UTC (rev 21244) @@ -498,7 +498,7 @@ plain_buffer = data_blob_talloc(mem_ctx, enc_buffer-data, enc_buffer-length); - arcfour_crypt_blob(plain_buffer.data, plain_buffer.length, enc_buffer); + arcfour_crypt_blob(plain_buffer.data, plain_buffer.length, enc_key); *_plain_buffer = plain_buffer; }
svn commit: samba r21245 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2007-02-08 19:40:54 + (Thu, 08 Feb 2007) New Revision: 21245 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21245 Log: combination c[3] s[1] e[1] d[0]... was successful!! we now support the session depended password attribute encryption used in DsGetNCChanges() the static encryption (something like sam_rid_crypt() is assumed for some attributes and the format of the attribute values isn't known yet, but some contain some unicode strings... metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 18:24:48 UTC (rev 21244) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2007-02-08 19:40:54 UTC (rev 21245) @@ -42,9 +42,6 @@ struct drsuapi_DsBindInfo28 our_bind_info28; struct drsuapi_DsBindInfo28 peer_bind_info28; struct policy_handle bind_handle; - DATA_BLOB dce_key; - DATA_BLOB gen_key; - struct samr_Password nthash; }; struct DsSyncLDAPInfo { @@ -181,11 +178,10 @@ NTSTATUS status; BOOL ret = True; struct event_context *event = NULL; - const struct samr_Password *nthash; status = dcerpc_pipe_connect_b(ctx, b-pipe, ctx-drsuapi_binding, - dcerpc_table_drsuapi, + dcerpc_table_drsuapi, credentials, event); if (!NT_STATUS_IS_OK(status)) { @@ -224,20 +220,6 @@ } } - dcerpc_fetch_session_key(b-pipe, b-dce_key); - gensec_session_key(b-pipe-conn-security_state.generic_state, b-gen_key); - nthash = cli_credentials_get_nt_hash(credentials, NULL); - if (nthash) b-nthash = *nthash; - - if (lp_parm_bool(-1,dssync,print_pwd_blobs,False)) { - DEBUG(0,(DCERPC session key:\n)); - dump_data(0, b-dce_key.data, b-dce_key.length); - DEBUG(0,(GENSEC session key:\n)); - dump_data(0, b-gen_key.data, b-gen_key.length); - DEBUG(0,(CREDENTIALS nthash:\n)); - dump_data(0, b-nthash.hash, sizeof(b-nthash.hash)); - } - return ret; } @@ -318,263 +300,81 @@ return ret; } -static void choose_confounder_v01(TALLOC_CTX *mem_ctx, - struct DsSyncBindInfo *b, - struct drsuapi_DsReplicaObjectIdentifier *id, - uint32_t rid, - const DATA_BLOB *buffer, - uint32_t confounder_len, - DATA_BLOB *confounder, - DATA_BLOB *enc_buffer) +static DATA_BLOB decrypt_blob(TALLOC_CTX *mem_ctx, + const DATA_BLOB *gensec_skey, + struct drsuapi_DsReplicaObjectIdentifier *id, + uint32_t rid, + const DATA_BLOB *buffer) { - *confounder = data_blob_talloc(mem_ctx, buffer-data, confounder_len); - *enc_buffer = data_blob_talloc(mem_ctx, buffer-data+confounder_len, buffer-length - confounder_len); -} + DATA_BLOB confounder; + DATA_BLOB enc_buffer; -static void choose_confounder_v02(TALLOC_CTX *mem_ctx, - struct DsSyncBindInfo *b, - struct drsuapi_DsReplicaObjectIdentifier *id, - uint32_t rid, - const DATA_BLOB *buffer, - uint32_t confounder_len, - DATA_BLOB *confounder, - DATA_BLOB *enc_buffer) -{ - *confounder = data_blob_talloc(mem_ctx, buffer-data + buffer-length - confounder_len, confounder_len); - *enc_buffer = data_blob_talloc(mem_ctx, buffer-data, buffer-length - confounder_len); -} - -static const struct { - uint32_t len; - void (*fn)(TALLOC_CTX *mem_ctx, - struct DsSyncBindInfo *b, - struct drsuapi_DsReplicaObjectIdentifier *id, - uint32_t rid, - const DATA_BLOB *buffer, - uint32_t confounder_len, - DATA_BLOB *confounder, - DATA_BLOB *enc_buffer); -} choose_confounder_fns[] = { - { - .len= 4, - .fn = choose_confounder_v01, - }, - { - .len= 8, - .fn = choose_confounder_v01, - }, - { - .len= 12, - .fn = choose_confounder_v01, - }, - { - .len= 16, -
svn commit: samba r21246 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-08 19:42:27 + (Thu, 08 Feb 2007) New Revision: 21246 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21246 Log: Remove incorrect control on unix set info. We can take path or handle based calls. 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 19:40:54 UTC (rev 21245) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-08 19:42:27 UTC (rev 21246) @@ -3921,7 +3921,7 @@ return NT_STATUS_OK; } - DEBUG(10,(call_trans2setfilepathinfo: file %s : setting new size to %.0f\n, + DEBUG(10,(smb_set_file_size: file %s : setting new size to %.0f\n, fname, (double)size )); if (fsp fsp-fh-fd != -1) { @@ -5392,10 +5392,6 @@ case SMB_SET_FILE_UNIX_BASIC: { - if (tran_call == TRANSACT2_SETFILEINFO) { - return ERROR_NT(NT_STATUS_INVALID_LEVEL); - } - status = smb_set_file_unix_basic(conn, pdata, total_data, @@ -5460,7 +5456,7 @@ case SMB_SET_POSIX_LOCK: { - if (tran_call == TRANSACT2_SETFILEINFO) { + if (tran_call != TRANSACT2_SETFILEINFO) { return ERROR_NT(NT_STATUS_INVALID_LEVEL); } status = smb_set_posix_lock(conn, Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c === --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 19:40:54 UTC (rev 21245) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 19:42:27 UTC (rev 21246) @@ -3911,7 +3911,7 @@ return NT_STATUS_OK; } - DEBUG(10,(call_trans2setfilepathinfo: file %s : setting new size to %.0f\n, + DEBUG(10,(smb_set_file_size: file %s : setting new size to %.0f\n, fname, (double)size )); if (fsp fsp-fh-fd != -1) { @@ -5386,10 +5386,6 @@ case SMB_SET_FILE_UNIX_BASIC: { - if (tran_call == TRANSACT2_SETFILEINFO) { - return ERROR_NT(NT_STATUS_INVALID_LEVEL); - } - status = smb_set_file_unix_basic(conn, pdata, total_data, @@ -5454,7 +5450,7 @@ case SMB_SET_POSIX_LOCK: { - if (tran_call == TRANSACT2_SETFILEINFO) { + if (tran_call != TRANSACT2_SETFILEINFO) { return ERROR_NT(NT_STATUS_INVALID_LEVEL); } status = smb_set_posix_lock(conn,
svn commit: samba r21247 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-08 20:31:18 + (Thu, 08 Feb 2007) New Revision: 21247 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21247 Log: In the refactoring I dropped a RESOLVE_DFSPATH call from setpathinfo. Return it and make sure all paths go through a dfs resolve. 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 19:42:27 UTC (rev 21246) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2007-02-08 20:31:18 UTC (rev 21247) @@ -4168,6 +4168,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, char *inbuf, + char *outbuf, const char *pdata, int total_data, pstring fname) @@ -4185,6 +4186,8 @@ return status; } + RESOLVE_DFSPATH_STATUS(oldname, conn, inbuf, outbuf); + DEBUG(10,(smb_set_file_unix_hlink: SMB_SET_FILE_UNIX_LINK doing hard link %s - %s\n, fname, oldname)); @@ -4228,13 +4231,13 @@ return status; } + RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); + /* Check the new name has no '/' characters. */ if (strchr_m(newname, '/')) { return NT_STATUS_NOT_SUPPORTED; } - RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); - /* Create the base directory. */ pstrcpy(base_name, fname); p = strrchr_m(base_name, '/'); @@ -5237,6 +5240,9 @@ if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } + + RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); + status = unix_convert(conn, fname, False, NULL, sbuf); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); @@ -5423,6 +5429,7 @@ } status = smb_set_file_unix_hlink(conn, inbuf, + outbuf, pdata, total_data, fname); Modified: branches/SAMBA_3_0_25/source/smbd/trans2.c === --- branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 19:42:27 UTC (rev 21246) +++ branches/SAMBA_3_0_25/source/smbd/trans2.c 2007-02-08 20:31:18 UTC (rev 21247) @@ -4158,6 +4158,7 @@ static NTSTATUS smb_set_file_unix_hlink(connection_struct *conn, char *inbuf, + char *outbuf, const char *pdata, int total_data, pstring fname) @@ -4175,6 +4176,8 @@ return status; } + RESOLVE_DFSPATH_STATUS(oldname, conn, inbuf, outbuf); + DEBUG(10,(smb_set_file_unix_hlink: SMB_SET_FILE_UNIX_LINK doing hard link %s - %s\n, fname, oldname)); @@ -4218,13 +4221,13 @@ return status; } + RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); + /* Check the new name has no '/' characters. */ if (strchr_m(newname, '/')) { return NT_STATUS_NOT_SUPPORTED; } - RESOLVE_DFSPATH_STATUS(newname, conn, inbuf, outbuf); - /* Create the base directory. */ pstrcpy(base_name, fname); p = strrchr_m(base_name, '/'); @@ -5231,6 +5234,9 @@ if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); } + + RESOLVE_DFSPATH(fname, conn, inbuf, outbuf); + status = unix_convert(conn, fname, False, NULL, sbuf); if (!NT_STATUS_IS_OK(status)) { return ERROR_NT(status); @@ -5417,6 +5423,7 @@ } status = smb_set_file_unix_hlink(conn, inbuf, + outbuf, pdata, total_data, fname);
svn commit: samba r21248 - in branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual: .
Author: derrell Date: 2007-02-08 21:02:42 + (Thu, 08 Feb 2007) New Revision: 21248 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21248 Log: - Test for Simo: no change of selected row(s) upon open/close click. Simo, I haven't done any testing of this. Please let me know the side effects, if any, of this change. Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js Changeset: Modified: branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js === --- branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js 2007-02-08 20:31:18 UTC (rev 21247) +++ branches/SAMBA_4_0/webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js 2007-02-08 21:02:42 UTC (rev 21248) @@ -377,6 +377,7 @@ // Clear the old selections in the tree this.getSelectionModel()._clearSelection(); +/* // Clear the old selections in the data model dm._clearSelections(); @@ -385,6 +386,7 @@ { this.setState(node.nodeId, { bSelected : true }); } +*/ } // Re-render the row data since formerly visible rows may now be invisible,
svn commit: samba r21249 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse: .
Author: idra Date: 2007-02-08 21:26:44 + (Thu, 08 Feb 2007) New Revision: 21249 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21249 Log: Now the ldif is generated correctly, but still rpc is not happy Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js Changeset: Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js === --- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js 2007-02-08 21:02:42 UTC (rev 21248) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js 2007-02-08 21:26:44 UTC (rev 21249) @@ -328,11 +328,13 @@ } var ldif = # Add operation\n; - ldif = ldif + dn: + this._rdn + , + this._basedn + \n; + ldif = ldif + dn: + this._rdn.getValue() + , + this._basedn.getValue() + \n; - for (var c in this._attrArea.getChildren()) { -if (c instanceof qx.ui.layout.HorizontalBoxLayout) { - ldif = ldif + c.getUserData(attrName) + : + c.getUserData(attrVal).getValue() + \n; + c = this._attrArea.getChildren(); + + for (var i = 0; i c.length; i++) { +if (c[i] instanceof qx.ui.layout.HorizontalBoxLayout) { + ldif = ldif + c[i].getUserData(attrName) + : + c[i].getUserData(attrVal).getComputedValue() + \n; } } // terminate ldif record
svn commit: samba r21250 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/lib SAMBA_3_0/source/smbd SAMBA_3_0_25/source/include SAMBA_3_0_25/source/lib SAMBA_3_0_25/source/smbd
Author: jerry Date: 2007-02-08 21:48:09 + (Thu, 08 Feb 2007) New Revision: 21250 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21250 Log: Partial fix for BUG 4093: Make %a expand to Vista based on the flags2 values in the negprot request. This also includes some code for testing the dialect strings for SMB 2.001 but this is unreliable as Vista only sends that in the 1st negprot and caches the fact that we don't support it. Restartnig the WOrkstation service on the client clears the cache. Modified: branches/SAMBA_3_0/source/include/smb.h branches/SAMBA_3_0/source/lib/util.c branches/SAMBA_3_0/source/smbd/negprot.c branches/SAMBA_3_0_25/source/include/smb.h branches/SAMBA_3_0_25/source/lib/util.c branches/SAMBA_3_0_25/source/smbd/negprot.c Changeset: Modified: branches/SAMBA_3_0/source/include/smb.h === --- branches/SAMBA_3_0/source/include/smb.h 2007-02-08 21:26:44 UTC (rev 21249) +++ branches/SAMBA_3_0/source/include/smb.h 2007-02-08 21:48:09 UTC (rev 21250) @@ -1469,6 +1469,7 @@ #define FLAGS2_LONG_PATH_COMPONENTS0x0001 #define FLAGS2_EXTENDED_ATTRIBUTES 0x0002 #define FLAGS2_SMB_SECURITY_SIGNATURES 0x0004 +#define FLAGS2_UNKNOWN_BIT40x0010 #define FLAGS2_IS_LONG_NAME0x0040 #define FLAGS2_EXTENDED_SECURITY 0x0800 #define FLAGS2_DFS_PATHNAMES 0x1000 @@ -1532,7 +1533,8 @@ /* Remote architectures we know about. */ enum remote_arch_types {RA_UNKNOWN, RA_WFWG, RA_OS2, RA_WIN95, RA_WINNT, - RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_SAMBA, RA_CIFSFS}; + RA_WIN2K, RA_WINXP, RA_WIN2K3, RA_VISTA, + RA_SAMBA, RA_CIFSFS}; /* case handling */ enum case_handling {CASE_LOWER,CASE_UPPER}; Modified: branches/SAMBA_3_0/source/lib/util.c === --- branches/SAMBA_3_0/source/lib/util.c2007-02-08 21:26:44 UTC (rev 21249) +++ branches/SAMBA_3_0/source/lib/util.c2007-02-08 21:48:09 UTC (rev 21250) @@ -2173,6 +2173,9 @@ case RA_WIN2K3: fstrcpy(remote_arch, Win2K3); break; + case RA_VISTA: + fstrcpy(remote_arch, Vista); + break; case RA_SAMBA: fstrcpy(remote_arch,Samba); break; Modified: branches/SAMBA_3_0/source/smbd/negprot.c === --- branches/SAMBA_3_0/source/smbd/negprot.c2007-02-08 21:26:44 UTC (rev 21249) +++ branches/SAMBA_3_0/source/smbd/negprot.c2007-02-08 21:48:09 UTC (rev 21250) @@ -252,6 +252,16 @@ global_encrypted_passwords_negotiated = lp_encrypted_passwords(); + /* Check the flags field to see if this is Vista. + WinXP sets it and Vista does not. But we have to + distinguish from NT which doesn't set it either. */ + + if ( (SVAL(inbuf, smb_flg2) FLAGS2_EXTENDED_SECURITY) + ((SVAL(inbuf, smb_flg2) FLAGS2_UNKNOWN_BIT4) == 0) ) + { + set_remote_arch( RA_VISTA ); + } + /* do spnego in user level security if the client supports it and we can do encrypted passwords */ @@ -388,6 +398,15 @@ protocol [LANMAN2.1] protocol [NT LM 0.12] +Vista: +protocol [PC NETWORK PROGRAM 1.0] +protocol [LANMAN1.0] +protocol [Windows for Workgroups 3.1a] +protocol [LM1.2X002] +protocol [LANMAN2.1] +protocol [NT LM 0.12] +protocol [SMB 2.001] + OS/2: protocol [PC NETWORK PROGRAM 1.0] protocol [XENIX CORE] @@ -401,18 +420,19 @@ * * This appears to be the matrix of which protocol is used by which * MS product. - Protocol WfWgWin95 WinNT Win2K OS/2 - PC NETWORK PROGRAM 1.0 1 1 1 1 1 + Protocol WfWgWin95 WinNT Win2K OS/2 Vista + PC NETWORK PROGRAM 1.0 1 1 1 1 1 1 XENIX CORE 2 2 MICROSOFT NETWORKS 3.0 2 2 DOS LM1.2X002 3 3 MICROSOFT NETWORKS 1.03 3 DOS LANMAN2.1 4 4 - LANMAN1.0 4 2 3 - Windows for Workgroups 3.1a 5 5 5 3 - LM1.2X002 6 4 4 - LANMAN2.1 7 5 5 - NT LM 0.12 6 8 6 + LANMAN1.0 4 2 3 2 + Windows for Workgroups 3.1a 5 5 5 33 + LM1.2X002 6 4 4 4 +
svn commit: samba r21251 - in branches: SAMBA_3_0/source/smbd SAMBA_3_0_25/source/smbd
Author: vlendec Date: 2007-02-08 21:57:41 + (Thu, 08 Feb 2007) New Revision: 21251 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21251 Log: Okay, after Jeremy has kindly tested this, check it in :-) Attached find a workaround that works for me. This is not the correct fix, to me it seems our DFS referral marshalling is broken. Vista requests level 4, we reply with level 2, and Vista seems not to like that. If we reply with level 3 it seems more happy. Needs more work! Volker 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-08 21:48:09 UTC (rev 21250) +++ branches/SAMBA_3_0/source/smbd/msdfs.c 2007-02-08 21:57:41 UTC (rev 21251) @@ -865,9 +865,13 @@ /* create the referral depeding on version */ DEBUG(10,(max_referral_level :%d\n,max_referral_level)); - if(max_referral_level2 || max_referral_level3) { + + if (max_referral_level 2) { max_referral_level = 2; } + if (max_referral_level 3) { + max_referral_level = 3; + } switch(max_referral_level) { case 2: Modified: branches/SAMBA_3_0_25/source/smbd/msdfs.c === --- branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-02-08 21:48:09 UTC (rev 21250) +++ branches/SAMBA_3_0_25/source/smbd/msdfs.c 2007-02-08 21:57:41 UTC (rev 21251) @@ -865,9 +865,13 @@ /* create the referral depeding on version */ DEBUG(10,(max_referral_level :%d\n,max_referral_level)); - if(max_referral_level2 || max_referral_level3) { + + if (max_referral_level 2) { max_referral_level = 2; } + if (max_referral_level 3) { + max_referral_level = 3; + } switch(max_referral_level) { case 2:
Rev 54: merged ctdb messaging code from samba4 in http://samba.org/~tridge/ctdb
revno: 54 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-02-09 09:42:04 +1100 message: merged ctdb messaging code from samba4 added: common/ctdb_message.c ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1 modified: Makefile.inmakefile.in-20061117234101-o3qt14umlg9en8z0-1 common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2 common/ctdb_call.c ctdb_call.c-20061128065342-to93h6eejj5kon81-1 include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11 include/ctdb_private.h ctdb_private.h-20061117234101-o3qt14umlg9en8z0-13 Diff too large for email (243, the limit is 200).
Rev 11394: Add some tests for the wireshark conformance file reader. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11394 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:42:57 +0100 message: Add some tests for the wireshark conformance file reader. added: source/pidl/tests/wireshark-conf.pl wiresharkconf.pl-20070208154028-socda2mp78zkog3t-1 modified: source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm svn-v2:[EMAIL PROTECTED] === added file 'source/pidl/tests/wireshark-conf.pl' --- a/source/pidl/tests/wireshark-conf.pl 1970-01-01 00:00:00 + +++ b/source/pidl/tests/wireshark-conf.pl 2007-02-08 15:42:57 + @@ -0,0 +1,57 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij [EMAIL PROTECTED] +# Published under the GNU General Public License +# test parsing wireshark conformance files +use strict; +use warnings; + +use Test::More tests = 17; +use FindBin qw($RealBin); +use lib $RealBin; +use Util; +use Parse::Pidl::Util qw(MyDumper); +use Parse::Pidl::Wireshark::Conformance qw(ReadConformanceFH); + +sub parse_conf($) +{ + my $str = shift; +open(TMP, +, undef) or die(unable to open temp file); + print TMP $str; + seek(TMP, 0, 0); + my $data = {}; + ReadConformanceFH(*TMP, $data, nofile) or return undef; + close(TMP); + return $data; +} + +ok(parse_conf(\n), undef); +ok(parse_conf( \n), undef); +ok(parse_conf(CODE START\nCODE END\n)); +test_warnings(nofile:1: Expecting CODE END\n, sub { is(parse_conf(CODE START\n), undef); }); +ok(parse_conf(#foobar\n), undef); +test_warnings(nofile:1: Unknown command `foobar'\n, + sub { ok(parse_conf(foobar\n), undef); }); + +test_warnings(nofile:1: incomplete HF_RENAME command\n, + sub { parse_conf(HF_RENAME\n); }); + + +is_deeply(parse_conf(HF_RENAME foo bar\n)-{hf_renames}-{foo}, + { OLDNAME = foo, NEWNAME = bar, POS = {FILE = nofile, LINE = 1}, USED = 0}); + +is_deeply(parse_conf(NOEMIT\n), { noemit_dissector = 1 }); +is_deeply(parse_conf(NOEMIT foo\n), { noemit = { foo = 1 } }); + +test_warnings(nofile:1: incomplete MANUAL command\n, + sub { parse_conf(MANUAL\n); } ); + +is_deeply(parse_conf(MANUAL foo\n), { manual = {foo = 1}}); + +test_warnings(nofile:1: incomplete FIELD_DESCRIPTION command\n, + sub { parse_conf(FIELD_DESCRIPTION foo\n); }); + +is_deeply(parse_conf(FIELD_DESCRIPTION foo \my description\\n), + { fielddescription = { foo = { DESCRIPTION = \my description\, POS = { FILE = nofile, LINE = 1}, USED = 0 }}}); + +is_deeply(parse_conf(FIELD_DESCRIPTION foo my description\n), + { fielddescription = { foo = { DESCRIPTION = my, POS = { FILE = nofile, LINE = 1}, USED = 0 }}}); === modified file 'source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm' --- a/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm 2007-01-03 15:34:01 + +++ b/source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm 2007-02-08 15:42:57 + @@ -96,7 +96,7 @@ $VERSION = '0.01'; @ISA = qw(Exporter); [EMAIL PROTECTED] = qw(ReadConformance); [EMAIL PROTECTED] = qw(ReadConformance ReadConformanceFH); use strict; @@ -157,7 +157,7 @@ my ($pos,$data,$old,$new) = @_; unless(defined($new)) { - error($pos, incomplete HF_RENAME command); + warning($pos, incomplete HF_RENAME command); return; } @@ -253,6 +253,11 @@ { my ($pos,$data,$fn) = @_; + unless(defined($fn)) { + warning($pos, incomplete MANUAL command); + return; + } + $data-{manual}-{$fn} = 1; } @@ -271,6 +276,11 @@ { my ($pos,$data,$field,$desc) = @_; + unless(defined($desc)) { + warning($pos, incomplete FIELD_DESCRIPTION command); + return; + } + $data-{fielddescription}-{$field} = { DESCRIPTION = $desc, POS = $pos, @@ -314,16 +324,26 @@ sub ReadConformance($$) { my ($f,$data) = @_; - - $data-{override} = ; + my $ret; + + open(IN,$f) or return undef; + + $ret = ReadConformanceFH(*IN, $data, $f); + + close(IN); + + return $ret; +} + +sub ReadConformanceFH($$$) +{ + my ($fh,$data,$f) = @_; my $incodeblock = 0; - open(IN,$f) or return undef; - my $ln = 0; - foreach (IN) { + foreach ($fh) { $ln++; next if (/^#.*$/); next if (/^$/); @@ -337,7 +357,11 @@ $incodeblock = 0; next; } elsif ($incodeblock) { - $data-{override}.=$_\n; + if (exists $data-{override}) { + $data-{override}.=$_\n; + } else { +
Rev 11384: Properly warn when trying to use not fully dereferenced variables in size_is(), length_is(), etc. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11384 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:00:42 +0100 message: Properly warn when trying to use not fully dereferenced variables in size_is(), length_is(), etc. modified: source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 12:35:46 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 13:00:42 + @@ -326,7 +326,6 @@ return($expandedvar) unless (defined($var)); my $e; - # lookup ptr in $e foreach (@{$element-{PARENT}-{ELEMENTS}}) { if ($_-{NAME} eq $var) { $e = $_; @@ -341,10 +340,10 @@ my $nump = 0; foreach (@{$e-{LEVELS}}) { if ($_-{TYPE} eq POINTER) { - $nump = $_-{POINTER_INDEX}; + $nump = $_-{POINTER_INDEX}+1; } } - warning($element-{ORIGINAL}, Got pointer, expected fully derefenced variable) if ($nump length($ptr)); + warning($element-{ORIGINAL}, Got pointer for `$e-{NAME}', expected fully derefenced variable) if ($nump length($ptr)); return ($expandedvar); } }
Rev 11396: Merge from main pidl-fixes branch. in file:///home/jelmer/bzr.samba/inout/
At file:///home/jelmer/bzr.samba/inout/ revno: 11396 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: inout timestamp: Thu 2007-02-08 15:20:05 +0100 message: Merge from main pidl-fixes branch. revno: 11392.1.1 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 15:17:06 +0100 message: Add some more tests, reduce number of locations where absolute variable names are used.
Rev 11395: Remove some debug statements. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11395 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:43:41 +0100 message: Remove some debug statements. modified: source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/lib/Parse/Pidl/Util.pm' --- a/source/pidl/lib/Parse/Pidl/Util.pm2007-02-07 19:03:19 + +++ b/source/pidl/lib/Parse/Pidl/Util.pm2007-02-08 15:43:41 + @@ -15,9 +15,31 @@ use Parse::Pidl::Expr; use Parse::Pidl qw(error); -# -# a dumper wrapper to prevent dependence on the Data::Dumper module -# unless we actually need it +=head1 NAME + +Parse::Pidl::Util - Generic utility functions for pidl + +=head1 SYNOPSIS + +use Parse::Pidl::Util; + +=head1 DESCRIPTION + +Simple module that contains a couple of trivial helper functions +used throughout the various pidl modules. + +=head1 FUNCTIONS + +=over 4 + +=cut + +=item BMyDumper +a dumper wrapper to prevent dependence on the Data::Dumper module +unless we actually need it + +=cut + sub MyDumper($) { require Data::Dumper; @@ -25,8 +47,10 @@ return Data::Dumper::Dumper($s); } -# -# see if a pidl property list contains a given property +=item Bhas_property +see if a pidl property list contains a given property + +=cut sub has_property($$) { my($e, $p) = @_; @@ -36,8 +60,10 @@ return $e-{PROPERTIES}-{$p}; } -# -# see if a pidl property matches a value +=item Bproperty_matches +see if a pidl property matches a value + +=cut sub property_matches($$$) { my($e,$p,$v) = @_; @@ -53,16 +79,22 @@ return undef; } -# return 1 if the string is a C constant +=item Bis_constant +return 1 if the string is a C constant + +=cut sub is_constant($) { my $s = shift; - return 1 if (defined $s $s =~ /^\d+$/); - return 1 if (defined $s $s =~ /^0x[0-9A-Fa-f]+$/); + return 1 if ($s =~ /^\d+$/); + return 1 if ($s =~ /^0x[0-9A-Fa-f]+$/); return 0; } -# return a quoted string, unless already quoted +=item Bmake_str +return a quoted string, unless already quoted + +=cut sub make_str($) { my $str = shift; @@ -72,6 +104,10 @@ return \$str\; } +=item Bprint_uuid +Print C representation of a UUID. + +=cut sub print_uuid($) { my ($uuid) = @_; @@ -87,12 +123,14 @@ {.join(',', map {0x$_} @node).}}; } +=item BParseExpr +Interpret an IDL expression, substituting particular variables. + +=cut sub ParseExpr($$$) { my($expr, $varlist, $e) = @_; - die(Undefined value in ParseExpr) if not defined($expr); - my $x = new Parse::Pidl::Expr(); return $x-Run($expr, sub { my $x = shift; error($e, $x); }, @@ -104,12 +142,15 @@ undef, undef); } +=item BParseExprExt +Interpret an IDL expression, substituting particular variables. Can call +callbacks when pointers are being dereferenced or variables are being used. + +=cut sub ParseExprExt($) { my($expr, $varlist, $e, $deref, $use) = @_; - die(Undefined value in ParseExpr) if not defined($expr); - my $x = new Parse::Pidl::Expr(); return $x-Run($expr, sub { my $x = shift; error($e, $x); }, @@ -121,4 +162,8 @@ $deref, $use); } +=back + +=cut + 1;
Rev 11389: remove failing test for now. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11389 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:38:03 +0100 message: remove failing test for now. modified: source/pidl/tests/ndr_represent.pl svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/tests/ndr_represent.pl' --- a/source/pidl/tests/ndr_represent.pl2007-02-07 17:57:47 + +++ b/source/pidl/tests/ndr_represent.pl2007-02-07 18:38:03 + @@ -3,7 +3,7 @@ # (C) 2006 Jelmer Vernooij. Published under the GNU GPL use strict; -use Test::More tests = 3 * 8; +use Test::More tests = 2 * 8; use FindBin qw($RealBin); use lib $RealBin; use Util qw(test_samba4_ndr); @@ -74,41 +74,3 @@ ' ); -test_samba4_ndr('represent_as-custom-type', -' - void bla([in,represent_as(mytype)] uint8 x); -', -' - uint8_t expected[] = { 0x0D }; - DATA_BLOB in_blob = { expected, 1 }; - struct ndr_pull *ndr = ndr_pull_init_blob(in_blob, NULL); - struct bla r; - - if (NT_STATUS_IS_ERR(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, r))) - return 1; - - if (r.in.x.header != 42) - return 2; - - if (r.in.x.data != 13) - return 3; -', -' -#include libcli/util/nterr.h - -NTSTATUS ndr_uint8_to_mytype(uint8_t from, struct mytype *to) -{ - to-header = 42; - to-data = from; - return NT_STATUS_OK; -} - -NTSTATUS ndr_uint32_to_uint8(struct mytype from, uint8_t *to) -{ - *to = from-data; - return NT_STATUS_OK; -} -' -); - -
Rev 11391: Add some tests for the header code. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11391 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 11:42:00 +0100 message: Add some tests for the header code. added: source/pidl/tests/header.plheader.pl-20070208094205-onb80lvoyh5ciw5r-1 modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/Header.pm svn-v2:[EMAIL PROTECTED] === added file 'source/pidl/tests/header.pl' --- a/source/pidl/tests/header.pl 1970-01-01 00:00:00 + +++ b/source/pidl/tests/header.pl 2007-02-08 10:42:00 + @@ -0,0 +1,36 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij [EMAIL PROTECTED] +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests = 8; +use FindBin qw($RealBin); +use lib $RealBin; +use Util; +use Parse::Pidl::Util qw(MyDumper); +use Parse::Pidl::Samba4::Header; +use Parse::Pidl::IDL qw(parse_string); + +sub parse_idl($) +{ + my $text = shift; + my $idl = Parse::Pidl::IDL::parse_string($text, nofile); + return Parse::Pidl::Samba4::Header::Parse($idl); +} + +is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(), includes work); +is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(interface x {}), simple empty interface doesn't cause overhead); +like(parse_idl(interface p { typedef struct { int y; } x; };), + qr/.*#ifndef _HEADER_p\n#define _HEADER_p\n.+\n#endif \/\* _HEADER_p \*\/.*/ms, ifdefs are created); +like(parse_idl(interface p { typedef struct { int y; } x; };), + qr/struct x.*{.*int32_t y;.*}.*;/sm, interface member generated properly); +like(parse_idl(interface x { void foo (void); };), + qr/struct foo.*{\s+int _dummy_element;\s+};/sm, void fn contains dummy element); +like(parse_idl(interface x { void foo ([in] uint32 x); };), + qr/struct foo.*{\s+struct\s+{\s+uint32_t x;\s+} in;\s+};/sm, fn in arg works); +like(parse_idl(interface x { void foo ([out] uint32 x); };), + qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn out arg works); +like(parse_idl(interface x { void foo ([in,out] uint32 x); };), + qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn in,out arg works); +#like(parse_idl(interface x { void foo (uint32 x); };), qr/struct foo.*{.*struct\s+{\s+uint32_t x;\s+} in;\s+struct\s+{\s+uint32_t x;\s+} out;.*};/sm, fn with no props implies in,out); === modified file 'source/pidl/TODO' --- a/source/pidl/TODO 2007-02-07 19:03:19 + +++ b/source/pidl/TODO 2007-02-08 10:42:00 + @@ -21,3 +21,8 @@ - mem_ctx in the interface rather than as struct ndr member. - real typelibs + +- fix [in,out] handling and allocation for samba3: + - add inout + - make NULL to mean allocate me + - remove NDR_AUTO_REF_ALLOC flag === modified file 'source/pidl/lib/Parse/Pidl/Samba4/Header.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-01-22 00:04:59 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/Header.pm 2007-02-08 10:42:00 + @@ -9,7 +9,6 @@ use strict; use Parse::Pidl::Typelist qw(mapType); use Parse::Pidl::Util qw(has_property is_constant); -use Parse::Pidl::NDR qw(GetNextLevel GetPrevLevel); use Parse::Pidl::Samba4 qw(is_intree); use vars qw($VERSION);
Rev 11397: 3 more tests. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11397 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 17:05:10 +0100 message: 3 more tests. modified: source/pidl/tests/wireshark-conf.pl wiresharkconf.pl-20070208154028-socda2mp78zkog3t-1 === modified file 'source/pidl/tests/wireshark-conf.pl' --- a/source/pidl/tests/wireshark-conf.pl 2007-02-08 15:42:57 + +++ b/source/pidl/tests/wireshark-conf.pl 2007-02-08 16:05:10 + @@ -5,7 +5,7 @@ use strict; use warnings; -use Test::More tests = 17; +use Test::More tests = 20; use FindBin qw($RealBin); use lib $RealBin; use Util; @@ -55,3 +55,8 @@ is_deeply(parse_conf(FIELD_DESCRIPTION foo my description\n), { fielddescription = { foo = { DESCRIPTION = my, POS = { FILE = nofile, LINE = 1}, USED = 0 }}}); + +is_deeply(parse_conf(CODE START\ndata\nCODE END\n), { override = data\n }); +is_deeply(parse_conf(CODE START\ndata\nmore data\nCODE END\n), { override = data\nmore data\n }); +test_warnings(nofile:1: Unknown command `CODE'\n, + sub { parse_conf(CODE END\n); } );
Rev 11164: Remove the registry gconf module. in file:///home/jelmer/bzr.samba/4.0-regwrite/
At file:///home/jelmer/bzr.samba/4.0-regwrite/ revno: 11164 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-regwrite timestamp: Thu 2007-02-08 17:19:20 +0100 message: Remove the registry gconf module. Abstraction is nice and support for more things is also nice, but the current form of the registry library has a bit too much of it. The gconf module was a nice proof-of-concept, but it doesn't really have a use, nor can it be used sanely (can only work one way, as gconf requires schemas and doesn't have a blob data type). It also has bitrotted a bit since it has to be enabled manually. removed: source/lib/registry/config.m4 svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_backend_gconf.c svn-v2:[EMAIL PROTECTED] renamed: source/lib/registry/reg_backend_rpc.c = source/lib/registry/rpc.c svn-v2:[EMAIL PROTECTED] modified: source/configure.acsvn-v2:[EMAIL PROTECTED] source/lib/registry/config.mk svn-v2:[EMAIL PROTECTED] source/lib/registry/registry.h svn-v2:[EMAIL PROTECTED] source/lib/registry/rpc.c svn-v2:[EMAIL PROTECTED] === removed file 'source/lib/registry/config.m4' --- a/source/lib/registry/config.m4 2006-04-26 12:22:54 + +++ b/source/lib/registry/config.m4 1970-01-01 00:00:00 + @@ -1,12 +0,0 @@ -# Registry backends -SMB_ENABLE(registry_gconf, NO) - -SMB_EXT_LIB_FROM_PKGCONFIG(gconf, gconf-2.0) - -AC_ARG_ENABLE(reg-gconf, -[ --enable-reg-gconf Enable support for GConf registry backend], -[ - if test t$enable = tyes; then - SMB_ENABLE(registry_gconf, $SMB_ENABLE_gconf) - fi -]) === removed file 'source/lib/registry/reg_backend_gconf.c' --- a/source/lib/registry/reg_backend_gconf.c 2005-02-10 06:45:13 + +++ b/source/lib/registry/reg_backend_gconf.c 1970-01-01 00:00:00 + @@ -1,197 +0,0 @@ -/* - Unix SMB/CIFS implementation. - Registry interface - Copyright (C) Jelmer Vernooij 2004. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -*/ - -#include includes.h -#include registry.h -#include gconf/gconf-client.h - -static WERROR gerror_to_werror(GError *error) -{ - if(error == NULL) return WERR_OK; - /* FIXME */ - return WERR_FOOBAR; -} - -static WERROR reg_open_gconf_hive(struct registry_hive *h, struct registry_key **k) -{ - g_type_init(); - h-backend_data = (void *)gconf_client_get_default(); - if(!h-backend_data) return WERR_FOOBAR; - - *k = talloc(h, struct registry_key); - (*k)-name = talloc_strdup(*k, ); - (*k)-path = talloc_strdup(*k, ); - (*k)-backend_data = talloc_strdup(*k, /); - return WERR_OK; -} - -static WERROR gconf_open_key (TALLOC_CTX *mem_ctx, struct registry_key *h, const char *name, struct registry_key **key) -{ - struct registry_key *ret; - char *fullpath; - - fullpath = talloc_asprintf(mem_ctx, %s%s%s, - (char *)h-backend_data, - strlen((char *)h-backend_data) == 1?:/, - reg_path_win2unix(talloc_strdup(mem_ctx, name))); - - /* Check if key exists */ - if(!gconf_client_dir_exists((GConfClient *)h-hive-backend_data, fullpath, NULL)) { - return WERR_DEST_NOT_FOUND; - } - - ret = talloc(mem_ctx, struct registry_key); - ret-backend_data = fullpath; - - *key = ret; - return WERR_OK; -} - -static WERROR gconf_get_value_by_id(TALLOC_CTX *mem_ctx, struct registry_key *p, int idx, struct registry_value **val) -{ - GSList *entries; - GSList *cur; - GConfEntry *entry; - GConfValue *value; - struct registry_value *newval; - char *fullpath = p-backend_data; - const char *tmp; - int i; - cur = entries = gconf_client_all_entries((GConfClient*)p-hive-backend_data, fullpath, NULL); - - for(i = 0; i idx cur; i++) cur = cur-next; - - if(!cur) return WERR_NO_MORE_ITEMS; - - entry = cur-data; - value = gconf_entry_get_value(entry); - -
Rev 11162: Move testsuite to library. in file:///home/jelmer/bzr.samba/4.0-regwrite/
At file:///home/jelmer/bzr.samba/4.0-regwrite/ revno: 11162 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-regwrite timestamp: Wed 2007-02-07 16:18:08 +0100 message: Move testsuite to library. added: source/lib/registry/tests/ tests-20070207151550-vf2a1yfjqtb1plkv-1 renamed: source/torture/local/registry.c = source/lib/registry/tests/generic.c svn-v2:[EMAIL PROTECTED] modified: source/torture/local/config.mk svn-v2:[EMAIL PROTECTED] === added directory 'source/lib/registry/tests' === renamed file 'source/torture/local/registry.c' = 'source/lib/registry/tests/generic.c' === modified file 'source/torture/local/config.mk' --- a/source/torture/local/config.mk2007-01-23 00:39:12 + +++ b/source/torture/local/config.mk2007-02-07 15:18:08 + @@ -20,7 +20,7 @@ idtree.o \ socket.o \ irpc.o \ - registry.o \ + ../../lib/registry/tests/registry.o \ resolve.o \ util_strlist.o \ util_file.o \
Rev 11385: Fix small regression. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11385 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:06:31 +0100 message: Fix small regression. modified: source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 13:00:42 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 13:06:31 + @@ -309,10 +309,11 @@ my ($element, $env) = @_; return sub ($) { - my $expandedvar = shift; + my $origvar = shift; my $check = 0; # Figure out the number of pointers in $ptr + my $expandedvar = $origvar; $expandedvar =~ s/^(\**)//; my $ptr = $1; @@ -324,7 +325,7 @@ } } - return($expandedvar) unless (defined($var)); + return($origvar) unless (defined($var)); my $e; foreach (@{$element-{PARENT}-{ELEMENTS}}) { if ($_-{NAME} eq $var) { @@ -344,7 +345,7 @@ } } warning($element-{ORIGINAL}, Got pointer for `$e-{NAME}', expected fully derefenced variable) if ($nump length($ptr)); - return ($expandedvar); + return ($origvar); } }
Rev 11389: Merge a couple of pidl fixes: in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11389 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:53:03 +0100 message: 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. removed: source/pidl/ref_notes.txt svn-v2:[EMAIL PROTECTED] added: source/pidl/tests/ndr_deprecations.pl ndr_deprecations.pl-20070207141838-38btwf0hx7cwmnhp-1 modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/expr.ypsvn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Expr.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/pidl svn-v2:[EMAIL PROTECTED] source/pidl/tests/ndr_represent.pl* svn-v2:[EMAIL PROTECTED] source/pidl/tests/util.pl svn-v2:[EMAIL PROTECTED] source/torture/smbtorture.csvn-v2:[EMAIL PROTECTED] source/torture/torture.c svn-v2:[EMAIL PROTECTED] revno: 11381.1.8 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:38:03 +0100 message: remove failing test for now. revno: 11381.1.7 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:00:39 +0100 message: Remove known failures file parameters - it's no longer used anyway. revno: 11381.1.6 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:57:47 +0100 message: Deprecate subcontext(). revno: 11381.1.5 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:55:11 +0100 message: Remove tridges refnotes.txt - it is now part of the pidl testsuite. revno: 11381.1.4 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:06:31 +0100 message: Fix small regression. revno: 11381.1.3 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:00:42 +0100 message: Properly warn when trying to use not fully dereferenced variables in size_is(), length_is(), etc. revno: 11381.1.2 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 13:35:46 +0100 message: Fix some corner cases that broke after my previous commits. revno: 11381.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 12:26:50 +0100 message: Support function to be called when a variable is being used in arithmetic. Diff too large for email (2599 lines, the limit is 1000).
Rev 11393: Add some more tests, reduce number of locations where absolute variable in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11393 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 15:17:06 +0100 message: Add some more tests, reduce number of locations where absolute variable names are used. modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/TODO' --- a/source/pidl/TODO 2007-02-08 10:42:00 + +++ b/source/pidl/TODO 2007-02-08 14:17:06 + @@ -26,3 +26,5 @@ - add inout - make NULL to mean allocate me - remove NDR_AUTO_REF_ALLOC flag + +- automatic test generator based on IDL pointer types === modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-07 19:03:19 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-08 14:17:06 + @@ -10,7 +10,7 @@ require Exporter; @ISA = qw(Exporter); @EXPORT = qw(is_charset_array); [EMAIL PROTECTED] = qw(check_null_pointer); [EMAIL PROTECTED] = qw(check_null_pointer GenerateFunctionInEnv GenerateFunctionOutEnv); use strict; use Parse::Pidl::Typelist qw(hasType getType mapType); @@ -451,7 +451,9 @@ if ($l-{IS_VARYING} and not $l-{IS_ZERO_TERMINATED}) { defer if ($var_name) {; defer_indent; - my $length = ParseExprExt($l-{LENGTH_IS}, $env, $e-{ORIGINAL}, check_null_pointer($e, $env, \defer, return NT_STATUS_INVALID_PARAMETER_MIX;), check_fully_dereferenced($e, $env)); + my $length = ParseExprExt($l-{LENGTH_IS}, $env, $e-{ORIGINAL}, + check_null_pointer($e, $env, \defer, return NT_STATUS_INVALID_PARAMETER_MIX;), + check_fully_dereferenced($e, $env)); defer NDR_CHECK(ndr_check_array_length(ndr, (void*) . get_pointer_to($var_name) . , $length));; defer_deindent; defer } @@ -689,12 +691,12 @@ # # parse scalars in a structure element -sub ParseElementPush($$) +sub ParseElementPush($) { - my ($e,$ndr,$var_prefix,$env,$primitives,$deferred) = @_; + my ($e,$ndr,$env,$primitives,$deferred) = @_; my $subndr = undef; - my $var_name = $var_prefix.$e-{NAME}; + my $var_name = $env-{$e-{NAME}}; return unless $primitives or ($deferred and ContainsDeferred($e, $e-{LEVELS}[0])); @@ -1096,11 +1098,11 @@ # # parse scalars in a structure element - pull size -sub ParseElementPull($$) +sub ParseElementPull($) { - my($e,$ndr,$var_prefix,$env,$primitives,$deferred) = @_; + my($e,$ndr,$env,$primitives,$deferred) = @_; - my $var_name = $var_prefix.$e-{NAME}; + my $var_name = $env-{$e-{NAME}}; my $represent_name; my $transmit_name; @@ -1247,7 +1249,7 @@ } foreach my $e (@{$struct-{ELEMENTS}}) { - ParseElementPush($e, ndr, r-, $env, 1, 0); + ParseElementPush($e, ndr, $env, 1, 0); } deindent; @@ -1261,7 +1263,7 @@ pidl NDR_CHECK(ndr_push_setup_relative_base_offset2(ndr, r));; } foreach my $e (@{$struct-{ELEMENTS}}) { - ParseElementPush($e, ndr, r-, $env, 0, 1); + ParseElementPush($e, ndr, $env, 0, 1); } deindent; @@ -1547,7 +1549,7 @@ } foreach my $e (@{$struct-{ELEMENTS}}) { - ParseElementPull($e, ndr, r-, $env, 1, 0); + ParseElementPull($e, ndr, $env, 1, 0); } add_deferred(); @@ -1562,7 +1564,7 @@ pidl NDR_CHECK(ndr_pull_setup_relative_base_offset2(ndr, r));; } foreach my $e (@{$struct-{ELEMENTS}}) { - ParseElementPull($e, ndr, r-, $env, 0, 1); + ParseElementPull($e, ndr, $env, 0, 1); } add_deferred(); @@ -1662,7 +1664,7 @@ pidl NDR_CHECK(ndr_push_setup_relative_base_offset1(ndr, r, ndr-offset));; } DeclareArrayVariables($el); - ParseElementPush($el, ndr, r-, {}, 1, 0); + ParseElementPush($el, ndr, {$el-{NAME} = r-$el-{NAME}}, 1, 0); deindent; } pidl break;; @@ -1689,7 +1691,7 @@ pidl $el-{CASE}:; if ($el-{TYPE} ne EMPTY) { indent; - ParseElementPush($el, ndr, r-, {}, 0, 1); + ParseElementPush($el, ndr, {$el-{NAME} = r-$el-{NAME}}, 0,
Rev 11390: Merge a couple of pidl fixes: in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11390 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:57:18 +0100 message: 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. removed: source/pidl/ref_notes.txt svn-v2:[EMAIL PROTECTED] added: source/pidl/tests/ndr_deprecations.pl ndr_deprecations.pl-20070207141838-38btwf0hx7cwmnhp-1 modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/expr.ypsvn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Expr.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/pidl svn-v2:[EMAIL PROTECTED] source/pidl/tests/ndr_represent.pl* svn-v2:[EMAIL PROTECTED] source/pidl/tests/util.pl svn-v2:[EMAIL PROTECTED] source/torture/smbtorture.csvn-v2:[EMAIL PROTECTED] source/torture/torture.c svn-v2:[EMAIL PROTECTED] revno: 11381.1.8 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:38:03 +0100 message: remove failing test for now. revno: 11381.1.7 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:00:39 +0100 message: Remove known failures file parameters - it's no longer used anyway. revno: 11381.1.6 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:57:47 +0100 message: Deprecate subcontext(). revno: 11381.1.5 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:55:11 +0100 message: Remove tridges refnotes.txt - it is now part of the pidl testsuite. revno: 11381.1.4 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:06:31 +0100 message: Fix small regression. revno: 11381.1.3 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 14:00:42 +0100 message: Properly warn when trying to use not fully dereferenced variables in size_is(), length_is(), etc. revno: 11381.1.2 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 13:35:46 +0100 message: Fix some corner cases that broke after my previous commits. revno: 11381.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 12:26:50 +0100 message: Support function to be called when a variable is being used in arithmetic. Diff too large for email (2599 lines, the limit is 1000).
Rev 11163: Move files to a better suitable location. in file:///home/jelmer/bzr.samba/4.0-regwrite/
At file:///home/jelmer/bzr.samba/4.0-regwrite/ revno: 11163 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-regwrite timestamp: Thu 2007-02-08 16:59:04 +0100 message: Move files to a better suitable location. removed: source/lib/registry/common/svn-v2:[EMAIL PROTECTED] renamed: source/lib/registry/common/reg_interface.c = source/lib/registry/interface.c svn-v2:[EMAIL PROTECTED] source/lib/registry/common/reg_util.c = source/lib/registry/util.c svn-v2:[EMAIL PROTECTED] modified: source/lib/registry/config.mk svn-v2:[EMAIL PROTECTED] source/lib/registry/registry.h svn-v2:[EMAIL PROTECTED] source/lib/registry/tests/generic.c svn-v2:[EMAIL PROTECTED] source/torture/local/config.mk svn-v2:[EMAIL PROTECTED] source/lib/registry/interface.c svn-v2:[EMAIL PROTECTED] === removed directory 'source/lib/registry/common' === renamed file 'source/lib/registry/common/reg_interface.c' = 'source/lib/registry/interface.c' --- a/source/lib/registry/common/reg_interface.c2006-08-30 11:29:34 + +++ b/source/lib/registry/interface.c 2007-02-08 15:59:04 + @@ -157,7 +157,11 @@ } /** Open a registry file/host/etc */ -_PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, const char *location, struct auth_session_info *session_info, struct cli_credentials *credentials, struct registry_key **root) +_PUBLIC_ WERROR reg_open_hive(TALLOC_CTX *parent_ctx, const char *backend, + const char *location, + struct auth_session_info *session_info, + struct cli_credentials *credentials, + struct registry_key **root) { struct registry_hive *rethive; struct registry_key *retkey = NULL; @@ -209,7 +213,8 @@ * First tries to use the open_key function from the backend * then falls back to get_subkey_by_name and later get_subkey_by_index */ -_PUBLIC_ WERROR reg_open_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, const char *name, struct registry_key **result) +_PUBLIC_ WERROR reg_open_key(TALLOC_CTX *mem_ctx, struct registry_key *parent, +const char *name, struct registry_key **result) { WERROR error; @@ -263,7 +268,9 @@ /** * Get value by index */ -_PUBLIC_ WERROR reg_key_get_value_by_index(TALLOC_CTX *mem_ctx, const struct registry_key *key, int idx, struct registry_value **val) +_PUBLIC_ WERROR reg_key_get_value_by_index(TALLOC_CTX *mem_ctx, + const struct registry_key *key, + int idx, struct registry_value **val) { if(!key) return WERR_INVALID_PARAM; @@ -281,7 +288,8 @@ /** * Get the number of subkeys. */ -_PUBLIC_ WERROR reg_key_num_subkeys(const struct registry_key *key, uint32_t *count) +_PUBLIC_ WERROR reg_key_num_subkeys(const struct registry_key *key, + uint32_t *count) { if(!key) return WERR_INVALID_PARAM; @@ -309,9 +317,9 @@ /** * Get the number of values of a key. */ -_PUBLIC_ WERROR reg_key_num_values(const struct registry_key *key, uint32_t *count) +_PUBLIC_ WERROR reg_key_num_values(const struct registry_key *key, + uint32_t *count) { - if(!key) return WERR_INVALID_PARAM; if (key-hive-functions-num_values) { @@ -397,7 +405,10 @@ /** * Get value by name. */ -_PUBLIC_ WERROR reg_key_get_value_by_name(TALLOC_CTX *mem_ctx, const struct registry_key *key, const char *name, struct registry_value **val) +_PUBLIC_ WERROR reg_key_get_value_by_name(TALLOC_CTX *mem_ctx, + const struct registry_key *key, + const char *name, + struct registry_value **val) { int i; WERROR error = WERR_OK; === renamed file 'source/lib/registry/common/reg_util.c' = 'source/lib/registry/util.c' === modified file 'source/lib/registry/config.mk' --- a/source/lib/registry/config.mk 2007-01-14 04:19:40 + +++ b/source/lib/registry/config.mk 2007-02-08 15:59:04 + @@ -1,5 +1,4 @@ # Registry backends - # Start MODULE registry_regf [MODULE::registry_regf] @@ -93,8 +92,8 @@ SO_VERSION = 0 DESCRIPTION = Windows-style registry library OBJ_FILES = \
Rev 11383: Fix some corner cases that broke after my previous commits. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11383 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 13:35:46 +0100 message: Fix some corner cases that broke after my previous commits. modified: source/pidl/expr.ypsvn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Expr.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/util.pl svn-v2:[EMAIL PROTECTED] Diff too large for email (1540 lines, the limit is 1000).
Rev 11387: Remove tridge's refnotes - pidls' conformance to them is tested in ref_notes.txt. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11387 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 15:23:43 +0100 message: Remove tridge's refnotes - pidls' conformance to them is tested in ref_notes.txt. removed: source/pidl/ref_notes.txt svn-v2:[EMAIL PROTECTED] === removed file 'source/pidl/ref_notes.txt' --- a/source/pidl/ref_notes.txt 2005-08-21 23:17:35 + +++ b/source/pidl/ref_notes.txt 1970-01-01 00:00:00 + @@ -1,220 +0,0 @@ -some experiments with ref ptrs - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - typedef struct { - short *x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [PP PP PP PP 0D 00] - - - xstruct r; - r.x = NULL; - echo_TestRef(r); - - [00 00 00 00] - - - typedef struct { - [ref] short *x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [XX XX XX XX 0D 00] - - - xstruct r; - r.x = NULL; - echo_TestRef(r); - - [client runtime error 0x6f4] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in,ref] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in,unique] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [PP PP PP PP 0D 00] - - - echo_TestRef(NULL); - - [00 00 00 00] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([out] xstruct foo); - -[idl compiler error] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out] xstruct *foo); - - xstruct r; - echo_TestRef(r); - r.x - 13; - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out,ref] xstruct *foo); - - xstruct r; - echo_TestRef(r); - r.x - 13; - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out,unique] xstruct *foo); - -[idl compiler error] - - - - void echo_TestRef([in] short **foo); - - short v = 13; - short *pv = v; - - echo_TestRef(pv); - - [PP PP PP PP 0D 00] - - - short *pv = NULL; - - echo_TestRef(pv); - - [00 00 00 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - - void echo_TestRef([in,ref] short **foo); - - short v = 13; - short *pv = v; - - echo_TestRef(pv); - - [PP PP PP PP 0D 00] - - - short *pv = NULL; - - echo_TestRef(pv); - - [00 00 00 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - -
Rev 11165: More simplifications for the registry subsystem: in file:///home/jelmer/bzr.samba/4.0-regwrite/
At file:///home/jelmer/bzr.samba/4.0-regwrite/ revno: 11165 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-regwrite timestamp: Thu 2007-02-08 18:18:35 +0100 message: More simplifications for the registry subsystem: * Shorten file names * Get rid of the registration mechanism. Instead, add reg_open_file() which autodetects file formats. * Get rid of reg_hive struct renamed: source/lib/registry/reg_backend_dir.c = source/lib/registry/dir.c svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_backend_ldb.c = source/lib/registry/ldb.c svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_backend_regf.c = source/lib/registry/regf.c svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_backend_w95.c = source/lib/registry/creg.c svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_backend_wine.c = source/lib/registry/wine.c svn-v2:[EMAIL PROTECTED] modified: source/lib/registry/config.mk svn-v2:[EMAIL PROTECTED] source/lib/registry/interface.c svn-v2:[EMAIL PROTECTED] source/lib/registry/reg_samba.c svn-v2:[EMAIL PROTECTED] source/lib/registry/registry.h svn-v2:[EMAIL PROTECTED] source/lib/registry/rpc.c svn-v2:[EMAIL PROTECTED] source/lib/registry/dir.c svn-v2:[EMAIL PROTECTED] source/lib/registry/ldb.c svn-v2:[EMAIL PROTECTED] source/lib/registry/regf.c svn-v2:[EMAIL PROTECTED] source/lib/registry/creg.c svn-v2:[EMAIL PROTECTED] source/lib/registry/wine.c svn-v2:[EMAIL PROTECTED] === renamed file 'source/lib/registry/reg_backend_dir.c' = 'source/lib/registry/dir.c' --- a/source/lib/registry/reg_backend_dir.c 2006-10-18 21:37:37 + +++ b/source/lib/registry/dir.c 2007-02-08 17:18:35 + @@ -118,25 +118,19 @@ return WERR_NO_MORE_ITEMS; } -static WERROR reg_dir_open(struct registry_hive *h, struct registry_key **key) +WERROR reg_open_directory(const char *location, struct registry_key **key) { if(!h-location) return WERR_INVALID_PARAM; *key = talloc(h, struct registry_key); - (*key)-backend_data = talloc_strdup(*key, h-location); + (*key)-backend_data = talloc_strdup(*key, location); return WERR_OK; } static struct hive_operations reg_backend_dir = { .name = dir, - .open_hive = reg_dir_open, .open_key = reg_dir_open_key, .add_key = reg_dir_add_key, .del_key = reg_dir_del_key, .get_subkey_by_index = reg_dir_key_by_index }; - -NTSTATUS registry_dir_init(void) -{ - return registry_register(reg_backend_dir); -} === renamed file 'source/lib/registry/reg_backend_ldb.c' = 'source/lib/registry/ldb.c' --- a/source/lib/registry/reg_backend_ldb.c 2006-11-22 02:05:19 + +++ b/source/lib/registry/ldb.c 2007-02-08 17:18:35 + @@ -261,17 +261,21 @@ return WERR_OK; } -static WERROR ldb_open_hive(struct registry_hive *hive, struct registry_key **k) +WERROR reg_open_ldb_file(const char *location, + struct auth_session_info *session_info, + struct cli_credentials *credentials, + struct registry_key **k) { struct ldb_key_data *kd; struct ldb_context *wrap; - if (!hive-location) return WERR_INVALID_PARAM; + if (!location) + return WERR_INVALID_PARAM; - wrap = ldb_wrap_connect(hive, hive-location, hive-session_info, hive-credentials, 0, NULL); + wrap = ldb_wrap_connect(hive, location, session_info, credentials, 0, NULL); if(!wrap) { - DEBUG(1, (ldb_open_hive: unable to connect\n)); + DEBUG(1, (__FILE__: unable to connect\n)); return WERR_FOOBAR; } @@ -284,7 +288,6 @@ (*k)-name = talloc_strdup(*k, ); (*k)-backend_data = kd = talloc_zero(*k, struct ldb_key_data); kd-dn = ldb_dn_new(*k, wrap, hive=NONE); - return WERR_OK; } @@ -392,15 +395,9 @@ .name = ldb, .add_key = ldb_add_key, .del_key = ldb_del_key, - .open_hive = ldb_open_hive, .open_key = ldb_open_key, .get_value_by_index = ldb_get_value_by_id, .get_subkey_by_index = ldb_get_subkey_by_id, .set_value = ldb_set_value, .del_value = ldb_del_value, }; - -NTSTATUS registry_ldb_init(void) -{ - return registry_register(reg_backend_ldb); -} === renamed file 'source/lib/registry/reg_backend_regf.c' = 'source/lib/registry/regf.c' --- a/source/lib/registry/reg_backend_regf.c2007-01-24 13:19:46 + +++ b/source/lib/registry/regf.c2007-02-08 17:18:35 + @@ -31,7 +31,6 @@ * - Locking */ -static WERROR regf_save_hbin(struct registry_hive *hive); /* * Read HBIN blocks into memory */ @@ -42,9 +41,12 @@
Rev 11382: Support function to be called when a variable is being used in arithmetic. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11382 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 12:26:50 +0100 message: Support function to be called when a variable is being used in arithmetic. modified: source/pidl/expr.ypsvn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Expr.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/util.pl svn-v2:[EMAIL PROTECTED] Diff too large for email (2015 lines, the limit is 1000).
Rev 11388: Remove known failures file parameters - it's no longer used anyway. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11388 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 19:00:39 +0100 message: Remove known failures file parameters - it's no longer used anyway. modified: source/torture/smbtorture.csvn-v2:[EMAIL PROTECTED] source/torture/torture.c svn-v2:[EMAIL PROTECTED] === modified file 'source/torture/smbtorture.c' --- a/source/torture/smbtorture.c 2007-01-30 12:10:42 + +++ b/source/torture/smbtorture.c 2007-02-07 18:00:39 + @@ -583,10 +583,8 @@ if (strcmp(target, samba3) == 0) { lp_set_cmdline(torture:samba3, true); - lp_set_cmdline(torture:knownfail, samba3-knownfail); } else if (strcmp(target, samba4) == 0) { lp_set_cmdline(torture:samba4, true); - lp_set_cmdline(torture:knownfail, samba4-knownfail); } if (max_runtime) { @@ -662,8 +660,7 @@ exit(1); } - torture = torture_context_init(talloc_autofree_context(), - lp_parm_string(-1, torture, knownfail), ui_ops); + torture = torture_context_init(talloc_autofree_context(), ui_ops); if (argc_new == 0) { printf(You must specify a test to run, or 'ALL'\n); === modified file 'source/torture/torture.c' --- a/source/torture/torture.c 2007-01-31 00:30:52 + +++ b/source/torture/torture.c 2007-02-07 18:00:39 + @@ -42,7 +42,6 @@ } struct torture_context *torture_context_init(TALLOC_CTX *mem_ctx, - const char *known_failures_file, const struct torture_ui_ops *ui_ops) { struct torture_context *torture = talloc_zero(mem_ctx,
Rev 11387: Deprecate subcontext(). in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11387 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:57:47 +0100 message: Deprecate subcontext(). added: source/pidl/tests/ndr_deprecations.pl ndr_deprecations.pl-20070207141838-38btwf0hx7cwmnhp-1 modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/pidl svn-v2:[EMAIL PROTECTED] source/pidl/tests/ndr_represent.pl* svn-v2:[EMAIL PROTECTED] === added file 'source/pidl/tests/ndr_deprecations.pl' --- a/source/pidl/tests/ndr_deprecations.pl 1970-01-01 00:00:00 + +++ b/source/pidl/tests/ndr_deprecations.pl 2007-02-07 17:57:47 + @@ -0,0 +1,28 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij [EMAIL PROTECTED] +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests = 1; +use FindBin qw($RealBin); +use lib $RealBin; +use Util; +use Parse::Pidl::Util qw(MyDumper); +use Parse::Pidl::NDR qw(ValidElement); + +# Case 1 + +my $e = { + 'FILE' = 'foo.idl', + 'NAME' = 'v', + 'PROPERTIES' = {subcontext = 1}, + 'POINTERS' = 0, + 'TYPE' = 'uint8', + 'PARENT' = { TYPE = 'STRUCT' }, + 'LINE' = 42 }; + +test_warnings(foo.idl:42: subcontext() is deprecated. Use represent_as() or transmit_as() instead\n, + sub { ValidElement($e); }); + + === modified file 'source/pidl/TODO' --- a/source/pidl/TODO 2006-09-15 20:07:55 + +++ b/source/pidl/TODO 2007-02-07 17:57:47 + @@ -1,8 +1,6 @@ - EJS output backend shouldn't use the NDR levels stuff but instead as the C levels and NDR levels don't necessarily match. -- warn about [out] attributes on pointers (midl/samba3 compatibility) - - true multiple dimension array / strings in arrays support - compatibility mode for generating MIDL-readable data: @@ -21,3 +19,5 @@ - allow data structures outside of interfaces - mem_ctx in the interface rather than as struct ndr member. + +- real typelibs === modified file 'source/pidl/lib/Parse/Pidl/NDR.pm' --- a/source/pidl/lib/Parse/Pidl/NDR.pm 2007-01-09 15:50:36 + +++ b/source/pidl/lib/Parse/Pidl/NDR.pm 2007-02-07 17:57:47 + @@ -35,7 +35,7 @@ $VERSION = '0.01'; @ISA = qw(Exporter); @EXPORT = qw(GetPrevLevel GetNextLevel ContainsDeferred ContainsString); [EMAIL PROTECTED] = qw(GetElementLevelTable ParseElement); [EMAIL PROTECTED] = qw(GetElementLevelTable ParseElement ValidElement); use strict; use Parse::Pidl qw(warning fatal); @@ -902,7 +902,6 @@ } } - if (has_property($e, subcontext) and has_property($e, represent_as)) { fatal($e, el_name($e) . : subcontext() and represent_as() can not be used on the same element); } @@ -919,6 +918,10 @@ fatal($e, el_name($e) . : represent_as() and value() can not be used on the same element); } + if (has_property($e, subcontext)) { + warning($e, subcontext() is deprecated. Use represent_as() or transmit_as() instead); + } + if (defined (has_property($e, subcontext_size)) and not defined(has_property($e, subcontext))) { fatal($e, el_name($e) . : subcontext_size() on non-subcontext element); } === modified file 'source/pidl/pidl' --- a/source/pidl/pidl 2007-01-22 00:04:59 + +++ b/source/pidl/pidl 2007-02-07 17:57:47 + @@ -4,7 +4,7 @@ # package to parse IDL files and generate code for # rpc functions in Samba # Copyright [EMAIL PROTECTED] 2000-2003 -# Copyright [EMAIL PROTECTED] 2005 +# Copyright [EMAIL PROTECTED] 2005-2007 # released under the GNU GPL =pod @@ -319,6 +319,9 @@ bytes should be read, followed by a blob of that size, which will be parsed as NDR. +subcontext() is deprecated now, and should not be used in new code. +Instead, use represent_as() or transmit_as(). + =item flag Specify boolean options, mostly used for === modified file 'source/pidl/tests/ndr_represent.pl' (properties changed) --- a/source/pidl/tests/ndr_represent.pl2007-01-05 15:03:21 + +++ b/source/pidl/tests/ndr_represent.pl2007-02-07 17:57:47 + @@ -3,7 +3,7 @@ # (C) 2006 Jelmer Vernooij. Published under the GNU GPL use strict; -use Test::More tests = 1 * 8; +use Test::More tests = 3 * 8; use FindBin qw($RealBin); use lib $RealBin; use Util qw(test_samba4_ndr); @@ -40,3 +40,75 @@ } ' ); + +test_samba4_ndr('transmit_as-simple', +' + void bla([in,transmit_as(uint32)] uint8 x); +', +' + uint8_t expected[] = { 0x0D }; + DATA_BLOB in_blob = { expected, 1 }; + struct ndr_pull *ndr = ndr_pull_init_blob(in_blob, NULL); + struct bla r; + + if (NT_STATUS_IS_ERR(ndr_pull_bla(ndr, NDR_SCALARS|NDR_BUFFERS, r))) + return 1;
Rev 55: ignore config.h* in http://samba.org/~tridge/ctdb
revno: 55 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-02-09 09:47:53 +1100 message: ignore config.h* modified: .bzrignore bzrignore-20061117235536-slq8jlz2b5161dfm-1 === modified file '.bzrignore' --- a/.bzrignore2006-11-29 14:45:14 + +++ b/.bzrignore2007-02-08 22:47:53 + @@ -8,3 +8,5 @@ config.cache configure configure +config.h +config.h.in
Rev 56: merged ib work from peter in http://samba.org/~tridge/ctdb
revno: 56 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-02-09 09:54:21 +1100 message: merged ib work from peter added: ib/ibw_ctdb.c ibw_ctdb.c-20070102171255-7krov7858dqza466-1 ib/ibw_ctdb.h ibw_ctdb.h-20070102171259-nmuvtzt98aqzg7xp-1 ib/ibw_ctdb_init.c ibw_ctdb_init.c-20070102171305-cn2z4k7ibx8141d5-1 modified: .bzrignore bzrignore-20061117235536-slq8jlz2b5161dfm-1 ib/config.m4 config.m4-20061215145907-559hmz134o0rplnk-1 ib/ibwrapper.c ibwrapper.c-20061204130028-0125b4f5a72f4b11 ib/ibwrapper.h ibwrapper.h-20061204130028-32755c6266dd3c49 ib/ibwrapper_internal.h ibwrapper_internal.h-20061204130028-47f0a7e658b16ca2 include/includes.h includes.h-20061117234101-o3qt14umlg9en8z0-17 tests/ibwrapper_test.c ibwrapper_test.c-20061214171730-h11a2z5ed6pt66hj-1 revno: 44.1.18 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-02-08 19:08:58 +0100 message: merged tridge's code revno: 44.1.17 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-02-08 19:06:14 +0100 message: ib: fragment sent buf + many bugfixes It came to light I have to fragment the send buffer in case destination's to fit receiver's buffers. Additionally fixed many bugs. Still testing. + TODO: clean code. revno: 44.1.16 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Fri 2007-02-02 18:54:57 +0100 message: Added variable msg size scenario. Detected 1 bug, fixing... revno: 44.1.15 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-02-01 18:46:44 +0100 message: 2 bugfixes - ibw_stop handling - ibw_send: instead of = revno: 44.1.14 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Wed 2007-01-31 12:24:55 +0100 message: merging tridge's code... revno: 44.1.13 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Tue 2007-01-30 18:47:26 +0100 message: Added overload test scenario + fixed 1 send queue bug. TODO: externize debug level revno: 44.1.12 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Fri 2007-01-26 16:45:51 +0100 message: Adjusted debug level and test scenario. revno: 44.1.11 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-01-25 18:57:47 +0100 message: Adjusted ib test tool #1. Now fixed number of pingpong messages can be sent and then exit. revno: 44.1.10 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-01-25 14:22:03 +0100 message: Fixed a side effect of previous revert. revno: 44.1.9 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-01-25 12:31:33 +0100 message: Merged tridge's branch. Reverted ib join (will do later). revno: 44.1.8 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Peter Somogyi [EMAIL PROTECTED] branch nick: ctdb timestamp: Thu 2007-01-25 11:01:59 +0100 message: 1st
Rev 11386: Remove tridges refnotes.txt - it is now part of the pidl testsuite. in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11386 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Wed 2007-02-07 18:55:11 +0100 message: Remove tridges refnotes.txt - it is now part of the pidl testsuite. removed: source/pidl/ref_notes.txt svn-v2:[EMAIL PROTECTED] === removed file 'source/pidl/ref_notes.txt' --- a/source/pidl/ref_notes.txt 2005-08-21 23:17:35 + +++ b/source/pidl/ref_notes.txt 1970-01-01 00:00:00 + @@ -1,220 +0,0 @@ -some experiments with ref ptrs - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - typedef struct { - short *x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [PP PP PP PP 0D 00] - - - xstruct r; - r.x = NULL; - echo_TestRef(r); - - [00 00 00 00] - - - typedef struct { - [ref] short *x; - } xstruct; - - uint16 echo_TestRef([in] xstruct foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [XX XX XX XX 0D 00] - - - xstruct r; - r.x = NULL; - echo_TestRef(r); - - [client runtime error 0x6f4] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in,ref] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([in,unique] xstruct *foo); - - short v = 13; - xstruct r; - r.x = v; - echo_TestRef(r); - - [PP PP PP PP 0D 00] - - - echo_TestRef(NULL); - - [00 00 00 00] - - - - typedef struct { - short x; - } xstruct; - - uint16 echo_TestRef([out] xstruct foo); - -[idl compiler error] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out] xstruct *foo); - - xstruct r; - echo_TestRef(r); - r.x - 13; - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out,ref] xstruct *foo); - - xstruct r; - echo_TestRef(r); - r.x - 13; - - [0D 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - typedef struct { - short x; - } xstruct; - - void echo_TestRef([out,unique] xstruct *foo); - -[idl compiler error] - - - - void echo_TestRef([in] short **foo); - - short v = 13; - short *pv = v; - - echo_TestRef(pv); - - [PP PP PP PP 0D 00] - - - short *pv = NULL; - - echo_TestRef(pv); - - [00 00 00 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - - - - void echo_TestRef([in,ref] short **foo); - - short v = 13; - short *pv = v; - - echo_TestRef(pv); - - [PP PP PP PP 0D 00] - - - short *pv = NULL; - - echo_TestRef(pv); - - [00 00 00 00] - - - echo_TestRef(NULL); - - [client runtime error 0x6f4] - -
Rev 11395: More work on supporting inout. in file:///home/jelmer/bzr.samba/pidl-fixes/
At file:///home/jelmer/bzr.samba/pidl-fixes/ revno: 11395 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 15:06:56 +0100 message: More work on supporting inout. modified: source/lib/registry/reg_backend_rpc.c svn-v2:[EMAIL PROTECTED] source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED] webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/translation/C.po svn-v2:[EMAIL PROTECTED] === modified file 'source/lib/registry/reg_backend_rpc.c' --- a/source/lib/registry/reg_backend_rpc.c 2006-09-15 18:34:03 + +++ b/source/lib/registry/reg_backend_rpc.c 2007-02-08 14:06:56 + @@ -187,12 +187,11 @@ r.in.handle = mykeydata-pol; r.in.enum_index = n; - r.in.name = name; - r.in.type = type; - r.in.value = u8; - r.in.length = zero; - r.in.size = len1; - r.out.name = name; + r.inout.name = name; + r.inout.type = type; + r.inout.value = u8; + r.inout.length = zero; + r.inout.size = len1; status = dcerpc_winreg_EnumValue((struct dcerpc_pipe *)parent-hive-backend_data, mem_ctx, r); if(NT_STATUS_IS_ERR(status)) { @@ -201,11 +200,11 @@ } if(NT_STATUS_IS_OK(status) - W_ERROR_IS_OK(r.out.result) r.out.length) { + W_ERROR_IS_OK(r.out.result) r.inout.length) { *value = talloc(mem_ctx, struct registry_value); - (*value)-name = talloc_strdup(mem_ctx, r.out.name-name); + (*value)-name = talloc_strdup(mem_ctx, r.inout.name-name); (*value)-data_type = type; - (*value)-data = data_blob_talloc(mem_ctx, r.out.value, *r.out.length); + (*value)-data = data_blob_talloc(mem_ctx, r.inout.value, *r.inout.length); return WERR_OK; } @@ -229,14 +228,13 @@ r.in.handle = mykeydata-pol; r.in.enum_index = n; - r.in.name = namebuf; - r.in.keyclass = classbuf; - r.in.last_changed_time = change_time; - r.out.name = namebuf; + r.inout.name = namebuf; + r.inout.keyclass = classbuf; + r.inout.last_changed_time = change_time; status = dcerpc_winreg_EnumKey((struct dcerpc_pipe *)parent-hive-backend_data, mem_ctx, r); if(NT_STATUS_IS_OK(status) W_ERROR_IS_OK(r.out.result)) { - char *name = talloc_strdup(mem_ctx, r.out.name-name); + char *name = talloc_strdup(mem_ctx, r.inout.name-name); return rpc_open_key(mem_ctx, parent, name, subkey); } === modified file 'source/pidl/TODO' --- a/source/pidl/TODO 2007-02-08 10:42:00 + +++ b/source/pidl/TODO 2007-02-08 14:06:56 + @@ -26,3 +26,5 @@ - add inout - make NULL to mean allocate me - remove NDR_AUTO_REF_ALLOC flag + +- automatic test generator based on IDL pointer types === modified file 'source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm' --- a/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-08 12:28:37 + +++ b/source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm 2007-02-08 14:06:56 + @@ -265,11 +265,13 @@ my %env; foreach my $e (@{$fn-{ELEMENTS}}) { - next unless (grep (/out/, @{$e-{DIRECTION}})); - if (grep (/in/, @{$e-{DIRECTION}})) { + if (grep (/out/, @{$e-{DIRECTION}}) and + grep (/in/, @{$e-{DIRECTION}})) { $env{$e-{NAME}} = r-inout.$e-{NAME}; - } else { + } elsif (grep (/out/, @{$e-{DIRECTION}})) { $env{$e-{NAME}} = r-out.$e-{NAME}; + } elsif (grep (/in/, @{$e-{DIRECTION}})) { + $env{$e-{NAME}} = r-in.$e-{NAME}; } } @@ -455,7 +457,9 @@ if ($l-{IS_VARYING} and not $l-{IS_ZERO_TERMINATED}) { defer if ($var_name) {; defer_indent; - my $length = ParseExprExt($l-{LENGTH_IS}, $env, $e-{ORIGINAL}, check_null_pointer($e, $env, \defer, return NT_STATUS_INVALID_PARAMETER_MIX;), check_fully_dereferenced($e, $env)); + my $length = ParseExprExt($l-{LENGTH_IS}, $env, $e-{ORIGINAL}, + check_null_pointer($e, $env, \defer, return NT_STATUS_INVALID_PARAMETER_MIX;), + check_fully_dereferenced($e, $env)); defer NDR_CHECK(ndr_check_array_length(ndr, (void*) . get_pointer_to($var_name) . , $length));; defer_deindent; defer } @@ -693,12 +697,12 @@ # # parse scalars in a structure element -sub ParseElementPush($$) +sub
svn commit: samba r21252 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse: .
Author: idra Date: 2007-02-08 23:19:31 + (Thu, 08 Feb 2007) New Revision: 21252 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21252 Log: Add operation works now, still to do mod and del ops Need to implement tree refresh as well Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js Changeset: Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js === --- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js 2007-02-08 21:57:41 UTC (rev 21251) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js 2007-02-08 23:19:31 UTC (rev 21252) @@ -198,7 +198,7 @@ var request = _this.callRpc(fsm, samba.ldb, ldbmod.getOpType(), - [ ldif ]); + [ dbHandle, ldif ]); // When we get the result, we'll need to know what type of request // we made. Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js === --- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js 2007-02-08 21:57:41 UTC (rev 21251) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/ldbbrowse/Gui.js 2007-02-08 23:19:31 UTC (rev 21252) @@ -137,7 +137,11 @@ case search: this._displaySearchResults(module, rpcRequest); break; - + + case add: +this._displayCommitResults(module, rpcRequest, add); +break; + case tree_open: this._displayTreeOpenResults(module, rpcRequest); break; @@ -380,6 +384,15 @@ // Add the button to the hlayout hlayout.add(this._modb); + + hlayout.add(new qx.ui.basic.HorizontalSpacer()); + + // Add the Delete button + this._delb = new qx.ui.form.Button(Delete); + this._delb.addEventListener(execute, this._confirmDeleteRecord, this); + + // Add the button to the hlayout + hlayout.add(this._delb); // Add the hlayout to the vlayout. vlayout.add(hlayout); @@ -440,7 +453,8 @@ this._ldbmod.setDisplay(false); this._newb.setEnabled(true); this._modb.setEnabled(true); -} + this._delb.setEnabled(true); +}; qx.Proto._switchToNewrecord = function() { @@ -448,8 +462,9 @@ this._ldbmod.setDisplay(true); this._newb.setEnabled(false); this._modb.setEnabled(false); + this._delb.setEnabled(false); this._ldbmod.initNew(this._switchToNormal, this); -} +}; qx.Proto._switchToModrecord = function() { @@ -457,9 +472,84 @@ this._ldbmod.setDisplay(true); this._newb.setEnabled(false); this._modb.setEnabled(false); + this._delb.setEnabled(false); this._ldbmod.initMod(this._table.getTableModel(), this._switchToNormal, this); -} +}; +qx.Proto._confirmDeleteRecord = function() +{ + + var main = qx.ui.core.ClientDocument.getInstance(); + + if (this._dmw == null) { + +this._dmw = new qx.ui.window.Window(New Attribute Name); +this._dmw.set({ + width: 200, + height: 100, + modal: true, + centered: true, + restrictToPageOnOpen: true, + showMinimize: false, + showMaximize: false, + showClose: false, + resizeable: false +}); + +var warningLabel = new qx.ui.basic.Label(Are you sure you want to delete record name here ?); +this._dmw.add(warningLabel); + +var cancelButton = new qx.ui.form.Button(Cancel); +cancelButton.addEventListener(execute, function() { + this._dmw.close(); +}, this); +cancelButton.set({ top: 45, left: 32 }); +this._dmw.add(cancelButton); + +this._dmw.addEventListener(appear,function() { + cancelButton.focus(); +}, this._dmw); + +main.add(this._dmw); +var okButton = new qx.ui.form.Button(OK); +okButton.addEventListener(execute, function() { + //TODO: call search.addEventListener(execute, fsm.eventListener, fsm); + + this._dmw.close(); +}, this); +okButton.set({ top: 45, right: 32 }); +this._dmw.add(okButton); + +main.add(this._dmw); + } + + this._dmw.open(); +}; + +qx.Proto._displayCommitResults = function(module, rpcRequest, type) +{ + var result = rpcRequest.getUserData(result); + + switch (type) { + case add: +alert(Object successfully added!); +break; + + case modify: +alert(Object successfully modified!); +break; + + case delete: +alert(Object Successfully deleted!); +break; + } + + this._switchToNormal(); + + //TODO: reload tree after add or delete + +}; + qx.Proto._displaySearchResults = function(module, rpcRequest) { var fsm = module.fsm; Modified:
Rev 11404: Merge some pidl fixes: in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11404 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 00:46:39 +0100 message: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] added: source/pidl/tests/header.plheader.pl-20070208094205-onb80lvoyh5ciw5r-1 source/pidl/tests/wireshark-conf.pl wiresharkconf.pl-20070208154028-socda2mp78zkog3t-1 modified: source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/Header.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED] revno: 11390.1.7 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 17:05:10 +0100 message: 3 more tests. revno: 11390.1.6 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:45:47 +0100 message: Allow cmd to be undefined. revno: 11390.1.5 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:43:41 +0100 message: Remove some debug statements. revno: 11390.1.4 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:42:57 +0100 message: Add some tests for the wireshark conformance file reader. revno: 11390.1.3 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 15:17:06 +0100 message: Add some more tests, reduce number of locations where absolute variable names are used. revno: 11390.1.2 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 12:25:19 +0100 message: Fix handling of elements without [in,out] revno: 11390.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 11:42:00 +0100 message: Add some tests for the header code. === added file 'source/pidl/tests/header.pl' --- a/source/pidl/tests/header.pl 1970-01-01 00:00:00 + +++ b/source/pidl/tests/header.pl 2007-02-08 11:25:19 + @@ -0,0 +1,36 @@ +#!/usr/bin/perl +# (C) 2007 Jelmer Vernooij [EMAIL PROTECTED] +# Published under the GNU General Public License +use strict; +use warnings; + +use Test::More tests = 9; +use FindBin qw($RealBin); +use lib $RealBin; +use Util; +use Parse::Pidl::Util qw(MyDumper); +use Parse::Pidl::Samba4::Header; +use Parse::Pidl::IDL qw(parse_string); + +sub parse_idl($) +{ + my $text = shift; + my $idl = Parse::Pidl::IDL::parse_string($text, nofile); + return Parse::Pidl::Samba4::Header::Parse($idl); +} + +is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(), includes work); +is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(interface x {}), simple empty interface doesn't cause overhead); +like(parse_idl(interface p { typedef struct { int y; } x; };), + qr/.*#ifndef _HEADER_p\n#define _HEADER_p\n.+\n#endif \/\* _HEADER_p \*\/.*/ms, ifdefs are created); +like(parse_idl(interface p { typedef struct { int y; } x; };), + qr/struct x.*{.*int32_t y;.*}.*;/sm, interface member generated properly); +like(parse_idl(interface x { void foo (void); };), + qr/struct foo.*{\s+int _dummy_element;\s+};/sm, void fn contains dummy element); +like(parse_idl(interface x { void foo ([in] uint32 x); };), + qr/struct foo.*{\s+struct\s+{\s+uint32_t
svn commit: samba r21253 - in branches/SAMBA_4_0: . source/pidl source/pidl/lib/Parse/Pidl source/pidl/lib/Parse/Pidl/Samba4 source/pidl/lib/Parse/Pidl/Samba4/NDR source/pidl/lib/Parse/Pidl/Wireshark
Author: jelmer Date: 2007-02-08 23:54:31 + (Thu, 08 Feb 2007) New Revision: 21253 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21253 Log: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] Added: branches/SAMBA_4_0/source/pidl/tests/header.pl branches/SAMBA_4_0/source/pidl/tests/wireshark-conf.pl Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/pidl/TODO branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/Header.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/lib/Parse/Pidl/Wireshark/Conformance.pm branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm branches/SAMBA_4_0/source/pidl/tests/samba-ndr.pl Changeset: Sorry, the patch is too large (822 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21253
Build status as of Fri Feb 9 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-02-08 00:00:45.0 + +++ /home/build/master/cache/broken_results.txt 2007-02-09 00:00:27.0 + @@ -1,10 +1,10 @@ -Build status as of Thu Feb 8 00:00:02 2007 +Build status as of Fri Feb 9 00:00:02 2007 Build counts: Tree Total Broken Panic SOC 0 0 0 build_farm 0 0 0 -ccache 31 6 0 +ccache 32 6 0 ctdb 0 0 0 distcc 2 0 0 ldb 31 3 0 @@ -14,8 +14,8 @@ rsync32 5 0 samba0 0 0 samba-docs 0 0 0 -samba4 36 24 0 -samba_3_038 12 0 +samba4 36 23 0 +samba_3_038 11 0 smb-build30 2 0 talloc 32 0 0 tdb 31 2 0
Rev 11405: Fix running the testsuite outside pidl/ in file:///home/jelmer/bzr.samba/SAMBA_4_0/
At file:///home/jelmer/bzr.samba/SAMBA_4_0/ revno: 11405 revision-id: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 01:11:54 +0100 message: Fix running the testsuite outside pidl/ modified: source/pidl/tests/header.plsvn-v2:[EMAIL PROTECTED] === modified file 'source/pidl/tests/header.pl' --- a/source/pidl/tests/header.pl 2007-02-08 23:54:31 + +++ b/source/pidl/tests/header.pl 2007-02-09 00:11:54 + @@ -19,8 +19,8 @@ return Parse::Pidl::Samba4::Header::Parse($idl); } -is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(), includes work); -is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(interface x {}), simple empty interface doesn't cause overhead); +like(parse_idl(), qr/\/\* header auto-generated by pidl \*\n\//sm, includes work); +like(parse_idl(interface x {}), qr/\/\* header auto-generated by pidl \*\/\n/sm, simple empty interface doesn't cause overhead); like(parse_idl(interface p { typedef struct { int y; } x; };), qr/.*#ifndef _HEADER_p\n#define _HEADER_p\n.+\n#endif \/\* _HEADER_p \*\/.*/ms, ifdefs are created); like(parse_idl(interface p { typedef struct { int y; } x; };),
Rev 11397: Merge pidlfixes branch. in file:///home/jelmer/bzr.samba/inout/
At file:///home/jelmer/bzr.samba/inout/ revno: 11397 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: inout timestamp: Fri 2007-02-09 01:16:15 +0100 message: Merge pidlfixes branch. removed: source/pidl/tests/header.plheader.pl-20070208094205-onb80lvoyh5ciw5r-1 added: source/cluster/ctdb/common/ctdb_message.c svn-v2:[EMAIL PROTECTED] source/pidl/tests/header.plsvn-v2:[EMAIL PROTECTED] source/pidl/tests/wireshark-conf.pl svn-v2:[EMAIL PROTECTED] modified: source/cluster/cluster.c svn-v2:[EMAIL PROTECTED] source/cluster/cluster.h svn-v2:[EMAIL PROTECTED] source/cluster/cluster_private.h svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/brlock_ctdb.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/common/ctdb.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/common/ctdb_call.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/config.mk svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/ctdb_cluster.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/include/ctdb.h svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/include/ctdb_private.h svn-v2:[EMAIL PROTECTED] source/cluster/local.c svn-v2:[EMAIL PROTECTED] source/lib/messaging/messaging.c svn-v2:[EMAIL PROTECTED] source/ntvfs/posix/pvfs_wait.c svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm svn-v2:[EMAIL PROTECTED] source/torture/rpc/dssync.csvn-v2:[EMAIL PROTECTED] webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/Gui.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js svn-v2:[EMAIL PROTECTED] revno: 11390.1.15 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 01:11:54 +0100 message: Fix running the testsuite outside pidl/ revno: 11390.1.14 merged: svn-v2:[EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: jelmer timestamp: Thu 2007-02-08 23:54:31 + message: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] revno: 11390.1.13.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 00:46:39 +0100 message: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] revno: 11392.1.5 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 17:05:10 +0100 message: 3 more tests. revno: 11392.1.4 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:45:47 +0100 message: Allow cmd to be undefined. revno: 11392.1.3 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:43:41 +0100 message: Remove some debug statements. revno: 11392.1.2 merged: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: pidl-fixes timestamp: Thu 2007-02-08 16:42:57 +0100 message: Add some tests for the wireshark conformance file reader. revno: 11390.1.13 merged:
svn commit: samba r21254 - in branches/SAMBA_4_0: . source/pidl/tests
Author: jelmer Date: 2007-02-09 00:18:06 + (Fri, 09 Feb 2007) New Revision: 21254 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21254 Log: Fix running the testsuite outside pidl/ Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/pidl/tests/header.pl Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:merge - [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] + [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Modified: branches/SAMBA_4_0/source/pidl/tests/header.pl === --- branches/SAMBA_4_0/source/pidl/tests/header.pl 2007-02-08 23:54:31 UTC (rev 21253) +++ branches/SAMBA_4_0/source/pidl/tests/header.pl 2007-02-09 00:18:06 UTC (rev 21254) @@ -19,8 +19,8 @@ return Parse::Pidl::Samba4::Header::Parse($idl); } -is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(), includes work); -is(/* header auto-generated by pidl */\n\n#include core.h\n\n, parse_idl(interface x {}), simple empty interface doesn't cause overhead); +like(parse_idl(), qr/\/\* header auto-generated by pidl \*\n\//sm, includes work); +like(parse_idl(interface x {}), qr/\/\* header auto-generated by pidl \*\/\n/sm, simple empty interface doesn't cause overhead); like(parse_idl(interface p { typedef struct { int y; } x; };), qr/.*#ifndef _HEADER_p\n#define _HEADER_p\n.+\n#endif \/\* _HEADER_p \*\/.*/ms, ifdefs are created); like(parse_idl(interface p { typedef struct { int y; } x; };),
Rev 11390: Merge from upstream. in file:///home/jelmer/bzr.samba/4.0-movetests/
At file:///home/jelmer/bzr.samba/4.0-movetests/ revno: 11390 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-movetests timestamp: Fri 2007-02-09 02:17:19 +0100 message: Merge from upstream. added: source/cluster/ctdb/common/ctdb_message.c svn-v2:[EMAIL PROTECTED] source/pidl/tests/header.plsvn-v2:[EMAIL PROTECTED] source/pidl/tests/ndr_deprecations.pl svn-v2:[EMAIL PROTECTED] source/pidl/tests/wireshark-conf.pl svn-v2:[EMAIL PROTECTED] renamed: source/pidl/tests/ndr_deprecations.pl = source/pidl/tests/ndr_deprecations.pl.moved ndr_deprecations.pl-20070207141838-38btwf0hx7cwmnhp-1 modified: source/cluster/cluster.c svn-v2:[EMAIL PROTECTED] source/cluster/cluster.h svn-v2:[EMAIL PROTECTED] source/cluster/cluster_private.h svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/brlock_ctdb.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/common/ctdb.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/common/ctdb_call.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/config.mk svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/ctdb_cluster.c svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/include/ctdb.h svn-v2:[EMAIL PROTECTED] source/cluster/ctdb/include/ctdb_private.h svn-v2:[EMAIL PROTECTED] source/cluster/local.c svn-v2:[EMAIL PROTECTED] source/lib/events/events_aio.c svn-v2:[EMAIL PROTECTED] source/lib/messaging/messaging.c svn-v2:[EMAIL PROTECTED] source/ntvfs/posix/pvfs_wait.c svn-v2:[EMAIL PROTECTED] source/ntvfs/unixuid/vfs_unixuid.c svn-v2:[EMAIL PROTECTED] source/pidl/TODO svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/Header.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Util.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm svn-v2:[EMAIL PROTECTED] source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm svn-v2:[EMAIL PROTECTED] source/pidl/pidl svn-v2:[EMAIL PROTECTED] source/pidl/tests/ndr_represent.pl svn-v2:[EMAIL PROTECTED] source/pidl/tests/samba-ndr.pl svn-v2:[EMAIL PROTECTED] source/torture/local/dbspeed.c svn-v2:[EMAIL PROTECTED] source/torture/local/event.c svn-v2:[EMAIL PROTECTED] source/torture/local/iconv.c svn-v2:[EMAIL PROTECTED] source/torture/raw/lockbench.c svn-v2:[EMAIL PROTECTED] source/torture/raw/mux.c svn-v2:[EMAIL PROTECTED] source/torture/rpc/dssync.csvn-v2:[EMAIL PROTECTED] webapps/qooxdoo-0.6.5-sdk/frontend/framework/source/class/qx/ui/treevirtual/TreeVirtual.js svn-v2:[EMAIL PROTECTED] webapps/swat/Makefile svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/Fsm.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/Gui.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/ldbbrowse/LdbModify.js svn-v2:[EMAIL PROTECTED] revno: 11381.1.24 merged: svn-v2:[EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: jelmer timestamp: Fri 2007-02-09 00:18:06 + message: Fix running the testsuite outside pidl/ revno: 11381.1.23.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 01:11:54 +0100 message: Fix running the testsuite outside pidl/ revno: 11381.1.23 merged: svn-v2:[EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: jelmer timestamp: Thu 2007-02-08 23:54:31 + message: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] revno: 11381.1.22.1.1 merged: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: SAMBA_4_0 timestamp: Fri 2007-02-09 00:46:39 +0100 message: Merge some pidl fixes: * Add tests for wireshark dissector generator * Add tests for the header code * Some cleanups * Fix handling of elements without [in] or [out] revno: 11381.1.9.1.7
svn commit: samba r21255 - in branches/SAMBA_4_0/source/libnet: .
Author: abartlet Date: 2007-02-09 01:49:26 + (Fri, 09 Feb 2007) New Revision: 21255 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21255 Log: Add a debugging option to avoid rid decryption in the samsync output. Andrew Bartlett Modified: branches/SAMBA_4_0/source/libnet/libnet_vampire.c Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_vampire.c === --- branches/SAMBA_4_0/source/libnet/libnet_vampire.c 2007-02-09 00:18:06 UTC (rev 21254) +++ branches/SAMBA_4_0/source/libnet/libnet_vampire.c 2007-02-09 01:49:26 UTC (rev 21255) @@ -50,16 +50,18 @@ const char *username = user-account_name.string; NTSTATUS nt_status; - if (user-lm_password_present) { - sam_rid_crypt(rid, user-lmpassword.hash, lm_hash.hash, 0); - user-lmpassword = lm_hash; + if (lp_parm_bool(-1, vampire, rid_decrypt, True)) { + if (user-lm_password_present) { + sam_rid_crypt(rid, user-lmpassword.hash, lm_hash.hash, 0); + user-lmpassword = lm_hash; + } + + if (user-nt_password_present) { + sam_rid_crypt(rid, user-ntpassword.hash, nt_hash.hash, 0); + user-ntpassword = nt_hash; + } } - if (user-nt_password_present) { - sam_rid_crypt(rid, user-ntpassword.hash, nt_hash.hash, 0); - user-ntpassword = nt_hash; - } - if (user-user_private_info.SensitiveData) { DATA_BLOB data; struct netr_USER_KEYS keys; @@ -72,13 +74,21 @@ nt_status = ndr_pull_struct_blob(data, mem_ctx, keys, (ndr_pull_flags_fn_t)ndr_pull_netr_USER_KEYS); if (NT_STATUS_IS_OK(nt_status)) { if (keys.keys.keys2.lmpassword.length == 16) { - sam_rid_crypt(rid, keys.keys.keys2.lmpassword.pwd.hash, lm_hash.hash, 0); - user-lmpassword = lm_hash; + if (lp_parm_bool(-1, vampire, rid decrypt, True)) { + sam_rid_crypt(rid, keys.keys.keys2.lmpassword.pwd.hash, lm_hash.hash, 0); + user-lmpassword = lm_hash; + } else { + user-lmpassword = keys.keys.keys2.lmpassword.pwd; + } user-lm_password_present = True; } if (keys.keys.keys2.ntpassword.length == 16) { - sam_rid_crypt(rid, keys.keys.keys2.ntpassword.pwd.hash, nt_hash.hash, 0); - user-ntpassword = nt_hash; + if (lp_parm_bool(-1, vampire, rid decrypt, True)) { + sam_rid_crypt(rid, keys.keys.keys2.ntpassword.pwd.hash, nt_hash.hash, 0); + user-ntpassword = nt_hash; + } else { + user-ntpassword = keys.keys.keys2.ntpassword.pwd; + } user-nt_password_present = True; } } else {
svn commit: samba r21256 - in branches/SAMBA_4_0/source: cluster cluster/ctdb cluster/ctdb/common cluster/ctdb/include lib/messaging
Author: tridge Date: 2007-02-09 01:52:13 + (Fri, 09 Feb 2007) New Revision: 21256 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21256 Log: - msg_type is not needed in the cluster messaging API - merge ctdb_get_num_nodes() from bzr tree 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/common/ctdb.c branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c branches/SAMBA_4_0/source/cluster/ctdb/include/ctdb.h 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-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/cluster.c 2007-02-09 01:52:13 UTC (rev 21256) @@ -89,8 +89,8 @@ /* send a message to another node in the cluster */ -NTSTATUS cluster_message_send(struct server_id server, uint32_t msg_type, DATA_BLOB *data) +NTSTATUS cluster_message_send(struct server_id server, DATA_BLOB *data) { cluster_init(); - return ops-message_send(ops, server, msg_type, data); + return ops-message_send(ops, server, data); } Modified: branches/SAMBA_4_0/source/cluster/cluster.h === --- branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/cluster.h 2007-02-09 01:52:13 UTC (rev 21256) @@ -44,6 +44,6 @@ 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); +NTSTATUS cluster_message_send(struct server_id server, 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-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/cluster_private.h 2007-02-09 01:52:13 UTC (rev 21256) @@ -34,8 +34,7 @@ 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); +struct server_id server, DATA_BLOB *data); void *private; /* backend state */ }; Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c === --- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c2007-02-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb.c2007-02-09 01:52:13 UTC (rev 21256) @@ -162,6 +162,15 @@ } /* + return the number of nodes +*/ +uint32_t ctdb_get_num_nodes(struct ctdb_context *ctdb) +{ + return ctdb-num_nodes; +} + + +/* start the protocol going */ int ctdb_start(struct ctdb_context *ctdb) Modified: branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c === --- branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/ctdb/common/ctdb_message.c 2007-02-09 01:52:13 UTC (rev 21256) @@ -54,7 +54,7 @@ send a ctdb message */ int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn, - uint32_t srvid, uint32_t msg_type, TDB_DATA data) + uint32_t srvid, TDB_DATA data) { struct ctdb_req_message *r; int len; Modified: branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c === --- branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-09 01:49:26 UTC (rev 21255) +++ branches/SAMBA_4_0/source/cluster/ctdb/ctdb_cluster.c 2007-02-09 01:52:13 UTC (rev 21256) @@ -159,8 +159,7 @@ send a ctdb message to another node */ static NTSTATUS ctdb_message_send(struct cluster_ops *ops, - struct server_id server, uint32_t msg_type, - DATA_BLOB *data) + struct server_id server, DATA_BLOB *data) { struct cluster_state *state = ops-private; struct ctdb_context *ctdb = state-ctdb; @@ -170,7 +169,7 @@ tdata.dptr = data-data; tdata.dsize = data-length; - ret
Rev 58: added a simple benchmark script in http://samba.org/~tridge/ctdb
revno: 58 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-02-09 12:46:16 +1100 message: added a simple benchmark script added: tests/bench.sh bench.sh-20070209014602-vdolpr6esqsa58s7-1 === added file 'tests/bench.sh' --- a/tests/bench.sh1970-01-01 00:00:00 + +++ b/tests/bench.sh2007-02-09 01:46:16 + @@ -0,0 +1,9 @@ +#!/bin/sh + +killall -q ctdb_bench + +echo Trying 2 nodes +bin/ctdb_bench --nlist nodes.txt --listen 127.0.0.2:9001 $* +bin/ctdb_bench --nlist nodes.txt --listen 127.0.0.1:9001 $* + +killall -q ctdb_bench
Rev 57: changed ctdb_bench.c to use messages instead of calls in http://samba.org/~tridge/ctdb
revno: 57 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] committer: Andrew Tridgell [EMAIL PROTECTED] branch nick: tridge timestamp: Fri 2007-02-09 12:45:58 +1100 message: changed ctdb_bench.c to use messages instead of calls modified: common/ctdb.c ctdb.c-20061127094323-t50f58d65iaao5of-2 common/ctdb_message.c ctdb_message.c-20070208224107-9dnio7x7z33prrmt-1 ctdb_bench.c ctdb_bench.c-20061219052637-2liagoglohxb6p7s-1 include/ctdb.h ctdb.h-20061117234101-o3qt14umlg9en8z0-11 === modified file 'common/ctdb.c' --- a/common/ctdb.c 2007-02-08 22:54:21 + +++ b/common/ctdb.c 2007-02-09 01:45:58 + @@ -162,6 +162,15 @@ } /* + return the number of nodes +*/ +uint32_t ctdb_get_num_nodes(struct ctdb_context *ctdb) +{ + return ctdb-num_nodes; +} + + +/* start the protocol going */ int ctdb_start(struct ctdb_context *ctdb) === modified file 'common/ctdb_message.c' --- a/common/ctdb_message.c 2007-02-08 22:42:04 + +++ b/common/ctdb_message.c 2007-02-09 01:45:58 + @@ -39,6 +39,7 @@ struct ctdb_req_message *c = (struct ctdb_req_message *)hdr; TDB_DATA data; if (ctdb-message_handler == NULL) { + printf(no msg handler\n); /* no registered message handler */ talloc_free(hdr); return; @@ -54,7 +55,7 @@ send a ctdb message */ int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn, - uint32_t srvid, uint32_t msg_type, TDB_DATA data) + uint32_t srvid, TDB_DATA data) { struct ctdb_req_message *r; int len; === modified file 'ctdb_bench.c' --- a/ctdb_bench.c 2007-01-25 05:13:17 + +++ b/ctdb_bench.c 2007-02-09 01:45:58 + @@ -122,6 +122,65 @@ num_repeats*loops/end_timer(), loops, *(uint32_t *)call.reply_data.dptr); } +static int msg_count; +static int msg_plus, msg_minus; + +/* + handler for messages in bench_ring() +*/ +static void ring_message_handler(struct ctdb_context *ctdb, uint32_t srvid, +TDB_DATA data, void *private) +{ + int incr = *(int *)data.dptr; + int *count = (int *)private; + int dest; + (*count)++; + dest = (ctdb_get_vnn(ctdb) + incr) % ctdb_get_num_nodes(ctdb); + ctdb_send_message(ctdb, dest, srvid, data); + if (incr == 1) { + msg_plus++; + } else { + msg_minus++; + } +} + +/* + benchmark sending messages in a ring around the nodes +*/ +static void bench_ring(struct ctdb_context *ctdb, struct event_context *ev) +{ + TDB_DATA data; + int incr, vnn=ctdb_get_vnn(ctdb); + + data.dptr = (uint8_t *)incr; + data.dsize = sizeof(incr); + + if (vnn == 0) { + /* two messages are injected into the ring, moving + in opposite directions */ + int dest = (ctdb_get_vnn(ctdb) + incr) % ctdb_get_num_nodes(ctdb); + incr = 1; + ctdb_send_message(ctdb, dest, 0, data); + incr = -1; + ctdb_send_message(ctdb, dest, 0, data); + } + + start_timer(); + + while (end_timer() timelimit) { + if (vnn == 0 msg_count % 1000 == 0) { + printf(Ring: %.2f msgs/sec (+ve=%d -ve=%d)\r, + msg_count/end_timer(), msg_plus, msg_minus); + fflush(stdout); + } + event_loop_once(ev); + } + + printf(Ring: %.2f msgs/sec (+ve=%d -ve=%d)\n, + msg_count/end_timer(), msg_plus, msg_minus); +} + + /* main program */ @@ -217,6 +276,8 @@ exit(1); } + ctdb_set_message_handler(ctdb, ring_message_handler, msg_count); + /* start the protocol running */ ret = ctdb_start(ctdb); @@ -224,11 +285,8 @@ outside of test code) */ ctdb_connect_wait(ctdb); - bench_incr(ctdb); + bench_ring(ctdb, ev); - /* go into a wait loop to allow other nodes to complete */ - ctdb_wait_loop(ctdb); - /* shut it down */ talloc_free(ctdb); return 0; === modified file 'include/ctdb.h' --- a/include/ctdb.h2007-02-08 22:42:04 + +++ b/include/ctdb.h2007-02-09 01:45:58 + @@ -127,6 +127,11 @@ /* return vnn of this node */ uint32_t ctdb_get_vnn(struct ctdb_context *ctdb); +/* + return the number of nodes +*/ +uint32_t ctdb_get_num_nodes(struct ctdb_context *ctdb); + /* setup a handler for ctdb messages */ typedef void (*ctdb_message_fn_t)(struct ctdb_context *, uint32_t srvid, TDB_DATA data, void *); @@ -135,6 +140,6 @@ /* send a ctdb message */ int ctdb_send_message(struct ctdb_context *ctdb, uint32_t vnn, -
svn commit: samba r21257 - in branches: SAMBA_3_0/source/lib SAMBA_3_0/source/locking SAMBA_3_0/source/smbd SAMBA_3_0_25/source/lib SAMBA_3_0_25/source/locking SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-02-09 02:03:39 + (Fri, 09 Feb 2007) New Revision: 21257 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21257 Log: Better fix for bug #4188 : Windows Vista RC1 and RC2 can't delete directory on Samba share based on work by Joe Meadows [EMAIL PROTECTED]. Jeremy. Modified: branches/SAMBA_3_0/source/lib/dummysmbd.c branches/SAMBA_3_0/source/locking/locking.c branches/SAMBA_3_0/source/smbd/dir.c branches/SAMBA_3_0_25/source/lib/dummysmbd.c branches/SAMBA_3_0_25/source/locking/locking.c branches/SAMBA_3_0_25/source/smbd/dir.c Changeset: Modified: branches/SAMBA_3_0/source/lib/dummysmbd.c === --- branches/SAMBA_3_0/source/lib/dummysmbd.c 2007-02-09 01:52:13 UTC (rev 21256) +++ branches/SAMBA_3_0/source/lib/dummysmbd.c 2007-02-09 02:03:39 UTC (rev 21257) @@ -38,22 +38,13 @@ { } -NTSTATUS dptr_create(connection_struct *conn, pstring path, BOOL old_handle, BOOL expect_close,uint16 spid, - const char *wcard, BOOL wcard_has_wild, uint32 attr, struct dptr_struct **dptr_ret) +void send_stat_cache_delete_message(const char *name) { - return NT_STATUS_OK; } -int dptr_CloseDir(struct dptr_struct *dptr) +NTSTATUS can_delete_directory(struct connection_struct *conn, + const char *dirname) { - return 0; + return NT_STATUS_OK; } -const char *dptr_ReadDirName(struct dptr_struct *dptr, long *poffset, SMB_STRUCT_STAT *pst) -{ - return NULL; -} - -void send_stat_cache_delete_message(const char *name) -{ -} Modified: branches/SAMBA_3_0/source/locking/locking.c === --- branches/SAMBA_3_0/source/locking/locking.c 2007-02-09 01:52:13 UTC (rev 21256) +++ branches/SAMBA_3_0/source/locking/locking.c 2007-02-09 02:03:39 UTC (rev 21257) @@ -1151,42 +1151,7 @@ /* Don't allow delete on close for non-empty directories. */ if (fsp-is_directory) { - long offset = 0; - NTSTATUS status; - SMB_STRUCT_STAT st; - struct dptr_struct *dirptr; - const char *name; - - status = dptr_create(fsp-conn, - fsp-fsp_name, - False, - True, - 0, - *, - True, - 0, - dirptr); - if (!NT_STATUS_IS_OK(status)) { - return status; - } - - /* Read 3 entries. Ignore first 2 (they're . and .. ) */ - name = dptr_ReadDirName(dirptr, offset, st); - if (!name) { - dptr_CloseDir(dirptr); - return NT_STATUS_ACCESS_DENIED; - } - name = dptr_ReadDirName(dirptr, offset, st); - if (!name) { - dptr_CloseDir(dirptr); - return NT_STATUS_ACCESS_DENIED; - } - name = dptr_ReadDirName(dirptr, offset, st); - dptr_CloseDir(dirptr); - if (name) { - DEBUG(10,(can_set_delete_on_close: got name %s - can't delete\n, name )); - return NT_STATUS_DIRECTORY_NOT_EMPTY; - } + return can_delete_directory(fsp-conn, fsp-fsp_name); } return NT_STATUS_OK; Modified: branches/SAMBA_3_0/source/smbd/dir.c === --- branches/SAMBA_3_0/source/smbd/dir.c2007-02-09 01:52:13 UTC (rev 21256) +++ branches/SAMBA_3_0/source/smbd/dir.c2007-02-09 02:03:39 UTC (rev 21257) @@ -1279,3 +1279,42 @@ } return False; } + +/* + Is this directory empty ? +*/ + +NTSTATUS can_delete_directory(struct connection_struct *conn, + const char *dirname) +{ + NTSTATUS status = NT_STATUS_OK; + long dirpos = 0; + const char *dname; + struct smb_Dir *dir_hnd = OpenDir(conn, dirname, NULL, 0); + + if (!dir_hnd) { + return map_nt_error_from_unix(errno); + } + + while ((dname = ReadDirName(dir_hnd,dirpos))) { + SMB_STRUCT_STAT st; + + /* Quick check for . and .. */ + if (dname[0] == '.') { + if (!dname[1] || (dname[1] == '.' !dname[2])) { + continue; + } + } + + if (!is_visible_file(conn, dirname, dname, st, True)) { +
svn commit: samba r21258 - in branches: SAMBA_3_0/source/printing SAMBA_3_0_25/source/printing
Author: jerry Date: 2007-02-09 02:12:12 + (Fri, 09 Feb 2007) New Revision: 21258 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21258 Log: Fix for connecting printers from Vista by storing the printer GUID as a REG_SZ as Vista seems to whine about unknown REG_BINARY values. Thanks to Martin Zielinski [EMAIL PROTECTED] for his excellent analysis on this. Modified: branches/SAMBA_3_0/source/printing/nt_printing.c branches/SAMBA_3_0_25/source/printing/nt_printing.c Changeset: Modified: branches/SAMBA_3_0/source/printing/nt_printing.c === --- branches/SAMBA_3_0/source/printing/nt_printing.c2007-02-09 02:03:39 UTC (rev 21257) +++ branches/SAMBA_3_0/source/printing/nt_printing.c2007-02-09 02:12:12 UTC (rev 21258) @@ -2999,11 +2999,15 @@ return True; } +/* + / + static void store_printer_guid(NT_PRINTER_INFO_LEVEL_2 *info2, struct GUID guid) { int i; REGVAL_CTR *ctr=NULL; + UNISTR2 unistr_guid; /* find the DsSpooler key */ if ((i = lookup_printerkey(info2-data, SPOOL_DSSPOOLER_KEY)) 0) @@ -3011,8 +3015,18 @@ ctr = info2-data-keys[i].values; regval_ctr_delvalue(ctr, objectGUID); - regval_ctr_addvalue(ctr, objectGUID, REG_BINARY, - (char *) guid, sizeof(struct GUID)); + + /* We used to store this as a REG_BINARY but that causes + Vista to whine */ + + ZERO_STRUCT( unistr_guid ); + init_unistr2( unistr_guid, smb_uuid_string_static(guid), + UNI_STR_TERMINATE ); + + regval_ctr_addvalue(ctr, objectGUID, REG_SZ, + (char *)unistr_guid.buffer, + unistr_guid.uni_max_len*2); + } static WERROR nt_printer_publish_ads(ADS_STRUCT *ads, @@ -3269,6 +3283,7 @@ REGISTRY_VALUE *guid_val; WERROR win_rc; int i; + BOOL ret = False; win_rc = get_a_printer(print_hnd, printer, 2, lp_servicename(snum)); @@ -3282,12 +3297,36 @@ return False; } - /* fetching printer guids really ought to be a separate function.. */ - if (guid regval_size(guid_val) == sizeof(struct GUID)) - memcpy(guid, regval_data_p(guid_val), sizeof(struct GUID)); + /* fetching printer guids really ought to be a separate function. */ + if ( guid ) { + fstring guid_str; + + /* We used to store the guid as REG_BINARY, then swapped + to REG_SZ for Vista compatibility so check for both */ + + switch ( regval_type(guid_val) ){ + case REG_SZ: + rpcstr_pull( guid_str, regval_data_p(guid_val), +sizeof(guid_str)-1, -1, STR_TERMINATE ); + ret = smb_string_to_uuid( guid_str, guid ); + break; + case REG_BINARY: + if ( regval_size(guid_val) != sizeof(struct GUID) ) { + ret = False; + break; + } + memcpy(guid, regval_data_p(guid_val), sizeof(struct GUID)); + break; + default: + DEBUG(0,(is_printer_published: GUID value stored as +invaluid type (%d)\n, regval_type(guid_val) )); + break; + } + } + free_a_printer(printer, 2); - return True; + return ret; } #else WERROR nt_printer_publish(Printer_entry *print_hnd, int snum, int action) @@ -3554,13 +3593,43 @@ break; } - /* add the new value */ + DEBUG(8,(specific: [%s:%s], len: %d\n, keyname, valuename, size)); + + /* Vista doesn't like unknown REG_BINARY values in DsSpooler. + Thanks to Martin Zielinski for the hint. */ + + if ( type == REG_BINARY +strequal( keyname, SPOOL_DSSPOOLER_KEY ) +strequal( valuename, objectGUID ) ) + { + struct GUID guid; + UNISTR2 unistr_guid; + + ZERO_STRUCT( unistr_guid ); + + /* convert the GUID to a UNICODE string */ + + memcpy( guid, data_p, sizeof(struct GUID) ); + + init_unistr2( unistr_guid, smb_uuid_string_static(guid), +
svn commit: samba r21259 - in branches: SAMBA_3_0/source/rpcclient SAMBA_3_0_25/source/rpcclient
Author: jra Date: 2007-02-09 05:16:25 + (Fri, 09 Feb 2007) New Revision: 21259 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21259 Log: Fix coverity bug id #340. No way to process logon parameter as the code was written. Jeremy. Modified: branches/SAMBA_3_0/source/rpcclient/cmd_netlogon.c branches/SAMBA_3_0_25/source/rpcclient/cmd_netlogon.c Changeset: Modified: branches/SAMBA_3_0/source/rpcclient/cmd_netlogon.c === --- branches/SAMBA_3_0/source/rpcclient/cmd_netlogon.c 2007-02-09 02:12:12 UTC (rev 21258) +++ branches/SAMBA_3_0/source/rpcclient/cmd_netlogon.c 2007-02-09 05:16:25 UTC (rev 21259) @@ -342,7 +342,7 @@ /* Check arguments */ - if (argc 3 || argc 6) { + if (argc 3 || argc 7) { fprintf(stderr, Usage: samlogon username password [workstation] [logon_type (1 or 2)] [auth level (2 or 3)] [logon_parameter]\n); return NT_STATUS_OK; Modified: branches/SAMBA_3_0_25/source/rpcclient/cmd_netlogon.c === --- branches/SAMBA_3_0_25/source/rpcclient/cmd_netlogon.c 2007-02-09 02:12:12 UTC (rev 21258) +++ branches/SAMBA_3_0_25/source/rpcclient/cmd_netlogon.c 2007-02-09 05:16:25 UTC (rev 21259) @@ -305,7 +305,7 @@ /* Check arguments */ - if (argc 3 || argc 6) { + if (argc 3 || argc 7) { fprintf(stderr, Usage: samlogon username password [workstation] [logon_type (1 or 2)] [auth level (2 or 3)] [logon_parameter]\n); return NT_STATUS_OK;