summaryrefslogtreecommitdiff
path: root/source3/rpc_client/ncacn_np_use.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2000-07-15 08:37:17 +0000
committerGerald Carter <jerry@samba.org>2000-07-15 08:37:17 +0000
commit333c23c74acf0495fca6d4f4bdfc944ce320398e (patch)
treea14945f657f738935b4efd97edba907109896112 /source3/rpc_client/ncacn_np_use.c
parent2755ad8814f07906cddd303bed6a5a1971a2c3ff (diff)
downloadsamba-333c23c74acf0495fca6d4f4bdfc944ce320398e.tar.gz
samba-333c23c74acf0495fca6d4f4bdfc944ce320398e.tar.bz2
samba-333c23c74acf0495fca6d4f4bdfc944ce320398e.zip
Lots of changes but no real progress in functionality.
more changes to remove the ncarpc_l_* stuff. Fixed some cut and paste errors from TNG There are very subtle bugs in this code. I'll work on simplifying them in round two or three. --jerry (This used to be commit f8509356178deb7e78836d1f5aceb96677ac738b)
Diffstat (limited to 'source3/rpc_client/ncacn_np_use.c')
-rw-r--r--source3/rpc_client/ncacn_np_use.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/source3/rpc_client/ncacn_np_use.c b/source3/rpc_client/ncacn_np_use.c
index 0ab2802cc1..8e5c724046 100644
--- a/source3/rpc_client/ncacn_np_use.c
+++ b/source3/rpc_client/ncacn_np_use.c
@@ -20,14 +20,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/*************************************************************
- Ever wonder where Luke comes up with some of these names?
-
- (N)etwork (C)omputing (A)rchitechture ???
-
- get it? --jerry
-*************************************************************/
-
#define NO_SYSLOG
@@ -53,6 +45,9 @@ terminate client connection
****************************************************************************/
static void ncacn_np_shutdown(struct ncacn_np *cli)
{
+ struct ntuser_creds usr;
+ BOOL closed;
+
if (cli != NULL)
{
if (cli->smb != NULL)
@@ -62,10 +57,8 @@ static void ncacn_np_shutdown(struct ncacn_np *cli)
/* cli_nt_session_close(cli->smb, cli->fnum); JERRY */
cli_nt_session_close(cli->smb);
}
-#if 0 /* commented out by JERRY */
- cli_net_use_del(cli->smb->desthost,
- &cli->smb->usr, False, False);
-#endif
+ create_ntc_from_cli_state(&usr, cli->smb);
+ cli_net_use_del(cli->smb->desthost, &usr, False, &closed);
}
}
}
@@ -121,11 +114,17 @@ static struct ncacn_np_use *add_ncacn_np_to_array(uint32 * len,
***array,
struct ncacn_np_use *cli)
{
+
int i;
+
+ /* traverse the list and try to find a previously
+ allocate spot that is not being used */
for (i = 0; i < num_msrpcs; i++)
{
if (msrpcs[i] == NULL)
{
+ /* found and empty spot to
+ store the cli pointer */
msrpcs[i] = cli;
return cli;
}
@@ -167,7 +166,7 @@ BOOL ncacn_np_use_del(const char *srv_name, const char *pipe_name,
if (strnequal("\\\\", srv_name, 2))
{
- srv_name = &srv_name[6];
+ srv_name = &srv_name[2];
}
for (i = 0; i < num_msrpcs; i++)
@@ -194,15 +193,15 @@ BOOL ncacn_np_use_del(const char *srv_name, const char *pipe_name,
{
ncacn_np_name = &ncacn_np_name[6];
}
- if (!strequal(ncacn_np_srv_name, srv_name))
+ if (!strequal(ncacn_np_name, pipe_name))
{
continue;
}
if (strnequal("\\\\", ncacn_np_srv_name, 2))
{
- ncacn_np_srv_name = &ncacn_np_srv_name[6];
+ ncacn_np_srv_name = &ncacn_np_srv_name[2];
}
- if (!strequal(ncacn_np_name, pipe_name))
+ if (!strequal(ncacn_np_srv_name, srv_name))
{
continue;
}