rpms/kernel/F-9 linux-2.6-cifs-fix-unc-path-prefix.patch, NONE, 1.1 kernel.spec, 1.636, 1.637
Chuck Ebbert (cebbert)
fedora-extras-commits at redhat.com
Tue May 13 08:18:27 UTC 2008
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv802
Modified Files:
kernel.spec
Added Files:
linux-2.6-cifs-fix-unc-path-prefix.patch
Log Message:
* Mon May 12 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.3-18
- CIFS: fix UNC path prefix to have the correct slash (#443681)
linux-2.6-cifs-fix-unc-path-prefix.patch:
--- NEW FILE linux-2.6-cifs-fix-unc-path-prefix.patch ---
Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=076d8423a98659a92837b07aa494cb74bfefe77c
Commit: 076d8423a98659a92837b07aa494cb74bfefe77c
Parent: 2302aca8508ee727a0c5edde3a7518a4ee03da1b
Author: Steve French <sfrench at us.ibm.com>
AuthorDate: Fri Apr 18 23:26:26 2008 +0000
Committer: Steve French <sfrench at us.ibm.com>
CommitDate: Fri Apr 18 23:26:26 2008 +0000
[CIFS] Fix UNC path prefix on QueryUnixPathInfo to have correct slash
When a share was in DFS and the server was Unix/Linux, we were sending paths of the form
\\server\share/dir/file
rather than
//server/share/dir/file
There was some discussion between me and jra over whether we should use
/server/share/dir/file
as MS sometimes says - but the documentation for this claims it should be
doubleslash for this type of UNC-like path format and that works, so leaving
it as doubleslash but converting the \ to / in the the //server/share portion.
This gets Samba to now correctly return STATUS_PATH_NOT_COVERED when it is
supposed to (Windows already did since the direction of the slash was not an issue
for them). Still need another minor change to fully enable DFS (need to finish
some chages to SMBGetDFSRefer
Signed-off-by: Steve French <sfrench at us.ibm.com>
---
fs/cifs/inode.c | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index bc673c8..e1031b9 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -161,12 +161,14 @@ static void cifs_unix_info_to_inode(struct inode *inode,
spin_unlock(&inode->i_lock);
}
-static const unsigned char *cifs_get_search_path(struct cifsTconInfo *pTcon,
- const char *search_path)
+static const unsigned char *cifs_get_search_path(struct cifs_sb_info *cifs_sb,
+ const char *search_path)
{
int tree_len;
int path_len;
+ int i;
char *tmp_path;
+ struct cifsTconInfo *pTcon = cifs_sb->tcon;
if (!(pTcon->Flags & SMB_SHARE_IS_IN_DFS))
return search_path;
@@ -180,6 +182,11 @@ static const unsigned char *cifs_get_search_path(struct cifsTconInfo *pTcon,
return search_path;
strncpy(tmp_path, pTcon->treeName, tree_len);
+ if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)
+ for (i = 0; i < tree_len; i++) {
+ if (tmp_path[i] == '\\')
+ tmp_path[i] = '/';
+ }
strncpy(tmp_path+tree_len, search_path, path_len);
tmp_path[tree_len+path_len] = 0;
return tmp_path;
@@ -199,7 +206,7 @@ int cifs_get_inode_info_unix(struct inode **pinode,
pTcon = cifs_sb->tcon;
cFYI(1, ("Getting info on %s", search_path));
- full_path = cifs_get_search_path(pTcon, search_path);
+ full_path = cifs_get_search_path(cifs_sb, search_path);
try_again_CIFSSMBUnixQPathInfo:
/* could have done a find first instead but this returns more info */
@@ -402,7 +409,7 @@ int cifs_get_inode_info(struct inode **pinode,
return -ENOMEM;
pfindData = (FILE_ALL_INFO *)buf;
- full_path = cifs_get_search_path(pTcon, search_path);
+ full_path = cifs_get_search_path(cifs_sb, search_path);
try_again_CIFSSMBQPathInfo:
/* could do find first instead but this returns more info */
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-9/kernel.spec,v
retrieving revision 1.636
retrieving revision 1.637
diff -u -r1.636 -r1.637
--- kernel.spec 12 May 2008 19:08:53 -0000 1.636
+++ kernel.spec 13 May 2008 08:17:39 -0000 1.637
@@ -603,6 +603,7 @@
Patch400: linux-2.6-scsi-cpqarray-set-master.patch
Patch402: linux-2.6-scsi-mpt-vmware-fix.patch
Patch410: linux-2.6-alsa-kill-annoying-messages.patch
+Patch415: linux-2.6-cifs-fix-unc-path-prefix.patch
Patch420: linux-2.6-squashfs.patch
Patch430: linux-2.6-net-silence-noisy-printks.patch
Patch450: linux-2.6-input-kill-stupid-messages.patch
@@ -1113,6 +1114,9 @@
ApplyPatch linux-2.6-alsa-kill-annoying-messages.patch
# Filesystem patches.
+# cifs
+ApplyPatch linux-2.6-cifs-fix-unc-path-prefix.patch
+
# Squashfs
ApplyPatch linux-2.6-squashfs.patch
@@ -1795,6 +1799,9 @@
%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen
%changelog
+* Mon May 12 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.3-18
+- CIFS: fix UNC path prefix to have the correct slash (#443681)
+
* Mon May 12 2008 Chuck Ebbert <cebbert at redhat.com> 2.6.25.3-17
- Linux 2.6.25.3
Drop patches merged in 2.6.25.3:
More information about the fedora-extras-commits
mailing list