Volker Lendecke
fef875f64f
s3: Remove smbd_messaging_context() from push_blocking_lock_request()
2010-07-05 11:06:27 +02:00
Volker Lendecke
75e16757e3
s3: Remove smbd_messaging_context() from contend_level2_oplocks_begin_default()
2010-07-05 11:06:27 +02:00
Volker Lendecke
d1587f9924
s3: Remove smbd_messaging_context() from reply_to_oplock_break_requests()
2010-07-05 11:06:27 +02:00
Volker Lendecke
b01a41d05b
s3: Remove smbd_messaging_context() from smbd_do_locking()
2010-07-05 11:06:27 +02:00
Volker Lendecke
914b1c034f
s3: Remove smbd_messaging_context() from rename_open_files()
2010-07-05 11:06:27 +02:00
Volker Lendecke
8da0575507
s3: Remove smbd_messaging_context() from reply_unlock()
2010-07-05 11:06:27 +02:00
Volker Lendecke
9a3f53075e
s3: Remove smbd_messaging_context() from reply_lock()
2010-07-05 11:06:27 +02:00
Volker Lendecke
80cc726b4a
s3: Remove smbd_messaging_context() from reply_writeunlock()
2010-07-05 11:06:26 +02:00
Volker Lendecke
298da9a0a4
s3: Remove smbd_messaging_context() from reply_lockread()
2010-07-05 11:06:26 +02:00
Volker Lendecke
ba3b101c45
s3: Remove smbd_messaging_context() from send_break_message()
2010-07-05 11:06:26 +02:00
Volker Lendecke
e6a089484b
s3: Remove smbd_messaging_context() from exit_server_common()
2010-07-05 11:06:26 +02:00
Volker Lendecke
6c53365d11
s3: Remove smbd_messaging_context() from close_normal_file()
2010-07-05 11:06:26 +02:00
Volker Lendecke
f22e58bcd3
s3: Remove smbd_messaging_context() from notify_deferred_opens()
2010-07-05 11:06:26 +02:00
Volker Lendecke
07854cb099
s3: Remove procid_self() from make_connection_snum()
2010-07-05 11:06:25 +02:00
Volker Lendecke
5387d6ee16
s3: Remove procid_self() from claim_connection()
2010-07-05 11:06:25 +02:00
Volker Lendecke
33242471e5
s3: Remove NULL checks from claim_connection()
...
Nowadays this is only called from make_connection_snum() where we always
provide a connection_struct.
2010-07-05 11:06:25 +02:00
Volker Lendecke
faef081e96
s3: Remove procid_self() from push_blocking_lock_request_smb2()
2010-07-05 11:06:25 +02:00
Volker Lendecke
c89b55b573
s3: Remove procid_self() from reply_negprot()
2010-07-05 11:06:25 +02:00
Volker Lendecke
2d7cce6b7c
s3: Remove procid_self() from break_kernel_oplock()
2010-07-05 11:06:25 +02:00
Volker Lendecke
13441a9e18
s3: Remove procid_self() from session_claim()
2010-07-05 11:06:25 +02:00
Volker Lendecke
f1d6eed962
s3: Remove procid_self() from exit_server_common
2010-07-05 11:06:25 +02:00
Volker Lendecke
23790c9a8f
s3: Add sconn_server_id()
2010-07-05 11:06:24 +02:00
Volker Lendecke
58b9595bab
s3: Add missing prototype for smb2_opcode_name
2010-07-05 11:06:24 +02:00
Volker Lendecke
9cc52e8411
s3: Add msg_ctx to smbd_server_connection
...
It would be obvious to initialize this in smbd_init_globals(), but there the
messaging_context can't be initialized yet because we don't have smb.conf
loaded yet.
2010-07-05 11:06:23 +02:00
Volker Lendecke
a27bd84bf8
s3:Fix a bogus uninitialized variable warning
2010-07-05 11:06:23 +02:00
Volker Lendecke
300667e4a9
s3: Pass procid_self() explicitly to messaging_ctdbd_connection()
2010-07-05 11:06:23 +02:00
Volker Lendecke
849f72b254
s3: Create a unique id for the smbd parent
2010-07-05 11:06:23 +02:00
Volker Lendecke
23a31becac
s3: Remove unused msg_flags from connections.tdb
...
This breaks rolling code upgrade!
2010-07-04 21:49:03 +02:00
Volker Lendecke
b0c83d50f9
s3: Replace register_message_flags() with serverid_register_msg_flags()
...
message_send_all is now done by walking the serverid.tdb, not the
connections.tdb anymore.
Günther, Simo, please check!
2010-07-04 21:49:03 +02:00
Volker Lendecke
7f0e6df883
s3: Pass the new server_id through reinit_after_fork
2010-07-04 17:29:23 +02:00
Volker Lendecke
b3194be286
s3: Fix some type-punned warnings
2010-07-04 16:41:14 +02:00
Volker Lendecke
b01958b0bd
s3: Remove serverid_[de]register_self
...
This removes some deep references to procid_self()
2010-07-04 16:41:14 +02:00
Volker Lendecke
f8e7077d5c
s3: Don't attempt to deregister from serverid twice
...
The parent has to take care of crashed child processes anyway, so we don't have
to clean up in the child
2010-07-04 13:48:10 +02:00
Günther Deschner
6625aada81
s3-libsmb: move change_trust_account_password out of smbd into libsmb.
...
Guenther
2010-06-30 21:46:08 +02:00
Ira Cooper
3549425b30
s3: Change exit on immediate socket failure.
...
This change makes it so socket errors early in the smbd child
process cause orderly exits not coredumps.
Signed-off-by: Jeremy Allison <jra@samba.org>
2010-06-28 12:08:03 -07:00
Andreas Schneider
e716924590
s3-smbd: Make sure that status is initialized when used.
...
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Andreas Schneider
6ac050f73f
s3-lanman: Make sure count is not used uninitialized if we jump to out.
...
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Andreas Schneider
06a1766315
s3-lanman: Make sure that job_info is not undefined.
...
Found by clang-analyzer.
2010-06-28 12:56:13 +02:00
Jeremy Allison
afc6d2f46d
Don't use frame as the talloc ctx in open_schannel_session_store(), as this breaks running from inetd
...
(we free frame below). Use NULL instead.
Jeremy.
2010-06-25 13:29:00 -07:00
Jeremy Allison
86be54ec61
Change talloc_autofree_context() to frame in Andrew's schannel.tdb TDB_CLEAR_IF_FIRST
...
changes. Using talloc_autofree_context() has undesirable effects when forked
subprocesses exit.
Jeremy.
2010-06-25 12:02:08 -07:00
Andrew Bartlett
cfece16498
s3:schannel Open the schannel_state.tdb at startup
...
This will allow future TDB_CLEAR_IF_FIRST behaviour
Signed-off-by: Jeremy Allison <jra@samba.org>
2010-06-25 11:58:28 -07:00
Kai Blin
7a1c24705d
s3-waf: Work around missing *netgrent prototypes on OSX 10.4
2010-06-17 08:09:49 +02:00
Günther Deschner
439e7590c9
s3-lanman: Fix return code for "" printqname in api_DosPrintQGetInfo().
...
Guenther
2010-06-16 12:15:24 +02:00
Jeremy Allison
dd2fad01fd
SMB2 correctness fix. As we've already returned the credits in an interim
...
response, don't add more in the final return.
Jeremy.
2010-06-14 16:58:15 -07:00
Volker Lendecke
3f54b41519
s3: Make g_smb_perfcount_handlers static
2010-06-14 12:06:52 +02:00
Volker Lendecke
a28b103900
s3: Remove some dispensable ()
2010-06-14 11:12:26 +02:00
Volker Lendecke
c7f44801e3
s3: Remove fsp_belongs_conn
...
check_open_fsp does exactly the same
2010-06-13 15:20:58 +02:00
Volker Lendecke
b90eb7dd69
s3: Remove some leftovers from macros
...
check_fsp and check_fsp_open used to be macros
2010-06-13 15:04:25 +02:00
Volker Lendecke
14974ba1f1
s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fid_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
5dc2fe5fdc
s3: Explicitly pass sconn to process_blocking_lock_queue_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
2592928f00
s3: Remove smbd_server_conn from push_blocking_lock_request_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
375ce3c96a
s3: Explicitly pass sconn to [remove|schedule]_deferred_open_message_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
9747eb45d6
s3: Explicitly pass sconn to open_was_deferred_smb2
2010-06-12 15:42:57 +02:00
Volker Lendecke
c0240dbeec
s3: Explicitly pass sconn to find_open_smb2req
2010-06-12 15:42:56 +02:00
Volker Lendecke
330a64c72b
s3: Explicitly pass sconn to process_blocking_lock_queue
2010-06-12 15:42:56 +02:00
Volker Lendecke
cb03710c76
s3: Remove smbd_server_conn from blocking_lock_cancel_smb1
2010-06-12 15:42:56 +02:00
Volker Lendecke
cc825231cd
s3: Explicitly pass sconn to recalc_brl_timeout
2010-06-12 15:42:56 +02:00
Volker Lendecke
ec2079f5d0
s3: Explicitly pass sconn to blocking_lock_was_deferred_smb1
2010-06-12 15:42:56 +02:00
Volker Lendecke
f856fb0b35
s3: Explicitly pass sconn to remove_pending_lock_requests_by_mid_smb1
2010-06-12 15:42:56 +02:00
Volker Lendecke
91bd52da1a
s3: Remove smbd_server_conn from cancel_pending_lock_requests_by_fid
2010-06-12 15:42:56 +02:00
Volker Lendecke
034e616448
s3: Remove smbd_server_conn from push_blocking_lock_request
2010-06-12 15:42:56 +02:00
Volker Lendecke
bfd5f24fa1
s3: Remove smbd_server_conn from brl_timeout_fn
2010-06-12 15:42:56 +02:00
Volker Lendecke
6b8db9b215
s3: Remove smbd_server_conn from switch_message
2010-06-12 15:42:55 +02:00
Volker Lendecke
a529fbb713
s3: Remove smbd_server_conn from break_level2_to_none_async
2010-06-12 15:42:55 +02:00
Volker Lendecke
5d43180a55
s3: Explicitly pass sconn to the remove_pending_change_notify_request_by_mid
2010-06-12 15:42:55 +02:00
Volker Lendecke
f589909eb1
s3: change_notify_reply() does not need its "conn" argument
2010-06-12 15:42:55 +02:00
Volker Lendecke
4a9b3e557f
s3: Explicitly pass sconn to the change_notify_remove_request
2010-06-12 15:42:55 +02:00
Volker Lendecke
9386e2d9d8
s3: Remove smbd_server_conn from change_notify_add_request
2010-06-12 15:42:55 +02:00
Volker Lendecke
2509eb4209
s3: Remove smbd_server_conn from reply_sesssetup_and_X
2010-06-12 15:42:55 +02:00
Volker Lendecke
c03012ea1c
s3: Fix a typo
2010-06-12 15:42:55 +02:00
Volker Lendecke
8de7bf19b8
s3: Remove smbd_server_conn from reply_sesssetup_and_X_spnego
2010-06-12 15:42:55 +02:00
Volker Lendecke
853b29066c
s3: Remove smbd_server_conn from reply_spnego_auth
2010-06-12 15:42:54 +02:00
Volker Lendecke
32900fdc97
s3: Remove smbd_server_conn from reply_spnego_negotiate
2010-06-12 15:42:54 +02:00
Volker Lendecke
0f852ab070
s3: Remove smbd_server_conn from reply_spnego_ntlmssp
2010-06-12 15:42:54 +02:00
Volker Lendecke
2260dbecc2
s3: Remove smbd_server_conn from reply_spnego_kerberos
2010-06-12 15:42:54 +02:00
Volker Lendecke
89c5023b25
s3: Explicitly pass sconn to the api_ functions
2010-06-12 15:42:54 +02:00
Volker Lendecke
f437f12d3e
s3: Remove smbd_server_conn from send_trans_reply
2010-06-12 15:42:53 +02:00
Volker Lendecke
391cb416f6
s3: Remove smbd_server_conn from reply_findclose
2010-06-12 15:42:53 +02:00
Volker Lendecke
93867d5f34
s3: Remove smbd_server_conn from call_trans2setfsinfo
2010-06-12 15:42:53 +02:00
Volker Lendecke
b250232b8b
s3: Remove smbd_server_conn from smbd_do_qfsinfo
2010-06-12 15:42:53 +02:00
Volker Lendecke
b340953881
s3: Remove smbd_server_conn from call_trans2findnext
2010-06-12 15:42:53 +02:00
Volker Lendecke
6608400e2d
s3: Remove smbd_server_conn from call_trans2findfirst
2010-06-12 15:42:53 +02:00
Volker Lendecke
72b4afc699
s3: Remove smbd_server_conn from send_trans2_replies
2010-06-12 15:42:53 +02:00
Volker Lendecke
29f716971a
s3: Remove smbd_server_conn from register_existing_vuid
2010-06-12 15:42:53 +02:00
Volker Lendecke
dd192bb649
s3: Explicitly pass sconn to is_valid_writeX_buffer
2010-06-12 15:42:52 +02:00
Volker Lendecke
73955a2d92
s3: Explicitly pass sconn to reply_readbraw_error
2010-06-12 15:42:52 +02:00
Volker Lendecke
d5f20aea73
s3: Pass sconn explicitly to reply_special
2010-06-12 15:42:52 +02:00
Volker Lendecke
7223799b6e
s3: Remove smbd_server_conn from smbd_do_locking
2010-06-12 15:42:52 +02:00
Volker Lendecke
5005ad2e78
s3: Remove smbd_server_conn from reply_rmdir
2010-06-12 15:42:52 +02:00
Volker Lendecke
0d6f3d64fa
s3: Remove smbd_server_conn from reply_writebraw
2010-06-12 15:42:52 +02:00
Volker Lendecke
8f8aac9c2f
s3: Remove smbd_server_conn from reply_read_and_X
2010-06-12 15:42:52 +02:00
Volker Lendecke
e16476ac48
s3: Remove smbd_server_conn from send_file_readX
2010-06-12 15:42:52 +02:00
Volker Lendecke
993738d368
s3: Remove smbd_server_conn from reply_read
2010-06-12 15:42:52 +02:00
Volker Lendecke
96acccf261
s3: Remove smbd_server_conn from reply_lockread
2010-06-12 15:42:51 +02:00
Volker Lendecke
fd1891829a
s3: Remove smbd_server_conn from reply_readbraw
2010-06-12 15:42:51 +02:00
Volker Lendecke
2826471123
s3: Remove smbd_server_conn from reply_send_file_readbraw
2010-06-12 15:42:51 +02:00
Volker Lendecke
f26b738412
s3: Remove smbd_server_conn from reply_ulogoffX
2010-06-12 15:42:51 +02:00
Volker Lendecke
557aebc327
s3: Remove smbd_server_conn from reply_fclose
2010-06-12 15:42:51 +02:00
Volker Lendecke
96854ec994
s3: Remove smbd_server_conn from reply_search
2010-06-12 15:42:51 +02:00
Volker Lendecke
bf2f2f468c
s3: Remove smbd_server_conn from reply_tcon_and_X
2010-06-12 15:42:51 +02:00
Volker Lendecke
0275502b9c
s3: Remove smbd_server_conn from reply_tcon
2010-06-12 15:42:51 +02:00
Volker Lendecke
d724ac3e8c
s3: Remove smbd_server_conn from make_connection_snum
2010-06-12 15:42:51 +02:00
Volker Lendecke
d04a89682a
s3: Remove smbd_server_conn from change_to_user
2010-06-12 15:42:50 +02:00
Volker Lendecke
5a2277ca2f
s3: Remove smbd_server_conn from reply_ntcancel
2010-06-12 15:42:50 +02:00
Volker Lendecke
e01ee1c77d
s3: Remove smbd_server_conn from send_nt_replies
2010-06-12 15:42:50 +02:00
Volker Lendecke
b55a8e8ccf
s3: Remove smbd_server_conn from reply_smb2002
2010-06-12 15:42:50 +02:00
Volker Lendecke
a45ea200c6
s3: Explicitly pass sconn to negprot_spnego()
2010-06-12 15:42:50 +02:00
Volker Lendecke
b82fc135a7
s3: Remove some global references to smbd_server_conn
2010-06-12 15:42:50 +02:00
Volker Lendecke
3087986e76
s3: Remove sconn arg from smbd_notify_cancel_by_smbreq
2010-06-12 15:42:50 +02:00
Volker Lendecke
546a264e0e
s3: Initialize smb_request->sconn in smbd_smb2_fake_smb_request
2010-06-12 13:05:09 +02:00
Volker Lendecke
46a48edcdf
s3: Use "sconn" argument in smbd_[un]lock_socket_internal
...
Metze, please check!
2010-06-12 11:59:21 +02:00
Volker Lendecke
d7bc5fe734
s3: Pass sconn to init_smb_request()
2010-06-12 11:59:21 +02:00
Volker Lendecke
edfc7eaf6d
s3: Add "smbd_server_connection" to smb_request
2010-06-12 11:59:21 +02:00
Volker Lendecke
312a508e88
s3: Fix some nonempty lines
2010-06-12 11:59:21 +02:00
Volker Lendecke
d5cf6482ed
s3: Fix starving the echo responder
...
When both the echo responder and the 445 socket want to send stuff to the
worker smbd, the select loop is not fair. It always chooses the smaller file
descriptor to work on. This can mean that on a busy system the echo responder
never gets around to feed its stuff to the parent.
This fix chooses the async echo responder socket when both the 445 and the echo
responder socket are readable.
Yes, it is a very hackish fix which is required *now* I think. The proper fix
would be to either assign priorities to fd's in tevent, or the from my point of
view better fix would be to make tevent kindof round-robin.
Round-robin would mean that whenever a fd has been dealt with, it is taken off
the list of interested sockets, and only if no other socket is active, all of
the ones waiting are put back. This is a bit like EPOLL_ONESHOT, which I would
like to use for this in the epoll case. Although, I need to do some research if
maybe epoll already guarantees round-robin, I did not find anything in the docs
yet.
Volker
2010-06-11 10:58:54 +02:00
Simo Sorce
5e576a53ab
s3:lib make server contexts generic
...
Pair-programmed-with: Andreas Schneider <asn@samba.org>
2010-06-10 17:30:45 -04:00
Jeremy Allison
aeb25ad0b8
Fix the build in the non WITH_AIO case (sorry).
2010-06-10 14:28:55 -07:00
Jeremy Allison
321d7a6303
Implement AIO in SMB2. Doesn't allow cancel calls yet (to be added).
...
Jeremy.
2010-06-10 13:20:37 -07:00
Jeremy Allison
edd8940e18
Ensure we correctly setup req->subreq before testing for async. Stops crashes when
...
XX_send functions set async to stop interim replies being sent.
Jeremy.
2010-06-10 13:19:25 -07:00
Jeremy Allison
b5638a0560
Don't use the autofree context for the globals. This causes child smbd's forked
...
by modules to crash due to destructors being called (found when using the vfs_aio_fork
module with smb2).
Jeremy.
2010-06-10 13:17:35 -07:00
Karolin Seeger
9fdb69ebcd
s3-smbd: Fix typo in comment.
...
Karolin
2010-06-10 10:35:56 +02:00
Jeremy Allison
d28fa8faab
Rename "allow_smb2" -> "using_smb2" and make the usage clearer.
2010-06-09 19:12:02 -07:00
Jeremy Allison
3c0eead9fd
Split out the "finished write processing" code into a function so it can be called
...
by both sync and async code.
Jeremy.
2010-06-09 17:09:11 -07:00
Jeremy Allison
efd0c35a7e
Ensure we don't send SMB1 keepalives on an SMB2 connection.
...
Jeremy.
2010-06-09 17:08:41 -07:00
Jeremy Allison
09e74b675f
Split out the "finished read processing" code into a function so it can be called
...
by both sync and async code.
Jeremy.
2010-06-09 10:48:12 -07:00
Jeremy Allison
34a8324409
Fix a valgrind error found by SMB2-COMPOUND test.
...
If a file is closed we must also NULL out all chained_fsp
pointers when the fsp is freed to prevent invalid pointer
access.
Jeremy.
2010-06-08 21:20:07 -07:00
Jeremy Allison
0c5d0e1c37
Second part of fix for 7501 - SMB2: CREATE request replies getting mangled.
...
Based on code from Ira Cooper <samba@ira.wakeful.net>, and also
advice on refactoring the patch into a function call. outbuf vectors
can be reallocated by smb2 processing code, so when returning interim
responses we must not make assumptions about vector size.
Jeremy
2010-06-08 17:44:05 -07:00
Ira Cooper
fd9e02d5f3
Fix for bug 7501 - SMB2: CREATE request replies getting mangled.
...
Code for dup_smb2_req() was duplicating the wrong vector (i, instead
of i+2) when returning a non-minimal SMB2 response.
2010-06-08 11:20:23 -07:00
Volker Lendecke
7a7f28d96d
Revert "s3:smbd Fix segfault if register_existing_vuid() fails"
...
This reverts commit 8f1cec5faf
.
2010-06-08 11:38:08 +02:00
Volker Lendecke
3e502159c7
Revert "s3:smbd Give the kerberos session key a parent"
...
This reverts commit 4a7f45b7e1
.
2010-06-08 11:38:08 +02:00
Volker Lendecke
34b29b1198
Revert "s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS"
...
This reverts commit edba46ce94
.
Conflicts:
source3/auth/auth_ntlmssp.c
2010-06-08 11:38:08 +02:00
Jeremy Allison
096a3d3eea
Make aio_ex owned by a talloc context, not neccessarily on the null context.
2010-06-07 16:26:30 -07:00
Jeremy Allison
d70413fa0c
Move "write_though" into aio_ex struct.
2010-06-07 16:25:18 -07:00
Simo Sorce
5da783f4a7
s3:smbd add utility function to check if there are open pipes
2010-06-07 17:25:48 -04:00
Andrew Bartlett
edba46ce94
s3:auth Change auth_ntlmssp_server_info API to return NTSTATUS
...
It's nicer to have an NTSTATUS return, and in s3compat there may be a
reason other than 'no memory' why this can fail.
Andrew Bartlett
2010-06-07 23:34:29 +10:00
Andrew Bartlett
4a7f45b7e1
s3:smbd Give the kerberos session key a parent
...
I can't see what would free this, so this should prevent a memory leak.
Andrew Bartlett
2010-06-07 23:34:28 +10:00
Andrew Bartlett
8f1cec5faf
s3:smbd Fix segfault if register_existing_vuid() fails
...
The register_existing_vuid() call will handle both the ntlmssp_end and
vuid invalidation internally, so we don't want to do it again.
Andrew Bartlett
2010-06-07 23:34:28 +10:00
Jeremy Allison
62e0a744e2
Fix a long-standing bug with async io that would only be triggered by SMB2.
...
On normal or shutdown close, ensure we wait for any pending IO to
complete before returning. Implement a blocking aio_suspend inside
vfs_aio_fork.c. These changes pass make test when the aio_fork module
is used by default on the test shares.
Jeremy.
2010-06-04 21:00:24 -07:00
Jeremy Allison
b12409a480
wait_for_aio_completion() should return 0 on non-aio compiled case.
2010-06-04 11:41:57 -07:00
Jeremy Allison
be5133f1e0
Rename req -> smbreq.
2010-06-04 11:41:38 -07:00
Jeremy Allison
e0acee4919
Change smbd_aio_complete_mid() -> smbd_aio_complete_aio_ex(). Simplifies
...
the code and eliminates find_aio_ex().
Jeremy.
2010-06-04 11:30:46 -07:00
Andreas Schneider
9097bdddd0
s3-auth: Moved smbd user functions to a generic place.
...
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:37 -04:00
Andreas Schneider
fad86ddf55
s3-smbd: Remove unneeded dependency of map_username to globals.c.
...
Reviewed-by: Simo Sorce <idra@samba.org>
2010-06-04 12:12:08 -04:00
Jeremy Allison
a73b846802
Allow us to cope correctly with NT_STATUS_MORE_PROCESSING_REQUIRED when downgrading from krb5 to NTLMSSP over SMB2.
...
Jeremy.
2010-06-03 11:50:08 -07:00
Jeremy Allison
e47d77832b
Found by Guenther - fix up our fallback paths from krb5 to NTLMSSP when using SMB2.
...
Jeremy.
2010-06-03 11:18:11 -07:00
Günther Deschner
b6a2cea74d
s3-security: use shared "Standard access rights.".
...
Guenther
2010-06-03 11:00:26 +02:00
Günther Deschner
1bed5254d9
s3-security: remove duplicate Extra W2K flags.
...
Guenther
2010-06-03 11:00:24 +02:00
Günther Deschner
a75436e3ee
s3-security: use shared SECINFO_DACL define.
...
Guenther
2010-06-03 11:00:12 +02:00
Günther Deschner
e24a59f932
s3-security: use shared SECINFO_SACL define.
...
Guenther
2010-06-03 10:59:54 +02:00
Günther Deschner
630c27bdad
s3-security: use shared SECINFO_GROUP define.
...
Guenther
2010-06-03 10:59:38 +02:00
Günther Deschner
415d3d5fe7
s3-security: use shared SECINFO_OWNER define.
...
Guenther
2010-06-03 10:59:15 +02:00
Günther Deschner
788d7f9e4a
s3-security: remove some more shared secdesc defines.
...
Guenther
2010-06-03 09:58:25 +02:00
Jeremy Allison
cb1590e410
Ensure we remove SMB2 cancel requests from the active queue
...
now we don't remove them in the talloc destructor.
Jeremy.
2010-06-02 16:57:08 -07:00
Jeremy Allison
53e4650622
Fix a crash bug found by Ira Cooper <samba@ira.wakeful.net>.
...
A create call comes in, goes async (on the oplock request).
At a later time (just before a cancel request is received)
it completes, and goes through smbd_smb2_request_reply() to
send the reply to the create call.
However, the output socket queue is full, so when
tstream_writev_queue_send() is called from smbd_smb2_request_reply(),
the smb2req stays on the "being processed" queue on
sconn->smb2.requests, as only when tstream_writev_queue_send() completes
is smbd_smb2_request_writev_done() get called, which will TALLOC_FREE
the smb2req (and thus take if off the queue).
The cancel comes in, gets processed and looks through the
requests on the queue, and BANG - hits the smb2req that
has already been processed and is outgoing....
Remove the request from the queue once
tstream_writev_queue_send() is called and not in the talloc
destructor function.
Jeremy.
2010-06-02 16:43:31 -07:00
Jeremy Allison
fbfc60fac1
Move to using a DATA_BLOB inside of struct aio_extra, not a char *.
...
Will make using AIO in SMB2 easier.
Jeremy.
2010-06-02 10:25:56 -07:00
Ira Cooper
e799de256e
SMB2: Fix rename on Windows 7.
...
This removes some code Jeremy (jra) suspected was bad. It turns out that the
command window rename command will not work with the offending code in place.
With it removed the bug is gone, and rename works.
2010-06-01 17:09:29 -07:00
Jeremy Allison
e9ff32c6c3
Don't use sigev_value.sival_int to just store the mid, use sigev_value.sival_ptr to store the private data structure.
...
This allows easier use from SMB2. Ensure aio is initialized before the
aio_pending_size check else aio will never be used.
Jeremy.
2010-06-01 16:05:44 -07:00
Günther Deschner
e80301eded
s3-smbd: remove unused sconn from token_contains_name().
...
Guenther
2010-05-31 22:18:30 +02:00
Simo Sorce
471ed70c49
s3:smbd map_username() doesn't need sconn anymore
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
6a25668e55
s3:smbd user_ok doesn't need sconn anymore
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
94bf9ce48a
s3:smbd user_in_list() doesn't need sconn anymore
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
7747dd82f7
s3:smbd user_in_network() doesn't need sconn anymore
...
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Simo Sorce
b32b59d47f
s3:smbd make yp cache local.
...
The my_yp_domain variable is just a static cache needed to avoid
making over and over expensive and potentially blocking calls to
yp_get_default_domain().
Instead of keeping this onto the smbd_server_connection struct, just
keep it local to the only function ever using this variable.
This disentagle this function (and a number of calling functions)
from having to pass around smbd_server_connection and thus having
to link against smbd. It also removes a few ifdefs.
Nothing changes from a global/local pov, as the smbd_server_connection
variable passed around is also a global one.
Signed-off-by: Andreas Schneider <asn@samba.org>
2010-05-31 18:21:29 +02:00
Andrew Bartlett
ebae21f023
ntlmssp: Make the ntlmssp.h from source3/ a common header
...
The code is not yet in common, but I hope to fix that soon.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:56 +02:00
Andrew Bartlett
723ea68d3b
s3:auth Remove AUTH_NTLMSSP_STATE typedef.
...
typedefs are no longer preferred Samba style.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:44 +02:00
Andrew Bartlett
3b706865f6
s3:auth Make AUTH_NTLMSSP_STATE a private structure.
...
This makes it a little easier for it to writen in terms of GENSEC in future.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-31 15:10:33 +02:00
Volker Lendecke
3e0b2c8c9a
s3: Fix some debug messages
2010-05-31 12:04:28 +02:00
Günther Deschner
f9f8007361
s3-build: only use ndr_security.h where needed.
...
Guenther
2010-05-31 11:32:37 +02:00
Simo Sorce
b99dd10b39
s3:smbd Use the right num_sids
...
We use s_i->ptok->num_sids everywhere else in this call and
then suddenly we reference s_i->num_sids
2010-05-29 17:07:55 -04:00
Andrew Bartlett
59422efca9
s3:smbd move messaging_context and memcache into globals.c
...
This helps vfstest, which previously had duplicate copies of these functions.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:27 +02:00
Andrew Bartlett
6f279de0e6
s3:smbd split reload services/printers functions from server.c
...
This helps vfstest, as it previously had duplicate copies of these
functions.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:26 +02:00
Andrew Bartlett
8bc32513da
s3:smbd split smbd/server.c into smbd/server.c and smbd/server_exit.c
...
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-05-28 18:08:25 +02:00
Andreas Schneider
93ac516e15
s3-auth: Added a function to get the server_info from the system user.
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 14:31:39 +02:00
Günther Deschner
0ca8e2252b
s3-lanman: Fix api_RNetUserGetInfo level 2 marshalling offset calculation.
...
54 + 4 = 58 (and not 60).
Found by torture test.
Guenther
2010-05-28 02:49:37 +02:00
Simo Sorce
606be25ecf
s3:auth Free sampass as soon as we have server_info
...
We don't keep sampass in server_info anymore
So it makes no sense to keep it around.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:56:02 +02:00
Simo Sorce
d9cffc01be
s3:auth use info3 in auth_serversupplied_info
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:53 +02:00
Volker Lendecke
abbf8efb24
s3: Fix a bad memleak in the async echo responder
2010-05-27 18:15:19 +02:00
Volker Lendecke
9b534ad145
s3: Remove an unused variable
2010-05-27 14:27:58 +02:00
Günther Deschner
869eed76e6
s3-lanman: use samr for api_RNetUserGetInfo.
...
Following MS-RAP 3.2.5.13 NetUserGetInfo Command.
Guenther
2010-05-27 13:37:40 +02:00
Stefan Metzmacher
9a6636a56e
s3:rpc_server: pass down local and remote tsocket_address to np_open()
...
metze
2010-05-27 07:13:56 +02:00
Stefan Metzmacher
56ebbb53c8
s3:smbd: add PIPE_BUSY handling for SMBtrans calls on named pipes
...
metze
2010-05-27 07:13:55 +02:00
Günther Deschner
229b090308
s3-lanman: remove defines now provided by IDL.
...
Guenther
2010-05-26 22:49:01 +02:00
Günther Deschner
2807ab358e
s3-samr: move chgpasswd.c out of smbd and into the samr server.
...
Guenther
2010-05-26 22:17:02 +02:00
Günther Deschner
14b03d132b
s3-smbd: remove unused change/check_lanman_password.
...
Guenther
2010-05-26 22:16:43 +02:00
Günther Deschner
7fa2129db6
s3-lanman: parse encrypted and min_pwd_length in api_SetUserPassword().
...
Guenther
2010-05-26 22:15:51 +02:00
Günther Deschner
a17203ba65
s3-lanman: use samr for api_SetUserPassword().
...
Guenther
2010-05-26 22:15:51 +02:00
Simo Sorce
718718d0e7
s3-lanman: Migrated to rpc_connect_spoolss_pipe().
...
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-26 15:07:58 +02:00
Jeremy Allison
475531c9bb
Standardize debug messages for read and write.
...
Jeremy.
2010-05-25 11:39:46 -07:00
Jeremy Allison
d7542b58fc
If using fake oplocks, use the correct SMB2 type code for "no oplock".
...
Jeremy.
2010-05-21 23:59:54 -07:00
Jeremy Allison
82484461e3
Don't forget brackets around bitwise tests.
...
Jeremy.
2010-05-21 17:12:40 -07:00
Jeremy Allison
b2a7ad8c95
Make DFS work over SMB2.
...
Jeremy.
2010-05-21 16:56:10 -07:00
Jeremy Allison
efb29227fa
Make krb5 over SMB2 identical to the way we handle it in SMB1.
...
Jeremy.
2010-05-21 12:08:18 -07:00
Ira Cooper
28b8d42136
s3: added support for fake oplocks in SMB2.
2010-05-21 09:57:33 -07:00
Andrew Bartlett
cba7f8b827
s3:dom_sid Global replace of DOM_SID with struct dom_sid
...
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.
Andrew Bartlett
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Jeremy Allison
a8a4fe0605
Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions.
...
Move to a consistent get_FileIndex() function for all inode returns,
that checks if st_dev on the file is identical to the top directory
dev_t of the exported share, and if so uses the raw 64-bit inode
number. If it isn't (we've traversed a mount point) - return what
we used to do for Windows which is the concatination of the bottom
32-bits of the inode with the 32-bit device number. We can get more
creative with this over time (hashing?) if we want as now all inode returns go
through this single function.
Jeremy.
2010-05-20 11:36:47 -07:00
Günther Deschner
e7982bbe0b
s3-lanman: Fix various RAP printing calls according to win98 testing and MS-RAP docs.
...
Guenther
2010-05-20 13:35:49 +02:00
Kai Blin
29629b9390
s3 smb2: Fix the build without kerberos
...
Jeremy, please check
2010-05-20 11:36:14 +02:00
Jeremy Allison
2c61c93a51
Fix bug 7442 - Samba returns incorrect SMB2 QFS device info.
...
Add the correct devicetype and characteristics for this info level.
Jeremy.
2010-05-19 21:28:08 -07:00
Jeremy Allison
fad5d33bf8
Fix connecting to [homes] share over SMB2.
...
Jeremy.
2010-05-19 21:27:43 -07:00
Jeremy Allison
1ad551ce30
After talking with Microsoft engineers, immediately replying
...
on compound requests on open being deferred for a sharing violation
is a Windows bug. Re-enable the code that simply delays the compound
response if the delay time is less than 2 seconds.
Jeremy.
2010-05-19 20:09:51 -07:00