Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12010
b: refs/heads/master
c: d7245c2
h: refs/heads/master
v: v3
  • Loading branch information
Steve French committed Jul 14, 2005
1 parent 30601ef commit cbf9967
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4887c61811c2283162684d7f9075b7676ef6a9bf
refs/heads/master: d7245c2ccf14cde2023273c1ec246732d96e2c27
1 change: 1 addition & 0 deletions trunk/fs/cifs/cifs_fs_sb.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#define CIFS_MOUNT_NO_XATTR 0x10 /* if set - disable xattr support */
#define CIFS_MOUNT_MAP_SPECIAL_CHR 0x20 /* remap illegal chars in filenames */
#define CIFS_MOUNT_POSIX_PATHS 0x40 /* Negotiate posix pathnames if possible. */
#define CIFS_MOUNT_UNX_EMUL 0x80 /* Network compat with SFUnix emulation */

struct cifs_sb_info {
struct cifsTconInfo *tcon; /* primary mount */
Expand Down
7 changes: 7 additions & 0 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ struct smb_vol {
unsigned direct_io:1;
unsigned remap:1; /* set to remap seven reserved chars in filenames */
unsigned posix_paths:1; /* unset to not ask for posix pathnames. */
unsigned sfu_emul:1;
unsigned int rsize;
unsigned int wsize;
unsigned int sockopt;
Expand Down Expand Up @@ -1027,6 +1028,10 @@ cifs_parse_mount_options(char *options, const char *devname,struct smb_vol *vol)
vol->remap = 1;
} else if (strnicmp(data, "nomapchars", 10) == 0) {
vol->remap = 0;
} else if (strnicmp(data, "sfu", 3) == 0) {
vol->sfu_emul = 1;
} else if (strnicmp(data, "nosfu", 5) == 0) {
vol->sfu_emul = 0;
} else if (strnicmp(data, "posixpaths", 10) == 0) {
vol->posix_paths = 1;
} else if (strnicmp(data, "noposixpaths", 12) == 0) {
Expand Down Expand Up @@ -1687,6 +1692,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_MAP_SPECIAL_CHR;
if(volume_info.no_xattr)
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_NO_XATTR;
if(volume_info.sfu_emul)
cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_UNX_EMUL;

if(volume_info.direct_io) {
cERROR(1,("mounting share using direct i/o"));
Expand Down
12 changes: 11 additions & 1 deletion trunk/fs/cifs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode,
CIFS_MOUNT_MAP_SPECIAL_CHR);
}
else {
/* BB implement via Windows security descriptors */
/* BB implement mode setting via Windows security descriptors */
/* eg CIFSSMBWinSetPerms(xid,pTcon,full_path,mode,-1,-1,local_nls);*/
/* could set r/o dos attribute if mode & 0222 == 0 */
}
Expand Down Expand Up @@ -326,6 +326,16 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, dev_t dev
if(rc == 0)
d_instantiate(direntry, newinode);
}
} else {
if((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) &&
(special_file(mode))) {

cFYI(1,("sfu compat create special file"));
/* Attributes = cpu_to_le32(ATTR_SYSTEM);
rc = CIFSSMBOpen(xid, pTcon, full_path, disposition, ...); */

/* add code here to set EAs */
}
}

kfree(full_path);
Expand Down

0 comments on commit cbf9967

Please sign in to comment.