lp_load(servicesf,True,False,False);
- get_myname(global_myname,NULL);
+ get_myname(global_myname);
if ((p=smbw_getshared("DEBUG"))) {
DEBUGLEVEL = atoi(p);
if ((p=smbw_getshared("PREFIX"))) {
slprintf(smbw_prefix,sizeof(fstring)-1, "/%s/", p);
- string_sub(smbw_prefix,"//", "/");
+ all_string_sub(smbw_prefix,"//", "/", 0);
DEBUG(2,("SMBW_PREFIX is %s\n", smbw_prefix));
}
- slprintf(line,sizeof(line)-1,"PWD_%d", getpid());
+ slprintf(line,sizeof(line)-1,"PWD_%d", (int)getpid());
p = smbw_getshared(line);
if (!p) {
pstrcpy(path,p);
- string_sub(path, "/", "\\");
+ all_string_sub(path, "/", "\\", 0);
ok:
DEBUG(4,("parsed path name=%s cwd=%s [%s] [%s] [%s]\n",
char *cwd;
int len;
+ if(!path)
+ return 0;
+
/* this is needed to prevent recursion with the BSD malloc which
opens /etc/malloc.conf on the first call */
if (strncmp(path,"/etc/", 5) == 0) {
uint32 ecode;
int ret;
- ret = cli_error(c, &eclass, &ecode);
+ ret = cli_error(c, &eclass, &ecode, NULL);
if (ret) {
DEBUG(3,("smbw_error %d %d (0x%x) -> %d\n",
smbw_srv_close(srv);
}
- slprintf(line,sizeof(line)-1,"PWD_%d", getpid());
+ slprintf(line,sizeof(line)-1,"PWD_%d", (int)getpid());
smbw_setshared(line,smbw_cwd);
/* unblock the parent */