1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

4003 Commits

Author SHA1 Message Date
Stefan Metzmacher
19f49de92e smbd: make it possible to disable get_file_infos() on searches
metze
(This used to be commit 404a865a34)
2008-04-07 12:29:30 +02:00
Stefan Metzmacher
851cadba51 locking: combine get_delete_on_close_flag() and get_write_time() into get_file_infos()
This means we need to fetch the record only once.

metze
(This used to be commit 4130b87329)
2008-04-07 12:29:29 +02:00
Stefan Metzmacher
d03453864a smbd: implement the strange write time update logic
We now never call file_ntimes() directly, every update
is done via smb_set_file_time().

This let samba3 pass the BASE-DELAYWRITE test.

The write time is only updated 2 seconds after the
first write() on any open handle to the current time
(not the time of the first write).

Each handle which had write requests updates the write
time to the current time on close().

If the write time is set explicit via setfileinfo or setpathinfo
the write time is visible directly and a following close
on the same handle doesn't update the write time.

metze
(This used to be commit 2eab212ea2)
2008-04-07 12:29:26 +02:00
Stefan Metzmacher
2ccf50256e locking: store the write time in the locking.tdb
This is needed to implement the strange write time update
logic later. We need to store 2 time timestamps to
distinguish between the time the file system had before
the first client opened the file and a forced timestamp update.

metze
(This used to be commit 6aaa2ce0ee)
2008-04-07 12:29:25 +02:00
Jeremy Allison
3ebb6be00d Fix MSDFS bug noticed by Ofir Azoulay <Ofir.Azoulay@expand.com>.
There is no reason to ensure the target host is ourselves, and
this breaks MS clients in some cases.
Jeremy.
(This used to be commit c19fdf43d1)
2008-04-02 11:23:36 -07:00
Stefan Metzmacher
5b07337cc5 smbd: always close the base_fsp even if the real close returned an error
Otherwise we may end up with share mode entry without an open file.

Volker, Jeremy: please check...

metze
(This used to be commit 547eacf605)
2008-04-01 18:47:42 +02:00
Stefan Metzmacher
dc83b956b9 smbd: ignore nttrans renames as w2k3 does
This lets us pass the RAW-RENAME test.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(This used to be commit 2d50a1fef0)
2008-04-01 15:25:47 +02:00
Jeremy Allison
8b04a33500 Ok, final move of this code :-). I think I've found the correct
place for it now where it will cause minimal disruption (only
call the extra message_dispatch just before reading the next
smb off the wire).
Jeremy.
(This used to be commit da2c19c481)
2008-03-31 17:01:27 -07:00
Jeremy Allison
6913f10134 Move the message_dispatch() call after the check for errno on
the select return. We don't want the call to message_dispatch
to mess up the errno value.
Jeremy.
(This used to be commit 26a74d01bb)
2008-03-31 16:56:21 -07:00
Jeremy Allison
e11cd466e1 Reduce the race condition in Samba4 in RAW-RENAME test. We rename a file
using trans2 setfileinfo on one connection, and then check the
file name has changed on the other. In Samba we achieve this by
sending a local message to the other process. This change causes
us to re-scan for incoming messages after we've woken up from the
select (which is cheap if there are no pending messages). This reduces
the race significantly. Volker please review.
Jeremy.
(This used to be commit a7499e994a)
2008-03-31 16:46:20 -07:00
Jeremy Allison
43fdd1748c Fix missing '&&'.
Jeremy.
(This used to be commit 251df53811)
2008-03-28 17:32:52 -07:00
Jeremy Allison
e00bfc5092 Only allow sendfile on non-stream fsp's. Should fix make test for streams
as sendfile isn't implemented in the streams vfs modules yet.
Jeremy.
(This used to be commit eef53e9603)
2008-03-28 17:31:06 -07:00
Michael Adam
9644b6cb50 Add a talloc context parameter to current_timestring() to fix memleaks.
current_timestring used to return a string talloced to talloc_tos().
When called by DEBUG from a TALLOC_FREE, this produced messages
"no talloc stackframe around, leaking memory". For example when
used from net conf.

This also adds a temporary talloc context to alloc_sub_basic().
For this purpose, the exit strategy is slightly altered: a common
exit point is used for success and failure.

Michael
(This used to be commit 16b5800d4e)
2008-03-28 16:34:51 +01:00
Volker Lendecke
afa682943c printclose has only 1 vwv
(This used to be commit 99d9801250)
2008-03-28 13:44:30 +01:00
Jeremy Allison
7752494cf1 Fix up the comments on security=share to explain we're
ignoring passwords.
Jeremy.
(This used to be commit e7b6ea4653)
2008-03-27 16:08:39 -07:00
Michael Adam
3c213a1f8d posix_acls: clarify loop condition code, removing unneeded counter variable.
Coverity ID 545 falsely classified this as a NULL dereferencing bug.
By putting the loop of walking the list of aces more naturely not using
additional counters, it becomes much more obvious that it is not entered
when dir_ace == NULL.

The same modifications are done for the file_ace loop.

Michael
(This used to be commit 6dab6cf064)
2008-03-27 10:09:24 +01:00
Eric Cronin
2c5c3a0ba9 Missing HAVE_UPDWTMPX check before using updwtmpx().
In 10.5 Mac OS X added enough utmpx support to make it past the
first two preprocessor checks around line 390 of src/smbd/utmp.c
and on to the utmpx block which uses updwtmpx().  Unfortunately,
as ./configure correctly surmised, 10.5 doesn't have that.

https://bugzilla.samba.org/show_bug.cgi?id=5184
(This used to be commit f19d1e3d93)
2008-03-24 12:33:04 -07:00
Michael Adam
be2fab1fef smbd: fix session setup with security = share.
Broken by pstring removal in 9ed12bfc48.
Jeremy, please check.

Thanks to Yannick Bergeron <yaberger@ca.ibm.com> for noting this.

Michael
(This used to be commit 008c4bdbe5)
2008-03-20 17:00:36 +01:00
root
3d2ec80693 Port 3c1f1f0797e from 3-0-ctdb
We need to inform ctdb about the client's TCP connection so that after a fail
over ctdbd can trigger the client to reconnect very quickly
(This used to be commit ddc989886d)
2008-03-20 16:54:05 +01:00
Andrew Tridgell
f152fe2103 [samba-3-0-ctdb.tridge @ tridge@samba.org-20070602053809-kpw5kjkcyjs8yjbl]
suppress that darn message
(cherry picked from commit 542e46a21898f6fcc8a0aeb63925607a60e0b99f)
(This used to be commit 5e8c624c9c)
2008-03-18 17:12:08 +01:00
Volker Lendecke
c5356479c1 Some simplifications
(This used to be commit b59b436997)
2008-03-17 21:10:16 +01:00
Marc VanHeyningen
e06aa46b9f Coverity fixes
(This used to be commit 3fc85d2259)
2008-03-17 20:52:25 +01:00
Michael Adam
6476313b6d Add a debug message.
Michael
(This used to be commit a398070448)
2008-03-12 02:12:34 +01:00
Jeremy Allison
7d2c9c67fd Using Metze's S4 nttrans rename test, the nttrans rename
behaves the same as the trans2 one.
Jeremy.
(This used to be commit c4fa4917da)
2008-03-11 15:26:02 -07:00
Jeremy Allison
792c972538 Metze pointed out this we don't need FILE_ATTRIBUTE_READ here.
Jeremy.
(This used to be commit 923aa9f330)
2008-03-11 13:59:04 -07:00
Jeremy Allison
b7a014a6ee Allow us to pass RAW-RENAME by testing that the connection struct
connection paths are equal, not just the conn structs themselves.
Jeremy.
(This used to be commit 632f3fe66f)
2008-03-11 13:38:25 -07:00
Jeremy Allison
bac7b5b19e Try and fix bug #5315, as well as S4 torture tests RAW-OPLOCK BATCH19,
BATCH20 and RAW-RENAME.
Jeremy.
(This used to be commit 9065792d4b)
2008-03-11 13:27:33 -07:00
Jeremy Allison
380fcfa600 Fix S3 to pass the test_raw_oplock_exclusive3 test.
Jeremy.
(This used to be commit 028302fac5)
2008-03-11 12:37:01 -07:00
Michael Adam
67536eddc3 registry shares: prevent creating regular share called "global".
This is a first quick fix.
Registry shares should be rewritten to use libnet_conf.

Michael
(This used to be commit 71bd0bd0ea)
2008-03-11 11:15:50 +01:00
Volker Lendecke
d634ab06b3 Convert secrets_lock_trust_account_password to talloc
This is preparing the conversion of secrets.c to ctdb
(This used to be commit 1307f0130c)
2008-03-10 21:08:45 +01:00
Volker Lendecke
6a2dbea794 Fix some typos
(This used to be commit cfa1b83814)
2008-03-08 12:31:21 +01:00
Günther Deschner
23cd8e5ea7 Be more verbose why create local token has failed during
NTLMSSP and Kerberos session setup

Guenther
(This used to be commit 18b8c2c19e)
2008-03-06 12:27:11 +01:00
Volker Lendecke
43491db17c Fix inotify detection
Bug 5271 -- thanks to Tiziano Müller
(This used to be commit 4a1a138b0f)
2008-02-25 12:58:56 +01:00
Volker Lendecke
fcee8fee63 Allow "max mux" async i/o requests
In the negprot reply, we allowed the client to issued "max mux" concurrent
requests. The OS might allow less, for example AFAIK AIX has a configurable
limit of concurrent AIO requests. We will fall back to sync operation for the
requests that are too many when aio_read/aio_write return an error.

Jeremy, please check!
(This used to be commit 8f86f7f25c)
2008-02-24 11:39:59 +01:00
Volker Lendecke
21b6a03678 Export aio_request_done()
This is for external modules implementing the Posix AIO API that not
necessarily depend on the signal mechanism to indicate completion.
(This used to be commit 9a069d306b)
2008-02-24 11:39:57 +01:00
Volker Lendecke
db9db9cef9 AIO on streams does not work (yet...)
(This used to be commit 1ba223f202)
2008-02-24 00:05:40 +01:00
Jeremy Allison
6cdd527fed Fix debug messages.
Jeremy.
(This used to be commit d265cedb55)
2008-02-22 16:12:57 -08:00
Volker Lendecke
14aa57a9e3 Don't use fname after create_file has been called
create_file calls unix_convert internally, so modifies fname. So we can't use
"fname" after create_file has returned. Use fsp->fsp_name instead.

Found during a lengthy debugging session with Karolin testing the xattr_tdb
module...
(This used to be commit 183fe57046)
2008-02-22 17:15:09 +01:00
Volker Lendecke
4c4c1bfb79 Update position information also for AIO
Necessary to survive RAW-SEEK with AIO enabled.

Jeremy, please check!
(This used to be commit e2ca12c234)
2008-02-19 16:19:49 +01:00
Volker Lendecke
e12cd305dd Inform level II oplock holders when we write using AIO
Jeremy, please check!
(This used to be commit 81d823e026)
2008-02-19 16:19:49 +01:00
Tim Potter
a8fbb92146 Check return code of secrets_init() function.
(This used to be commit 2b1eead269)
2008-02-18 10:15:44 +01:00
Günther Deschner
65fc3ae070 Use new structs in reply_spnego_kerberos().
Guenther
(This used to be commit c55160f8e8)
2008-02-17 02:11:59 +01:00
Jeremy Allison
4754c2bafe Correctly use SPNEGO to negotiate down from krb5 to NTLMSSP.
Previously we didn't implement the 'NEGO' part of SPNEGO :-).
Jeremy.
(This used to be commit 8767a0dab9)
2008-02-14 18:10:50 -08:00
Jeremy Allison
81d6133b03 Currently we don't SPNEGO negotiate back to NTLMSSP. Note this.
Jeremy.
(This used to be commit 8cd04b948b)
2008-02-14 18:07:27 -08:00
Jeremy Allison
0a89940df5 Ensure invalidate_vuid() deletes any ntlmssp state.
Jeremy.
(This used to be commit b41799c351)
2008-02-14 18:06:16 -08:00
Stefan Metzmacher
de48cd925a smbd: use make usage of wbcDomainInfo()
metze
(This used to be commit 9d6b43ea10)
2008-02-11 18:14:15 +01:00
Karolin Seeger
2a6a2288c5 Fix some typos.
Karolin
(This used to be commit 2bec0a1fb7)
2008-02-08 10:05:32 +01:00
Jeremy Allison
a33236f4aa Make operator precedence very clear.
Jeremy.
(This used to be commit 4f125110cf)
2008-02-06 10:31:22 -08:00
Alexander Bokovoy
a4436154b8 Change the file time before we change the file mode.
This doesn't matter for most applications, but for offline files it matters as it allows you to set
files offline from windows clients even with HSM systems that refuse to offline newly created files.
Merge from Tridge's v3-0-ctdb tree.
(This used to be commit 7da6c67544)
2008-02-06 09:10:50 +03:00
Alexander Bokovoy
1ae0f2d02e Allow actual call to set file offline
Dos mode calculation was masking out FILE_ATTRIBUTE_OFFLINE so that code to set file offline
was never called before. Merge from Tridge's v3-0-ctdb git tree.
(This used to be commit 9827d5ff41)
2008-02-06 09:09:23 +03:00