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

579 Commits

Author SHA1 Message Date
Jeremy Allison
4c7033df5d Move v2 from timestamp to 16-byte hash. Got the change in before on disk format is fixed.
Jeremy.
2008-11-13 17:18:41 -08:00
Michael Adam
dee2c61ce0 [s3]vfs_acl_tdb: fix the build.
ndr_push_struct_blob has a different signature in master as well.

Michael
2008-11-11 10:30:29 +01:00
Jeremy Allison
d6be0ba672 Fix the build (ndr_pull_struct_blob has a different signature in master).
Jeremy.
2008-11-10 20:18:01 -08:00
Jeremy Allison
8076e50fad Added vfs_acl_tdb.c module to do ACLs completely in userspace. Passes all of RAW-ACLS except for the last test which uses a non-POSIX chown. More testing/documentation to follow.
Jeremy.
2008-11-10 17:57:22 -08:00
Jeremy Allison
813bf8b4f4 Fix a subtle logic bug in the adaption of se_create_child_secdesc(), pass RAW-ACL inheritance tests. Only access masks for SD get/set left to fix.
Jeremy.
2008-11-08 22:57:57 -08:00
Jeremy Allison
87f563c230 Start factoring out the inheritance differences.
Jeremy.
2008-11-06 01:58:56 -08:00
Jeremy Allison
24c598b1b9 Don't call FSET_NT_ACL on file create if there's no SD to set. Leave the default ACL in place.
Jeremy.
2008-11-06 01:40:21 -08:00
Jeremy Allison
4af3c2830a Only one more issue with NULL ACL test left to solve.
Jeremy.
2008-11-06 01:01:01 -08:00
Jeremy Allison
f640135d12 Fix crash in module, get more of the NULL acl test right.
Jeremy.
2008-11-06 00:50:56 -08:00
Jeremy Allison
bfc59f63f3 Pass all of RAW-ACLS except for inheritence. Working on that next.
Jeremy.
2008-11-04 01:34:08 -08:00
Jeremy Allison
4f8fac1b8e Pass all the non-inherited S4 RAW-ACL tests.
Jeremy.
2008-11-03 22:42:53 -08:00
Jelmer Vernooij
7b186c48d3 Remove sys_dl*() - stubs are already provided by libreplace. 2008-11-01 03:49:49 +01:00
Jelmer Vernooij
a6d537bb6c Move sys_realpath() to libreplace. 2008-11-01 03:42:27 +01:00
Jelmer Vernooij
38d67363ac Move sys_lchown() to libreplace. 2008-11-01 03:39:20 +01:00
Jelmer Vernooij
e8cda43e17 Move sys_symlink() to libreplace. 2008-11-01 03:35:58 +01:00
Jelmer Vernooij
bbbe6ab722 Move sys_link to libreplace. 2008-11-01 03:30:47 +01:00
Jelmer Vernooij
cdf8f57863 Use 'regular' chown, libreplace will provide (dummy) replacement if necessary. 2008-11-01 03:29:06 +01:00
Jeremy Allison
54eaf2de74 Get closer to passing S4 RAW-ACLs.
Jeremy.
2008-10-31 18:04:53 -07:00
Jeremy Allison
8344e94574 Unify se_access_check with the S4 code. Will make
calculation of SEC_FLAG_MAXIMUM_ALLOWED much easier
for files.
Jeremy.
2008-10-31 10:51:45 -07:00
Jeremy Allison
8c1a90c2e3 Start moving us closer to passing S4 RAW-ACL test using the vfs_acl_xattr module. Inheritance fails at the moment though.
Jeremy.
2008-10-30 16:13:03 -07:00
Jeremy Allison
782f309df3 Inherit Windows ACLs on a new directory.
Jeremy.
2008-10-30 13:51:28 -07:00
Jeremy Allison
680975d07b Fix CID 606 - failed to return -1 after socket() fail.
Jeremy.
2008-10-29 16:43:19 -07:00
Jeremy Allison
7c53ffea28 Allow a new file to inherit the Windows ACL from its parent.
Now to do the same for directories.
Jeremy.
2008-10-29 13:27:14 -07:00
Jelmer Vernooij
0c840bd8d2 Share xattr implementation. 2008-10-15 15:57:39 +02:00
Jelmer Vernooij
4746f79d50 Use {u,}int64_t instead of SMB_BIG_{U,}INT. 2008-10-14 01:59:36 +02:00
Jeremy Allison
2a2f9400bf Whitespace tidyup and an optimization to remove a talloc.
Jeremy.
2008-10-13 14:12:43 -07:00
Holger Hetterich
3e1d6c6020 Enable optional anonymization of user names,
if the configuration parameter anonymization_prefix is defined in
smb.conf, and use the prefix given there.
2008-10-13 14:08:49 -07:00
Jeremy Allison
e5692d4cbe Remove SEC_ACCESS. It's a uint32_t.
Jeremy.
2008-10-09 09:49:03 -07:00
Volker Lendecke
45b359a77f Make use of ZERO_STRUCT (the first memset was actually wrong) 2008-10-09 17:34:52 +02:00
Tim Prouty
88a58ae0ee Fixed "might be uninitialized" warning 2008-10-08 16:38:38 -07:00
Jeremy Allison
646df8bec6 Deal with inheritance from parent directory when setting Windows
ACLs.
Jeremy.
2008-10-08 15:18:25 -07:00
Jeremy Allison
859facda89 Fix const warning.
Jeremy.
2008-10-07 17:56:32 -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
Jeremy Allison
2024d87cf5 Make map_errno_from_nt_status() a generic call, not just a cli specific one.
Remove some unused calls from vfs_acl_xattr. Test for SD's on existing files.
Jeremy.
2008-10-07 14:43:42 -07:00
Tim Prouty
cde1b09d68 Fixed build warning "passing arg from incompatible pointer type"
The fix explicitly makes the conversion from timeval to time_t using the
existing time utility functions.

Compiling modules/vfs_smb_traffic_analyzer.c
modules/vfs_smb_traffic_analyzer.c: In function `smb_traffic_analyzer_send_data':
modules/vfs_smb_traffic_analyzer.c:173: warning: passing arg 1 of `localtime' from incompatible pointer type
2008-10-06 17:18:10 -07:00
Jeremy Allison
370cbe0060 Turn the socket connections into a refcounted list - in the common case there'll now only be one socket per smbd.
Changed the format of the wire data to (a) include a version number (V1) as the first element. (b) removed the
";)" at the end an replaced it with a "\n". Receiver can change back if needed, and now receiver can just log
"as-is" to a text file (making testing easier). Added my (C). Sorry Holger, but I've changed quite a bit now.
Jeremy.
2008-10-01 12:50:29 -07:00
Jeremy Allison
c164ff2be5 Convert to allocated strings. Use write_data(), not send as this doesn't correctly
deal with EINTR. Jim and Holger please check this still works.
Jeremy.
2008-09-30 16:19:37 -07:00
Jeremy Allison
5d7d18b7e8 Revert erroneous commit.
Jeremy.
2008-09-30 15:26:26 -07:00
Jeremy Allison
4e6445a072 Remove current_user_info - not needed.
Jeremy.
2008-09-30 15:21:58 -07:00
Jeremy Allison
321191d5e2 Restructure the module so it connects to the remote data sink
on connect, and closes the socket on client disconnect. This should
make it much more efficient. Store the remote fd in a private data
pointer off the handle. Finally we need to remove the fstrings and
convert to allocated buffer storage.
Jeremy.
2008-09-30 15:13:19 -07:00
Jeremy Allison
da6c7aa2a1 Use IPv4/v6 independent calls. Change safe_strcpy/cat to strlcpy/cat (this
needs changing to talloc_sprintf) and fix file descriptor resource leaks
in error paths. Jim and Holger please check !
Jeremy.
2008-09-25 12:02:22 -07:00
Jim McDonough
a78ac8a46b Fix the new vfs_smb_traffic_analyzer build for static links 2008-09-24 20:51:04 -04:00
Holger Hetterich
964fb9f249 SMB traffic analyzer vfs module from Holger Hetterich <hhetter@novell.com>
Used to gather data to feed to a database for live and historical
analysis of usage per user, per share, etc.

Helper apps to read the data still to come.  This one still needs to be
made ipv6 enabled (connection is made to the helper app).
2008-09-24 19:16:57 -04:00
Günther Deschner
fd3ba988dc s3-nbt: fix remaining callers of ndr_push/pull_struct_blob.
Guenther
2008-09-23 09:49:56 +02:00
Jeremy Allison
0379d9c151 Correctly get+set the NT ACL on a file. Now to make us check it on open..
Jeremy.
2008-09-17 13:44:29 -07:00
Jeremy Allison
21ca0c31b9 Mark module experimental, fix crash bugs.
Jeremy.
2008-09-17 12:34:09 -07:00
Jeremy Allison
5cc096a109 First (incomplete) cut of this module. Based on Volker's original work.
Jeremy.
2008-09-16 15:55:06 -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
Andrew Tridgell
52c39dd55d fixed an errno handling bug that could lead to an infinite loop
(This used to be commit 5ccdc58ce9)
2008-08-26 14:39:42 +02:00
Andrew Tridgell
f09e8ce2ce fixed tsmsm_sendfile(). The logic was totally broken.
(This used to be commit 794e48b809)
2008-08-26 14:39:42 +02:00
Jeremy Allison
9253044276 Fix bug #5692 - Core dump in full_audit.so.
There were some function mismatches in the various GET_NT_ACL modules (some places the fsp parameter has not been removed).
Jeremy.
(This used to be commit 221cc5e21e)
2008-08-14 10:58:50 -07:00
Michael Adam
762439025a Revert "Add a gpfs_prefetch module"
This reverts commit fc9b30bed2.

Sorry, this got pushed by accident:

"This can not go upstream yet because it uses the non-GPL libgpfs."

Michael
(This used to be commit 26a3cf0be9)
2008-08-14 17:46:28 +02:00
Michael Adam
4136ab3c98 Put prototypes of modules/vfs_irixacl.c to new modules/vfs_irixacl.h.
Thereby (hopefully) fixing the potential build problems with IRIX acls.

Michael
(This used to be commit 61c201d416)
2008-08-14 11:22:49 +02:00
Michael Adam
34294b31aa Put prototypes of modules/vfs_hpuxacl.c to new modules/vfs_hpuxacl.h.
Thereby (hopefully) fixing the potential build problems with HPUX acls.

Michael
(This used to be commit 4f2a1de990)
2008-08-14 11:22:48 +02:00
Michael Adam
1c72d476ec Put prototypes of modules/vfs_solarisacl.c to new modules/vfs_solarisacl.h.
Thereby (hopefully) fixing the potential build problems with solaris acls.

Michael
(This used to be commit 8413c05afc)
2008-08-14 11:22:48 +02:00
Michael Adam
14fd4ac3ea Put prototypes of modules/vfs_tru64acl.c to new modules/vfs_tru64acl.h.
Thereby (hopefully) fixing the build with tru64 acls.

Michael
(This used to be commit 1ab64b6985)
2008-08-14 11:22:48 +02:00
Michael Adam
7871fa0b69 Put prototypes of modules/vfs_posixacl.c into new modules/vfs_posixacl.h.
Michael
(This used to be commit 876f679343)
2008-08-14 11:22:48 +02:00
Volker Lendecke
b0935e5663 Add a gpfs_prefetch module
This can not go upstream yet because it uses the non-GPL libgpfs. So it will
not be compiled by default and will not be included in the SOFS RPMs. But upon
Sven's request, we include it in the git tree and the source RPMs, so that it
can be built for in-house tests.
(This used to be commit fc9b30bed2)
2008-08-13 11:54:05 +02:00
Andrew Tridgell
d609ccbab5 keep compatibility with v3-0-ctdb name for fileid:mapping option
(This used to be commit 2856d2e4a4)
2008-08-13 11:54:01 +02:00
Volker Lendecke
bdd815e554 Fix the build of vfs_zfsacl.c
(cherry picked from commit b83beeda44)
(This used to be commit b46ce28039)
2008-07-18 17:53:58 +02:00
Volker Lendecke
c1636e7383 Change the directory parameter in streams_depot to become consistent
This is not built by default and not documented in 3.2.0, so I doubt this will
break any setups :-)
(cherry picked from commit ca2dfb372c)
(This used to be commit 9393cdda97)
2008-07-18 11:21:57 +02:00
Jeremy Allison
4d1979423e Fix from Volodymyr Khomenko <Volodymyr.Khomenko@exanet.com>. Make ntimes
function more like POSIX and allow NULL arg. Help vfs developers.
Jeremy.
(This used to be commit 613f2849ad)
2008-07-15 15:26:36 -07:00
Volker Lendecke
a74f451a86 Remove an unused extern reference in vfs_aixacl2.c
(This used to be commit 1dfb9242d1)
2008-07-12 10:16:09 +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
Lars Müller
878766c6a8 Add SMB_VFS_OP_RECVFILE to get it in sync with vfs.h
Fix "vfs_full_audit.c: name table not in sync with vfs.h" panic reported
by Franz Sirl.
(This used to be commit 72b96b75a4)
2008-07-04 14:51:01 +02:00
Volker Lendecke
40f5eab5eb Wrap the unix token info in a unix_user_token in auth_serversupplied_info
No functional change, this is a preparation for more current_user ref removal
(This used to be commit dcaedf345e)
2008-06-19 18:51:37 +02:00
Volker Lendecke
39479c9ee6 Remove current_user_info reference from vfs_recycle.c
(This used to be commit fdc03c0a5b)
2008-06-19 15:53:43 +02:00
Volker Lendecke
3283a5d0de Remove current_user_info reference from vfs_fake_perms.c
(This used to be commit a227181e8d)
2008-06-19 15:53:43 +02:00
Volker Lendecke
ff215c4f81 Remove current_user_info reference from vfs_expand_msdfs.c
(This used to be commit 05a66980a9)
2008-06-19 15:53:43 +02:00
Volker Lendecke
17885401b8 current_user is not used in vfs_aixacl2.c
(This used to be commit 407136abdf)
2008-06-19 15:53:43 +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
Volker Lendecke
de7e6e070a AIX build fixes from William Jojo -- thanks
(cherry picked from commit cb91a47576)
(This used to be commit 90d7bc6da3)
2008-06-12 13:17:44 +02:00
Volker Lendecke
d1e0c7f0c1 Add STREAMINFO op to vfs_full_audit
Fix Coverity ID 552 and 553
(This used to be commit c46e10d260)
2008-06-07 09:04:03 +02:00
Volker Lendecke
50ab871813 Remove some references to get_current_username() and current_user_info
(This used to be commit 344d69f95e)
2008-05-25 11:43:57 +02:00
Tim Prouty
fb37f15600 Cleanup size_t return values in callers of convert_string_allocate
This patch is the second iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 6b189dabc5)
2008-05-20 22:40:13 +02:00
Volker Lendecke
5bda9a8af0 Remove "user" from connection_struct
(This used to be commit 368454a27c)
2008-05-10 11:17:01 +02:00
Volker Lendecke
53a623d8a6 Remove the unix token info from connection_struct
(This used to be commit 2834dacc8d)
2008-05-10 11:17:01 +02: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
Volker Lendecke
d62563342e Remove connection_struct->mem_ctx, connection_struct is its own parent
(This used to be commit 559180f7d3)
2008-05-05 11:23:13 +02:00
Michael Adam
0db7aba8af Remove redundant parameter fd from SMB_VFS_CLOSE().
Now all those redundant fd's have vanished from the VFS API.

Michael
(This used to be commit 1429453551)
2008-04-21 00:22:42 +02:00
Michael Adam
2f8dde9ec8 Change fd_close_posix() to return int instead of NTSTATUS.
The errno is handed up through the VFS layer to the callers.

Michael
(This used to be commit d928e6648d)
2008-04-21 00:21:24 +02:00
Michael Adam
3756467db6 Move the posix pending close functionality down into the VFS layer.
This hides the pending close fds from the outside. Call order
of SMB_VFS_CLOSE is reversed. Originally, it was:

fd_close -> fd_close_posix -> SMB_VFS_CLOSE -> close

And now it is:

fd_close -> SMB_VFS_CLOSE -> fd_close_posix -> close

This is in preparation of removing the fd parameter
from the SMB_VFS_CLOSE function. But it is also the right
place for the pending close calls anyways.

Michael
(This used to be commit 3cf56b124a)
2008-04-21 00:21:23 +02:00
Michael Adam
c57f1ab345 vfs_cacheprime: fix C++ warning - make implicit cast explicit
Michael
(This used to be commit 04d671b8c9)
2008-04-20 22:29:35 +02:00
Volker Lendecke
fd502a74f7 Remove a redundant TALLOC_FREE
(This used to be commit 8e348ab865)
2008-04-11 23:14:53 +02:00
Jeremy Allison
0d49500c35 Use size_t for strlen return, not int. Karolin please
pull.
Jeremy.
(This used to be commit f4a1fdaac0)
2008-04-08 07:43:30 -07:00
Alexander Bokovoy
0eba3b5b8f Allow broader range of HSM systems in vfs_tsmsm
Allow to specify value of DMAPI attribute returned during offline file checks, 'tsmsm: dmapi value'.
    Previously tsmsm module has supported only IBM TSM SM engine which reports file state by *existence*
    of a certain DMAPI attribute. Other HSM systems report a certain value as DMAPI request's result.
    Port from Tridge's v3-0-ctdb git tree.
(This used to be commit 1faa97d5cc)
2008-04-08 15:17:53 +04:00
Volker Lendecke
20caa9bbe6 Fix Coverity ID 450
(This used to be commit 700cceb694)
2008-03-23 18:28:23 +01:00
Volker Lendecke
527b561824 Fix Coverity warnings
ID 449, 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, 438, 437
(This used to be commit 0d50b4ee90)
2008-03-23 16:16:13 +01:00
Volker Lendecke
296bbc3c9f Fix Coverity IDs 553, 552
(This used to be commit 1a0aed566b)
2008-03-21 10:22:15 +01:00
Volker Lendecke
427c60e92c Fix some warnings in the tsmsm module
Alexander, please check!
(This used to be commit df574fd2ee)
2008-03-20 16:54:05 +01:00
Volker Lendecke
5aec381434 Need to close the /dev/zero fd
(This used to be commit c2b2a9303d)
2008-03-16 11:58:33 +01:00
Volker Lendecke
05af5c367d Respect FAMChanged -- attempt to fix bug 5307
Thanks to Ricardo Santos
(This used to be commit 8ef57a34eb)
2008-03-06 10:07:46 +01:00
Volker Lendecke
18206a4cb5 Add vfs_aio_fork
This is used for two purposes:

First, I'm using it to test the async I/O code. In the forked process it is
pretty easy to delay a reply for a random amount of time. See the
BUILD_FARM_HACKS snippet.

Second, there are systems around that claim to have Posix AIO but which is
broken. This might be some help for those systems.

Also add tests how to pass file descriptors
(This used to be commit b0e52cecf2)
2008-02-29 09:47:53 +01:00
Michael Adam
b46bf47171 Fix the build on OpenBSD: ENOTSUP is not always defined.
Michael
(This used to be commit 2e4028162f)
2008-02-25 17:06:09 +01:00
Volker Lendecke
cd95385207 Correctly check return of rename(2)
Bug 5279 -- Thanks to Max Matveev
(This used to be commit 71641f04d4)
2008-02-25 13:05:18 +01:00
Karolin Seeger
7428f00d22 Change option name.
xattr:tdb -> xattr_tdb:file (according to the other vfs option names)

Karolin
(This used to be commit a2230ccc17)
2008-02-21 19:34:48 +01:00
Jeremy Allison
94ed19c4a8 From: David Disseldorp <ddiss@sgi.com>
The vfs_prealloc module makes use of the now redundant fd parameter for
SMB_VFS_FTRUNCATE(), instead get the fd from the files_struct.

Patch for Samba 3.2 Test branch below.

Cheers, David D
(This used to be commit d9b72282c6)
2008-02-20 22:10:54 -08:00
Alexander Bokovoy
77a3e46a4c Fix typos and replace statvfs call with fs_capabilities()
(This used to be commit 863b5ed07a)
2008-01-29 18:33:22 +03:00
Alexander Bokovoy
28b27bfd40 Merge DMAPI fixes from Tridge
Support cases when existing DMAPI session is stale. In this case we are creating another one.
The code differs from 3-0_ctdb branch in that we fail when it is not possible to create more
sessions and pretend that file is offline. This allows to escape endless loop in vfs_tsmsm.c.
(This used to be commit 5efb57d904)
2008-01-29 17:43:49 +03:00
Alexander Bokovoy
ef2d66bd1d Merge branch 'ctdb-merge' into dmapi-integration
(This used to be commit 58dce4cdf2)
2008-01-29 16:19:21 +03:00
Volker Lendecke
0b10c67c0c Attempt to fix the build on OpenBSD
Thanks to metze for pointing this out
(This used to be commit c94c04e3e6)
2008-01-25 20:53:21 +01:00
Alexander Bokovoy
eba5fbff74 Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into ctdb-merge
(This used to be commit 42d06d41bf)
2008-01-24 14:06:22 +03:00
Volker Lendecke
587cf54c61 strtok -> strtok_r
(This used to be commit fd34ce4370)
2008-01-23 15:08:04 +01:00
Volker Lendecke
5b35ecd930 Remove two unused variables
(This used to be commit f12ac1eced)
2008-01-23 10:33:36 +01:00
Volker Lendecke
a4c2b04a2b Hide streams from the EA API
(This used to be commit e9bb3d5067)
2008-01-22 12:29:02 +01:00
Volker Lendecke
2dbbb37574 Attempt to fix the darwin build
(This used to be commit 5b05e09daf)
2008-01-21 18:08:19 +01:00
Volker Lendecke
9a22653222 Add SMB_VFS_FS_CAPABILITIES
It turns out that this is a necessary operation, separate from statvfs. statvfs
can fail during tcon, so conn->fs_capabilities would never see that we support
streams on a particular share.

James, can you check that I got the darwin variant right? Thanks!
(This used to be commit 3ad798d803)
2008-01-21 16:14:27 +01:00
Volker Lendecke
33f3eeaa00 Fix some "set but never used" warnings
(This used to be commit 4a6dadc517)
2008-01-20 17:44:40 +01:00
Volker Lendecke
bf7f13c9a7 Fix valgrind errors
(This used to be commit d7e6ec2258)
2008-01-20 15:29:58 +01:00
Volker Lendecke
fe57c149f0 Do not use an unfinished fsp in streams_xattr_open
(This used to be commit 023b313d0d)
2008-01-20 14:09:08 +01:00
Volker Lendecke
6fcbb1111d In streams_xattr_pwrite, base_fsp does not have an fd
These bugs haven't shown up when I did my tests with real xattrs, not with the
xattr_tdb backend. It worked because the stream fsp does has the base file as
fd.
(This used to be commit b7022f8f7b)
2008-01-20 14:05:36 +01:00
Volker Lendecke
4222fa62e9 Add some DEBUG
(This used to be commit 8db25aba63)
2008-01-20 13:55:27 +01:00
Volker Lendecke
a39771d3d2 For pread/pwrite we need to do the setxattr on base_fsp
(This used to be commit d481dddc81)
2008-01-20 13:51:52 +01:00
Volker Lendecke
a6fcaf73d7 Really remove the _NEXT_ from vfs_xattr_tdb.c
This must have been lost somewhere in my patch-mangling
(This used to be commit c1794375d1)
2008-01-20 13:49:38 +01:00
Volker Lendecke
0b9314db5a Support XATTR_CREATE and XATTR_REPLACE in vfs_xattr_tdb
(This used to be commit 3509ee597f)
2008-01-20 11:20:58 +01:00
Volker Lendecke
e1d01878f5 Complete the ea->xattr rename in vfs_xattr_tdb
(This used to be commit dac468216e)
2008-01-20 11:10:06 +01:00
Volker Lendecke
dfd05b9b65 vfs_streams_depot
Store streams in a file each. Not 100% finished, and not built by default.
(This used to be commit 5f5fc72b01)
2008-01-19 23:36:34 +01:00
Volker Lendecke
4ba64fce49 vfs_streams_xattr module
Store streams in posix xattrs. A kludge, as xattrs are limited in many ways,
but it might be a help for some situations.
(This used to be commit 83a805220e)
2008-01-19 23:34:22 +01:00
Volker Lendecke
1b976d5192 Add the STREAMINFO vfs call
Based on jpeach's work, modified the streaminfo prototype

Make use of it in trans2.c together with marshall_stream_info()
(This used to be commit c34d729c7c)
2008-01-19 22:58:17 +01:00
Volker Lendecke
70f88005c7 Fix error return in xattr_tdb_load_attrs
(This used to be commit 64e54ea8f7)
2008-01-19 18:51:20 +01:00
Alexander Bokovoy
c17c64530e Merge DMAPI fixes from CTDB Samba
(This used to be commit cf1f90ad7a)
2008-01-18 17:34:21 +03:00
Volker Lendecke
9e3634fb63 Fix two uninitialized variables in vfs_hpuxacl.c
Thanks to David Leonard <David.Leonard@quest.com>, this fixes bug 5208.

Volker
(This used to be commit a3b36c3cb0)
2008-01-17 17:22:31 +01:00
Alexander Bokovoy
03387a0f58 Remove is_remotestorage() call from VFS. We already have statvfs() there to handle FS capabilities.
As discussed with Volker, it is better to calculate FS capabilities at
connection time. We already do this with help of VFS statvfs() call
which allows to fill-in system-specific attributes including FS
capabilities. So just re-use it if you want to represent additional
capabilities in your modules. The only caution is that you need to
call underlying statvfs() call to actually get system-specific
capabilities (and other fields) added. Then add module-specific ones.
(This used to be commit e342ca0d93)
2008-01-17 16:59:29 +03:00
Alexander Bokovoy
026a66abec Rework of VFS is_offline() function to only return boolean offline/online result for a file.
This makes sense as upper levels are only taking returned result of 0
(no error) into consideration when deciding whether to mark file
offline/online as returned from is_offline.

That means that we simply can move the decision down to VFS module and
clean up upper levels so that they always see only file status. If there
is an error when trying to identify file status, then VFS module could
decide what to return (offline or online) by itself -- after all, it
ought to have system-specific knowledge anyway.
(This used to be commit 75cc086614)
2008-01-17 14:57:35 +03:00
Alexander Bokovoy
6de904b836 Fix more VFS API mixup with offline files
I'm sorry for this mess. :-(
(This used to be commit e1f5a8f107)
2008-01-17 07:34:33 +03:00
Jeremy Allison
3020ec12a3 Fix the mess that ab just made of the new VFS code.
NEEDS MORE TESTING !
Jeremy.
(This used to be commit bcc94aed6f)
2008-01-16 17:22:31 -08:00
Volker Lendecke
9158169c97 Fix an uninitialized variable warning
(This used to be commit dcb7fb2c0d)
2008-01-16 20:31:02 +01:00
Volker Lendecke
c308d76305 Fix some C++ warnings
(This used to be commit 625241c477)
2008-01-16 20:29:41 +01:00
Alexander Bokovoy
e633e4ddab Add offline storage support with Tivoli Storage Manager Space Manager
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit d7752449f3)
2008-01-16 12:26:35 +03:00
Alexander Bokovoy
d52b66daac Merge a variant of Shadow Copy module for exposing snapshots to windows clients as shadow copies from Samba 3.0 CTDB
This is a 2nd implemetation of a shadow copy module for exposing
snapshots to windows clients as shadow copies. This version has the
following features:

     1) you don't need to populate your shares with symlinks to the
     snapshots. This can be very important when you have thousands of
     shares, or use [homes]

     2) the inode number of the files is altered so it is different
     from the original. This allows the 'restore' button to work
     without a sharing violation


Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 10c2ae1efd)
2008-01-16 12:21:38 +03:00
Alexander Bokovoy
c283c1bb8b Support GPFS prealloc interface
Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit c26e355533)
2008-01-16 12:19:51 +03: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
Alexander Bokovoy
d86fc3ec8c Add support for offline files support, remote storage, and Async I/O force operations to VFS
Offline files support and remote storage are for allowing communication with
backup and archiving tools that mark files moved to a tape library as offline.
We translate this info into corresponding CIFS offline file attribute and
mark an exported volume as remote storage.

Async I/O force is to allow selective redirection of I/O operations to asynchronous
processing in case it is viable at VFS module discretion. It is needed for
proper handling of offline files as performing regular I/O on offline file will
block smbd.


Signed-off-by: Alexander Bokovoy <ab@samba.org>(This used to be commit 875208724e)
2008-01-16 12:17:03 +03:00
Volker Lendecke
ee8cf0ce40 ea_tdb->xattr_tdb also inside the module itself
(This used to be commit 642424b377)
2008-01-15 17:30:29 +01:00
Volker Lendecke
c2acec43ae rename vfs_ea_tdb to vfs_xattr_tdb
(This used to be commit 151b42a150)
2008-01-15 17:30:29 +01:00
Volker Lendecke
57cc992e0f Implement vfs_ea_tdb
This is an option for file systems that do not implement xattrs: in
lockdir/eas.tdb an array of xatts per inode is stored.

It can not solve the problem that xattrs might reappear if a posix-level
process deletes a file and happens to re-create it under the same name. On file
systems with birthtime we might have a chance to detect this, but not with
standard posix. A future version might put relief on file systems that do have
xattrs but where these are severely limited in size/speed/whatever: We can put
a simple marker as a native xattr, but the xattrs proper are stored in the tdb.

Volker
(This used to be commit 2036b4c5ad)
2008-01-15 11:01:18 +01:00
Michael Adam
fef9cf00e1 Combine fsp and tofd to tofsp in SMB_VFS_RECVFILE().
Michael
(This used to be commit 3958abffaf)
2008-01-11 01:27:05 +01:00
Michael Adam
14d45bedfa Remove now redundant parameter fd from prime_cache().
Michael
(This used to be commit 63acaf1b97)
2008-01-11 01:27:05 +01:00
Michael Adam
4caab9ca25 Combine fsp and fromfd to fromfsp in SMB_VFS_SENDFILE().
Michael
(This used to be commit a52cfb7d77)
2008-01-11 01:27:05 +01:00
Michael Adam
e17642e849 Fix the build of the cacheprime VFS module after API changes.
Sorry, that had escaped my attention.

Michael
(This used to be commit 88102b5b7c)
2008-01-10 23:40:13 +01:00
Michael Adam
e9a3a62e74 Remove redundant parameter fd from SMB_VFS_WRITE().
Michael
(This used to be commit c8ae7d095a)
2008-01-10 15:49:35 +01:00
Michael Adam
1d66f4d58b Remove redundant parameter fd from SMB_VFS_READ().
Michael
(This used to be commit a8fc2ddad8)
2008-01-10 15:33:51 +01:00
Michael Adam
4a056e127a Remove redundant parameter fd from SMB_VFS_AIO_CANCEL().
Michael
(This used to be commit 3c997ae000)
2008-01-08 12:20:55 +01:00
Michael Adam
aab6704ce8 Remove redundant parameter fd from SMB_VFS_FSETXATTR().
Michael
(This used to be commit 0bd2643463)
2008-01-08 11:47:33 +01:00
Michael Adam
1590dd32cf Remove redundant parameter fd from SMB_VFS_FREMOVEXATTR().
Michael
(This used to be commit bfc3b5a27f)
2008-01-08 11:29:09 +01:00
Michael Adam
9f691df852 Remove redundant parameter fd from SMB_VFS_FLISTXATTR().
Michael
(This used to be commit 167649b3b8)
2008-01-08 10:51:40 +01:00
Michael Adam
50ee744fa4 Remove redundant parameter fd from SMB_VFS_FGETXATTR().
Michael
(This used to be commit 2cb739a82d)
2008-01-08 10:00:47 +01:00
Michael Adam
66273a7953 Remove forgotton fd from solarisacl_sys_acl_get_fd().
Michael
(This used to be commit 38f34b1d74)
2008-01-08 01:56:56 +01: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
b2182c11ea Remove redundant parameter fd from SMB_VFS_FCHMOD_ACL().
Michael
(This used to be commit 7b201c177b)
2008-01-08 01:14:24 +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
f7bf4cb3f1 Remove redundant parameter fd from SMB_VFS_GETLOCK().
Michael
(This used to be commit ee5a20becd)
2008-01-07 22:18:50 +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
edd30e716f Remove redundant parameter fd from SMB_VFS_LOCK().
Michael
(This used to be commit 4f3ab2c406)
2008-01-07 16:38:23 +01:00
Michael Adam
299d24dbc1 Fix the build: Fix caller of strict_allocate_ftruncate().
Michael
(This used to be commit 20691272a1)
2008-01-07 16:12:03 +01:00
Michael Adam
b457b94bb8 Remove redundant parameter fd from SMB_VFS_FTRUNCATE().
Michael
(This used to be commit 2ad66050a0)
2008-01-07 15:59:02 +01:00
Michael Adam
670909cb07 Remove redundant parameter fd from SMB_VFS_FCHOWN().
Michael
(This used to be commit fbb193db3e)
2008-01-07 15:59:02 +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
8dcce0d236 Remove redundant parameter fd from SMB_VFS_FSYNC().
Michael
(This used to be commit 8f83c9a7b2)
2008-01-07 15:59:01 +01:00
Michael Adam
6f657c873e Remove redundant parameter fd from SMB_VFS_LSEEK().
Michael
(This used to be commit df929796f2)
2008-01-07 15:59:01 +01:00
Michael Adam
a56b417809 Remove redundant parameter fd from SMB_VFS_PWRITE().
Michael
(This used to be commit 8c4901a19a)
2008-01-07 15:59:01 +01:00
Michael Adam
ca275e2549 Remove unneeded parameter fd from SMB_VFS_PREAD().
Michael
(This used to be commit 73e28806ce)
2008-01-07 00:14:19 +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
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
Volker Lendecke
23c965d947 typos
(This used to be commit 30fa3477c8)
2007-12-27 00:22:07 +01:00
James Peach
a32329297d Remove unused variable 'didmsg'.
(This used to be commit 5de89dd6e0)
2007-12-19 22:39:40 -08: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
9460dfc933 Prepare the afs acl module for the api change in get_nt_acl().
This makes both of afsacl_[f]get_nt_acl() more specific,
eliminating the need for afs_get_nt_acl(). Instead, split
afs_to_nt_acl.

Michael
(This used to be commit 15caf58c81)
2007-12-19 23:08:00 +01:00
Michael Adam
aca40f29d5 Prepare the aix2 acl module for the api change in get_nt_acl().
This makes both of aixjfs2_[f]get_nt_acl() more specific,
eliminating the need for aixjfs2_get_nt_acl_common().

Michael
(This used to be commit 36e2a814ba)
2007-12-19 23:08:00 +01:00
Michael Adam
fcee8ccdcd Change aixjfs2_get_nfs4_acl() to take file name instead of fsp.
In preparation of the api change in api change in get_nt_acl().

Michael
(This used to be commit 40a1438e17)
2007-12-19 23:08:00 +01:00
Michael Adam
65b3065a4b Fix two debug statements: Add missing printf parameter.
Michael
(This used to be commit 1c4f74551f)
2007-12-19 23:07:59 +01:00
Michael Adam
35f13ae589 Reformatting: wrap long lines and remove trailing spaces.
Michael
(This used to be commit f6db5a0d05)
2007-12-19 23:07:59 +01:00
Michael Adam
c8fc49ff1b Prepare the zfs acl module for the api change in get_nt_acl().
Michael
(This used to be commit 04258231dc)
2007-12-19 23:07:58 +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
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
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
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
Jeremy Allison
ec7426d917 Fix warning message about data type always true.
Jeremy.
(This used to be commit 0a3be0aad7)
2007-12-11 15:10:37 -08:00
David Losada Carballo
febaaae202 Extend commit module to help with NFS quotas.
Add "commit on eof" and "commit past eof" modes. Patch from David
Losada Carballo with some modifications during the merge.
(This used to be commit 12eee4f7fe)
2007-11-20 16:45:33 -08:00
Jeremy Allison
8829875944 Remove pstring from modules directory.
Jeremy.
(This used to be commit 977dc3accb)
2007-11-16 17:07:11 -08:00
Michael Adam
c45970529c Fix bug #5083 (and duplicate bug #5084).
Make solarisacl_sys_acl_get_fd() return a result
when there is one (thereby fixing a memleak).

Thanks to Markus Zell for reporting this.

Michael
(This used to be commit 242fc0099c)
2007-11-15 11:08:53 +01:00
Michael Adam
b2f942cfe2 Fix build of the zfs_acl module.
There was one caller of smb_get_nt_acl_nfs4() forgotten
in the change of return value.

Michael
(This used to be commit 4d3e84a3b3)
2007-11-13 15:50:14 +01:00
Michael Adam
7559fc08c2 Fix the build: correct prototype.
Adapt prototype of smb_get_nt_acl_nfs4() in the header file, too.

Michael
(This used to be commit a2949fd7a5)
2007-11-13 15:49:40 +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
5b0b4f23ef Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
(This used to be commit 963fc76852)
2007-11-03 23:20:10 -07:00
Jeremy Allison
25074433f4 I can't get away without a 'length' arg. :-).
Jeremy.
(This used to be commit 95d01279a5)
2007-11-03 18:41:26 -07:00
Jeremy Allison
6658165d5e Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
(This used to be commit e848506c85)
2007-11-03 18:15:45 -07:00
Jeremy Allison
488b59cfac Add in the recvfile entry to the VFS layer with a default
implementation. Needed for the zero-copy write code.
Jeremy.
(This used to be commit bfbdb6324c)
2007-10-29 17:16:13 -07:00
Andrew Tridgell
e5830c1365 added a syncops VFS module for filesystems which do not guarantee meta-data operations are immediately committed to disk in stable form. Essential for clustered Samba setups
(This used to be commit 8b19cb17b9)
2007-10-23 20:43:27 +10: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
Gerald (Jerry) Carter
e5a951325a [GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe9)
2007-10-10 15:34:30 -05:00
James Peach
f3cf737ff0 r25432: Merge module linking changes from SAMBA_3_2 to SAMBA_3_2_0 to reduce
spurious tree differences.
(This used to be commit ee1eba2855)
2007-10-10 12:31:05 -05:00
Jeremy Allison
470ebf8a35 r25399: Excise uint - > uint32 (where appropriate) or unsigned int.
Jeremy.
(This used to be commit b4ee924000)
2007-10-10 12:31:02 -05:00
Jeremy Allison
3d5f029ead r25222: Fix last assumptions that (size_t)-1 can be used
as a special dest_len of sizeof(pstring).
Jeremy.
(This used to be commit 9fc14c83cc)
2007-10-10 12:30:51 -05:00
Volker Lendecke
4ee8b2937d r25055: Add file_id_string_tos
This removes file_id_string_static and file_id_string_static2
(This used to be commit 638c848c9a)
2007-10-10 12:30:36 -05: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