• R/O
  • HTTP
  • SSH
  • HTTPS

linux-2.4.36: Commit

2.4.36-stable kernel tree


Commit MetaInfo

Revisiondb3511de156debbea8966b926d391d7ba6e6958b (tree)
Zeit2007-02-01 06:59:44
Autordann frazier <dannf@dann...>
CommiterWilly Tarreau

Log Message

[PATCH] smbfs: fix problems introduced by last security backport

Users have reported a symlink issue with my recent smbfs backport.
Turns out my backport overlooked a second 2.6 patch w/ the fix:

This is a backport of Haroldo Gamal's 2.6 patch that fixes the symlink
issue, and also cleans up an unnecessary double assignment. As his
commit message notes, you will need the userspace patches from Samba
Bug #999 in order to use the permission/ownership assigned by the
server.

Signed-off-by: dann frazier <dannf@debian.org>

Ändern Zusammenfassung

Diff

--- a/fs/smbfs/inode.c
+++ b/fs/smbfs/inode.c
@@ -513,10 +513,10 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
513513 mnt->flags = (oldmnt->file_mode >> 9) | SMB_MOUNT_UID |
514514 SMB_MOUNT_GID | SMB_MOUNT_FMODE | SMB_MOUNT_DMODE;
515515 } else {
516- mnt->file_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
517- S_IROTH | S_IXOTH | S_IFREG;
518- mnt->dir_mode = mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
519- S_IROTH | S_IXOTH | S_IFDIR;
516+ mnt->file_mode = S_IRWXU | S_IRGRP | S_IXGRP |
517+ S_IROTH | S_IXOTH | S_IFREG;
518+ mnt->dir_mode = S_IRWXU | S_IRGRP | S_IXGRP |
519+ S_IROTH | S_IXOTH | S_IFDIR;
520520 if (parse_options(mnt, raw_data))
521521 goto out_bad_option;
522522 }
--- a/fs/smbfs/proc.c
+++ b/fs/smbfs/proc.c
@@ -1994,10 +1994,11 @@ void smb_decode_unix_basic(struct smb_fattr *fattr, struct smb_sb_info *server,
19941994
19951995 if ( (server->mnt->flags & SMB_MOUNT_DMODE) &&
19961996 (S_ISDIR(fattr->f_mode)) )
1997- fattr->f_mode = (server->mnt->dir_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFDIR;
1997+ fattr->f_mode = (server->mnt->dir_mode & S_IRWXUGO) | S_IFDIR;
19981998 else if ( (server->mnt->flags & SMB_MOUNT_FMODE) &&
19991999 !(S_ISDIR(fattr->f_mode)) )
2000- fattr->f_mode = (server->mnt->file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG;
2000+ fattr->f_mode = (server->mnt->file_mode & S_IRWXUGO) |
2001+ (fattr->f_mode & S_IFMT);
20012002
20022003 }
20032004
Show on old repository browser