diff options
author | Jean-François Micouleau <jfm@samba.org> | 1999-04-27 10:43:32 +0000 |
---|---|---|
committer | Jean-François Micouleau <jfm@samba.org> | 1999-04-27 10:43:32 +0000 |
commit | be552ca3504ebd98da37e70bac1f10b248cf860b (patch) | |
tree | 7d9ebfa1b2637941e75133b2dc815ff4a192fcfb /source3/rpc_server | |
parent | de0c233a7ae5eab1e0f5a2c07eca3269b0bd9cdc (diff) | |
download | samba-be552ca3504ebd98da37e70bac1f10b248cf860b.tar.gz samba-be552ca3504ebd98da37e70bac1f10b248cf860b.tar.bz2 samba-be552ca3504ebd98da37e70bac1f10b248cf860b.zip |
rpc_parse/parse_misc.c : defined a new BUFFER5 struct
include/ntdomain.h : added rpc_spoolss.h include statement
include/proto.h
include/rpc_dce.h : added definition of RPC_ALTER_CONTEXT request &
reply
param/loadparm.c : 2 new options for NT printing support and some
changes to initial values in the LPRNG case.
rpc_parse/parse_prs.c : added prs_uint16s()
rpc_parse/parse_rpc.c : added SYNT_SPOOLSS_V1 and code for the
alter-context support.
rpc_server/srv_pipe.c : alter-context support
smbd/nttrans.c
smbd/server.c
include/rpc_misc.h
Makefile.in
include/smb.h
Jean Francois
(This used to be commit 4c515804b70254248e378a3f90f47e4c32639d29)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_pipe.c | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c index 54d26650e9..466d56b67a 100644 --- a/source3/rpc_server/srv_pipe.c +++ b/source3/rpc_server/srv_pipe.c @@ -360,6 +360,7 @@ static struct api_cmd api_fd_commands[] = { "svcctl", "ntsvcs", api_svcctl_rpc }, { "NETLOGON", "lsass", api_netlog_rpc }, { "winreg", "winreg", api_reg_rpc }, + { "spoolss", "spoolss", api_spoolss_rpc }, { NULL, NULL, NULL } }; @@ -383,7 +384,7 @@ static BOOL api_pipe_bind_auth_resp(pipes_struct *p, prs_struct *pd) return api_pipe_ntlmssp(p, pd); } -static BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *pd) +static BOOL api_pipe_bind_and_alt_req(pipes_struct *p, prs_struct *pd, enum RPC_PKT_TYPE pkt_type) { uint16 assoc_gid; fstring ack_pipe_name; @@ -435,9 +436,29 @@ static BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *pd) } } - /* name has to be \PIPE\xxxxx */ - fstrcpy(ack_pipe_name, "\\PIPE\\"); - fstrcat(ack_pipe_name, p->pipe_srv_name); + switch (pkt_type) + { + case RPC_BINDACK: + { + /* name has to be \PIPE\xxxxx */ + fstrcpy(ack_pipe_name, "\\PIPE\\"); + fstrcat(ack_pipe_name, p->pipe_srv_name); + break; + } + case RPC_ALTCONTRESP: + { + /* secondary address CAN be NULL + * as the specs says it's ignored. + * It MUST NULL to have the spoolss working. + */ + fstrcpy(ack_pipe_name, ""); + break; + } + default: + { + return False; + } + } DEBUG(5,("api_pipe_bind_req: make response. %d\n", __LINE__)); @@ -505,7 +526,7 @@ static BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *pd) /*** then do the header, now we know the length ***/ /***/ - make_rpc_hdr(&p->hdr, RPC_BINDACK, RPC_FLG_FIRST | RPC_FLG_LAST, + make_rpc_hdr(&p->hdr, pkt_type, RPC_FLG_FIRST | RPC_FLG_LAST, p->hdr.call_id, p->rdata.offset + p->rverf.offset + p->rauth.offset + p->rntlm.offset + 0x10, p->rauth.offset + p->rntlm.offset); @@ -534,6 +555,21 @@ static BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *pd) return True; } +/* + * The RPC Alter-Context call is used only by the spoolss pipe + * simply because there is a bug (?) in the MS unmarshalling code + * or in the marshalling code. If it's in the later, then Samba + * have the same bug. + */ +static BOOL api_pipe_bind_req(pipes_struct *p, prs_struct *pd) +{ + return api_pipe_bind_and_alt_req(p, pd, RPC_BINDACK); +} + +static BOOL api_pipe_alt_req(pipes_struct *p, prs_struct *pd) +{ + return api_pipe_bind_and_alt_req(p, pd, RPC_ALTCONTRESP); +} static BOOL api_pipe_auth_process(pipes_struct *p, prs_struct *pd) { @@ -635,6 +671,11 @@ BOOL rpc_command(pipes_struct *p, prs_struct *pd) reply = api_pipe_bind_req(p, pd); break; } + case RPC_ALTCONT: + { + reply = api_pipe_alt_req(p, pd); + break; + } case RPC_REQUEST: { if (p->ntlmssp_auth && !p->ntlmssp_validated) |