1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-22 22:04:08 +03:00

230 Commits

Author SHA1 Message Date
Volker Lendecke
6585ea2cb7 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
2007-10-10 12:30:24 -05:00
Stefan Metzmacher
30f9171cca r24302: add a module that overloads the file_id_create VFS function
and alters the device id depending on the configured algorithm.

The algorithm is configured via "fileid:algorithm":
- "fsname" (default) uses a uint64 hash over the mount point
- "fsid" uses the fsid returned from statfs()

This is needed for "clustering = yes" on some clusterfilesystems

metze
2007-10-10 12:29:25 -05:00
Volker Lendecke
c231f7b8f6 r24280: Fix the build of vfs_afsacl.c 2007-10-10 12:29:24 -05:00
Stefan Metzmacher
0bc5a9cd01 r24123: add file_id_create() to some vfs modules
metze
2007-10-10 12:29:09 -05:00
Stefan Metzmacher
cdaa24e804 r24120: add a file_id_create() hook into the VFS layer
it's needed for some cluster filesystems to
overload this function.

metze
2007-10-10 12:29:08 -05:00
Stefan Metzmacher
0add4e9478 r24013: merge from http://samba.org/~tridge/samba_3_2_ctdb/:
fixed prototype

metze
2007-10-10 12:28:56 -05:00
James Peach
234cb7c893 r23962: Linux oplock support is conditional on HAVE_KERNEL_OPLOCKS_LINUX,
not plain old LINUX.
2007-10-10 12:28:49 -05:00
Jeremy Allison
6ba12b6cb9 r23856: Add Jiri.Sasek@Sun.COM;s fix from Axel Apitz for ZFS ACLs.
Jeremy.
2007-10-10 12:28:35 -05:00
Alexander Bokovoy
800cf5c81c r23831: Fix vfs_readahead: transparent modules should always pass through 2007-10-10 12:28:31 -05:00
Andrew Tridgell
87c91e4362 r23801: The FSF has moved around a lot. This fixes their Mass Ave address. 2007-10-10 12:28:27 -05:00
Andrew Tridgell
c676a97114 r23798: updated old Temple Place FSF addresses to new URL 2007-10-10 12:28:26 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Volker Lendecke
fa09744cce r23722: Fix the build of the catia module 2007-10-10 12:23:48 -05:00
Jeremy Allison
da0d6ba0f9 r23692: Couldn't wait, sorry :-). Did the style change.
Jeremy.
2007-10-10 12:23:46 -05:00
Simo Sorce
6b68c006f8 r23691: fix for bug on touching files as described here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=243897
2007-10-10 12:23:46 -05:00
Jeremy Allison
fc6899a550 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.
2007-10-10 12:23:37 -05:00
James Peach
b5be0c7403 r23423: Use the correct structure types in the NT_ACL operations. It's not
clear to my why the catia module feels it's necessary to implement
these operations, but at least they're now the right type.
2007-10-10 12:23:15 -05:00
James Peach
b9d6eee5d4 r23396: Make VFS callbacks static. Mark operations as OPAQUE because they
do not pass through.
2007-10-10 12:23:13 -05:00
Alexander Bokovoy
e150e42ac5 r23302: Refactor vfs_gpfs module, fix problems with chmod Tridge has found during ctdb tests 2007-10-10 12:23:04 -05:00
Volker Lendecke
553fe92451 r23228: Merge cleanup to the gpfs module from Tridge. Also potentially disable
gpfs share modes in special situations. This might be split up in
several modules later.
2007-10-10 12:22:57 -05:00
Jeremy Allison
932523cbb5 r23105: Add lchown to the vfs layer. We need this in the POSIX code.
Jeremy.
2007-10-10 12:22:46 -05:00
James Peach
0fd0b57107 r23098: Fix the case of the #include statements so this module can be built on a
case-sensitive filesystem.
2007-10-10 12:22:45 -05:00
Volker Lendecke
569c04a244 r23068: Fix some uninitialized variables in the solarisacl module 2007-10-10 12:22:18 -05:00
Michael Adam
e55f952a13 r22918: Attempt to fix the build of the tru64acl module.
Where the heck did that smb_acl_permset_t come from?
I can't remember...

Michael
2007-10-10 12:22:07 -05:00
Volker Lendecke
fd45e0ff73 r22907: Fix the build with --enable-profiling-data 2007-10-10 12:22:06 -05:00
Jeremy Allison
bd80db71e7 r22872: Add vfs_zfsacl module from Jiri Sasek <Jiri.Sasek@Sun.COM>.
Jeremy.
2007-10-10 12:22:04 -05:00
Michael Adam
af94654772 r22777: Fix for [Bug 4543] - POSIX ACL support on FreeBSD.
This adds vfs_posixacl to the list of static modules and
makes use of HAVE_ACL_GET_PERM_NP.

This is just a quick fix. FreeBSD acl support is still
hardcoded in configure.in, but actually this could be
detected in a unified test for freebsd, linux, *,
as suggested in the bugreport. This has still to be
checked and elaborated.

Michael
2007-10-10 12:21:56 -05:00
Jeremy Allison
80d981265c r22675: Simo's patch for 0 size allocation. Still need
to examine parse_misc.c fix.
Jeremy.
2007-10-10 12:19:54 -05:00
Michael Adam
6999d578ae r22615: fix prototype 2007-10-10 12:19:50 -05:00
Jeremy Allison
8044a6482c r22592: Fix TALLOC_SIZE to be consistent.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
8968808c3b r22589: Make TALLOC_ARRAY consistent across all uses.
Jeremy.
2007-10-10 12:19:49 -05:00
Jeremy Allison
f6fa3080fe r22542: Move over to using the _strict varients of the talloc
calls. No functional changes. Looks bigger than it is :-).
Jeremy.
2007-10-10 12:19:44 -05:00
Michael Adam
aef5aad678 r22529: Add implementation of HP-UX ACLs in the new vfs-module framework. 2007-10-10 12:19:42 -05:00
James Peach
b04dee02d1 r22413: Simplify the build rules for plugin modules. Add support for per-platform
exports files. Fix the shared library build pf pdb_ldap.
2007-10-10 12:19:32 -05:00
Jim McDonough
859269c949 r22148: Fix gpfs module on posix-acl test. Adds gpfsacl_sys_set_fd (calls
_file).  Thanks to Gomati Mohanan.
2007-10-10 12:19:16 -05:00
Volker Lendecke
42f4232155 r22147: Next try 2007-10-10 12:19:16 -05:00
Volker Lendecke
825255c760 r22146: Attempt to fix the build 2007-10-10 12:19:16 -05:00
Jeremy Allison
85df3fca68 r22132: I hate inefficiency. Don't call conv_str_size()
on every pread/sendfile call, initialize these
variables in an allocated struct at connection
time and just refer to them directly.
Jeremy.
2007-10-10 12:19:15 -05:00
Jeremy Allison
e296f07e1d r22111: Allow readahead params to use size suffixes as K,M, etc.
Jeremy.
2007-10-10 12:19:13 -05:00
Jeremy Allison
97fdd67e83 r22105: Added vfs_readahead module that appears to do wonderful things
for copying files from Samba when using Windows Vista Windows
explorer.... :-). By default if you add this I can go on my
vmware sessions from 7MB/sec to 12MB/sec (+1 extra MB/sec if
I turn sendfile on).
Jeremy.
2007-10-10 12:19:13 -05:00
James Peach
395fd99edb r22094: Clarify that SMB_VFS_LOCK should not be used to get lock status. 2007-10-10 12:19:10 -05:00
Jeremy Allison
17b1d11bbb r22080: Fix directory recycle module bug #4486.
Jeremy.
2007-10-10 12:19:10 -05:00
Jeremy Allison
63b061a2ea r21956: Fix bug reported by don.mccall@hp.com for platforms
without utimes() call (only utime()).
Jeremy.
2007-10-10 12:18:52 -05:00
James Peach
e7b21b1ef3 r21950: After discussion with the Apple and Linux client maintainers,
changing the FindFirst response for the UNIX_INFO2 level to include
a length field before the name. The name is not required to be null
terminated. The length field does not count any null.

Also add call to chflags(2) in the default VFS module so that this
will work be default on BSD-derived platform. Add UNIX-INFO2 test
to the build farm to get some non-BSD coverage.

Jeremy and Jerry, please review for inclusion in 3.0.25.
2007-10-10 12:18:51 -05:00
Alexander Bokovoy
b10410634f r21885: Chown logic should be activated only if nfs4:chown=yes 2007-10-10 12:18:44 -05:00
Jeremy Allison
184571e4b0 r21877: Missed one line.
Jeremy.
2007-10-10 12:18:42 -05:00
Jeremy Allison
b69e18c7f1 r21874: Fix missing notify function. Thanks to Thomas Bork <tombork@web.de>
for pointing this out !
Jeremy.
2007-10-10 12:18:42 -05:00
James Peach
7e862b9080 r21767: Revert all the bits I accidentally committed in r21766. 2007-10-10 12:18:30 -05:00
James Peach
f82ac78b2f r21766: Fix compiler warning. 2007-10-10 12:18:29 -05:00