1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

15570 Commits

Author SHA1 Message Date
Jeremy Allison
a8a5339cf2 Test trans2 renames with oplocks. It looks like trans2 renames
ignore share modes and oplock breaks :-(.
Jeremy.
2008-03-11 10:21:09 -07:00
Andrew Bartlett
b4da374a99 Fix provision script to work without smb.conf location specified.
Andrew Bartlett
2008-03-11 14:41:10 +11:00
Andrew Bartlett
edb7af0685 Extend testsuite to cover specifying a domain SID.
Andrew Bartlett
2008-03-11 14:21:53 +11:00
Andrew Bartlett
1b15f374a8 Make error handling in ldb more consistant.
This change ensures we give an immidiate error if the DN won't parse.

Also clean up strcmp use to be more standard.

Andrew Bartlett
2008-03-11 14:20:42 +11:00
Stefan Metzmacher
0641a43cd6 opendb_tdb: keep struct opendb_file arround for the lifetime of struct odb_lock
That means we only have to parse the record once
and as the tdb record is locked the in memory copy
is always the same as the one in the tdb.

metze
2008-03-08 09:28:17 +01:00
Stefan Metzmacher
5b13a564b8 opendb_tdb: correctly initialize modified to false
Otherwise this variable would never change its value...

metze
2008-03-08 09:28:17 +01:00
Stefan Metzmacher
4afd4058e3 we now define PACKAGE_BUGREPORT in config.h
metze
2008-03-08 09:28:16 +01:00
Stefan Metzmacher
5fdca988c6 pvfs_open: fix the odb_open_file() callers
metze
2008-03-07 19:35:17 +01:00
Stefan Metzmacher
db0853ae4f opendb: force odb_can_open() before odb_open_file()
Now there's only odb_can_open() which handles the
share_access rules.

And odb_open_file() only adds the new opendb_entry into the
database and calculates the granted oplock level.

metze
2008-03-07 19:35:12 +01:00
Stefan Metzmacher
b09a1461ac pvfs_open: always call odb_can_open() before odb_open_file()
odb_open_file() will later change to not redo the logic of
odb_can_open().

metze
2008-03-07 19:15:27 +01:00
Stefan Metzmacher
c993b07f7d opendb_tdb: pass down struct messaging_context directly to odb_oplock_break_send()
metze
2008-03-07 19:15:21 +01:00
Stefan Metzmacher
a63910e8e5 vfs_cifs: disable level2 oplocks if the frontend client doesn't support them
metze
2008-03-07 19:15:19 +01:00
Jelmer Vernooij
e384aac5c8 Rerun SWIG. 2008-03-07 18:20:12 +01:00
Michael Adam
d92597d29c torture: fix escape sequence in test_chkpath().
Michael
2008-03-07 15:00:37 +01:00
Michael Adam
3a9514def2 configure: Add major version 4 to AC_INIT call.
Michael
2008-03-07 14:59:19 +01:00
Andrew Kroeger
d28f2cb678 Treat maxPwdAge == 0 as passwords never expire. 2008-03-07 05:59:56 -06:00
Andrew Kroeger
6a98e5a7aa Enhance mappings of NTSTATUS to KRB5KDC errors.
The enhanced mappings allow the Windows client to determine whether a user's
password needs to be changed (and allows them to change it), or if they cannot
logon at all.

Changes still need to be made to allow additional data to be returned.  Windows
uses that additional data to display more detailed dialogs to the user.  The
additional information is returned in an e-data struct of type PA-PW-SALT that
contains the more-detailed NTSTATUS error code.
2008-03-07 05:59:56 -06:00
Andrew Kroeger
2b6b4e5a16 Update account expiration to use new samdb_result_account_expires() function. 2008-03-07 05:59:56 -06:00
Andrew Kroeger
7ce5575a3a Add samdb_result_account_expires() function.
Windows uses 2 different values to indicate an account doesn't expire: 0 and
9223372036854775807 (0x7FFFFFFFFFFFFFFFULL).

This function looks up the value of the accountExpires attribute and if the
value is either value indicating the account doesn't expire,
0x7FFFFFFFFFFFFFFFULL is returned.

This simplifies the tests for account expiration.  There is no need to check
elsewhere in the code for both values, therefore a simple greater-than
expression can be used.
2008-03-07 05:59:55 -06:00
Andrew Kroeger
be47cc7fdf accountExpires: Windows default is 9223372036854775807, not -1. 2008-03-07 05:59:55 -06:00
Amin Azez
d66b6c3823 Use 32 bit storage for nttrans counts
Erroneous 16bit storage for nttrans counts meant that nttrans behaved
"strangely" for sizes of over 64K

As 32 bit is used in the SMB message and specified in
http://us4.samba.org/samba/ftp/specs/draft-leach-cifs-v1-spec-02.txt
section 3.13.2
this fix changes storage to match.

Signed-off-by: Amin Azez <azez@ufomechanic.net>
2008-03-07 12:10:48 +01:00
Andrew Bartlett
d331bc400f Try to fix up part of the upgrade test.
There are still problems with the upgrade test, but these are not
related to the provision system.

Andrew Bartlett
2008-03-07 19:20:39 +11:00
Andrew Bartlett
0923de1228 Rework provision scripts for more testing
This fixes up some issues with testdir (was not honoured) and
increases test coverage.

We now check all the major provision modes.  In doing so, to make it
possible to call from the multiple layers of 'sh', I have allowed 'dc'
to alias 'domain controller' and 'member' to alias 'member server'.
Fighting shell quoting in the test system was just too hard...

Also fix upgrade.py

Andrew Bartlett
2008-03-07 10:57:52 +11:00
Andrew Bartlett
2211476bbb Fixup the NET-API-USERMOD test.
This test needed to be updated to handle the fact that you cannot
clear the ACB_PW_EXPIRED bit, and to always use the torture comment
functions (not printf directly).

Andrew Bartlett
2008-03-07 09:05:24 +11:00
Andrew Bartlett
a6997c333c Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-local 2008-03-07 07:38:44 +11:00
Andrew Bartlett
e462a107d3 Start to rework provision for LDAP backends
This is the start of the rework of the provision script to handle an
LDAP backend correctly.  For example, we must not set the 'tdb
modules' against an LDAP backend such as OpenLDAP that handles subtree
renames.

Andrew Bartlett
2008-03-07 07:33:14 +11:00
Günther Deschner
0c1ccbc183 Ignore Kerberos PAC type 12.
Until we worked out the PAC_TYPE_UNKNOWN_12 format (or received documentation)
ignore it so that the PAC parsing can proceed.

Guenther
(cherry picked from commit 3630ec26c99fdea46c47117d026f9bffb2c4590a)
2008-03-06 17:40:25 +01:00
Günther Deschner
ad19da7f83 Slowly making progress on PAC_UNKNOWN_12.
unknown1 and unknown2 are offset headers for the strings.

Guenther
(cherry picked from commit 7af70e75b9abf92921f33ec4207ad486ee2493d6)
2008-03-06 17:40:16 +01:00
Günther Deschner
ef0971206c Add new Windows 2008 Kerberos PAC Type 12 (apparently again undocumented).
We need at least to parse this in order to correctly support kerberized session
setup from w2k8 as well as local pam_winbind logons using kerberos.

Guenther
(cherry picked from commit 4ba62d49d740c43cf17ceef1534cf1c8a7e4a130)
2008-03-06 17:40:05 +01:00
Stefan Metzmacher
d0b641a9ee RAW-OPLOCK: rename _ack_to_levelII() -> ack_to_given()
Also improve the output.

metze
2008-03-06 17:19:43 +01:00
Stefan Metzmacher
4fb2c9fb1f RAW-OPLOCK: add BATCH24 test another case with a connection with no CAP_LEVEL_II_OPLOCKS
metze
2008-03-06 17:19:43 +01:00
Stefan Metzmacher
2192d6d2bd RAW-OPLOCK: add BATCH23 and test with a connection with no CAP_LEVEL_II_OPLOCKS
metze
2008-03-06 17:19:36 +01:00
Stefan Metzmacher
0905f3ebd1 RAW-OPLOCK: remove unused vars
metze
2008-03-06 17:19:34 +01:00
Stefan Metzmacher
7c9b269b07 pvfs_open: pass down allow_level_II_oplock to odb_open_file()
metze
2008-03-06 17:19:26 +01:00
Stefan Metzmacher
146f1fe0b6 opendb: add allow_level_II_oplock parameter to odb_open_file()
Not all clients support a fallback to level II oplocks.

metze
2008-03-06 17:19:12 +01:00
Stefan Metzmacher
5563238782 pvfs_open: fix crash/leak in case pvfs_setup_oplock() fails
metze
2008-03-06 16:31:26 +01:00
Stefan Metzmacher
cc42cd5f67 ntvfs: pass down the client capabilities into the ntvfs layer
Note that we don't use any protocol specific values here.

For now only NTVFS_CLIENT_CAP_LEVEL_II_OPLOCKS is defined
others should be defined, when we find out that the ntvfs
layer needs to know about it.

metze
2008-03-06 16:31:25 +01:00
Stefan Metzmacher
33caaef2e4 libcli/raw: make it possible to not send CAP_LEVEL_II_OPLOCKS
But the keep the default to always send it
when the server supports it too.

metze
2008-03-06 16:31:25 +01:00
Andrew Bartlett
e66be2f519 Fix typo 2008-03-06 22:04:46 +11:00
Andrew Bartlett
25887c8728 Ensure we get this option from the command line, not the internal
smb.conf we generate.

Andrew Bartlett
2008-03-06 22:03:10 +11:00
Andrew Bartlett
2232255ce3 Merge branch 'v4-0-test' of git://git.samba.org/samba into 4-0-abartlet 2008-03-06 22:02:25 +11:00
Andrew Bartlett
1169e8d7be Make Samba4 pass the NET-API-BECOMEDC test against Win2k3 (again).
To make Samba4, using the python provision system, pass this test
required some major rework.  Untested code is broken code, and some of
the refactoring for a seperate provision test (which also now passes)
broke things.

Similarly, the iconv work has compiled, but these codepaths have never
been run (NULL pointer de-reference).

In working to use a local, rather than global, loadparm context, and
to support using a target directory, a few things needed to be
reworked, particularly around path handling.

Andrew Bartlett
2008-03-06 21:55:26 +11:00
Andrew Kroeger
eb9a7c3b3a ldb_wrap: Debug at derived samba_level, not the level of the ldb debug enum. 2008-03-06 00:07:26 -06:00
Stefan Metzmacher
18e27aef7b selftest: use the same oplocktimeout for smbtorture as for smbd
metze
2008-03-04 14:40:56 +01:00
Stefan Metzmacher
c459885898 RAW-OPLOCK: add BATCH22 and test the behavior of oplock break timeouts
metze
2008-03-04 14:40:56 +01:00
Stefan Metzmacher
a5476ee41c RAW-OPLOCK: add BATCH21: a self write with an oplock doesn't break it
metze
2008-03-04 14:40:51 +01:00
Stefan Metzmacher
bfb0888578 pvfs_oplock: auto release oplocks after a timeout
Remember that we sent an oplock break to
a client and don't resend. If the filesystem
layer tries to send a new break and the client
has not released after a former oplock break
after the timeout interval, we need to auto release
the oplock.

metze
2008-03-04 14:40:50 +01:00
Stefan Metzmacher
21772fa33d pvfs_oplock: only a break level2 oplocks...
It seems that I've tested this in the wrong way before.

metze
2008-03-04 14:40:50 +01:00
Stefan Metzmacher
2b8934e4ab pvfs_oplock: move pvfs_oplock_release() parts into a helper function
metze
2008-03-04 14:40:49 +01:00
Stefan Metzmacher
b0ecd8f8d2 build: fix the build with --enable-automatic-dependencies=yes
metze
2008-03-04 11:55:41 +01:00