Volker Lendecke
515dfe6c7f
s3: Clarify what CLEANUP1 does
2012-01-05 20:29:59 +01:00
Jeremy Allison
5a8c88124b
Add some debug to vfs_aio_pthread so I can see when jobs start and stop.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 5 20:28:00 CET 2012 on sn-devel-104
2012-01-05 20:28:00 +01:00
Andrew Bartlett
1b738963ee
s3-auth remove outdated comment
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Jan 5 18:51:47 CET 2012 on sn-devel-104
2012-01-05 18:51:47 +01:00
Andrew Bartlett
4ac34f3288
s3-librpc remove unused headers
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:29 +01:00
Andrew Bartlett
a074a5d5fa
s3-auth Remove more unused headers
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:29 +01:00
Andrew Bartlett
6abb880519
s3-auth remove unused ntlmssp.h
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:29 +01:00
Andrew Bartlett
16e463e169
s3-auth Remove ntlmssp_wrap.h which is no longer required
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
3042e38d51
s3-auth use gensec directly rather than via auth_generic_state
...
This is possible because the s3 gensec modules are started as
normal gensec modules, so we do not need a wrapper any more.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
0c0c23f3fe
s3-auth Set remote address for both AD and s3 gensec modes
2012-01-05 17:17:28 +01:00
Andrew Bartlett
e22b1b4f9e
s3-auth re-create the auth context in the s3 ntlmssp server module
...
This removes the abstraction violation in auth_generic.c.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
1075efabc7
s3-auth Add TALLOC_CTX * to auth_generic_prepare()
...
This makes the long term owner of this memory more clear. So far only the
clear cases have been moved from NULL however.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
c579b735d6
s3-auth supply s3 ntlmssp module via gensec_settings
...
This will allow the supply of multiple modules in future
without duplicating the module selection logic.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
7b4f2fad54
s3-selftest: Add test for rpcclient, including kerberos authentication
...
Some knownfail entries are added for things the currently fail.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Stefan Metzmacher
73ed88df35
s3:gse: MIT krb5 1.8.1 has a bug in gss_wrap_iov()
...
gss_krb5int_make_seal_token_v3_iov() doesn't set '*conf_state'.
metze
2012-01-05 17:17:28 +01:00
Andrew Bartlett
a1fd1a4c65
s3-librpc store the sign/seal flags we got in the gssapi client
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
860ad734ba
s3-libads Factor out a new routine kerberos_get_principal_from_service_hostname()
...
This is now used in the GSE GSSAPI client, so that when we connect to
a target server at the CIFS level, we use the same name to connect
at the DCE/RPC level.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Andrew Bartlett
25d7675d69
s3-librpc Use gsskrb5_get_subkey() where available to get the session key
...
This allows gse_get_session_key() to work against Heimdal.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-05 17:17:28 +01:00
Volker Lendecke
ab58469ff4
s3: Remove some redundant code
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan 5 17:16:45 CET 2012 on sn-devel-104
2012-01-05 17:16:45 +01:00
Volker Lendecke
7fc566dbb9
s3: Run the CLEANUP1 test
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan 5 14:42:43 CET 2012 on sn-devel-104
2012-01-05 14:42:43 +01:00
Volker Lendecke
0d0141893e
s3: Add a test excercising the share mode cleanup routine
2012-01-05 13:09:36 +01:00
Volker Lendecke
fed2fba0a9
s3: Move basic SMB checking to a much earlier point
2012-01-05 13:09:35 +01:00
Volker Lendecke
f7439f81be
s3: Add a suicide mode to smbd
...
To test our cleanup code paths properly, we need a way to make smbd exit hard
without cleaning up
2012-01-05 13:09:35 +01:00
Volker Lendecke
69b51e9053
s3: Fix some nonempty blank lines
2012-01-05 13:09:35 +01:00
Jeremy Allison
3a18a42d13
Add S3 vfs_aio_pthread module to replace broken glibc aio code.
...
Compiles but not yet tested.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Jan 5 01:43:51 CET 2012 on sn-devel-104
2012-01-05 01:43:51 +01:00
Andreas Schneider
b9d208bdaa
s3-winbind: Fix segfault if we can't map the last user.
...
This fixes bug #8678 .
The issue is caused by bug #8608 .
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jan 4 18:30:53 CET 2012 on sn-devel-104
2012-01-04 18:30:52 +01:00
Andreas Schneider
5075e56568
s3-winbind: Move finding the domain to it's own function.
...
This the first part to fix bug #8678 .
2012-01-04 16:56:06 +01:00
David Disseldorp
bd5fe0a333
s3-perfcount: fix incorrect array length calculations
...
As reported by Ismail Doenmez (idonmez@suse.com ), sizeof() is
incorrectly used by _reg_perfcount_init_data_block() in an attempt to
determine the length of a talloced array.
Signed-off-by: Günther Deschner <gd@samba.org>
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Jan 4 16:54:37 CET 2012 on sn-devel-104
2012-01-04 16:54:37 +01:00
Volker Lendecke
69a67a1b73
s3: Check for the packet size before accessing it
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jan 4 15:16:20 CET 2012 on sn-devel-104
2012-01-04 15:16:20 +01:00
Masafumi Nakayama
909056a2da
s3-cli: fix bug 563, >8GB tar on BE machines
...
Borrows on existing patches proposed by Craig Barratt and Brad Ellis.
Signed-off-by: David Disseldorp <ddiss@suse.de>
Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Tue Jan 3 18:31:28 CET 2012 on sn-devel-104
2012-01-03 18:31:28 +01:00
Volker Lendecke
cd3a935d0e
s3: Fix a cut&paste error
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 3 16:57:44 CET 2012 on sn-devel-104
2012-01-03 16:57:44 +01:00
Volker Lendecke
0923e7fa39
s3: Fix a typo
2012-01-03 15:22:03 +01:00
Volker Lendecke
bed281dad7
s3: Remove the unused "file_existed" parameter from smbd_calculate_access_mask
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Jan 3 15:16:50 CET 2012 on sn-devel-104
2012-01-03 15:16:49 +01:00
Volker Lendecke
c01f02a4b9
s3: Avoid "file_existed" in smbd_calculate_maximum_allowed_access
...
We access the file by name anyway, so we can just try to access it. The file
system will for sure tell us if the file does not exist.
2012-01-03 13:38:02 +01:00
Volker Lendecke
49a520217c
s3: Remove some else{} branches in smbd_calculate_maximum_allowed_access
2012-01-03 13:38:01 +01:00
Volker Lendecke
8cadd19a91
s3: Directly use *p_access_mask in smbd_calculate_maximum_allowed_access
2012-01-03 13:38:01 +01:00
Volker Lendecke
a5a4b581b7
s3: Factor out smbd_calculate_maximum_allowed_access
2012-01-03 13:38:00 +01:00
Stefan Metzmacher
e1679fe2f1
s3: Happy New Year 2012
...
metze
2012-01-01 20:45:37 +01:00
Jeremy Allison
e39df67669
Final part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
...
The code to set a DOS error on short writeX return is amazingly
legacy code, and also breaks the reply as fixup_chain_error_packet()
enforces a 2-byte wct on any reply where smb_rcls != 0.
Found in testing by Andrew Bartlett. Thanks Andrew !
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 31 08:05:35 CET 2011 on sn-devel-104
2011-12-31 08:05:35 +01:00
Jeremy Allison
5e6263960a
Third part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
...
Fix default_sys_recvfile() to correctly cope with
short writes. Return the amount written. Return
-1 and set errno if no data could be written.
2011-12-30 20:45:10 -08:00
Jeremy Allison
a5715420e3
Second part of fix for bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write.
...
Split out the functionality of drain_socket() into a separate
function from default_sys_recvfile().
2011-12-30 20:23:00 -08:00
Andrew Bartlett
e387721bc5
s3-auth Fix talloc parent for s4 event context in auth_samba4
2011-12-28 22:39:19 +11:00
Andrew Bartlett
d76abd1c45
s3-auth: Remove protype for already-removed auth_ntlmssp_start
2011-12-28 22:39:19 +11:00
Volker Lendecke
2b75e877fb
s3: Fix a 64-bit warning
2011-12-25 13:31:58 +01:00
Volker Lendecke
1fbc8c2186
s3: Fix linking on Lion
...
We are using CoreFoundation functions in charset_macosx.c. We need to link
against that.
2011-12-25 13:31:58 +01:00
Jeremy Allison
eb617374a6
Fix bug #8679 - recvfile code path using splice() on Linux leaves data in the pipe on short write
...
Bug found and fix suggested by Andrew Bartlett.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sun Dec 25 07:46:38 CET 2011 on sn-devel-104
2011-12-25 07:46:38 +01:00
Stefan Metzmacher
4a1895eb99
s3:lib/ctdbd_conn: try ctdbd_init_connection() as root
...
ctdbd_traverse is only called if the main db_context is already
open. So if we could get to information via dbwrap_fetch,
we should also be able to traverse.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 23 18:19:14 CET 2011 on sn-devel-104
2011-12-23 18:19:13 +01:00
Andrew Bartlett
21fb9a47ea
s3-librpc Use gensec_sig_size() instead of a fixed NTLMSSP_SIG_SIZE
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Dec 22 20:57:27 CET 2011 on sn-devel-104
2011-12-22 20:57:27 +01:00
Andrew Bartlett
06498637bb
s3-rpc_server: Rework pipe_ntlmssp_auth_bind() to be generic
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
d52e5473ef
s3-rpc_server: Allow gensec mechanisms to return NT_STATUS_OK
...
If a kerberos mechanism is added, then it can return OK after just one packet.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
83f0ca3aad
s3-rpc_server: rename pipe_ntlmssp_verify_final() to pipe_auth_generic_verify_final()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
43f35f1826
s3-rpc_server: Rename dcesrv_ntlmssp.[ch] to dcesrv_auth_generic.[ch]
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
db8bbf92ad
s3-rpc_server rename NTLMSSP functions to auth_generic..()
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
815490d3e8
s3-rpc_server rename ntlmssp_server_auth_start() -> auth_generic_server_start()
...
By adding an OID parameter we can make this routine generic to any
gensec module that may be made available.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
2dd23e900a
s3-rpc_server remove unused header
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
5e038432f7
s3-auth split the auth_generic functions into a seperate file
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
b85bcd7a24
s3-rpc_server request both sign and seal for clarity
...
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:11 +01:00
Andrew Bartlett
c17131685c
s3-auth remove auth_ntlmssp_start(), call auth_generic_start() directly
...
This makes it clear that this can support more than just NTLMSSP.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:10 +01:00
Andrew Bartlett
1100f6eca5
s3-auth rename auth_ntlmssp_prepare() -> auth_generic_prepare()
...
This function handles more than NTLMSSP now, at least when we are an AD DC
and so changing the name may avoid some confusion in the future.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:10 +01:00
Andrew Bartlett
6391fff9da
s3-auth rename auth_ntlmssp_state -> auth_generic_state
...
This structure handles more than NTLMSSP now, at least when we are an AD DC
and so changing the name may avoid some confusion in the future.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:10 +01:00
Andrew Bartlett
0b7bc1c45c
s3-rpc_server request the DCE_STYLE feature in ntlmssp_server_auth_start
...
This is not used or honoured by NTLMSSP, but I hope to make this routine
more generic in the future.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-12-22 19:25:10 +01:00
Sumit Bose
6765e7c2a6
s3-netlogon: use dsgetdcname() instead of get_dc_name()
...
Sometimes the domain parameter might not contain the NetBIOS name of the remote
domain but the DNS name.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Dec 22 19:21:21 CET 2011 on sn-devel-104
2011-12-22 19:21:21 +01:00
Sumit Bose
1c8f326dc6
s3-netlogon: Add support to authenticate trusted domains.
2011-12-22 17:48:24 +01:00
Stefan Metzmacher
00d0b4d6d0
s3-rpc_server: Pass in our flags to netlogon_creds_server_init().
...
metze
2011-12-22 17:48:24 +01:00
Stefan Metzmacher
9c00d04ac1
s3-netlogon: Add support for LogonGetCapabilities.
...
This is also needed to support AES.
metze
2011-12-22 17:48:24 +01:00
Stefan Metzmacher
32317b0529
s3:torture/test_smb2: also try PROTOCOL_SMB2_24
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Dec 22 17:47:17 CET 2011 on sn-devel-104
2011-12-22 17:47:17 +01:00
Stefan Metzmacher
460fc521cf
s3:smb2_negprot: add support for PROTOCOL_SMB2_24
...
metze
2011-12-22 15:58:45 +01:00
Andrew Bartlett
e34989eeb2
s3-auth Restore shortcut for guest security token
...
This was lost when the server_info and session_info structures were split.
This helps avoid doing lookups for the guest account to determine the
uid/gid and SID values.
Andrew Bartlett
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Dec 22 15:51:09 CET 2011 on sn-devel-104
2011-12-22 15:51:09 +01:00
Jeremy Allison
711c18c230
Change the signature of pthreadpool_finished_job() to return 0
...
on success, errno on fail and return the jobid in a separate variable.
I need this fix for my vfs_aio_pthread.c module.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Dec 22 12:12:33 CET 2011 on sn-devel-104
2011-12-22 12:12:33 +01:00
Andrew Bartlett
8115c99a97
s3-rpc_server: Add my copyright for my previous work here
...
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 22 09:02:57 CET 2011 on sn-devel-104
2011-12-22 09:02:56 +01:00
Andrew Bartlett
7e6908502b
s3-rpc_server: Remove old comment
2011-12-22 07:27:07 +01:00
Andrew Tridgell
454aff6115
s3-rpc: added "rpc_server:default" config option
...
this allows the config to specify a default behaviour (embedded,
external or disabled) for unknown pipes. This is needed to allow the
s3 smbd server to redirect unknown pipes to the s4 RPC server when
using s3 smbd as a file server for a s4 DC. If rpc_server:default is
not specified then this change preserves the old behaviour
2011-12-22 07:27:07 +01:00
Andrew Tridgell
cd24ed920e
s3-loadparm: mark a few parameters as having P_BYTES type
...
this fixes a problem with "max xmit = 32K" resulting in a maximum SMB
transmit size of 32 bytes, which makes for some very interesting
network traces!
This is what was causing smbtorture to consume gigabytes of memory in
the rpc.schannel test
2011-12-22 07:27:06 +01:00
Volker Lendecke
a42de3b5f0
s3: There's no reason not to at least build winbind on darwin
...
It does not necessarily do nsswitch services, but as a NETLOGON proxy
it should work fine
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec 22 00:16:44 CET 2011 on sn-devel-104
2011-12-22 00:16:43 +01:00
Günther Deschner
bfbb389332
s3-dns: prevent from potentially doing wrong SRV DNS lookups.
...
With an empty sitename we asked for e.g.
_ldap._tcp.._sites.dc._msdcs.AD.EXAMPLE.COM
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 21 17:23:25 CET 2011 on sn-devel-104
2011-12-21 17:23:25 +01:00
Jeremy Allison
c23f1ee0c9
Allow an object to be deleted from a directory if the caller has DELETE_CHILD access
...
even if we don't have access to read the ACL on the object. Fixes bug #8673 - NT ACL issue.
Different fix needed for 3.6.x.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Dec 20 22:13:51 CET 2011 on sn-devel-104
2011-12-20 22:13:51 +01:00
Volker Lendecke
75d3b9ce08
s3: Fix some False/NULL hickups
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-12-20 13:13:17 +01:00
Amitay Isaacs
9e2d4b61de
s3-net: Fix the return codes. 0 on success, -1 on failure
...
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Mon Dec 19 01:57:24 CET 2011 on sn-devel-104
2011-12-19 01:57:24 +01:00
Kai Blin
b1fdf4065e
s4 dns: Allow updates based on smb.conf setting
...
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Dec 17 04:19:40 CET 2011 on sn-devel-104
2011-12-17 04:19:40 +01:00
Jeremy Allison
b939144071
check_name() not needed in mkdir.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec 17 02:44:55 CET 2011 on sn-devel-104
2011-12-17 02:44:55 +01:00
Jeremy Allison
1dfa3ee986
Ensure VALID_STAT before accessing fields.
2011-12-17 01:10:41 +01:00
Jeremy Allison
a6854f2c0a
Fix bug #8664 - Renaming a symlink fails if the symlink target is outside of the share.
...
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 16 23:32:26 CET 2011 on sn-devel-104
2011-12-16 23:32:26 +01:00
Jeremy Allison
7dcef878cd
Restrict UCF_UNIX_NAME_LOOKUP (symlink allowed) to restricted set of calls.
2011-12-16 21:54:23 +01:00
Christian Ambach
75b8a24a42
s3:idmap_autorid: use less transactions
...
reduce the amount of transactions that are mostly unnecessary because no
updates were done, only reads
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Dec 16 20:18:37 CET 2011 on sn-devel-104
2011-12-16 20:18:37 +01:00
Christian Ambach
411d498b8a
s3:dbwrap fix return value of db_tdb_parse
...
use the TDB ecode to determine the NTSTATUS return value
and not the return code that is just -1
2011-12-16 18:43:08 +01:00
Stefan Metzmacher
16bd41b7e7
s3:printing/spoolssd: avoid using server_messaging_context()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 16 16:29:41 CET 2011 on sn-devel-104
2011-12-16 16:29:41 +01:00
Stefan Metzmacher
cbb67e9e2e
s3:smbd: remove unused sconn_server_id()
...
metze
2011-12-16 13:19:33 +01:00
Stefan Metzmacher
704cf10645
s3:smbd: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Stefan Metzmacher
fe7c5198a2
s3:locking: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Stefan Metzmacher
f166f91988
s3:lib/conn_tdb: avoid using sconn_server_id()
...
metze
2011-12-16 13:19:32 +01:00
Volker Lendecke
7000bb6933
s3: Add some const to find_oplock_types
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Dec 16 09:10:07 CET 2011 on sn-devel-104
2011-12-16 09:10:06 +01:00
Volker Lendecke
2349c027c1
s3: Make open_file_ntcreate a bit easier to read
...
Move the declaration of "id" closer to its use
2011-12-16 07:34:48 +01:00
Volker Lendecke
ce30a7ae7b
s3: Make open_file_ntcreate a bit easier to read
...
Move the calculation of "new_file_created" closer to its use
2011-12-16 07:34:48 +01:00
Volker Lendecke
98f7ba52e3
s3: Make open_file_ntcreate a bit easier to read
...
Remove a negation where it's not necessary
2011-12-16 07:34:48 +01:00
Volker Lendecke
432ea5f5c6
s3: Slightly simplify delay_for_exclusive_oplocks
2011-12-16 07:34:48 +01:00
Volker Lendecke
b3d8ecaf52
s3: Slightly simplify delay_for_batch_oplocks
2011-12-16 07:34:47 +01:00
Jeremy Allison
c5cbe481a7
Third part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
...
smbd_check_access_rights() - we can always delete a symlink.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Dec 16 03:32:15 CET 2011 on sn-devel-104
2011-12-16 03:32:15 +01:00
Jeremy Allison
f448c0e6db
Second part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
...
Ensure we use UCF_UNIX_NAME_LOOKUP flags on filename_convert()
when doing a UNIX infolevel in trans2setfilepathinfo().
2011-12-15 16:33:37 -08:00
Jeremy Allison
8eca223123
First part of fix for bug #8663 - deleting a symlink fails if the symlink target is outside of the share.
...
Remove two unneeded check_name() calls. They have already been done
in order to get here.
2011-12-15 16:31:51 -08:00
Volker Lendecke
1355f0ac8c
s3: Fix a typo
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Dec 15 23:35:28 CET 2011 on sn-devel-104
2011-12-15 23:35:28 +01:00
Christian Ambach
851b9e9183
s3:vfs fix up vfs_gpfs after function pointer renames
...
In 422494a8e6
, vfs_gpfs.c was forgotten
Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Thu Dec 15 21:08:02 CET 2011 on sn-devel-104
2011-12-15 21:08:02 +01:00
Andreas Schneider
d0330c7dd6
s3-libsmb: Don't duplicate kerberos service tickets.
...
This fixes bug #8628 .
Each time we do a client connection. Each time we call to function to
get the service ticket from the cache we duplicate it. So with each
connection we end up with one or three duplicated tickets.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Dec 15 19:30:42 CET 2011 on sn-devel-104
2011-12-15 19:30:42 +01:00
Volker Lendecke
8eeb3ff753
s3-dbwrap: All relevant backends provide parse_record(). Remove the fallback.
...
Signed-off-by: Michael Adam <obnox@samba.org>
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Dec 15 17:41:53 CET 2011 on sn-devel-104
2011-12-15 17:41:53 +01:00
Volker Lendecke
f6d8f7440c
s3-dbwrap: Remove the "fetch" db_context callback
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:47 +01:00
Volker Lendecke
b5d056ca23
s3-dbwrap: Rewrite dbwrap_fetch in terms of dbwrap_parse_record
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
77dca70350
s3-dbwrap: Rewrite dbwrap_fallback_parse_record based on dbwrap_fetch_locked
...
This is in preparation to remove the db_context->fetch function pointer
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
daa365493e
s3-dbwrap: For nostalgic reasons, make dbwrap_file.c compile at least
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
29f62bbed7
s3-dbwrap: Fix some blank line endings
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:46 +01:00
Volker Lendecke
098048a89c
s3-dbwrap: Implement db_ctdb_parse_record in terms of db_ctdb_fetch
...
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:45 +01:00
Volker Lendecke
26fc72921f
s3-dbwrap: Make dbwrap_parse_record return NTSTATUS
...
Also, the parser now returns void. The parser is called if and only if
dbwrap_parse_record returns NT_STATUS_OK.
Signed-off-by: Michael Adam <obnox@samba.org>
2011-12-15 16:00:45 +01:00
Stefan Metzmacher
19078b9b05
s3:smbd/globals: remove unused msg_ctx_to_sconn()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Dec 15 14:24:59 CET 2011 on sn-devel-104
2011-12-15 14:24:59 +01:00
Stefan Metzmacher
03455519e7
s3:smbd: pass smbd_server_connection and a snumused function pointer to reload_services()
...
metze
2011-12-15 11:11:24 +01:00
Stefan Metzmacher
5061dd26d3
s3:printing/spoolssd: pass event and messaging context to check_updater_child()
...
metze
2011-12-15 11:08:52 +01:00
Stefan Metzmacher
06c1c338e3
s3:rpc_server/spoolss: remove reload_services check from delete_printer_hook()
...
As the spoolss code can run embedded or external relative to the
smbd file server process, it's very tricky to verify if a share
is still in use.
Checking the result of the "deleteprinter command" command should
be enough to check for success. We should not return WERR_ACCESS_DENIED
if the share is still in use, by the current client, as the primary
printer definition is already deleted.
metze
2011-12-15 11:03:29 +01:00
Stefan Metzmacher
e412b8bfcc
s3:smbd: split smb_conf_updated into parent and child versions
...
metze
2011-12-15 11:03:00 +01:00
Stefan Metzmacher
715933a3d3
s3:smbd: split ID_CACHE_* message handling into parent and child parts
...
metze
2011-12-15 08:16:31 +01:00
Günther Deschner
fdcbb7e03b
s3-includes: remove PRIMARY_* SID_INDEX defines defined elsewhere already.
...
They really do not belong to smb.h.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 14 21:15:39 CET 2011 on sn-devel-104
2011-12-14 21:15:39 +01:00
Volker Lendecke
1bea57a6c3
s3: Fix raw.mux after UNUSED_SHARE_MODE_ENTRY was removed
...
See the large comment in notify_deferred_opens for an explanation
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Dec 14 19:08:30 CET 2011 on sn-devel-104
2011-12-14 19:08:30 +01:00
Volker Lendecke
c889c8d705
s3: Slightly simplify the logic in defer_open
...
Doing 3 &&ed conditions in a single if-statement is easier to understand to me
than continuing out separately.
2011-12-14 17:34:21 +01:00
Volker Lendecke
f7e84f2809
s3: Remove UNUSED_SHARE_MODE_ENTRY
2011-12-14 17:34:21 +01:00
Volker Lendecke
37e7981eea
s3: Remove a call to procid_self()
2011-12-14 17:34:21 +01:00
Volker Lendecke
461766e497
s3: Remove nmbd_messaging_context()
2011-12-14 17:34:21 +01:00
Volker Lendecke
c21f6a1c68
s3: Fix some pointless statics
2011-12-14 17:34:21 +01:00
Volker Lendecke
78e629c598
s3: Remove a call to procid_self()
...
Pass messaging_context through the SIGHUP handler
2011-12-14 17:34:21 +01:00
Volker Lendecke
1f0f8aaab5
s3: Remove a call to procid_self()
...
Pass messaging_context through the SIGTERM handler
2011-12-14 17:34:21 +01:00
Volker Lendecke
505761b5a3
s3: Pass messaging_context to nmbd/process()
2011-12-14 17:34:21 +01:00
Volker Lendecke
096ede3623
s3: Make nmbd_messaging_context static
2011-12-14 17:34:20 +01:00
Volker Lendecke
a2d1b3b144
s3: Centralize nmbd_messaging_context in nmbd.c
2011-12-14 17:34:20 +01:00
Volker Lendecke
5c3194cc41
s3: Fix some nonempty blank lines
2011-12-14 17:34:20 +01:00
Stefan Metzmacher
ffa996e479
s3:smb2_lock: use talloc_get_type_abort() as private_data can't be NULL
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 14 13:34:25 CET 2011 on sn-devel-104
2011-12-14 13:34:25 +01:00
Stefan Metzmacher
324e66fd45
s3:smbd/oplock: make process_oplock_async_level2_break_message() static
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
dabc2cb9cb
s3:smbd/oplock: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
940f21e5c6
s3:smbd/open: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
e3e56e209f
s3:smbd/conn_msg: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
95384d11a3
s3:smbd/close: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
500d703977
s3:smbd/blocking: use talloc_get_type_abort() as private_data can't be NULL
...
metze
2011-12-14 12:00:07 +01:00
Stefan Metzmacher
ef45279f5e
s3:web/swat: use short term event and message contexts
...
swat doesn't have a central event loop.
metze
2011-12-14 12:00:06 +01:00
Stefan Metzmacher
2e0bc74a6e
s3:smbd: remove brl_register_msgs()
...
metze
2011-12-14 12:00:06 +01:00
Stefan Metzmacher
c51da25769
s3:smbd/server: avoid msg_ctx_to_sconn() in smbd_accept_connection()
...
This is the place where we should create smbd_server_connection,
when we're ready to remove the global variable.
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Dec 14 11:23:42 CET 2011 on sn-devel-104
2011-12-14 11:23:42 +01:00
Stefan Metzmacher
1515f7db00
s3:smbd: remove unused smbd_messaging_context()
...
metze
2011-12-14 08:15:30 +01:00
Stefan Metzmacher
78582da8b5
s3:smbd/server: maintain the list of child processes under smbd_parent_context
...
metze
2011-12-14 08:15:06 +01:00
Stefan Metzmacher
dddaa52552
s3:smbd/server: pass smbd_parent_context to smbd_setup_sig_chld_handler()
...
metze
2011-12-14 08:14:54 +01:00
Stefan Metzmacher
6d15ca3482
s3:smbd/globals: change 'int am_parent' into 'struct smbd_parent_context *am_parent'
...
This is a short term solution on the way to get rid of 'am_parent' completely.
metze
2011-12-14 08:14:44 +01:00
Stefan Metzmacher
9eb3c053b8
s3:smbd/globals: remove unused extern declarations
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Dec 13 22:06:02 CET 2011 on sn-devel-104
2011-12-13 22:06:02 +01:00
Stefan Metzmacher
297f1b1f12
s3:smbd/server: move smbd_open_socket and smbd_parent_context to the top
...
metze
2011-12-13 20:31:10 +01:00
Stefan Metzmacher
6630b20046
s3:smbd/oplock_onefs: avoid using smbd_messaging_context()
...
metze
2011-12-13 20:31:10 +01:00
Stefan Metzmacher
fcc1f5f7f7
s3:smbd/oplock_onefs: pass smbd_server_connection to onefs_oplock_wait_record()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
daa685c008
s3:vfstest: reload_services() doesn't need a messaging_context
...
It's only used to get the global smbd_server_connection,
which is used in conn_snum_used() via lp_killunused().
But there we don't need it, as we don't have any tree connects
at startup time.
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
290ce331b6
s3:smbd: pass smbd_server_connection to smbd_setup_sig_hup_handler()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
8a83464216
s3:smbd: pass smbd_server_connection to smbd_setup_sig_term_handler()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
6fc8dc98ab
s3:smbd/oplock: pass smbd_server_connection to onefs_init_kernel_oplocks()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
641a2dea81
s3:smbd/oplock: pass smbd_server_connection to linux_init_kernel_oplocks()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
47e21bcc43
s3:smbd/oplock: pass smbd_server_connection to irix_init_kernel_oplocks()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
17ae2267e3
s3:smbd/oplock: pass sconn as private_data to process_open_retry_message()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
90674f0fce
s3:smbd/oplock: pass sconn as private_data to process_kernel_oplock_break()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
7fee41cd39
s3:smbd/oplock: pass sconn as private_data to process_oplock_break_response()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
fb81772eed
s3:smbd/oplock: pass sconn as private_data to process_oplock_async_level2_break_message()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
da4b503581
s3:smbd/oplock: pass sconn as private_data to process_oplock_break_message()
...
metze
2011-12-13 20:31:09 +01:00
Stefan Metzmacher
21de673575
s3:smbd/oplock: pass smbd_server_connection to init_oplocks()
...
metze
2011-12-13 20:31:09 +01:00
Volker Lendecke
5efd7e16c2
s3: Move can_delete_directory to smbd/, remove shim
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 13 19:00:37 CET 2011 on sn-devel-104
2011-12-13 19:00:37 +01:00
Volker Lendecke
34d58c9d92
s3: Move can_set_delete_on_close to smbd/
2011-12-13 17:27:26 +01:00
Volker Lendecke
2d2d72e479
s3: Remove an else{} in remove_deferred_open_entry
2011-12-13 17:27:26 +01:00
Volker Lendecke
3239c722aa
s3-dbwrap: Simplify db_tdb_fetchlock_parse a bit
...
Introduce a local variable for the result, replace "state->result" by "result"
2011-12-13 17:27:26 +01:00
Stefan Metzmacher
3cf275cd75
s3:smbd/msdfs: enum_msdfs_links() doesn't need a smbd_server_connection anymore
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Dec 13 17:26:20 CET 2011 on sn-devel-104
2011-12-13 17:26:20 +01:00
Stefan Metzmacher
ae7d877841
s3:smbd: use connections_snum_used() instead of conn_snum_used() for load_usershare_shares()
...
Before removing the share security descriptor, we should make sure there're
really no active users anymore.
metze
2011-12-13 15:45:36 +01:00
Stefan Metzmacher
cefb797434
s3:smbd: add connections_snum_used()
...
This works similar to conn_snum_used(), but instead of
looking at the current connection only, it looks at
all active connections in "connections.tdb".
metze
2011-12-13 15:45:36 +01:00
Stefan Metzmacher
611ab8aaa7
s3:lib/dummyparam: remove unused conn_snum_used() dummy
...
metze
2011-12-13 15:45:36 +01:00
Stefan Metzmacher
1399e6bdf5
s3:param: don't reference conn_snum_used directly in load_usershare_shares()
...
This uses the same logic as lp_killunused().
metze
2011-12-13 15:45:36 +01:00
Volker Lendecke
1cf54ef4a6
s3: Use talloc_tos() in set_write_time()
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 13 15:44:58 CET 2011 on sn-devel-104
2011-12-13 15:44:58 +01:00
Volker Lendecke
27e63b72a1
s3: Use talloc_tos() in set_sticky_write_time()
2011-12-13 14:14:24 +01:00
Volker Lendecke
3441c01b16
s3: Convert open_files.idl to tab indents
2011-12-13 14:14:24 +01:00
Stefan Metzmacher
4eb5b0b392
s3:messaging.idl: obsolete unused MSG_SMB_SAM_*
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Dec 13 14:13:38 CET 2011 on sn-devel-104
2011-12-13 14:13:38 +01:00
Stefan Metzmacher
a131713b96
s3:smbd/server: remove unused msg_sam_sync()
...
metze
2011-12-13 12:36:36 +01:00
Stefan Metzmacher
7dc1de73d3
s3:rpc_server/netlogon: remove unused send_sync_message()
...
metze
2011-12-13 12:36:36 +01:00
Stefan Metzmacher
92280def16
s3:smbcontrol: remove unused "samsync" and "samrepl" commands
...
metze
2011-12-13 12:36:36 +01:00
Stefan Metzmacher
2bab5073ba
s3:smbd/server: add parent specific SIGTERM and SIGHUP handlers
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
1738a61b84
s3:smbd/server: create smbd_parent_context earlier
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
dc38db31ba
s3:smbd/server: remember the ev_ctx on the smbd_parent_context
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
20c343b8e8
s3:smbd/server: remember the msg_ctx on the smbd_parent_context
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
e09c675596
s3:smbd/open: pass smbd_server_connection as private_data to msg_file_was_renamed()
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
173ea71686
s3:smbd: register MSG_SMB_FILE_RENAME after the fork
...
The parent smbd doesn't need to handle this, as it doesn't
have any file handles open.
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
d492a437be
s3:smbd/conn_msg: pass smbd_server_connection as private_data to msg_force_tdis()
...
metze
2011-12-13 12:36:35 +01:00
Stefan Metzmacher
f426eb13c9
s3:smbd/blocking: pass smbd_server_connection as private_data to process_blocking_lock_cancel_message()
...
metze
2011-12-13 12:36:34 +01:00
Volker Lendecke
62249f755a
s3: Use pid_to_procid
...
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 13 12:35:09 CET 2011 on sn-devel-104
2011-12-13 12:35:08 +01:00
Volker Lendecke
7b60729d5a
s3: Fix some nonempty blank lines
2011-12-13 11:00:55 +01:00
Volker Lendecke
7a489ec780
s3: Remove a call to procid_self()
2011-12-13 11:00:55 +01:00
Volker Lendecke
c863d65d1b
s3: Remove a call to procid_self()
2011-12-13 11:00:55 +01:00
Volker Lendecke
80b4a3aadc
s3: Remove a call to procid_self()
2011-12-13 11:00:55 +01:00
Volker Lendecke
4066e291f5
s3: Remove a call to procid_self()
2011-12-13 11:00:54 +01:00
Volker Lendecke
0f9d14820e
s3: Remove a bunch of calls to procid_self()
...
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Stefan Metzmacher
77dc976b53
s3:smbd/close: pass smbd_server_connection to notify_deferred_opens()
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 21:49:11 CET 2011 on sn-devel-104
2011-12-12 21:49:11 +01:00
Stefan Metzmacher
4d44f879e1
s3:smbd/clode: pass smbd_server_connection as private_data to msg_close_file()
...
metze
2011-12-12 20:14:41 +01:00
Stefan Metzmacher
d1e0997614
s3:smbd/blocking: pass smbd_server_connection as private_data to received_unlock_msg()
...
metze
2011-12-12 20:14:41 +01:00
Stefan Metzmacher
f59d358653
s3:smb2_lock: pass smbd_server_connection as private_data to received_unlock_msg()
...
metze
2011-12-12 20:14:41 +01:00
Günther Deschner
cf57fd44d7
s3-ctdb: fix the build w/o HAVE_CTDB_CONTROL_CHECK_SRVIDS_DECL
...
Volker, please check.
Guenther
Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Dec 12 17:42:29 CET 2011 on sn-devel-104
2011-12-12 17:42:29 +01:00
Stefan Metzmacher
763fe4216b
s3:smb2_server: use sconn->ev_ctx instead of sconn->smb2.event_ctx
...
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Dec 12 16:08:59 CET 2011 on sn-devel-104
2011-12-12 16:08:59 +01:00
Stefan Metzmacher
7081d7e78f
s3:smb2_lock: avoid using server_event_context()
...
metze
2011-12-12 14:35:43 +01:00
Stefan Metzmacher
e7a100200b
s3:smbd/pipes: avoid passing server_event_context() as event context to np_{read,write}_send
...
metze
2011-12-12 14:35:43 +01:00
Stefan Metzmacher
bf8cce18c6
s3:smbd/process: avoid using server_event_context() for the forked echo handler
...
metze
2011-12-12 14:35:43 +01:00
Stefan Metzmacher
16cfc7243b
s3:smbd/process: avoid using server_event_context() for smbd_deferred_open_timer events
...
metze
2011-12-12 14:35:43 +01:00
Stefan Metzmacher
68a7be6ab4
s3:smbd/oplock: avoid using server_event_context() in add_oplock_timeout_handler()
...
metze
2011-12-12 14:35:43 +01:00