diff for duplicates of <416EA4CD.3080804@silexonline.org> diff --git a/a/2.hdr b/N1/2.hdr index 7ecb8ea..4b86001 100644 --- a/a/2.hdr +++ b/N1/2.hdr @@ -1,5 +1,4 @@ -Content-Type: text/x-patch; - name="smbfs.patch" +Content-Type: text/plain; charset="us-ascii" +MIME-Version: 1.0 Content-Transfer-Encoding: 7bit -Content-Disposition: inline; - filename="smbfs.patch" +Content-Disposition: inline diff --git a/a/2.txt b/N1/2.txt index d81bae9..f3df97c 100644 --- a/a/2.txt +++ b/N1/2.txt @@ -1,177 +1,3 @@ -diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/inode.c linux-2.6.8.1/fs/smbfs/inode.c ---- linux-2.6.8.1.org/fs/smbfs/inode.c 2004-08-14 07:54:50.000000000 -0300 -+++ linux-2.6.8.1/fs/smbfs/inode.c 2004-09-01 16:38:14.000000000 -0300 -@@ -368,7 +368,6 @@ parse_options(struct smb_mount_data_kern - &optopt, &optarg, &flags, &value)) > 0) { - - VERBOSE("'%s' -> '%s'\n", optopt, optarg ? optarg : "<none>"); -- - switch (c) { - case 1: - /* got a "flag" option */ -@@ -383,15 +382,19 @@ parse_options(struct smb_mount_data_kern - break; - case 'u': - mnt->uid = value; -+ flags |= SMB_MOUNT_UID; - break; - case 'g': - mnt->gid = value; -+ flags |= SMB_MOUNT_GID; - break; - case 'f': - mnt->file_mode = (value & S_IRWXUGO) | S_IFREG; -+ flags |= SMB_MOUNT_FMODE; - break; - case 'd': - mnt->dir_mode = (value & S_IRWXUGO) | S_IFDIR; -+ flags |= SMB_MOUNT_DMODE; - break; - case 'i': - strlcpy(mnt->codepage.local_name, optarg, -@@ -429,9 +432,9 @@ smb_show_options(struct seq_file *s, str - if (mnt->flags & opts[i].flag) - seq_printf(s, ",%s", opts[i].name); - -- if (mnt->uid != 0) -+ if (mnt->flags & SMB_MOUNT_UID) - seq_printf(s, ",uid=%d", mnt->uid); -- if (mnt->gid != 0) -+ if (mnt->flags & SMB_MOUNT_GID) - seq_printf(s, ",gid=%d", mnt->gid); - if (mnt->mounted_uid != 0) - seq_printf(s, ",mounted_uid=%d", mnt->mounted_uid); -@@ -440,8 +443,10 @@ smb_show_options(struct seq_file *s, str - * Defaults for file_mode and dir_mode are unknown to us; they - * depend on the current umask of the user doing the mount. - */ -- seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO); -- seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO); -+ if (mnt->flags & SMB_MOUNT_FMODE) -+ seq_printf(s, ",file_mode=%04o", mnt->file_mode & S_IRWXUGO); -+ if (mnt->flags & SMB_MOUNT_DMODE) -+ seq_printf(s, ",dir_mode=%04o", mnt->dir_mode & S_IRWXUGO); - - if (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT)) - seq_printf(s, ",iocharset=%s", mnt->codepage.local_name); -@@ -566,8 +571,13 @@ int smb_fill_super(struct super_block *s - mnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG; - mnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR; - -- mnt->flags = (oldmnt->file_mode >> 9); -+ mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID | -+ SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE; - } else { -+ mnt->file_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | -+ S_IROTH | S_IXOTH | S_IFREG; -+ mnt->dir_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | -+ S_IROTH | S_IXOTH | S_IFDIR; - if (parse_options(mnt, raw_data)) - goto out_bad_option; - } -@@ -599,6 +609,7 @@ int smb_fill_super(struct super_block *s - sb->s_root = d_alloc_root(root_inode); - if (!sb->s_root) - goto out_no_root; -+ - smb_new_dentry(sb->s_root); - - return 0; -diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/proc.c linux-2.6.8.1/fs/smbfs/proc.c ---- linux-2.6.8.1.org/fs/smbfs/proc.c 2004-08-14 07:54:50.000000000 -0300 -+++ linux-2.6.8.1/fs/smbfs/proc.c 2004-09-01 12:22:56.000000000 -0300 -@@ -2074,7 +2074,7 @@ out: - 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? */ - -@@ -2098,8 +2098,17 @@ void smb_decode_unix_basic(struct smb_fa - 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->flags & SMB_MOUNT_UID) -+ fattr->f_uid = server->mnt->uid; -+ else -+ fattr->f_uid = LVAL(p, 40); -+ -+ if (server->mnt->flags & SMB_MOUNT_GID) -+ fattr->f_gid = server->mnt->gid; -+ else -+ fattr->f_gid = LVAL(p, 48); -+ - fattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56)); - - if (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) { -@@ -2108,10 +2117,19 @@ void smb_decode_unix_basic(struct smb_fa - - fattr->f_rdev = MKDEV(major & 0xffffffff, minor & 0xffffffff); - if (MAJOR(fattr->f_rdev) != (major & 0xffffffff) || -- MINOR(fattr->f_rdev) != (minor & 0xffffffff)) -+ MINOR(fattr->f_rdev) != (minor & 0xffffffff)) - fattr->f_rdev = 0; - } -+ - fattr->f_mode |= LVAL(p, 84); -+ -+ if ( (server->mnt->flags & SMB_MOUNT_DMODE) && -+ (S_ISDIR(fattr->f_mode)) ) -+ fattr->f_mode = (server->mnt->dir_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFDIR; -+ else if ( (server->mnt->flags & SMB_MOUNT_FMODE) && -+ !(S_ISDIR(fattr->f_mode)) ) -+ fattr->f_mode = (server->mnt->file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG; -+ - } - - /* -@@ -2197,7 +2215,7 @@ smb_decode_long_dirent(struct smb_sb_inf - /* 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; -@@ -2756,7 +2774,7 @@ smb_proc_getattr_unix(struct smb_sb_info - if (result < 0) - goto out_free; - -- smb_decode_unix_basic(attr, req->rq_data); -+ smb_decode_unix_basic(attr, server, req->rq_data); - - out_free: - smb_rput(req); -diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/proto.h linux-2.6.8.1/fs/smbfs/proto.h ---- linux-2.6.8.1.org/fs/smbfs/proto.h 2004-08-14 07:55:34.000000000 -0300 -+++ linux-2.6.8.1/fs/smbfs/proto.h 2004-08-31 13:10:37.000000000 -0300 -@@ -24,7 +24,7 @@ extern int smb_proc_rmdir(struct dentry - 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 *d, struct iattr *attr, unsigned int major, unsigned int minor); -diff -uprN -X dontdiff linux-2.6.8.1.org/include/linux/smb_mount.h linux-2.6.8.1/include/linux/smb_mount.h ---- linux-2.6.8.1.org/include/linux/smb_mount.h 2004-08-14 07:54:46.000000000 -0300 -+++ linux-2.6.8.1/include/linux/smb_mount.h 2004-08-31 13:10:29.000000000 -0300 -@@ -38,7 +38,10 @@ struct smb_mount_data { - #define SMB_MOUNT_DIRATTR 0x0004 /* Use find_first for getattr */ - #define SMB_MOUNT_CASE 0x0008 /* Be case sensitive */ - #define SMB_MOUNT_UNICODE 0x0010 /* Server talks unicode */ -- -+#define SMB_MOUNT_UID 0x0020 /* Use user specified uid */ -+#define SMB_MOUNT_GID 0x0040 /* Use user specified gid */ -+#define SMB_MOUNT_FMODE 0x0080 /* Use user specified file mode */ -+#define SMB_MOUNT_DMODE 0x0100 /* Use user specified dir mode */ - - struct smb_mount_data_kernel { - int version; +-- +To unsubscribe from this list go to the following URL and read the +instructions: http://lists.samba.org/mailman/listinfo/samba diff --git a/a/content_digest b/N1/content_digest index 8630af7..a8e2407 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -31,184 +31,9 @@ "\n" PS: Thank you Randy. "\01:2\0" - "fn\0smbfs.patch\0" "b\0" - "diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/inode.c linux-2.6.8.1/fs/smbfs/inode.c\n" - "--- linux-2.6.8.1.org/fs/smbfs/inode.c\t2004-08-14 07:54:50.000000000 -0300\n" - "+++ linux-2.6.8.1/fs/smbfs/inode.c\t2004-09-01 16:38:14.000000000 -0300\n" - "@@ -368,7 +368,6 @@ parse_options(struct smb_mount_data_kern\n" - " \t\t\t\t&optopt, &optarg, &flags, &value)) > 0) {\n" - " \n" - " \t\tVERBOSE(\"'%s' -> '%s'\\n\", optopt, optarg ? optarg : \"<none>\");\n" - "-\n" - " \t\tswitch (c) {\n" - " \t\tcase 1:\n" - " \t\t\t/* got a \"flag\" option */\n" - "@@ -383,15 +382,19 @@ parse_options(struct smb_mount_data_kern\n" - " \t\t\tbreak;\n" - " \t\tcase 'u':\n" - " \t\t\tmnt->uid = value;\n" - "+\t\t\tflags |= SMB_MOUNT_UID;\n" - " \t\t\tbreak;\n" - " \t\tcase 'g':\n" - " \t\t\tmnt->gid = value;\n" - "+\t\t\tflags |= SMB_MOUNT_GID;\n" - " \t\t\tbreak;\n" - " \t\tcase 'f':\n" - " \t\t\tmnt->file_mode = (value & S_IRWXUGO) | S_IFREG;\n" - "+\t\t\tflags |= SMB_MOUNT_FMODE;\n" - " \t\t\tbreak;\n" - " \t\tcase 'd':\n" - " \t\t\tmnt->dir_mode = (value & S_IRWXUGO) | S_IFDIR;\n" - "+\t\t\tflags |= SMB_MOUNT_DMODE;\n" - " \t\t\tbreak;\n" - " \t\tcase 'i':\n" - " \t\t\tstrlcpy(mnt->codepage.local_name, optarg, \n" - "@@ -429,9 +432,9 @@ smb_show_options(struct seq_file *s, str\n" - " \t\tif (mnt->flags & opts[i].flag)\n" - " \t\t\tseq_printf(s, \",%s\", opts[i].name);\n" - " \n" - "-\tif (mnt->uid != 0)\n" - "+\tif (mnt->flags & SMB_MOUNT_UID)\n" - " \t\tseq_printf(s, \",uid=%d\", mnt->uid);\n" - "-\tif (mnt->gid != 0)\n" - "+\tif (mnt->flags & SMB_MOUNT_GID)\n" - " \t\tseq_printf(s, \",gid=%d\", mnt->gid);\n" - " \tif (mnt->mounted_uid != 0)\n" - " \t\tseq_printf(s, \",mounted_uid=%d\", mnt->mounted_uid);\n" - "@@ -440,8 +443,10 @@ smb_show_options(struct seq_file *s, str\n" - " \t * Defaults for file_mode and dir_mode are unknown to us; they\n" - " \t * depend on the current umask of the user doing the mount.\n" - " \t */\n" - "-\tseq_printf(s, \",file_mode=%04o\", mnt->file_mode & S_IRWXUGO);\n" - "-\tseq_printf(s, \",dir_mode=%04o\", mnt->dir_mode & S_IRWXUGO);\n" - "+\tif (mnt->flags & SMB_MOUNT_FMODE)\n" - "+\t\tseq_printf(s, \",file_mode=%04o\", mnt->file_mode & S_IRWXUGO);\n" - "+\tif (mnt->flags & SMB_MOUNT_DMODE)\n" - "+\t\tseq_printf(s, \",dir_mode=%04o\", mnt->dir_mode & S_IRWXUGO);\n" - " \n" - " \tif (strcmp(mnt->codepage.local_name, CONFIG_NLS_DEFAULT))\n" - " \t\tseq_printf(s, \",iocharset=%s\", mnt->codepage.local_name);\n" - "@@ -566,8 +571,13 @@ int smb_fill_super(struct super_block *s\n" - " \t\tmnt->file_mode = (oldmnt->file_mode & S_IRWXUGO) | S_IFREG;\n" - " \t\tmnt->dir_mode = (oldmnt->dir_mode & S_IRWXUGO) | S_IFDIR;\n" - " \n" - "-\t\tmnt->flags = (oldmnt->file_mode >> 9);\n" - "+\t\tmnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID | \n" - "+\t\t\tSMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE;\n" - " \t} else {\n" - "+\t\tmnt->file_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | \n" - "+\t\t\t\t\t\tS_IROTH | S_IXOTH | S_IFREG;\n" - "+\t\tmnt->dir_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP | \n" - "+\t\t\t\t\t\tS_IROTH | S_IXOTH | S_IFDIR;\n" - " \t\tif (parse_options(mnt, raw_data))\n" - " \t\t\tgoto out_bad_option;\n" - " \t}\n" - "@@ -599,6 +609,7 @@ int smb_fill_super(struct super_block *s\n" - " \tsb->s_root = d_alloc_root(root_inode);\n" - " \tif (!sb->s_root)\n" - " \t\tgoto out_no_root;\n" - "+\n" - " \tsmb_new_dentry(sb->s_root);\n" - " \n" - " \treturn 0;\n" - "diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/proc.c linux-2.6.8.1/fs/smbfs/proc.c\n" - "--- linux-2.6.8.1.org/fs/smbfs/proc.c\t2004-08-14 07:54:50.000000000 -0300\n" - "+++ linux-2.6.8.1/fs/smbfs/proc.c\t2004-09-01 12:22:56.000000000 -0300\n" - "@@ -2074,7 +2074,7 @@ out:\n" - " \treturn result;\n" - " }\n" - " \n" - "-void smb_decode_unix_basic(struct smb_fattr *fattr, char *p)\n" - "+void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p)\n" - " {\n" - " \t/* FIXME: verify nls support. all is sent as utf8? */\n" - " \n" - "@@ -2098,8 +2098,17 @@ void smb_decode_unix_basic(struct smb_fa\n" - " \tfattr->f_ctime = smb_ntutc2unixutc(LVAL(p, 16));\n" - " \tfattr->f_atime = smb_ntutc2unixutc(LVAL(p, 24));\n" - " \tfattr->f_mtime = smb_ntutc2unixutc(LVAL(p, 32));\n" - "-\tfattr->f_uid = LVAL(p, 40); \n" - "-\tfattr->f_gid = LVAL(p, 48); \n" - "+\n" - "+\tif (server->mnt->flags & SMB_MOUNT_UID)\n" - "+\t\tfattr->f_uid = server->mnt->uid;\n" - "+\telse\n" - "+\t\tfattr->f_uid = LVAL(p, 40); \n" - "+\n" - "+\tif (server->mnt->flags & SMB_MOUNT_GID)\n" - "+\t\tfattr->f_gid = server->mnt->gid;\n" - "+\telse\n" - "+\t\tfattr->f_gid = LVAL(p, 48); \n" - "+\n" - " \tfattr->f_mode |= smb_filetype_to_mode(WVAL(p, 56));\n" - " \n" - " \tif (S_ISBLK(fattr->f_mode) || S_ISCHR(fattr->f_mode)) {\n" - "@@ -2108,10 +2117,19 @@ void smb_decode_unix_basic(struct smb_fa\n" - " \n" - " \t\tfattr->f_rdev = MKDEV(major & 0xffffffff, minor & 0xffffffff);\n" - " \t\tif (MAJOR(fattr->f_rdev) != (major & 0xffffffff) ||\n" - "-\t\t MINOR(fattr->f_rdev) != (minor & 0xffffffff))\n" - "+\t \tMINOR(fattr->f_rdev) != (minor & 0xffffffff))\n" - " \t\t\tfattr->f_rdev = 0;\n" - " \t}\n" - "+\n" - " \tfattr->f_mode |= LVAL(p, 84);\n" - "+\n" - "+\tif ( (server->mnt->flags & SMB_MOUNT_DMODE) &&\n" - "+\t (S_ISDIR(fattr->f_mode)) ) \n" - "+\t\tfattr->f_mode = (server->mnt->dir_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFDIR;\n" - "+\telse if ( (server->mnt->flags & SMB_MOUNT_FMODE) &&\n" - "+\t !(S_ISDIR(fattr->f_mode)) ) \n" - "+\t\tfattr->f_mode = (server->mnt->file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG;\n" - "+\n" - " }\n" - " \n" - " /*\n" - "@@ -2197,7 +2215,7 @@ smb_decode_long_dirent(struct smb_sb_inf\n" - " \t\t/* FIXME: should we check the length?? */\n" - " \n" - " \t\tp += 8;\n" - "-\t\tsmb_decode_unix_basic(fattr, p);\n" - "+\t\tsmb_decode_unix_basic(fattr, server, p);\n" - " \t\tVERBOSE(\"info SMB_FIND_FILE_UNIX at %p, len=%d, name=%.*s\\n\",\n" - " \t\t\tp, len, len, qname->name);\n" - " \t\tbreak;\n" - "@@ -2756,7 +2774,7 @@ smb_proc_getattr_unix(struct smb_sb_info\n" - " \tif (result < 0)\n" - " \t\tgoto out_free;\n" - " \n" - "-\tsmb_decode_unix_basic(attr, req->rq_data);\n" - "+\tsmb_decode_unix_basic(attr, server, req->rq_data);\n" - " \n" - " out_free:\n" - " \tsmb_rput(req);\n" - "diff -uprN -X dontdiff linux-2.6.8.1.org/fs/smbfs/proto.h linux-2.6.8.1/fs/smbfs/proto.h\n" - "--- linux-2.6.8.1.org/fs/smbfs/proto.h\t2004-08-14 07:55:34.000000000 -0300\n" - "+++ linux-2.6.8.1/fs/smbfs/proto.h\t2004-08-31 13:10:37.000000000 -0300\n" - "@@ -24,7 +24,7 @@ extern int smb_proc_rmdir(struct dentry \n" - " extern int smb_proc_unlink(struct dentry *dentry);\n" - " extern int smb_proc_flush(struct smb_sb_info *server, __u16 fileid);\n" - " extern void smb_init_root_dirent(struct smb_sb_info *server, struct smb_fattr *fattr);\n" - "-extern void smb_decode_unix_basic(struct smb_fattr *fattr, char *p);\n" - "+extern void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server, char *p);\n" - " extern int smb_proc_getattr(struct dentry *dir, struct smb_fattr *fattr);\n" - " extern int smb_proc_setattr(struct dentry *dir, struct smb_fattr *fattr);\n" - " extern int smb_proc_setattr_unix(struct dentry *d, struct iattr *attr, unsigned int major, unsigned int minor);\n" - "diff -uprN -X dontdiff linux-2.6.8.1.org/include/linux/smb_mount.h linux-2.6.8.1/include/linux/smb_mount.h\n" - "--- linux-2.6.8.1.org/include/linux/smb_mount.h\t2004-08-14 07:54:46.000000000 -0300\n" - "+++ linux-2.6.8.1/include/linux/smb_mount.h\t2004-08-31 13:10:29.000000000 -0300\n" - "@@ -38,7 +38,10 @@ struct smb_mount_data {\n" - " #define SMB_MOUNT_DIRATTR\t0x0004\t/* Use find_first for getattr */\n" - " #define SMB_MOUNT_CASE\t\t0x0008\t/* Be case sensitive */\n" - " #define SMB_MOUNT_UNICODE\t0x0010\t/* Server talks unicode */\n" - "-\n" - "+#define SMB_MOUNT_UID\t\t0x0020 /* Use user specified uid */\n" - "+#define SMB_MOUNT_GID\t\t0x0040 /* Use user specified gid */\n" - "+#define SMB_MOUNT_FMODE\t\t0x0080 /* Use user specified file mode */\n" - "+#define SMB_MOUNT_DMODE\t\t0x0100 /* Use user specified dir mode */\n" - " \n" - " struct smb_mount_data_kernel {\n" - " \tint version;" + "-- \n" + "To unsubscribe from this list go to the following URL and read the\n" + instructions: http://lists.samba.org/mailman/listinfo/samba -cee6cea4ae00de5570f6b08bb5f6b15c87b0f402b165858d0fcaa8b6c9f6f7a2 +aea4585b1a78d66c556da25123de77a77b9fa01dacf464261e2fcada1f2ff8be
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.