1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
Commit Graph

858 Commits

Author SHA1 Message Date
Jelmer Vernooij
299265d47b Remove yet more global_loadparm instances.
(This used to be commit 5de88728ac)
2008-02-21 18:09:47 +01:00
Jelmer Vernooij
10169a2030 Remove more global_loadparm instance.s
(This used to be commit a1280252ce)
2008-02-21 17:54:24 +01:00
Jelmer Vernooij
9e3e0f9d39 More share_init to more apprioriate place.
(This used to be commit b84f19f678)
2008-02-21 16:21:32 +01:00
Jelmer Vernooij
ff0315ba85 Rename include to mkinclude to emphasize it is different from make's include.
(This used to be commit 0e1d0a874a)
2008-02-18 20:04:18 +01:00
Jelmer Vernooij
80cbff3d01 Fix build with partial linking.
(This used to be commit bfad9610c4)
2008-02-18 16:02:33 +01:00
Andrew Tridgell
5fb241e5d3 3 places where the VFS backend doesn't handle NULL strings.
(This used to be commit cf109460af)
2008-02-18 14:54:14 +11:00
Jelmer Vernooij
e33177001c Remove type before variables in data.mk
(This used to be commit 3c1a7c0dcc)
2008-02-14 12:03:34 +01:00
Andrew Tridgell
b640f475be updated SMB2 code for getinfo according to WSPP docs
- Updated getinfo structures and field names
- also updated the protocol revision number handling to reflect
  new docs
(This used to be commit 3aaa2e86d9)
2008-02-14 17:11:36 +11:00
Andrew Tridgell
4a04a5e620 A better way to handle the different format of RenameInformation in SMB2
We now define a separate info level RAW_SFILEINFO_RENAME_INFORMATION_SMB2
and set that level when handling SMB2 packets. This makes the parsers clearer.
(This used to be commit f6cdf3f117)
2008-02-14 14:54:21 +11:00
Andrew Tridgell
839ab724dc Fixed SMB2 rename operations from Vista clients
We needed a flag in bufinfo to mark packets as SMB2, as it seems that
SMB2 uses a different format for the RenameInformation buffer than SMB
does

Also handle the fact that SMB2 clients give the full path to the
target file in the rename, not a relative path
(This used to be commit 52d7972d95)
2008-02-14 12:30:31 +11:00
Andrew Tridgell
e870cfec9f Convert SMB and SMB2 code to use a common buffer handling structure
This converts our SMB and SMB2 code to use a common structure "struct
request_bufinfo" for information on the buffer bounds of a packet,
alignment information and string handling. This allows us to use a
common backend for SMB and SMB2 code, while still using all the same
string and blob handling functions.

Up to now we had been passing a NULL req handle into these common
routines from the SMB2 side of the server, which meant that we failed
any operation which did a bounds checked string extraction (such as a
RenameInformation setinfo call, which is what Vista uses for renaming
files)

There is still some more work to be done on this - for example we can
now remove many of the SMB2 specific buffer handling functions that we
had, and use the SMB ones.
(This used to be commit ca6d9be6cb)
2008-02-14 10:12:33 +11:00
Andrew Tridgell
88d2e05227 updated SMB2 create operation to match WSPP.
Adding some defined for various new create options
(This used to be commit d037dc23ce)
2008-02-13 15:05:44 +11:00
Andrew Tridgell
e94d710b0b updated SMB2 tcon as per WSPP docs
(This used to be commit 5913e3e549)
2008-02-13 10:13:28 +11:00
Andrew Tridgell
cd2b003aba fixed crash when 0 dialects (thanks metze!)
(This used to be commit 252bcf207b)
2008-02-12 20:29:31 +11:00
Andrew Tridgell
a2505c5a2c updated SMB2 header defines to match WSPP docs
(This used to be commit d2c6ad55ec)
2008-02-12 17:00:35 +11:00
Andrew Tridgell
416360895f converted SMB2 session setup to use WSPP protocol field names
(This used to be commit 3c2af0fdc4)
2008-02-12 16:43:38 +11:00
Andrew Tridgell
8fdb9504dc converted the out side of SMB2 negprot handling
This follows the SMB2 PFIF docs. Current versions of Vista can now connect to Samba4 as a SMB2 server
and do basic operations
(This used to be commit 9dc284770d)
2008-02-12 16:20:13 +11:00
Andrew Tridgell
ccc27e681c fixed up the .in side of SMB2 negprot
fixed the input side of the SMB2 negprot structure and parsers according to the documentation
(This used to be commit 55af8acc7b)
2008-02-12 12:54:44 +11:00
Andrew Bartlett
0f8eeb81ec Remove useless layer of indirection, where every service called
task_service_init() manually.  Now this is called from service.c for
all services.

Andrew Bartlett
(This used to be commit 9c9a4731ca)
2008-02-04 21:58:29 +11:00
Andrew Bartlett
23d681caf9 Rework service init functions to pass down service name. This is
needed to change prefork behaviour based on what service is being
started.

Andrew Bartlett and David Disseldorp
(This used to be commit 0d830580e3)
2008-02-04 17:48:51 +11:00
Amin Azez
a72a4efa69 Fix sending of large nttrans responses.
req_grow_data was growing the original req, not this_req which
was being used for the current fragment.
(This used to be commit 2ac47f5ab6)
2008-02-01 06:36:32 +01:00
Jelmer Vernooij
df408d056e r26672: Janitorial: Remove uses of global_loadparm.
(This used to be commit 18cd08623e)
2008-01-05 13:06:03 -06:00
Jelmer Vernooij
7d5f0e0893 r26639: librpc: Pass iconv convenience on from RPC connection to NDR library, so it can be overridden by OpenChange.
(This used to be commit 2f29f80e07)
2008-01-01 16:12:15 -06:00
Jelmer Vernooij
86dc05e99f r26638: libndr: Require explicitly specifying iconv_convenience for ndr_struct_push_blob().
(This used to be commit 61ad78ac98)
2008-01-01 16:12:11 -06:00
Jelmer Vernooij
c260454229 r26504: Don't rely on system-provided kerberos headers.
(This used to be commit c4b1df0476)
2007-12-21 05:51:07 +01:00
Jelmer Vernooij
e31abef15f r26440: Remove more uses of global_loadparm.
(This used to be commit 8858cf3972)
2007-12-21 05:50:08 +01:00
Jelmer Vernooij
a2cea02584 r26430: require explicit specification of loadparm context.
(This used to be commit 1b947fe0e6)
2007-12-21 05:49:58 +01:00
Jelmer Vernooij
d891c0c74a r26429: Avoid use of global_smb_iconv_convenience.
(This used to be commit d37136b7ab)
2007-12-21 05:49:56 +01:00
Jelmer Vernooij
70f1f33af8 r26402: Require a talloc context in libnetif.
(This used to be commit a35e51871b)
2007-12-21 05:49:33 +01:00
Jelmer Vernooij
6f2252dace r26401: Don't cache interfaces context in libnetif.
(This used to be commit 9f975417cc)
2007-12-21 05:49:32 +01:00
Jelmer Vernooij
f055893ca5 r26382: Remove more uses of global_loadparm.
(This used to be commit 6d4c598534)
2007-12-21 05:49:17 +01:00
Jelmer Vernooij
b65dba2245 r26355: Eliminate global_loadparm in more places.
(This used to be commit 5d589a0d94)
2007-12-21 05:49:01 +01:00
Jelmer Vernooij
a72c5053c5 r26353: Remove use of global_loadparm.
(This used to be commit 17637e4490)
2007-12-21 05:48:57 +01:00
Jelmer Vernooij
5c6eacdb04 r26350: More tests.
(This used to be commit 87799f55d5)
2007-12-21 05:48:55 +01:00
Jelmer Vernooij
5f9aeca0d6 r26347: More tests.
(This used to be commit 5d927b5ca7)
2007-12-21 05:48:53 +01:00
Jelmer Vernooij
c5bf20c5fe r26325: Remove use of global_loadparm in netif.
(This used to be commit e452cb2859)
2007-12-21 05:48:37 +01:00
Jelmer Vernooij
39ee38d9c1 r26316: Use contexts for conversion functions.
(This used to be commit f6420d933b)
2007-12-21 05:48:30 +01:00
Jelmer Vernooij
2f5ca872a8 r26313: Fix more uses of static loadparm.
(This used to be commit 6fd0d9d3b7)
2007-12-21 05:48:25 +01:00
Jelmer Vernooij
b83a7a135f r26268: Avoid more use of global_loadparm - put lp_ctx in smb_server and wbsrv_connection.
(This used to be commit 7c00866423)
2007-12-21 05:47:47 +01:00
Jelmer Vernooij
1fbdd6ef1d r26264: pass name resolve order explicitly, use torture context for settings in dssync tests.
(This used to be commit c7eae1c784)
2007-12-21 05:47:39 +01:00
Jelmer Vernooij
ecea5ce245 r26260: Store loadparm context in gensec context.
(This used to be commit b9e3a4862e)
2007-12-21 05:47:34 +01:00
Jelmer Vernooij
ab69eb8d89 r26250: Avoid global_loadparm in a couple more places.
(This used to be commit 2c6b755309)
2007-12-21 05:47:28 +01:00
Jelmer Vernooij
bbdfbf8d9d r26238: Add a loadparm context parameter to torture_context, remove more uses of global_loadparm.
(This used to be commit a33a553054)
2007-12-21 05:47:20 +01:00
Jelmer Vernooij
291ddf4336 r26237: Add loadparm context to the server service interface.
(This used to be commit 1386c5c925)
2007-12-21 05:47:15 +01:00
Jelmer Vernooij
6c999cd123 r26236: Remove more uses of global_loadparm or specify loadparm_context explicitly.
(This used to be commit 5b29ef7c03)
2007-12-21 05:47:15 +01:00
Jelmer Vernooij
f4a1083cf9 r26227: Make loadparm_context part of a server task, move loadparm_contexts further up the call stack.
(This used to be commit 0721a07aad)
2007-12-21 05:47:04 +01:00
Jelmer Vernooij
181aab56d5 r26221: Add loadparm_context parameter to auth_context_create.
(This used to be commit a9a9634df8)
2007-12-21 05:46:58 +01:00
Stefan Metzmacher
529763a9aa r25920: ndr: change NTSTAUS into enum ndr_err_code (samba4 callers)
lib/messaging/
lib/registry/
lib/ldb-samba/
librpc/rpc/
auth/auth_winbind.c
auth/gensec/
auth/kerberos/
dsdb/repl/
dsdb/samdb/
dsdb/schema/
torture/
cluster/ctdb/
kdc/
ntvfs/ipc/
torture/rap/
ntvfs/
utils/getntacl.c
ntptr/
smb_server/
libcli/wrepl/
wrepl_server/
libcli/cldap/
libcli/dgram/
libcli/ldap/
libcli/raw/
libcli/nbt/
libnet/
winbind/
rpc_server/

metze
(This used to be commit 6223c7fddc)
2007-12-21 05:45:02 +01:00
Jelmer Vernooij
0c56f8dac3 r25551: Convert to standard bool type.
(This used to be commit c9651e2c5c)
2007-10-10 15:07:54 -05:00
Jelmer Vernooij
2f3551ca7c r25446: Merge some changes I made on the way home from SFO:
2007-09-29 More higher-level passing around of lp_ctx.
2007-09-29 Fix warning.
2007-09-29 Pass loadparm contexts on a higher level.
2007-09-29 Avoid using global loadparm context.
(This used to be commit 3468952e77)
2007-10-10 15:07:34 -05:00
Jelmer Vernooij
37d53832a4 r25398: Parse loadparm context to all lp_*() functions.
(This used to be commit 3fcc960839)
2007-10-10 15:07:25 -05:00
Jelmer Vernooij
98b57d5eb6 r25035: Fix some more warnings, use service pointer rather than service number in more places.
(This used to be commit df9cebcb97)
2007-10-10 15:05:43 -05:00
Jelmer Vernooij
ffeee68e4b r25026: Move param/param.h out of includes.h
(This used to be commit abe8349f9b)
2007-10-10 15:05:38 -05:00
Jelmer Vernooij
166284d9c1 r24940: Fix undeclared warning.
(This used to be commit bbc4650871)
2007-10-10 15:03:40 -05:00
Jelmer Vernooij
8e2d624a58 r24937: Merge tests spoolss RPC callbacks.
(This used to be commit 9b256a0ca2)
2007-10-10 15:03:39 -05:00
Jelmer Vernooij
61ffa08f4c r24712: No longer expose the 'BOOL' data type in any interfaces.
(This used to be commit 1ce32673d9)
2007-10-10 15:02:54 -05:00
Stefan Metzmacher
113587b823 r24494: add comment to remind me to look at the flags on a tconx
metze
(This used to be commit deefefeadf)
2007-10-10 15:02:02 -05:00
Andrew Tridgell
0479a2f1cb r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Tridgell
2a8f9213a4 r23700: pre-open the sam in the parent smbd. This has the effect of loading
the schema. That stops us loading the schema for each new connection.

In future I would prefer to share a lot more of our ldb contexts with
children. That will require a larger piece of surgery.
(This used to be commit ff41bdc350)
2007-10-10 14:59:04 -05:00
Andrew Bartlett
222c6dd781 r23680: Make it easier to setup a domain member server - the 'server role'
will now control the auth methods, but an override is still available,
ex:

auth methods:domain controller = <methods>

Andrew Bartlett
(This used to be commit b7e727186e)
2007-10-10 14:59:00 -05:00
Stefan Metzmacher
42c1ef4025 r23067: use 'const union smb_search_data *file' also in the server code to get rid
of compiler warnings in the cifs backend

metze
(This used to be commit 34ef07b1f5)
2007-10-10 14:52:47 -05:00
Stefan Metzmacher
6eaf8ee849 r23045: forward SMB2 oplock breaks to the client
metze
(This used to be commit 577acc198b)
2007-10-10 14:52:44 -05:00
Stefan Metzmacher
10498e8a72 r23044: - use uint32_t for handle id's
- include the session vuid in the SMB2 128-Bit wire handles
  as SMB2 oplock breaks doesn't include a TID or VUID in the header
  we need to make sure the handle is unique for the whole TCP connection

metze
(This used to be commit 7c29b8a7e6)
2007-10-10 14:52:44 -05:00
Stefan Metzmacher
baa81e2959 r23043: allow more than UINT16_MAX - 1 handles on smb2 connections
metze
(This used to be commit 6d08c4cef2)
2007-10-10 14:52:44 -05:00
Andrew Tridgell
d3e28ccd48 r23020: a better fix for the memory leak - this one doesn't stuff up spnego :)
(This used to be commit 9a8da730a7)
2007-10-10 14:52:40 -05:00
Andrew Tridgell
b691b4ad3d r23019: revert r23018 - this will require more thought.
(This used to be commit df60df9678)
2007-10-10 14:52:40 -05:00
Andrew Tridgell
a8716afce8 r23018: fixed a memory leak in our server side session setup code for failed
session setups
(This used to be commit a4e043e1f8)
2007-10-10 14:52:39 -05:00
Stefan Metzmacher
bf62b6642c r22866: handle incoming chained smb2 requests in our server code to let
the windows explorer in longhorn beta3 work.

metze
(This used to be commit 2390c9f24d)
2007-10-10 14:52:26 -05:00
Stefan Metzmacher
4eb1c753ab r22843: pass smb2 lock requests to the ntvfs layer
metze
(This used to be commit 7fa00381ef)
2007-10-10 14:52:24 -05:00
Stefan Metzmacher
6bf99b9e85 r22774: correctly initialize the smbsrv_connection when switching to SMB2
metze
(This used to be commit 0fa4eb7323)
2007-10-10 14:52:17 -05:00
Stefan Metzmacher
c13a4084f2 r22381: fix memory leak
metze
(This used to be commit 4bfe900d1b)
2007-10-10 14:51:11 -05:00
Andrew Tridgell
21650cf377 r21206: - a couple more nttrans places were a memcpy() should be used
- changed the setup array in nttrans to be a uint8 array, instead of a
  uint16 array. This makes it clearer that it is the job of the caller
  to do any byte swapping within that data
(This used to be commit fa3c9b29ae)
2007-10-10 14:44:45 -05:00
Volker Lendecke
2342219d69 r21183: Commit the big/little endian fix for nttrans setup[] handling.
Please check!

For code symmetry reasons, trans2 might also see this fix, but this is left to
the interested reader :-)

Volker
(This used to be commit f2d364ebe6)
2007-10-10 14:44:43 -05:00
Stefan Metzmacher
9320521cb5 r20657: fix compiler warning and bug:-)
metze
(This used to be commit ddf6c90159)
2007-10-10 14:37:27 -05:00
Andrew Tridgell
1cd4339b9a r20646: first preparations for cluster enablement. This changes "
uint32_t server_id
to
  struct server_id server_id;

which allows a server ID to have an node number. The node number will
be zero in non-clustered case. This is the most basic hook needed for
clustering, and ctdb.
(This used to be commit 2365abaa99)
2007-10-10 14:37:23 -05:00
Andrew Bartlett
13dbee3ffe r19598: Ahead of a merge to current lorikeet-heimdal:
Break up auth/auth.h not to include the world.

Add credentials_krb5.h with the kerberos dependent prototypes.

Andrew Bartlett
(This used to be commit 2b569c42e0)
2007-10-10 14:25:00 -05:00
Andrew Tridgell
6fbbef77e6 r19505: fixed a valgrind error
(This used to be commit 8b9359aa7d)
2007-10-10 14:24:40 -05:00
Andrew Tridgell
9cd2b012f3 r19504: - fixed a free error in file_lines_parse
- added a function to test for large file support

- enable CAP_LARGE_FILES only if the test passes

- don't test at large offsets if the server doesn't set
  CAP_LARGE_FILES
(This used to be commit c5423ea22b)
2007-10-10 14:24:40 -05:00
Andrew Tridgell
5d31bce8b6 r18972: we don't need this now all builds in the build farm are limited to 150
file descriptors. We'll pretty quickly find leaks :)
(This used to be commit be70992d71)
2007-10-10 14:20:25 -05:00
Andrew Tridgell
d461f97a4a r18839: align all directory search blobs on an 8 byte boundary to keep the
current vista release happy.
(This used to be commit d3f0114a9d)
2007-10-10 14:20:14 -05:00
Volker Lendecke
000698d643 r18686: Fix typo protocl->protocol
(This used to be commit 14b88fefa0)
2007-10-10 14:19:02 -05:00
Andrew Tridgell
d01bbe6842 r18583: a nasty hack to allow me to monitor the number of open file
descriptors in smbd on all build farm machines. I suspect we have a fd
leak somewhere, but its hard to track down.

I know part of the problem is the number of (fake) network interfaces
we define in the build farm tests, with each of them listening on a
whole bunch of different protocol ports. That chews up around 48 file
descriptors just to startup. I don't think thats the real problem
though, and I suspect something else is leaking file descriptors on
some hosts.
(This used to be commit 83bf458ec9)
2007-10-10 14:18:51 -05:00
Andrew Tridgell
30ee8beb93 r18301: I discovered how to load the warnings from a build farm build into
emacs compile mode (hint, paste to a file, and compile as "cat
filename").

This allowed me to fix nearly all the warnings for a IA_64 SuSE build
very quickly.
(This used to be commit eba6c84eff)
2007-10-10 14:18:04 -05:00
Andrew Tridgell
1b5c28a627 r18211: wct is not a size, so don't use size_t
this should fix a pile of printf format warnings
(This used to be commit fe209e360e)
2007-10-10 14:17:50 -05:00
Jelmer Vernooij
0329d755a7 r17930: Merge noinclude branch:
* Move dlinklist.h, smb.h to subsystem-specific directories
 * Clean up ads.h and move what is left of it to dsdb/
   (only place where it's used)
(This used to be commit f7afa1cb77)
2007-10-10 14:16:54 -05:00
Stefan Metzmacher
a2eca9174c r17586: merge lib/netif into lib/socket and use -lnsl -lsocket on the
configure check for the interfaces.

should fix the build on some old sun boxes

metze
(This used to be commit f20e251bfd)
2007-10-10 14:15:39 -05:00
Stefan Metzmacher
2c4eece604 r17361: check that file handles are only accessable
by the correct session in the SMB frontend server

metze
(This used to be commit 8a5bc18c5a)
2007-10-10 14:15:19 -05:00
Stefan Metzmacher
c5148cd9cd r17360: add some comments
metze
(This used to be commit 3d849f9d25)
2007-10-10 14:15:19 -05:00
Stefan Metzmacher
7a845bcb01 r17341: pass a messaging context to auth_context_create()
and gensec_server_start().

calling them with NULL for event context or messaging context
is no longer allowed!

metze
(This used to be commit 679ac74e71)
2007-10-10 14:15:17 -05:00
Andrew Bartlett
34bf6f60af r17297: Some compilers don't seem to like the ;;
Andrew Bartlett
(This used to be commit f814fae400)
2007-10-10 14:15:07 -05:00
Stefan Metzmacher
1575743c36 r17283: use the async calls of auth_check_password() and gensec_update()
in the smb server.

metze
(This used to be commit 216e02c69c)
2007-10-10 14:15:06 -05:00
Stefan Metzmacher
9a067547ec r17280: NT_STATUS_INVALID_HANDLE maps to ERRbadfid, which is wrong in this
places, so only overwrite ERRbaduid and ERRinvnid when NTSTATUS support
is given.

metze
(This used to be commit c70edc3fb8)
2007-10-10 14:15:05 -05:00
Stefan Metzmacher
61d620012d r17274: fix typos
metze
(This used to be commit 699dee70aa)
2007-10-10 14:10:26 -05:00
Stefan Metzmacher
28b8ec0156 r17268: change the smb2 session setup to use the new gensec_update_send/recv() api
metze
(This used to be commit 14ecc56343)
2007-10-10 14:10:25 -05:00
Simo Sorce
9c66f601f1 r17206: Add a modular API for share configuration.
Commit the classic backwards compatible module which is the default one
(This used to be commit a89cc346b9)
2007-10-10 14:10:18 -05:00
Stefan Metzmacher
8075ce63fd r17084: implement SMB2 Cancel in the server,
that makes it possible for clients to cancel
async requests, like NOTIFY...

metze
(This used to be commit eaccd3c435)
2007-10-10 14:10:12 -05:00
Stefan Metzmacher
39b7ae11ac r17012: don't try to send any data when the socket is gone already...
(fixes crash bugs)

metze
(This used to be commit b7418aec33)
2007-10-10 14:10:08 -05:00
Stefan Metzmacher
669e5d0fab r17009: set the protocol version correct
metze
(This used to be commit 24ec382560)
2007-10-10 14:10:07 -05:00
Stefan Metzmacher
b73a3ad21b r16989: implement SMB2 Notify in the frontend
metze
(This used to be commit 156bd4620c)
2007-10-10 14:10:07 -05:00
Stefan Metzmacher
a8958391e8 r16980: - make struct smb_notify a union and add levels RAW_NOTIFY_NTTRANS,RAW_NOTIFY_SMB2
- parse SMB2 Notify reponse

metze
(This used to be commit de50e0ccdd)
2007-10-10 14:10:06 -05:00
Stefan Metzmacher
e6b29409a2 r16979: - ntcancel should compare TID,UID,MID and PID
- don't return ntcancel error, as we don't know how signing works
  for them

metze
(This used to be commit 20311e58d5)
2007-10-10 14:10:06 -05:00
Stefan Metzmacher
3b36a85798 r16950: remove the smb mid from the ntvfs layer and keep a list of pending
requests on the smbsrv_connection, to be able to match then on
ntcancel

metze
(This used to be commit 04f0d3d031)
2007-10-10 14:10:02 -05:00
Stefan Metzmacher
54fba07f01 r16923: remove unused substitude code
metze
(This used to be commit ea88c8c99e)
2007-10-10 14:10:01 -05:00
Stefan Metzmacher
5468516f9a r16918: the SMB2 Ioctls are sometimes called with a wildcard handle
the operation doesn't need a valid file handle in that case

metze
(This used to be commit d41a83d559)
2007-10-10 14:10:00 -05:00
Stefan Metzmacher
41992489d2 r16913: better return the same values as vista beta2
metze
(This used to be commit ae9c007324)
2007-10-10 14:09:59 -05:00
Stefan Metzmacher
ac857dcfed r16912: I messed up the numbers for ipc and print shares...
This caused vista beta2 to not do any rpc calls
against samba4

metze
(This used to be commit b42d918d56)
2007-10-10 14:09:59 -05:00
Stefan Metzmacher
29f3389fc0 r16911: the TID is only 32 bits...don't overwrite parts of the UID field
metze
(This used to be commit 7db393e5ea)
2007-10-10 14:09:59 -05:00
Stefan Metzmacher
627f49d8c9 r16910: - don't search the wildcard handle
(a handle with all bits set to 1 is justed for some
   SMB2 Ioctl calls...)
- don't crash if we didn't find the tcon

metze
(This used to be commit 27087818c7)
2007-10-10 14:09:58 -05:00
Stefan Metzmacher
eb75ecbccf r16889: implement SMB2 Ioctl in the frontend
metze
(This used to be commit 90b0ae53e4)
2007-10-10 14:09:56 -05:00
Stefan Metzmacher
a3797ff66a r16875: implement SMB2 Find in the frontend
metze
(This used to be commit 58bed7322c)
2007-10-10 14:09:56 -05:00
Stefan Metzmacher
e8b61d7cc8 r16872: when we know the data length we can preallocate the buffer
and avoid a realloc

metze
(This used to be commit 51d59d23a1)
2007-10-10 14:09:55 -05:00
Stefan Metzmacher
bb158b74da r16871: zero padding bytes
(found by valgrind)

metze
(This used to be commit 283bec8295)
2007-10-10 14:09:55 -05:00
Stefan Metzmacher
f0f7070ad7 r16870: copy over the status from the ntvfs request to the smb2 request
so that smb2srv_setup_reply() doesn't push uninitialized data
(found by valgrind)

metze
(This used to be commit 1a1fd2747d)
2007-10-10 14:09:55 -05:00
Stefan Metzmacher
cf901ad491 r16869: - if we know the blob length, we can preallocated the memory
and avoid a realloc in smb2_push_*
- don't overwrite the first data byte

metze
(This used to be commit 7761a2a595)
2007-10-10 14:09:55 -05:00
Stefan Metzmacher
af0a9eb529 r16834: split the level's of smb_search_first/smb_search_next and the levels
of smb_search_data

metze
(This used to be commit 78c201db8a)
2007-10-10 14:09:49 -05:00
Stefan Metzmacher
fbf566b777 r16815: split out search levels which are also used by smb2
metze
(This used to be commit 3b8ecc19fa)
2007-10-10 14:09:47 -05:00
Stefan Metzmacher
21af3847a6 r16740: just say the directory is empty
metze
(This used to be commit 6326bb901f)
2007-10-10 14:09:43 -05:00
Stefan Metzmacher
dd44e2415c r16738: vista beta2 use FILE_CLOSED as error for an invalid file handle
metze
(This used to be commit fa35ddcaf9)
2007-10-10 14:09:42 -05:00
Stefan Metzmacher
2400ebc428 r16735: vista beta2 reuses the tcp connect where it does the
SMB negprot

metze
(This used to be commit 3b2936a431)
2007-10-10 14:09:42 -05:00
Stefan Metzmacher
6acd9aed93 r16734: the 2 bytes after the opcode and before the flags,
is no padding...

the following patch is needed for vista beta2 to connect to samba4

metze
(This used to be commit 58baae8fc4)
2007-10-10 14:09:42 -05:00
Stefan Metzmacher
a18fc61d4f r16733: implement SMB2 SetInfo
metze
(This used to be commit 9b6f74778f)
2007-10-10 14:09:41 -05:00
Stefan Metzmacher
b20c00f718 r16732: use the given macros
metze
(This used to be commit 6d5c74c38c)
2007-10-10 14:09:41 -05:00
Stefan Metzmacher
2f60a2bc7a r16731: send a better error code, required for vista-beta2 client
metze
(This used to be commit a251e72206)
2007-10-10 14:09:41 -05:00
Stefan Metzmacher
63d0c5a057 r16708: the packet format of SMB2 SessionSetup has changed,
there're 8 more unknown bytes...

Note:
 - vista-CTP also support this as a server,
   but uses the old format as client
 - but vista-beta2 only uses and accept the new format

metze
(This used to be commit b3bdd4afde)
2007-10-10 14:09:40 -05:00
Stefan Metzmacher
bd0dcebe36 r16705: fix a bug found by valgrind...
as we setup the 1 padding byte for non present dynamic part,
we need to overwrite it when we're getting a real dynamic part,
so we need to remove the buf->size +=1 when we do the first
push to the dynamic part (when buf->dynamic is still but->body + buf->body_fixed)

metze
(This used to be commit f309209629)
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
d63dd113ae r16699: the layout of SMB2 Read and Write is identical...
so we know that the 9th bytes is just uninitialized padding

metze
(This used to be commit f97a21b970)
2007-10-10 14:09:39 -05:00
Stefan Metzmacher
4015b01088 r16671: allow usage of smbsrv_pull_passthru_sfileinfo() without,
a smbsrv_request given...

the RENAME level is not supported in this mode, but that will be fixed later

metze
(This used to be commit 058c6397a4)
2007-10-10 14:09:37 -05:00
Stefan Metzmacher
826597bfa8 r16670: try to match the vista error codes a bit more
metze
(This used to be commit 1a4978118d)
2007-10-10 14:09:37 -05:00
Stefan Metzmacher
bcc9e8af30 r16666: implement setting of security_descriptors via SMB2 SetInfo
metze
(This used to be commit 6908582f68)
2007-10-10 14:09:36 -05:00
Stefan Metzmacher
f8d8454461 r16621: split out passthru levels of setfileinfo
metze
(This used to be commit 6cd64cb78f)
2007-10-10 14:09:36 -05:00
Stefan Metzmacher
ca044dcd3a r16568: add parsing code for SMB2 SetInfo
metze
(This used to be commit 70cc992843)
2007-10-10 14:09:35 -05:00
Stefan Metzmacher
74fe06832a r16520: move smb2srv_break_recv back to fileio.c
metze
(This used to be commit cdee9b2168)
2007-10-10 14:09:31 -05:00
Stefan Metzmacher
98024a8125 r16467: implement SMB2 GetInfo server code
metze
(This used to be commit 49b5b3cd58)
2007-10-10 14:09:30 -05:00
Stefan Metzmacher
70eac2a274 r16466: for SMB2_ALL_EAS it's not valid for the ntvfs backends to return
0 eas, they should return an error:
NO_EAS_ON_FILE or NO_MORE_EAS

metze
(This used to be commit fdefec1de9)
2007-10-10 14:09:29 -05:00
Stefan Metzmacher
7bf085571e r16464: split client and server min/max protocol settings
metze
(This used to be commit 6164d1e22e)
2007-10-10 14:09:29 -05:00
Stefan Metzmacher
15de59549b r16457: fix typo
metze
(This used to be commit 049ddc8a96)
2007-10-10 14:09:16 -05:00
Stefan Metzmacher
74d58ab06f r16456: return on error...
metze
(This used to be commit 44ab067d14)
2007-10-10 14:09:16 -05:00
Stefan Metzmacher
2a3bcdb530 r16450: fix the build...
metze
(This used to be commit 316f3312d2)
2007-10-10 14:09:16 -05:00
Stefan Metzmacher
23803094e5 r16449: move some code to a generic place
metze
(This used to be commit 77a711c54a)
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
47a78861bc r16448: add more error checks
metze
(This used to be commit d6d86c65bf)
2007-10-10 14:09:15 -05:00
Stefan Metzmacher
0f29d9fb3f r16444: - split out qfsinfo passthru levels
- use 1 to 1 mapping of interface and wire levels

metze
(This used to be commit e7d339d496)
2007-10-10 14:09:14 -05:00
Stefan Metzmacher
2d88ade182 r16443: add push code for SMB2 levels
metze
(This used to be commit 142680ab9b)
2007-10-10 14:09:14 -05:00
Stefan Metzmacher
1ff99ba12d r16440: split out passthru level into a new functions,
so they can we reused for smb2 later

metze
(This used to be commit 42324c1f63)
2007-10-10 14:09:14 -05:00
Stefan Metzmacher
f8dc3bbf9f r16410: remove some warnings of talloc_steal() usage without target
I only commit this as this is used in a global macro

tridge: we should try to get rid of this warning without using
	(void)talloc_steal(ctx, ptr);
	everywhere!!!

metze
(This used to be commit 3f8ce6d680)
2007-10-10 14:09:13 -05:00
Stefan Metzmacher
1fd1e2ba58 r16407: add parsing code the SMB2 GetInfo in the server
metze
(This used to be commit c4755c83c6)
2007-10-10 14:09:13 -05:00
Stefan Metzmacher
818c52a6b4 r16403: remove dependency to smbsrv_request next part...
metze
(This used to be commit 708a5d3bf0)
2007-10-10 14:09:13 -05:00
Stefan Metzmacher
45c99a270e r16402: start to remove the dependecy to smbsrv_request from the parsing functions
metze
(This used to be commit e4a5e2db7f)
2007-10-10 14:09:12 -05:00
Stefan Metzmacher
7c01df4e77 r16401: keep the old pointer when realloc fails, this is needed for the
search callback

metze
(This used to be commit c868b8b7d7)
2007-10-10 14:09:12 -05:00
Stefan Metzmacher
898f6f768f r16400: add more error checks
metze
(This used to be commit 779c51ad52)
2007-10-10 14:09:12 -05:00
Stefan Metzmacher
59670b2f97 r16399: - split out pushing smb_fsinfo into a DATA_BLOB
- add error checks

metze
(This used to be commit 2aaca1631f)
2007-10-10 14:09:12 -05:00
Stefan Metzmacher
f03e039e88 r16357: - start get rid of void parsing functions
- there will more changes come but I want to do them in
  relative small chunks

metze
(This used to be commit d021a8b3ee)
2007-10-10 14:09:12 -05:00
Stefan Metzmacher
594ae8f9e1 r16023: we don't need a global variable here...
noticed by the Mac OS 10 linker

metze
(This used to be commit 5928112cbc)
2007-10-10 14:08:51 -05:00
Andrew Tridgell
92acfc0799 r15855: more talloc_set_destructor() typesafe fixes. nearly done ...
(This used to be commit 396d82a231)
2007-10-10 14:08:33 -05:00
Andrew Tridgell
03e7d37461 r15827: fixed a spelling error
(This used to be commit 801357af2e)
2007-10-10 14:08:29 -05:00
Stefan Metzmacher
184c28844d r15803: the SMB2 server gives NT_STATUS_NOT_FOUND instead of NT_STATUS_INVALID_HANDLE
metze
(This used to be commit aa98aad097)
2007-10-10 14:08:25 -05:00
Stefan Metzmacher
c51dfa7926 r15802: merge tridge's fix to the SMB2 server
metze
(This used to be commit 2ea15e9d28)
2007-10-10 14:08:24 -05:00
Andrew Tridgell
f6c9fbbc50 r15799: fixed the problem with BASE-DISCONNECT after the recent memory leak
was fixed
(This used to be commit 09a9c7fdff)
2007-10-10 14:08:22 -05:00
Andrew Tridgell
00e772d747 r15796: this talloc_reference() was causing a memory leak on every NTVFS
request. The problem is that the talloc_free() in
smbsrv_send_reply_nosign() frees this reference, but doesn't free the
memory iself, thus leaving it attached to the connection context.

Metze, what was the idea behind this reference? If we need it, then we
need a corresponding talloc_free() to go with it.
(This used to be commit 2e105a32c7)
2007-10-10 14:08:21 -05:00
Stefan Metzmacher
6ba94bb12f r15771: this should be a o32s32 blob
metze
(This used to be commit fdfa6dcc97)
2007-10-10 14:08:17 -05:00
Stefan Metzmacher
1911475976 r15770: when there's a dynamic body, we need to send the first byte even if the
dynamic size if 0

metze
(This used to be commit c7e8e79d75)
2007-10-10 14:08:16 -05:00
Stefan Metzmacher
e0dcbe8dd1 r15769: this functions belong to params/ so move it.
metze
(This used to be commit 9c4c40772b)
2007-10-10 14:08:16 -05:00
Stefan Metzmacher
e23cc70a72 r15760: - add RAW_READ_SMB2 => generic mapping
- Implement SMB2 Read

metze
(This used to be commit d0ac0c5af4)
2007-10-10 14:08:15 -05:00
Stefan Metzmacher
49012954d0 r15758: - handle RAW_FLUSH_SMB2 in the posix ntvfs backend
- Implement SMB2 Flush

metze
(This used to be commit 41d87ebe35)
2007-10-10 14:08:15 -05:00
Stefan Metzmacher
772c492840 r15757: - add RAW_WRITE_SMB2 => generic mapping
- implement SMB2 Write

metze
(This used to be commit 5ab6f304f8)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
183fb2bd4b r15754: - implement SMB2 Close
- add RAW_CLOSE_SMB2 generic mapping

metze
(This used to be commit 41bc3cfc82)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
c2c5f78f11 r15753: implement SMB2 Create
metze
(This used to be commit 65b67a8af6)
2007-10-10 14:08:14 -05:00
Stefan Metzmacher
3cb64219e2 r15751: thanks to talloc_get_type() I noticed that I used smbsrv_request in the smb2srv code
metze
(This used to be commit 6c304a1a5f)
2007-10-10 14:08:13 -05:00
Stefan Metzmacher
476a6253a6 r15749: - pass in a dummy oplock callback
- pass in SMB2 ntvfs_handle callbacks

metze
(This used to be commit 338aee88d4)
2007-10-10 14:08:13 -05:00
Stefan Metzmacher
7442613a53 r15748: - implement SMB2 TreeConnect server code
TODO: pass in oplock and handle callbacks, but as we don't do file access
      yet, it's no problem to skip them

metze
(This used to be commit 4ae4a742fc)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
7930ae6a70 r15747: move some functions to the protocol independend part of the
smb server

metze
(This used to be commit 79af05551f)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
607e97bef0 r15746: - reorder elements of smb2srv_request
- move SMB2 specific elements to the end

metze
(This used to be commit 7d2087bd1b)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
e9cf630ec7 r15745: - reorder the elements of smbsrv_request
- move the SMB specific elements to the end

metze
(This used to be commit 0be887c7c6)
2007-10-10 14:08:12 -05:00
Stefan Metzmacher
44dc58fe16 r15743: use union smb_tcon
metze
(This used to be commit 012a08cfb9)
2007-10-10 14:08:11 -05:00
Stefan Metzmacher
681a7f21e2 r15742: use union smb_sessetup
metze
(This used to be commit de7e856a46)
2007-10-10 14:08:11 -05:00
Stefan Metzmacher
e306c5bf12 r15741: move smb2 request structures into the main smb request structs
as new levels

metze
(This used to be commit 9180635317)
2007-10-10 14:08:11 -05:00
Stefan Metzmacher
add9d49dbb r15739: return False when the function is called with an invalid level
metze
(This used to be commit fc20e4154a)
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
9ef33f5f5c r15734: This is a major change to the NTVFS subsystem:
- to use a struct ntvfs_handle instead of a uint16_t fnum.
  (to make it independend from the frontend protocol)
- the allocation of handles now is provided by the frontend
  (smbsrv_*) via callbacks and not by each backend module
- this also makes sure that file handles are only passed
  to the ntvfs subsystem when the tcon and session matches,
  so modules can rely on this and need to check this.
- this allows multiple modules in the ntvfs module chain
  to allocate file handles. This can be used for virtual
  files like "\\$Extend\\$Quota:$Q:$INDEX_ALLOCATION"...
- also this will make SMB2 with 128 bit file handles possible

metze
(This used to be commit 287fc1c22d)
2007-10-10 14:08:10 -05:00
Stefan Metzmacher
7f0e17e903 r15718: - split the SMBflush with the 0xFFFF wildcard fnum into a different level
metze
(This used to be commit 95bf41b4d4)
2007-10-10 14:08:09 -05:00
Stefan Metzmacher
4c5a67fa35 r15715: add my copyright
metze
(This used to be commit a3799771c8)
2007-10-10 14:08:08 -05:00
Stefan Metzmacher
82fd602cf0 r15714: fix async handling of ntioctl calls and push the DATA_BLOB into the reply
metze
(This used to be commit 0ac9a49f42)
2007-10-10 14:08:08 -05:00
Stefan Metzmacher
5445415b82 r15711: - make use of nttrans_setup_reply()
metze
(This used to be commit a870c084f6)
2007-10-10 14:08:08 -05:00
Stefan Metzmacher
2adbcc3965 r15710: - we no longer need to set the nttrans out fields to zero
in the backends
- some whitespace cleanups

metze
(This used to be commit 6a0c24c73e)
2007-10-10 14:08:07 -05:00
Stefan Metzmacher
0fc977c54d r15709: - return an error is better than ignoring a non supported request
- zero nttrans output fields before calling the backends

metze
(This used to be commit b21d98a875)
2007-10-10 14:08:07 -05:00
Stefan Metzmacher
a3cc3c9c1f r15708: setup count is 8bit and param_count and data_count are 32bit
metze
(This used to be commit 6bc89b422c)
2007-10-10 14:08:07 -05:00
Stefan Metzmacher
5ff4b74df3 r15656: for NT IOCTL's we need to control the max_data field for some calls
metze
(This used to be commit 3cab02f6f5)
2007-10-10 14:08:04 -05:00
Stefan Metzmacher
410fb90322 r15640: - NT IOCTL calls also have an 'in' data_blob
- fix the receive code of NT IOCTL's we only need the NTTRANS data payload
  not the SMB payload here

metze
(This used to be commit 358d03143f)
2007-10-10 14:07:25 -05:00
Stefan Metzmacher
5761c59ef7 r15535: fix the build
metze
(This used to be commit 297868325f)
2007-10-10 14:05:55 -05:00
Stefan Metzmacher
bd6dd99eb9 r15533: with this vista does a fine SMB2 TreeConnect against samba4
metze
(This used to be commit 6c920d21a1)
2007-10-10 14:05:54 -05:00
Stefan Metzmacher
dc86ab3e45 r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0
also if the dynamic flag should be set

metze
(This used to be commit 7829100e1e)
2007-10-10 14:05:54 -05:00
Jelmer Vernooij
806c5c9621 r15371: Revert some of my previous patch as it was breaking the plain build
(This used to be commit fac9871122)
2007-10-10 14:05:28 -05:00
Jelmer Vernooij
47bf79eac5 r15370: Fix more dependencies for shared libs
(This used to be commit 9a518661fb)
2007-10-10 14:05:27 -05:00
Jelmer Vernooij
0199eac20d r15314: Fix recursive dependency hack for static libs. Should fix the build
on most systems.
(This used to be commit c0ab0f4ed4)
2007-10-10 14:05:09 -05:00
Jelmer Vernooij
9220144604 r15313: Fix some dependencies in dso mode
(This used to be commit f0afe9e2ff)
2007-10-10 14:05:09 -05:00
Jelmer Vernooij
bc141c7957 r15304: Fix smbd build, more updates on getting --enable-dso to build again
(This used to be commit 3ef9326386)
2007-10-10 14:05:08 -05:00
Jelmer Vernooij
b00c236906 r15301: Use static libraries internally. This required a few hacks in the build
system - these should be removed later on.
(This used to be commit 0654739166)
2007-10-10 14:05:07 -05:00
Jelmer Vernooij
69b51f702a r15207: Introduce PRIVATE_DEPENDENCIES and PUBLIC_DEPENDENCIES as replacement
for REQUIRED_SUBSYSTEMS.
(This used to be commit adc8a019b6)
2007-10-10 14:04:18 -05:00
Jelmer Vernooij
0eddf14b30 r15191: Avoid uint_t as it's not standard.
(This used to be commit 7af59357b9)
2007-10-10 14:04:15 -05:00
Jelmer Vernooij
a454456820 r14997: Fix build of static libraries. Libraries build fine now, but linking doesn't
work yet.
(This used to be commit d3106699db)
2007-10-10 14:03:59 -05:00
Andrew Tridgell
09a6f728a3 r14937: fix a crash that can be caused by a notify triggering during a share
disconnect
(This used to be commit 85d70f1c15)
2007-10-10 14:00:19 -05:00
Andrew Tridgell
11963877ab r14807: fixed the format of notify responses (forgot to commit this earlier)
(This used to be commit fb91a37e92)
2007-10-10 13:59:22 -05:00
Stefan Metzmacher
316269a075 r14739: keep the last request time for the smbsrv_connection,
smbsrv_session and smbsrv_tcon for management tools

metze
(This used to be commit 2c87f210e9)
2007-10-10 13:59:18 -05:00
Stefan Metzmacher
ad06a8bd65 r14736: - the ntvfs subsystem should not know about smb_server.h
- the process module subsystem should not know about smb_server.h
- the smb_server module should not know about process models

metze
(This used to be commit bac95bb8f4)
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
b983fd949b r14733: SMBtdis needs a TCON and doesn't need a SESSION,
on an invalid tcon it gives NT_STATUS_DOS(ERRSRV, ERRinvnid)

metze
(This used to be commit fca74f2a4b)
2007-10-10 13:59:17 -05:00
Stefan Metzmacher
1f2d8319bd r14647: be a bit less verbose on common stuff
metze
(This used to be commit 9f9240d118)
2007-10-10 13:59:04 -05:00
Stefan Metzmacher
d72632ba08 r14644: fix SMBecho, used by w2k clients, failing this,
causes an SMBulogoffX and SMBtdis

jelmer: I think this should go into TP2

metze
(This used to be commit 94d775c74d)
2007-10-10 13:59:04 -05:00
Stefan Metzmacher
8ae3773bc4 r14638: we need to call smbsrv_setup_reply() before using smbsrv_setup_error()
tridge: can you please check if the whole function ok?

jelmer: this fixes a crash bug, when asking for Security Descriptors
        and should be in the TP2

metze
(This used to be commit b5edcde793)
2007-10-10 13:59:03 -05:00
Jelmer Vernooij
35349a58df r14542: Remove librpc, libndr and libnbt from includes.h
(This used to be commit 51b4270513)
2007-10-10 13:58:42 -05:00
Stefan Metzmacher
61fa658ebc r14541: separate smbsrv_request and ntvfs_request,
with this it's now possible to write a
ntvfs_test programm like the vfstest in samba3

also smb2 support will be possible later

metze
(This used to be commit 7253153691)
2007-10-10 13:58:41 -05:00
Andrew Tridgell
9225c02aee r14539: get rid of a pointless union layer in struct smb_notify
(This used to be commit 1e1c559381)
2007-10-10 13:58:41 -05:00
Stefan Metzmacher
027208806f r14538: ok, I have better used make valgrindtest my self...
the 3 bytes for WordCount and ByteCount are included in MIN_SMB_SIZE...

metze
(This used to be commit 4ff3fb35e8)
2007-10-10 13:58:41 -05:00
Stefan Metzmacher
8437d5b891 r14526: fix the size of the output buffer, we need 1 byte for the Word count
now smbsrv_setup_reply() and req_setup_chain_reply() do the same thing

tridge: can you please check if this is correct,
        I wonder why we don't got valgrind errors...
	as the over allocation is disabled currently

metze
(This used to be commit 3441a4a74f)
2007-10-10 13:57:37 -05:00
Stefan Metzmacher
d7254a3615 r14523: make async search request possible
metze
(This used to be commit f130632dc5)
2007-10-10 13:57:36 -05:00
Jelmer Vernooij
5b0051e032 r14511: Install more headers
(This used to be commit e1f896948f)
2007-10-10 13:57:35 -05:00
Stefan Metzmacher
66b2ed2866 r14504: make trans and trans2 able to use async ntvfs backends
tridge: can you review this please

metze
(This used to be commit f2e9b2c3a2)
2007-10-10 13:57:35 -05:00
Andrew Bartlett
bae6672ea9 r14502: Supply both needed arguments for the backend logoff processing.
This should fix the segfaults on the build farm.

Metze: please check

Andrew Bartlett
(This used to be commit fb927a7117)
2007-10-10 13:57:35 -05:00
Stefan Metzmacher
d3087451c4 r14487: split smbsrv_request into two parts, one will be moved to ntvfs_request
but I don't to get the commit to large, to I'll do this tomorrow...

metze
(This used to be commit 10e627032d)
2007-10-10 13:57:32 -05:00
Stefan Metzmacher
3948fcac49 r14485: mark smb commands as need session and need tcon explicit,
so we only need to check in one global place and can't forget
in other places...

metze
(This used to be commit 742be8e075)
2007-10-10 13:57:31 -05:00
Jelmer Vernooij
8528016978 r14464: Don't include ndr_BASENAME.h files unless strictly required, instead
try to include just the BASENAME.h files (containing only structs)
(This used to be commit 3dd477ca51)
2007-10-10 13:57:27 -05:00
Stefan Metzmacher
2e7df84576 r14456: don't access the smbsrv_tcon inside the ntvfs modules
metze
(This used to be commit 5709c1c4e1)
2007-10-10 13:57:26 -05:00
Stefan Metzmacher
5555e28cab r14447: remove unused stuff
metze
(This used to be commit 4df843658f)
2007-10-10 13:57:26 -05:00
Jelmer Vernooij
e3f2414cf9 r14380: Reduce the size of structs.h
(This used to be commit 1a16a6f1df)
2007-10-10 13:57:16 -05:00
Stefan Metzmacher
a1b295ed48 r14256: - rename smb_file -> smb_handle
- move it into the in/out substructs again
- allow file.path only on smb_fileinfo/smb_setfileinfo

metze
(This used to be commit be6d5298a2)
2007-10-10 13:57:06 -05:00
Andrew Tridgell
7f0c7702f6 r14208: removed use of req->flags2 inside the ntvfs layer. This should help
metze on his quest to unify the ntvfs strucures for the smb and smb2
servers. The only place we needed flags2 inside ntvfs was for the
FLAGS2_READ_PERMIT_EXECUTE bit, which only affects readx, so I added a
readx.in.read_for_execute flag instead.
(This used to be commit b78abbbce6)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
32b0bb64bc r14205: move smb specific stuff out of includes.h (finally!!!:-)
all this changes really help ccache to speed up the samba4 build:-)

metze
(This used to be commit 180a79d103)
2007-10-10 13:57:03 -05:00
Stefan Metzmacher
307e43bb56 r14173: change smb interface structures to always use
a union smb_file, to abtract
- const char *path fot qpathinfo and setpathinfo
- uint16_t fnum for SMB
- smb2_handle handle for SMB2

the idea is to later add a struct ntvfs_handle *ntvfs
so that the ntvfs subsystem don't need to know the difference between SMB and SMB2

metze
(This used to be commit 2ef3f59709)
2007-10-10 13:56:57 -05:00
Stefan Metzmacher
86497db611 r14157: - pass a struct ntvfs_request to the ntvfs layer
(for now we just do #define ntvfs_request smbsrv_request,
   but it's the first step...)
- rename ntvfs_openfile() -> ntvfs_open()
- fix the talloc hierachie in some places in the ntvfs_map_*() code

metze
(This used to be commit ed9ed1f48f)
2007-10-10 13:56:55 -05:00
Andrew Tridgell
9259790df7 r14142: fixed ascii padding of nttrans create in server too
(This used to be commit 2cd4cd1674)
2007-10-10 13:56:54 -05:00
Stefan Metzmacher
bfcaa4000e r14096: setup a service task for smbsrv and dcesrv
metze
(This used to be commit 7ad522c7ac)
2007-10-10 13:56:50 -05:00
Stefan Metzmacher
651ca6553e r14079: I just found the setproctitle library from alt linux:-)
- add set_title hook to the process models
- use setproctitle library in process_model standard if available
- the the title for the task servers and on connections

metze
(This used to be commit 526f20bbec)
2007-10-10 13:56:49 -05:00
Stefan Metzmacher
1d495bc269 r14041: be a bit less verbose
metze
(This used to be commit 67a42a8097)
2007-10-10 13:52:38 -05:00
Andrew Tridgell
db45433f31 r14016: use type safe talloc when constructing operation structures in smb server
(This used to be commit 78dd6b3e0c)
2007-10-10 13:52:37 -05:00
Andrew Tridgell
276162cc9d r14013: added construction of the notify reply buffer in the nttrans server
code

the RAW-NOTIFY test now passes against the CIFS backend
(This used to be commit e03a2e2de2)
2007-10-10 13:52:36 -05:00
Andrew Tridgell
418befec18 r14011: - added a ntvfs_notify op to allow backends to support change notify
- converted the nttrans server side code to be async (needed for change notify)

This is the start of some work on supporting change notify via a new
approach. More soon.
(This used to be commit 0ad70bfd83)
2007-10-10 13:52:36 -05:00
Jelmer Vernooij
ceb6e9717b r13960: Generate makefile rules for installing/removing shared modules.
(This used to be commit 2c74698032)
2007-10-10 13:52:32 -05:00
Stefan Metzmacher
0de1ad5ae6 r13937: fix the build
metze
(This used to be commit 7aabff8298)
2007-10-10 13:52:28 -05:00
Jelmer Vernooij
9bd7dd9121 r13926: More header splitups.
(This used to be commit 930daa9f41)
2007-10-10 13:52:26 -05:00
Jelmer Vernooij
4ac2be9958 r13924: Split more prototypes out of include/proto.h + initial work on header
file dependencies
(This used to be commit 1228358767)
2007-10-10 13:52:24 -05:00
Andrew Bartlett
107f7b9efa r13911: Make these debug messages clearer.
(This used to be commit 9c8350c64b)
2007-10-10 13:52:23 -05:00
Stefan Metzmacher
edd5b847bc r13877: remove smbsrv_send_dos_error() and use smbsrv_send_error(..,NT_STATUS_DOS())
metze
(This used to be commit 60d7920527)
2007-10-10 13:52:19 -05:00
Stefan Metzmacher
8d91f3dec0 r13872: fix typo
metze
(This used to be commit f28fb440d5)
2007-10-10 13:52:19 -05:00
Stefan Metzmacher
a0e66eac7d r13870: prefix more functions with smbsrv_
metze
(This used to be commit e6275db7b9)
2007-10-10 13:52:19 -05:00
Stefan Metzmacher
0533fed85a r13868: remove useless talloc_free() wrapper
metze
(This used to be commit bd3162e6a7)
2007-10-10 13:52:19 -05:00
Stefan Metzmacher
354a61fc91 r13866: prefix more functions with smbsrv_
metze
(This used to be commit bb083f17c9)
2007-10-10 13:52:18 -05:00
Stefan Metzmacher
b58f6e543d r13865: prefix functions with smbsrv_
metze
(This used to be commit 2af9663275)
2007-10-10 13:52:18 -05:00
Stefan Metzmacher
c14e675260 r13863: this can be static...
metze
(This used to be commit ab659d8ee0)
2007-10-10 13:52:18 -05:00
Stefan Metzmacher
5991787ce6 r13862: rename chain_reply -> smbsrv_chain_reply
metze
(This used to be commit 497b219c7d)
2007-10-10 13:52:18 -05:00
Stefan Metzmacher
d8503c6ba1 r13860: - add support for SMB2 ("SMB 2.001") negotiation in SMB negprot requests
- the default max protocol is still NT1

metze
(This used to be commit d1bae931b3)
2007-10-10 13:52:17 -05:00
Stefan Metzmacher
1bff329dff r13858: - use req_pull_ascii4() instead of doing strlen() on client provided buffers
- also terminate the connection if we don't support any protocol the client
  provides

metze
(This used to be commit 7f2a6cfd6f)
2007-10-10 13:52:17 -05:00
Stefan Metzmacher
98aa64fa34 r13857: add "Windows for Workgroups 3.1a" support to the server
metze
(This used to be commit 58af0acafd)
2007-10-10 13:52:17 -05:00
Andrew Tridgell
72d8e34ddc r13856: fixed a misleading comment
(This used to be commit af6606fe98)
2007-10-10 13:52:17 -05:00
Jelmer Vernooij
dfc517b053 r13658: More moving around of files:
- Collect the generic utility functions into a lib/util/ (a la GLib is
		for the GNOME folks)
 - Remove even more files from include/
(This used to be commit ba62880f5b)
2007-10-10 13:52:05 -05:00
Stefan Metzmacher
36098dfda9 r13620: initialize the CMD with 0 too
metze
(This used to be commit 7cf1423bc8)
2007-10-10 13:52:01 -05:00
Andrew Bartlett
941c1566e5 r13403: Try to better handle a case where SPNEGO isn't available (allow us to
emulate the behaviour of XP standalone if required).

Andrew Bartlett
(This used to be commit 7f821097fb)
2007-10-10 13:51:53 -05:00
Andrew Bartlett
086655dcb6 r13204: Remove extra newline we don't need.
Andrew Bartlett
(This used to be commit 765caa14b3)
2007-10-10 13:51:33 -05:00
Andrew Bartlett
f55ea8bb3d r12804: This patch reworks the Samba4 sockets layer to use a socket_address
structure that is more generic than just 'IP/port'.

It now passes make test, and has been reviewed and updated by
metze. (Thankyou *very* much).

This passes 'make test' as well as kerberos use (not currently in the
testsuite).

The original purpose of this patch was to have Samba able to pass a
socket address stucture from the BSD layer into the kerberos routines
and back again.   It also removes nbt_peer_addr, which was being used
for a similar purpose.

It is a large change, but worthwhile I feel.

Andrew Bartlett
(This used to be commit 88198c4881)
2007-10-10 13:49:57 -05:00
Jelmer Vernooij
5c8447773f r12801: Some more include/ cleanups (remove unused macros + move files
to specific dirs)
(This used to be commit 243cf760b0)
2007-10-10 13:49:57 -05:00
Stefan Metzmacher
db04cffbbf r12725: some minor updates
metze
(This used to be commit f2e97983f2)
2007-10-10 13:49:45 -05:00
Jelmer Vernooij
63d718e243 r12696: Reduce the size of include/structs.h
(This used to be commit 6391761601)
2007-10-10 13:49:40 -05:00
Jelmer Vernooij
78c50015bb r12694: Move some headers to the directory of the subsystem they belong to.
(This used to be commit c722f665c9)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
d4de4c2d21 r12608: Remove some unused #include lines.
(This used to be commit 70e7449318)
2007-10-10 13:49:03 -05:00
Jelmer Vernooij
2cd5ca7d25 r12542: Move some more prototypes out to seperate headers
(This used to be commit 0aca5fd513)
2007-10-10 13:47:55 -05:00
Jelmer Vernooij
0a3c167f6b r12528: Add seperate proto headers for ntvfs, tdr, smb_server and nbt_server.
(This used to be commit 87f665a1d5)
2007-10-10 13:47:51 -05:00
Jelmer Vernooij
d8e35f8828 r12498: Eliminate INIT_OBJ_FILES and ADD_OBJ_FILES. We were not using
the difference between these at all, and in the future the
fact that INIT_OBJ_FILES include smb_build.h will be sufficient to
have recompiles at the right time.
(This used to be commit b24f2583ed)
2007-10-10 13:47:45 -05:00
Stefan Metzmacher
e246a06751 r12126: get rid of the local ->terminate hacks, we do that genericly now
metze
(This used to be commit a7baf165c1)
2007-10-10 13:47:12 -05:00
Stefan Metzmacher
344703bfc0 r12115: bring SMB sesssetup_spnego in sync with SMB2 sesssetup
metze
(This used to be commit 99cf7dbb17)
2007-10-10 13:47:10 -05:00
Stefan Metzmacher
3edfa552a2 r12113: in SMB2 we should only allocate a new session
when the client sends UID = 0, otherwise we return
NT_STATUS_USER_SESSION_DELETED

metze
(This used to be commit 15973be48e)
2007-10-10 13:47:10 -05:00
Stefan Metzmacher
273f340376 r12102: for SMB2 we need to allocate tcons per session
metze
(This used to be commit 4d527ac005)
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
6b1ee03c53 r12095: the most SMB2 opcodes need a valid session and tcon,
metze
(This used to be commit 40b301c6bd)
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
05bfa9ad86 r12094: - implement dummy smb2srv_tcon()
- implement smb2srv_tdis()

metze
(This used to be commit cb9ddf7997)
2007-10-10 13:47:08 -05:00
Stefan Metzmacher
41c575729f r12093: add missing file
metze
(This used to be commit 1506be37db)
2007-10-10 13:47:08 -05:00
Stefan Metzmacher
2634f22bfc r12092: - add dummy functions for the missing SMB2 opcodes
- implement keepalive and logoff

metze
(This used to be commit 859ab627f4)
2007-10-10 13:47:08 -05:00
Stefan Metzmacher
e5adca67f2 r12091: the SMB2 specific level are not available via SMB
(get rid of the compiler warnings)

metze
(This used to be commit 436c5127ef)
2007-10-10 13:47:08 -05:00
Andrew Tridgell
67d0bb8dc7 r12082: fixed a valgrind error found by kukks in the transs server handling
(This used to be commit 5c81986bff)
2007-10-10 13:47:06 -05:00
Andrew Bartlett
759bda2962 r11992: Potentially allow SPNEGO to be disabled (as occours on WinXP
standalone), and use only NTLMSSP.

(But doing so would break Samba3's client).

Andrew Bartlett
(This used to be commit e74ca624e7)
2007-10-10 13:46:56 -05:00
Tim Potter
b9b59fa798 r11968: More warning fixes. We're on track to getting to double digits for
the number of warnings generated now.
(This used to be commit d479f2d760)
2007-10-10 13:46:52 -05:00
Tim Potter
03d301ead5 r11967: Fix more 64-bit warnings.
(This used to be commit 9c4436a124)
2007-10-10 13:46:52 -05:00
Stefan Metzmacher
910d61bcd1 r11789: - add the start of a SMB2 server
- it does Negprot and SessionSetup yet
  the rest returns NT_STATUS_NOT_IMPLEMENTED
- it's off by default, enable with:
  smbsrv:enable smb2 = yes
- negotition in the SMB Negprot isn't supported yet
- it's only tested with smbtorture SMB2-CONNECT
  not with vista as client

metze
(This used to be commit 08b31d5f61)
2007-10-10 13:46:28 -05:00
Stefan Metzmacher
764dd6027b r11788: remove unused header files
metze
(This used to be commit 27a2615876)
2007-10-10 13:46:27 -05:00
Stefan Metzmacher
0e6cef55c3 r11787: add missing file
metze
(This used to be commit d74f333a84)
2007-10-10 13:46:27 -05:00
Stefan Metzmacher
6d34ab056f r11786: move all SMB protocol specific stuff to smb_server/smb/
metze
(This used to be commit 5fea278cb6)
2007-10-10 13:46:27 -05:00
Stefan Metzmacher
da4afcb118 r11785: rename conn.c into tcon.c
metze
(This used to be commit eba4f6b706)
2007-10-10 13:46:27 -05:00
Stefan Metzmacher
ab33c314a4 r11783: - make the VIUD field in smbsrv_session 64bit, as SMB2 needs it
- add an idtree_limit to limit the max VUID we give the clients
  it's UINT16_MAX (0xffff) for the SMB protocol
- add auth_time to the smbsrv_session statistics
- use the session_info as marker for finished and non-finished
  session setups

metze
(This used to be commit 7eb10048b2)
2007-10-10 13:46:26 -05:00
Stefan Metzmacher
3f968be9d5 r11782: - make the TID 32bit in the smbsrv_tcon structure, as SMB2 uses
them
- add a idtree_limit to the tcons substructure of smbsrv_connection
  this controls what the highest TID is we give away to the client
  it's UINT16_MAX (0xFFFF) for the SMB protocol

metze
(This used to be commit f3bf5a2c09)
2007-10-10 13:46:26 -05:00
Stefan Metzmacher
509be8d902 r11781: rename tree to tcons to match the sessions substructure of smbsrv_connection
metze
(This used to be commit acd3e644e0)
2007-10-10 13:46:26 -05:00
Stefan Metzmacher
4f10246cac r11778: - remove unused memory contexts as req is already the temporary context for the current request
- just use '0', I'll remove the UID_FIELD_INVALID macro completly later
- why search for the session we have just create
- add TODO notices, I need to dicuss them with abartlet...

metze
(This used to be commit 4bceb94749)
2007-10-10 13:46:25 -05:00
Stefan Metzmacher
799724aae7 r11774: - move SMB specific initialisation of the smbsrv_connection out of smb_server.c
- add a generic incoming packet handler, which handles the first incoming packet
  and passes to the protocol specifc packet handler

metze
(This used to be commit f89deac1cb)
2007-10-10 13:46:25 -05:00
Stefan Metzmacher
58bf4b160e r11759: fix up the SEC_SHARE handling, when we want to support that later
we need to fake a smbsrv_session for each smbsrv_tcon...

metze
(This used to be commit 5b5fb17720)
2007-10-10 13:46:24 -05:00
Stefan Metzmacher
ace255a54b r11757: make smb_server.c independent from the protocol
metze
(This used to be commit b606d5664d)
2007-10-10 13:46:23 -05:00
Stefan Metzmacher
27b9d5652e r11746: revert my last commits, I now understand how we decide between
finished and non-finished sessions

metze
(This used to be commit 7cf6b307bc)
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
5c35b41b87 r11745: one more check for a valid session
metze
(This used to be commit 92aae176fb)
2007-10-10 13:46:21 -05:00
Stefan Metzmacher
dae30e5b50 r11744: make sure the session is completed authenticated!!!
metze
(This used to be commit 0383218a00)
2007-10-10 13:46:20 -05:00
Stefan Metzmacher
7dd6e5fe92 r11724: - move checks packet size and protocol version,
before we create the request structure
- move code into one function

metze
(This used to be commit 96345b1c46)
2007-10-10 13:46:18 -05:00
Andrew Tridgell
614950aed3 r11713: separate out the setting of the fde in the packet context from the
enabling of packet serialisation
(This used to be commit 6a47cd65a8)
2007-10-10 13:46:17 -05:00
Stefan Metzmacher
92b9b83b70 r11650: - as every call that goes down to the ntvfs layer need a valid tcon and session
ntcancel also needs to have AS_USER
- move the SIGNING_NO_REPLY logic as global option, because this needs to be set
  for the error replies too.
- as we currently don't know how to generate signatures for ntcancel replies
  we just skip the sending of the reply
- w2k3 first checks the VUID and then the TID, so we do now
- ntcreateX also uses ERRbaduid when getting a wrong VUID

metze
(This used to be commit d677ebf43d)
2007-10-10 13:46:08 -05:00
Stefan Metzmacher
ca403dd4c6 r11646: fix typos
metze
(This used to be commit 0c520e19a0)
2007-10-10 13:46:07 -05:00
Stefan Metzmacher
0b6370ea27 r11643: fix compiler warnings
metze
(This used to be commit 913d5356eb)
2007-10-10 13:46:07 -05:00
Stefan Metzmacher
bd7525e1b4 r11641: remove unused parameter vuid
metze
(This used to be commit 9399e4d260)
2007-10-10 13:46:05 -05:00
Stefan Metzmacher
389f9dff29 r11640: just a nicer format, and make adding more special cases easier
metze
(This used to be commit 5fb5d1a864)
2007-10-10 13:46:05 -05:00
Stefan Metzmacher
a2d2128b8a r11637: we need a session and a tcon for ntioctl() and ntrename()
metze
(This used to be commit 3389544c2b)
2007-10-10 13:46:03 -05:00
Andrew Tridgell
b8f4d22ab5 r11621: some minor fixes from comments by metze
(This used to be commit 6ab8082234)
2007-10-10 13:45:59 -05:00
Andrew Tridgell
5c620048e3 r11607: switched the smb server to use the generic packet send code
(This used to be commit 9eee7bafa1)
2007-10-10 13:45:58 -05:00
Andrew Tridgell
7e963eb6e7 r11603: converted the smb server to use the new generic packet code
(This used to be commit 0fc496bb6f)
2007-10-10 13:45:57 -05:00
Andrew Bartlett
3dc75cc84f r11367: Ensure to intialise the new logon_parameters (0 for session setups).
Andrew Bartlett
(This used to be commit abff53b633)
2007-10-10 13:45:26 -05:00
Jelmer Vernooij
4c5a4a7e02 r11244: Relative path names in .mk files
(This used to be commit 24e1030090)
2007-10-10 13:45:06 -05:00
Jelmer Vernooij
f4d590662e r11214: Remove scons files (see http://lists.samba.org/archive/samba-technical/2005-October/043443.html)
(This used to be commit 7fffc5c917)
2007-10-10 13:45:03 -05:00
Andrew Bartlett
372ca26b20 r11200: Reposition the creation of the kerberos keytab for GSSAPI and Krb5
authentication.  This pulls the creating of the keytab back to the
credentials code, and removes the special case of 'use keberos keytab
= yes' for now.

This allows (and requires) the callers to specify the credentials for
the server credentails to GENSEC.  This allows kpasswdd (soon to be
added) to use a different set of kerberos credentials.

The 'use kerberos keytab' code will be moved into the credentials
layer, as the layers below now expect a keytab.

We also now allow for the old secret to be stored into the
credentials, allowing service password changes.

Andrew Bartlett
(This used to be commit 205f77c579)
2007-10-10 13:45:00 -05:00
Volker Lendecke
929de6af34 r11120: calling_name is used later in sesssetup_nt1, so hang the names to the right
talloc context.

Volker
(This used to be commit 256cf928d7)
2007-10-10 13:44:53 -05:00
Andrew Bartlett
18bb363537 r10946: Use the right name for the remote workstation, and always initialise it.
Should fix a valgrind error volker is seeing.

Andrew Bartlett
(This used to be commit 11957c5f37)
2007-10-10 13:39:44 -05:00
Jelmer Vernooij
4abb479761 r10588: Remove more unused files, macros
(This used to be commit d2f80c0457)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
5058f4b9e8 r10586: Add MergedObject() builder. Default to Library() rather
then StaticLibrary()
(This used to be commit b53313dc51)
2007-10-10 13:39:08 -05:00
Jelmer Vernooij
49839f356f r10513: Reduce some use of pstring. The main reason some parts of the code still
use pstring is next_token() now.
(This used to be commit a5b88bcd42)
2007-10-10 13:38:58 -05:00
Jelmer Vernooij
6812c73534 r10348: Add scons scripts for remaining subsystems. Most subsystems build now,
but final linking still fails (as does generating files asn1, et, idl and proto
files)
(This used to be commit 4f0d7f75b9)
2007-10-10 13:38:30 -05:00
Tim Potter
2082695e2e r10256: Fix some unhandled enumeration warnings. There's one still left,
RAW_SEARCH_UNIX_INFO find_fill_info(), which I think is a bug.
(This used to be commit 5f1cd6382c)
2007-10-10 13:38:12 -05:00
Alexander Bokovoy
1e59a8a24f r9321: Fix potential bug found by Coverity. src_len has to be int but later we do pass it as size_t. In case src_len is negative, we need to register a failure and return to the caller
(This used to be commit 95d96c79a5)
2007-10-10 13:33:24 -05:00
Andrew Tridgell
1f467c50d9 r8893: fixed the valgrind error on stream termination due to prototol errors
(This used to be commit cf1a7bbe96)
2007-10-10 13:30:15 -05:00
Jelmer Vernooij
6553dd0c60 r8811: Fix the build..
(This used to be commit fac77f5fa2)
2007-10-10 13:30:07 -05:00
Andrew Bartlett
42287c6f97 r8706: My previous patch oversimplied the previous change to session setup -
we didn't cope with the 'anonymous NTLM under SPNEGO' login.

Andrew Bartlett
(This used to be commit c3cc14542e)
2007-10-10 13:29:56 -05:00
Andrew Bartlett
b16362fab6 r8700: Propmted by tridge's need to do plaintext auth in ejs, rework the
user_info strcture in auth/

This moves it to a pattern much like that found in ntvfs, with
functions to migrate between PAIN, HASH and RESPONSE passwords.

Instead of make_user_info*() functions, we simply fill in the control
block in the callers, per recent dicussions on the lists.  This
removed a lot of data copies as well as error paths, as we can grab
much of it with talloc.

Andrew Bartlett
(This used to be commit ecbd2235a3)
2007-10-10 13:29:55 -05:00
Andrew Tridgell
4327a3f1ba r8658: move use of lp_security() and lp_nt_status_support() into the connection structure.
This massively reduces the number of lp_*() calls made
(This used to be commit b1d577f48d)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
174da76293 r8627: fixed a big memory leak in the spnego gensec code in session
setup. Andrew, please check over this.

What happens is this:

 - run the BASE-SECLEAK test
 - with each failed session setup using spnego a gensec ctx is leaked into the smb_conn structure
 - after the client disconnects these are finally cleaned up as they
   are all children of the connection structure
 - the cleanup of the millions of memory objects takes long enough
   that the next operation in test_posix.sh sometimes fails with a timeout

Andrew, can you also look at the talloc_reference() on line 332 of
sesssetup.c ? I suspect it isn't needed (I don't think it does any
actual harm though)
(This used to be commit b40fb6a456)
2007-10-10 13:29:45 -05:00
Andrew Tridgell
a32fe0f293 r8577: added management calls to list current tree connects
(This used to be commit 658befc1e4)
2007-10-10 13:29:40 -05:00
Andrew Tridgell
25428433e3 r8574: added server side irpc calls for listing the current sessions
(This used to be commit 391cfe3c96)
2007-10-10 13:29:39 -05:00
Andrew Tridgell
5033ce466c r8527: found an uninitialised variable in 'make valgrindtest'
(This used to be commit 9eebd240d8)
2007-10-10 13:29:35 -05:00
Andrew Tridgell
2bb9fa2875 r8487: kfixed a typo
(This used to be commit adae47c829)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
c6881d1e65 r8272: added the hooks for adding a name to a messaging context, so we will
be able to send a message to the "ldap_server" task without having to
know its task ID.
(This used to be commit 8f69867867)
2007-10-10 13:19:29 -05:00
Andrew Tridgell
8086371dbf r8119: fixed two error code returns in the smb server now that we have
torture code that can tell the difference between dos and ntstatus
codes without mapping
(This used to be commit 5521060c08)
2007-10-10 13:19:10 -05:00
Stefan Metzmacher
7134b64292 r8028: fix a crash bug in ulogoff, when the tree_connect failed before
metze
(This used to be commit a2e34475d7)
2007-10-10 13:19:00 -05:00
Andrew Tridgell
f39440e060 r7857: improved the handling of end-of-file on sockets in the smb server
(This used to be commit 6ee98c5f65)
2007-10-10 13:18:43 -05:00
Andrew Tridgell
3dd67b9746 r7782: fixed an ordering problem with smb requests. I found this when I had "sam database"
set to the internal ldap server over loopback. The following happened:

  - DCERPC_AUTH3 request
     - auth requests calls ldb
     - ldb calls ldap
     - ldap calls our internal ldap server, triggering events
  - samrConnect from client
     - connect refused
  - SMBclose from client
     - causes dcerpc_pipe to be destroyed
  - AUTH3 continues
     - dies on freed pipe

I chose this solution as it provides a guarantee that backends only have to think about
async issues when they mark a request async. When they don't, this code guarantees that
a second request won't happen on the same connection while processing the first one
(This used to be commit 45487e8a14)
2007-10-10 13:18:36 -05:00
Andrew Bartlett
8047db6e4b r7676: Make VUID and TID choice random, as this gives us protection against
replay attacks under SMB signing, where the session key is a fixed
derivitive of the user's password.

This removes the VID offset, but I'm not worried about random client
bytes mattering here, given the space (and the fact that it applies to
very, very old clients).

Andrew Bartlett
(This used to be commit eb1d37c5a9)
2007-10-10 13:18:21 -05:00
Andrew Bartlett
b523bde499 r7675: Use correct memory context for anonymous session setup auth context
(no need for it to hang around forever).

Add test for this behaviour.

Andrew Bartlett
(This used to be commit 36dc2491d7)
2007-10-10 13:18:21 -05:00
Andrew Tridgell
af237084ec r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
(This used to be commit 3a3025485b)
2007-10-10 13:18:15 -05:00
Stefan Metzmacher
3b9dfb0da3 r7631: - remove unused function, as the disgn of samba4 doesn't allow the old style
auto homedir share stuff
- add TODO: for checking the password on share mode security

metze
(This used to be commit d9a0c61801)
2007-10-10 13:18:15 -05:00
Andrew Tridgell
8f31f8c57e r7523: blergh
the error code for an invalid tid depends on the command
(This used to be commit 9dab036fbe)
2007-10-10 13:18:06 -05:00
Andrew Tridgell
76d3439c4b r7510: fixed error code for using a bad tid.
amazingly, I have seen w2k do a session setup followed by an immediate
attempted opening of \netlogon, with no tconx to ipc$ first. So this
error code can matter.
(This used to be commit 79112d81cb)
2007-10-10 13:18:02 -05:00
Simo Sorce
042ab1adbe r7222: remove double call to the same function in the same place, probable cut&paste error
(This used to be commit 615618f192)
2007-10-10 13:17:27 -05:00
Andrew Tridgell
d9c15b0f28 r6342: fixed a bad union assumption that caused ACLs to fail on 64 bit machines
Thanks to lars and agruen for finding this
(This used to be commit 2acc069185)
2007-10-10 13:11:33 -05:00
Andrew Bartlett
9782a22fa9 r6313: Much better handling of LogoffAndX when the vuid is invalid (ie, don't
segfault).  This should fix another of the issues that Richard came up
with last week.

Andrew Bartlett
(This used to be commit c2c8b6abf3)
2007-10-10 13:11:30 -05:00
Andrew Bartlett
ab06749443 r6312: Metze reminds me this header is no longer required.
Andrew Bartlett
(This used to be commit c67a9370c4)
2007-10-10 13:11:30 -05:00
Andrew Bartlett
f3e3f3aab6 r6310: Rename password.c to session.c, and remove the linked list of all
outstanding sessions, as we don't use it.

Andrew Bartlett
(This used to be commit 0cbd11a0f2)
2007-10-10 13:11:30 -05:00
Andrew Bartlett
b1dba5e7fb r6309: Remove this file it is empty and unreferenced. (In preperation for
renaming password.c over the top, as it deals with sessions, not
passwords).

Andrew Bartlett
(This used to be commit 0bba8da460)
2007-10-10 13:11:30 -05:00
Andrew Bartlett
20841a25ad r6270: Move the VUID handling to a IDR tree. This should avoid O(n)
behaviour on session setups, and because we no longer need do deal
with the linked list as much, the code is much simpiler too.

We may be able to compleatly remove the tid and vuid linked lists, but
I need to check.

This patch also tries to clean up the VUID handling and session setups
in general.  To avoid security issues, we now have a distinction
between VUIDs allocated for the session setup (to tie togeather the
multiple round trips) and those used after authentication.

Andrew Bartlett
(This used to be commit 3e5775146d)
2007-10-10 13:11:29 -05:00
Andrew Tridgell
21d9419b1e r6031: don't try to send errors when the socket has been destroyed
(This used to be commit 54c0284679)
2007-10-10 13:11:16 -05:00
Andrew Bartlett
2eb3d68062 r6028: A MAJOR update to intergrate the new credentails system fully with
GENSEC, and to pull SCHANNEL into GENSEC, by making it less 'special'.

GENSEC now no longer has it's own handling of 'set username' etc,
instead it uses cli_credentials calls.

In order to link the credentails code right though Samba, a lot of
interfaces have changed to remove 'username, domain, password'
arguments, and these have been replaced with a single 'struct
cli_credentials'.

In the session setup code, a new parameter 'workgroup' contains the
client/server current workgroup, which seems unrelated to the
authentication exchange (it was being filled in from the auth info).

This allows in particular kerberos to only call back for passwords
when it actually needs to perform the kinit.

The kerberos code has been modified not to use the SPNEGO provided
'principal name' (in the mechListMIC), but to instead use the name the
host was connected to as.  This better matches Microsoft behaviour,
is more secure and allows better use of standard kerberos functions.

To achieve this, I made changes to our socket code so that the
hostname (before name resolution) is now recorded on the socket.

In schannel, most of the code from librpc/rpc/dcerpc_schannel.c is now
in libcli/auth/schannel.c, and it looks much more like a standard
GENSEC module.  The actual sign/seal code moved to
libcli/auth/schannel_sign.c in a previous commit.

The schannel credentails structure is now merged with the rest of the
credentails, as many of the values (username, workstation, domain)
where already present there.  This makes handling this in a generic
manner much easier, as there is no longer a custom entry-point.

The auth_domain module continues to be developed, but is now just as
functional as auth_winbind.  The changes here are consequential to the
schannel changes.

The only removed function at this point is the RPC-LOGIN test
(simulating the load of a WinXP login), which needs much more work to
clean it up (it contains copies of too much code from all over the
torture suite, and I havn't been able to penetrate its 'structure').

Andrew Bartlett
(This used to be commit 2301a4b38a)
2007-10-10 13:11:15 -05:00
Andrew Bartlett
439056c1db r5899: Fix spelling.
Andrew Bartlett
(This used to be commit 50af206477)
2007-10-10 13:11:07 -05:00
Andrew Tridgell
75ddf59ea1 r5308: trimmed back a lot of the old macros from smb_macros.h
(This used to be commit bf43c9bdcf)
2007-10-10 13:09:40 -05:00
Andrew Tridgell
b9bb7f596d r5294: - added a separate NBT-WINS test for WINS operations (register, refresh, release and query)
- change the iface_n_*() functions to return a "const char *" instead of a "struct ipv4_addr"
  I think that in general we should move towards "const char *" for
  all IP addresses, as this makes IPv6 much easier, and is also easier
  to debug. Andrew, when you get a chance, could you fix some of the
  auth code to use strings for IPs ?

- return a NTSTATUS error on bad name queries and node status instead
  of using rcode. This makes the calling code simpler.

- added low level name release code in libcli/nbt/

- use a real IP in the register and wins nbt torture tests, as w2k3
  WINS server silently rejects some operations that don't come from the
  IP being used (eg. it says "yes" to a release, but does not in fact
  release the name)
(This used to be commit bb1ab11d8e)
2007-10-10 13:09:37 -05:00
Andrew Tridgell
131dc76d56 r5197: moved events code to lib/events/ (suggestion from metze)
(This used to be commit 7f54c8a339)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
0798d54b4f r5195: most events don't need the time of the event, so save a gettimeofday() call
and just use timeval_current() when its actually needed
(This used to be commit 236403cc4d)
2007-10-10 13:09:30 -05:00
Andrew Tridgell
a097414ed2 r5193: make sure we mark the event dead when we free it on a dead connection
(This used to be commit 90535bab95)
2007-10-10 13:09:29 -05:00