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

4011 Commits

Author SHA1 Message Date
Tim Prouty
bb869741dd Cleanup size_t return values in convert_string_allocate
This patch is the first iteration of an inside-out conversion to cleanup
functions in charcnv.c returning size_t == -1 to indicate failure.
(This used to be commit 59124382d2)
2008-04-11 11:33:33 +02:00
Volker Lendecke
245ebca937 Fix bug 5366
(This used to be commit 448a8fe6c1)
2008-04-11 11:32:47 +02:00
Günther Deschner
ee8dffbca6 Fix the build of reply_setattrE().
How ever could this compile ?

Guenther
(This used to be commit 02f5f35e5e)
2008-04-08 21:41:16 +02:00
Alexander Bokovoy
c2bb4b51c1 Destroy DMAPI session when main smbd daemon exits.
DMAPI session is precious resource maintained at kernel level. We open one of them and use across multiple smbd daemons
but once last of them exits, DMAPI session needs to be destroyed. There are some HSM implementations which fail to
shutdown when opened DMAPI sessions left. Ensure we shutdown our session when it is really not needed anymore.
This is what recommended by DMAPI specification anyway.
(This used to be commit a0cefd4400)
2008-04-08 15:19:01 +04:00
Jeremy Allison
86e59c50f1 Rewrite the wrap checks to deal with gcc 4.x optimisations.
Karolin, please pull once Volker has reviewed. Thanks.
Jeremy.
(This used to be commit 09852899ca)
2008-04-07 21:11:16 -07:00
James Peach
f863cb2ef4 Remove unused variable.
(This used to be commit 3ed2c65bde)
2008-04-07 15:28:10 -07:00
Bill Ricker
f700ee6418 Fix Kerberos interop with Mac OS X 10.5 clients.
Ignore optional req_flags. Use the Kerberos mechanism OID negotiated
with the client rather than hardcoding OID_KERBEROS5_OLD.
(This used to be commit 59a2bcf30f)
2008-04-07 15:05:51 -07:00
Stefan Metzmacher
206e7eeb6f smbd: make it possible to change the write time delay for testing
metze
(This used to be commit df8c100c2b)
2008-04-07 12:29:31 +02:00
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