diff options
author | Luke Leighton <lkcl@samba.org> | 2000-01-03 19:19:48 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-01-03 19:19:48 +0000 |
commit | fbd17c8dafeefac788f4bc1c41045726825f513f (patch) | |
tree | 93aea0a144e9f649d32d7340e12ec9965aab6825 /source3/smbd/pipes.c | |
parent | 632b4f806eae15e319b8f62caef5d25634cf720c (diff) | |
download | samba-fbd17c8dafeefac788f4bc1c41045726825f513f.tar.gz samba-fbd17c8dafeefac788f4bc1c41045726825f513f.tar.bz2 samba-fbd17c8dafeefac788f4bc1c41045726825f513f.zip |
simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
(This used to be commit 8976e26d46cb991710bc77463f7f928ac00dd4d8)
Diffstat (limited to 'source3/smbd/pipes.c')
-rw-r--r-- | source3/smbd/pipes.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index 15f52c0af6..1a9ac1d7a4 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -129,7 +129,16 @@ int reply_pipe_write(char *inbuf,char *outbuf,int length,int dum_bufsize) if (numtowrite == 0) nwritten = 0; else - nwritten = write_to_pipe(p, data, numtowrite); + { + if (p->m != NULL) + { + nwritten = write_pipe(p, data, numtowrite); + } + else + { + nwritten = write_to_pipe(p, data, numtowrite); + } + } if ((nwritten == 0 && numtowrite != 0) || (nwritten < 0)) return (UNIXERROR(ERRDOS,ERRnoaccess)); @@ -207,7 +216,14 @@ int reply_pipe_read_and_X(char *inbuf,char *outbuf,int length,int bufsize) set_message(outbuf,12,0,True); data = smb_buf(outbuf); - nread = read_from_pipe(p, data, smb_maxcnt); + if (p->m != NULL) + { + nread = read_pipe(p, data, smb_maxcnt); + } + else + { + nread = read_from_pipe(p, data, smb_maxcnt); + } if (nread < 0) return(UNIXERROR(ERRDOS,ERRnoaccess)); |