Re: svn commit: samba r21991 - in branches/SAMBA_3_0/source: include lib libsmb smbd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21991 > > Log: > I hate Steve French :-). Add support for encryption > contexts > Jeremy. Hi Jeremy, also using 4-byte len + 0xFF + 'S' + 2-byte encctx, is bad as encctx 'M' + 'B' will be confusing! maybe it would be better to use 0xFD + 'S' + 2-byte encctx or 0xFF + 'E' + 2-byte encctx or something simular. metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGC3EIm70gjA5TCD8RAtaaAJ4vA94p3NHJOcJwlGWXouH9b518dwCfZ087 v4WCcQcvu1AbPrdaiFkxLyI= =RG3b -END PGP SIGNATURE-
Re: svn commit: samba r21991 - in branches/SAMBA_3_0/source: include lib libsmb smbd
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] schrieb: > Author: jra > Date: 2007-03-27 21:13:31 + (Tue, 27 Mar 2007) > New Revision: 21991 > > WebSVN: > http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21991 > > Log: > I hate Steve French :-). Add support for encryption > contexts > Jeremy. Hi Jeremy, can you explain that a bit more? What is the typical request sequence to establish the encryption context? So the encryption context is attached to the connection_struct (which is a tree connect in samba3)? Wouldn't it be better to attach it to the session id instead of the tree id, as a tree id can be used by multiple sessions. (I assume in SMB2 the signing is also attached to the session) It would be really nice to have a specification of all this in our wiki or so. metze -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGC22jm70gjA5TCD8RAsKfAJ9o+4tG341Mr/psVf0TYEhkgo01pQCcD5hd peSo13i2hapfDJ+YG4Zav1Y= =CHe0 -END PGP SIGNATURE-
svn commit: samba r22006 - in branches/SAMBA_3_0/source/lib: .
Author: metze Date: 2007-03-29 07:30:22 + (Thu, 29 Mar 2007) New Revision: 22006 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22006 Log: use string_term_tdb_data()... metze Modified: branches/SAMBA_3_0/source/lib/sharesec.c Changeset: Modified: branches/SAMBA_3_0/source/lib/sharesec.c === --- branches/SAMBA_3_0/source/lib/sharesec.c2007-03-28 23:01:35 UTC (rev 22005) +++ branches/SAMBA_3_0/source/lib/sharesec.c2007-03-29 07:30:22 UTC (rev 22006) @@ -194,8 +194,7 @@ slprintf(key, sizeof(key)-1, "SECDESC/%s", lp_servicename(params->service)); - kbuf.dptr = key; - kbuf.dsize = strlen(key)+1; + kbuf = string_term_tdb_data(key); if (tdb_trans_delete(share_tdb, kbuf) != 0) { DEBUG(0,("delete_share_security: Failed to delete entry for share %s\n",
Build status as of Thu Mar 29 00:00:02 2007
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2007-03-28 00:01:02.0 + +++ /home/build/master/cache/broken_results.txt 2007-03-29 00:00:58.0 + @@ -1,4 +1,4 @@ -Build status as of Wed Mar 28 00:00:02 2007 +Build status as of Thu Mar 29 00:00:02 2007 Build counts: Tree Total Broken Panic
svn commit: samba r22005 - in branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr: .
Author: mimir Date: 2007-03-28 23:01:35 + (Wed, 28 Mar 2007) New Revision: 22005 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22005 Log: Add more code (doesn't work at the moment) preparing a place for listing user accounts. 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-28 22:52:37 UTC (rev 22004) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Fsm.js 2007-03-28 23:01:35 UTC (rev 22005) @@ -62,7 +62,9 @@ "appear" : { "swat.main.canvas" : - "Transition_Idle_to_AwaitRpcResult_via_canvas_appear" + "Transition_Idle_to_AwaitRpcResult_via_canvas_appear", +"vlayout": + "Transition_Idle_to_AwaitRpcResult_via_vlayout_appear" }, "changeSelection" : @@ -80,14 +82,29 @@ "Transition_Idle_to_AwaitRpcResult_via_canvas_appear", { "nextState" : "State_AwaitRpcResult", - + + "ontransition" : function(fsm, event) + { +var request = _this.callRpc(fsm, "samba.ejsnet", "NetContext", []); + request.setUserData("requestType", "NetContext"); + } +}); + + // Add the new transition + state.addTransition(trans); + + var trans = new qx.util.fsm.Transition( +"Transition_Idle_to_AwaitRpcResult_via_vlayout_appear", +{ + "nextState" : "State_AwaitRpcResult", + "ontransition" : - function(fsm, event) - { +function(fsm, event) +{ // Request our netbios name to add proper node to the tree var request = _this.callRpc(fsm, "samba.config", "lp_get", [ "netbios name" ]); request.setUserData("requestType", "hostname"); - } +} }); // Add the new transition @@ -98,25 +115,15 @@ { "nextState" : "State_AwaitRpcResult", - "ontransition" : - function(fsm, event) + "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 - } + +var params = (parentNode.credentials == undefined) ? [] : [ parentNode.credentials ]; } }); @@ -128,10 +135,12 @@ { "appear": { - "tree" : qx.util.fsm.FiniteStateMachine.EventHandling.BLOCKED + "tree" : qx.util.fsm.FiniteStateMachine.EventHandling.BLOCKED, + "vlayout" : qx.util.fsm.FiniteStateMachine.EventHandling.BLOCKED } } + // Add blocked events this.addAwaitRpcResultState(module, blockedEvents); }; 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-28 22:52:37 UTC (rev 22004) +++ branches/SAMBA_4_0/webapps/swat/source/class/swat/module/netmgr/Gui.js 2007-03-28 23:01:35 UTC (rev 22005) @@ -13,22 +13,22 @@ //qx.OO.addProperty({ name : "_tree", type : "object" }); +//qx.OO.addProperty({ name : "_panel", type : "object" }); qx.Proto.buildGui = function(module) { var fsm = module.fsm; - // We need a horizontal box layout for the database name - var vlayout = new qx.ui.layout.VerticalBoxLayout(); - vlayout.set({ - top: 20, - left: 20, - right: 20, - bottom: 20 + var hlayout = new qx.ui.layout.HorizontalBoxLayout(); + hlayout.set({ +top: 0, +left: 0, +right: 0, + height: "80%" }); - + // Create a hosts tree - this._tree = new qx.ui.treevirtual.TreeVirtual(["Net"]); + this._tree = new qx.ui.treevirtual.TreeVirtual(["Hosts"]); var tree = this._tree; // Set the tree's properties @@ -36,8 +36,8 @@ backgroundColor: 255, border: qx.renderer.border.BorderPresets.getInstance().thinInset, overflow: "hidden", - width: "30%", - height: "1*", + width: "20%", + height: "100%", alwaysShowOpenCloseSymbol: true }); @@ -48,10 +48,44 @@
svn commit: samba r22004 - in branches/SAMBA_4_0: . source/pidl/lib/Parse/Pidl/Wireshark
Author: jelmer Date: 2007-03-28 22:52:37 + (Wed, 28 Mar 2007) New Revision: 22004 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22004 Log: Check for dereferencing null pointers. Patch by Ronnie Sahlberg. Modified: branches/SAMBA_4_0/ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm Changeset: Property changes on: branches/SAMBA_4_0 ___ Name: bzr:merge ...skipped... Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm 2007-03-28 19:47:59 UTC (rev 22003) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Wireshark/NDR.pm 2007-03-28 22:52:37 UTC (rev 22004) @@ -162,8 +162,12 @@ pidl_code "$dissectorname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)"; pidl_code "{"; indent; - pidl_code "g$e->{BASE_TYPE} parameter;"; + pidl_code "g$e->{BASE_TYPE} parameter=0;"; + pidl_code "if(param){"; + indent; pidl_code "parameter=(g$e->{BASE_TYPE})*param;"; + deindent; + pidl_code "}"; pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, ¶meter);"; pidl_code "if(param){"; indent;
svn commit: samba r22003 - in branches: SAMBA_3_0/source/include SAMBA_3_0/source/libsmb SAMBA_3_0/source/utils SAMBA_3_0_25/source/include SAMBA_3_0_25/source/libsmb SAMBA_3_0_25/source/utils
Author: jra Date: 2007-03-28 19:47:59 + (Wed, 28 Mar 2007) New Revision: 22003 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22003 Log: Fix from [EMAIL PROTECTED] to wrap our krb5_locate_kdc call as smb_krb5_locate_kdc to prevent incorrect linking and crashes on Solaris. Jeremy. Modified: branches/SAMBA_3_0/source/include/includes.h branches/SAMBA_3_0/source/libsmb/clikrb5.c branches/SAMBA_3_0/source/utils/net_lookup.c branches/SAMBA_3_0_25/source/include/includes.h branches/SAMBA_3_0_25/source/libsmb/clikrb5.c branches/SAMBA_3_0_25/source/utils/net_lookup.c Changeset: Modified: branches/SAMBA_3_0/source/include/includes.h === --- branches/SAMBA_3_0/source/include/includes.h2007-03-28 14:16:34 UTC (rev 22002) +++ branches/SAMBA_3_0/source/include/includes.h2007-03-28 19:47:59 UTC (rev 22003) @@ -1120,7 +1120,10 @@ int create_kerberos_key_from_string_direct(krb5_context context, krb5_principal host_princ, krb5_data *password, krb5_keyblock *key, krb5_enctype enctype); BOOL get_auth_data_from_tkt(TALLOC_CTX *mem_ctx, DATA_BLOB *auth_data, krb5_ticket *tkt); krb5_const_principal get_principal_from_tkt(krb5_ticket *tkt); +krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); +#if defined(HAVE_KRB5_LOCATE_KDC) krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters); +#endif krb5_error_code get_kerberos_allowed_etypes(krb5_context context, krb5_enctype **enctypes); BOOL get_krb5_smb_session_key(krb5_context context, krb5_auth_context auth_context, DATA_BLOB *session_key, BOOL remote); krb5_error_code smb_krb5_kt_free_entry(krb5_context context, krb5_keytab_entry *kt_entry); Modified: branches/SAMBA_3_0/source/libsmb/clikrb5.c === --- branches/SAMBA_3_0/source/libsmb/clikrb5.c 2007-03-28 14:16:34 UTC (rev 22002) +++ branches/SAMBA_3_0/source/libsmb/clikrb5.c 2007-03-28 19:47:59 UTC (rev 22003) @@ -393,7 +393,7 @@ #if defined(KRB5_KRBHST_INIT) /* Heimdal */ - krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters) + krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters) { krb5_krbhst_handle hnd; krb5_krbhst_info *hinfo; @@ -407,7 +407,7 @@ rc = krb5_krbhst_init(ctx, realm->data, KRB5_KRBHST_KDC, &hnd); if (rc) { - DEBUG(0, ("krb5_locate_kdc: krb5_krbhst_init failed (%s)\n", error_message(rc))); + DEBUG(0, ("smb_krb5_locate_kdc: krb5_krbhst_init failed (%s)\n", error_message(rc))); return rc; } @@ -417,14 +417,14 @@ krb5_krbhst_reset(ctx, hnd); if (!num_kdcs) { - DEBUG(0, ("krb5_locate_kdc: zero kdcs found !\n")); + DEBUG(0, ("smb_krb5_locate_kdc: zero kdcs found !\n")); krb5_krbhst_free(ctx, hnd); return -1; } sa = SMB_MALLOC_ARRAY( struct sockaddr, num_kdcs ); if (!sa) { - DEBUG(0, ("krb5_locate_kdc: malloc failed\n")); + DEBUG(0, ("smb_krb5_locate_kdc: malloc failed\n")); krb5_krbhst_free(ctx, hnd); naddrs = 0; return -1; @@ -454,7 +454,7 @@ #else /* ! defined(KRB5_KRBHST_INIT) */ - krb5_error_code krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, + krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, struct sockaddr **addr_pp, int *naddrs, int get_masters) { DEBUG(0, ("unable to explicitly locate the KDC on this platform\n")); @@ -463,6 +463,14 @@ #endif /* KRB5_KRBHST_INIT */ +#else /* ! HAVE_KRB5_LOCATE_KDC */ + + krb5_error_code smb_krb5_locate_kdc(krb5_context ctx, const krb5_data *realm, + struct sockaddr **addr_pp, int *naddrs, int get_masters) +{ + return krb5_locate_kdc(ctx, realm, addr_pp, naddrs, get_masters); +} + #endif /* HAVE_KRB5_LOCATE_KDC */ #if !defined(HAVE_KRB5_FREE_UNPARSED_NAME) Modified: branches/SAMBA_3_0/source/utils/net_lookup.c === --- branches/SAMBA_3_0/source/utils/net_lookup.c2007-03-28 14:16:34 UTC (rev 22002) +++ branches/SAMBA_3_0/source/utils/net_lookup.c2007-03-28 19:47:59 UTC (rev 22003) @@ -238,9 +238,9 @@ realm.length = strlen((const char *)realm.data); } - rc = krb5_locate_kdc(ctx, &realm, (struct sockaddr **)(void *)&addrs, &num_kdcs, 0); + rc = smb_krb5_locate_kdc(ctx, &realm, (struct sockaddr **)(void *)&addrs, &num_kdcs, 0); if (rc) { - DE
svn commit: samba-web r1097 - in trunk/DTD: .
Author: idra Date: 2007-03-28 14:49:57 + (Wed, 28 Mar 2007) New Revision: 1097 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1097 Log: Clarify what happens when both -N is specified and a password is provided on command line. This is based on smbclient behavior. Simo. Modified: trunk/DTD/samba.entities Changeset: Modified: trunk/DTD/samba.entities === --- trunk/DTD/samba.entities2007-03-22 12:56:00 UTC (rev 1096) +++ trunk/DTD/samba.entities2007-03-28 14:49:57 UTC (rev 1097) @@ -339,7 +339,11 @@ Unless a password is specified on the command line or this parameter is specified, the client will request a -password. +password. + +If a password is specified on the command line and this +option is also defined the password on the command line will +be silently ingnored and no password will be used. '>
svn commit: samba r22002 - in branches: SAMBA_3_0/source/client SAMBA_3_0_25/source/client
Author: idra Date: 2007-03-28 14:16:34 + (Wed, 28 Mar 2007) New Revision: 22002 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22002 Log: Fix bug #3974, there are still open issues with -N behavior (doc fix next) and -T argument parsing behavior (which is just insane but a separate bug) Modified: branches/SAMBA_3_0/source/client/client.c branches/SAMBA_3_0_25/source/client/client.c Changeset: Modified: branches/SAMBA_3_0/source/client/client.c === --- branches/SAMBA_3_0/source/client/client.c 2007-03-28 13:34:59 UTC (rev 22001) +++ branches/SAMBA_3_0/source/client/client.c 2007-03-28 14:16:34 UTC (rev 22002) @@ -3891,6 +3891,8 @@ char *p; int rc = 0; fstring new_workgroup; + BOOL tar_opt = False; + BOOL service_opt = False; struct poptOption long_options[] = { POPT_AUTOHELP @@ -3937,13 +3939,43 @@ x_setbuf( dbf, NULL ); } - pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, - POPT_CONTEXT_KEEP_FIRST); + /* skip argv(0) */ + pc = poptGetContext("smbclient", argc, (const char **) argv, long_options, 0); poptSetOtherOptionHelp(pc, "service "); in_client = True; /* Make sure that we tell lp_load we are */ while ((opt = poptGetNextOpt(pc)) != -1) { + + /* if the tar option has been called previouslt, now we need to eat out the leftovers */ + /* I see no other way to keep things sane --SSS */ + if (tar_opt == True) { + while (poptPeekArg(pc)) { + poptGetArg(pc); + } + tar_opt = False; + } + + /* if the service has not yet been specified lets see if it is available in the popt stack */ + if (!service_opt && poptPeekArg(pc)) { + pstrcpy(service, poptGetArg(pc)); + /* Convert any '/' characters in the service name to '\' characters */ + string_replace(service, '/','\\'); + + if (count_chars(service,'\\') < 3) { + d_printf("\n%s: Not enough '\\' characters in service\n",service); + poptPrintUsage(pc, stderr, 0); + exit(1); + } + service_opt = True; + } + + /* if the service has already been retrieved then check if we have also a password */ + if (service_opt && (!cmdline_auth_info.got_pass) && poptPeekArg(pc)) { + pstrcpy(cmdline_auth_info.password, poptGetArg(pc)); + cmdline_auth_info.got_pass = True; + } + switch (opt) { case 'M': /* Messages are sent to NetBIOS name type 0x3 @@ -3998,13 +4030,9 @@ poptPrintUsage(pc, stderr, 0); exit(1); } - /* Now we must eat (optnum - i) options - they have -* been processed by tar_parseargs(). -*/ - optnum -= i; - for (i = 0; i < optnum; i++) - poptGetOptArg(pc); } + /* this must be the last option, mark we have parsed it so that we know we have */ + tar_opt = True; break; case 'D': pstrcpy(base_directory,poptGetOptArg(pc)); @@ -4015,8 +4043,34 @@ } } - poptGetArg(pc); + /* We may still have some leftovers after the last popt option has been called */ + if (tar_opt == True) { + while (poptPeekArg(pc)) { + poptGetArg(pc); + } + tar_opt = False; + } + /* if the service has not yet been specified lets see if it is available in the popt stack */ + if (!service_opt && poptPeekArg(pc)) { + pstrcpy(service, poptGetArg(pc)); + /* Convert any '/' characters in the service name to '\' characters */ + string_replace(service, '/','\\'); + + if (count_chars(service,'\\') < 3) { + d_printf("\n%s: Not enough '\\' characters in service\n",service); + poptPrintUsage(pc, stderr, 0); + exit(1); + } + service_opt = True; + } + + /* if the service has already been retrieved then check if we have also a password */ +
svn commit: samba r22001 - in branches/SAMBA_3_0/source: auth client lib librpc/ndr libsmb nmbd nsswitch passdb registry rpc_client rpc_parse rpc_server smbd torture utils
Author: metze Date: 2007-03-28 13:34:59 + (Wed, 28 Mar 2007) New Revision: 22001 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22001 Log: change prototype of dump_data(), so that it takes unsigned char * now, which matches what samba4 has. also fix all the callers to prevent compiler warnings metze Modified: branches/SAMBA_3_0/source/auth/auth.c branches/SAMBA_3_0/source/auth/auth_ntlmssp.c branches/SAMBA_3_0/source/auth/auth_util.c branches/SAMBA_3_0/source/client/clitar.c branches/SAMBA_3_0/source/lib/util.c branches/SAMBA_3_0/source/librpc/ndr/ndr_basic.c branches/SAMBA_3_0/source/libsmb/clirap.c branches/SAMBA_3_0/source/libsmb/ntlm_check.c branches/SAMBA_3_0/source/libsmb/ntlmssp.c branches/SAMBA_3_0/source/libsmb/ntlmssp_sign.c branches/SAMBA_3_0/source/libsmb/smb_signing.c branches/SAMBA_3_0/source/libsmb/smbencrypt.c branches/SAMBA_3_0/source/nmbd/nmbd_processlogon.c branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c branches/SAMBA_3_0/source/nsswitch/winbindd_creds.c branches/SAMBA_3_0/source/nsswitch/winbindd_pam.c branches/SAMBA_3_0/source/passdb/pdb_smbpasswd.c branches/SAMBA_3_0/source/registry/reg_eventlog.c branches/SAMBA_3_0/source/rpc_client/cli_pipe.c branches/SAMBA_3_0/source/rpc_parse/parse_net.c branches/SAMBA_3_0/source/rpc_parse/parse_prs.c branches/SAMBA_3_0/source/rpc_parse/parse_samr.c branches/SAMBA_3_0/source/rpc_server/srv_lsa_hnd.c branches/SAMBA_3_0/source/rpc_server/srv_netlog_nt.c branches/SAMBA_3_0/source/rpc_server/srv_pipe_hnd.c branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c branches/SAMBA_3_0/source/rpc_server/srv_spoolss_nt.c branches/SAMBA_3_0/source/smbd/chgpasswd.c branches/SAMBA_3_0/source/smbd/msdfs.c branches/SAMBA_3_0/source/smbd/nttrans.c branches/SAMBA_3_0/source/smbd/trans2.c branches/SAMBA_3_0/source/torture/cmd_vfs.c branches/SAMBA_3_0/source/torture/torture.c branches/SAMBA_3_0/source/utils/ntlm_auth.c branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c Changeset: Sorry, the patch is too large (1196 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22001
svn commit: samba r22000 - in branches/SAMBA_3_0/source/utils: .
Author: metze Date: 2007-03-28 13:31:52 + (Wed, 28 Mar 2007) New Revision: 22000 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22000 Log: remove useless casts metze Modified: branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c Changeset: Modified: branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c === --- branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2007-03-28 13:26:43 UTC (rev 21999) +++ branches/SAMBA_3_0/source/utils/ntlm_auth_diagnostics.c 2007-03-28 13:31:52 UTC (rev 22000) @@ -243,10 +243,10 @@ DATA_BLOB nt_response = data_blob(NULL, 24); DATA_BLOB session_key = data_blob(NULL, 16); - char lm_key[8]; - char lm_hash[16]; - char user_session_key[16]; - char nt_hash[16]; + uint8 lm_key[8]; + uint8 lm_hash[16]; + uint8 user_session_key[16]; + uint8 nt_hash[16]; DATA_BLOB chall = get_challenge(); char *error_string; @@ -257,10 +257,10 @@ flags |= WBFLAG_PAM_USER_SESSION_KEY; SMBNTencrypt(opt_password,chall.data,nt_response.data); - E_md4hash(opt_password, (unsigned char *)nt_hash); - SMBsesskeygen_ntv1((const unsigned char *)nt_hash, NULL, session_key.data); + E_md4hash(opt_password, nt_hash); + SMBsesskeygen_ntv1(nt_hash, NULL, session_key.data); - E_deshash(opt_password, (unsigned char *)lm_hash); + E_deshash(opt_password, lm_hash); nt_status = contact_winbind_auth_crap(opt_username, opt_domain, opt_workstation, @@ -268,8 +268,8 @@ &nt_response, &nt_response, flags, - (unsigned char *)lm_key, - (unsigned char *)user_session_key, + lm_key, + user_session_key, &error_string, NULL); data_blob_free(&nt_response);
svn commit: samba r21999 - in branches/SAMBA_3_0/source/auth: .
Author: metze Date: 2007-03-28 13:26:43 + (Wed, 28 Mar 2007) New Revision: 21999 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21999 Log: remove useless casts metze Modified: branches/SAMBA_3_0/source/auth/auth_util.c Changeset: Modified: branches/SAMBA_3_0/source/auth/auth_util.c === --- branches/SAMBA_3_0/source/auth/auth_util.c 2007-03-28 10:00:42 UTC (rev 21998) +++ branches/SAMBA_3_0/source/auth/auth_util.c 2007-03-28 13:26:43 UTC (rev 21999) @@ -241,8 +241,8 @@ const uchar nt_interactive_pwd[16], const uchar *dc_sess_key) { - char lm_pwd[16]; - char nt_pwd[16]; + unsigned char lm_pwd[16]; + unsigned char nt_pwd[16]; unsigned char local_lm_response[24]; unsigned char local_nt_response[24]; unsigned char key[16]; @@ -268,10 +268,10 @@ #endif if (lm_interactive_pwd) - SamOEMhash((uchar *)lm_pwd, key, sizeof(lm_pwd)); + SamOEMhash(lm_pwd, key, sizeof(lm_pwd)); if (nt_interactive_pwd) - SamOEMhash((uchar *)nt_pwd, key, sizeof(nt_pwd)); + SamOEMhash(nt_pwd, key, sizeof(nt_pwd)); #ifdef DEBUG_PASSWORD DEBUG(100,("decrypt of lm owf password:")); @@ -282,11 +282,11 @@ #endif if (lm_interactive_pwd) - SMBOWFencrypt((const unsigned char *)lm_pwd, chal, + SMBOWFencrypt(lm_pwd, chal, local_lm_response); if (nt_interactive_pwd) - SMBOWFencrypt((const unsigned char *)nt_pwd, chal, + SMBOWFencrypt(nt_pwd, chal, local_nt_response); /* Password info paranoia */
svn commit: samba r21998 - in branches: SAMBA_3_0/source/libsmb SAMBA_3_0_25/source/libsmb
Author: gd Date: 2007-03-28 10:00:42 + (Wed, 28 Mar 2007) New Revision: 21998 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21998 Log: Fix tdb keynames in netsamlogon_clear_cached_user(). No point in deleting U/DOMAIN/RID and UG/DOMAIN/RID keys if we only store U/SID and UG/SID keys :-) Next we need to verify the need of calling netsamlogon_clear_cached_user() at all. Guenther Modified: branches/SAMBA_3_0/source/libsmb/samlogon_cache.c branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c Changeset: Modified: branches/SAMBA_3_0/source/libsmb/samlogon_cache.c === --- branches/SAMBA_3_0/source/libsmb/samlogon_cache.c 2007-03-28 01:11:27 UTC (rev 21997) +++ branches/SAMBA_3_0/source/libsmb/samlogon_cache.c 2007-03-28 10:00:42 UTC (rev 21998) @@ -59,9 +59,10 @@ ***/ void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, NET_USER_INFO_3 *user) { - fstring domain; TDB_DATA key; BOOL got_tdb = False; + DOM_SID sid; + fstring key_str, sid_string; /* We may need to call this function from smbd which will not have winbindd_cache.tdb open. Open the tdb if a NULL is passed. */ @@ -77,30 +78,25 @@ got_tdb = True; } - unistr2_to_ascii(domain, &user->uni_logon_dom, sizeof(domain) - 1); + sid_copy(&sid, &user->dom_sid.sid); + sid_append_rid(&sid, user->user_rid); - /* Clear U/DOMAIN/RID cache entry */ + /* Clear U/SID cache entry */ - asprintf(&key.dptr, "U/%s/%d", domain, user->user_rid); - key.dsize = strlen(key.dptr) - 1; /* keys are not NULL terminated */ + fstr_sprintf(key_str, "U/%s", sid_to_string(sid_string, &sid)); - DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key.dptr)); + DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key_str)); - tdb_delete(tdb, key); + tdb_delete(tdb, string_tdb_data(key_str)); - SAFE_FREE(key.dptr); + /* Clear UG/SID cache entry */ - /* Clear UG/DOMAIN/RID cache entry */ + fstr_sprintf(key_str, "UG/%s", sid_to_string(sid_string, &sid)); - asprintf(&key.dptr, "UG/%s/%d", domain, user->user_rid); - key.dsize = strlen(key.dptr) - 1; /* keys are not NULL terminated */ - DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key.dptr)); - tdb_delete(tdb, key); + tdb_delete(tdb, string_tdb_data(key_str)); - SAFE_FREE(key.dptr); - if (got_tdb) tdb_close(tdb); } Modified: branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c === --- branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-03-28 01:11:27 UTC (rev 21997) +++ branches/SAMBA_3_0_25/source/libsmb/samlogon_cache.c2007-03-28 10:00:42 UTC (rev 21998) @@ -59,9 +59,10 @@ ***/ void netsamlogon_clear_cached_user(TDB_CONTEXT *tdb, NET_USER_INFO_3 *user) { - fstring domain; TDB_DATA key; BOOL got_tdb = False; + DOM_SID sid; + fstring key_str, sid_string; /* We may need to call this function from smbd which will not have winbindd_cache.tdb open. Open the tdb if a NULL is passed. */ @@ -77,30 +78,25 @@ got_tdb = True; } - unistr2_to_ascii(domain, &user->uni_logon_dom, sizeof(domain) - 1); + sid_copy(&sid, &user->dom_sid.sid); + sid_append_rid(&sid, user->user_rid); - /* Clear U/DOMAIN/RID cache entry */ + /* Clear U/SID cache entry */ - asprintf(&key.dptr, "U/%s/%d", domain, user->user_rid); - key.dsize = strlen(key.dptr) - 1; /* keys are not NULL terminated */ + fstr_sprintf(key_str, "U/%s", sid_to_string(sid_string, &sid)); - DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key.dptr)); + DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key_str)); - tdb_delete(tdb, key); + tdb_delete(tdb, string_tdb_data(key_str)); - SAFE_FREE(key.dptr); + /* Clear UG/SID cache entry */ - /* Clear UG/DOMAIN/RID cache entry */ + fstr_sprintf(key_str, "UG/%s", sid_to_string(sid_string, &sid)); - asprintf(&key.dptr, "UG/%s/%d", domain, user->user_rid); - key.dsize = strlen(key.dptr) - 1; /* keys are not NULL terminated */ - DEBUG(10, ("netsamlogon_clear_cached_user: clearing %s\n", key.dptr)); - tdb_delete(tdb, key); + tdb_delete(tdb, string_tdb_data(key_str)); - SAFE_FREE(key.dptr); - if (got_tdb) tdb_close(tdb); }