From 3db52feb1f3b2c07ce0b06ad4a7099fa6efe3fc7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Dec 1999 13:27:58 +0000 Subject: first pass at updating head branch to be to be the same as the SAMBA_2_0 branch (This used to be commit 453a822a76780063dff23526c35408866d0c0154) --- source3/smbwrapper/smbw.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source3/smbwrapper/smbw.c') diff --git a/source3/smbwrapper/smbw.c b/source3/smbwrapper/smbw.c index faaa9f047b..4c246e1e40 100644 --- a/source3/smbwrapper/smbw.c +++ b/source3/smbwrapper/smbw.c @@ -81,7 +81,7 @@ void smbw_init(void) lp_load(servicesf,True,False,False); - get_myname(global_myname,NULL); + get_myname(global_myname); if ((p=smbw_getshared("DEBUG"))) { DEBUGLEVEL = atoi(p); @@ -93,11 +93,11 @@ void smbw_init(void) 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) { @@ -320,7 +320,7 @@ char *smbw_parse_path(const char *fname, char *server, char *share, char *path) pstrcpy(path,p); - string_sub(path, "/", "\\"); + all_string_sub(path, "/", "\\", 0); ok: DEBUG(4,("parsed path name=%s cwd=%s [%s] [%s] [%s]\n", @@ -341,6 +341,9 @@ int smbw_path(const char *path) 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) { @@ -378,7 +381,7 @@ int smbw_errno(struct cli_state *c) 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", @@ -1385,7 +1388,7 @@ int smbw_fork(void) 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 */ -- cgit