Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 294220 Details for
Bug 431868
mounting CIFS subshare doesn't autoconvert prepath delimiters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch -- add routine to convert delimiters on the fly
cifs-prefixpath-delim.patch (text/plain), 2.05 KB, created by
Jeff Layton
on 2008-02-07 15:53:12 UTC
(
hide
)
Description:
patch -- add routine to convert delimiters on the fly
Filename:
MIME Type:
Creator:
Jeff Layton
Created:
2008-02-07 15:53:12 UTC
Size:
2.05 KB
patch
obsolete
>diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c >index 65d0ba7..fdfb110 100644 >--- a/fs/cifs/connect.c >+++ b/fs/cifs/connect.c >@@ -789,6 +789,18 @@ extract_hostname(const char *unc) > return dst; > } > >+/* convert all delimiters in a path to current CIFS_DIR_SEP */ >+static void >+convert_delimiter(char *path, char new_delim) >+{ >+ char *p; >+ >+ for (p = path; *p != '\0'; p++) { >+ if (*p == '/' || *p == '\\') >+ *p = new_delim; >+ } >+} >+ > static int > cifs_parse_mount_options(char *options, const char *devname, > struct smb_vol *vol) >@@ -1044,14 +1056,15 @@ cifs_parse_mount_options(char *options, const char *devname, > "CIFS: invalid path prefix\n"); > return 1; /* needs_argument */ > } >+ /* mount.cifs should use '\\' for prefixpath delimiter now */ > if ((temp_len = strnlen(value, 1024)) < 1024) { >- if (value[0] != '/') >+ if (value[0] != '\\') > temp_len++; /* missing leading slash */ > vol->prepath = kmalloc(temp_len+1, GFP_KERNEL); > if (vol->prepath == NULL) > return 1; >- if (value[0] != '/') { >- vol->prepath[0] = '/'; >+ if (value[0] != '\\') { >+ vol->prepath[0] = '\\'; > strcpy(vol->prepath+1, value); > } else > strcpy(vol->prepath, value); >@@ -1748,7 +1761,8 @@ void reset_cifs_unix_caps(int xid, struct cifsTconInfo *tcon, > form if we are reconnecting and the server switched its > posix path capability for this share */ > if (sb && (CIFS_SB(sb)->prepathlen > 0)) >- CIFS_SB(sb)->prepath[0] = CIFS_DIR_SEP(CIFS_SB(sb)); >+ convert_delimiter(CIFS_SB(sb)->prepath, >+ CIFS_DIR_SEP(CIFS_SB(sb))); > > if (sb && (CIFS_SB(sb)->rsize > 127 * 1024)) { > if ((cap & CIFS_UNIX_LARGE_READ_CAP) == 0) { >@@ -2057,7 +2071,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, > cifs_sb->prepath = volume_info.prepath; > if (cifs_sb->prepath) { > cifs_sb->prepathlen = strlen(cifs_sb->prepath); >- cifs_sb->prepath[0] = CIFS_DIR_SEP(cifs_sb); >+ convert_delimiter(cifs_sb->prepath, >+ CIFS_DIR_SEP(cifs_sb)); > volume_info.prepath = NULL; > } else > cifs_sb->prepathlen = 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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 431868
: 294220