Andrew Kroeger
6b5fbf7e4e
registry: Implement recursive deletes for dir-backed registry.
...
When deleting a registry key that contains subkeys or values, Windows performs a
recursive deletion that removes any subkeys or values. This update makes
deletes for an dir-backed registry consistent with Windows.
The dir-backed registry relies on the underlying filesystem, which does not
generally have transactional integrity when performing multiple operations.
Therefore, if an error occurs during the recursive deletion, the dir-backed
registry may be left in an inconsistent state.
2008-02-26 19:27:14 -06:00
Andrew Kroeger
ca796c8fb1
registry: Implement recursive deletes for ldb-backed registry.
...
When deleting a registry key that contains subkeys or values, Windows performs a
recursive deletion that removes any subkeys or values. This update makes
deletes for an ldb-backed registry consistent with Windows.
Under ldb, the deletion is done using an explicit transaction. If an error
occurs during the deletion the entire transaction is cancelled, leaving the
registry as it was before the deletions started.
2008-02-26 19:27:14 -06:00
Michael Adam
900d17acb9
libreplace: Add tests for connect and gethostbyname.
...
Provide dummy replacements when a function isnt found.
The functions are also searched for in certain libraries,
and variables SOCKET_LIBS and NSL_LIBS are set accordingly.
One purpose of this is to fix the getifaddrs tests on
systems where e.g. the socket calls require special libs
for linking.
Michael
2008-02-26 16:41:09 +01:00
Michael Adam
85f707c6ab
pidl: Remove superfluous semicolon in perl code.
...
Michael
2008-02-26 16:41:09 +01:00
Stefan Metzmacher
4d17d44d3f
RAW-OPLOCK: BATCH15: make sure a qpathinfo doesn't break batch oplocks
...
metze
2008-02-26 14:52:50 +01:00
Stefan Metzmacher
c475353e34
opendb_tdb: with break_to_none attribute only opens also break oplocks
...
metze
2008-02-26 13:53:33 +01:00
Stefan Metzmacher
27e39063a0
pvfs_open: pass down an access mask to pvfs_can_update_file_size()
...
You just need SEC_FILE_WRITE_ATTRIBUTE to change
the filesize...
metze
2008-02-26 13:53:15 +01:00
Stefan Metzmacher
066ba3c7cf
pvfs_qfileinfo: down discard the return value of pvfs_can_stat()
...
The odb_can_open() code returns DELETE_PENDING if
a delete is really pending.
metze
2008-02-26 13:52:34 +01:00
Stefan Metzmacher
6c34c7bc68
pvfs_open: pass down an access mask in pvfs_can_stat()
...
metze
2008-02-26 13:52:34 +01:00
Stefan Metzmacher
10c42e3d4a
pvfs_open: pass NTCREATEX_DISP_OPEN to odb_can_open()
...
As 0 is NTCREATEX_DISP_SUPERSEDE and that's not what we want here.
metze
2008-02-26 13:52:33 +01:00
Michael Adam
8a26a6e8f1
Fix build on VOS: socklen_t is needed for rep_inet_ntop: move it up.
...
Michael
2008-02-26 12:01:39 +01:00
Stefan Metzmacher
16c60cd347
BASE-DEFER_OPEN: be less strict with to late responses
...
The server might be just busy.
metze
2008-02-26 10:31:37 +01:00
Stefan Metzmacher
278eea57fa
selftest: Samba4 passes all oplocks tests now
...
The support for oplocks is not completely finished
I believe we will not pass some non existing test.
But it's a good start.
metze
2008-02-26 09:33:01 +01:00
Stefan Metzmacher
4e27ac8c52
pvfs_setpathinfo: retry setpathinfo after oplock not granted on on setpathinfo ALLOCATION_INFO and END_OF_FILE_INFO
...
metze
2008-02-26 09:33:00 +01:00
Stefan Metzmacher
66ad1081f2
pvfs_open: add pvfs_can_update_file_size()
...
TODO: this is not complete, we need more tests to trigger this
metze
2008-02-26 09:33:00 +01:00
Stefan Metzmacher
746e89ce2e
pvfs_unlink: retry unlink after oplock not granted
...
metze
2008-02-26 09:32:59 +01:00
Stefan Metzmacher
5abc57ddab
pvfs: add posix:oplocktimeout=30 option
...
metze
2008-02-26 09:32:59 +01:00
Stefan Metzmacher
b258f9d8d4
pvfs_setfileinfo: break level2 oplocks on setfileinfo() ALLOCATION_INFO and END_OF_FILE_INFO
...
metze
2008-02-26 09:32:59 +01:00
Stefan Metzmacher
b8c42a1ff8
pvfs: send oplock breaks to none to level2 holders on write/lock requests
...
metze
2008-02-26 09:32:58 +01:00
Stefan Metzmacher
e0837238b6
pvfs_oplocks: add pvfs_break_level2_oplocks()
...
metze
2008-02-26 09:32:58 +01:00
Stefan Metzmacher
27ec7bfc8b
pvfs: handle oplock releases in its own function pvfs_oplock_release()
...
metze
2008-02-26 09:32:57 +01:00
Stefan Metzmacher
dd56f55afd
pvfs_open: call pvfs_setup_oplock() if an oplock was granted
...
This is needed to receive oplock breaks from other "processes"
metze
2008-02-26 09:32:57 +01:00
Stefan Metzmacher
b09a2b1267
pvfs: add pvfs_setup_oplock() to receive oplock breaks and pass them to the client
...
metze
2008-02-26 09:32:57 +01:00
Stefan Metzmacher
56bd63a423
pvfs_open: make the retry logic indepdendent from open and sharing violations
...
metze
2008-02-26 09:32:56 +01:00
Stefan Metzmacher
904159327b
pvfs_open: fix odb_can_open() callers after prototype change
...
metze
2008-02-26 09:32:56 +01:00
Stefan Metzmacher
e6b708a52b
opendb: unify the parameters of odb_open_file() and odb_can_open()
...
metze
2008-02-26 09:32:56 +01:00
Stefan Metzmacher
46500983fe
pvfs_open: pass down open_disposition and break_to_none to odb_open_file()
...
metze
2008-02-26 09:32:55 +01:00
Stefan Metzmacher
aaaa26ae5e
opendb: pass down open_disposition and break_to_none to odb_open_file()
...
metze
2008-02-26 09:32:55 +01:00
Stefan Metzmacher
1ba0b9a8f1
pvfs_setfileinfo_rename: map DELETE_PENDING to ACCESS_DENIED
...
This is needed as odb_can_open/pvfs_can_delete changed the return value.
metze
2008-02-26 09:31:20 +01:00
Stefan Metzmacher
5b12157e0f
opendb_tdb: only file->delete_on_close == true should give DELETE_PENDING
...
metze
2008-02-26 09:29:42 +01:00
Stefan Metzmacher
65cfe71b26
opendb_tdb: move sharemode, oplock logic into odb_tdb_open_can_internal()
...
metze
2008-02-26 09:29:41 +01:00
Stefan Metzmacher
fbfe953ba3
opendb_tdb: add force break to none logic
...
metze
2008-02-26 09:29:41 +01:00
Stefan Metzmacher
7872b05abe
opendb_tdb: attribute only opens doesn't conflict with BATCH oplocks
...
metze
2008-02-26 09:29:41 +01:00
Stefan Metzmacher
57f1b9d11c
opendb_tdb: grant level2 oplocks
...
metze
2008-02-26 09:29:40 +01:00
Stefan Metzmacher
bd3654500b
opendb: add odb_break_oplocks() function
...
This send breaks to none to all level2 holders
metze
2008-02-26 09:29:40 +01:00
Simo Sorce
8cb07814bc
Update homepages for talloc, tdb and ldb subprojects
2008-02-25 14:03:07 -05:00
Stefan Metzmacher
df576d69c6
opendb: add odb_update_oplock() call
...
metze
2008-02-25 11:51:17 +01:00
Stefan Metzmacher
49402007f6
opendb: send also the oplock break level on MSG_NTVFS_OPLOCK_BREAK
...
metze
2008-02-25 11:50:39 +01:00
Stefan Metzmacher
11f35a2a4d
opendb: add odb_get_key() function to get the key back from a struct odb_lock
...
metze
2008-02-25 11:50:30 +01:00
Stefan Metzmacher
438032e12f
pvfs_unlink: move stream logic into pvfs_unlink_one()
...
metze
2008-02-25 08:03:44 +01:00
Stefan Metzmacher
7572afdc26
pvfs_unlink: splitup the logic into generic and file specific functions
...
metze
2008-02-25 08:03:43 +01:00
Stefan Metzmacher
83e6c99f78
pvfs_unlink: add a fast path for the non wildcard case
...
metze
2008-02-25 08:03:42 +01:00
Stefan Metzmacher
e01554e161
pvfs_unlink: move !name->stream_exists into the caller
...
metze
2008-02-25 08:03:41 +01:00
Stefan Metzmacher
8301189e94
pvfs_unlink: pass down union smb_unlink completely to sub functions
...
metze
2008-02-25 08:03:40 +01:00
Stefan Metzmacher
43ec7fa2d8
pvfs_unlink: pass down a struct pvfs_filename to pvfs_unlink_one()
...
metze
2008-02-25 08:03:39 +01:00
Stefan Metzmacher
04eb1be0c6
pvfs_open: unify talloc behavior in pvfs_can_delete/rename/stat()
...
And also handle NULL for lckp in the error path
without crashing.
metze
2008-02-25 08:03:04 +01:00
Stefan Metzmacher
daab9cb11e
pvfs: handle SHARING_VIOLATION and OPLOCK_NOT_GRANTED in pvfs_can_delete/rename()
...
If the caller asks for the odb_lock return it
also if we return NT_STATUS_SHARING_VIOLATION
or NT_STATUS_OPLOCK_NOT_GRANTED so that the caller
can add the pending notification.
metze
2008-02-25 07:56:18 +01:00
Stefan Metzmacher
e585e23063
pvfs: pass NULL to pvfs_can_*() when no odb_lock is needed by the caller
...
metze
2008-02-25 07:56:06 +01:00
Stefan Metzmacher
3b70331536
pvfs_wait: use struct pvfs_wait * instead of void *
...
metze
2008-02-25 07:55:09 +01:00
Stefan Metzmacher
16a7d0cc37
pvfs_wait: 'private' -> 'private_data' and use talloc_get_type()
...
metze
2008-02-25 07:55:08 +01:00