1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

939 Commits

Author SHA1 Message Date
Jelmer Vernooij
ba5d6e6d70 Avoid using a utility header for Python replacements included in Samba,
since this will not be shipped with talloc/tdb/tevent/etc.
2009-01-08 12:20:20 +01:00
Tim Prouty
61a23c5eea s3/s4 build: Fix Py_RETURN_NONE to work with python versions < 2.4 2009-01-07 15:03:16 -08:00
Jelmer Vernooij
f4735b7180 Set proper python exception when running out of memory. 2009-01-07 22:40:13 +01:00
Volker Lendecke
1d427dcee0 Add some const to dcerpc_binding_build_tower() 2009-01-06 21:57:01 +01:00
Jelmer Vernooij
63e7c2fef8 Fix prototype. 2009-01-06 21:45:13 +01:00
Jelmer Vernooij
d2c70d24e1 py: Properly increase the reference counter of Py_None. 2009-01-06 04:13:57 +01:00
Jelmer Vernooij
08259c1c52 Add iconv_convenience argument to size functions. 2009-01-01 04:45:33 +01:00
Stefan Metzmacher
183c379fe5 s4:lib/tevent: rename structs
list=""
list="$list event_context:tevent_context"
list="$list fd_event:tevent_fd"
list="$list timed_event:tevent_timer"

for s in $list; do
	o=`echo $s | cut -d ':' -f1`
	n=`echo $s | cut -d ':' -f2`
	r=`git grep "struct $o" |cut -d ':' -f1 |sort -u`
	files=`echo "$r" | grep -v source3 | grep -v nsswitch | grep -v packaging4`
	for f in $files; do
		cat $f | sed -e "s/struct $o/struct $n/g" > $f.tmp
		mv $f.tmp $f
	done
done

metze
2008-12-29 20:46:40 +01:00
Jelmer Vernooij
1807b0870b pidl/python: Factor out connect code rather than duplicating it in each
Python module.
2008-12-22 04:56:41 +01:00
Jelmer Vernooij
d58270c537 Add header for pyparam. 2008-12-22 04:38:57 +01:00
Jelmer Vernooij
2c58c9497c Import types from other Python mechanisms using the Python import mechanism, to ensure they are initialized. 2008-12-22 01:51:38 +01:00
Stefan Metzmacher
fc31f2c526 s4:lib/socket: socket_connect_send() and socket_connect_ev() should only wrok with addresses
metze
2008-12-18 13:32:51 +01:00
Stefan Metzmacher
4c2a113dd0 s4:librpc/rpc: remove we should not redo the name resolving for secondary tcp connections
metze
2008-12-18 13:32:51 +01:00
Jelmer Vernooij
b45caa44e1 Fix the build. 2008-11-02 23:58:49 +01:00
Jelmer Vernooij
a1cc278142 Remove use of global_loadparm during initialization of gensec. 2008-11-02 17:04:22 +01:00
Jelmer Vernooij
29a20af75f Remove use of global_loadparm for SMB2 client connections. 2008-11-02 16:20:00 +01:00
Jelmer Vernooij
b034c519f5 Add gensec_settings structure. This wraps loadparm_context for now, but
should in the future only contain some settings required for gensec.
2008-11-02 02:05:48 +01:00
Jelmer Vernooij
7a6190e9a7 Remove another use of global_loadparm. 2008-11-02 01:03:26 +01:00
Jelmer Vernooij
dccf1b2c9f Remove another use of global_loadparm. 2008-11-02 00:26:04 +01:00
Jelmer Vernooij
d9cbf2b0d9 Remove another use of global_loadparm. 2008-11-01 23:26:36 +01:00
Jelmer Vernooij
7942333712 Remove another use of global_loadparm. 2008-11-01 23:09:18 +01:00
Jelmer Vernooij
ac428a22e6 dcerpc: Fix include path so header installer translates it correctly during install. 2008-10-31 16:15:08 +01:00
Günther Deschner
7f8bc6a2d9 errors: share dcerpc error function.
Guenther
2008-10-31 12:42:09 +01:00
Günther Deschner
1798e9d7ec s4-netlogon: merge netr_ServerReqChallenge from s3 idl.
Guenther
2008-10-29 08:57:52 +01:00
Günther Deschner
8e4c691c0a s4-netlogon: merge netr_ServerAuthenticate{2,3} from s3 idl.
Guenther
2008-10-29 08:57:51 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
8b06312f7e Eliminate another instance of global_loadparm. 2008-10-24 13:13:27 +02:00
Jelmer Vernooij
9f2ed1e00f Share RPC binding string utility functions. 2008-10-12 19:05:46 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Jelmer Vernooij
caa4e42860 Move lib/util from source4 to top-level libutil.
Conflicts:

	source4/Makefile
2008-10-11 21:05:38 +02:00
Jelmer Vernooij
ae38514534 Merge branch 'master' of ssh://git.samba.org/data/git/samba 2008-09-30 14:57:51 +02:00
Stefan Metzmacher
eb1de4f0ed s4:librpc/rpc: correctly sign or seal rpc request with an object guid
metze
2008-09-30 06:47:23 +02:00
Jelmer Vernooij
454122ab09 make sure dcerpc is always initialized. 2008-09-30 06:05:05 +02:00
Jelmer Vernooij
5bbd73c0ff Remove two more uses of global loadparm by remember required
details for secondary DCE/RPC connections.
2008-09-30 04:01:47 +02:00
Jelmer Vernooij
181ee01da6 Pass session options around; saves another use of global_loadparm. 2008-09-30 02:47:19 +02:00
Jelmer Vernooij
9de1472bd1 Remove redundant call. 2008-09-30 01:58:06 +02:00
Jelmer Vernooij
e9d44b2e1c Import proper IDL for interface pointers. 2008-09-16 04:15:39 +02:00
Stefan Metzmacher
48f500edc0 librpc/rpc: don't send auth trailers in level connect
Also ignore auth trailers in level connect on receive.

This fixes [krb5,connect] against windows.

TODO: maybe the gensec mech need to decide if signatures
      are needed in level connect.

metze
(This used to be commit eca0502b86)
2008-09-13 20:37:12 +02:00
Stefan Metzmacher
73ebb58f2d client free credentials when not needed anymore
(This used to be commit d982b69df6)
2008-09-13 20:37:11 +02:00
Stefan Metzmacher
eb81a62d14 librpc/rpc: correct the chunk_size depending on the signature size
metze
(This used to be commit 50eb0e7264)
2008-08-11 18:15:59 +02:00
Stefan Metzmacher
50f82609b5 librpc/rpc: add support DCERPC_PFC_FLAG_SUPPORT_HEADER_SIGN
You can trigger it like this:

ncacn_ip_tcp:172.31.9.234[sign,hdrsign]

or

ncacn_ip_tcp:172.31.9.234[seal,hdrsign]

metze
(This used to be commit 54f1fca582)
2008-08-07 15:40:20 +02:00
Stefan Metzmacher
b3573ce76e librpc/rpc: pass struct dcerpc_pipe to dcerpc_auth3()
metze
(This used to be commit 60b3523da4)
2008-08-07 15:40:20 +02:00
Andrew Bartlett
768515f4ad The SMB session key must not be more than 16 bytes in SAMR (and
presumably LSA).

Tests show that Vista requires the sesion key to be truncated for a
domain join.

Andrew Bartlett
(This used to be commit af629a3738)
2008-07-23 16:19:54 +10:00
Andrew Bartlett
0edce42b36 Fix the build - this element was renamed.
(This used to be commit 60161954ad)
2008-07-16 15:28:54 +10:00
Stefan Metzmacher
a3ea8bcb19 dcerpc_smb: trans->in.max_data should not depend on the smb max size
We now support async multi fragment SMBtrans calls.

metze
(This used to be commit 6813e22e9d)
2008-07-07 20:59:13 +02:00
Simo Sorce
2daf2897d5 Use a custom init function for samba4 that sets a samba4
specific debug function.
By default do not debug, this is the most appropriate action for a library
as we cannot assume what stderr is use for in the main app.
The main app is responsible to set ev_debug_stderr if they so desire.
(This used to be commit e566a2f308)
2008-06-14 13:00:53 -04:00
Andrew Tridgell
3df0fee42d fixed for per session session_key here too
(This used to be commit abcbce004c)
2008-06-07 11:10:23 -07:00
Andrew Tridgell
beaa01e403 implemented client side SMB2 signing
This doessn't work against Windows yet, and I've submitted a WSPP
request for clarification of the docs to try and find out
why. Meanwhile this is no worse than what we had, as it only gets used
when the server demands signing, and we didn't work then anyway.
(This used to be commit b788096add)
2008-05-30 17:03:54 +10:00
Jelmer Vernooij
d5434f0b4b Allow using IRPC functions on the messaging bus from Python.
(This used to be commit 6ecf81ae13)
2008-05-26 04:14:28 +02:00
Jelmer Vernooij
d60d8e57d8 Implement IRPC calls over the internal messaging bus.
(This used to be commit 777dc3a2c7)
2008-05-26 03:07:18 +02:00
Jelmer Vernooij
22778de582 Remove some unused cruft.
(This used to be commit 8f47157f09)
2008-05-26 00:38:12 +02:00
Jelmer Vernooij
eae3658674 Fix compilation errors.
(This used to be commit daae053365)
2008-05-25 23:22:05 +02:00
Jelmer Vernooij
77acb789e2 Trim the size of the Python bindings a bit.
(This used to be commit 717ce0b640)
2008-05-25 23:14:48 +02:00
Jelmer Vernooij
74126bc6d0 Expose transfer and abstract syntax.
(This used to be commit a875e07a37)
2008-05-25 04:54:38 +02:00
Jelmer Vernooij
5211755563 Expose request timeout variable in Python.
(This used to be commit daed1432d2)
2008-05-25 04:38:57 +02:00
Jelmer Vernooij
928ecbaebb Add support for secondary contexts from Python.
(This used to be commit 16d1ad0505)
2008-05-25 04:23:03 +02:00
Jelmer Vernooij
4c1f0641d3 Check for fault codes when connecting.
(This used to be commit 42537b1d52)
2008-05-25 00:04:11 +02:00
Jelmer Vernooij
63c2a19e6e Add helper function to return DCE/RPC fault codes.
(This used to be commit 4716cdfb5d)
2008-05-24 23:39:38 +02:00
Jelmer Vernooij
21b6e9ec9e Add convenience function for creating objects with NDR error codes.
(This used to be commit 991541a78c)
2008-05-24 23:22:49 +02:00
Jelmer Vernooij
5863864f1d Fix memory initialization in raw calls.
(This used to be commit 788b2dbfe4)
2008-05-24 23:07:16 +02:00
Jelmer Vernooij
2a6c4da9d1 Support optional object argument when sending DCE/RPC requests.
(This used to be commit 75ba01a0fa)
2008-05-24 23:02:09 +02:00
Jelmer Vernooij
21ce0ff006 Allow connecting to a DCE/RPC interface with Python for which we don't have IDL.
(This used to be commit e3178d522c)
2008-05-24 22:56:49 +02:00
Jelmer Vernooij
75e7962d2e Add convenience functions for setting Python objects from errors.
(This used to be commit f1de723b89)
2008-05-24 22:13:32 +02:00
Jelmer Vernooij
f9c36fae75 Export functions for setting NTSTATUS and WERRORs in python.
(This used to be commit 4bcb92d2d4)
2008-05-24 21:38:33 +02:00
Jelmer Vernooij
fe5be25547 Allow request() call to do custom calls on DCE/RPC interfaces.
(This used to be commit 9c2eff0289)
2008-05-24 21:20:45 +02:00
Jelmer Vernooij
654be49c01 Use manually written Python bindings for DCE/RPC rather than SWIG based.
Use base class for pidl-generated DCE/RPC interface Python bindings.
(This used to be commit 25e7fc8a2c)
2008-05-24 21:02:56 +02:00
Jelmer Vernooij
515b6ed586 Share struct used for interfaces in Python code.
(This used to be commit 8501a3fc31)
2008-05-24 20:00:37 +02:00
Jelmer Vernooij
73b789b6d2 Add docstrings to a couple more python modules.
(This used to be commit b4560c90e5)
2008-05-24 04:01:57 +02:00
Jelmer Vernooij
4b95f9001b Work around bug adding extra imports in generated file.
(This used to be commit a34de3c619)
2008-05-23 03:56:20 +02:00
Jelmer Vernooij
a46450810b Regenerate with SWIG 1.3.35.
(This used to be commit ce063eca49)
2008-05-23 03:22:56 +02:00
Jelmer Vernooij
059c012656 Fix dependencies and imports.
(This used to be commit 37ef86f8de)
2008-05-22 00:56:36 +02:00
Jelmer Vernooij
49706ab19b Move more modules inside of the samba package.
(This used to be commit 9b39e99f48)
2008-05-21 23:59:34 +02:00
Andrew Tridgell
c7d7577fb9 private -> private_data for struct smb2_request
(This used to be commit 67290e0ad6)
2008-05-16 15:03:58 +10:00
Simo Sorce
4e83011f72 Remove more event_context_init() uses from function calls within deep down the code.
Make sure we pass around the event_context where we need it instead.
All test but a few python ones fail. Jelmer promised to fix them.
(This used to be commit 3045d39162)
2008-04-21 18:12:33 -04:00
Jelmer Vernooij
f875669314 Require passing in an event context to endpoint mapper utility function.
(This used to be commit 906b9fe158)
2008-04-17 01:09:33 +02:00
Jelmer Vernooij
1efbd5fbf6 Remove event context tracking from the credentials struct.
(This used to be commit 4d7fc946b2)
2008-04-17 01:03:18 +02:00
Jelmer Vernooij
b708a3d1e7 Split binding structure handling out into a separate file.
For easier synchronisation with Samba 3.
(This used to be commit b9cac469f3)
2008-04-15 18:03:09 +02:00
Jelmer Vernooij
adc0985742 Install libevents since it's required by samba-gtk.
(This used to be commit 2073346828)
2008-04-03 02:28:31 +02:00
Jelmer Vernooij
afe3e8172d Install public header files again and include required prototypes.
(This used to be commit 47ffbbf674)
2008-04-02 04:53:27 +02:00
Jelmer Vernooij
bebb7b890c Add warning to public headers.
(This used to be commit 7bfe359c73)
2008-04-01 16:18:31 +02:00
Jelmer Vernooij
10169a2030 Remove more global_loadparm instance.s
(This used to be commit a1280252ce)
2008-02-21 17:54:24 +01:00
Andrew Tridgell
febc8e361a missed a spot in the SMB2 create conversion
(This used to be commit 17357072dd)
2008-02-13 17:24:23 +11:00
Jelmer Vernooij
35c6831644 python: Avoid duplicate copies of some objects in different packages.
(This used to be commit bd293cde1b)
2008-01-22 16:21:54 +01:00
Jelmer Vernooij
dcc282590b r26654: libcli/smb_composite: Rather than specifying each of the gazillion options for SMB individually, just specify the smbcli_options struct.
(This used to be commit 8a97886e24)
2008-01-03 12:33:36 -06:00
Jelmer Vernooij
425732f688 r26651: libsmb: Allow specifying signing policy from higher up.
The number of arguments is getting a bit excessive now, so it
probably makes sense to pass in the smbcli_options struct rather than
all members individually and add a convenience function for obtaining a
smbcli_options struct from a loadparm context.
(This used to be commit 9f64213463)
2008-01-03 12:33:36 -06:00
Jelmer Vernooij
969b8579c7 r26646: libcli/smb_composite: Allow specifying SMB parameters in smb_composite_connect structure. AFAIK no global variables will now be used when doing RPC client connections.
(This used to be commit 0ef75e4e3c)
2008-01-02 12:48:04 -06:00
Jelmer Vernooij
771b347f9b r26644: Janitorial: Pass resolve_context explicitly to various SMB functions, should help fix the build for OpenChange.
(This used to be commit 385ffe4f4c)
2008-01-02 12:48:03 -06:00
Jelmer Vernooij
37b822e49f r26643: librpc: Remove uses of global_loadparm.
(This used to be commit 924c089090)
2008-01-02 09:06:06 -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
d0ba9f0014 r26572: Fix warnings in the Python code.
(This used to be commit 15038d9586)
2007-12-24 01:51:04 -06:00
Jelmer Vernooij
aa0a06f13c r26570: - Trim size of the swig-generated Python bindings by removing a bunch of {}'s.
- Start working on Python equivalents for various EJS tests.
- Fix regression in argument order for reg_diff_apply() in EJS bindings.
(This used to be commit c550c03372)
2007-12-24 01:51:03 -06: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
d1e716cf43 r26432: Require ndr_pull users to specify iconv_convenience.
(This used to be commit 28b1d36551)
2007-12-21 05:50:02 +01:00
Jelmer Vernooij
61873ce94c r26431: Require ndr_push creators to specify a iconv_convenience context.
(This used to be commit 7352206f44)
2007-12-21 05:50:00 +01:00
Jelmer Vernooij
4b0199a549 r26409: Pass smb ports along.
(This used to be commit 2833f320de)
2007-12-21 05:49:42 +01:00
Jelmer Vernooij
68dc2dc526 r26399: Use -O option for SWIG (less evil generated code).
(This used to be commit 3378b6a559)
2007-12-21 05:49:29 +01:00
Kai Blin
cbefb13474 r26396: dcerpc: Fall back to peer_name() if target_hostname() is not set.
(This used to be commit 700887c7f1)
2007-12-21 05:49:25 +01:00
Kai Blin
0978d0ed47 r26394: dcerpc: Use target_hostname() instead of peer_name() in dcerpc_server_name()
(This used to be commit c5196831d5)
2007-12-21 05:49:24 +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
5f4842cf65 r26376: Add context for libcli_resolve.
(This used to be commit 459e1466a4)
2007-12-21 05:49:12 +01:00
Jelmer Vernooij
01d2acfdb4 r26335: Specify name_resolve_order to socket code.
(This used to be commit b03e5d0011)
2007-12-21 05:48:46 +01:00
Jelmer Vernooij
0b4fab2f60 r26334: Avoid loadparm_context.
(This used to be commit 332dff80cc)
2007-12-21 05:48:45 +01:00
Jelmer Vernooij
bca631be1f r26329: Fix more loadparm_context references. Only about a 100 left now.
(This used to be commit ddf233346d)
2007-12-21 05:48:42 +01:00
Jelmer Vernooij
4c4323009f r26327: Explicit loadparm_context for RPC client functions.
(This used to be commit eeb2251d22)
2007-12-21 05:48:41 +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
9ebcd7a0df r26277: Move loadparm context higher up the stack.
(This used to be commit 38fa08310c)
2007-12-21 05:48:03 +01:00
Jelmer Vernooij
da0f222f43 r26271: Remove some more uses of global_loadparm.
(This used to be commit e9875fcd56)
2007-12-21 05:47:53 +01:00
Jelmer Vernooij
5b357ca877 r26270: Require specifying the loadparm_context or NULL to cli_credentials_guess().
(This used to be commit e52710d679)
2007-12-21 05:47:50 +01:00
Jelmer Vernooij
2f8dc4f48f r26266: Remove more global_loadparm uses.
(This used to be commit 99113075c4)
2007-12-21 05:47:42 +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
53ae9bc9f6 r26248: Check in SWIG output so SWIG is not required when running out of svn.
(This used to be commit 08501fbef3)
2007-12-21 05:47:26 +01:00
Jelmer Vernooij
fface33dd7 r26231: Spell check: credentails -> credentials.
(This used to be commit 4b46888bd0)
2007-12-21 05:47:09 +01:00
Jelmer Vernooij
2fa338cdc9 r26226: Avoid more uses of global_loadparm.
(This used to be commit 6cbce47a3e)
2007-12-21 05:47:02 +01:00
Jelmer Vernooij
218fef224c r26097: Consider python modules special modules rather than special libraries.
(This used to be commit 4c26cf3810)
2007-12-21 05:46:02 +01:00
Jelmer Vernooij
f47bc82561 r26071: Move DCE/RPC SWIG bindings closer to the code they're wrapping.
(This used to be commit 93eba0a3a9)
2007-12-21 05:45:53 +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
Stefan Metzmacher
c559f0057f r25829: - use DEBUG() instead of printf
- return an error if strings doesn't match on validate

metze
(This used to be commit 4f5ad8cd44)
2007-12-21 05:44:16 +01:00
Stefan Metzmacher
a1ce0635ec r25828: don't ignore errors
metze
(This used to be commit 2bd63ce9e5)
2007-12-21 05:44:16 +01:00
Stefan Metzmacher
f549a5ddc8 r25824: - NT_STATUS_IS_ERR() is not the same as !NT_STATUS_IS_OK()
- make the success case some clear by returning NT_STATUS_OK

metze
(This used to be commit 2b570f96fc)
2007-12-21 05:44:14 +01: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
7c30312c17 r25316: Remove last few instances of old BOOL type in librpc/.
(This used to be commit 80d1dd41d4)
2007-10-10 15:07:13 -05:00
Jeremy Allison
9a012df08e r25175: Change to talloc_asprintf_append_buffer().
Jeremy.
(This used to be commit 0844dbf597)
2007-10-10 15:06:46 -05:00
Jelmer Vernooij
dccf3f99e4 r25027: Fix more warnings.
(This used to be commit 5085c53fcf)
2007-10-10 15:05:41 -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
959915a8cb r25001: Fix more C++ and other warnings, fix some of the indentation with ts=4 lines that I accidently added earlier.
(This used to be commit 0bcb21ed74)
2007-10-10 15:05:28 -05:00
Jelmer Vernooij
cd962355ab r25000: Fix some more C++ compatibility warnings.
(This used to be commit 08bb1ef643)
2007-10-10 15:05:27 -05:00
Jelmer Vernooij
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa)
2007-10-10 15:05:26 -05:00
Jelmer Vernooij
bd5a802a26 r24992: Remove some uses of lp_*().
(This used to be commit a5a1a55405)
2007-10-10 15:05:25 -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
Stefan Metzmacher
5de430441f r24908: we should not set s = NULL as we set it to talloc_strdup("") before
metze
(This used to be commit 2246c018b6)
2007-10-10 15:03:36 -05:00
Jelmer Vernooij
09c188e735 r24812: Fix headers for external users.
(This used to be commit ff6684adfd)
2007-10-10 15:03:13 -05:00
Jelmer Vernooij
0b91f39164 r24780: More work allowing libutil to be used by external users.
(This used to be commit 31993cf67b)
2007-10-10 15:03:10 -05:00
Jelmer Vernooij
64e98b0324 r24763: Allow users to leave out the transport in DCE/RPC binding strings. If the transport is not specified, it will be retrieved from the remote endpoint mapper or the IDL file.
This means that 'smbtorture localhost RPC-WINREG' works now.
(This used to be commit b7fa0859d2)
2007-10-10 15:03:06 -05:00
Jelmer Vernooij
3e7203d0b3 r24755: Use common code for finding the RPC binding in the torture tests.
(This used to be commit e3310e7739)
2007-10-10 15:03:03 -05:00
Jelmer Vernooij
53d10b44fa r24753: Allow host name in binding string without transport.
(This used to be commit f7051d3a84)
2007-10-10 15:03:03 -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
bd93ed4680 r24606: move librpc/rpc/table.c -> librpc/ndr/ndr_table.c
and rename the containing functions to have a ndr_
prefix

metze
(This used to be commit cb234d43ae)
2007-10-10 15:02:23 -05:00
Stefan Metzmacher
0d7d5a6d49 r24560: rename some DCERPC_ prefixes into NDR_
metze
(This used to be commit f874eca5da)
2007-10-10 15:02:15 -05:00
Stefan Metzmacher
f14bd1a90a r24557: rename 'dcerpc_table_' -> 'ndr_table_'
metze
(This used to be commit 84651aee81)
2007-10-10 15:02:15 -05:00
Stefan Metzmacher
b8cdadced4 r24551: rename dcerpc_interface_table -> ndr_interface_table
rename dcerpc_interface_list  -> ndr_interface_list

and move them to libndr.h

metze
(This used to be commit 4adbebef5d)
2007-10-10 15:02:12 -05:00
Stefan Metzmacher
6b62f15ce7 r24540: rename struct dcerpc_endpoint_list/struct dcerpc_authservice_list
into ndr_interface_string_array and move it to libndr.h

metze
(This used to be commit 473bca74dc)
2007-10-10 15:02:12 -05:00
Stefan Metzmacher
698e7c5f2a r24535: rename struct dcerpc_interface_call -> struct ndr_interface_call
and move it to librpc/ndr/libndr.h

metze
(This used to be commit abd5551aab)
2007-10-10 15:02:11 -05:00
Stefan Metzmacher
ce84ab9a83 r24532: rename struct dcerpc_syntax_id into struct ndr_syntax_id
and move it into misc.idl

The goal is to get rid a all dcerpc specific stuff in the
generated ndr layer.

metze
(This used to be commit 2ed014cfb8)
2007-10-10 15:02:11 -05:00
Andrew Bartlett
c86e98aa80 r23890: Allow wbinfo -a to work against Samba4's winbind.
Add a test for wbinfo -a to test_member.sh

Reimplement the server-side 'pam_auth' and 'pam_auth_crap' calls to
use the same SamLogon code as auth_winbind uses.

In my previous code, we did not bind to the LSA and SAMR pipes, before
attempting operations.  We now do this (how we passed any tests before
is beyond me).

This required some rework, particularly to make it easier to setup
secondary connections.  The new rpc_secondary_auth_connection()
function also performs the bind.

The dcerpc_connect.c file was getting to big, so things have been
merged into dcerpc_secondary.c.

Andrew Bartlett
(This used to be commit 365778a993)
2007-10-10 15:01:08 -05:00
Andrew Bartlett
8f9922863f r23812: Remove more code found as dead by the find_static script, and make
other functions just static.

Andrew Bartlett
(This used to be commit 64fcec1da6)
2007-10-10 14:59:22 -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 Bartlett
d291b8bf93 r23551: Change data_blob_equal to data_blob_cmp, suitable for sorting with qsort().
Andrew Bartlett
(This used to be commit 96ef5259c6)
2007-10-10 14:53:26 -05:00
Andrew Bartlett
002c1e7646 r23134: Set the event context onto the cli_credentials.
Andrew Bartlett
(This used to be commit 8b97ca2a87)
2007-10-10 14:52:53 -05:00
Stefan Metzmacher
40cd2d7780 r22944: fix bug #4618:
rename private -> private_data

metze
(This used to be commit 58551f2f28)
2007-10-10 14:52:30 -05:00
Andrew Bartlett
8861c4a68e r22838: Add in an explority test for what QFSINFO operations are valid on IPC$
It seems most opertaions are supported, but that the values are not
consistant.  I think these are very much hand-hacked stubs, which is
what they will be on Samba4 too.

I'll need to add some more 'don't fail for...' hacks before this
passes against Win2k3.

Andrew Bartlett
(This used to be commit dcb858d0c7)
2007-10-10 14:52:23 -05:00
Stefan Metzmacher
9644ced731 r22683: fix the logic for skipping the pipe_dead()
code on the 2nd run.

thanks volker for finding this!

metze
(This used to be commit 00ccc217da)
2007-10-10 14:52:01 -05:00
Stefan Metzmacher
9c6c917571 r22534: don't remove socket and fd_event before we told the
packet layer.

also fix double free (left over from cut-n-paste)

metze
(This used to be commit a26db7e694)
2007-10-10 14:51:38 -05:00
Stefan Metzmacher
42b133748f r22528: remember that the connection was marked dead and don't
allow sending packet over the broken connection,
as we would segfault...

metze
(This used to be commit 738b2c7411)
2007-10-10 14:51:38 -05:00
Stefan Metzmacher
7236bcf39d r22515: only steal pipe on success
metze
(This used to be commit acfaba06f5)
2007-10-10 14:51:35 -05:00
Stefan Metzmacher
f66bd1ae54 r22486: add a flag to ignore timeouts of a request and don't close
the connection on timeout

metze
(This used to be commit 6b23ab1fd2)
2007-10-10 14:51:32 -05:00
Stefan Metzmacher
d7b0175249 r22485: don't crash when the main dcerpc code haven't setup
transport.recv_data yet

also return always a usefull error

metze
(This used to be commit 0a8b4c328d)
2007-10-10 14:51:32 -05:00
Stefan Metzmacher
1912124dbf r22470: merge handling of broken connections from wins replication client code
to the rpc client code

we need to always ask for read events on the socket otherwise we never
get the connection error reported.

shutdown the transport when a request timeout.

metze
(This used to be commit 3403c0cb15)
2007-10-10 14:51:29 -05:00
Stefan Metzmacher
4d9a158089 r22386: another unused include
metze
(This used to be commit 3561258866)
2007-10-10 14:51:12 -05:00
Andrew Tridgell
f85bb4c1c3 r21811: fixed a queueing error in the dcerpc client code. WHen the
dcerpc_ship_next_request() logic was added the penidng queue was split
in two, but we also needed to update the code which removes requests
from the queue to know about the two queues. Following the pattern
used in other client libs, I based which queue to remove from on
req->state, and added a new state RPC_REQUEST_QUEUED. This fixes a
crash that happens when rpc requests time out.

This patch also fixes the handling of timed out bind requests, and the
talloc_reference handling in dcerpc_ndr_request_recv().
(This used to be commit f51a129b52)
2007-10-10 14:49:31 -05:00
Andrew Tridgell
60fd088c48 r21535: - fixed a crash in the RAW-ACLS test. When a dcerpc_pipe is created
using the pattern in the clilsa code, it didn't fill in the p->binding
structure. This affects nearly all users of dcerpc_pipe_open_smb(), so
the simplest fix is to ensure that dcerpc_pipe_open_smb() initialises
the binding if its not already there.

- re-enable the RAW-ACLS test
(This used to be commit d8875c286d)
2007-10-10 14:48:54 -05:00
Stefan Metzmacher
067d8fd44c r21520: fix the altercontext test... sorry
I'm only fixing the bug I introduced here,
not the rest of the mess in the pipe handling,
as we don't fill in pipe->binding and pipe->conn->binding_str
consistant...

metze
(This used to be commit cec74f3528)
2007-10-10 14:48:49 -05:00
Stefan Metzmacher
1b17d9a587 r21515: add some more PFC_FLAGS from the DCERPC spec, and fix some names
also make it possible to pass and get the assoc_group_id for
a pipe.

also make it possible to pass the DCERPC_PFC_FLAG_CONC_MPX flag
in bind requests. From the spec it triggers support for
concurrent multiplexing on a single connection.

w2k3 uses the assoc_group_id feature when it becomes a domain controller
of an existing domain. Know the ugly part, with this it's possible to
use a policy handle from one connection on a different one...

typically the DsBind() call is on the 1st connection while DsGetNCChanges()
call using the first connections bind handle are on the 2nd connection.

The second connection also has the DCERPC_PFC_FLAG_CONC_MPX flag attached,
but that doesn't seem to be related to the cross connection handle usage

Can anyone think of a nice way to implement the assoc_group_id stuff in our server?

metze
(This used to be commit 2d8c85397d)
2007-10-10 14:48:48 -05:00
Stefan Metzmacher
7a3aaa4041 r20326: always set the binding->target_hostname!
we crashed before trying ncacn_np: for frsrpc
as frsrpc doesn't have a ncacn_np endpoint listed
in the idl header and the endpoint mapping code
was trying our smbcli lib with a
NULL target_hostname -> called_name

metze
(This used to be commit ed49e4b1f8)
2007-10-10 14:29:41 -05:00
Stefan Metzmacher
dba738d044 r20323: allow empty dcerpc reqeusts, this fixes the RPC-COUNTCALLS test
metze
(This used to be commit bbd086f2ed)
2007-10-10 14:29:40 -05:00
Stefan Metzmacher
913d1a91b8 r20094: this should be non-const
metze
(This used to be commit 1b6621814b)
2007-10-10 14:29:04 -05:00
Jelmer Vernooij
41848fea6f r19844: Fix warnings and errors in epmapper IDL.
(This used to be commit 0221d5b6c4)
2007-10-10 14:28:24 -05:00
Jelmer Vernooij
c81f2930a2 r19676: Fix some more dependencies.
(This used to be commit 8768bec81f)
2007-10-10 14:25:29 -05:00
Stefan Metzmacher
71846e31fd r19661: - add resolve stage to dcerpc connects over tcp
- remove ipv6 support untill the resolve layer can give ipv6 addresses

metze
(This used to be commit 1e518c3e67)
2007-10-10 14:25:26 -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
bb435cbd03 r19502: fixed the RPC-SECRETS test with kerberos. Andrew, can you look at this
as well?

The server side change is needed to fix a valgrind error, which was
possibly exploitable if the client sent deliberately bad data
(This used to be commit e3c04cf165)
2007-10-10 14:24:40 -05:00
Andrew Tridgell
b4a5794e09 r19501: fix the hangs in the build farm in RPC-SECRETS
a RPC-SECRETS on kerberos test still fails, but I'll let andrew take a
look at that later :)
(This used to be commit c260b17568)
2007-10-10 14:24:39 -05:00
Andrew Bartlett
2da96ebd7a r19479: Remove more unused functions. These are handled via authentication
abstractions now.

Andrew Bartlett
(This used to be commit df31237c0c)
2007-10-10 14:21:40 -05:00
Andrew Bartlett
7f686233d7 r19478: Remove unused functions, and make static functions used only in this
file.  Everybody calls this via the dcerpc_pipe_connect() or
dcerpc_pipe_connect_b() functions.

Andrew Bartlett
(This used to be commit 5ee0fc0351)
2007-10-10 14:21:40 -05:00
Andrew Bartlett
3c203ab927 r19465: Rather than use the non-standard API for determining the signature
length, use the amount the wapped message expanded by.

This works, because GSSAPI doesn't do AEAD (signing of headers), and
so changing the signature length after the fact is valid.

Andrew Bartlett
(This used to be commit bd1e0f679c)
2007-10-10 14:21:37 -05:00
Andrew Bartlett
57b8c5cd22 r19266: Add a target_hostname element to the binding struct. This allows us
to perform a lookup once, resolve the name to an IP, while still
communicating the full name to the lower layers, for kerberos etc.

This fixes 'net samdump', which was failing due to the schannel target
name being *smbserver.

Andrew Bartlett
(This used to be commit 0546f487f4)
2007-10-10 14:21:00 -05:00
Andrew Tridgell
f4c49e8ef2 r18716: put in a commented out useful hack for some RPC servers
(This used to be commit fcf6d82719)
2007-10-10 14:19:04 -05:00
Andrew Tridgell
5d3fd81018 r17993: as metze pointed out, the composite_error() already calls the async
handler, so don't call composite_done()
(This used to be commit d70ec77b00)
2007-10-10 14:17:02 -05:00
Andrew Tridgell
e7717f615a r17990: added timeout checking on dcerpc connection establishment. This should
fix the problem on some build farm hosts where we were waiting forever
for a connection to DRSUAPI to be made, so the next test will start.

Next is to try and work out why the connection is timing out on some
hosts. That is probably a server bug, but at least with this change we
can see it.
(This used to be commit 45fccc6d22)
2007-10-10 14:17:02 -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
9e0993a647 r17337: make better usage of the composite api
and create an event context explicit

metze
(This used to be commit 02ec14e553)
2007-10-10 14:15:16 -05:00
Stefan Metzmacher
3ecdc5c24f r17336: make the logic a bit more easier to understand...
metze
(This used to be commit 60afb46683)
2007-10-10 14:15:16 -05:00
Stefan Metzmacher
331ad9e7b8 r17329: - after a composite_continue() we need to call return;
- add some comments

metze
(This used to be commit adb4ba9db2)
2007-10-10 14:15:15 -05:00
Stefan Metzmacher
fd86007351 r17328: make better usage of the composite api
metze
(This used to be commit ae0834c8ca)
2007-10-10 14:15:15 -05:00
Stefan Metzmacher
509a70e7da r17327: when the connect with the ipv6 socket was ok,
we need to inform the caller...

metze
(This used to be commit 40f10dfd60)
2007-10-10 14:15:15 -05:00
Stefan Metzmacher
5c1d881091 r17326: make better usage of the composite api
metze
(This used to be commit 097c9f09f3)
2007-10-10 14:15:14 -05:00
Stefan Metzmacher
2ac4cdf85e r17325: make better usage of the composite api
metze
(This used to be commit 26a62458cd)
2007-10-10 14:15:14 -05:00
Stefan Metzmacher
daff55d64e r17324: make better usage of the composite api
metze
(This used to be commit 0fa9777710)
2007-10-10 14:15:14 -05:00
Stefan Metzmacher
46b2b8c890 r17323: make better use of the composite api and fix the memory
hierachy

metze
(This used to be commit a0aa61a8d5)
2007-10-10 14:15:14 -05:00
Stefan Metzmacher
67fb28d9a8 r17322: make better use of the composite api
metze
(This used to be commit 5e66bf463b)
2007-10-10 14:15:13 -05:00
Stefan Metzmacher
08282aec60 r17321: give better error codes
metze
(This used to be commit 8e87b79ce7)
2007-10-10 14:15:11 -05:00
Stefan Metzmacher
7847e7b644 r17320: - print the debug message before the composite context get received by the caller
- steal pipe2 to the state structure so we don't need to take about freeing is later

metze
(This used to be commit 4ba50fc29e)
2007-10-10 14:15:11 -05:00
Andrew Tridgell
971d30bb20 r15854: more talloc_set_destructor() typesafe fixes
(This used to be commit 61c6100617)
2007-10-10 14:08:32 -05:00
Jelmer Vernooij
f3bf3dd80a r15812: Explicitly cast to unsigned int.
(This used to be commit c910a3f9c8)
2007-10-10 14:08:26 -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
Andrew Tridgell
428873fd70 r15524: fix a problem with rpc faults from bind and alter context
requests. The fix involves using the same packet queue mechanism for
these requests as normal requests, which also simplifies the code
somewhat
(This used to be commit 2e7f5add13)
2007-10-10 14:05:46 -05:00
Andrew Bartlett
7f0a396e3b r15504: Revert -r 15500 and -r 15503 until I'm awake, and can get my head
around the mess that is composite functions...

Async might be all the rage, but it's bloody painful to debug.

Andrew Bartlett
(This used to be commit 756e1dad7c)
2007-10-10 14:05:43 -05:00
Andrew Bartlett
e9c7016699 r15503: I may shortly have to revert all of this, but be clearer about how we
handle the NTLMSSP and wrong password fallbacks.

Andrew Bartlett
(This used to be commit dbf51ea985)
2007-10-10 14:05:43 -05:00
Andrew Bartlett
5f36534629 r15500: Add support for interactive prompting on bad passwords to the RPC libraries.
This support requires that the bind_ack and alter_ack recv functions
also be send the DCE/RPC fault.  This would be best done by having the
ack run as a normal RPC reply callback, but this isn't easily possible
for now.

Andrew Bartlett
(This used to be commit be6dde22fe)
2007-10-10 14:05:42 -05:00
Andrew Bartlett
07767825b7 r15482: Don't shadow the global function pipe() with a local variable name.
Andrew Bartlett
(This used to be commit ed4ab63c2d)
2007-10-10 14:05:39 -05:00
Rafal Szczesniak
b2154e79b1 r15440: Formatting.
rafal
(This used to be commit b4c378302b)
2007-10-10 14:05:37 -05:00
Andrew Bartlett
5f4d86f955 r15426: Implement SPNEGO as the default RPC authentication mechanism. Where
this isn't supported, fallback to NTLM.

Also, where we get a failure as 'logon failure', try and do a '3
tries' for the password, like we already do for CIFS.  (Incomplete:
needs a mapping between RPC errors and the logon failure NTSTATUS).

Because we don't yet support Kerberos sign/seal to win2k3 SP1 for
DCE/RPC, disable this (causing SPNEGO to negotiate NTLM) when kerberos
isn't demanded.

Andrew Bartlett
(This used to be commit b3212d1fb9)
2007-10-10 14:05:36 -05:00
Rafal Szczesniak
0240d4a875 r15021: Couple more comments and fixes in spirit of utility functions
for composite interface.

rafal
(This used to be commit 905ca5a3ec)
2007-10-10 14:04:01 -05:00
Andrew Tridgell
5fb9da1b3f r14962: fixed a valgrind error
(This used to be commit 5a8d13c4e6)
2007-10-10 14:00:46 -05:00
Jelmer Vernooij
42da534d66 r14735: Use dcerpc_syntax_id rather then seperate GUID + if_version everywhere
(This used to be commit a316b33057)
2007-10-10 13:59:17 -05:00
Andrew Bartlett
ff57359761 r14715: Correct the definition of the DCE/RPC bind_nak, per the OpenGroup spec.
This allows us to correctly parse the bind_nak from NT4, when we use
an invalid auth type (the unsupported SPNEGO)..

Andrew Bartlett
(This used to be commit ce0c7f86fd)
2007-10-10 13:59:12 -05:00
Andrew Bartlett
57589e3b67 r14714: On DCE/RPC, we need the name of the remote server used on the socket,
for Kerberos.  It must be the full name contacted, not the 'called
name' we might want to use for \\server things, so add another function.

Andrew Bartlett
(This used to be commit 6d57d1dbb7)
2007-10-10 13:59:12 -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
Jelmer Vernooij
ecf0dd6baf r14488: Install more headers.
Generate different #include lines in pidl depending on whether
we're building inside or outside of the Samba tree (useful for
3rd-party projects).
(This used to be commit 0c18883315)
2007-10-10 13:57:32 -05:00
Jelmer Vernooij
4f1c8daa36 r14470: Remove some unnecessary headers.
(This used to be commit f7312dab3b)
2007-10-10 13:57:29 -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
Jelmer Vernooij
1060f6b3f6 r14402: Generate seperate headers for RPC client functions.
(This used to be commit 7054ebf024)
2007-10-10 13:57:19 -05:00
Jelmer Vernooij
61933e159c r14381: Kill structs.h
(This used to be commit 1ffb82a759)
2007-10-10 13:57:17 -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
Jelmer Vernooij
3f16241a1d r14363: Remove credentials.h from the global includes.
(This used to be commit 98c4c30513)
2007-10-10 13:57:14 -05:00
Jelmer Vernooij
227a789351 r14362: Only include ndr_compression.h when necessary.
(This used to be commit 4fced6dbbd)
2007-10-10 13:57:14 -05:00
Andrew Tridgell
18a050b870 r14311: canon needs to be initialised
(This used to be commit d1d94d69e1)
2007-10-10 13:57:11 -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
Rafal Szczesniak
ac574aafc9 r14238: This is not needed anymore, as the state structure is zeroed
right after allocation.

rafal
(This used to be commit 87b31c51bb)
2007-10-10 13:57:05 -05:00
Rafal Szczesniak
be6c9f9a4e r14211: More comments.
rafal
(This used to be commit 9035de56a8)
2007-10-10 13:57:04 -05:00
Rafal Szczesniak
228abc9624 r14210: 1) Fix an issue with composite context when null event context
is passed to dcerpc_epm_map_binding_send.

2) Replace old dcerpc_epm_map_binding with the new function
   based on async code, as the above problem is fixed.

rafal
(This used to be commit 85ecb07ab5)
2007-10-10 13:57:04 -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
Rafal Szczesniak
beb9d4f794 r14175: More comments and my copyright.
rafal
(This used to be commit 384d97e0b2)
2007-10-10 13:56:58 -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
2b3767b1fe r14172: composite_is_ok(c) destroys c, when the status isn't ok.
so we need to return directly.

metze
(This used to be commit fba4229e56)
2007-10-10 13:56:57 -05:00
Rafal Szczesniak
3452e89999 r14165: More comments and my copyright.
rafal
(This used to be commit 6b94e81e5a)
2007-10-10 13:56:57 -05:00
Rafal Szczesniak
91b30e8cd3 r14164: More comments.
rafal
(This used to be commit 8582d6dfc5)
2007-10-10 13:56:57 -05:00
Rafal Szczesniak
f3fc42eb7e r14143: Replace old function with equivalent based on new async code.
rafal
(This used to be commit 036d35ff17)
2007-10-10 13:56:55 -05:00
Stefan Metzmacher
53bbace785 r14137: move **p2 to the _recv function for setup the second pipe
metze
(This used to be commit 8b8d92beed)
2007-10-10 13:56:53 -05:00
Rafal Szczesniak
5e5953a4af r14136: Fix bug causing segfaults in certain circumstances (gcc3.x among
others, probably). Funny thing, it didn't segfault on my laptop
and gcc4...

rafal
(This used to be commit 9e3321130e)
2007-10-10 13:56:53 -05:00
Rafal Szczesniak
716798c06f r14125: Fix incorrect declaration caught on build farm.
rafal
(This used to be commit 93358e7d9e)
2007-10-10 13:56:53 -05:00
Rafal Szczesniak
a1f08df37c r14123: Huge lump of code making all of our dcerpc connect code
asynchronous. Build is ok, and so are the tests.
More comments to follow.

rafal
(This used to be commit a74fb6c5a2)
2007-10-10 13:56:52 -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
Rafal Szczesniak
359ec2b0e0 r13726: Fix indentation.
rafal
(This used to be commit cedaf08170)
2007-10-10 13:52:07 -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
Andrew Bartlett
eefb440791 r13582: Indent
(This used to be commit 06ddac2bb1)
2007-10-10 13:51:58 -05:00
Rafal Szczesniak
5fa874453f r13572: Comments to async pipe open functions and copyright note.
rafal
(This used to be commit 7dde77942b)
2007-10-10 13:51:57 -05:00
Rafal Szczesniak
2b2dfc0117 r13568: Comments to async rpc connect functions.
rafal
(This used to be commit 9ef2275f61)
2007-10-10 13:51:57 -05:00
Rafal Szczesniak
32a3aa932d r13561: Turn all dcerpc connect and socket functions to async version.
Now, each rpc interface (named pipe, tcp/ip, lrpc and unix
socket) works asynchronously.
Comments to follow.

rafal
(This used to be commit 789f9d43db)
2007-10-10 13:51:57 -05:00
Andrew Bartlett
f2d76bddd5 r13334: Add comments describing what these functions do.
We still need many more, but it is a start...

Andrew Bartlett
(This used to be commit b2bda127f6)
2007-10-10 13:51:45 -05:00
Jelmer Vernooij
713b296441 r13210: Revert my named pipes patch until it passes not just 'make quicktest' but
also 'make test'
(This used to be commit e3d0676aee)
2007-10-10 13:51:35 -05:00
Jelmer Vernooij
ad6303f82f r13208: Clearly separate named pipes from the IPC$ NTVFS type.
This allows the easy addition of additional named pipes and removes the
circular dependencies between the CIFS, RPC and RAP servers.

Simple tests for a custom named pipe included.
(This used to be commit 898d15acbd)
2007-10-10 13:51:34 -05:00
Stefan Metzmacher
5bd9b3b808 r13002: fix compiler warning
metze
(This used to be commit 3365ad950b)
2007-10-10 13:51:16 -05:00
Andrew Bartlett
a5a79e8b8c r12865: Upgrade the librpc and libnet code.
In librpc, always try SMB level authentication, even if trying
schannel, but allow fallback to anonymous.  This should better
function with servers that set restrict anonymous.

There are too many parts of Samba that get, parse and modify the
binding parameters.  Avoid the extra work, and add a binding element
to the struct dcerpc_pipe

The libnet vampire code has been refactored, to reduce extra layers
and to better conform with the standard argument pattern.  Also, take
advantage of the new libnet_Lookup code, so we don't require the silly
'password server' smb.conf parameter.

To better support forcing traffic to be sealed for the vampire
operation, the dcerpc_bind_auth() function now takes an auth level
parameter.

Andrew Bartlett
(This used to be commit d65b354959)
2007-10-10 13:50:55 -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
Rafal Szczesniak
1f10e729c0 r12800: Replace tmp_ctx with mem_ctx to make variables name more
consistent along the file.

rafal
(This used to be commit aaccb91cca)
2007-10-10 13:49:57 -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
25bb00fbcd r12693: Move core data structures out of smb.h into core.h
torture prototypes in seperate header
(This used to be commit 73610639b2)
2007-10-10 13:49:39 -05:00
Jelmer Vernooij
bc4aebfaec r12670: Make a couple of dependencies stricter
Re-introduce and use the OUTPUT_TYPE property for MODULEs to force
specific modules to always be included
(This used to be commit f9eede3d40)
2007-10-10 13:49:35 -05:00
Andrew Tridgell
ff5c9a1273 r12634: make the [validate] binding string switch also check to see if the
string form of the structure we receive matches the generated
form. This has the effect of checking things like value() attributes.
(This used to be commit f2e68ec649)
2007-10-10 13:49:10 -05:00
Jelmer Vernooij
2cb372f7a4 r12623: Another round of fixes for the prototypes of tables.c
(This used to be commit fb5b22e3dc)
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
046a54f963 r12622: Move table.c prototypes to seperate header to prevent circular dependencies
with proto.h
(This used to be commit 9e0ba38037)
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
aa9f67163c r12620: Get rid of automatically generated lists of init functions of subsystems.
This allows Samba libraries to be used by other projects (and parts of
Samba to be built as shared libraries).
(This used to be commit 44f0aba715)
2007-10-10 13:49:06 -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
87fd7b5484 r12574: Bring tables.pl back to life and move registration of interfaces
now completely to a new subsystem.
(This used to be commit bbacfaaea5)
2007-10-10 13:48:56 -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
0ad7b308a1 r12514: Move DCE/RPC interface table to a seperate file
Be a bit more strict when checking for duplicate interfaces
(This used to be commit b1286a6d27)
2007-10-10 13:47:49 -05:00
Jelmer Vernooij
e748b53e43 r12513: Similar change as my previous commit, but now for transfer syntaxes.
Avoids converting a static string to GUID every time we check whether
a transfer syntax is equal to that of NDR.
(This used to be commit 8dcfcaf75a)
2007-10-10 13:47:49 -05:00
Jelmer Vernooij
d658de65d3 r12512: Use GUID structs in API functions everywhere rather then converting back and
forth between GUID structs and strings in several places.
(This used to be commit 3564e2f967)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
8270e1e310 r12511: Remove authservice from binding string
(This used to be commit 2188168209)
2007-10-10 13:47:48 -05:00
Jelmer Vernooij
acd6a086b3 r12510: Change the DCE/RPC interfaces to take a pointer to a
dcerpc_interface_table struct rather then a tuple of interface
name, UUID and version.

This removes the requirement for having a global list of DCE/RPC interfaces,
except for these parts of the code that use that list explicitly
(ndrdump and the scanner torture test).

This should also allow us to remove the hack that put the authservice parameter
in the dcerpc_binding struct as it can now be read directly from
dcerpc_interface_table.

I will now modify some of these functions to take a dcerpc_syntax_id
structure rather then a full dcerpc_interface_table.
(This used to be commit 8aae0f168e)
2007-10-10 13:47:48 -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
Rafal Szczesniak
b19d882458 r12294: Move dcerpc_pipe_open_sock() to async implementation.
rafal
(This used to be commit 02e7980034)
2007-10-10 13:47:27 -05:00
Rafal Szczesniak
737d59abc9 r12162: More comments.
rafal
(This used to be commit 2d69e4b13e)
2007-10-10 13:47:16 -05:00
Rafal Szczesniak
38b0dde114 r12135: Move named pipe connect on smb2 function to async implementation.
Completely untested, it's a bit difficult without having vista
around (yet), so - Andrew, please test it and let me know what's
wrong.

rafal
(This used to be commit b9e7522bd4)
2007-10-10 13:47:12 -05:00
Andrew Tridgell
111a920fdb r12116: got rid of composite_trigger_done() and composite_trigger_error(), and
instead make the normal composite_done() and composite_error()
functions automatically trigger a delayed callback if the caller has
had no opportunity to setup a async callback

this removes one of the common mistakes in writing a composite function
(This used to be commit f9413ce792)
2007-10-10 13:47:11 -05:00
Rafal Szczesniak
3b85d04025 r12103: Comments and a bit of formatting.
rafal
(This used to be commit 4a12711c31)
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
2184ad5af7 r12101: revert my last commit, I breaks the build and I don't know why...
metze
(This used to be commit dc664df873)
2007-10-10 13:47:09 -05:00
Stefan Metzmacher
3adb3013b1 r12090: use the _trigger_error() function in the function
that allocated the composite_context

metze
(This used to be commit 998a7f8572)
2007-10-10 13:47:08 -05:00
Rafal Szczesniak
b38783f40a r12089: Couple of fixes in cases of memory outage before we sort
out how and when to use composite_error() and composite_trigger_error().
Spotted by Metze.

rafal
(This used to be commit 218db3ebc0)
2007-10-10 13:47:07 -05:00
Rafal Szczesniak
d1c41cb83f r12088: Use a structure to pass arguments to dcerpc connection functions
and move migrated (async) code to a new file.

rafal
(This used to be commit 79b231bc53)
2007-10-10 13:47:07 -05:00
Rafal Szczesniak
18cfac7c71 r12087: Split dcerpc pipe connection functions into separate file.
It's going to contain async functions and ncacn_np is the
first.

rafal
(This used to be commit 3fe2df5fe3)
2007-10-10 13:47:07 -05:00
Rafal Szczesniak
3584f2cac1 r12001: Replace smbcli_full_connection call with composite connect used
in sync version. This step makes it easer to move further to async
dcerpc connect routine.

rafal
(This used to be commit 87b016d553)
2007-10-10 13:46:57 -05:00
Andrew Tridgell
6615907b94 r11980: ronnie worked out that opcode 0xb in SMB2 is in fact ioctl, and that
it only appeared to be like a SMBtrans request as it was being called
with function 0x11c017 which is "named pipe read write"

I wonder if this means we could do DCE/RPC over SMB using ntioctl
calls as well?
(This used to be commit f2b8857797)
2007-10-10 13:46:53 -05:00
Andrew Tridgell
36a5e35353 r11970: fixed a valgrind error. The auth info from the alter_context reply was
being freed before being given to gensec_update()
(This used to be commit cf2cb4279e)
2007-10-10 13:46:52 -05:00
Andrew Tridgell
2f74901802 r11891: - added pipe_flags field in smb2_trans
- while running dcerpc over SMB2, the server will occasionally send us
  a oh-so-useful STATUS_PENDING result meaning "I don't have a result
  for you yet, but I'm working on it". These can be discarded :-)
(This used to be commit 24588a9c49)
2007-10-10 13:46:42 -05:00
Andrew Tridgell
ced449b016 r11889: added support for dcerpc ncacn_np over SMB2. You use it by giving the
flag 'smb2' in the dcerpc binding string. This gives a pretty good
test to the new SMB2 trans call.
(This used to be commit f99bef585d)
2007-10-10 13:46:42 -05:00
Andrew Tridgell
e3e066fcb4 r11872: another attempt at fixing the data_blob_free in async dcerpc bind,
after volker gently pointed out that I should be wearing a paper bag
over my head for the last attempt :-)
(This used to be commit 7e132761fc)
2007-10-10 13:46:39 -05:00
Andrew Tridgell
090898de71 r11871: fixed a problem volker found with the async bind code, and a callback
destroying the dcerpc pipe
(This used to be commit 0b91602fa4)
2007-10-10 13:46:39 -05:00
Volker Lendecke
35741ad8b1 r11835: Restore comments
(This used to be commit 94591bdb65)
2007-10-10 13:46:36 -05:00
Andrew Tridgell
0df8dcb7c9 r11824: fixed a valgrind error in the dcerpc_smb code
(This used to be commit 128b5ea7b3)
2007-10-10 13:46:34 -05:00
Andrew Tridgell
11e9b40f13 r11819: simplified the async rpc bind code a little.
- removed the struct dcerpc_request_state as all the state
   information is already available on the dcerpc_pipe structure, so just
   use that

 - added a single dcerpc_recv_data() handler for receiving packets
   from the transport layer. This then does the initial decoding of
   the dcerpc packet, and then looks at the packet type in order to
   work out who to dispatch it to. This should allow in-flight async
   rpc requests to still work while a new bind or alter context is
   happening

 - ensure that if the transport indicates the connection is dead that
   any in-flight bind or alter context requests are given an error

 - removed full_request_private and instead use separate bind_private
   and alter_private pointers

 - added a few comments for some bits I found hard to understand
(This used to be commit 938e372bff)
2007-10-10 13:46:33 -05:00
Andrew Tridgell
38d540e9fe r11817: fixed the problem with the RPC join tests. The problem was that
revision 11809 had removed the change to the session key function
after authentication succeeds.
(This used to be commit c04c78d617)
2007-10-10 13:46:33 -05:00
Andrew Tridgell
b495bb246c r11816: this fixes some of the problems with the recent async rpc changes and
ncacn_ip_tcp/ncalrpc. The problem was that svn revision 11809 removed
the logic that forced the CONNECT auth type for authenticated binds
which don't have an explicit SIGN or SEAL flag set.
(This used to be commit e7a1f11e8b)
2007-10-10 13:46:32 -05:00
Volker Lendecke
a6852523d6 r11812: Convert winbind to the async bind routines. Also remove tridge's hack for the
winbind "bug" :-)

Volker
(This used to be commit fb9a3c7ef3)
2007-10-10 13:46:32 -05:00
Volker Lendecke
02aba4c339 r11810: Fix talloc hierarchy
(This used to be commit e1bf1c326f)
2007-10-10 13:46:31 -05:00
Volker Lendecke
f2dedc629c r11809: Make dcerpc_bind_auth async.
This also removes dcerpc_bind_auth_password, the only user of
dcerpc_bind_auth. And this was not only passwords anyway.

Andrew Bartlett, as usual: Please take a close look.

Thanks,

Volker
(This used to be commit 2ff2dae3d0)
2007-10-10 13:46:31 -05:00
Volker Lendecke
b03f5c4478 r11807: Make dcerpc_alter_context async. Same thing: Please look at this
closely. Survives RPC-ALTERCONTEXT.

Volker
(This used to be commit 1875c4808f)
2007-10-10 13:46:31 -05:00
Volker Lendecke
957869d2f4 r11806: Minor cleanup
(This used to be commit e75080b26d)
2007-10-10 13:46:30 -05:00
Volker Lendecke
82b4335dd2 r11805: dcerpc_bind_auth is only used in dcerpc_bind_auth_password
(This used to be commit 16bc6b64f9)
2007-10-10 13:46:30 -05:00
Volker Lendecke
46685f3e20 r11804: Asyncify the anonymous bind, convert the calls in xplogin.c.
Tridge et al, please take a close look at this. It survives my basic rpc-login
test as well as rpc-lsa, but this is critical I think.

Volker
(This used to be commit bf1a55f44c)
2007-10-10 13:46:30 -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
Andrew Tridgell
79b3a3afb5 r11627: give the caller much more control over the stream to packet process,
allowing it to specify the initial read size (thus preventing
over-reading) and to stop the recv process when needed. This is used
by the dcerpc socket code, which relies on not getting packets when it
isn't ready for them
(This used to be commit f869fd674e)
2007-10-10 13:46:01 -05:00
Andrew Tridgell
f3d66f310f r11623: convert the dcerpc socket layer to the generic packet code
(This used to be commit 4ea66e6e80)
2007-10-10 13:46:00 -05:00
Volker Lendecke
687dea8de6 r11516: Fix a valgrind bug I introduce with queued requests
(This used to be commit 3e4ab756f4)
2007-10-10 13:45:47 -05:00
Volker Lendecke
baff088fed r11515: Add some talloc_get_type
(This used to be commit 558c29971d)
2007-10-10 13:45:46 -05:00
Andrew Bartlett
794386e5c4 r11497: Don't name parameters 'floor'. Rename fl and floor to epm_floor for
consistancy.

Andrew Bartlett
(This used to be commit 8787eb982f)
2007-10-10 13:45:45 -05:00
Volker Lendecke
66d3ee9ccb r11473: Based on work by Jelmer, implement the [async] flag for rpc requests. If it's
not there (it's not yet on *any* call... :-)), the rpc client strictly
sequences calls to an rpc pipe. Might need some more work on the exact
sequencing semantics when a pipe with both sync and async calls is actually
deployed, but I want it in for winbind simplification.

Volker
(This used to be commit b8f324e4f0)
2007-10-10 13:45:41 -05:00
Andrew Tridgell
a872005c1c r10699: fixed the dcerpc code so that you can shutdown the pipe safely from
within a callback on the pipe. This should fix a problem volker
encountered with winbind. The fix invoolves making the recv_data
handler free the memory for a packet, instead of having the transport
layer free it after calling recv_data. When the transport layer freed
it, it had no way of knowing if the callback had shutdown the pipe, so
it had no way of knowing if it could safely use the pointer.

Also changed the pipe shutdown hook for the smb transport to use an
async SMB close. This ensures that when you shutdown the pipe, you
don't block waiting for the server to ack the close of the pipe fnum.
(This used to be commit c87d7f580e)
2007-10-10 13:39:21 -05:00
Volker Lendecke
e5c6a3e361 r10683: Samba3's wbinfo -t should give the correct answer now.
Tridge, if you have time, you might want to look at the segfault I was still
seeing. Now I store the handle to the netlogon pipe in the global winbind
state and free it on the next entry into check_machacc. The problem seems to
be that talloc_free()ing a pipe struct from within a callback function on that
pipe is not possible. I think I can live with that, but it has been not really
obvious. To reproduce the segfault you might want to look at putting a
talloc_free(state->getcreds->out.netlogon) into
wbsrv_samba3_check_machacc_receive_creds. This is called from a dcerpc
callback function.

In particular if the check failed it would be nice if I could delete the pipe
directly and not post a different event to some winbind queue.

I tried to delete the pipe from a timed event triggered immediately, but this
also fails because the inner loop seems to hit the same event again, calling
it twice.

Volker
(This used to be commit 5436d77648)
2007-10-10 13:39:18 -05:00
Volker Lendecke
aea73c168b r10681: Convert dcerpc_open_smb to a composite function.
Volker
(This used to be commit 42ff218ac9)
2007-10-10 13:39:18 -05:00
Andrew Bartlett
51cbc188df r10402: Make the RPC-SAMLOGON test pass against Win2k3 SP0 again.
I still have issues with Win2k3 SP1, and Samba4 doesn't pass it's own
test for the moment, but I'm working on these issues :-)

This required a change to the credentials API, so that the special
case for NTLM logins using a principal was indeed handled as a
special, not general case.

Also don't set the realm from a ccache, as then it overrides --option=realm=.

Andrew Bartlett
(This used to be commit 194e8f07c0)
2007-10-10 13:38:39 -05:00
Andrew Tridgell
b963050769 r10368: when building the epm tower, don't put host names in the ip address
field, instead put a zero address. Note that zero is correct (ie. we
shouldn't do the lookup) as in the client we want to send a zero for
the server to fill in. When we make this call from the server we fill
in a real IP.
(This used to be commit e54c8b5658)
2007-10-10 13:38:32 -05:00
Tim Potter
74eea860ba r10184: Fix a stack of unhandled enumeration warnings.
(This used to be commit aeb42a446b)
2007-10-10 13:38:06 -05:00
Andrew Bartlett
5edbeca141 r10153: This patch adds a new parameter to gensec_sig_size(), the size of the
data to be signed/sealed.  We can use this to split the data from the
signature portion of the resultant wrapped packet.

This required merging the gsskrb5_wrap_size patch from
lorikeet-heimdal, and fixes AES encrption issues on DCE/RPC (we no
longer use a static 45 byte value).

This fixes one of the krb5 issues in my list.

Andrew Bartlett
(This used to be commit e4f2afc343)
2007-10-10 13:38:04 -05:00
Andrew Bartlett
24186a80eb r9728: A *major* update to the credentials system, to incorporate the
Kerberos CCACHE into the system.

This again allows the use of the system ccache when no username is
specified, and brings more code in common between gensec_krb5 and
gensec_gssapi.

It also has a side-effect that may (or may not) be expected: If there
is a ccache, even if it is not used (perhaps the remote server didn't
want kerberos), it will change the default username.

Andrew Bartlett
(This used to be commit 6202267f6e)
2007-10-10 13:34:54 -05:00
Andrew Bartlett
ba90b652d9 r9505: Work on GENSEC and the code that calls it, for tighter interface
requirements, and for better error reporting.

In particular, the composite session setup (extended security/SPNEGO)
code now returns errors, rather than NT_STATUS_NO_MEMORY.  This is
seen particularly when GENSEC fails to start.

The tighter interface rules apply to NTLMSSP, which must be called
exactly the right number of times.  This is to match some of our other
less-tested modules, where adding flexablity is harder.  (and this is
security code, so let's just get it right).  As such, the DCE/RPC and
LDAP clients have been updated.

Andrew Bartlett
(This used to be commit 134550cf75)
2007-10-10 13:34:24 -05:00
Andrew Bartlett
a97f667028 r8820: Push this common block of code into the caller.
Use talloc_steal() rather than talloc_reference().

Andrew Bartlett
(This used to be commit 8774f971f3)
2007-10-10 13:30:08 -05:00
Jelmer Vernooij
6553dd0c60 r8811: Fix the build..
(This used to be commit fac77f5fa2)
2007-10-10 13:30:07 -05:00
Andrew Tridgell
e835621799 r8520: fixed a pile of warnings from the build farm gcc -Wall output on
S390. This is an attempt to avoid the panic we're seeing in the
automatic builds.

The main fixes are:

 - assumptions that sizeof(size_t) == sizeof(int), mostly in printf formats

 - use of NULL format statements to perform dn searches.

 - assumption that sizeof() returns an int
(This used to be commit a58ea6b385)
2007-10-10 13:29:34 -05:00
Andrew Tridgell
9331714787 r8073: a successful rpc call from ejs!
the ejs_echo.c code is the stuff that needs to be auto-generated by
pidl. It only does echo_AddOne so far.

We also need a table for registering these calls. The code is
hard-wired for echo_AddOne for now.
(This used to be commit b1ea58ddc4)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
e7f84503c0 r8068: reduced the verbosity of the EPM code
(This used to be commit 4c5974fc3d)
2007-10-10 13:19:04 -05:00
Andrew Tridgell
6ecc79b888 r8057: use our defined push/pull types in the validate code (fixes a warning)
(This used to be commit 4e14ebf51e)
2007-10-10 13:19:04 -05:00
Stefan Metzmacher
a6853cf5c6 r7932: don't use the nbt called name as server name, for dcerpc_server_name()
in the ncacn_np trnaport

it's now supported to use the ip address in smbtorture for ncacn_np tests
that use dcerpc_server_name(),

and we can now pass the dns host name in the tree connect when we have the dns name
on the smbtorture command line

metze
(This used to be commit e29edbc7e6)
2007-10-10 13:18:52 -05:00
Andrew Tridgell
152a6a00c3 r7865: changed pidl to take a "const void *" instead of a "void *" for the
structure in ndr_push_*() and ndr_print_*(). The push and print
functions really should not modify the structure.

metze, to make this work I had to change your spoolss hand
marshaller. Can you please check it is OK? I think that the IN and OUT
sides of that function are not ever called on the same structure, so I
think that attempt at remembering the value by assigning to
r->in._offered was not doing anything anyway, but please correct me if
I have misunderstood it.

If you really do need to remember something on those structures I'd
suggest the ndr_token_store() and ndr_token_retrieve() functions,
which are used by pidl for just this sort of thing.
(This used to be commit eee528be97)
2007-10-10 13:18:44 -05:00
Andrew Bartlett
5b19286df0 r7690: Move the NT hash generation into the credentials system, rather than
in all the callers.  This also allows us to be more flexible in the
type of password we store.

Andrew Bartlett
(This used to be commit 00b8588c68)
2007-10-10 13:18:23 -05:00
Andrew Tridgell
5c332f6e9d r7659: fixup the ordering of socket destruction for ncacn_ip_tcp so we don't try and
remove an epoll descriptor for a closed fd
(This used to be commit bec5e9f80a)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
3422499a85 r7658: don't timeout at the smb level for rpc requests as otherwise some rpc
level sign/seal mechanisms can break
(This used to be commit 9df569f023)
2007-10-10 13:18:18 -05:00
Andrew Tridgell
be8139c1e7 r7653: when a dcerpc request times out, we need to ensure that if the server
does finally answer the request and it is on the smb transport that we
don't die in the callback code as the rpc request state is gone.
(This used to be commit d47477c5c3)
2007-10-10 13:18:17 -05:00
Andrew Tridgell
64e11654d0 r7652: use event friendly connect in dcerpc socket code
(This used to be commit 154effd781)
2007-10-10 13:18:17 -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
Andrew Tridgell
ee30cf3b1d r7497: add timeouts to all rpc requests. The default timeout is 60
seconds. This should prevent the problem I am seeing on a solaris box
where a rpc request gets stuck forever
(This used to be commit c24ab34813)
2007-10-10 13:18:00 -05:00
Andrew Tridgell
d1e8e62a56 r7496: removed an unused variable
(This used to be commit a8c99d0e37)
2007-10-10 13:18:00 -05:00
Jelmer Vernooij
fcc74fc060 r7313: Prefix a few functions with ncacn_ rather then dcerpc_ because they are
ncacn_ specific
(This used to be commit 875cce1268)
2007-10-10 13:17:41 -05:00
Jelmer Vernooij
430dc36c1a r7312: Add IDL for ncadg packets.
(This used to be commit 2009a430b0)
2007-10-10 13:17:40 -05:00
Jelmer Vernooij
e427f58622 r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:

IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }

This makes the ndr_parser.pm internals much more sane.

Other changes include:

- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
  most other IDL compilers). This can be overridden using the
  default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
  is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
  useful for making sure IDL files work with other IDL compilers.

oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615)
2007-10-10 13:17:01 -05:00
Jelmer Vernooij
5b18cf2268 r6795: Make some functions static and remove some unused ones.
(This used to be commit 46509eb899)
2007-10-10 13:16:44 -05:00
Andrew Bartlett
85e9412c47 r6565: Cludge, cludge, cludge...
We need to pass the 'secure channel type' to the NETLOGON layer, which
must match the account type.

(Yes, jelmer objects to this inclusion of the kitchen sink ;-)

Andrew Bartlett
(This used to be commit 8ee208a926)
2007-10-10 13:16:26 -05:00
Andrew Bartlett
6b6bb89c91 r6526: Rename this RPC fault. Everybody else calls this ACCESS_DENIED, and
it certainly doesn't make sense as LOGON_FAILURE.

Andrew Bartlett
(This used to be commit 4bec3d3f37)
2007-10-10 13:16:22 -05:00
Andrew Bartlett
3ae4d872f5 r6272: For 'programmed' use of an anonymous account, we should use
cli_credentials_set_conf(), not cli_credentials_guess().

Also, clarify why for particular flags, we don't do a DCERPC-level
authentication.

Andrew Bartlett
(This used to be commit 838925761d)
2007-10-10 13:11:29 -05:00
Richard Sharpe
c46c6e23ba r6229: Back out these changes ...
(This used to be commit 321fbae512)
2007-10-10 13:11:28 -05:00
Richard Sharpe
66a3750b14 r6219: This change allows us to fall back to authenticating without
DCERPC_SCHANNEL_128 if we fail. Thus, it allows us to work with Windows
NT DCs ...
(This used to be commit 3034b22670)
2007-10-10 13:11:27 -05:00
Stefan Metzmacher
0ba6108bcd r6178: fix ncacn_np connection without sign or seal against NT4
metze
(This used to be commit d92100fcc2)
2007-10-10 13:11:23 -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
Jelmer Vernooij
1cb21b84a9 r5980: Fix double free after unexpected disconnect.
(This used to be commit 6149bd3702)
2007-10-10 13:11:12 -05:00
Jelmer Vernooij
7c55d0ffa5 r5976: SIDs can't have more then 5 subauths (caught by [validate] and
range())
(This used to be commit ec1eaa274b)
2007-10-10 13:11:11 -05:00
Andrew Bartlett
645711c602 r5941: Commit this patch much earlier than I would normally prefer, but metze needs a working tree...
The main volume of this patch was what I started working on today:
 - Cleans up memory handling around DCE/RPC pipes, to have a parent talloc context.
 - Uses sepereate inner loops for some of the DCE/RPC tests

The other and more important part of this patch fixes issues
surrounding the new credentials framwork:

This makes the struct cli_credentials always a talloc() structure,
rather than on the stack.  Parts of the cli_credentials code already
assumed this.

There were other issues, particularly in the DCERPC over SMB handling,
as well as little things that had to be tidied up before test_w2k3.sh
would start to pass.

Andrew Bartlett
(This used to be commit 0453f9d05d)
2007-10-10 13:11:11 -05:00
Jelmer Vernooij
455be8fb82 r5932: Use cli_credentials somewhat more in the Gtk+ code
Support ncacn_spx in DCE/RPC bindings.
(This used to be commit a0233a3a9a)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
b7676c4b48 r5930: Fix initialisation of dcerpc_binding->authservice
(This used to be commit f8cf161e0e)
2007-10-10 13:11:10 -05:00
Jelmer Vernooij
13b0776f60 r5929: Use cli_credentials for the SMB functions as well.
Fix a couple of bugs in the new cli_credentials code
(This used to be commit 4ad481cfe5)
2007-10-10 13:11:09 -05:00
Jelmer Vernooij
05bc2d7b2c r5928: Use cli_credentials in:
- gtk+ (returned by GtkHostBindingDialog as well now)
 - torture/
 - librpc/
 - lib/com/dcom/
(This used to be commit ccefd78233)
2007-10-10 13:11:08 -05:00
Andrew Bartlett
df64302213 r5902: A rather large change...
I wanted to add a simple 'workstation' argument to the DCERPC
authenticated binding calls, but this patch kind of grew from there.

With SCHANNEL, the 'workstation' name (the netbios name of the client)
matters, as this is what ties the session between the NETLOGON ops and
the SCHANNEL bind.  This changes a lot of files, and these will again
be changed when jelmer does the credentials work.

I also correct some schannel IDL to distinguish between workstation
names and account names.  The distinction matters for domain trust
accounts.

Issues in handling this (issues with lifetime of talloc pointers)
caused me to change the 'creds_CredentialsState' and 'struct
dcerpc_binding' pointers to always be talloc()ed pointers.

In the schannel DB, we now store both the domain and computername, and
query on both.  This should ensure we fault correctly when the domain
is specified incorrectly in the SCHANNEL bind.

In the RPC-SCHANNEL test, I finally fixed a bug that vl pointed out,
where the comment claimed we re-used a connection, but in fact we made
a new connection.

This was achived by breaking apart some of the
dcerpc_secondary_connection() logic.

The addition of workstation handling was also propogated to NTLMSSP
and GENSEC, for completeness.

The RPC-SAMSYNC test has been cleaned up a little, using a loop over
usernames/passwords rather than manually expanded tests.  This will be
expanded further (the code in #if 0 in this patch) to use a newly
created user account for testing.

In making this test pass test_rpc.sh, I found a bug in the RPC-ECHO
server, caused by the removal of [ref] and the assoicated pointer from
the IDL.  This has been re-added, until the underlying pidl issues are
solved.
(This used to be commit 824289dcc2)
2007-10-10 13:11:07 -05:00
Andrew Bartlett
765832748b r5667: Move schannel state into libcli/auth (as it belongs with schannel,
which will move in with the rest of GENSEC shortly).

Add the RID as another element in the schannel state.

Andrew Bartlett
(This used to be commit 69114b4a8e)
2007-10-10 13:10:58 -05:00
Stefan Metzmacher
4a3ca96fb4 r5603: add "authservice()" property to the interface property list
so we can specify allowed target service names in the idl file

the default is "host"

metze
(This used to be commit bf40d5321f)
2007-10-10 13:10:55 -05:00
Stefan Metzmacher
9bec9cb6b8 r5488: - let the request be a child of the pipe struct
to fix dcerpc_pipe_close() on a secondary connection,
  while the callers mem_ctx of a request is still valid

- fix up some memory contexts

TODO: split up output mem_ctx from ndr_pull context

metze
(This used to be commit 0bcbd694e9)
2007-10-10 13:10:50 -05:00
Andrew Tridgell
df6d143e2e r5388: uppercase the server name on ncacn_ip_tcp
(This used to be commit c47eb38593)
2007-10-10 13:09:50 -05:00
Andrew Tridgell
bed7c9ec32 r5304: removed lib/socket/socket.h from includes.h
(This used to be commit b902ea546d)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
35537c1255 r5302: fixed a compilation problem on solaris caused by the recent include
changes
(This used to be commit e7e015f79b)
2007-10-10 13:09:39 -05:00
Andrew Tridgell
e82aad1ce3 r5298: - got rid of pstring.h from includes.h. This at least makes it a bit
less likely that anyone will use pstring for new code

 - got rid of winbind_client.h from includes.h. This one triggered a
   huge change, as winbind_client.h was including system/filesys.h and
   defining the old uint32 and uint16 types, as well as its own
   pstring and fstring.
(This used to be commit 9db6c79e90)
2007-10-10 13:09:38 -05:00
Andrew Tridgell
1ac4f562e2 r5291: fixed ncacn_ip_tcp against windows
(This used to be commit 8df8308f7f)
2007-10-10 13:09:37 -05:00