r3867: Fix from david.hu@hp.com - make a copy of an incoming message
[ira/wip.git] / source3 / smbwrapper / smbw_dir.c
index 31d81a1e7efc5cd611c1478805b66685da565ac1..0a6deede41ff170ca349d49e5d5c4f70714dbc36 100644 (file)
@@ -216,7 +216,7 @@ int smbw_dir_open(const char *fname)
                smbw_NetServerEnum(&srv->cli, srv->server_name, SV_TYPE_ALL,
                                   smbw_server_add, NULL);
                *p = '#';
-       } else if (strcmp(srv->cli.dev,"IPC") == 0) {
+       } else if ((strcmp(srv->cli.dev,"IPC") == 0) || (strequal(share,"IPC$"))) {
                DEBUG(4,("doing NetShareEnum\n"));
                smbw_share_add(".",0,"", NULL);
                smbw_share_add("..",0,"", NULL);
@@ -412,7 +412,8 @@ int smbw_chdir(const char *name)
                goto failed;
        }
 
-       if (strncmp(srv->cli.dev,"IPC",3) &&
+       if (strncmp(srv->cli.dev,"IPC",3) && 
+           !strequal(share, "IPC$") &&
            strncmp(srv->cli.dev,"LPT",3) &&
            !smbw_getatr(srv, path, 
                         &mode, NULL, NULL, NULL, NULL, NULL)) {