1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

63 Commits

Author SHA1 Message Date
Rusty Russell
385d925f7e s3:vfs:gpfs: fix logic when gpfs:winattr is false (the default!)
On my autocluster setup, it's not set.  Maybe it should be?  Otherwise
smbclient and some Windows client programs will get errors like:

        # smbclient //localhost/data -Uadministrator%XXX
        Domain=[VSOFS1] OS=[Unix] Server=[Samba 3.4.2-ctdb-10]
        smb: \> put /etc/resolv.conf resolv.conf
        NT_STATUS_ACCESS_DENIED closing remote file \resolv.conf
        smb: \>

Caused by attempting to update the time on close.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Michael Adam <obnox@samba.org>
2011-01-21 10:10:02 +01:00
Björn Jacke
9634d03339 s3/vfs_gpfs: map SPARSE attribute to/from WINATTRs, too 2010-12-17 21:11:04 +01:00
Volker Lendecke
24ef932a61 s3: Make gpfs winattrs work again
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 27 15:32:00 UTC 2010 on sn-devel-104
2010-10-27 15:31:59 +00:00
Christian Ambach
beb5afea54 s3:gpfs: Add support for the gpfs_ftruncate call
ported from the v3-4-ctdb branch to master
This used to be commit 1f138cc9f4a

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Oct 13 13:34:25 UTC 2010 on sn-devel-104
2010-10-13 13:34:25 +00:00
Christian Ambach
22018b8b88 s3:vfs:gpfs convert sharemodes/leases parameter
convert gpfs:sharemodes and gpfs:leases parameters from a global setting
to a per share setting
2010-10-13 12:53:16 +00:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Abhidnya P Chirmule
ac774c4969 s3: Add access_mask to the flock VFS call 2009-10-06 18:52:06 +02:00
Volker Lendecke
50f248a06c s3: Forgot to check in one build failure for vfs_gpfs.c 2009-09-24 13:11:46 +02:00
Volker Lendecke
69447de175 s3: Remove an unused variable 2009-09-24 13:11:46 +02:00
Volker Lendecke
568f818a0f s3: Make the vfs_gpfs compile at least
Not sure whether it works in this state :-)
2009-09-24 12:55:14 +02:00
Abhidnya Chirmule
277597de85 To set file create/birth time in GPFS. Signed-off-by: Abhidnya Chirmule <achirmul@in.ibm.com> 2009-09-17 02:24:13 +02:00
Volker Lendecke
c54a8db006 Make refusal of SEC_DESC_DACL_PROTECTED configurable
This adds a parameter "gpfs:refuse_dacl_protected" that defaults to false.

GPFS has no place to store the SEC_DESC_DACL_PROTECTED ACL bit. With this
parameter we give customers an option to either ignore this bit or refuse
setting an ACL with it.
2009-08-19 11:39:44 +02:00
Volker Lendecke
033185e2a1 Make the smbd VFS typesafe 2009-07-24 11:42:05 -04:00
Tim Prouty
c9b8a01714 s3: Finish plumbing the fsp->fsp_name smb_fname conversion through the modules. 2009-07-20 17:26:57 -07:00
Christian Ambach
bd58a14617 reject ACLs with DESC_DACL_PROTECTED on GPFS
as GPFS does not support the ACE4_FLAG_NO_PROPAGATE NFSv4 flag (which would be the mapping for the DESC_DACL_PROTECTED flag), the status of this flag is currently silently ignored by Samba. That means that if you deselect the "Allow inheritable permissions..." checkbox in Windows' ACL dialog and then apply the ACL, the flag will be back immediately.

To make sure that automatic migration with e.g. robocopy does not lead to ACLs silently (and unintentionally) changed, this patch adds an explicit check for this flag and if set, it will return NT_STATUS_NOT_SUPPORTED so errors are shown up on the Windows side and the Administrator is aware of the ACLs not being settable like intended

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-14 09:21:26 +02:00
Tim Prouty
e129384d7c s3: Plumb smb_filename through SMB_VFS_STAT and SMB_VFS_LSTAT
This patch introduces two new temporary helper functions
vfs_stat_smb_fname and vfs_lstat_smb_fname.  They basically allowed me
to call the new smb_filename version of stat, while avoiding plumbing
it through callers that are still too inconvenient.  As the conversion
moves along, I will be able to remove callers of this, with the goal
being to remove all callers.

There was also a bug in create_synthetic_smb_fname_split (also a
temporary utility function) that caused it to incorrectly handle
filenames with ':'s in them when in posix mode.  This is now fixed.
2009-06-24 21:15:25 -07:00
Volker Lendecke
e0a6a344be Support getting gpfs birthtime 2009-06-02 18:15:20 +02:00
Mathias Dietz
15e10c6a84 Store winattrs in GPFS
1. Store win attributes in gpfs instead of posix bits.
    2. use of path based winattr calls of gpfs.

    Signed-off-by: Mathias Dietz <mdietz@de.ibm.com>
2009-06-02 17:03:59 +02:00
Volker Lendecke
49ca690b4b Introduce "struct stat_ex" as a replacement for SMB_STRUCT_STAT
This patch introduces

struct stat_ex {
        dev_t           st_ex_dev;
        ino_t           st_ex_ino;
        mode_t          st_ex_mode;
        nlink_t         st_ex_nlink;
        uid_t           st_ex_uid;
        gid_t           st_ex_gid;
        dev_t           st_ex_rdev;
        off_t           st_ex_size;
        struct timespec st_ex_atime;
        struct timespec st_ex_mtime;
        struct timespec st_ex_ctime;
        struct timespec st_ex_btime; /* birthtime */
        blksize_t       st_ex_blksize;
        blkcnt_t        st_ex_blocks;
};
typedef struct stat_ex SMB_STRUCT_STAT;

It is really large because due to the friendly libc headers playing macro
tricks with fields like st_ino, so I renamed them to st_ex_xxx.

Why this change? To support birthtime, we already have quite a few #ifdef's at
places where it does not really belong. With a stat struct that we control, we
can consolidate the nanosecond timestamps and the birthtime deep in the VFS
stat calls.

At this moment it is triggered by a request to support the birthtime field for
GPFS. GPFS does not extend the system level struct stat, but instead has a
separate call that gets us the additional information beyond posix. Without
being able to do that within the VFS stat calls, that support would have to be
scattered around the main smbd code.

It will very likely break all the onefs modules, but I think the changes will
be reasonably easy to do.
2009-05-26 17:48:23 +02:00
Volker Lendecke
f024ca961e Use SMB_VFS_NEXT_CLOSE. This VFS stuff is really opaque to me...
Thanks Michael to provide some transparency :-)
2009-05-20 15:44:27 +02:00
Volker Lendecke
54973d0422 Fix bug disclosed by lock8 torture test
We have to drop the gpfs level share modes, regardless of whether we put
the file into the pending close queue.
2009-05-20 15:15:57 +02:00
Volker Lendecke
a2d5fe4a05 Make some functions static to vfs_gpfs.c 2009-04-06 13:29:59 +02:00
Volker Lendecke
54c2fe6583 Fix two c++ warnings in vfs_gpfs.c 2009-04-06 13:29:59 +02:00
Volker Lendecke
e8484e01ed Make use of gpfs_get_real_filename optional 2009-03-04 11:23:12 +01:00
Volker Lendecke
110bb22449 Make use of smbd_gpfs_get_realfilename_path in unix_convert
(cherry picked from commit b37684ffce)

Signed-off-by: Michael Adam <obnox@samba.org>
2008-12-10 23:57:23 +01:00
Volker Lendecke
de8bb17255 Fix nonempty blank lines in vfs_gpfs.c
Signed-off-by: Michael Adam <obnox@samba.org>
2008-12-10 23:56:17 +01:00
Volker Lendecke
7c2bdead9e Revert "Fix some merge omissions for GPFS"
This reverts commit a0efc4cffb.

This one should have been done with careful cherry-picks, sorry.

Volker
2008-12-10 23:14:46 +01:00
Volker Lendecke
8d64182659 Revert "Fix nonempty blank lines in vfs_gpfs.c"
This reverts commit a4b52118d4.
2008-12-10 23:14:16 +01:00
Volker Lendecke
1896ccb247 Revert "Make use of smbd_gpfs_get_realfilename_path in unix_convert"
This reverts commit b37684ffce.
2008-12-10 23:14:01 +01:00
Volker Lendecke
7ad9676864 Revert "Fix the build"
This reverts commit c044b09572.
2008-12-10 23:13:34 +01:00
Volker Lendecke
c044b09572 Fix the build
Crap, too many trees and no instant, infinitely fast rebuild
2008-12-10 19:02:11 +01:00
Volker Lendecke
b37684ffce Make use of smbd_gpfs_get_realfilename_path in unix_convert 2008-12-10 18:30:23 +01:00
Volker Lendecke
a4b52118d4 Fix nonempty blank lines in vfs_gpfs.c 2008-12-10 18:28:43 +01:00
Volker Lendecke
a0efc4cffb Fix some merge omissions for GPFS 2008-12-10 18:27:10 +01:00
Volker Lendecke
45b359a77f Make use of ZERO_STRUCT (the first memset was actually wrong) 2008-10-09 17:34:52 +02:00
Jeremy Allison
ec5d09dbff Update vfs version as I've added a const to the security_descriptor paramter in fset_nt_acl().
Need to watch the build farm to make sure I haven't broken the AIX or Solaris ACL modules.
Jeremy.
2008-10-07 17:50:01 -07:00
Jeremy Allison
00b2cdf75e Yay ! Remove a VFS entry. Removed the set_nt_acl() call,
this can only be done via fset_nt_acl() using an open
file/directory handle. I'd like to do the same with
get_nt_acl() but am concerned about efficiency
problems with "hide unreadable/hide unwritable" when
doing a directory listing (this would mean opening
every file in the dir on list).
Moving closer to rationalizing the ACL model and
maybe moving the POSIX calls into a posix_acl VFS
module rather than having them as first class citizens
of the VFS.
Jeremy.
(This used to be commit f487f742cb)
2008-05-08 18:09:07 -07:00
Alexander Bokovoy
313f7d10b8 Merge latest fixes to vfs_gpfs and NFS4 ACLs from Samba 3.0 CTDB branch (from http://samba.org/~tridge/3_0-ctdb)
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 1daad835cb)
2008-01-16 12:18:57 +03:00
Michael Adam
5921607f26 Remove redundant parameter fd from SMB_VFS_SYS_ACL_SET_FD().
Michael
(This used to be commit 9296e93588)
2008-01-08 01:54:19 +01:00
Michael Adam
62e9d503d8 Remove redundant parameter fd from SMB_VFS_SYS_ACL_GET_FD().
Michael
(This used to be commit 42663e8736)
2008-01-07 23:54:07 +01:00
Michael Adam
26169410cd Remove redundant parameter fd from SMB_VFS_LINUX_SETLEASE().
Michael
(This used to be commit 8880eb82f1)
2008-01-07 21:47:56 +01:00
Michael Adam
327cc04da5 Remove redundant parameter fd from SMB_VFS_KERNEL_FLOCK().
Michael
(This used to be commit 195c519377)
2008-01-07 17:14:20 +01:00
Michael Adam
e614dec27f Remove redundant parameter fd from SMB_VFS_FCHMOD().
Michael
(This used to be commit a54d5604da)
2008-01-07 15:59:02 +01:00
Michael Adam
87a684f7fc Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
(This used to be commit 0b86c420be)
2008-01-07 15:59:01 +01:00
Michael Adam
05352cf2cb Remove superfluous parameter fd from SMB_VFS_FSET_NT_ACL().
Michael
(This used to be commit 4f2d139a18)
2008-01-06 23:08:00 +01:00
Michael Adam
ee24c629a6 Remove superfluous fd parameter from SMB_VFS_FGET_NT_ACL().
Michael
(This used to be commit c0c7c1223d)
2008-01-06 23:07:59 +01:00
Michael Adam
233eb0e560 Change the prototype of the vfs function get_nt_acl().
Up to now, get_nt_acl() took a files_struct pointer (fsp) and
a file name. All the underlying functions should need and now
do need (after the previous preparatory work), is a connection_struct
and a file name. The connection_struct is already there in the
vfs_handle passed to the vfs functions. So the files_struct
argument can be eliminated.

This eliminates the need of calling open_file_stat in a couple
of places to produce the fsp needed.

Michael
(This used to be commit b5f600fab5)
2007-12-19 23:08:01 +01:00
Michael Adam
010056a5e6 Prepare the gpfs acl module for the api change in get_nt_acl().
This moves functionality from gpfsacl_get_nt_acl_common()
back to gpfsacl_get_nt_acl() and gpfsacl_fget_nt_acl(),
making both these functions more specific (calling the
corresponding fsp- and non-fsp functions).
gpfsacl_get_nt_acl_common(). is removed.

Michael
(This used to be commit d6043c1066)
2007-12-19 23:07:58 +01:00
Michael Adam
c650857fac Split smb_get_nt_acl_nfs4 into two (f- and non-f-variant).
This is the next step in preparation of a get_nt_acl prototype change.

Michael
(This used to be commit 7afeb1c6cb)
2007-12-19 23:07:57 +01:00
Michael Adam
8e2323e391 Split get_nt_acl() into two functions: fsp- and non-fsp variant.
Replace smbd/posix_acls.c:get_nt_acl() by two funcions:
posix_get_nt_acl() and posix_fget_nt_acl(). The first
takes a connection struct and a file name instead of a
files_struct pointer. This is in preparation of changing
the vfs api for SMB_VFS_GET_NT_ACL.

Michael
(This used to be commit 50c82cc145)
2007-12-19 23:07:56 +01:00