* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
#include "includes.h"
BOOL *is_data_outstanding);
static ssize_t write_to_internal_pipe(void *np_conn, char *data, size_t n);
static BOOL close_internal_rpc_pipe_hnd(void *np_conn);
-static void *make_internal_rpc_pipe_p(char *pipe_name,
+static void *make_internal_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid);
/****************************************************************************
Find first available pipe slot.
****************************************************************************/
-smb_np_struct *open_rpc_pipe_p(char *pipe_name,
+smb_np_struct *open_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid)
{
int i;
Make an internal namedpipes structure
****************************************************************************/
-static void *make_internal_rpc_pipe_p(char *pipe_name,
+static void *make_internal_rpc_pipe_p(const char *pipe_name,
connection_struct *conn, uint16 vuid)
{
pipes_struct *p;
/* Store the session key and NT_TOKEN */
if (vuser) {
p->session_key = data_blob(vuser->session_key.data, vuser->session_key.length);
+ p->pipe_user.nt_user_token = dup_nt_token(
+ NULL, vuser->nt_user_token);
}
/*
if(n > RPC_MAX_PDU_FRAG_LEN) {
DEBUG(5,("read_from_pipe: too large read (%u) requested on \
pipe %s. We can only service %d sized reads.\n", (unsigned int)n, p->name, RPC_MAX_PDU_FRAG_LEN ));
+ n = RPC_MAX_PDU_FRAG_LEN;
}
/*
Find an rpc pipe given a pipe handle in a buffer and an offset.
****************************************************************************/
-smb_np_struct *get_rpc_pipe_p(char *buf, int where)
+smb_np_struct *get_rpc_pipe_p(uint16 pnum)
{
- int pnum = SVAL(buf,where);
-
if (chain_p) {
return chain_p;
}