{
int sock = msrpc->fd;
uint32 len;
-#if 0
char *data;
prs_struct ps;
-#endif
+
char *in = msrpc->inbuf;
char *out = msrpc->outbuf;
- msrpc->nt.key = *key;
-#if 0
uint16 command;
+ msrpc->nt.key = *key;
+
command = usr != NULL ? AGENT_CMD_CON : AGENT_CMD_CON_ANON;
if (!create_user_creds(&ps, msrpc->pipe_name, 0x0, command,
DEBUG(0,("write failed\n"));
return False;
}
-#endif
if (msrpc->redirect)
{
struct msrpc_state msrpc_redir;
}
else
{
-#if 0
uint32 status;
len = read(sock, &status, sizeof(status));
return len == sizeof(status) && status == 0x0;
-#endif
}
return True;
}
msrpc->fd = sock;
- if (!msrpc_authenticate(msrpc, key, usr))
+ if (!msrpc_authenticate(msrpc, key, NULL))
{
DEBUG(0,("authenticate failed\n"));
close(msrpc->fd);
}
}
- if (!msrpc_authenticate(msrpc, key, &msrpc->usr))
+ if (!msrpc_authenticate(msrpc, key, NULL))
{
DEBUG(0,("authenticate failed\n"));
close(msrpc->fd);
****************************************************************************/
BOOL msrpcd_init(int c, msrpc_pipes_struct *p)
{
-#if 0
struct user_creds usr;
vuser_key uk;
user_struct *vuser;
{
return False;
}
-#endif
+
p->l = malloc(sizeof(*p->l));
if (p->l == NULL)
{
-#if 0
vuid_free_user_struct(vuser);
safe_free(vuser);
-#endif
return False;
}
ZERO_STRUCTP(p->l);
-#if 0
p->l->key = uk;
if (!vuser->guest)
vuid_free_user_struct(vuser);
safe_free(vuser);
-#endif
+
return True;
}
if (l->data_i.offset == 0) return False;
assoc_gid = l->hdr_rb.bba.assoc_gid;
- l->key.pid = assoc_gid;
+
+ if (assoc_gid != 0)
+ {
+ l->key.pid = assoc_gid;
+ }
if (l->hdr.auth_len != 0)
{
l->auth_info = NULL;
assoc_gid = l->hdr_rb.bba.assoc_gid;
- l->key.pid = assoc_gid;
+ if (assoc_gid != 0)
+ {
+ l->key.pid = assoc_gid;
+ }
}
if (l->auth != NULL)
reply = smb_io_rpc_hdr_req("req", &(l->hdr_req), &l->data_i, 0);
if (reply)
{
- l->key.vuid = l->hdr_req.context_id;
+ if (l->hdr_req.context_id != 0)
+ {
+ l->key.vuid = l->hdr_req.context_id;
+ }
reply = become_vuser(&l->key) ||
become_guest();