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

147 Commits

Author SHA1 Message Date
Alexander Werth
4a3bf4dd9b s3: Add params parameter to smbacl4_nfs42win function.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Alexander Werth
7978fe2584 s3: Change smbacl4_get_vfs_params to use connection_struct instead of fsp.
Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Alexander Werth
be0e269246 s3: Move up declaration of params struct and related function.
We need the parameters earlier in the code so we move up
    the declaration of the params struct. Since reading the
    parameters is closely related the definition of the function
    smbacl4_get_vfs_params has also been moved up.

Reviewed-By: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:21 +02:00
Andrew Bartlett
a65568750b vfs: Allocate SMB4ACL_T on an explict memory context
This ensures the caller knows exactly what the memory lifetime of this
returned object is.  This makes the NFSv4 ACL code consistent with the
POSIX and NT ACL code, to avoid supprising developers who have worked
on those other parts of the ACL code.

Most of this patch is adding a memory context to the callers and passing it in.

Andrew Bartlett
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:20 +02:00
Andrew Bartlett
67bb7d93ba vfs: Add vfs_handle_struct argument to smb_set_nt_acl_nfs4 and the callback
This allows the callback to call xattr based storage functions that need this argument.

Andrew Bartlett

Reviewed-by: Jeremy Allison <jra@samba.org>
2013-05-09 06:18:20 +02:00
Christian Ambach
e6a100e86b s3:modules:nfs4_acls remove unused mem_ctx parameter to smbacl4_fill_ace4
Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Sat Nov 17 01:11:07 CET 2012 on sn-devel-104
2012-11-17 01:11:07 +01:00
Christian Ambach
c9d70740e3 s3:modules:nfs4_acls fix memory hierarchy in smb_create_smb4acl
the ACEs should be talloc children of the ACL itself and not be placed on talloc_tos()

Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2012-11-16 23:28:21 +01:00
Andrew Bartlett
c8ade07760 smbd: Add mem_ctx to {f,}get_nt_acl VFS call
This makes it clear which context the returned SD is allocated on, as
a number of callers do not want it on talloc_tos().

As the ACL transformation allocates and then no longer needs a great
deal of memory, a talloc_stackframe() call is used to contain the
memory that is not returned further up the stack.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Volker Lendecke
1c35c22e62 s3: Pass down smb_filename to smbacl4_fill_ace4
A full fsp is a bit overkill here

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct  9 13:38:49 CEST 2012 on sn-devel-104
2012-10-09 13:38:49 +02:00
Christian Ambach
1947164feb s3:nfs4acls filter away inheritance flags on files
While it is possible to define inheritance flags on files on Windows, this will
be denied by GPFS and UFS (and potentially others).

So it will be better to strip of these bits when being set for files instead of
failing to set the ACL completely (this is current behavior).

Users that want to retain the full SD will have to use acl_xattr (acl_tdb), as
other pieces of the SD are also lost when translating to NFSv4. So this should
not be a too intrusive change, but allow users to migrate data with such flags
instead of failing to migrate the ACL completely.
2012-09-27 04:36:52 +02:00
Christian Ambach
19631e8e7e s3:nfs4acls pass down fsp instead of just the filename 2012-09-27 04:36:52 +02:00
Andrew Bartlett
f36e28d131 s3-nfs4acls: Remove lookup_sid and sidmap from NFSv4 ACL mapping and check gid first
By checking just the IDMAP, and by removing the sidmap and lookup_sid calls, we support
IDMAP_BOTH.  This is because by checking for a mapping to a GID first, we can rely on
the fact that IDMAP_BOTH will resolve to a GID.

If the sidmap idea is valued - it allows multiple SIDs to map to a single unix ID, this should
be done in the IDMAP layer.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Aug 11 01:17:36 CEST 2012 on sn-devel-104
2012-08-11 01:17:36 +02:00
Alexander Werth
24f7085e4f s3:Really ignore unknown special ids in NFSv4 ACLs.
Signed-off-by: Christian Ambach <ambi@samba.org>

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed Jul 18 17:45:05 CEST 2012 on sn-devel-104
2012-07-18 17:45:05 +02:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
2012-01-18 14:48:04 +01:00
Michael Adam
4cb75bdbb1 s3:vfs: convert nfs4_acls sidmap db code to use dbwrap_wrapper functions
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Volker Lendecke
e952c69317 s3: Trim lines in nfs4_acls.c
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Sep 16 01:39:36 CEST 2011 on sn-devel-104
2011-09-16 01:39:36 +02:00
Volker Lendecke
9021934887 s3: Fix some nonempty blank lines 2011-09-16 00:08:43 +02:00
Jeremy Allison
0aa6751e91 Tidy up previous patch for bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.
aceType is an enum field, not a bitmask.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Sep  8 03:34:39 CEST 2011 on sn-devel-104
2011-09-08 03:34:39 +02:00
Ira Cooper
600451da33 Fix bug #8442 - NFSv4 DENY ACLs always include SYNCHRONIZE flag - blocking renames.
Thanks to Youzhong Yang for discovering this issue.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Sep  7 22:56:06 CEST 2011 on sn-devel-104
2011-09-07 22:56:06 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Michael Adam
ee3be0defa s3:modules:nfs4_acls: fix the include of dbwrap.h to not include "include/" 2011-07-29 12:23:12 +02:00
Michael Adam
0ad8c12d48 s3:modules:nfs4_acls: improve fix for bug #8330
simplify the check insmbacl4_find_equal_special()

Signed-off-by: Michael Adam <obnox@samba.org>

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Jul 28 13:20:38 CEST 2011 on sn-devel-104
2011-07-28 13:20:38 +02:00
Christian Ambach
abf3573c21 s3:modules fix Bug 8330 NFSv4 ACL merging logic is broken
we should not merge ACEs with different flags (e.g. CI/OI/I/)
Otherwise ACLs get wrong entries and thus wrong semantics

Example:
ACL:BUILTIN\Users:ALLOWED/0x0/FULL
ACL:BUILTIN\Users:ALLOWED/I/READ
got merged to
ACL:BUILTIN\Users:ALLOWED/I/FULL

This is not the same and also leads to wrong displays
in the Windows ACL dialog

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed Jul 27 16:03:51 CEST 2011 on sn-devel-104
2011-07-27 16:03:51 +02:00
Andrew Bartlett
489f528857 param: Merge param headers into lib/param/loadparm.h
This defines a common table format, so we can in future define a
common table.

Andrew Bartlett
2011-06-29 15:44:09 +10:00
Rusty Russell
d925b327f4 tdb_compat: Higher level API fixes.
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Jeremy Allison
313bb1fb9c Split the ACE flag mapping between nfs4 and Windows
into two separate functions rather than trying to do
it inline. Allows us to carefully control what flags
are mapped to what in one place. Modification to
bug #8191 - vfs_gpfs dosn't honor ACE_FLAG_INHERITED_ACE
2011-06-01 02:54:51 +02:00
Gregor Beck
817c64f5de nfs4_acls: pass ACE_FLAG_INHERITED_ACE down from the client
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Gregor Beck
b0471303ba nfs4_acls: pass ACE_FLAG_INHERITED_ACE up to the client
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Christian Ambach
53829fd495 s3:modules properly terminate enums in nfs4 acl code
same issue as with the audit modules:
using a wrong parameter leads to smbd crash as lp_enum()
will not terminate on last entry of the array

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Tue May 24 20:13:39 CEST 2011 on sn-devel-104
2011-05-24 20:13:39 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Günther Deschner
45364f5e69 s3-vfs: include smbd/smbd.h in vfs modules.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
235f148590 s3-passdb: use passdb headers where needed.
Guenther
2011-03-30 01:13:08 +02:00
Günther Deschner
0e771263ee s3-includes: only include system/filesys.h when needed.
Guenther
2011-03-30 01:13:07 +02:00
Jeremy Allison
e68f6adca9 If possible (O_DIRECTORY exists) open an fd for a directory open.
Start of the move towards handle-based code for directory access.
Currently makes fstat/fchown code work for directories rather than
falling back to pathnames.

Jeremy.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Feb  8 06:34:41 CET 2011 on sn-devel-104
2011-02-08 06:34:41 +01:00
Jeremy Allison
df34e804fc Fix try_chown code. Use new vfs_chown_fsp() which always trys fd first.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Feb  5 03:33:59 CET 2011 on sn-devel-104
2011-02-05 03:33:58 +01:00
Paul B. Henson
99a74ff5e6 Fix bug #7909 - map SYNCHRONIZE acl permission statically in zfs_acl vfs module.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 13 20:02:32 CET 2011 on sn-devel-104
2011-01-13 20:02:31 +01:00
Günther Deschner
64e9f79587 s3: fix the build of idmap_adex, idmap_tdb2, idmap_hash and several vfs modules.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 18 14:39:39 UTC 2010 on sn-devel-104
2010-10-18 14:39:39 +00:00
Günther Deschner
51ea39c5c8 s3-vfs: fix the build of nfs4_acls.c
Guenther
2010-09-26 21:30:02 +02:00
Volker Lendecke
4ccf3a05af s3: Fix the build of the nfs4_acl module 2010-08-30 15:38:12 +02:00
Volker Lendecke
12d1a3b0a5 s3: Fix the build of the nfsv4 acl code 2010-06-03 16:10:47 +02:00
Günther Deschner
b6a2cea74d s3-security: use shared "Standard access rights.".
Guenther
2010-06-03 11:00:26 +02:00
Günther Deschner
b5c2af9447 s3-security: use shared "File Object specific access rights".
Guenther
2010-06-03 11:00:25 +02:00
Günther Deschner
a75436e3ee s3-security: use shared SECINFO_DACL define.
Guenther
2010-06-03 11:00:12 +02:00
Günther Deschner
630c27bdad s3-security: use shared SECINFO_GROUP define.
Guenther
2010-06-03 10:59:38 +02:00
Günther Deschner
415d3d5fe7 s3-security: use shared SECINFO_OWNER define.
Guenther
2010-06-03 10:59:15 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Günther Deschner
d4474ba470 s3-secdesc: use SD_REVISION from security.idl.
Guenther
2010-05-18 12:52:18 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
8951c8301a s3-secdesc: remove "typedef struct security_acl SEC_ACL".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
a8b01d1f3b s3-secdesc: remove "typedef struct security_ace SEC_ACE".
Guenther
2010-05-18 12:30:11 +02:00
Jeremy Allison
6b2358e15e Pass "connection_struct *conn" into functions that currently use "current_user.XXX"
Will allow me to replace them with accessor functions.

Jeremy.
2010-03-15 14:49:11 -07:00
Jeremy Allison
4b85a0ea7f Rever e80ceb1d73 "Remove more uses of "extern struct current_user current_user;"."
As requested by Volker, split this into smaller commits.

Jeremy.
2010-03-15 14:48:54 -07:00
Jeremy Allison
e80ceb1d73 Remove more uses of "extern struct current_user current_user;".
Use accessor functions to get to this value. Tidies up much of
the user context code. Volker, please look at the changes in smbd/uid.c
to familiarize yourself with these changes as I think they make the
logic in there cleaner.

Cause smbd/posix_acls.c code to look at current user context, not
stored context on the conn struct - allows correct use of these
function calls under a become_root()/unbecome_root() pair.

Jeremy.
2010-03-12 13:56:51 -08:00
Jeremy Allison
1e322cf6a9 Fix more use of VFS_STAT when posix pathnames selected.
Jeremy.
2009-10-02 11:05:03 -07:00
Jeremy Allison
a023b6c64b Use defined names rather than numeric constants to make code
clearer.
Jeremy.
2009-08-14 15:06:11 -07:00
Michael Adam
12864ffd51 gpfs.so: map the file_inherit and dir_inherit flags away for files
GPFS sets inherits dir_inhert and file_inherit flags
to files, too, which confuses windows, and seems to
be wrong anyways.

So when mapping a nfs4 acl to a windows acl, we map these
flags away for files.

Michael
2009-08-14 23:23:20 +02: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
Tim Prouty
1a1d10d22f s3: Plumb smb_filename through dos_mode() and related funtions 2009-07-08 21:36:03 -07:00
Christian Ambach
5e7da42f6e do not merge ACEs with different SMB_ACE4_INHERIT_ONLY_ACE flag, this leads to wrong inheritance flags in the ACL e.g. (on GPFS) user:10000036:rwxc:allow (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL (X)READ_ATTR (X)READ_NAMED (X)DELETE (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED
user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

would be merged to

user:10000036:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

group:10000005:rwxc:allow:FileInherit:DirInherit:InheritOnly
 (X)READ/LIST (X)WRITE/CREATE (X)MKDIR (X)SYNCHRONIZE (X)READ_ACL  (X)READ_ATTR  (X)READ_NAMED
 (X)DELETE    (X)DELETE_CHILD (X)CHOWN (X)EXEC/SEARCH (X)WRITE_ACL (X)WRITE_ATTR (X)WRITE_NAMED

so the explicit right for the user on the parent directory will be gone (the InheritOnly flag only accounts to subdirectories)
thus leaving the user without access to the directory itself

Signed-off-by: Christian Ambach <christian.ambach@de.ibm.com>
2009-07-06 12:28:52 +02:00
Volker Lendecke
6a66114f25 Add a \n to a debug message in smbacl4_nfs42win 2009-06-25 14:47:27 +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
4df33ec4a7 Fix the build of nfs4_acls.c 2009-05-27 11:54:15 +02:00
Volker Lendecke
a8ffc286a4 Fix a size_t/int warning 2009-05-27 11:54:14 +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
9e70a960b7 Fix the build of nfsv4_acls.c
.. after adding smb_iconv_convenience to ndr_size_security_descriptor()
2009-03-27 11:10:50 +01:00
Jeremy Allison
0b62cdbed0 Quieten down a boatload of shadowed variable warnings on Solaris.
Makes real problems easier to spot.
Jeremy.
2009-02-23 15:03:29 -08:00
Jeremy Allison
e6a5f11865 Fix bug #6133 - Cannot delete non-ACL files on Solaris/ZFS/NFSv4 ACL filesystem.
As the NFSv4 ACL mapping code doesn't map write directory into the DELETE_CHILD
permission bit (which we require before allowing a delete) no one can delete
files without an explicit DELETE_CHILD bit set on the directory. Add this mapping.
Jeremy.
2009-02-20 08:23:52 -08:00
Jeremy Allison
b30b1cfcaf Apply same logic fix for #4308 Excel save operation corrupts file ACLs
to NFSv4 ACL code as this uses the same flawed logic as posix_acls.c.
Jeremy.
2009-01-22 16:21:02 -08:00
Jeremy Allison
e5692d4cbe Remove SEC_ACCESS. It's a uint32_t.
Jeremy.
2008-10-09 09:49:03 -07: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
Volker Lendecke
d4b41079cb When setting an NFSv4 ACL, map generic bits
(This used to be commit dbe7a61be2)
2008-09-08 16:53:54 +02:00
Volker Lendecke
e9489e9ff6 Fix the build of nfs4_acls.c
(This used to be commit 2abb7cd867)
2008-07-11 13:03:42 +02:00
Michael Adam
e1732fae33 Remove reference to current_user from modules/nfs4_acls.c .
Michael
(This used to be commit 50fbfa0348)
2008-06-17 10:33:12 +02: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
87a684f7fc Remove redundant parameter fd from SMB_VFS_FSTAT().
Michael
(This used to be commit 0b86c420be)
2008-01-07 15:59:01 +01:00
Volker Lendecke
7cbdb48475 Remove tiny code duplication
ndr_size_security_descriptor does the same as sec_desc_size
(This used to be commit bc3bd7a8e7)
2007-12-29 23:13:26 +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
cb69a78505 Split smbacl4_GetFileOwner into two (f- and non-f-variant).
This is in preparation of a get_nt_acl prototype change.
(This used to be commit e0672a46a2)
2007-12-19 23:07:57 +01:00
Volker Lendecke
900288a2b8 Replace sid_string_static by sid_string_dbg in DEBUGs
(This used to be commit bb35e794ec)
2007-12-15 22:09:36 +01:00
Volker Lendecke
15953b82eb Make [f]get_nt_acl return NTSTATUS
(This used to be commit dcbe1bf942)
2007-11-13 15:47:01 +01:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Volker Lendecke
929e1d9920 r24809: Consolidate the use of temporary talloc contexts.
This adds the two functions talloc_stackframe() and talloc_tos().

 * When a new talloc stackframe is allocated with talloc_stackframe(), then
 * the TALLOC_CTX returned with talloc_tos() is reset to that new
 * frame. Whenever that stack frame is TALLOC_FREE()'ed, then the reverse
 * happens: The previous talloc_tos() is restored.
 *
 * This API is designed to be robust in the sense that if someone forgets to
 * TALLOC_FREE() a stackframe, then the next outer one correctly cleans up and
 * resets the talloc_tos().

The original motivation for this patch was to get rid of the
sid_string_static & friends buffers. Explicitly passing talloc context
everywhere clutters code too much for my taste, so an implicit
talloc_tos() is introduced here. Many of these static buffers are
replaced by a single static pointer.

The intended use would thus be that low-level functions can rather
freely push stuff to talloc_tos, the upper layers clean up by freeing
the stackframe. The more of these stackframes are used and correctly
freed the more exact the memory cleanup happens.

This patch removes the main_loop_talloc_ctx, tmp_talloc_ctx and
lp_talloc_ctx (did I forget any?)

So, never do a

tmp_ctx = talloc_init("foo");

anymore, instead, use

tmp_ctx = talloc_stackframe()

:-)

Volker
(This used to be commit 6585ea2cb7)
2007-10-10 12:30:24 -05:00
Andrew Tridgell
153cfb9c83 r23801: The FSF has moved around a lot. This fixes their Mass Ave address.
(This used to be commit 87c91e4362)
2007-10-10 12:28:27 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Jeremy Allison
a0ac7a7f4c r23620: Convert set_nt_acl to return NTSTATUS. Also fix the chown
return to correctly return NT_STATUS_INVALID_OWNER if it
should be disallowed. Matches better what W2K3R3 does.

NFSv4 ACL module owners, please examine these changes.

Jeremy.
(This used to be commit fc6899a550)
2007-10-10 12:23:37 -05:00
Alexander Bokovoy
ea7f6e7afa r23302: Refactor vfs_gpfs module, fix problems with chmod Tridge has found during ctdb tests
(This used to be commit e150e42ac5)
2007-10-10 12:23:04 -05:00
Jeremy Allison
09ba519eb4 r22592: Fix TALLOC_SIZE to be consistent.
Jeremy.
(This used to be commit 8044a6482c)
2007-10-10 12:19:49 -05:00
Jeremy Allison
12ba88574b r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
(This used to be commit f6fa3080fe)
2007-10-10 12:19:44 -05:00
Alexander Bokovoy
679a313517 r21885: Chown logic should be activated only if nfs4:chown=yes
(This used to be commit b10410634f)
2007-10-10 12:18:44 -05:00
Volker Lendecke
b3d18b12c2 r18785: Check in Peter Somogyis build fix
(This used to be commit 31c1be9056)
2007-10-10 12:00:57 -05:00
Jeremy Allison
eb6e31afed r18719: Compile fix from Peter Somogyi.
Jeremy.
(This used to be commit 867eeaafce)
2007-10-10 12:00:52 -05:00
Jeremy Allison
8155621d54 r18603: Add in the NFSv4 ACL mapping code from IBM.
Sorry for the delay :-).
Jeremy.
(This used to be commit a52fa21895)
2007-10-10 11:51:59 -05:00
Jeremy Allison
d42a96b3ec r17367: Reverting the ab code. Note I'm not saying this
code is wrong or bad or anything, just that it
needs to be discussed & reviewed on the samba-technical
list before we add a platform-specific NFSv4 mapping.
That way lies a lot of future pain :-).
Jeremy.
(This used to be commit 330899ec30)
2007-10-10 11:38:29 -05:00
Alexander Bokovoy
fbd04d65c5 r17358: Re-add JFS2 NFS4 ACLs support, move readme for it into AIX-specific examples directory.
(This used to be commit c085355c32)
2007-10-10 11:38:28 -05:00
Alexander Bokovoy
16bf23d973 r17354: Revert -r 17353 per Volker request while gpfs compatibility layer code will be released.
(This used to be commit 5b1db01514)
2007-10-10 11:38:27 -05:00
Alexander Bokovoy
4cf5769331 r17353: Add support for JFS2 NFS4/AIXC and GPFS acls based on NFSv4 ACLs.
(This used to be commit 72312cb2e2)
2007-10-10 11:38:27 -05:00