svn commit: samba r21842 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .
Author: metze Date: 2007-03-15 07:22:49 + (Thu, 15 Mar 2007) New Revision: 21842 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21842 Log: fix typo in comment metze Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/repl_meta_data.c Changeset: Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/repl_meta_data.c === --- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/repl_meta_data.c 2007-03-14 23:25:54 UTC (rev 21841) +++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/repl_meta_data.c 2007-03-15 07:22:49 UTC (rev 21842) @@ -700,7 +700,7 @@ void *private_data, struct ldb_reply *ares) { -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ struct replmd_replicated_request *ar = talloc_get_type(private_data, struct replmd_replicated_request); @@ -794,7 +794,7 @@ replmd_replicated_apply_add_callback); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ return ldb_next_request(ar-module, ar-sub.change_req); #else ret = ldb_next_request(ar-module, ar-sub.change_req); @@ -839,7 +839,7 @@ void *private_data, struct ldb_reply *ares) { -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ struct replmd_replicated_request *ar = talloc_get_type(private_data, struct replmd_replicated_request); @@ -1034,7 +1034,7 @@ replmd_replicated_apply_merge_callback); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ return ldb_next_request(ar-module, ar-sub.change_req); #else ret = ldb_next_request(ar-module, ar-sub.change_req); @@ -1077,7 +1077,7 @@ talloc_free(ares); -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ if (is_done) { ar-sub.search_ret = ldb_wait(ar-sub.search_req-handle, LDB_WAIT_ALL); if (ar-sub.search_ret != LDB_SUCCESS) { @@ -1117,7 +1117,7 @@ replmd_replicated_apply_search_callback); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ return ldb_next_request(ar-module, ar-sub.search_req); #else ret = ldb_next_request(ar-module, ar-sub.search_req); @@ -1137,7 +1137,7 @@ static int replmd_replicated_apply_next(struct replmd_replicated_request *ar) { -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ if (ar-index_current = ar-objs-num_objects) { return replmd_replicated_uptodate_vector(ar); } @@ -1153,7 +1153,7 @@ void *private_data, struct ldb_reply *ares) { -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ struct replmd_replicated_request *ar = talloc_get_type(private_data, struct replmd_replicated_request); @@ -1453,7 +1453,7 @@ replmd_replicated_uptodate_modify_callback); if (ret != LDB_SUCCESS) return replmd_replicated_request_error(ar, ret); -#ifdef REPLMD_FULL_ASYNC /* TODO: active this code when ldb support full async code */ +#ifdef REPLMD_FULL_ASYNC /* TODO: activate this code when ldb support full async code */ return ldb_next_request(ar-module, ar-sub.change_req); #else ret = ldb_next_request(ar-module, ar-sub.change_req); @@ -1493,7 +1493,7
svn commit: samba r21843 - in branches/SAMBA_4_0/source/torture/libnet: .
Author: metze Date: 2007-03-15 13:21:54 + (Thu, 15 Mar 2007) New Revision: 21843 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21843 Log: the computer_dn isn't needed anymore because we don't manually reset the password anymore metze Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c Changeset: Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c === --- branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c 2007-03-15 07:22:49 UTC (rev 21842) +++ branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c 2007-03-15 13:21:54 UTC (rev 21843) @@ -118,8 +118,6 @@ const char *secrets_ldb; const char *secrets_keytab; } path; - - const char *computer_dn; }; static NTSTATUS test_become_dc_check_options(void *private_data, @@ -715,17 +713,6 @@ return NT_STATUS_OK; } -static NTSTATUS test_become_dc_domain_chunk(void *private_data, - const struct libnet_BecomeDC_StoreChunk *c) -{ - struct test_become_dc_state *s = talloc_get_type(private_data, struct test_become_dc_state); - - s-computer_dn = talloc_strdup(s, c-dest_dsa-computer_dn_str); - NT_STATUS_HAVE_NO_MEMORY(s-computer_dn); - - return test_become_dc_store_chunk(private_data, c); -} - BOOL torture_net_become_dc(struct torture_context *torture) { BOOL ret = True; @@ -785,7 +772,7 @@ b.in.callbacks.prepare_db = test_become_dc_prepare_db; b.in.callbacks.schema_chunk = test_become_dc_schema_chunk; b.in.callbacks.config_chunk = test_become_dc_store_chunk; - b.in.callbacks.domain_chunk = test_become_dc_domain_chunk; + b.in.callbacks.domain_chunk = test_become_dc_store_chunk; status = libnet_BecomeDC(s-ctx, s, b); if (!NT_STATUS_IS_OK(status)) {
Rev 11689: Merge upstream in file:///home/jelmer/bzr.samba/4.0-envs/
At file:///home/jelmer/bzr.samba/4.0-envs/ revno: 11689 revision-id: [EMAIL PROTECTED] parent: [EMAIL PROTECTED] parent: svn-v2:[EMAIL PROTECTED] committer: Jelmer Vernooij [EMAIL PROTECTED] branch nick: 4.0-envs timestamp: Thu 2007-03-15 16:11:04 +0100 message: Merge upstream removed: source/heimdal/kdc/config.csvn-v2:[EMAIL PROTECTED] source/script/tests/testenv.pl svn-v2:[EMAIL PROTECTED] added: services/samba/config.esp svn-v2:[EMAIL PROTECTED] services/samba/ejsnet.esp svn-v2:[EMAIL PROTECTED] source/ntvfs/common/opendb.h svn-v2:[EMAIL PROTECTED] source/ntvfs/common/opendb_tdb.c svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/netmgr/ svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/netmgr/Fsm.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/netmgr/Gui.js svn-v2:[EMAIL PROTECTED] webapps/swat/source/class/swat/module/netmgr/NetManager.js svn-v2:[EMAIL PROTECTED] modified: .bzrignore svn-v2:[EMAIL PROTECTED] source/auth/credentials/credentials.c svn-v2:[EMAIL PROTECTED] source/auth/credentials/credentials.h svn-v2:[EMAIL PROTECTED] source/auth/credentials/credentials_files.c svn-v2:[EMAIL PROTECTED] source/dsdb/common/flags.h svn-v2:[EMAIL PROTECTED] source/dsdb/repl/replicated_objects.c svn-v2:[EMAIL PROTECTED] source/dsdb/samdb/ldb_modules/partition.c svn-v2:[EMAIL PROTECTED] source/dsdb/samdb/ldb_modules/repl_meta_data.c svn-v2:[EMAIL PROTECTED] source/dsdb/samdb/ldb_modules/schema_fsmo.c svn-v2:[EMAIL PROTECTED] source/dsdb/samdb/ldb_modules/show_deleted.c svn-v2:[EMAIL PROTECTED] source/dsdb/schema/schema.hsvn-v2:[EMAIL PROTECTED] source/dsdb/schema/schema_init.c svn-v2:[EMAIL PROTECTED] source/dsdb/schema/schema_syntax.c svn-v2:[EMAIL PROTECTED] source/headermap.txt svn-v2:[EMAIL PROTECTED] source/heimdal_build/roken.h svn-v2:[EMAIL PROTECTED] source/ldap_server/ldap_server.c svn-v2:[EMAIL PROTECTED] source/lib/ldb/common/ldb.csvn-v2:[EMAIL PROTECTED] source/lib/ldb/common/ldb_modules.c svn-v2:[EMAIL PROTECTED] source/lib/ldb/ldb_ildap/ldb_ildap.c svn-v2:[EMAIL PROTECTED] source/lib/registry/config.mk svn-v2:[EMAIL PROTECTED] source/lib/registry/registry.h svn-v2:[EMAIL PROTECTED] source/lib/registry/tools/regdiff.c svn-v2:[EMAIL PROTECTED] source/lib/registry/tools/regpatch.c svn-v2:[EMAIL PROTECTED] source/lib/registry/tools/regshell.c svn-v2:[EMAIL PROTECTED] source/lib/registry/tools/regtree.c svn-v2:[EMAIL PROTECTED] source/lib/replace/README svn-v2:[EMAIL PROTECTED] source/lib/replace/libreplace.m4 svn-v2:[EMAIL PROTECTED] source/lib/replace/replace.c svn-v2:[EMAIL PROTECTED] source/lib/replace/replace.h svn-v2:[EMAIL PROTECTED] source/lib/replace/test/testsuite.c svn-v2:[EMAIL PROTECTED] source/lib/util/dprintf.c svn-v2:[EMAIL PROTECTED] source/libcli/cldap/cldap.csvn-v2:[EMAIL PROTECTED] source/libcli/ldap/ldap.c svn-v2:[EMAIL PROTECTED] source/libcli/ldap/ldap_client.c svn-v2:[EMAIL PROTECTED] source/libcli/ldap/ldap_controls.c svn-v2:[EMAIL PROTECTED] source/libnet/libnet_become_dc.c svn-v2:[EMAIL PROTECTED] source/libnet/libnet_become_dc.h svn-v2:[EMAIL PROTECTED] source/libnet/libnet_unbecome_dc.c svn-v2:[EMAIL PROTECTED] source/libnet/libnet_unbecome_dc.h svn-v2:[EMAIL PROTECTED] source/librpc/config.mksvn-v2:[EMAIL PROTECTED] source/librpc/idl/drsblobs.idl svn-v2:[EMAIL PROTECTED] source/librpc/idl/drsuapi.idl svn-v2:[EMAIL PROTECTED] source/librpc/idl/krb5pac.idl svn-v2:[EMAIL PROTECTED] source/librpc/ndr/libndr.h svn-v2:[EMAIL PROTECTED] source/librpc/ndr/ndr.csvn-v2:[EMAIL PROTECTED] source/librpc/rpc/dcerpc.c svn-v2:[EMAIL PROTECTED] source/librpc/rpc/dcerpc.h svn-v2:[EMAIL PROTECTED] source/main.mk svn-v2:[EMAIL PROTECTED] source/ntvfs/common/config.mk svn-v2:[EMAIL PROTECTED] source/ntvfs/common/ntvfs_common.h svn-v2:[EMAIL PROTECTED] source/ntvfs/common/opendb.c svn-v2:[EMAIL PROTECTED] source/rpc_server/dcerpc_server.c svn-v2:[EMAIL PROTECTED] source/rpc_server/dcerpc_server.h svn-v2:[EMAIL PROTECTED] source/rpc_server/echo/rpc_echo.c svn-v2:[EMAIL PROTECTED] source/samba4-skip svn-v2:[EMAIL PROTECTED] source/script/tests/Samba4.pm svn-v2:[EMAIL PROTECTED] source/script/tests/SocketWrapper.pm svn-v2:[EMAIL PROTECTED] source/script/tests/mk-fedora-ds.sh svn-v2:[EMAIL PROTECTED] source/script/tests/mk-openldap.sh svn-v2:[EMAIL PROTECTED] source/script/tests/mktestdc.sh svn-v2:[EMAIL PROTECTED] source/script/tests/selftest.pl svn-v2:[EMAIL PROTECTED] source/script/tests/test_nbt.sh svn-v2:[EMAIL PROTECTED] source/script/tests/test_rpc.sh svn-v2:[EMAIL PROTECTED] source/script/tests/tests_all.sh svn-v2:[EMAIL PROTECTED] source/script/tests/tests_quick.sh svn-v2:[EMAIL PROTECTED]
svn commit: samba r21844 - in branches/SAMBA_3_0_25/source/client: .
Author: jra Date: 2007-03-15 19:01:48 + (Thu, 15 Mar 2007) New Revision: 21844 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21844 Log: Janitor for Stevef : mount.cifs compile on old libc missing bind mount #define Thanks to Thomas Jarosch for pointing this out. Jeremy. Modified: branches/SAMBA_3_0_25/source/client/mount.cifs.c Changeset: Modified: branches/SAMBA_3_0_25/source/client/mount.cifs.c === --- branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-03-15 13:21:54 UTC (rev 21843) +++ branches/SAMBA_3_0_25/source/client/mount.cifs.c2007-03-15 19:01:48 UTC (rev 21844) @@ -59,6 +59,10 @@ #define MS_MOVE 8192 #endif +#ifndef MS_BIND +#define MS_BIND 4096 +#endif + #define CONST_DISCARD(type, ptr) ((type) ((void *) (ptr))) const char *thisprogram;
svn commit: samba r21845 - in branches: SAMBA_3_0/source SAMBA_3_0/source/include SAMBA_3_0/source/libads SAMBA_3_0/source/libsmb SAMBA_3_0/source/smbd SAMBA_3_0_25/source SAMBA_3_0_25/source/include
Author: jra Date: 2007-03-15 19:18:18 + (Thu, 15 Mar 2007) New Revision: 21845 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21845 Log: Refactor the sessionsetupX code a little to allow us to return a NT_STATUS_TIME_DIFFERENCE_AT_DC error to a client when there's clock skew. Will help people debug this. Prepare us for being able to return the correct sessionsetupX NT_STATUS_MORE_PROCESSING_REQUIRED error with associated krb5 clock skew error to allow clients to re-sync time with us when we're eventually able to be a KDC. Jeremy. Modified: branches/SAMBA_3_0/source/configure.in branches/SAMBA_3_0/source/include/includes.h branches/SAMBA_3_0/source/libads/kerberos_verify.c branches/SAMBA_3_0/source/libads/krb5_errs.c branches/SAMBA_3_0/source/libsmb/clikrb5.c branches/SAMBA_3_0/source/smbd/sesssetup.c branches/SAMBA_3_0_25/source/configure.in branches/SAMBA_3_0_25/source/include/includes.h branches/SAMBA_3_0_25/source/libads/kerberos_verify.c branches/SAMBA_3_0_25/source/libads/krb5_errs.c branches/SAMBA_3_0_25/source/libsmb/clikrb5.c branches/SAMBA_3_0_25/source/smbd/sesssetup.c Changeset: Sorry, the patch is too large (1480 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21845
svn commit: samba r21846 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_25/source/libsmb
Author: jra Date: 2007-03-15 20:45:27 + (Thu, 15 Mar 2007) New Revision: 21846 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21846 Log: Try and fix the Darwin build which seems to have a strange krb5. Jeremy. Modified: branches/SAMBA_3_0/source/libsmb/clikrb5.c branches/SAMBA_3_0_25/source/libsmb/clikrb5.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/clikrb5.c === --- branches/SAMBA_3_0/source/libsmb/clikrb5.c 2007-03-15 19:18:18 UTC (rev 21845) +++ branches/SAMBA_3_0/source/libsmb/clikrb5.c 2007-03-15 20:45:27 UTC (rev 21846) @@ -1449,7 +1449,13 @@ memset(e, 0, sizeof(e)); krb5_us_timeofday(context, e.stime, e.susec); e.server = server; +#if defined(krb5_err_base) e.error = error_code - krb5_err_base; +#elif defined(ERROR_TABLE_BASE_krb5) + e.error = error_code - ERROR_TABLE_BASE_krb5; +#else + e.error = error_code; /* Almost certainly wrong, but what can we do... ? */ +#endif return krb5_mk_error(context, e, reply); #else /* Heimdal. */ Modified: branches/SAMBA_3_0_25/source/libsmb/clikrb5.c === --- branches/SAMBA_3_0_25/source/libsmb/clikrb5.c 2007-03-15 19:18:18 UTC (rev 21845) +++ branches/SAMBA_3_0_25/source/libsmb/clikrb5.c 2007-03-15 20:45:27 UTC (rev 21846) @@ -1432,7 +1432,13 @@ memset(e, 0, sizeof(e)); krb5_us_timeofday(context, e.stime, e.susec); e.server = server; +#if defined(krb5_err_base) e.error = error_code - krb5_err_base; +#elif defined(ERROR_TABLE_BASE_krb5) + e.error = error_code - ERROR_TABLE_BASE_krb5; +#else + e.error = error_code; /* Almost certainly wrong, but what can we do... ? */ +#endif return krb5_mk_error(context, e, reply); #else /* Heimdal. */
svn commit: samba r21847 - in branches: SAMBA_3_0/source/libads SAMBA_3_0/source/smbd SAMBA_3_0_25/source/libads SAMBA_3_0_25/source/smbd
Author: jra Date: 2007-03-15 21:53:53 + (Thu, 15 Mar 2007) New Revision: 21847 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21847 Log: Fix memory leaks in error paths (and in main code path in one case...) in sasl bind. Wonder why coverity didn't find these ? Jeremy. Modified: branches/SAMBA_3_0/source/libads/sasl.c branches/SAMBA_3_0/source/smbd/sesssetup.c branches/SAMBA_3_0_25/source/libads/sasl.c branches/SAMBA_3_0_25/source/smbd/sesssetup.c Changeset: Modified: branches/SAMBA_3_0/source/libads/sasl.c === --- branches/SAMBA_3_0/source/libads/sasl.c 2007-03-15 20:45:27 UTC (rev 21846) +++ branches/SAMBA_3_0/source/libads/sasl.c 2007-03-15 21:53:53 UTC (rev 21847) @@ -311,9 +311,9 @@ int gss_rc, rc; uint8 *p; uint32 max_msg_size = 0; - char *sname; + char *sname = NULL; ADS_STATUS status; - krb5_principal principal; + krb5_principal principal = NULL; krb5_context ctx = NULL; krb5_enctype enc_types[] = { #ifdef ENCTYPE_ARCFOUR_HMAC @@ -331,24 +331,32 @@ initialize_krb5_error_table(); status = ADS_ERROR_KRB5(krb5_init_context(ctx)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); return status; } status = ADS_ERROR_KRB5(krb5_set_default_tgs_ktypes(ctx, enc_types)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); + krb5_free_context(ctx); return status; } status = ADS_ERROR_KRB5(smb_krb5_parse_name(ctx, sname, principal)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); + krb5_free_context(ctx); return status; } - free(sname); - krb5_free_context(ctx); - input_name.value = principal; input_name.length = sizeof(principal); gss_rc = gss_import_name(minor_status, input_name, nt_principal, serv_name); + + /* We've finished with principal and sname now. */ + SAFE_FREE(sname); + krb5_free_principal(ctx, principal); + krb5_free_context(ctx); + if (gss_rc) { return ADS_ERROR_GSS(gss_rc, minor_status); } Modified: branches/SAMBA_3_0/source/smbd/sesssetup.c === --- branches/SAMBA_3_0/source/smbd/sesssetup.c 2007-03-15 20:45:27 UTC (rev 21846) +++ branches/SAMBA_3_0/source/smbd/sesssetup.c 2007-03-15 21:53:53 UTC (rev 21847) @@ -176,6 +176,7 @@ *pblob_out = data_blob(NULL,0); + initialize_krb5_error_table(); kerr = krb5_init_context(context); if (kerr) { return False; Modified: branches/SAMBA_3_0_25/source/libads/sasl.c === --- branches/SAMBA_3_0_25/source/libads/sasl.c 2007-03-15 20:45:27 UTC (rev 21846) +++ branches/SAMBA_3_0_25/source/libads/sasl.c 2007-03-15 21:53:53 UTC (rev 21847) @@ -311,9 +311,9 @@ int gss_rc, rc; uint8 *p; uint32 max_msg_size = 0; - char *sname; + char *sname = NULL; ADS_STATUS status; - krb5_principal principal; + krb5_principal principal = NULL; krb5_context ctx = NULL; krb5_enctype enc_types[] = { #ifdef ENCTYPE_ARCFOUR_HMAC @@ -331,24 +331,32 @@ initialize_krb5_error_table(); status = ADS_ERROR_KRB5(krb5_init_context(ctx)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); return status; } status = ADS_ERROR_KRB5(krb5_set_default_tgs_ktypes(ctx, enc_types)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); + krb5_free_context(ctx); return status; } status = ADS_ERROR_KRB5(smb_krb5_parse_name(ctx, sname, principal)); if (!ADS_ERR_OK(status)) { + SAFE_FREE(sname); + krb5_free_context(ctx); return status; } - free(sname); - krb5_free_context(ctx); - input_name.value = principal; input_name.length = sizeof(principal); gss_rc = gss_import_name(minor_status, input_name, nt_principal, serv_name); + + /* We've finished with principal and sname now. */ + SAFE_FREE(sname); + krb5_free_principal(ctx, principal); + krb5_free_context(ctx); + if (gss_rc) { return ADS_ERROR_GSS(gss_rc, minor_status); } Modified: branches/SAMBA_3_0_25/source/smbd/sesssetup.c === --- branches/SAMBA_3_0_25/source/smbd/sesssetup.c 2007-03-15 20:45:27 UTC (rev 21846) +++ branches/SAMBA_3_0_25/source/smbd/sesssetup.c 2007-03-15 21:53:53 UTC (rev 21847) @@ -176,6 +176,7 @@ *pblob_out = data_blob(NULL,0); +
svn commit: samba r21848 - in branches/SAMBA_3_0/source/libaddns: .
Author: jerry Date: 2007-03-15 22:09:03 + (Thu, 15 Mar 2007) New Revision: 21848 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21848 Log: add a comment about gss_import_name() and when to free the krb5 principal data Modified: branches/SAMBA_3_0/source/libaddns/dnsgss.c Changeset: Modified: branches/SAMBA_3_0/source/libaddns/dnsgss.c === --- branches/SAMBA_3_0/source/libaddns/dnsgss.c 2007-03-15 21:53:53 UTC (rev 21847) +++ branches/SAMBA_3_0/source/libaddns/dnsgss.c 2007-03-15 22:09:03 UTC (rev 21848) @@ -252,6 +252,11 @@ krb5_init_context( krb_ctx ); krb5_parse_name( krb_ctx, targetname, host_principal ); + /* don't free the printcap until after you call + gss_release_name() or else you'll get a segv + as the krb5_copy_principal() does a structure + copy and not a deep copy.--jerry*/ + input_name.value = host_principal; input_name.length = sizeof( host_principal ); @@ -267,8 +272,11 @@ err = dns_negotiate_gss_ctx_int(mem_ctx, conn, keyname, targ_name, gss_ctx, srv_type ); + + gss_release_name( minor, targ_name ); - gss_release_name( minor, targ_name ); + /* now we can feree the principal */ + krb5_free_principal( krb_ctx, host_principal ); krb5_free_context( krb_ctx );
svn commit: samba r21851 - in branches: SAMBA_3_0/source/libaddns SAMBA_3_0_25/source/libaddns
Author: vlendec Date: 2007-03-15 22:48:30 + (Thu, 15 Mar 2007) New Revision: 21851 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21851 Log: Obvious typos... Modified: branches/SAMBA_3_0/source/libaddns/dnsgss.c branches/SAMBA_3_0_25/source/libaddns/dnsgss.c Changeset: Modified: branches/SAMBA_3_0/source/libaddns/dnsgss.c === --- branches/SAMBA_3_0/source/libaddns/dnsgss.c 2007-03-15 22:11:13 UTC (rev 21850) +++ branches/SAMBA_3_0/source/libaddns/dnsgss.c 2007-03-15 22:48:30 UTC (rev 21851) @@ -252,7 +252,7 @@ krb5_init_context( krb_ctx ); krb5_parse_name( krb_ctx, targetname, host_principal ); - /* don't free the printcap until after you call + /* don't free the principal until after you call gss_release_name() or else you'll get a segv as the krb5_copy_principal() does a structure copy and not a deep copy.--jerry*/ @@ -275,7 +275,7 @@ gss_release_name( minor, targ_name ); - /* now we can feree the principal */ + /* now we can free the principal */ krb5_free_principal( krb_ctx, host_principal ); krb5_free_context( krb_ctx ); Modified: branches/SAMBA_3_0_25/source/libaddns/dnsgss.c === --- branches/SAMBA_3_0_25/source/libaddns/dnsgss.c 2007-03-15 22:11:13 UTC (rev 21850) +++ branches/SAMBA_3_0_25/source/libaddns/dnsgss.c 2007-03-15 22:48:30 UTC (rev 21851) @@ -252,7 +252,7 @@ krb5_init_context( krb_ctx ); krb5_parse_name( krb_ctx, targetname, host_principal ); - /* don't free the printcap until after you call + /* don't free the principal until after you call gss_release_name() or else you'll get a segv as the krb5_copy_principal() does a structure copy and not a deep copy.--jerry*/ @@ -275,7 +275,7 @@ gss_release_name( minor, targ_name ); - /* now we can feree the principal */ + /* now we can free the principal */ krb5_free_principal( krb_ctx, host_principal ); krb5_free_context( krb_ctx );
svn commit: samba r21852 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .
Author: mimir Date: 2007-03-16 00:19:40 + (Fri, 16 Mar 2007) New Revision: 21852 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=21852 Log: Further work on initialising libnet context from netmgr. rafal Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js Changeset: Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js === --- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js 2007-03-15 22:48:30 UTC (rev 21851) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js 2007-03-16 00:19:40 UTC (rev 21852) @@ -43,7 +43,7 @@ result.data.origin == origins.Server result.data.code == serverErrors.ResourceError) { - this.debug(error + result); + alert(Error when receiving rpc: ' + result.id + ' + exception: + result.data); } else { @@ -63,7 +63,13 @@ { swat.main.canvas : Transition_Idle_to_AwaitRpcResult_via_canvas_appear - } + }, + + changeSelection : + { + tree : + Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed + } } }); @@ -87,6 +93,37 @@ // Add the new transition state.addTransition(trans); + var trans = new qx.util.fsm.Transition( +Transition_Idle_to_AwaitRpcResult_via_tree_selection_changed, +{ + nextState : State_AwaitRpcResult, + + ontransition : + function(fsm, event) + { + var nodes = event.getData(); + var selectedNode = nodes[0]; + + var gui = swat.module.netmgr.Gui.getInstance(); + var parentNode = gui.getParentNode(module, selectedNode); + + if (typeof(parentNode.credentials) == object) + { + var creds = parentNode.credentials; + var request = _this.callRpc(samba.ejsnet, NetContext, [ creds ]); + request.setUserData(requestType, NetContext); + } + else + { + // TODO: display a login dialog + } + } + +}); + + // Add the new transition + state.addTransition(trans); + blockedEvents = { appear: Modified: branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js === --- branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js 2007-03-15 22:48:30 UTC (rev 21851) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js 2007-03-16 00:19:40 UTC (rev 21852) @@ -85,6 +85,26 @@ }; +qx.Proto.getParentNode = function(module, node) +{ + var tree = this._tree; + var nodes = tree.getTableModel().getData(); + if (nodes == undefined) + { +return undefined; + } + + if (node.parentNodeId == 0) + { +// there is no parent node +return node; + } + + var parentNode = nodes[node.parentNodeId]; + return parentNode; +}; + + qx.Proto._addHostNode = function(module, rpcRequest) { var fsm = module.fsm; @@ -93,22 +113,20 @@ // Get the tree widget var tree = this._tree; var dataModel = tree.getDataModel(); - - // Add new host and its service branches + + // Add new host and its service leaves var hostNodeId = dataModel.addBranch(null, hostname, false); - var domainNodeId = dataModel.addBranch(hostNodeId, Domain, false); - var usersNodeId = dataModel.addBranch(hostNodeId, Users, false); - var groupsNodeId = dataModel.addBranch(hostNodeId, Groups, false); - var srvcsNodeId = dataModel.addBranch(hostNodeId, Services, false); - - // Services don't expand - dataModel.setState(domainNodeId, { bHideOpenClose : true }); - dataModel.setState(usersNodeId, { bHideOpenClose : true }); - dataModel.setState(groupsNodeId, { bHideOpenClose : true }); - dataModel.setState(srvcsNodeId, { bHideOpenClose : true }); + var domainNodeId = dataModel.addLeaf(hostNodeId, Domain, false); + var usersNodeId = dataModel.addLeaf(hostNodeId, Users, false); + var groupsNodeId = dataModel.addLeaf(hostNodeId, Groups, false); + var srvcsNodeId = dataModel.addLeaf(hostNodeId, Services, false); dataModel.setData(); + tree.addEventListener(changeSelection, fsm.eventListener, fsm); + + var hostNode = dataModel.getData()[hostNodeId]; + hostNode.credentials = undefined; };
Re: svn commit: samba r21852 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .
[EMAIL PROTECTED] writes: + if (typeof(parentNode.credentials) == object) + { + var creds = parentNode.credentials; + var request = _this.callRpc(samba.ejsnet, NetContext, [ creds ]); + request.setUserData(requestType, NetContext); + } + else + { + // TODO: display a login dialog + } + } + +}); I'm not sure what you're doing here, but login is handled automatically for all of the modules. Either you don't understand the SWAT framework and its standard capabilities, or (more likely) I just don't understand what you're doing here. If I'm off base, just tell me to shut up. :-) Derrell
Re: svn commit: samba r21852 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .
On Thu, Mar 15, 2007 at 10:52:34PM -0400, [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] writes: + if (typeof(parentNode.credentials) == object) + { + var creds = parentNode.credentials; + var request = _this.callRpc(samba.ejsnet, NetContext, [ creds ]); + request.setUserData(requestType, NetContext); + } + else + { + // TODO: display a login dialog + } + } + +}); I'm not sure what you're doing here, but login is handled automatically for all of the modules. Either you don't understand the SWAT framework and its standard capabilities, or (more likely) I just don't understand what you're doing here. If I'm off base, just tell me to shut up. :-) Yes, I know the login is handled by SWAT. I need to create NetContext for the host node. Since each host I connect to by means of libnet may require different credentials, I attach them to the node and create the actual context on the server side. So, this is creating libnet credentials rather than logging in to SWAT. There's one thing that might turned useful here. Default credentials could be created on the basis of SWAT login credentials. However, specifying different ones needs to be available. Right now, if there's nothing given yet, I ask (vide TODO). Don't shut up - thanks for keeping an eye on this code :-) cheers, -- Rafal Szczesniak Samba Team member http://www.samba.org signature.asc Description: Digital signature