svn commit: samba r4095 - in branches/SAMBA_4_0/source/smb_server: .
Author: tridge Date: 2004-12-08 08:09:42 + (Wed, 08 Dec 2004) New Revision: 4095 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4095 Log: smbsrv_terminate_connection() doesn't exit() in single processor mode, so after we call it we need to return, and not continue processing packets Modified: branches/SAMBA_4_0/source/smb_server/negprot.c branches/SAMBA_4_0/source/smb_server/reply.c branches/SAMBA_4_0/source/smb_server/request.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/negprot.c === --- branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 08:09:42 UTC (rev 4095) @@ -63,6 +63,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, CORE does not support SMB signing, and it is mandetory\n); + return; } req_send_reply(req); @@ -95,6 +96,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, COREPLUS does not support SMB signing, and it is mandetory\n); + return; } req_send_reply(req); @@ -145,6 +147,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, LANMAN1 does not support SMB signing, and it is mandetory\n); + return; } req_send_reply(req); @@ -193,6 +196,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, LANMAN2 does not support SMB signing, and it is mandetory\n); + return; } req_send_reply(req); Modified: branches/SAMBA_4_0/source/smb_server/reply.c === --- branches/SAMBA_4_0/source/smb_server/reply.c2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/reply.c2004-12-08 08:09:42 UTC (rev 4095) @@ -2378,14 +2378,17 @@ switch (msg_type) { case 0x81: /* session request */ if (req-smb_conn-negotiate.done_nbt_session) { - smbsrv_terminate_connection(req-smb_conn, multiple session request not permitted); + smbsrv_terminate_connection(req-smb_conn, + multiple session request not permitted); + return; } SCVAL(buf,0,0x82); SCVAL(buf,3,0); DEBUG(0,(REWRITE: not parsing netbios names in NBT session request!\n)); - /* TODO: store the name for the session setup 'remote machine' code, as well as smbstatus */ + /* TODO: store the name for the session setup 'remote + machine' code, as well as smbstatus */ req-smb_conn-negotiate.done_nbt_session = True; Modified: branches/SAMBA_4_0/source/smb_server/request.c === --- branches/SAMBA_4_0/source/smb_server/request.c 2004-12-08 03:02:29 UTC (rev 4094) +++ branches/SAMBA_4_0/source/smb_server/request.c 2004-12-08 08:09:42 UTC (rev 4095) @@ -86,6 +86,7 @@ req-out.buffer = talloc_realloc(req, req-out.buffer, req-out.allocated); if (!req-out.buffer) { smbsrv_terminate_connection(req-smb_conn, allocation failed); + return; } req-out.hdr = req-out.buffer + NBT_HDR_SIZE; @@ -120,6 +121,7 @@ req-out.buffer = talloc(req, req-out.allocated); if (!req-out.buffer) { smbsrv_terminate_connection(req-smb_conn, allocation failed); + return; } req-out.hdr = req-out.buffer + NBT_HDR_SIZE;
svn commit: samba r4096 - in branches/SAMBA_4_0/source: . build/smb_build dsdb dsdb/common dsdb/samdb rpc_server rpc_server/samr
Author: metze Date: 2004-12-08 08:21:35 + (Wed, 08 Dec 2004) New Revision: 4096 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4096 Log: move the samdb code to source/dsdb/ the idea is to have a directory service db layer which will be used by the ldap server, samr server, drsuapi server authentification... I plan to make different implementations of this interface possible - current default will be the current samdb code with sam.ldb - a compat implementation for samba3 (if someone wants to write one) - a new dsdb implementation which: - understands naming contexts (directory parrtitions) - do schema and acl checking checking - maintain objectGUID, timestamps and USN number, maybe linked attributes ('member' and 'memberOf' attributes) - store metadata on a attribute=value combination... metze Added: branches/SAMBA_4_0/source/dsdb/ branches/SAMBA_4_0/source/dsdb/common/ branches/SAMBA_4_0/source/dsdb/common/flag_mapping.c branches/SAMBA_4_0/source/dsdb/samdb/ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c Removed: branches/SAMBA_4_0/source/rpc_server/samr/samdb.c branches/SAMBA_4_0/source/rpc_server/samr/samr_utils.c Modified: branches/SAMBA_4_0/source/build/smb_build/main.pm branches/SAMBA_4_0/source/rpc_server/config.mk Changeset: Sorry, the patch is too large (1088 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4096
svn commit: samba r4097 - in branches/SAMBA_4_0/source/dsdb: .
Author: metze Date: 2004-12-08 10:13:45 + (Wed, 08 Dec 2004) New Revision: 4097 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4097 Log: add missing file from last commit sorry!:-) metze Added: branches/SAMBA_4_0/source/dsdb/config.mk Changeset: Added: branches/SAMBA_4_0/source/dsdb/config.mk === --- branches/SAMBA_4_0/source/dsdb/config.mk2004-12-08 08:21:35 UTC (rev 4096) +++ branches/SAMBA_4_0/source/dsdb/config.mk2004-12-08 10:13:45 UTC (rev 4097) @@ -0,0 +1,15 @@ +# Directory Service subsystem + + +# Start SUBSYSTEM SAMDB +[SUBSYSTEM::SAMDB] +INIT_OBJ_FILES = \ + dsdb/samdb/samdb.o +ADD_OBJ_FILES = \ + dsdb/common/flag_mapping.o +REQUIRED_SUBSYSTEMS = \ + DCERPC_COMMON \ + LIBLDB +# +# End SUBSYSTEM SAMDB +
svn commit: samba r4098 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: tridge Date: 2004-12-08 10:24:10 + (Wed, 08 Dec 2004) New Revision: 4098 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4098 Log: catch null guid string so RPC-DRSUAPI works against my server Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c 2004-12-08 10:13:45 UTC (rev 4097) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_misc.c 2004-12-08 10:24:10 UTC (rev 4098) @@ -37,6 +37,10 @@ uint32_t node[6]; int i; + if (s == NULL) { + return NT_STATUS_INVALID_PARAMETER; + } + if (11 == sscanf(s, %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x, time_low, time_mid, time_hi_and_version, clock_seq[0], clock_seq[1],
svn commit: samba r4099 - in branches/SAMBA_4_0/source/smb_server: .
Author: tpot Date: 2004-12-08 10:36:14 + (Wed, 08 Dec 2004) New Revision: 4099 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4099 Log: Spelling fixes. Modified: branches/SAMBA_4_0/source/smb_server/negprot.c branches/SAMBA_4_0/source/smb_server/signing.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/negprot.c === --- branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 10:24:10 UTC (rev 4098) +++ branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-08 10:36:14 UTC (rev 4099) @@ -62,7 +62,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, - CORE does not support SMB signing, and it is mandetory\n); + CORE does not support SMB signing, and it is mandatory\n); return; } @@ -95,7 +95,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, - COREPLUS does not support SMB signing, and it is mandetory\n); + COREPLUS does not support SMB signing, and it is mandatory\n); return; } @@ -146,7 +146,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, - LANMAN1 does not support SMB signing, and it is mandetory\n); + LANMAN1 does not support SMB signing, and it is mandatory\n); return; } @@ -195,7 +195,7 @@ if (req-smb_conn-signing.mandatory_signing) { smbsrv_terminate_connection(req-smb_conn, - LANMAN2 does not support SMB signing, and it is mandetory\n); + LANMAN2 does not support SMB signing, and it is mandatory\n); return; } Modified: branches/SAMBA_4_0/source/smb_server/signing.c === --- branches/SAMBA_4_0/source/smb_server/signing.c 2004-12-08 10:24:10 UTC (rev 4098) +++ branches/SAMBA_4_0/source/smb_server/signing.c 2004-12-08 10:36:14 UTC (rev 4099) @@ -84,8 +84,8 @@ srv_setup_signing(smb_conn, session_key, response); smb_conn-signing.next_seq_num = 2; if (smb_conn-signing.mandatory_signing) { - DEBUG(5, (Configured for mandetory signing, 'good packet seen' forced on\n)); - /* if this is mandetory, then + DEBUG(5, (Configured for mandatory signing, 'good packet seen' forced on\n)); + /* if this is mandatory, then * pretend we have seen a * valid packet, so we don't * turn it off */
svn commit: samba r4100 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: metze Date: 2004-12-08 10:54:09 + (Wed, 08 Dec 2004) New Revision: 4100 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4100 Log: fix drsuapi_DsReplicaObjMetaData2() idl (many thanks to tridge for telling me that HYPER_T isn't the same as uint64!) metze Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl === --- branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2004-12-08 10:36:14 UTC (rev 4099) +++ branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2004-12-08 10:54:09 UTC (rev 4100) @@ -370,8 +370,8 @@ GUID source_dsa_obj_guid; GUID source_dsa_invocation_id; GUID transport_obj_guid; - uint64 tmp_highest_usn; - uint64 highest_usn; + HYPER_T tmp_highest_usn; + HYPER_T highest_usn; NTTIME last_success; NTTIME last_attempt; WERROR result_last_attempt; @@ -386,7 +386,7 @@ typedef struct { GUID source_dsa_invocation_id; - uint64 highest_usn; + HYPER_T highest_usn; } drsuapi_DsReplicaCoursor; typedef struct { @@ -400,8 +400,8 @@ uint32 version; NTTIME originating_last_changed; GUID originating_dsa_invocation_id; - uint64 originating_usn; - uint64 local_usn; + HYPER_T originating_usn; + HYPER_T local_usn; } drsuapi_DsReplicaObjMetaData; typedef struct { @@ -453,8 +453,8 @@ uint32 version; NTTIME originating_last_changed; GUID originating_dsa_invocation_id; - uint64 originating_usn; - uint64 local_usn; + HYPER_T originating_usn; + HYPER_T local_usn; } drsuapi_DsReplicaAttrValMetaData; typedef struct { @@ -465,7 +465,7 @@ typedef struct { GUID source_dsa_invocation_id; - uint64 highest_usn; + HYPER_T highest_usn; NTTIME last_sync_success; } drsuapi_DsReplicaCoursor2; @@ -477,7 +477,7 @@ typedef struct { GUID source_dsa_invocation_id; - uint64 highest_usn; + HYPER_T highest_usn; NTTIME last_sync_success; unistr *source_dsa_obj_dn; } drsuapi_DsReplicaCoursor3; @@ -489,14 +489,13 @@ } drsuapi_DsReplicaCoursor3Ctr; typedef struct { - uint32 attribute_name;/*unistr *attribute_name;*/ + unistr *attribute_name; uint32 version; NTTIME originating_last_changed; GUID originating_dsa_invocation_id; - uint64 originating_usn; - uint64 local_usn; - uint32 originating_dsa_obj_dn;/*unistr *originating_dsa_obj_dn;*/ - uint32 u1; /* in the last element this is not present; some stupid alignment? */ + HYPER_T originating_usn; + HYPER_T local_usn; + unistr *originating_dsa_obj_dn; } drsuapi_DsReplicaObjMetaData2; typedef struct { @@ -515,8 +514,8 @@ uint32 version; NTTIME originating_last_changed; GUID originating_dsa_invocation_id; - uint64 originating_usn; - uint64 local_usn; + HYPER_T originating_usn; + HYPER_T local_usn; unistr *originating_dsa_obj_dn; } drsuapi_DsReplicaAttrValMetaData2;
svn commit: samba r4101 - in branches/SAMBA_4_0/source/smb_server: .
Author: tridge Date: 2004-12-08 11:02:47 + (Wed, 08 Dec 2004) New Revision: 4101 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4101 Log: ignore secondary session requests to cope with a OS/2 bug reported by Guenter Kukkukk Modified: branches/SAMBA_4_0/source/smb_server/reply.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/reply.c === --- branches/SAMBA_4_0/source/smb_server/reply.c2004-12-08 10:54:09 UTC (rev 4100) +++ branches/SAMBA_4_0/source/smb_server/reply.c2004-12-08 11:02:47 UTC (rev 4101) @@ -2378,8 +2378,7 @@ switch (msg_type) { case 0x81: /* session request */ if (req-smb_conn-negotiate.done_nbt_session) { - smbsrv_terminate_connection(req-smb_conn, - multiple session request not permitted); + DEBUG(0,(Warning: ignoring secondary session request\n)); return; }
svn commit: samba r4102 - in branches/SAMBA_4_0/source/librpc: idl ndr
Author: metze Date: 2004-12-08 11:30:26 + (Wed, 08 Dec 2004) New Revision: 4102 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4102 Log: more uint64 vs HYPER_T fixes NOTE: [u]int64 uses 4 Byte alignment and HYPER_T uses 8 Byte alignment metze Modified: branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl === --- branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl 2004-12-08 11:02:47 UTC (rev 4101) +++ branches/SAMBA_4_0/source/librpc/idl/drsblobs.idl 2004-12-08 11:30:26 UTC (rev 4102) @@ -16,8 +16,8 @@ uint32 version; NTTIME_1sec orginating_time; GUID orginating_dsa; /* the 'invocationId' ? */ - uint64 orginating_usn; - uint64 local_usn; + HYPER_T orginating_usn; + HYPER_T local_usn; } replPropertyMetaData1; typedef struct { @@ -47,7 +47,7 @@ */ typedef struct { GUID invocation_id_guid; /* the 'invocationId' field of the CN=NTDS Settings object */ - uint64 highest_usn; /* updated after a full replication cycle */ + HYPER_T highest_usn; /* updated after a full replication cycle */ } replUpToDateVector1; typedef struct { @@ -58,7 +58,7 @@ typedef struct { GUID invocation_id_guid; /* the 'invocationId' field of the CN=NTDS Settings object */ - uint64 highest_usn; /* updated after a full replication cycle */ + HYPER_T highest_usn; /* updated after a full replication cycle */ NTTIME_1sec last_success; } replUpToDateVector2; @@ -104,9 +104,9 @@ uint32 replica_flags; uint8 schedule[84]; uint32 reserved; - uint64 tmp_highest_usn; /* updated after each object update */ - uint64 reserved_usn; - uint64 highest_usn; /* updated after a full replication cycle */ + HYPER_T tmp_highest_usn; /* updated after each object update */ + HYPER_T reserved_usn; + HYPER_T highest_usn; /* updated after a full replication cycle */ GUID source_dsa_obj_guid; /* the 'objectGuid' field of the CN=NTDS Settings object */ GUID source_dsa_invocation_id; /* the 'invocationId' field of the CN=NTDS Settings object */ GUID transport_guid; Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl === --- branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2004-12-08 11:02:47 UTC (rev 4101) +++ branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2004-12-08 11:30:26 UTC (rev 4102) @@ -526,7 +526,7 @@ } drsuapi_DsReplicaAttrValMetaData2Ctr; typedef struct { - uint64 u1; /* session number? */ + HYPER_T u1; /* session number? */ uint32 u2; uint32 u3; GUID bind_guid; @@ -556,7 +556,7 @@ uint32 u3; uint32 u4; uint32 u5; - uint64 u6; + HYPER_T u6; uint32 u7; } drsuapi_DsReplica06; Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h === --- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2004-12-08 11:02:47 UTC (rev 4101) +++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2004-12-08 11:30:26 UTC (rev 4102) @@ -200,12 +200,18 @@ #define ndr_size_uint16(t, p, flags) (NDR_SIZE_ALIGN(t, 2, flags) + 2) #define ndr_size_int32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) #define ndr_size_uint32(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) -#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8) -#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8) #define ndr_size_ptr(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 4) +/* + * [u]int64 uses 4 Byte alignment + * and HYPER_T uses 8 Byte alignment + */ +#define ndr_size_int64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8) +#define ndr_size_uint64(t, p, flags) (NDR_SIZE_ALIGN(t, 4, flags) + 8) +#define ndr_size_HYPER_T(t, p, flags) (NDR_SIZE_ALIGN(t, 8, flags) + 8) + #define ndr_size_NTTIME(t, p, flags) ndr_size_uint64(t, p, flags) -#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_NTTIME(t, p, flags) +#define ndr_size_NTTIME_1sec(t, p, flags) ndr_size_HYPER_T(t, p, flags) #define ndr_size_WERROR(t, p, flags) ndr_size_uint32(t, p, flags) #define ndr_size_NTSTATUS(t, p, flags) ndr_size_uint32(t, p, flags) Modified:
svn commit: samba-web r462 - in trunk/style: .
Author: deryck Date: 2004-12-08 15:34:50 + (Wed, 08 Dec 2004) New Revision: 462 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=462 Log: Remove yellow hover highlight from no software patents logo. --deryck Modified: trunk/style/main.css Changeset: Modified: trunk/style/main.css === --- trunk/style/main.css2004-12-07 19:46:06 UTC (rev 461) +++ trunk/style/main.css2004-12-08 15:34:50 UTC (rev 462) @@ -97,6 +97,9 @@ width:390px; height:90px; } +#noswp a:hover { +background-color:transparent; +} #noswp { width:100%; text-align:center;
svn commit: samba r4103 - in branches/SAMBA_3_0/source/torture: .
Author: herb Date: 2004-12-08 17:30:50 + (Wed, 08 Dec 2004) New Revision: 4103 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4103 Log: lock timeout is in milliseconds (as in reply.c) Modified: branches/SAMBA_3_0/source/torture/torture.c Changeset: Modified: branches/SAMBA_3_0/source/torture/torture.c === --- branches/SAMBA_3_0/source/torture/torture.c 2004-12-08 11:30:26 UTC (rev 4102) +++ branches/SAMBA_3_0/source/torture/torture.c 2004-12-08 17:30:50 UTC (rev 4103) @@ -870,7 +870,7 @@ lock_timeout = (1 + (random() % 20)); printf(Testing lock timeout with timeout=%u\n, lock_timeout); t1 = time(NULL); - if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 500, WRITE_LOCK)) { + if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 1000, WRITE_LOCK)) { printf(lock3 succeeded! This is a locking bug\n); return False; } else {
svn commit: samba-docs r304 - in trunk/Samba-Guide: .
Author: jht Date: 2004-12-08 17:33:50 + (Wed, 08 Dec 2004) New Revision: 304 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-docsrev=304 Log: Fix typo. Modified: trunk/Samba-Guide/Chap12-Appendix.xml Changeset: Modified: trunk/Samba-Guide/Chap12-Appendix.xml === --- trunk/Samba-Guide/Chap12-Appendix.xml 2004-12-07 19:33:15 UTC (rev 303) +++ trunk/Samba-Guide/Chap12-Appendix.xml 2004-12-08 17:33:50 UTC (rev 304) @@ -810,7 +810,7 @@ # Here We Go ... # -cat gt;gt;EOF +cat lt;lt;EOF How do you wish to refer to your organization?
svn commit: samba r4104 - in trunk/source/torture: .
Author: herb Date: 2004-12-08 17:43:04 + (Wed, 08 Dec 2004) New Revision: 4104 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4104 Log: lock timeout is in milliseconds (as in reply.c) Modified: trunk/source/torture/torture.c Changeset: Modified: trunk/source/torture/torture.c === --- trunk/source/torture/torture.c 2004-12-08 17:30:50 UTC (rev 4103) +++ trunk/source/torture/torture.c 2004-12-08 17:43:04 UTC (rev 4104) @@ -870,7 +870,7 @@ lock_timeout = (1 + (random() % 20)); printf(Testing lock timeout with timeout=%u\n, lock_timeout); t1 = time(NULL); - if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 500, WRITE_LOCK)) { + if (cli_lock(cli2, fnum3, 0, 4, lock_timeout * 1000, WRITE_LOCK)) { printf(lock3 succeeded! This is a locking bug\n); return False; } else {
svn commit: samba-web r463 - in trunk/news: style users
Author: deryck Date: 2004-12-08 18:15:39 + (Wed, 08 Dec 2004) New Revision: 463 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=samba-webrev=463 Log: Add a testimonial piece to news.samba.org. Also, a small tweak to news styles. --deryck Added: trunk/news/users/smooth_transition.html Modified: trunk/news/style/news.css Changeset: Modified: trunk/news/style/news.css === --- trunk/news/style/news.css 2004-12-08 15:34:50 UTC (rev 462) +++ trunk/news/style/news.css 2004-12-08 18:15:39 UTC (rev 463) @@ -76,7 +76,7 @@ .credit { font-size:small; font-style:italic; - margin-bottom:20px; + margin:30px 15px 20px 15px; } h4 { padding:0; Added: trunk/news/users/smooth_transition.html === --- trunk/news/users/smooth_transition.html 2004-12-08 15:34:50 UTC (rev 462) +++ trunk/news/users/smooth_transition.html 2004-12-08 18:15:39 UTC (rev 463) @@ -0,0 +1,61 @@ +h3a name=smooth_transitionTestimonials: Samba Was a Smooth Transition/a/h3 + +div class=article +pThinking about a move to Samba? Transitions can be frightening, but good +ones are never forgotten. Consider the following testimonials./p + +pHannu Tikka writes:/p + +blockquote +pIn october 2003, Raahe Business College migrated from Novell +NetWare 5.1 to Samba 3. Migration was quite smooth, of course at the start +there were a few issues, partly with the Samba version at that time, but +mainly they were about administrators limited knowledge about windows domain +environment. Our environment is ~200 w2k workstations, ~400 users with +roaming profiles, PDC and BDC samba-servers with replicated OpenLDAP +backend./p + +pWe have moved to linux-servers with small steps. Starting with web +services at 2000, a year after that mail services and finally the Samba +migration. All the time we have been using linux systems the main +impression has been excellent reliability, performance and flexibility. +Now we have been running our samba-system without any problems for +months and we are very satisfied and amazed for the work of the Samba +Team./p +/blockquote + +pAlso, Ernesto Arturo Valderrama Blum from CIAT, a small engineering +center in Queretaro, Mexico had good things to say about his experiences +with a Samba migration. He writes:/p + +blockquote +pWhen we started, we chose Linux and Samba, because we had a +very small budget. We had around 10,000 US for all our IT +specific needs (hardware and software). After buying our +network switches, we had zero money left./p + +pWe didn't have enough money for a Windows server, so we used +Linux Redhat 5.2 Cartman and Samba 1.8 or 2.1 (I don't +remember which) to serve 50 HPUX workstations and 20 PCs./p + +pWe quickly discovered how easily Samba is configured to suit our +needs, and its stability. Now we have around 30 Linux servers, most of +them with Samba, serving 600 machines. One of our most heavily used servers +has 383 days up and running continuously, interrupting the Samba service +nly briefly when we upgrade samba./p + +pI'm very grateful to the Samba Team for these 5 years I have +been using Samba. I don't know how things could have been if we hadn't +chosen Samba 5 years ago, but I know we are where we are now in +part because of you./p +/blockquote + +pAnd we're just glad people continue to have such success using Samba. +Thanks, Hannu and Ernesto, for sharing your stories./p + +p class=creditIf you have a testimonial about your experience with +Samba, please go to our a href=http://news.samba.org/submit.html;story +submission form/a and let us hear from you./p +/div + +
svn commit: samba r4105 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: jelmer Date: 2004-12-08 22:02:49 + (Wed, 08 Dec 2004) New Revision: 4105 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4105 Log: Fix IDL for QueryValue() and add a torture test for it. Thanks to Michael Allen for some hints on what was wrong with the previous IDL. Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl === --- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-08 17:43:04 UTC (rev 4104) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-08 22:02:49 UTC (rev 4105) @@ -229,15 +229,14 @@ /* Function: 0x11 */ WERROR winreg_QueryValue( [in,ref] policy_handle *handle, - [in] winreg_String valuename, - [in] uint32 *reserved, + [in] winreg_String value_name, + [in,out] uint32 *type, [in] uint32 *offered, - [in] uint32 *unknown1, - [in] uint32 *unknown2, - [out] uint32 *type, - [out] uint8 *data, - [in,out] uint32 *offered2, - [in,out] uint32 *val_length + [in] uint32 unknown1, + [in] uint32 unknown2, + [out] EnumValueOut *value_out, + [in,out] uint32 *value_len1, + [in,out] uint32 *value_len2 ); /**/ Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-08 17:43:04 UTC (rev 4104) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-08 22:02:49 UTC (rev 4105) @@ -168,6 +168,8 @@ } if (!W_ERROR_IS_OK(r.out.result)) { + printf(OpenKey failed - %s\n, win_errstr(r.out.result)); + return False; } @@ -263,9 +265,6 @@ if (!test_OpenKey( p, mem_ctx, handle, r.out.out_name-name, key_handle)) { - printf(OpenKey(%s) failed - %s\n, - r.out.out_name-name, - win_errstr(r.out.result)); } else { test_key(p, mem_ctx, key_handle, depth + 1); } @@ -290,6 +289,41 @@ return True; } +static BOOL test_QueryValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *valuename) +{ + struct winreg_QueryValue r; + NTSTATUS status; + struct EnumValueNameOut valname; + uint32 zero = 0; + uint32 offered = 0xfff; + + valname.name = valuename; + + printf(Testing QueryValue\n); + + r.in.handle = handle; + r.in.value_name.name = valuename; + r.in.type = zero; + r.in.unknown1 = 0; + r.in.unknown2 = 0; + r.in.offered = offered; + r.in.value_len1 = offered; + r.in.value_len2 = zero; + + status = dcerpc_winreg_QueryValue(p, mem_ctx, r); + if(NT_STATUS_IS_ERR(status)) { + printf(QueryValue failed - %s\n, nt_errstr(status)); + return False; + } + + if (!W_ERROR_IS_OK(r.out.result)) { + printf(QueryValue failed - %s\n, win_errstr(r.out.result)); + return False; + } + + return True; +} + static BOOL test_EnumValue(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, struct policy_handle *handle, int max_valnamelen, int max_valbufsize) { @@ -298,6 +332,7 @@ struct EnumValueIn buf_val; uint32 type; uint32 len1 = max_valbufsize, len2 = 0; + BOOL ret = True; printf(testing EnumValue\n); @@ -324,6 +359,10 @@ return False; } + if (W_ERROR_IS_OK(r.out.result)) { + ret = test_QueryValue(p, mem_ctx, handle, r.out.name_out.name); + } + r.in.enum_index++; } while (W_ERROR_IS_OK(r.out.result)); @@ -332,7 +371,7 @@ return False; } - return True; + return ret; } static BOOL test_OpenHKLM(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
svn commit: samba r4106 - in branches/SAMBA_4_0/source: lib/registry/reg_backend_rpc rpc_server/winreg
Author: jelmer Date: 2004-12-08 22:13:28 + (Wed, 08 Dec 2004) New Revision: 4106 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4106 Log: Add full name of two more hives Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc/reg_backend_rpc.c branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c Changeset: Modified: branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc/reg_backend_rpc.c === --- branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc/reg_backend_rpc.c 2004-12-08 22:02:49 UTC (rev 4105) +++ branches/SAMBA_4_0/source/lib/registry/reg_backend_rpc/reg_backend_rpc.c 2004-12-08 22:13:28 UTC (rev 4106) @@ -64,6 +64,8 @@ openhive(HKPD) openhive(HKU) openhive(HKCR) +openhive(HKDD) +openhive(HKCC) struct rpc_key_data { struct policy_handle pol; @@ -82,6 +84,8 @@ { HKEY_CLASSES_ROOT, open_HKCR }, { HKEY_PERFORMANCE_DATA, open_HKPD }, { HKEY_USERS, open_HKU }, +{ HKEY_DYN_DATA, open_HKDD }, +{ HKEY_CURRENT_CONFIG, open_HKCC }, { NULL, NULL } }; Modified: branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c === --- branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2004-12-08 22:02:49 UTC (rev 4105) +++ branches/SAMBA_4_0/source/rpc_server/winreg/rpc_winreg.c2004-12-08 22:13:28 UTC (rev 4106) @@ -74,8 +74,8 @@ func_winreg_OpenHive(HKLM,HKEY_LOCAL_MACHINE) func_winreg_OpenHive(HKPD,HKEY_PERFORMANCE_DATA) func_winreg_OpenHive(HKU,HKEY_USERS) -func_winreg_OpenHive(HKCC,HKEY_CC) -func_winreg_OpenHive(HKDD,HKEY_DD) +func_winreg_OpenHive(HKCC,HKEY_CURRENT_CONFIG) +func_winreg_OpenHive(HKDD,HKEY_DYN_DATA) func_winreg_OpenHive(HKPT,HKEY_PT) func_winreg_OpenHive(HKPN,HKEY_PN)
svn commit: samba r4107 - in trunk/source: locking smbd
Author: jra Date: 2004-12-09 01:06:59 + (Thu, 09 Dec 2004) New Revision: 4107 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4107 Log: As check_self is *always* False in every invokation, remove the logic for it. We still pass Samba4 RAW-LOCK test. Jeremy. Modified: trunk/source/locking/brlock.c trunk/source/locking/locking.c trunk/source/smbd/reply.c Changeset: Modified: trunk/source/locking/brlock.c === --- trunk/source/locking/brlock.c 2004-12-08 22:13:28 UTC (rev 4106) +++ trunk/source/locking/brlock.c 2004-12-09 01:06:59 UTC (rev 4107) @@ -592,7 +592,7 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, uint16 smbpid, pid_t pid, uint16 tid, br_off start, br_off size, - enum brl_type lock_type, int check_self) + enum brl_type lock_type) { TDB_DATA kbuf, dbuf; int count, i; @@ -617,16 +617,11 @@ locks = (struct lock_struct *)dbuf.dptr; count = dbuf.dsize / sizeof(*locks); for (i=0; icount; i++) { - if (check_self) { - if (brl_conflict(locks[i], lock)) - goto fail; - } else { - /* -* Our own locks don't conflict. -*/ - if (brl_conflict_other(locks[i], lock)) - goto fail; - } + /* +* Our own locks don't conflict. +*/ + if (brl_conflict_other(locks[i], lock)) + goto fail; } } Modified: trunk/source/locking/locking.c === --- trunk/source/locking/locking.c 2004-12-08 22:13:28 UTC (rev 4106) +++ trunk/source/locking/locking.c 2004-12-09 01:06:59 UTC (rev 4107) @@ -62,14 +62,11 @@ / Utility function called to see if a file region is locked. - If check_self is True, then checks on our own fd with the same locking context - are still made. If check_self is False, then checks are not made on our own fd - with the same locking context are not made. / BOOL is_locked(files_struct *fsp,connection_struct *conn, SMB_BIG_UINT count,SMB_BIG_UINT offset, - enum brl_type lock_type, BOOL check_self) + enum brl_type lock_type) { int snum = SNUM(conn); BOOL ret; @@ -82,7 +79,7 @@ ret = !brl_locktest(fsp-dev, fsp-inode, fsp-fnum, global_smbpid, sys_getpid(), conn-cnum, -offset, count, lock_type, check_self); +offset, count, lock_type); DEBUG(10,(is_locked: brl start=%.0f len=%.0f %s for file %s\n, (double)offset, (double)count, ret ? locked : unlocked, Modified: trunk/source/smbd/reply.c === --- trunk/source/smbd/reply.c 2004-12-08 22:13:28 UTC (rev 4106) +++ trunk/source/smbd/reply.c 2004-12-09 01:06:59 UTC (rev 4107) @@ -1919,7 +1919,7 @@ /* ensure we don't overrun the packet size */ maxcount = MIN(65535,maxcount); - if (!is_locked(fsp,conn,(SMB_BIG_UINT)maxcount,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (!is_locked(fsp,conn,(SMB_BIG_UINT)maxcount,(SMB_BIG_UINT)startpos, READ_LOCK)) { SMB_OFF_T size = fsp-size; SMB_OFF_T sizeneeded = startpos + maxcount; @@ -2079,7 +2079,7 @@ data = smb_buf(outbuf) + 3; - if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK)) { END_PROFILE(SMBread); return ERROR_DOS(ERRDOS,ERRlock); } @@ -2268,7 +2268,7 @@ } - if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK)) { END_PROFILE(SMBreadX); return ERROR_DOS(ERRDOS,ERRlock); } @@ -2324,7 +2324,7 @@ SCVAL(inbuf,smb_com,SMBwritec); SCVAL(outbuf,smb_com,SMBwritec); - if (is_locked(fsp,conn,(SMB_BIG_UINT)tcount,(SMB_BIG_UINT)startpos, WRITE_LOCK,False)) { + if (is_locked(fsp,conn,(SMB_BIG_UINT)tcount,(SMB_BIG_UINT)startpos, WRITE_LOCK)) { END_PROFILE(SMBwritebraw);
svn commit: samba r4108 - in branches/SAMBA_3_0/source: locking smbd
Author: jra Date: 2004-12-09 01:07:06 + (Thu, 09 Dec 2004) New Revision: 4108 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4108 Log: As check_self is *always* False in every invokation, remove the logic for it. We still pass Samba4 RAW-LOCK test. Jeremy. Modified: branches/SAMBA_3_0/source/locking/brlock.c branches/SAMBA_3_0/source/locking/locking.c branches/SAMBA_3_0/source/smbd/reply.c Changeset: Modified: branches/SAMBA_3_0/source/locking/brlock.c === --- branches/SAMBA_3_0/source/locking/brlock.c 2004-12-09 01:06:59 UTC (rev 4107) +++ branches/SAMBA_3_0/source/locking/brlock.c 2004-12-09 01:07:06 UTC (rev 4108) @@ -592,7 +592,7 @@ BOOL brl_locktest(SMB_DEV_T dev, SMB_INO_T ino, int fnum, uint16 smbpid, pid_t pid, uint16 tid, br_off start, br_off size, - enum brl_type lock_type, int check_self) + enum brl_type lock_type) { TDB_DATA kbuf, dbuf; int count, i; @@ -617,16 +617,11 @@ locks = (struct lock_struct *)dbuf.dptr; count = dbuf.dsize / sizeof(*locks); for (i=0; icount; i++) { - if (check_self) { - if (brl_conflict(locks[i], lock)) - goto fail; - } else { - /* -* Our own locks don't conflict. -*/ - if (brl_conflict_other(locks[i], lock)) - goto fail; - } + /* +* Our own locks don't conflict. +*/ + if (brl_conflict_other(locks[i], lock)) + goto fail; } } Modified: branches/SAMBA_3_0/source/locking/locking.c === --- branches/SAMBA_3_0/source/locking/locking.c 2004-12-09 01:06:59 UTC (rev 4107) +++ branches/SAMBA_3_0/source/locking/locking.c 2004-12-09 01:07:06 UTC (rev 4108) @@ -62,14 +62,11 @@ / Utility function called to see if a file region is locked. - If check_self is True, then checks on our own fd with the same locking context - are still made. If check_self is False, then checks are not made on our own fd - with the same locking context are not made. / BOOL is_locked(files_struct *fsp,connection_struct *conn, SMB_BIG_UINT count,SMB_BIG_UINT offset, - enum brl_type lock_type, BOOL check_self) + enum brl_type lock_type) { int snum = SNUM(conn); BOOL ret; @@ -82,7 +79,7 @@ ret = !brl_locktest(fsp-dev, fsp-inode, fsp-fnum, global_smbpid, sys_getpid(), conn-cnum, -offset, count, lock_type, check_self); +offset, count, lock_type); DEBUG(10,(is_locked: brl start=%.0f len=%.0f %s for file %s\n, (double)offset, (double)count, ret ? locked : unlocked, Modified: branches/SAMBA_3_0/source/smbd/reply.c === --- branches/SAMBA_3_0/source/smbd/reply.c 2004-12-09 01:06:59 UTC (rev 4107) +++ branches/SAMBA_3_0/source/smbd/reply.c 2004-12-09 01:07:06 UTC (rev 4108) @@ -1919,7 +1919,7 @@ /* ensure we don't overrun the packet size */ maxcount = MIN(65535,maxcount); - if (!is_locked(fsp,conn,(SMB_BIG_UINT)maxcount,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (!is_locked(fsp,conn,(SMB_BIG_UINT)maxcount,(SMB_BIG_UINT)startpos, READ_LOCK)) { SMB_OFF_T size = fsp-size; SMB_OFF_T sizeneeded = startpos + maxcount; @@ -2079,7 +2079,7 @@ data = smb_buf(outbuf) + 3; - if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (is_locked(fsp,conn,(SMB_BIG_UINT)numtoread,(SMB_BIG_UINT)startpos, READ_LOCK)) { END_PROFILE(SMBread); return ERROR_DOS(ERRDOS,ERRlock); } @@ -2268,7 +2268,7 @@ } - if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK,False)) { + if (is_locked(fsp,conn,(SMB_BIG_UINT)smb_maxcnt,(SMB_BIG_UINT)startpos, READ_LOCK)) { END_PROFILE(SMBreadX); return ERROR_DOS(ERRDOS,ERRlock); } @@ -2324,7 +2324,7 @@ SCVAL(inbuf,smb_com,SMBwritec); SCVAL(outbuf,smb_com,SMBwritec); - if (is_locked(fsp,conn,(SMB_BIG_UINT)tcount,(SMB_BIG_UINT)startpos, WRITE_LOCK,False))
svn commit: samba r4109 - in branches/SAMBA_4_0/source/smb_server: .
Author: tridge Date: 2004-12-09 04:40:57 + (Thu, 09 Dec 2004) New Revision: 4109 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4109 Log: fixed an uninitialised socket write found by kukks Modified: branches/SAMBA_4_0/source/smb_server/negprot.c Changeset: Modified: branches/SAMBA_4_0/source/smb_server/negprot.c === --- branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-09 01:07:06 UTC (rev 4108) +++ branches/SAMBA_4_0/source/smb_server/negprot.c 2004-12-09 04:40:57 UTC (rev 4109) @@ -183,6 +183,7 @@ SIVAL(req-out.vwv, VWV(6), req-smb_conn-pid); srv_push_dos_date(req-smb_conn, req-out.vwv, VWV(8), t); SSVAL(req-out.vwv, VWV(10), req-smb_conn-negotiate.zone_offset/60); + SIVAL(req-out.vwv, VWV(11), 0); /* Create a token value and add it to the outgoing packet. */ if (req-smb_conn-negotiate.encrypted_passwords) {
svn commit: samba r4110 - in branches/SAMBA_4_0/source: build/pidl librpc/ndr
Author: tridge Date: 2004-12-09 07:05:00 + (Thu, 09 Dec 2004) New Revision: 4110 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4110 Log: fixed pidl to allow arrays to have size_is() and length_is() elements that depend on variables that come after the array in the structure or function. This has been something that has been problematic for a while, but the winreg QueryValue problem finally prompted me to fix it properly. We should now go back and fix up all the ugly workarounds we have used to avoid this problem in other calls. Unfortunately the solution is fairly complex, and involves the use of the internal ndr token lists (similar to the solution for relative pointers). I wonder if anyone else will be able to follow the logic if I get run over by a bus :-) Modified: branches/SAMBA_4_0/source/build/pidl/parser.pm branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Sorry, the patch is too large (407 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4110
svn commit: samba r4111 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: tridge Date: 2004-12-09 07:05:47 + (Thu, 09 Dec 2004) New Revision: 4111 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4111 Log: fixed winreg to use much simpler (and I believe correct) IDL for QueryValue Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl === --- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-09 07:05:00 UTC (rev 4110) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-09 07:05:47 UTC (rev 4111) @@ -231,12 +231,9 @@ [in,ref] policy_handle *handle, [in] winreg_String value_name, [in,out] uint32 *type, - [in] uint32 *offered, - [in] uint32 unknown1, - [in] uint32 unknown2, - [out] EnumValueOut *value_out, - [in,out] uint32 *value_len1, - [in,out] uint32 *value_len2 + [in,out,size_is(*size),length_is(*length)] uint8 *data, + [in,out] uint32 *size, + [in,out] uint32 *length ); /**/ @@ -262,19 +259,14 @@ [in] sec_desc_buf *sec_desc ); - typedef struct { - uint32 max_len; - [length_is(buf_max_len)] uint8 *buffer; - uint32 len; - } winreg_Value; - /**/ /* Function: 0x16 */ WERROR winreg_SetValue( - [in,ref] policy_handle *handle, - [in] winreg_String name, - [in] uint32 type, - [in] winreg_Value value + [in,ref] policy_handle *handle, + [in] winreg_String name, + [in] uint32 type, + [in,size_is(size)] uint8 *data, + [in] uint32 size ); /**/ Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-09 07:05:00 UTC (rev 4110) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-09 07:05:47 UTC (rev 4111) @@ -304,11 +304,8 @@ r.in.handle = handle; r.in.value_name.name = valuename; r.in.type = zero; - r.in.unknown1 = 0; - r.in.unknown2 = 0; - r.in.offered = offered; - r.in.value_len1 = offered; - r.in.value_len2 = zero; + r.in.size = offered; + r.in.length = zero; status = dcerpc_winreg_QueryValue(p, mem_ctx, r); if(NT_STATUS_IS_ERR(status)) {
svn commit: samba r4112 - in branches/SAMBA_4_0/source/build/pidl: .
Author: tridge Date: 2004-12-09 07:51:20 + (Thu, 09 Dec 2004) New Revision: 4112 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4112 Log: when a pointer is NULL on the wire ensure it is null in the structure Modified: branches/SAMBA_4_0/source/build/pidl/parser.pm Changeset: Modified: branches/SAMBA_4_0/source/build/pidl/parser.pm === --- branches/SAMBA_4_0/source/build/pidl/parser.pm 2004-12-09 07:05:47 UTC (rev 4111) +++ branches/SAMBA_4_0/source/build/pidl/parser.pm 2004-12-09 07:51:20 UTC (rev 4112) @@ -1348,6 +1348,7 @@ if (util::array_size($e)) { if (util::need_wire_pointer($e)) { pidl \tNDR_CHECK(ndr_pull_ptr(ndr, _ptr_$e-{NAME}));\n; + pidl \tr-$inout.$e-{NAME} = NULL;\n; pidl \tif (_ptr_$e-{NAME}) {\n; } elsif ($inout eq out util::has_property($e, ref)) { pidl \tif (r-$inout.$e-{NAME}) {\n;
svn commit: samba r4113 - in branches/SAMBA_4_0/source: librpc/idl torture/rpc
Author: tridge Date: 2004-12-09 07:52:00 + (Thu, 09 Dec 2004) New Revision: 4113 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=4113 Log: modified EnumValue in winreg to take advantage of the new pidl handling of arrays. Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl branches/SAMBA_4_0/source/torture/rpc/winreg.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/winreg.idl === --- branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-09 07:51:20 UTC (rev 4112) +++ branches/SAMBA_4_0/source/librpc/idl/winreg.idl 2004-12-09 07:52:00 UTC (rev 4113) @@ -125,42 +125,30 @@ [in,out]winreg_Time *last_changed_time ); -typedef struct { - uint32 max_len; - uint32 offset; - uint32 len; -} EnumValueIn; - -typedef struct { -uint16 len; -uint16 max_len; -EnumValueIn *buffer; -} EnumValueNameIn; - -typedef struct { - uint32 max_len; - uint32 offset; - DATA_BLOB buffer; -} EnumValueOut; - -typedef struct { -uint16 len; -uint16 max_len; -unistr *name; -} EnumValueNameOut; - /**/ /* Function: 0x0a */ + + /* + this is equivalent IDL to a winreg_String, but we need to + have absolute control over the length/size fields as the + server looks at those to see what size buffer we have, so + we can't use the automatic unistr handing in pidl. + */ + typedef struct { + uint16 length; + uint16 size; + [size_is(size/2),length_is(length/2)] uint16 *name; + } winreg_EnumValueString; + WERROR winreg_EnumValue( [in,ref] policy_handle *handle, - [in] uint32 enum_index, - [in] EnumValueNameIn name_in, - [out] EnumValueNameOut name_out, + [in] uint32 enum_index, + [in] winreg_EnumValueString name_in, + [out]winreg_String name_out, [in,out] uint32 *type, - [in] EnumValueIn *value_in, - [out] EnumValueOut *value_out, - [in,out] uint32 *value_len1, - [in,out] uint32 *value_len2 + [in,out,size_is(*size),length_is(*length)] uint8 *value, + [in,out] uint32 *size, + [in,out] uint32 *length ); /**/ Modified: branches/SAMBA_4_0/source/torture/rpc/winreg.c === --- branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-09 07:51:20 UTC (rev 4112) +++ branches/SAMBA_4_0/source/torture/rpc/winreg.c 2004-12-09 07:52:00 UTC (rev 4113) @@ -293,12 +293,9 @@ { struct winreg_QueryValue r; NTSTATUS status; - struct EnumValueNameOut valname; uint32 zero = 0; uint32 offered = 0xfff; - valname.name = valuename; - printf(Testing QueryValue\n); r.in.handle = handle; @@ -325,29 +322,23 @@ struct policy_handle *handle, int max_valnamelen, int max_valbufsize) { struct winreg_EnumValue r; - struct EnumValueIn buf_name; - struct EnumValueIn buf_val; uint32 type; - uint32 len1 = max_valbufsize, len2 = 0; + uint32 size = max_valbufsize, zero = 0; BOOL ret = True; + uint8_t buf8; + uint16_t buf16; printf(testing EnumValue\n); r.in.handle = handle; r.in.enum_index = 0; - r.in.name_in.len = 0; - r.in.name_in.max_len = max_valnamelen * 2; - buf_name.max_len = max_valnamelen; - buf_name.offset = 0; - buf_name.len = 0; - r.in.name_in.buffer = buf_name; + r.in.name_in.length = 0; + r.in.name_in.size = 0x200; + r.in.name_in.name = buf16; r.in.type = type; - buf_val.max_len = max_valbufsize; - buf_val.offset = 0; - buf_val.len = 0; - r.in.value_in = buf_val; - r.in.value_len1 = len1; - r.in.value_len2 = len2; + r.in.value = buf8; + r.in.length = zero; + r.in.size = size; do { NTSTATUS status = dcerpc_winreg_EnumValue(p, mem_ctx, r);