1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

666 Commits

Author SHA1 Message Date
Tim Potter
df0db8edb1 Fixed looking up domain (winbind) users ahead of local users in
domain_client_validate()
-
Andrew Tridgell
5b1c942a5c free the negTokenInit structure -
Gerald Carter
4f47daf97b merge from 2.2. Why is STR_CONVERT missing when comparing
2.2 to HEAD?
-
Jeremy Allison
b1930abb35 Got serious about const again.
REMOVED BZERO CALLS YET AGAIN !!! Why do these keep creeping back in....
They are *NOT* POSIX. I'm also thinking of removing strncpy as I'm sure
it's not being used correctly....
Jeremy.
-
Jeremy Allison
ee5e7ca547 Added NT_USER_TOKEN into server_info to fix extra groups problem.
Got "medieval on our ass" about const warnings (as many as I could :-).
Jeremy.
-
Steve French
4e882289b0 Added support for UserListGroups, ServiceEnum -
Andrew Bartlett
f70fb819b2 This is a farily large patch (3300 lines) and reworks most of the AuthRewrite
code.

In particular this assists tpot in some of his work, becouse it provides the
connection between the authenticaion and the vuid generation.

Major Changes:
	- Fully malloc'ed structures.
	  - Massive rework of the code so that all structures are made and destroyed
	    using malloc and free, rather than hanging around on the stack.
	- SAM_ACCOUNT unix uids and gids are now pointers to the same, to allow them
	   to be declared 'invalid' without the chance that people might get ROOT by
	   default.

	- kill off some of the "DOMAIN\user" lookups.  These can be readded at a more
	  appropriate place (probably domain_client_validate.c) in the future. They
	  don't belong in session setups.

	- Massive introduction of DATA_BLOB structures, particularly for passwords.

	- Use NTLMSSP flags to tell the backend what its getting, rather than magic
	  lenghths.

	- Fix winbind back up again, but tpot is redoing this soon anyway.

	- Abstract much of the work in srv_netlog_nt back into auth helper functions.

This is a LARGE change, and any assistance is testing it is appriciated.

Domain logons are still broken (as far as I can tell) but other functionality
seems
intact.

Needs testing with a wide variety of MS clients.

Andrew Bartlett
-
Andrew Bartlett
ceba373aa3 More const. -
Tim Potter
4eeb7bcd78 Added some extra fields to the auth_serversupplied_info structure.
To obtain the full group membership of a user (i.e nested groups on a
win2k native mode server) it is necessary to merge this list of groups
with the groups returned by winbindd when creating an nt access token.

This breaks winbindd linking while AB and I sync up our changes to the
authentication subsystem.
-
Tim Potter
b30232e2b7 Some tweaking to make the samlogon function look more like NT on the wire. -
Andrew Bartlett
0c8e9339d8 Parionia to ensure people don't install libsmb based programs setuid root.
libsmb has not been written to be setuid, with things like LIBSMB_PROG allowing
all sort of fun and games.

Andrew Bartlett
-
Tim Potter
c78fec86c9 Fix debug in domain_client_validate() when password server = *. -
Tim Potter
0758c0ea84 Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level.  This allows us to test interactive or network logons.

Interestingly enough a win2k native mode server generates a rpc fault when
presented with a network logon!
-
Tim Potter
7c5ac46b8a Added samlogon command to test against win2k native mode server. I think
there's a bug in the marshalling of net_sam_logon.
-
Andrew Bartlett
cb84485a2b This patch applied, except without the structure changes to nmblib.c
Andrew Bartlett.

From kai@cmail.ru Mon Oct 29 18:50:42 2001
Date: Fri, 19 Oct 2001 17:26:06 +0300
From: Andrew V. Samoilov <kai@cmail.ru>
To: samba-technical@lists.samba.org
Subject: [patch]: makes some arrays const to be shared between processes

Hi!

This patch makes some arrays const. So these arrays go to text/rodata
segment and are shared between all of the processes which use shared
library with these arrays.

Regards,
Andrew V. Samoilov.

P.S. Please cc your answer to kai@cmail.ru,
I don't subscribed to this list.


ChangeLog:
	* cliconnect.c (prots): Make const.
	* clierror.c (rap_errmap): Likewise.
	* nmblib.c (nmb_header_opcode_names): Likewise.
	(lookup_opcode_name): Make opcode_namep const. Eliminate i.
	* nterr.c (nt_err_code_struct): Typedef const.
	* smberr.c (err_code_struct): Make const.
	(err_classes): Likewise.
-
Andrew Bartlett
c95f5aeb93 This commit is number 4 of 4.
In particular this commit focuses on:

Actually adding the 'const' to the passdb interface, and the flow-on changes.

Also kill off the 'disp_info' stuff, as its no longer used.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.

----

These changes introduces a large dose of 'const' to the Samba tree.
There are a number of good reasons to do this:

	- I want to allow the SAM_ACCOUNT structure to move from wasteful
	pstrings and fstrings to  allocated strings.  We can't do that if
	people are modifying these outputs, as they may well make
	assumptions about getting pstrings and fstrings

	- I want --with-pam_smbpass to compile with a slightly sane
	volume of warnings, currently its  pretty bad, even in 2.2
	where is compiles at all.

	- Tridge assures me that he no longer opposes 'const religion'
	based on the ability to  #define const the problem away.

	- Changed Get_Pwnam(x,y) into two variants (so that the const
	parameter can work correctly): - Get_Pwnam(const x) and
	Get_Pwnam_Modify(x).

	- Reworked smbd/chgpasswd.c to work with these mods, passing
	around a 'struct passwd' rather  than the modified username

---

This finishes this line of commits off, your tree should now compile again :-)

Andrew Bartlett
-
Herb Lewis
12c10e876e more compiler warnings -
Andrew Tridgell
3f919b4360 a quick fix to get rpcclient working again. This just disables
NTLMSSP in cli_establish_connection()

What we really need to do is kill off the pwd_cache code. It is horrible,
and assumes the challenge comes in the negprot reply.
-
Jeremy Allison
070fd5180f Fix for @ in pathname from Kian Win.
Jeremy.
-
Jeremy Allison
b668d7d656 Ok, I know it's a language thing and it shouldn't matter.... but a kerberos
name is a "principal", not a principle. English majors will complain :-).
Jeremy.
-
Andrew Bartlett
44bdb8b12b Fix for compilation on non-krb5 systems -
Andrew Tridgell
d1341d74b7 made smbclient cope better with arbitrary principle forms -
Andrew Tridgell
eac164c7e6 support both old and new kerberos OIDs -
Jeremy Allison
058ae6b58f Move from timestamp to gen count file id's for finding oplocked files
in a tdb.
Jeremy.
-
Andrew Tridgell
fd3a3daef3 better krb5 error handling (thanks andrewb!) -
Jim McDonough
b94427ddd5 Add additional client RAP calls -
Andrew Tridgell
353c290f05 the beginnings of kerberos support in smbd. It doesn't work yet, but
it should give something for others to hack on and possibly find what
I'm doing wrong.
-
Andrew Tridgell
b74fda69bf added basic NTLMSSP support in smbd. This is still quite rough, and
loses things like username mapping. I wanted to get this in then
discuss it a bit to see how we want to split up the existing
session setup code
-
Andrew Tridgell
888183a17c fix heimdal compilation -
Andrew Tridgell
1bcdf9106a minor Realloc() fix - pedantic -
Andrew Tridgell
131010e9fb fixed NTLMSSP with XP servers (who don't send the duplicate challenge
in the asn1 spnego structures)
-
Andrew Tridgell
b218d465a1 fixed two bugs in the NTLMSSP code
- handle servers that don't send a kerberos principle (non-member servers)
 - enable spnego without KRB5
-
Andrew Tridgell
7092beef9d moved some OIDs to the ASN.1 header -
Andrew Tridgell
076aa97bee added NTLMSSP authentication to libsmb. It seems to work well so I have enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM -
Andrew Tridgell
8b692d8326 improve the error handling in the ASN1 code a bit -
Andrew Tridgell
395cfeea94 added a ASN.1 parser, so now I can properly parse the negTokenInit
packet which means I can extract the service and realm, so we should
now work with realms other than the local realm.

it also means we now check the list of OIDs given by the server just
in case it says that it doesn't support kerberos. In that case we
should fall back to NTLMSSP but that isn't written yet.
-
Andrew Tridgell
919734c1a6 fixed some memory leaks, started adding asn1 decoder for server side -
Andrew Tridgell
d330575856 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
-
Tim Potter
2d0922b0ea Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header. -
Andrew Bartlett
758d923fa1 Kill unused variables -
Andrew Bartlett
42402c87d6 Make use of the pdb_set_plaintext_passwd() update to vastly simplify
decode_pw_buffer() and the samr password changing routines.

And yes, I know that we can lost some information in the Unicode->UTF->Unicode
bit of this, but its worth the code cleanup.

This also takes into account the possability of multibyte passwords.

Andrew Bartlett
-
Andrew Tridgell
b2eb7feb7f added cli_qpathinfo_alt_name() for fetching the 8.3 name of a file -
Jeremy Allison
b5f4a97bb0 Removed extra '()' s.
Jeremy.
-
Tim Potter
e0bdcbc599 Converted cli_net_auth2() and cli_nt_setup_creds() to return NTSTATUS. -
Andrew Tridgell
2d507ec669 fixed ctemp in server and client. It turns out that ctemp on NT is completely broken, and it's pointless to emulate their brokenness completely in this case, but at least this makes us use approximately the same packet format. The spec is complelet wrong in this case -
Simo Sorce
23dc3fc700 typo -
Simo Sorce
48fc6a6cd5 move to SAFE_FREE() -
Tim Potter
b6cb6b837a Merge of sam_pwd_hash() function from tng. -
Tim Potter
e4a3231a07 Use session key from cli_state struct rather than the uninitialised one
when calling cli_netlogon_sam_sync().  (-:
-
Tim Potter
a83061ef3e Fixed return value for cli_dfs_exist() - nt4 returns 1, w2k returns 2.
Use werror_to_ntstatus() to convert error returns from dfs client functions
into nt errors.
-