Commit 6a0b4824 authored by Steve French's avatar Steve French Committed by Linus Torvalds
Browse files

[PATCH] cifs: Add new mount parm mapchars



For handling seven special characters that shells use for filenames.

This first parts implements conversions from Unicode. 

Signed-off-by: Steve French
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cbe0476f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -7,7 +7,9 @@ as new protocol extensions. Do not send Get/Set calls for POSIX ACLs
unless server explicitly claims to support them in CIFS Unix extensions
POSIX ACL capability bit. Fix packet signing when multiuser mounting with
different users from the same client to the same server. Fix oops in
cifs_close.
cifs_close. Add mount option for remapping reserved characters in
filenames (also allow recognizing files with created by SFU which have any
of these seven reserved characters to be recognized).

Version 1.31
------------
+11 −0
Original line number Diff line number Diff line
@@ -376,6 +376,17 @@ A partial list of the supported mount options follows:
		attributes) to the server (default) e.g. via setfattr 
		and getfattr utilities. 
  nouser_xattr  Do not allow getfattr/setfattr to get/set xattrs 
  mapchars      Translate the seven reserved characters 
			*?<>|:\	
		to the remap range (above 0xF000), which also
		allows the CIFS client to recognize files created with
		such characters by Windows's POSIX emulation. This can
		also be useful when mounting to most versions of Samba
		(which also forbids creating and opening files
		whose names contain any of these seven characters).
		This has no effect if the server does not support
		Unicode on the wire.
 nomapchars     Do not translate any of these seven characters (default).
		
The mount.cifs mount helper also accepts a few mount options before -o
including:
+10 −9
Original line number Diff line number Diff line
version 1.22 July 30, 2004 
version 1.32 April 3, 2005

A Partial List of Missing Features
==================================
@@ -14,7 +14,7 @@ b) Better pam/winbind integration (e.g. to handle uid mapping
better)

c) multi-user mounts - multiplexed sessionsetups over single vc
(ie tcp session) - prettying up needed, and more testing needed
(ie tcp session) - more testing needed

d) Kerberos/SPNEGO session setup support - (started)

@@ -67,12 +67,15 @@ q) implement support for security and trusted categories of xattrs

r) Implement O_DIRECT flag on open (already supported on mount)

KNOWN BUGS (updated December 10, 2004)
KNOWN BUGS (updated April 3, 2005)
====================================
See http://bugzilla.samba.org - search on product "CifsVFS" for
current bug list.

1) existing symbolic links (Windows reparse points) are recognized but
can not be created remotely. They are implemented for Samba and those that
support the CIFS Unix extensions but Samba has a bug currently handling
symlink text beginning with slash
support the CIFS Unix extensions, although earlier versions of Samba
overly restrict the pathnames.
2) follow_link and readdir code does not follow dfs junctions
but recognizes them
3) create of new files to FAT partitions on Windows servers can
@@ -98,7 +101,5 @@ there are some easy changes that can be done to parallelize sequential writes,
and when signing is disabled to request larger read sizes (larger than 
negotiated size) and send larger write sizes to modern servers.

4) More exhaustively test the recently added NT4 support against various
NT4 service pack levels, and fix cifs_setattr for setting file times and 
size to fall back to level 1 when error invalid level returned.
4) More exhaustively test against less common servers.  More testing
against Windows 9x, Windows ME servers.
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
#define CIFS_MOUNT_SERVER_INUM  4 /* inode numbers from uniqueid from server */
#define CIFS_MOUNT_DIRECT_IO    8 /* do not write nor read through page cache */
#define CIFS_MOUNT_NO_XATTR  0x10 /* if set - disable xattr support */
#define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames */

struct cifs_sb_info {
	struct cifsTconInfo *tcon;	/* primary mount */
+2 −0
Original line number Diff line number Diff line
@@ -212,6 +212,8 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon,
extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon,
			const unsigned char *searchName, __u64 * inode_number,
			const struct nls_table *nls_codepage);
extern int cifs_convertUCSpath(char *target, const __u16 *source, int maxlen,
			const struct nls_table * codepage);
#endif /* CONFIG_CIFS_EXPERIMENTAL */

extern int CIFSSMBLock(const int xid, struct cifsTconInfo *tcon,
Loading