The Samba-Bugzilla – Attachment 621 Details for
Bug 999
smbmount unable to use uid and gid options with kernel 2.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed solution to fix the issue.
smbfs.patch (text/plain), 2.19 KB, created by
Haroldo Gamal
on 2004-08-27 11:49:07 UTC
(
hide
)
Description:
proposed solution to fix the issue.
Filename:
MIME Type:
Creator:
Haroldo Gamal
Created:
2004-08-27 11:49:07 UTC
Size:
2.19 KB
patch
obsolete
>diff -Naur fs/smbfs.old/proc.c fs/smbfs/proc.c >--- fs/smbfs.old/proc.c 2004-04-14 10:05:40.000000000 -0300 >+++ fs/smbfs/proc.c 2004-08-27 14:42:05.000000000 -0300 >@@ -1942,7 +1942,7 @@ > return result; > } > >-void smb_decode_unix_basic(struct smb_fattr *fattr, char *p) >+void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p) > { > /* FIXME: verify nls support. all is sent as utf8? */ > >@@ -1966,8 +1966,17 @@ > fattr->f_ctime = smb_ntutc2unixutc(LVAL(p, 16)); > fattr->f_atime = smb_ntutc2unixutc(LVAL(p, 24)); > fattr->f_mtime = smb_ntutc2unixutc(LVAL(p, 32)); >- fattr->f_uid = LVAL(p, 40); >- fattr->f_gid = LVAL(p, 48); >+ >+ if (server->mnt->uid == 0) >+ fattr->f_uid = LVAL(p, 40); >+ else >+ fattr->f_uid = server->mnt->uid; >+ >+ if (server->mnt->gid == 0) >+ fattr->f_gid = LVAL(p, 48); >+ else >+ fattr->f_gid = server->mnt->gid; >+ > fattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56)); > > if (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) { >@@ -2057,7 +2066,7 @@ > /* FIXME: should we check the length?? */ > > p += 8; >- smb_decode_unix_basic(fattr, p); >+ smb_decode_unix_basic(fattr, server, p); > VERBOSE("info SMB_FIND_FILE_UNIX at %p, len=%d, name=%.*s\n", > p, len, len, qname->name); > break; >@@ -2682,7 +2691,7 @@ > goto out; > } > >- smb_decode_unix_basic(attr, resp_data); >+ smb_decode_unix_basic(attr, server, resp_data); > result = 0; > > out: >diff -Naur fs/smbfs.old/proto.h fs/smbfs/proto.h >--- fs/smbfs.old/proto.h 2004-02-18 10:36:31.000000000 -0300 >+++ fs/smbfs/proto.h 2004-08-27 14:39:21.000000000 -0300 >@@ -21,7 +21,7 @@ > extern int smb_proc_unlink(struct dentry *dentry); > extern int smb_proc_flush(struct smb_sb_info *server, __u16 fileid); > extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr); >-extern void smb_decode_unix_basic(struct smb_fattr *fattr, char *p); >+extern void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p); > extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr); > extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr); > extern int smb_proc_setattr_unix(struct dentry *dentry, struct iattr *attr, unsigned int major, unsigned int minor);
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 Raw
Actions:
View
Attachments on
bug 999
: 621 |
626
|
628
|
634
|
635
|
2801