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

129 Commits

Author SHA1 Message Date
Jelmer Vernooij
27dce768d3 Remove more usages of global_loadparm. 2008-10-24 14:57:03 +02:00
Jelmer Vernooij
8b06312f7e Eliminate another instance of global_loadparm. 2008-10-24 13:13:27 +02:00
Jelmer Vernooij
922a29992e Remove iconv_convenience parameter from simple string push/pull
functions.
2008-10-24 03:40:09 +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
4e8cb60222 Remove global_loadparm instance. 2008-09-30 02:11:55 +02:00
Jelmer Vernooij
c8a19f0b83 Pass options struct into session initialization functions rather than
using global_loadparm.
2008-09-30 01:29:53 +02:00
Stefan Metzmacher
b7d2ff38f5 s4:libcli/smb_composite: we only check the signature when the server return OK
We need to manually free the request, otherwise the timeout handler is
triggered later.

metze
2008-09-24 04:08:31 +02:00
Stefan Metzmacher
c01426ce73 libcli/smb_composite: for spnego session setups check the smb signature manually
We need to start signing when we got NT_STATUS_OK from the server
and manually check the signature of the servers response.

This is needed as the response might be signed with the krb5 acceptor subkey,
which comes within the server response.

With NTLMSSP this happens for the session setup:

request1  => BSRSPYL		seqnum: 0
response1 => BSRSPYL		seqnum: 0
request2  => BSRSPYL		seqnum: 0
response2  => <SIGNATURE>	seqnum: 1

and with krb5:

request1  => BSRSPYL		seqnum: 0
response1  => <SIGNATURE>	seqnum: 1

metze
2008-09-23 11:30:03 +02:00
Andrew Tridgell
d6f1dd1a42 added SMB2 setpathinfo composite wrapper
(This used to be commit e90c758738)
2008-05-20 13:37:27 +10:00
Andrew Tridgell
e7d993b8b2 added SMB2 proxying of rmdir
(This used to be commit 1e0c24b276)
2008-05-19 13:05:08 +10:00
Andrew Tridgell
66cbf7eb59 added mkdir to SMB2 proxy
(This used to be commit 1323aab11f)
2008-05-19 11:39:16 +10: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
Andrew Tridgell
de99db1084 started adding SMB2 composite functions that emulate common SMB calls
(such as unlink)
(This used to be commit 433038f3fe)
2008-05-16 15:02:14 +10:00
Andrew Bartlett
f8fb5d8c4d Reorder this function in the file, so it reads bottom-up.
The rest of this file reads bottom-up, but this function
(connect_send_negprot()) was out of place.

Andrew Bartlett
(This used to be commit f0c95cd74f)
2008-05-05 12:57:23 +10:00
Andrew Bartlett
35e45534c6 Revert to using the old CIFS connection API.
Rather than add a new 'out' member to the API, simply fill in the
'tree' early enough that we can access the server challenge there.

Andrew Bartlett
(This used to be commit 6dbbcf8aaf)
2008-04-25 15:59:22 +01:00
Andrew Bartlett
c4219fd803 Make the composite 'connect to server' code useful for security=server
The ability to short-circuit the connection code to only do a negprot
allows us to do the rest once we have the user's password.  We return
the 8 byte challenge so we can pass it to the client.

Andrew Bartlett
(This used to be commit 40fe386b03)
2008-04-25 15:08:52 +01: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
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
2946a11dc7 Remove use of global_loadparm.
(This used to be commit 4472d7e1e4)
2008-02-28 20:30:03 +01:00
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
263a77c561 Remove more uses of global_loadparm.
(This used to be commit a1715b1f48)
2008-02-21 15:45:32 +01:00
Jelmer Vernooij
921b176484 Remove more uses of global_loadparm.
(This used to be commit 47d05ecf6f)
2008-02-21 14:50:57 +01:00
Jelmer Vernooij
9d09a06920 r26676: libcli: Fill in lp_workgroup() again, should fix my breakage of cifsdd tests. Thanks to Andrew for catching this.
Also fixes a typo in sessetup.c.
(This used to be commit b97de4a655)
2008-01-06 16:06:04 -06:00
Jelmer Vernooij
b7e34eb625 r26674: smb_composite: Avoid use of global_loadparm.
Hopefully this fixes OpenChange's mapiadmin.
(This used to be commit 2df0f7016e)
2008-01-05 13:36:02 -06:00
Jelmer Vernooij
2da3464080 r26670: Janitorial: Remove global_loadparm uses.
(This used to be commit 13cc6ca1d3)
2008-01-05 09:42:02 -06: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
4b0199a549 r26409: Pass smb ports along.
(This used to be commit 2833f320de)
2007-12-21 05:49:42 +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
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
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
fface33dd7 r26231: Spell check: credentails -> credentials.
(This used to be commit 4b46888bd0)
2007-12-21 05:47:09 +01:00
Jelmer Vernooij
2151cde580 r25554: Convert last instances of BOOL, True and False to the standard types.
(This used to be commit 566aa14139)
2007-10-10 15:07:55 -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
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
6cf69fee18 r24994: Fix some C++ warnings.
(This used to be commit 925abf74fa)
2007-10-10 15:05:26 -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
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
Stefan Metzmacher
298f178dca r22628: convert to new composite api
and free the smbcli_request explicit to fix a crash where
the request handler gets called after its private data is already
freed

metze
(This used to be commit 55306c6188)
2007-10-10 14:51:55 -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
Stefan Metzmacher
827d142e9d r19481: - reset the vuid before trying a new session setup
- only touch session->vuid when needed
- it make no sense to set an .spnego.out.vuid

metze
(This used to be commit 1940fbed15)
2007-10-10 14:21:41 -05:00
Stefan Metzmacher
9b97c4d02e r19480: - clear the whole session struct (only let the pid untouched)
- zero state struct

metze
(This used to be commit 97fb407a4c)
2007-10-10 14:21:41 -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
9c8fa196ba r17277: we need to trigger an event when we return directly,
otherwise the callers callback function will not be called
and the caller is hanging forever...

metze
(This used to be commit e231eba828)
2007-10-10 14:15:05 -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
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 Bartlett
5d689a5de2 r15416: Point out that this doesn't work, but for servers this old, I just
don't care...

Andrew Bartlett
(This used to be commit 8abe7ba619)
2007-10-10 14:05:35 -05:00
Andrew Bartlett
ed752c8004 r15415: Use Jelmer's new credentials 'wrong password' code to give the user 3
attempts for the password, when talking to a remote CIFS server.

Andrew Bartlett
(This used to be commit 3a4ddc8f59)
2007-10-10 14:05:34 -05:00
Stefan Metzmacher
1af925f394 r14860: create libcli/security/security.h
metze
(This used to be commit 9ec706238c)
2007-10-10 13:59:44 -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
Andrew Tridgell
72a7052fa7 r14414: added some error checks
(This used to be commit cd9f3adc75)
2007-10-10 13:57:20 -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
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
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
77ffddec19 r13850: Test (and fix) not using SPNEGO at all, but instead using raw NTLMSSP.
The switch to turn off SPNEGO in the client is a bit messy, but it works.

Andrew Bartlett
(This used to be commit 085ba80cc8)
2007-10-10 13:52:15 -05:00
Andrew Bartlett
debf1c9a92 r13405: Allow a fallback if SPNEGO is somehow disabled in the client, to just NTLMSSP.
Andrew Bartlett
(This used to be commit 3e96975d91)
2007-10-10 13:51:53 -05:00
Andrew Bartlett
fd007e5512 r13203: Make this comment clearer.
Andrew Bartlett
(This used to be commit 8e2b461669)
2007-10-10 13:51:33 -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
Andrew Tridgell
2b7ee2ceee r11692: added a full composite (async) spnego session setup for SMB2. This
simplies the torture code a lot.
(This used to be commit 7bf1046fbb)
2007-10-10 13:46:14 -05:00
Volker Lendecke
0ed6a35f00 r11533: Be a bit less intrusive
(This used to be commit f341c8b4c8)
2007-10-10 13:45:50 -05:00
Volker Lendecke
08964b9de8 r11532: Enable kerberos session setup for winbind smb connections
(This used to be commit f0e4075db5)
2007-10-10 13:45:50 -05:00
Volker Lendecke
8f91998e04 r11424: Fix an uninitialized variable warning
(This used to be commit fed26bc4fd)
2007-10-10 13:45:36 -05:00
Volker Lendecke
134b2488c8 r11369: Implement socket_connect_multi: Connect to multiple ipv4 tcp ports in
sequence, with a 2-millisecond timeout between firing the syn packets. Build
smbcli_sock_connect_send upon that.

Volker
(This used to be commit 5718df44d9)
2007-10-10 13:45:27 -05:00
Volker Lendecke
3608b6af42 r11264: Winbind does not rely on the hostname resolution mechanisms of
composite_connect, so in io.in.dest_host I'm setting the IP address. Gensec
does not like that as a target hostname, so if a called name is present, use
that. So we can session setup using kerberos now.

Volker
(This used to be commit c26b432c27)
2007-10-10 13:45:10 -05:00
Volker Lendecke
df30ef140d r11248: Fix anon fallback with spnego
(This used to be commit 13ebdea115)
2007-10-10 13:45:07 -05:00
Andrew Bartlett
f7ff0540d2 r10981: Pull code to decide between and implement NTLMv2, NTLM and LM
authentication out of the various callers and into the kitchen
sink.. err, credentials subsystem.

This should ensure consistant logic, as well as get us one step closer
to security=server operation in future.

Andrew Bartlett
(This used to be commit 09c9576330)
2007-10-10 13:39:50 -05:00
Volker Lendecke
d617556ef5 r10878: Reply to some comments by tridge and metze:
* rename the composite helper functions from comp_* to composite_*

* Move the lsa initialization to wb_connect_lsa.c

* Equip smb_composite_connect with a fallback_to_anonymous

The latter two simplify wb_init_domain.c quite a bit.

Volker
(This used to be commit deb127e04e)
2007-10-10 13:39:39 -05:00
Volker Lendecke
68c70ef396 r10677: Add smb_composite_connectmulti: Send out multiple SYN packets at once, use the
first one that replies correctly.

Add a talloc context to smb_composite_connect()

Volker
(This used to be commit 6b88de182e)
2007-10-10 13:39:17 -05:00
Andrew Bartlett
f9fea8ba77 r10598: Factor out common code, in preperation for a move elsewhere.
Andrew Bartlett
(This used to be commit 0d757b169a)
2007-10-10 13:39:10 -05:00
Stefan Metzmacher
ab4d635b92 r10504: - seperate implementation specific stuff, from the generic composite
stuff.
- don't use SMBCLI_REQUEST_* state's in the genreic composite stuff
- move monitor_fn to libnet.

NOTE: I have maybe found some bugs, in code that is dirrectly in DONE or ERROR
      state in the _send() function. I haven't fixed this bugs in this
      commit! We may need some composite_trigger_*() functions or so.
      And maybe some other generic helper functions...

metze
(This used to be commit 4527815a0a)
2007-10-10 13:38:57 -05:00