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

82480 Commits

Author SHA1 Message Date
Andrew Bartlett
450fcd79c7 s3-vfs: Remove extra calls to SMB_VFS_HANDLE_GET_DATA
Found by the talloc_stackframe() out of order checker!

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
2b404462f5 selftest: Pass --use-ntvfs to provison in renamedc test
Also fix test prefix to match the test

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
9170f9ce95 selftest: Specify --use-ntvfs to provision in test scripts
Because these run as non-root, we need to avoid doing things that will
fail during the provision.  The main test of the s3fs provision is the
plugin_s4_dc environment with a smb.conf that specifies vfs_fake_acls.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
97b13799ce s4-classicupgrade: Add --use-ntvfs option
This is an odd option, but is needed because I wish to add assertions about
ACL setting that will not work in make test without the vfs_fake_acls module
loaded.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Andrew Bartlett
b5c2747cad s4-provision: pass use_ntvfs from C wrappers and set to true in tests/vampire
None of these cases need the complexity of the s3fs backend.

Andrew Bartlett
2012-08-22 01:31:57 +02:00
Matthias Dieter Wallnöfer
c4b9c3aba8 s4:samldb LDB module - remove unused "member" attribute from search filter
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:57 +02:00
Matthias Dieter Wallnöfer
32cd618e6c LDB:ldb_tdb.c - deny multi-valued attributes manipulation with doublets
This refers to LDB add operations as well, we have only to be careful on
"@ATTRIBUTES" entries.

E.g.

dn: cn=testperson,cn=users,dc=...,dc=...
objectClass: person
url: www.example.com
url: www.example.com

should not work.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:57 +02:00
Matthias Dieter Wallnöfer
cb63b34b05 LDB:ldbsearch - add search filter tests
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:57 +02:00
Matthias Dieter Wallnöfer
6a8c697954 LDB:ldbsearch - search filters do not only contain "="
Also "<=", ">=", "~"... are allowed as well. Enumeration taken from
ldb_parse_filtertype().
This was the cause of not identifying the search filter as described in bug
https://bugzilla.samba.org/show_bug.cgi?id=8647.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Matthias Dieter Wallnöfer
c8bfb8eb09 s4:dsdb - always fail if a search filter could not be parsed
A NULL string/expression returns the generic "(objectClass=*)" filter

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Matthias Dieter Wallnöfer
536c082505 LDB:ldif_handlers.c - LDB_OP_GREATER/LDB_OP_LESS are thought as ">=" or "<="
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Matthias Dieter Wallnöfer
5f8006cb64 s4:dsdb_sort_objectClass_attr - simplify memory context handling
Do only require the out memory context and build the temporary one in
the body of the function. This greatly simplifies the callers.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Matthias Dieter Wallnöfer
166a7d37f7 s4:dsdb_sort_objectClass_attr - use "data_blob_string_const" for setting values
As shown in commit c8e6d8b487 this looks easier and in any case we can
treat schema context data like global data.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-22 01:31:55 +02:00
Björn Jacke
db075b0202 libcli: fix value of NT_STATUS_FILE_NOT_AVAILABLE
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Aug 22 01:30:06 CEST 2012 on sn-devel-104
2012-08-22 01:30:06 +02:00
Jeremy Allison
c84e6aebc2 Fix bug #9098 - winbind does not refresh kerberos tickets.
Based on work from Ian Gordon <ian.gordon@strath.ac.uk>.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 22:01:15 CEST 2012 on sn-devel-104
2012-08-21 22:01:15 +02:00
Andrew Bartlett
ebb776f51f selftest: Add tests for vfs_aio_fork
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 13:12:33 CEST 2012 on sn-devel-104
2012-08-21 13:12:33 +02:00
Andrew Bartlett
e79ed4fe72 s3-vfs: Make vfs_aio_fork erratic timing behaviour a run-time option
This will allow this to be tested as part of a normal selftest.

Andrew Bartlett
2012-08-21 11:35:20 +02:00
Andrew Bartlett
a81795974c build: Create bin/ when doing 'waf dist' from a fresh checkout
As suggested by Amitay.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 09:03:02 CEST 2012 on sn-devel-104
2012-08-21 09:03:01 +02:00
Andrew Bartlett
dc063bf3bd s3-pysmbd: Add get/set functions for the posix ACL layer
These will be used to verify that an ACL set as an NT ACL creates
the correct posix ACL.

Andrew Bartlett
2012-08-21 15:25:50 +10:00
Andrew Bartlett
4df2c65ea6 s3-pysmbd: Correct comments in python VFS bindings 2012-08-21 15:25:50 +10:00
Andrew Bartlett
02e25b2a43 s3-passdb: Allow pdb_sid_to_id to work on any SID
This is needed so that pdb_samba4 can map any SID during a provision.

At runtime, winbindd will be asked first, but this shortcut direct to the
ldb file makes it possible to set the permissions on the sysvol share at
provision time.

Andrew Bartlett
2012-08-21 15:25:49 +10:00
Andrew Bartlett
d963aaf73b s3-pysmbd: Add hook for a VFS chown() 2012-08-21 15:25:49 +10:00
Andrew Bartlett
4d5471f1c6 build: Remove special case for the build farm
Except in the formatting of the selftest output, this removes the special case
of the build farm, so that an autobuild, a manual make test and the build farm
are more similar.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 06:39:04 CEST 2012 on sn-devel-104
2012-08-21 06:39:04 +02:00
Andrew Bartlett
7cd4eb0ca6 build: Remove accidentily added line in samba_version.py
This was incorrectly added in 0e441636af.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug 21 03:11:16 CEST 2012 on sn-devel-104
2012-08-21 03:11:16 +02:00
Herb Lewis
21e67bdcee Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR parsing errors.
A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Aug 21 01:31:46 CEST 2012 on sn-devel-104
2012-08-21 01:31:46 +02:00
Andrew Bartlett
84d6e09b95 s4-torture: Use torture_fail() in the unix.unix_info2 test
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug 20 15:36:48 CEST 2012 on sn-devel-104
2012-08-20 15:36:47 +02:00
Andrew Bartlett
74a4c40d4f selftest: Use new fake_acls module
This isolates us from the OS ACL library, and allows chown to 'work'
when we are non-root.  In turn, this ensures that we can test the SMB
-> POSIX layer even when the OS would refuse the set due to non-root
or simply not having acls enabled on this particular file system.

This should make a number of build farm tests much more reliable, and
allows a number more tests to pass.

Andrew Bartlett
2012-08-20 21:58:08 +10:00
Andrew Bartlett
c75b6154e4 s4-torture: Show that we cannot list extended attributes on streams 2012-08-20 21:58:08 +10:00
Andrew Bartlett
f9837d15f3 s4-torture: Show that we cannot have extended attributes on streams 2012-08-20 21:58:07 +10:00
Andrew Bartlett
bf1e27bd8f s4-torture: Improve raw.streams test to cover EAs and to use torture_assert()
The extension of this test is to create an extended attribute, so we
can confirm that the easize field on a stream actually refers to the
parent file.

This has been run against Windows 7.

Andrew Bartlett
2012-08-20 21:58:07 +10:00
Andrew Bartlett
3787dcf42c doc-BUILD_SYSTEMS.txt: The grand rename is complete 2012-08-20 21:58:07 +10:00
Andrew Bartlett
0e441636af WHATSNEW: Remove over-caution on s3fs and explain browsing better 2012-08-20 21:58:06 +10:00
Andrew Bartlett
921b927d30 build: Do not put a .distversion file into the GIT tree
This places the file only in the tarball, and shows how to
auto-generate other files for placement in the tarball.

Andrew Bartlett
2012-08-20 21:58:06 +10:00
Andrew Bartlett
7a59c3d9b8 s3-build: Enable vfs_fake_acls when in developer mode or on the build farm 2012-08-20 21:58:06 +10:00
Andrew Bartlett
ae4195dd40 s3-vfs: Add lstat and lchown hooks to the vfs_fake_acls module 2012-08-20 21:58:05 +10:00
Andrew Bartlett
cbe758cfbb s3-vfs: Correct the implementation of fake_acls_sys_acl_delete_def_file() 2012-08-20 21:57:47 +10:00
Andrew Bartlett
6c0bef1756 s3-vfs: Use the system. namespace for fake ACLs
By using the system. namespace, we make sure this is only run on top of a TDB
based ACL store (ie in make test).

Andrew Bartlett
2012-08-20 21:57:47 +10:00
Andrew Bartlett
0f2d288f76 s3-smbd: ensure we give appropriate errors for EA requests on streams 2012-08-20 21:57:47 +10:00
Andrew Bartlett
6ce084f092 s3-smbd: Do not look for EA information on a stream
The estimated EA size needs to be of the main file.  However, the fsp
may point to the stream, so we need to ignore it if this is the case.

This may mean we estimate wrong if there has been a rename.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Andrew Bartlett
f9f8a8c3d8 s3-smbd: Push smb_fname into estimate_ea_size
This ensures that we return the ea size of the stream, not the overall file.

This is important as if there is an EA on the main file, the raw.streams
test was failing.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Andrew Bartlett
3ef0e2246b s4-ntvfs: Add TODO on ea_size
This is almost certainly un-important.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Andrew Bartlett
0769d67682 s4-ntvfs: Ensure we do not attempt to write EAs on streams 2012-08-20 21:57:46 +10:00
Andrew Bartlett
9699c335fd s3-vfs: Allow vfs_xattr_tdb to work without a connected share
This is needed to that get_nt_acl_no_snum() can work.

Andrew Bartlett
2012-08-20 21:57:46 +10:00
Michael Adam
4f4bb1f20d s4:torture:basic: add more delete test - variants of deltest16 and deltest17
There seems to be a difference if the initial delete_on_close flag
was set on a handle that created the file or if the handle if was
for a file that already existed.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Aug 17 21:44:24 CEST 2012 on sn-devel-104
2012-08-17 21:44:24 +02:00
Michael Adam
c35bdb34da s3: add a debug message for failed execv in sys_popen()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-08-17 20:07:07 +02:00
Michael Adam
471a853e34 lib/util: add server_id_set_disconnected() and server_id_is_disconnected()
Utility functions for handling the special placeholder server-id value
for disconnected clients (to be used for durable handles).

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
3cdf441da1 lib/util: let server_id_str() skip the task_id if 0 in the cluster case too
server_id_from_string() already handles that case.

metze
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
6457fb5c39 s3:lib: implement interpret_pid() as wrapper of server_id_from_string()
metze
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
d4a0aeb49a lib/util: add server_id_from_string()
metze
2012-08-17 20:07:07 +02:00
Stefan Metzmacher
6a58c5fc64 s3:lib: implement serverid_equal() as macro of server_id_equal()
metze
2012-08-17 20:07:07 +02:00