diff options
author | Steve French <stevef@smfhome1.smfdom> | 2004-07-12 13:47:18 -0500 |
---|---|---|
committer | Steve French <stevef@smfhome.smfdom> | 2004-07-12 13:47:18 -0500 |
commit | c1c67b31f10c1fd5a63006a7a5e0dbf52b61c84b (patch) | |
tree | 762db54781b17bc9da98ee9411fc1a8bb22391b6 /fs | |
parent | 9ee756ec3c51aa877189d0ef9ee30dbfb77826e1 (diff) | |
download | history-c1c67b31f10c1fd5a63006a7a5e0dbf52b61c84b.tar.gz |
Set Type field when creating block/char/pipe e.g. via mknod.
Fixing problem mentioned by Jeremy Allison
remove spurious warning message logged on mount with credentials file (pointed
out by Richard Hughes)
Signed-off-by: Steve French (sfrench@us.ibm.com)
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/CHANGES | 4 | ||||
-rw-r--r-- | fs/cifs/README | 9 | ||||
-rw-r--r-- | fs/cifs/TODO | 4 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 17 | ||||
-rw-r--r-- | fs/cifs/connect.c | 2 |
5 files changed, 29 insertions, 7 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 146651efd1d1ba..73dd0bcdf71afa 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES @@ -2,7 +2,9 @@ Version 1.20 ------------ Make transaction counts more consistent. Merge /proc/fs/cifs/SimultaneousOps info into /proc/fs/cifs/DebugData. Fix oops in rare oops in readdir -(in build_wildcard_path_from_dentry). +(in build_wildcard_path_from_dentry). Fix mknod to pass type field +(block/char/fifo) properly. Remove spurious mount warning log entry when +credentials passed as mount argument. Version 1.19 ------------ diff --git a/fs/cifs/README b/fs/cifs/README index 8f6080f4225512..59a00eea0b35f3 100644 --- a/fs/cifs/README +++ b/fs/cifs/README @@ -101,10 +101,11 @@ Linux: Note that ea support is required for supporting Linux xattrs. Some administrators also change the "map archive" and the "create mask" -parameters from their default values. Creating special devices (mknod) remotely -may require specifying a mkdev function to Samba. For more information on these -see the manual pages ("man smb.conf") on the Samba server system. Note that the -cifs vfs, unlike the smbfs vfs, does not read the smb.conf on the client system +parameters from their default values. Creating special devices (mknod) +remotely may require specifying a mkdev function to Samba if you are not using +Samba 3.0.5 or later. For more information on these see the manual pages +("man smb.conf") on the Samba server system. Note that the cifs vfs, +unlike the smbfs vfs, does not read the smb.conf on the client system (the few optional settings are passed in on mount via -o parameters instead). Note that Samba 2.2.7 or later includes a fix that allows the CIFS VFS to delete open files (required for strict POSIX compliance). Windows Servers already diff --git a/fs/cifs/TODO b/fs/cifs/TODO index c4ee8107a6f3f5..51b230e0ae6d58 100644 --- a/fs/cifs/TODO +++ b/fs/cifs/TODO @@ -82,7 +82,7 @@ but recognizes them succeed but still return access denied (appears to be Windows server not cifs client problem) and has not been reproduced recently. NTFS partitions do not have this problem. -4) debug connectation lock test case 10 which fails against +4) debug connectathon lock test case 10 which fails against Samba (may be unmappable due to POSIX to Windows lock model differences but worth investigating). Also debug Samba to see why lock test case 7 takes longer to complete to Samba @@ -91,7 +91,7 @@ than to Windows. Misc testing to do ================== 1) check out max path names and max path name components against various server -types. Return max path name in stat -f information +types. Try nested symlinks. Return max path name in stat -f information 2) Modify file portion of ltp so it can run against a mounted network share and run it against cifs vfs. diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 244e2ac85b63f6..c748d158f06062 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -2836,6 +2836,23 @@ setPermsRetry: data_offset->DevMajor = cpu_to_le64(MAJOR(device)); data_offset->DevMinor = cpu_to_le64(MINOR(device)); data_offset->Permissions = cpu_to_le64(mode); + + if(S_ISREG(mode)) + data_offset->Type = cpu_to_le32(UNIX_FILE); + else if(S_ISDIR(mode)) + data_offset->Type = cpu_to_le32(UNIX_DIR); + else if(S_ISLNK(mode)) + data_offset->Type = cpu_to_le32(UNIX_SYMLINK); + else if(S_ISCHR(mode)) + data_offset->Type = cpu_to_le32(UNIX_CHARDEV); + else if(S_ISBLK(mode)) + data_offset->Type = cpu_to_le32(UNIX_BLOCKDEV); + else if(S_ISFIFO(mode)) + data_offset->Type = cpu_to_le32(UNIX_FIFO); + else if(S_ISSOCK(mode)) + data_offset->Type = cpu_to_le32(UNIX_SOCKET); + + pSMB->ByteCount = cpu_to_le16(pSMB->ByteCount); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 76a0e703e17189..0e59f79b43a13d 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c @@ -715,6 +715,8 @@ cifs_parse_mount_options(char *options, const char *devname, struct smb_vol *vol if((i==15) && (value[i] != 0)) printk(KERN_WARNING "CIFS: netbiosname longer than 15 and was truncated.\n"); } + } else if (strnicmp(data, "credentials", 4) == 0) { + /* ignore */ } else if (strnicmp(data, "version", 3) == 0) { /* ignore */ } else if (strnicmp(data, "rw", 2) == 0) { |