[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-2382-gf299316
Günther Deschner
gd at samba.org
Tue May 20 12:39:50 GMT 2008
The branch, v3-2-test has been updated
via f2993160a14ec286627af53b88d6fa535d8c9437 (commit)
via 25220356f6998c514ca43ac21abdba67736ba166 (commit)
via 988e0f47dcc7920696ceafc451405056ba424bfa (commit)
from a46ae502eacba4323a1cf6a57afed4a854634af1 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit f2993160a14ec286627af53b88d6fa535d8c9437
Author: Günther Deschner <gd at samba.org>
Date: Tue May 20 14:32:14 2008 +0200
Revert "Actually connect to RPC."
This reverts commit 3082534454ff936ac0b78b5a2c72c9b060e21244.
Conflicts:
source/librpc/rpc/dcerpc.c
source/librpc/rpc/dcerpc.h
source/rpc_parse/parse_rpc.c
commit 25220356f6998c514ca43ac21abdba67736ba166
Author: Günther Deschner <gd at samba.org>
Date: Tue May 20 14:23:23 2008 +0200
Revert "Reconcile ndr_syntax_id used by pidl-generated code and Samba3's RFC_IFACE."
This reverts commit 7bea00dca1ee08ef731dfa73110ef9c190a29919.
commit 988e0f47dcc7920696ceafc451405056ba424bfa
Author: Günther Deschner <gd at samba.org>
Date: Tue May 20 14:21:24 2008 +0200
Revert "rpc_parse: Use UUIDs from librpc/gen_ndr/ when possible to reduce"
This reverts commit 428654b473ba44b2f5340eefef0d4fcd51aff558.
-----------------------------------------------------------------------
Summary of changes:
source/include/rpc_dce.h | 9 +-
source/rpc_client/cli_pipe.c | 6 +-
source/rpc_parse/parse_rpc.c | 226 ++++++++++++++++++++++++++++++++++-------
source/rpc_server/srv_pipe.c | 8 +-
4 files changed, 200 insertions(+), 49 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/include/rpc_dce.h b/source/include/rpc_dce.h
index 9b2044f..33ab365 100644
--- a/source/include/rpc_dce.h
+++ b/source/include/rpc_dce.h
@@ -157,7 +157,10 @@ enum schannel_direction {
#define RPC_MAX_PDU_FRAG_LEN 0x10b8 /* this is what w2k sets */
/* RPC_IFACE */
-typedef struct ndr_syntax_id RPC_IFACE;
+typedef struct rpc_iface_info {
+ struct GUID uuid; /* 16 bytes of rpc interface identification */
+ uint32 version; /* the interface version number */
+} RPC_IFACE;
#define RPC_IFACE_LEN (UUID_SIZE + 4)
@@ -165,10 +168,10 @@ struct pipe_id_info {
/* the names appear not to matter: the syntaxes _do_ matter */
const char *client_pipe;
- const RPC_IFACE *abstr_syntax; /* this one is the abstract syntax id */
+ RPC_IFACE abstr_syntax; /* this one is the abstract syntax id */
const char *server_pipe; /* this one is the secondary syntax name */
- const RPC_IFACE *trans_syntax; /* this one is the primary syntax id */
+ RPC_IFACE trans_syntax; /* this one is the primary syntax id */
};
/* RPC_HDR - dce rpc header */
diff --git a/source/rpc_client/cli_pipe.c b/source/rpc_client/cli_pipe.c
index 2a2b547..71422cd 100644
--- a/source/rpc_client/cli_pipe.c
+++ b/source/rpc_client/cli_pipe.c
@@ -1656,8 +1656,8 @@ static bool valid_pipe_name(const int pipe_idx, RPC_IFACE *abstract, RPC_IFACE *
/* copy the required syntaxes out so we can do the right bind */
- *transfer = *pipe_names[pipe_idx].trans_syntax;
- *abstract = *pipe_names[pipe_idx].abstr_syntax;
+ *transfer = pipe_names[pipe_idx].trans_syntax;
+ *abstract = pipe_names[pipe_idx].abstr_syntax;
return True;
}
@@ -1690,7 +1690,7 @@ static bool check_bind_response(RPC_HDR_BA *hdr_ba, const int pipe_idx, RPC_IFAC
#endif /* JERRY */
/* check the transfer syntax */
- if ((hdr_ba->transfer.if_version != transfer->if_version) ||
+ if ((hdr_ba->transfer.version != transfer->version) ||
(memcmp(&hdr_ba->transfer.uuid, &transfer->uuid, sizeof(transfer->uuid)) !=0)) {
DEBUG(2,("bind_rpc_pipe: transfer syntax differs\n"));
return False;
diff --git a/source/rpc_parse/parse_rpc.c b/source/rpc_parse/parse_rpc.c
index 3f89721..d4ab8f3 100644
--- a/source/rpc_parse/parse_rpc.c
+++ b/source/rpc_parse/parse_rpc.c
@@ -29,14 +29,176 @@
interface/version dce/rpc pipe identification
********************************************************************/
-const struct ndr_syntax_id syntax_spoolss = {
- {
- 0x12345678, 0x1234, 0xabcd,
- { 0xef, 0x00 },
- { 0x01, 0x23,
- 0x45, 0x67, 0x89, 0xab }
- }, 0x01
-};
+#define TRANS_SYNT_V2 \
+{ \
+ { \
+ 0x8a885d04, 0x1ceb, 0x11c9, \
+ { 0x9f, 0xe8 }, \
+ { 0x08, 0x00, \
+ 0x2b, 0x10, 0x48, 0x60 } \
+ }, 0x02 \
+}
+
+#define SYNT_NETLOGON_V2 \
+{ \
+ { \
+ 0x8a885d04, 0x1ceb, 0x11c9, \
+ { 0x9f, 0xe8 }, \
+ { 0x08, 0x00, \
+ 0x2b, 0x10, 0x48, 0x60 } \
+ }, 0x02 \
+}
+
+#define SYNT_WKSSVC_V1 \
+{ \
+ { \
+ 0x6bffd098, 0xa112, 0x3610, \
+ { 0x98, 0x33 }, \
+ { 0x46, 0xc3, \
+ 0xf8, 0x7e, 0x34, 0x5a } \
+ }, 0x01 \
+}
+
+#define SYNT_SRVSVC_V3 \
+{ \
+ { \
+ 0x4b324fc8, 0x1670, 0x01d3, \
+ { 0x12, 0x78 }, \
+ { 0x5a, 0x47, \
+ 0xbf, 0x6e, 0xe1, 0x88 } \
+ }, 0x03 \
+}
+
+#define SYNT_LSARPC_V0 \
+{ \
+ { \
+ 0x12345778, 0x1234, 0xabcd, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xab } \
+ }, 0x00 \
+}
+
+#define SYNT_LSARPC_V0_DS \
+{ \
+ { \
+ 0x3919286a, 0xb10c, 0x11d0, \
+ { 0x9b, 0xa8 }, \
+ { 0x00, 0xc0, \
+ 0x4f, 0xd9, 0x2e, 0xf5 } \
+ }, 0x00 \
+}
+
+#define SYNT_SAMR_V1 \
+{ \
+ { \
+ 0x12345778, 0x1234, 0xabcd, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xac } \
+ }, 0x01 \
+}
+
+#define SYNT_NETLOGON_V1 \
+{ \
+ { \
+ 0x12345678, 0x1234, 0xabcd, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
+ 0x45, 0x67, 0xcf, 0xfb } \
+ }, 0x01 \
+}
+
+#define SYNT_WINREG_V1 \
+{ \
+ { \
+ 0x338cd001, 0x2244, 0x31f1, \
+ { 0xaa, 0xaa }, \
+ { 0x90, 0x00, \
+ 0x38, 0x00, 0x10, 0x03 } \
+ }, 0x01 \
+}
+
+#define SYNT_SPOOLSS_V1 \
+{ \
+ { \
+ 0x12345678, 0x1234, 0xabcd, \
+ { 0xef, 0x00 }, \
+ { 0x01, 0x23, \
+ 0x45, 0x67, 0x89, 0xab } \
+ }, 0x01 \
+}
+
+#define SYNT_NONE_V0 \
+{ \
+ { \
+ 0x0, 0x0, 0x0, \
+ { 0x00, 0x00 }, \
+ { 0x00, 0x00, \
+ 0x00, 0x00, 0x00, 0x00 } \
+ }, 0x00 \
+}
+
+#define SYNT_NETDFS_V3 \
+{ \
+ { \
+ 0x4fc742e0, 0x4a10, 0x11cf, \
+ { 0x82, 0x73 }, \
+ { 0x00, 0xaa, \
+ 0x00, 0x4a, 0xe6, 0x73 } \
+ }, 0x03 \
+}
+
+#define SYNT_ECHO_V1 \
+{ \
+ { \
+ 0x60a15ec5, 0x4de8, 0x11d7, \
+ { 0xa6, 0x37 }, \
+ { 0x00, 0x50, \
+ 0x56, 0xa2, 0x01, 0x82 } \
+ }, 0x01 \
+}
+
+#define SYNT_SHUTDOWN_V1 \
+{ \
+ { \
+ 0x894de0c0, 0x0d55, 0x11d3, \
+ { 0xa3, 0x22 }, \
+ { 0x00, 0xc0, \
+ 0x4f, 0xa3, 0x21, 0xa1 } \
+ }, 0x01 \
+}
+
+#define SYNT_SVCCTL_V2 \
+{ \
+ { \
+ 0x367abb81, 0x9844, 0x35f1, \
+ { 0xad, 0x32 }, \
+ { 0x98, 0xf0, \
+ 0x38, 0x00, 0x10, 0x03 } \
+ }, 0x02 \
+}
+
+
+#define SYNT_EVENTLOG_V0 \
+{ \
+ { \
+ 0x82273fdc, 0xe32a, 0x18c3, \
+ { 0x3f, 0x78 }, \
+ { 0x82, 0x79, \
+ 0x29, 0xdc, 0x23, 0xea } \
+ }, 0x00 \
+}
+
+#define SYNT_NTSVCS_V1 \
+{ \
+ { \
+ 0x8d9f4e40, 0xa03d, 0x11ce, \
+ { 0x8f, 0x69}, \
+ { 0x08, 0x00, \
+ 0x3e, 0x30, 0x05, 0x1b } \
+ }, 0x01 \
+}
/*
* IMPORTANT!! If you update this structure, make sure to
@@ -45,21 +207,22 @@ const struct ndr_syntax_id syntax_spoolss = {
const struct pipe_id_info pipe_names [] =
{
- { PIPE_LSARPC , &ndr_table_lsarpc.syntax_id, PIPE_LSASS , &ndr_transfer_syntax },
- { PIPE_LSARPC , &ndr_table_dssetup.syntax_id, PIPE_LSASS , &ndr_transfer_syntax },
- { PIPE_SAMR , &ndr_table_samr.syntax_id, PIPE_LSASS , &ndr_transfer_syntax },
- { PIPE_NETLOGON, &ndr_table_netlogon.syntax_id, PIPE_LSASS , &ndr_transfer_syntax },
- { PIPE_SRVSVC , &ndr_table_srvsvc.syntax_id, PIPE_NTSVCS , &ndr_transfer_syntax },
- { PIPE_WKSSVC , &ndr_table_wkssvc.syntax_id, PIPE_NTSVCS , &ndr_transfer_syntax },
- { PIPE_WINREG , &ndr_table_winreg.syntax_id, PIPE_WINREG , &ndr_transfer_syntax },
- { PIPE_SPOOLSS , &syntax_spoolss , PIPE_SPOOLSS , &ndr_transfer_syntax },
- { PIPE_NETDFS , &ndr_table_netdfs.syntax_id, PIPE_NETDFS , &ndr_transfer_syntax },
- { PIPE_ECHO , &ndr_table_rpcecho.syntax_id, PIPE_ECHO , &ndr_transfer_syntax },
- { PIPE_SHUTDOWN, &ndr_table_initshutdown.syntax_id, PIPE_SHUTDOWN , &ndr_transfer_syntax },
- { PIPE_SVCCTL , &ndr_table_svcctl.syntax_id, PIPE_NTSVCS , &ndr_transfer_syntax },
- { PIPE_EVENTLOG, &ndr_table_eventlog.syntax_id, PIPE_EVENTLOG , &ndr_transfer_syntax },
- { PIPE_NTSVCS , &ndr_table_ntsvcs.syntax_id, PIPE_NTSVCS , &ndr_transfer_syntax },
- { NULL , NULL , NULL , NULL }
+ /* client pipe , abstract syntax , server pipe , transfer syntax */
+ { PIPE_LSARPC , SYNT_LSARPC_V0 , PIPE_LSASS , TRANS_SYNT_V2 },
+ { PIPE_LSARPC , SYNT_LSARPC_V0_DS , PIPE_LSASS , TRANS_SYNT_V2 },
+ { PIPE_SAMR , SYNT_SAMR_V1 , PIPE_LSASS , TRANS_SYNT_V2 },
+ { PIPE_NETLOGON, SYNT_NETLOGON_V1 , PIPE_LSASS , TRANS_SYNT_V2 },
+ { PIPE_SRVSVC , SYNT_SRVSVC_V3 , PIPE_NTSVCS , TRANS_SYNT_V2 },
+ { PIPE_WKSSVC , SYNT_WKSSVC_V1 , PIPE_NTSVCS , TRANS_SYNT_V2 },
+ { PIPE_WINREG , SYNT_WINREG_V1 , PIPE_WINREG , TRANS_SYNT_V2 },
+ { PIPE_SPOOLSS , SYNT_SPOOLSS_V1 , PIPE_SPOOLSS , TRANS_SYNT_V2 },
+ { PIPE_NETDFS , SYNT_NETDFS_V3 , PIPE_NETDFS , TRANS_SYNT_V2 },
+ { PIPE_ECHO , SYNT_ECHO_V1 , PIPE_ECHO , TRANS_SYNT_V2 },
+ { PIPE_SHUTDOWN, SYNT_SHUTDOWN_V1 , PIPE_SHUTDOWN , TRANS_SYNT_V2 },
+ { PIPE_SVCCTL , SYNT_SVCCTL_V2 , PIPE_NTSVCS , TRANS_SYNT_V2 },
+ { PIPE_EVENTLOG, SYNT_EVENTLOG_V0 , PIPE_EVENTLOG , TRANS_SYNT_V2 },
+ { PIPE_NTSVCS , SYNT_NTSVCS_V1 , PIPE_NTSVCS , TRANS_SYNT_V2 },
+ { NULL , SYNT_NONE_V0 , NULL , SYNT_NONE_V0 }
};
/****************************************************************************
@@ -71,21 +234,6 @@ const char *cli_get_pipe_name(int pipe_idx)
return &pipe_names[pipe_idx].client_pipe[5];
}
-/****************************************************************************
- Return the pipe idx from the syntax.
- ****************************************************************************/
-int cli_get_pipe_idx(const RPC_IFACE *syntax)
-{
- int i;
- for (i = 0; pipe_names[i].client_pipe; i++) {
- if (GUID_equal(&pipe_names[i].abstr_syntax->uuid, &syntax->uuid) &&
- pipe_names[i].abstr_syntax->if_version == syntax->if_version)
- return i;
- }
-
- return -1;
-}
-
/*******************************************************************
Inits an RPC_HDR structure.
********************************************************************/
@@ -178,7 +326,7 @@ static bool smb_io_rpc_iface(const char *desc, RPC_IFACE *ifc, prs_struct *ps, i
if (!smb_io_uuid( "uuid", &ifc->uuid, ps, depth))
return False;
- if(!prs_uint32 ("version", ps, depth, &ifc->if_version))
+ if(!prs_uint32 ("version", ps, depth, &ifc->version))
return False;
return True;
diff --git a/source/rpc_server/srv_pipe.c b/source/rpc_server/srv_pipe.c
index 2f9e3e5..05cdb65 100644
--- a/source/rpc_server/srv_pipe.c
+++ b/source/rpc_server/srv_pipe.c
@@ -995,10 +995,10 @@ bool check_bind_req(struct pipes_struct *p, RPC_IFACE* abstract,
for ( i=0; pipe_names[i].client_pipe; i++ ) {
DEBUGADD(10,("checking %s\n", pipe_names[i].client_pipe));
if ( strequal(pipe_names[i].client_pipe, pname)
- && (abstract->if_version == pipe_names[i].abstr_syntax->if_version)
- && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax->uuid, sizeof(struct GUID)) == 0)
- && (transfer->if_version == pipe_names[i].trans_syntax->if_version)
- && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax->uuid, sizeof(struct GUID)) == 0) ) {
+ && (abstract->version == pipe_names[i].abstr_syntax.version)
+ && (memcmp(&abstract->uuid, &pipe_names[i].abstr_syntax.uuid, sizeof(struct GUID)) == 0)
+ && (transfer->version == pipe_names[i].trans_syntax.version)
+ && (memcmp(&transfer->uuid, &pipe_names[i].trans_syntax.uuid, sizeof(struct GUID)) == 0) ) {
struct api_struct *fns = NULL;
int n_fns = 0;
PIPE_RPC_FNS *context_fns;
--
Samba Shared Repository
More information about the samba-cvs
mailing list