1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-28 17:47:29 +03:00

188 Commits

Author SHA1 Message Date
Jeremy Allison
963fc76852 Remove most of the remaining globals out of lib/util_sock.c.
I have a plan for dealing with the remaining..... Watch
this space.
Jeremy.
2007-11-03 23:20:10 -07:00
Jeremy Allison
95d01279a5 I can't get away without a 'length' arg. :-).
Jeremy.
2007-11-03 18:41:26 -07:00
Jeremy Allison
e848506c85 Stop get_peer_addr() and client_addr() from using global
statics. Part of my library cleanups.
Jeremy.
2007-11-03 18:15:45 -07:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00
Jeremy Allison
baf1f52e34 Add const to the get_peer_addr() and get_socket_addr()
calls. Use the IPv6 varient for get_peer_addr().
Jeremy.
2007-10-11 15:36:13 -07:00
Michael Adam
cd3d652d0d r25286: Fix one more caller of unistr2_to_ascii() that passed
in -1 for maxlen.

Michael
2007-10-10 12:30:57 -05:00
Volker Lendecke
17df313db4 r24702: Remove the old API pointers 2007-10-10 12:30:14 -05:00
Volker Lendecke
d82f354487 r24661: Fix some obvious diffs between 3_2 and 3_2_0
Jeremy, there are two remaining diffs in sesssetup.c which I don't really
know which one is right. Can you take a look?

Thanks,

Volker
2007-10-10 12:30:13 -05:00
Jeremy Allison
fd682c3f39 r24638: Remove redundent setting of vuid.
Jeremy
2007-10-10 12:30:12 -05:00
Jeremy Allison
41611a22ed r24590: Reformatting to coding standards. Added my (C) in places it already should
have been :-).
Jeremy.
2007-10-10 12:30:08 -05:00
Jeremy Allison
a54f2805df r24589: Refactor our vuid code so that we keep the same
vuid that was allocated whilst the connection is
being constructed and after the connection has been set up.
This is what Windows does and at least one client
(and HP printer) depends on this behaviour. As it
depends on the req struct not yet ported to SAMBA_3_2_0
(Volker, hint hint.... :-) I am not yet adding this
to that branch, but will investigate that tomorrow.
Jeremy.
2007-10-10 12:30:08 -05:00
Volker Lendecke
248f15ff14 r24135: Convert call_trans2open to the new API
This itself won't help much, because send_trans2_replies_new still allocates
the big buffers, but stay tuned :-)

Also add/update my copyright on stuff I recently touched.

Volker
2007-10-10 12:29:10 -05:00
Volker Lendecke
35675a6a33 r24056: Another big one: This converts reply_sesssetup_and_X to the new API. As usual,
its history can be found on http://samba.org/~vlendec/sesssetup/. This very
obviously needs close review.

Volker
2007-10-10 12:29:00 -05:00
Volker Lendecke
53027d0ee2 r24050: Fix a typo 2007-10-10 12:29:00 -05:00
Volker Lendecke
5594af2b20 r23997: Check in the infrastructure for getting rid of the global InBuffer/OutBuffer
The complete history of this patch can be found under
http://www.samba.org/~vlendec/inbuf-checkin/.

Jeremy, Jerry: If possible I would like to see this in 3.2.0. I'm only
checking into 3_2 at the moment, as it currently will slow down operations for
all non-converted (i.e. all at this moment) operations, as it will copy the
talloc'ed inbuf over the global InBuffer. It will need quite a bit of effort
to convert everything necessary for the normal operations an XP box does.

I have patches for negprot, session setup, tcon_and_X, open_and_X, close. More
to come, but I would appreciate some help here.

Volker
2007-10-10 12:28:53 -05:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jeremy Allison
9e1663b1f1 r23736: Use local variable of smb_flag2 instead of using the macro every time.
Jeremy.
2007-10-10 12:23:50 -05:00
Volker Lendecke
836782b07b r23726: Explicitly pass down the FLAGS2 field to srvstr_pull_buf. The next
checkin will pull this up to srvstr_get_path. At that point we can get more
independent of the inbuf, the base_ptr in pull_string will only be used
to satisfy UCS2 alignment constraints.
2007-10-10 12:23:49 -05:00
Gerald Carter
cbd33da9f7 r23474: Here's a small patch that disables the libkrb5.so replay cache
when verifying a ticket from winbindd_pam.c.

I've found during multiple, fast, automated SSH logins (such
as from a cron script) that the replay cache in MIT's krb5
lib will occasionally fail the krb5_rd_req() as a replay attack.

There seems to be a small window during which the MIT krb5
libs could reproduce identical time stamps for ctime and cusec
in the authenticator since Unix systems only give back
milli-seconds rather than the micro-seconds needed by the
authenticator.  Checked against MIT 1.5.1.  Have not
researched how Heimdal does it.

My thinking is that if someone can spoof the KDC and TDS
services we are pretty hopeless anyways.
2007-10-10 12:23:19 -05:00
Volker Lendecke
ccb5eb245e r23172: Change shutdown_other_smbds to use connections_traverse instead of
session_traverse.
2007-10-10 12:22:52 -05:00
Volker Lendecke
74fa57ca5d r22868: Replace some message_send_pid calls with messaging_send_pid calls. More
tomorrow.
2007-10-10 12:22:04 -05:00
Volker Lendecke
3d3d61687e r22844: Introduce const DATA_BLOB data_blob_null = { NULL, 0, NULL }; and
replace all data_blob(NULL, 0) calls.
2007-10-10 12:22:01 -05:00
Volker Lendecke
be7bac55c3 r22751: Next step for the cluster merge: sessionid.tdb should contain a 'struct
server_id' instead of a 'uint32 pid'
2007-10-10 12:21:54 -05:00
Volker Lendecke
a66a04e9f1 r22747: Fix some C++ warnings 2007-10-10 12:21:54 -05:00
Jeremy Allison
2d80a96120 r22391: Looks bigger than it is. Make "inbuf" available
to all callers of smb_setlen (via set_message()
calls). This will allow the server to reflect back
the correct encryption context.
Jeremy.
2007-10-10 12:19:30 -05:00
Gerald Carter
e5c9fc937d r22095: BUG 4484: Add more checks to set %a for Vista clients (based on absence of native OS and Lanman strings in the session setup request) 2007-10-10 12:19:11 -05:00
Jeremy Allison
60fc9c0aed r21882: The server part of the code has to use an AUTH_NTLMSSP struct,
not just an NTLMSSP - grr. This complicates the re-use of
common client and server code but I think I've got it right.
Not turned on of valgrinded yet, but you can see it start
to take shape !
Jeremy.
2007-10-10 12:18:43 -05:00
Jeremy Allison
89bdd30e4b r21847: Fix memory leaks in error paths (and in main code path in one case...)
in sasl bind. Wonder why coverity didn't find these ?
Jeremy.
2007-10-10 12:18:37 -05:00
Jeremy Allison
c426340fc7 r21845: Refactor the sessionsetupX code a little to allow us
to return a NT_STATUS_TIME_DIFFERENCE_AT_DC error to
a client when there's clock skew. Will help people
debug this. Prepare us for being able to return the
correct sessionsetupX "NT_STATUS_MORE_PROCESSING_REQUIRED"
error with associated krb5 clock skew error to allow
clients to re-sync time with us when we're eventually
able to be a KDC.
Jeremy.
2007-10-10 12:18:37 -05:00
Jeremy Allison
4a74d042c9 r21483: Fix use of uninitialized variable.
Jeremy.
2007-10-10 12:18:08 -05:00
Jeremy Allison
6be078da26 r21478: Add 65k length limit for split SPNEGO blobs.
Jeremy
2007-10-10 12:18:07 -05:00
Volker Lendecke
e7e6b8b5e0 r21461: Not strictly necessary, as data_blob() panics if it can't allocate. But I'd
see this as a design flaw in data_blob() and it made me look in that routine.

Jeremy, revert or merge please :-)

Volker
2007-10-10 12:18:06 -05:00
Jeremy Allison
aa69f2481a r21460: Fix for server-side processing of SPNEGO auth
fragmented into "max xmit" size security blob
chunks. Bug #4400. Needs limits adding, and also
a client-side version.
Jeremy.
2007-10-10 12:18:06 -05:00
Jeremy Allison
45dcf62960 r21128: Fix Vista connecting to Samba in share level security.
Vista sends the NTLMv2 blob by default in the tconX
packet. Make sure we save off the workgroup the user
was logged into on the client in the sessionsetupX
and re-use it for the NTLMv2 calc.
Jeremy.
2007-10-10 12:17:41 -05:00
Herb Lewis
ac3eb7813e r20124: clean up nested extern declaration warnings 2007-10-10 12:16:26 -05:00
Simo Sorce
97f150fbbb r19986: ooops 2007-10-10 12:16:17 -05:00
Simo Sorce
2a7454959e r19984: Must have been drunk yesterday.
Freeing memctx is all we need, fix double free stupidity
2007-10-10 12:16:17 -05:00
Simo Sorce
550f651499 r19980: Implement pam account stack checks when obey pam restrictions is true.
It was missing for security=server/domain/ads

Simo.
2007-10-10 12:16:17 -05:00
Simo Sorce
defa0a352b r19979: Fix memleak on pw and change talloc_destroy to TALLOC_FREE for mem_ctx 2007-10-10 12:16:17 -05:00
Jeremy Allison
0c77046751 r18907: W00t. My original fix was correct after all :-).
Re-checking it in.
Fix bug #4095 - username composed into domain\user
twice in spnego path.
Jeremy.
2007-10-10 12:14:45 -05:00
Jeremy Allison
d0fdd5eb1e r18403: Revert until we get this sorted out correctly.
Jeremy.
2007-10-10 11:51:22 -05:00
Jeremy Allison
e872bacf28 r18398: Fix bug #4095 - username composed into domain\user
twice in spnego path. Jerry please check.
Jeremy.
2007-10-10 11:51:21 -05:00
Gerald Carter
779eba0a7c r17909: ensure we do not call map_username() twice on Krb5 session setups 2007-10-10 11:38:58 -05:00
Jeremy Allison
d357f8b335 r16397: Fix Klocwork #11767 and drasticly simplify the
logic in smbd/process.c. All interested (Volker,
Jerry, James etc). PLEASE REVIEW THIS CHANGE.
The logic should be identical but *much* easier
to follow and change (and shouldn't confuse Klockwork :-).
Jeremy.
2007-10-10 11:18:52 -05:00
Volker Lendecke
8059d0ae39 r15589: While trying to understand the vuid code I found that security=share is broken
right now. r14112 broke it, in 3.0.22 register_vuid for security=share returns
UID_FIELD_INVALID which in current 3_0 is turned into an error condition. This
makes sure that we only call register_vuid if sec!=share and meanwhile also
fixes a little memleak.

Then I also found a crash in smbclient with sec=share and hostmsdfs=yes.

There's another crash with sec=share when coming from w2k3, but I need sleep
now.

Someone (jerry,jra?) please review the sesssetup.c change.

Thanks,

Volker
2007-10-10 11:17:02 -05:00
Günther Deschner
a75dd80c62 r15523: Honour the time_offset also when verifying kerberos tickets. This
prevents a nasty failure condition in winbindd's pam_auth where a tgt
and a service ticket could have been succefully retrieved, but just not
validated.

Guenther
2007-10-10 11:16:55 -05:00
Volker Lendecke
2765c4ff8d r15475: Ugly and disgusting patch to fix the username map problem I created by
changing the token generation. I *hate* this code!

Jerry, you have been looking at this as well, can you double-check that I did
not screw it up?

Thanks,

Volker
2007-10-10 11:16:52 -05:00
Volker Lendecke
d2f39ae7fe r15472: Remove an unused function parameter 2007-10-10 11:16:52 -05:00
Jeremy Allison
e9b016ced6 r15467: Ensure every exit error path calls nt_status_squash.
Jeremy.
2007-10-10 11:16:51 -05:00