1. 11 6月, 2009 1 次提交
  2. 10 6月, 2009 1 次提交
  3. 07 6月, 2009 2 次提交
    • S
      [CIFS] Add mention of new mount parm (forceuid) to cifs readme · f0472d0e
      Steve French 提交于
      Also update fs/cifs/CHANGES
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f0472d0e
    • J
      cifs: make overriding of ownership conditional on new mount options · 4ae1507f
      Jeff Layton 提交于
      We have a bit of a problem with the uid= option. The basic issue is that
      it means too many things and has too many side-effects.
      
      It's possible to allow an unprivileged user to mount a filesystem if the
      user owns the mountpoint, /bin/mount is setuid root, and the mount is
      set up in /etc/fstab with the "user" option.
      
      When doing this though, /bin/mount automatically adds the "uid=" and
      "gid=" options to the share. This is fortunate since the correct uid=
      option is needed in order to tell the upcall what user's credcache to
      use when generating the SPNEGO blob.
      
      On a mount without unix extensions this is fine -- you generally will
      want the files to be owned by the "owner" of the mount. The problem
      comes in on a mount with unix extensions. With those enabled, the
      uid/gid options cause the ownership of files to be overriden even though
      the server is sending along the ownership info.
      
      This means that it's not possible to have a mount by an unprivileged
      user that shows the server's file ownership info. The result is also
      inode permissions that have no reflection at all on the server. You
      simply cannot separate ownership from the mode in this fashion.
      
      This behavior also makes MultiuserMount option less usable. Once you
      pass in the uid= option for a mount, then you can't use unix ownership
      info and allow someone to share the mount.
      
      While I'm not thrilled with it, the only solution I can see is to stop
      making uid=/gid= force the overriding of ownership on mounts, and to add
      new mount options that turn this behavior on.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      4ae1507f
  4. 02 6月, 2009 1 次提交
  5. 29 5月, 2009 2 次提交
  6. 28 5月, 2009 5 次提交
  7. 27 5月, 2009 2 次提交
    • J
      cifs: tighten up default file_mode/dir_mode · f55ed1a8
      Jeff Layton 提交于
      The current default file mode is 02767 and dir mode is 0777. This is
      extremely "loose". Given that CIFS is a single-user protocol, these
      permissions allow anyone to use the mount -- in effect, giving anyone on
      the machine access to the credentials used to mount the share.
      
      Change this by making the default permissions restrict write access to
      the default owner of the mount. Give read and execute permissions to
      everyone else. These are the same permissions that VFAT mounts get by
      default so there is some precedent here.
      
      Note that this patch also removes the mandatory locking flags from the
      default file_mode. After having looked at how these flags are used by
      the kernel, I don't think that keeping them as the default offers any
      real benefit. That flag combination makes it so that the kernel enforces
      mandatory locking.
      
      Since the server is going to do that for us anyway, I don't think we
      want the client to enforce this by default on applications that just
      want advisory locks. Anyone that does want this behavior can always
      enable it by setting the file_mode appropriately.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      f55ed1a8
    • J
      cifs: fix artificial limit on reading symlinks · 46a7574c
      Jeff Layton 提交于
      There's no reason to limit the size of a symlink that we can read to
      4000 bytes. That may be nowhere near PATH_MAX if the server is sending
      UCS2 strings. CIFS should be able to read in a symlink up to the size of
      the buffer. The size of the header has already been accounted for when
      creating the slabcache, so CIFSMaxBufSize should be the correct size to
      pass in.
      
      Fixes samba bug #6384.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      46a7574c
  8. 24 5月, 2009 1 次提交
    • S
      [CIFS] Avoid open on possible directories since Samba now rejects them · 8db14ca1
      Steve French 提交于
      Small change (mostly formatting) to limit lookup based open calls to
      file create only.
      
      After discussion yesteday on samba-technical about the posix lookup
      regression,  and looking at a problem with cifs posix open to one
      particular Samba version, Jeff and JRA realized that Samba server's
      behavior changed in this area (posix open behavior on files vs.
      directories).   To make this behavior consistent, JRA just made a
      fix to Samba server to alter how it handles open of directories (now
      returning the equivalent of EISDIR instead of success). Since we don't
      know at lookup time whether the inode is a directory or file (and
      thus whether posix open will succeed with most current Samba server),
      this change avoids the posix open code on lookup open (just issues
      posix open on creates).    This gets the semantic benefits we want
      (atomicity, posix byte range locks, improved write semantics on newly
      created files) and file create still is fast, and we avoid the problem
      that Jeff noticed yesterday with "openat" (and some open directory
      calls) of non-cached directories to one version of Samba server, and
      will work with future Samba versions (which include the fix jra just
      pushed into Samba server).  I confirmed this approach with jra
      yesterday and with Shirish today.
      
      Posix open is only called (at lookup time) for file create now.
      For opens (rather than creates), because we do not know if it
      is a file or directory yet, and current Samba no longer allows
      us to do posix open on dirs, we could end up wasting an open call
      on what turns out to be a dir. For file opens, we wait to call posix
      open till cifs_open.  It could be added here (lookup) in the future
      but the performance tradeoff of the extra network request when EISDIR
      or EACCES is returned would have to be weighed against the 50%
      reduction in network traffic in the other paths.
      Reviewed-by: NShirish Pargaonkar <shirishp@us.ibm.com>
      Tested-by: NJeff Layton <jlayton@redhat.com>
      CC: Jeremy Allison <jra@samba.org>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8db14ca1
  9. 22 5月, 2009 1 次提交
  10. 19 5月, 2009 1 次提交
    • J
      cifs: fix pointer initialization and checks in cifs_follow_symlink (try #4) · 8b6427a2
      Jeff Layton 提交于
      This is the third respin of the patch posted yesterday to fix the error
      handling in cifs_follow_symlink. It also includes a fix for a bogus NULL
      pointer check in CIFSSMBQueryUnixSymLink that Jeff Moyer spotted.
      
      It's possible for CIFSSMBQueryUnixSymLink to return without setting
      target_path to a valid pointer. If that happens then the current value
      to which we're initializing this pointer could cause an oops when it's
      kfree'd.
      
      This patch is a little more comprehensive than the last patches. It
      reorganizes cifs_follow_link a bit for (hopefully) better readability.
      It should also eliminate the uneeded allocation of full_path on servers
      without unix extensions (assuming they can get to this point anyway, of
      which I'm not convinced).
      
      On a side note, I'm not sure I agree with the logic of enabling this
      query even when unix extensions are disabled on the client. It seems
      like that should disable this as well. But, changing that is outside the
      scope of this fix, so I've left it alone for now.
      Reported-by: NJeff Moyer <jmoyer@redhat.com>
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Reviewed-by: NJeff Moyer <jmoyer@redhat.com>
      Reviewed-by: NChristoph Hellwig <hch@inraded.com>
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      8b6427a2
  11. 14 5月, 2009 1 次提交
  12. 09 5月, 2009 2 次提交
  13. 08 5月, 2009 1 次提交
  14. 06 5月, 2009 2 次提交
  15. 04 5月, 2009 1 次提交
    • S
      [CIFS] NTLMSSP reenabled after move from connect.c to sess.c · 0b3cc858
      Steve French 提交于
      The NTLMSSP code was removed from fs/cifs/connect.c and merged
      (75% smaller, cleaner) into fs/cifs/sess.c
      
      As with the old code it requires that cifs be built with
      CONFIG_CIFS_EXPERIMENTAL, the /proc/fs/cifs/Experimental flag
      must be set to 2, and mount must turn on extended security
      (e.g. with sec=krb5).
      
      Although NTLMSSP encapsulated in SPNEGO is not enabled yet,
      "raw" ntlmssp is common and useful in some cases since it
      offers more complete security negotiation, and is the
      default way of negotiating security for many Windows systems.
      SPNEGO encapsulated NTLMSSP will be able to reuse the same
      code.
      Signed-off-by: NSteve French <sfrench@us.ibm.com>
      0b3cc858
  16. 02 5月, 2009 7 次提交
  17. 01 5月, 2009 9 次提交