1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-12 20:58:37 +03:00

144 Commits

Author SHA1 Message Date
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
Jeremy Allison
71d0191c31 r15115: Fix error return on sessionsetup. Ensure no
data blob is added if the logon call failed.
Jeremy.
2007-10-10 11:16:24 -05:00
Jeremy Allison
2454af392a r14790: Fix possible null deref. Coverity #277.
Jeremy.
2007-10-10 11:15:48 -05:00
Jeremy Allison
c0f906ac8d r14170: Paranioa fix for sesssetup.
Fix Coverity bug #26. Guard against NULL ref.
Jeremy.
2007-10-10 11:15:15 -05:00
Jeremy Allison
754818f8cc r14168: Fix Coverity #219. I think this is a false coverity
warning as it seems to get confused with assignment
and comparison. Clarify the code anyway.
Jeremy.
2007-10-10 11:15:14 -05:00
Günther Deschner
773e33c971 r14130: Remove make_server_info_pac alltogether, make_server_info_info3 does
already do what we need.

Guenther
2007-10-10 11:11:14 -05:00
Gerald Carter
8dafa45b97 r14112: * fix checks on return code from register_vuid() which could actually
fail and we would still return success in the SMBsesssetup reply :-(
* Make sure to create the local token for the server_fino struct
  in reply_spnego_kerberos() so that register_vuid() does not fail.
  (how did this ever work?)
2007-10-10 11:11:13 -05:00
Jeremy Allison
7d21cf420f r13604: Fix for bug #3512 "use spnego=no" and "server signing=auto" cause client to disconnect after negprot"
We missed one case of ignoring "BSRSPYL ".
Merge for 3.0.21c.
Jeremy.
2007-10-10 11:10:19 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Volker Lendecke
5629ca1623 r11909: Implement 'reset on zero vc'. This kills other connections when a session
setup comes in with the vc (virtual connection) field set to zero. This is
done by Windows, probably you can tweak that by some registry key.

	This boolean option controls whether an incoming session setup
	should kill other connections coming from the same IP. This matches
        the default Windows 2003 behaviour.

	Setting this parameter to yes becomes necessary when you have a flaky
	network and windows decides to reconnect while the old connection
	still has files with share modes open. These files become inaccessible
	over the new connection.

	The client sends a zero VC on the new connection, and Windows 2003
	kills all other connections coming from the same IP. This way the
	locked files are accessible again.

	Please be aware that enabling this option will kill connections behind
	a masquerading router.

Volker
2007-10-10 11:05:34 -05:00
Günther Deschner
43b57715e9 r11846: Destroy the TALLOC_CTX on error in the Kerberos session setup and give a
more precise inline comment why PAC verification may fail.

Guenther
2007-10-10 11:05:29 -05:00
Gerald Carter
8bead2d282 r11661: Store the INFO3 in the PAC data into the netsamlogon_cache.
Also remove the mem_ctx from the netsamlogon_cache_store() API.

Guenther, what should we be doing with the other fields in
the PAC_LOGON_INFO?
2007-10-10 11:05:23 -05:00
Gerald Carter
b0a2d43b60 r11655: Two small fixes
* remove redundant call to sub_set_smb_name() in session setup code.
* Fix lockup when running 'wbinfo -t' on a Samba PDC.  Cause
  was new authenticated session setup from winbindd which
  resulted in a mangled username (machine_) that was not found
  in the local files and so was queiued up to nss_winbindd.
  Deadlock....
  So now make sure to keep the trailing '$' for machine account
  names when calling sub_set_smb_name().
2007-10-10 11:05:23 -05:00
Günther Deschner
908ac0c9ec r11213: Fix the build
Guenther
2007-10-10 11:05:06 -05:00
Günther Deschner
a8d5d6b845 r11183: add small helper function to return a PAC_LOGON_INFO.
Guenther
2007-10-10 11:05:06 -05:00
Gerald Carter
939c3cb5d7 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
2007-10-10 11:04:48 -05:00
Andrew Bartlett
7adeba4036 r8913: Fix memory leak in -r 8912: Free the right thing, rather than blob1 'twice'.
Andrew Bartlett
2007-10-10 11:00:20 -05:00
Andrew Bartlett
78f0640a4b r8912: Samba 3.0 was failing from a Vista client, because it was using 'raw'
NTLMSSP (not wrapped in SPNEGO).  We really should have supported this
anyway, but we got away with it for a while...

Andrew Bartlett
2007-10-10 11:00:19 -05:00
Gerald Carter
aab17a7095 r8472: abartlet's patch for parallel ntlmssp supporttrunk/source/smbd/sesssetup.c 2007-10-10 11:00:06 -05:00
Jeremy Allison
1de27da470 r7963: Add aio support to 3.0.
Jeremy.
2007-10-10 10:58:05 -05:00
Jeremy Allison
9506b8e145 r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
2007-10-10 10:58:00 -05:00
Gerald Carter
3faaa5c3eb r7398: commiting abartlet's patch for kerberos authentication when using a keytab and security != ads 2007-10-10 10:57:08 -05:00
Gerald Carter
b7455fbf81 r7395: * new feature 'map to guest = bad uid' (based on patch from
aruna.prabakar@hp.com).

This re-enables the Samba 2.2 behavior where a user that was
successfully authenticated by a remote DC would be mapped
to the guest account if there was not existing UNIX account
for that user and we could not create one.
2007-10-10 10:57:08 -05:00
Gerald Carter
4cda2bd035 r7372: abartet's patch for BUG 2391 (segv caused by free a static pointer) 2007-10-10 10:57:06 -05:00
Gerald Carter
9727d05241 r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1 2007-10-10 10:57:02 -05:00
Gerald Carter
c70c5c4ee9 r7024: reverting mistaken commit 2007-10-10 10:57:00 -05:00
Gerald Carter
3a91b20e4b r7020: fixing printer ace values and getting rid of false compiler warning about unitialized variable 2007-10-10 10:57:00 -05:00
Herb Lewis
efea76ac71 r6225: get rid of warnings from my compiler about nested externs 2007-10-10 10:56:30 -05:00
Derrell Lipman
994694f7f2 r6149: Fixes bugs #2498 and 2484.
1. using smbc_getxattr() et al, one may now request all access control
   entities in the ACL without getting all other NT attributes.
2. added the ability to exclude specified attributes from the result set
   provided by smbc_getxattr() et al, when requesting all attributes,
   all NT attributes, or all DOS attributes.
3. eliminated all compiler warnings, including when --enable-developer
   compiler flags are in use.  removed -Wcast-qual flag from list, as that
   is specifically to force warnings in the case of casting away qualifiers.

Note: In the process of eliminating compiler warnings, a few nasties were
      discovered.  In the file libads/sasl.c, PRIVATE kerberos interfaces
      are being used; and in libsmb/clikrb5.c, both PRIAVE and DEPRECATED
      kerberos interfaces are being used.  Someone who knows kerberos
      should look at these and determine if there is an alternate method
      of accomplishing the task.
2007-10-10 10:56:24 -05:00
Jeremy Allison
4868e42027 r6020: Never do NT status codes with protocols before NT1 as we don't get client caps.
Jeremy.
2007-10-10 10:56:16 -05:00
Gerald Carter
19a639ac46 r5952: BUG 2469: patch from Jason Mader to cleanup compiler warning when not using krb5 2007-10-10 10:56:11 -05:00
Jeremy Allison
3e10c36cb5 r5290: Fix for bug #2323 - plaintext problem with WinXP.
Jeremy.
2007-10-10 10:55:36 -05:00
Jeremy Allison
65dfae7ea4 r3946: Fix for bugid #2085 reported by Jason Mader <jason@ncac.gwu.edu>. Use consistent
enum type for Protocol extern.
Jeremy.
2007-10-10 10:53:26 -05:00
Gerald Carter
e1364ff774 r1370: BUG 1297 - prevent map_username() from being called twice during logon 2007-10-10 10:52:08 -05:00
Andrew Bartlett
9d5821d5ee r1122: As spotted by lha@stacken.kth.se we don't actually use this variable any more.
Andrew Bartlett
2007-10-10 10:51:56 -05:00
Jeremy Allison
4695cc95fe r786: Memory leak fixes in (mostly) error code paths from
kawasa_r@itg.hitachi.co.jp. A couple of mem leak fixes in
mainline code paths though :-).
Jeremy.
2007-10-10 10:51:38 -05:00
Andrew Bartlett
724e8d3f33 r69: Global rename of 'nt_session_key' -> 'user_session_key'. The session key could
be anything, and may not be based on anything 'NT'.  This is also what microsoft
calls it.
2007-10-10 10:51:06 -05:00
Andrew Tridgell
40b5794ae0 r59: revert session key problem 2007-10-10 10:51:06 -05:00
Andrew Bartlett
26d8791dde r49: Support SMB signing on connections using only the
LANMAN password.  This also corrects the 'session key'
for these connections.
2007-10-10 10:51:06 -05:00
Andrew Bartlett
e27b5cbe75 Merge from HEAD the SMB signing patch that I developed a couple of weeks
ago.

This patch re-adds support for 'optional' SMB signing.  It also ensures that
we are much more careful about when we enable signing, particularly with
on-the-fly smb.conf reloads.

The client code will now attempt to use smb signing by default, and disable
it if the server doesn't correctly support it.

Andrew Bartlett
-
Gerald Carter
a90c3bd281 BUG 417: fix %UuGg variables expansion in include lines setging the current_user_info struct in register_vuid() -- shouldn't be any more broken than we were -
Gerald Carter
f2eaa14b1e BUG 1165, 1126: Fix bug with secondary groups (security = ads) and winbind use default domain = yes -
Andrew Bartlett
493ac5ce98 Patch by Luca Bolcioni <Luca.Bolcioni@yacme.com>. Ensure we always
initialise the session key.  Fixes segfaults with security=server, and
encrypt passwords = no.

Andrew Bartlett
-
Volker Lendecke
3d9931fe29 reply_spnego_kerberos did not set the domain of the user handed to
register_vuid correctly. We ended up with the local netbios name in
substitutions for %D later.

Volker

P.S: Tridge, I can *really* see why you want to get rid of global variables
:-)
-
Jeremy Allison
8e20c06ed3 Fix from Luke Howard <lukeh@PADL.COM> for incorrect early free().
Jeremy.
-