The Samba-Bugzilla – Attachment 404 Details for
Bug 1088
smbclient: use strchr_m() for query_host instead of strchr()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to fix this bug
p (text/plain), 1.83 KB, created by
SATOH Fumiyasu
on 2004-02-16 22:48:13 UTC
(
hide
)
Description:
Patch to fix this bug
Filename:
MIME Type:
Creator:
SATOH Fumiyasu
Created:
2004-02-16 22:48:13 UTC
Size:
1.83 KB
patch
obsolete
>Index: source/client/client.c >=================================================================== >RCS file: /work/cvs/samba/source/client/client.c,v >retrieving revision 1.3 >diff -u -p -r1.3 client.c >--- source/client/client.c 13 Feb 2004 11:10:51 -0000 1.3 >+++ source/client/client.c 17 Feb 2004 06:16:51 -0000 >@@ -2750,27 +2750,6 @@ static int do_message_op(void) > } > > >-/** >- * Process "-L hostname" option. >- * >- * We don't actually do anything yet -- we just stash the name in a >- * global variable and do the query when all options have been read. >- **/ >- >-static void remember_query_host(const char *arg, >- pstring query_host) >-{ >- char *slash; >- >- while (*arg == '\\' || *arg == '/') >- arg++; >- pstrcpy(query_host, arg); >- if ((slash = strchr(query_host, '/')) >- || (slash = strchr(query_host, '\\'))) { >- *slash = 0; >- } >-} >- > /**************************************************************************** > main program > ****************************************************************************/ >@@ -2863,7 +2842,12 @@ static void remember_query_host(const ch > break; > > case 'L': >- remember_query_host(poptGetOptArg(pc), query_host); >+ { >+ const char *arg = poptGetOptArg(pc); >+ while (*arg == '\\' || *arg == '/') >+ arg++; >+ pstrcpy(query_host, arg); >+ } > break; > case 't': > pstrcpy(term_code, poptGetOptArg(pc)); >@@ -2968,13 +2952,20 @@ static void remember_query_host(const ch > return do_tar_op(base_directory); > } > >- if ((p=strchr_m(query_host,'#'))) { >- *p = 0; >- p++; >- sscanf(p, "%x", &name_type); >- } >- > if (*query_host) { >+ char *slash; >+ >+ if ((slash = strchr_m(query_host, '/')) >+ || (slash = strchr_m(query_host, '\\'))) { >+ *slash = 0; >+ } >+ >+ if ((p=strchr_m(query_host,'#'))) { >+ *p = 0; >+ p++; >+ sscanf(p, "%x", &name_type); >+ } >+ > return do_host_query(query_host); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1088
: 404 |
426