The Samba-Bugzilla – Attachment 947 Details for
Bug 2312
smbcacls and smbcquotas do not check // before the server
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to check in smbc{acls,quotas} that the path begins by //
samba-3.0.9-utils_args.patch (text/plain), 1.41 KB, created by
Pascal Terjan
on 2005-02-05 04:49:41 UTC
(
hide
)
Description:
Patch to check in smbc{acls,quotas} that the path begins by //
Filename:
MIME Type:
Creator:
Pascal Terjan
Created:
2005-02-05 04:49:41 UTC
Size:
1.41 KB
patch
obsolete
>diff -aur samba-3.0.9.ori/source/utils/smbcacls.c samba-3.0.9/source/utils/smbcacls.c >--- samba-3.0.9.ori/source/utils/smbcacls.c 2004-12-19 18:48:25.000000000 +0100 >+++ samba-3.0.9/source/utils/smbcacls.c 2004-12-27 18:39:21.265450084 +0100 >@@ -826,15 +826,16 @@ > pstrcpy(filename, poptGetArg(pc)); > > all_string_sub(path,"/","\\",0); >+ if(strncmp(path, "\\\\", 2)) { >+ printf("Invalid argument: %s\n", path); >+ return -1; >+ } > > fstrcpy(server,path+2); > share = strchr_m(server,'\\'); > if (!share) { >- share = strchr_m(server,'/'); >- if (!share) { >- printf("Invalid argument: %s\n", share); >- return -1; >- } >+ printf("Invalid argument: %s\n", share); >+ return -1; > } > > *share = 0; >diff -aur samba-3.0.9.ori/source/utils/smbcquotas.c samba-3.0.9/source/utils/smbcquotas.c >--- samba-3.0.9.ori/source/utils/smbcquotas.c 2004-11-16 04:03:32.000000000 +0100 >+++ samba-3.0.9/source/utils/smbcquotas.c 2004-12-27 18:40:38.320023516 +0100 >@@ -491,15 +491,16 @@ > pstrcpy(path, poptGetArg(pc)); > > all_string_sub(path,"/","\\",0); >+ if(strncmp(path, "\\\\", 2)) { >+ printf("Invalid argument: %s\n", path); >+ exit(EXIT_PARSE_ERROR); >+ } > > pstrcpy(server,path+2); > share = strchr_m(server,'\\'); > if (!share) { >- share = strchr_m(server,'/'); >- if (!share) { >- printf("Invalid argument: %s\n", share); >- exit(EXIT_PARSE_ERROR); >- } >+ printf("Invalid argument: %s\n", share); >+ exit(EXIT_PARSE_ERROR); > } > > *share = 0;
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 2312
:
947
|
949
|
17908