1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-30 20:23:49 +03:00
Commit Graph

5786 Commits

Author SHA1 Message Date
Jeremy Allison
44fb1992c9 Fix for broken-as-shipped RedHat 7.2 system headers. Now we have
to detect this in configure.
Jeremy.
-
Simo Sorce
ee19f7efb6 a big one:
- old mangle code has gone, the new one based on tdb seem resonably ok
   probably the valid.dat table need to be updated to treat wild chars as
   invalid ones (work ok without it)
 - a LOT of new string manipulation function for unicode, they are somewhat
   tested but a review would not be bad
 - some new function I will need for the new unix_convert function I'm writing,
   this will be renamed filename_convert and use only unicode strings.
 - charconv, I attached a comment, if someone wnat to look if I'm right or
   just was hacking to late in the night to make a sane one :)

of course any bug is my responsibility an will be pleased to see patches if
you find any. :-)

Simo.
-
Andrew Tridgell
fd3a657b44 get the string lengths right in domain logons
Andrew, this fixes domain logons in head. Please look at the change,
as I think you may have misunderstood the max_str_len field (which is
badly named)
-
Andrew Tridgell
5dd3c7b3fb remove {} from default valid char list -
Andrew Bartlett
1f409a1f3f Fix segfault. sup_tok might not always be with us. -
Andrew Bartlett
caae69fcd0 Fix up authenticated pipes in line with vuser changes. This ensures that global
groups obtained via a domain logon are respected in the attached NT_USER_TOKEN.

This functionality is only available in HEAD, becosue of the way authenticaion
has been abstracted.

Both vuid logins and authenticated pipes need to use the same code for this in
future.

Can sombody with the correct facilties check this please?\

Thanks,

Andrew Bartlett
-
Andrew Bartlett
be04aad90d Fixup for accounts without a local /etc/passwd entry.
- Now perfectly valid.
-
Andrew Bartlett
09d2e05d26 Fix up pdbedit so that it at least compiles without warnings.
- Basic functionality intact
 - Now adds machine accounts without a uid.  (using the machine uid range to
   avoid conflict with real uid based accounts)
-
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
3bfb828cf7 Added many more defines in service category, user category and others -
Steve French
4e882289b0 Added support for UserListGroups, ServiceEnum -
Steve French
a1f3930637 Adding support for net password, net service, net user info, fixing net helps -
Andrew Bartlett
7131fe3be4 anonymous logins are guest logins, so mark them as such. (Otherwise they can
browse non-guest shares).
-
Andrew Bartlett
253790f6d7 Minor cleanups/fixes in the NTLMv2 code -
Andrew Bartlett
4db8d70ad7 Move the test for non-SPNEGO session setups when using SPNEGO, becouse its a
perfectly vailid behaviour for guest logins.
-
Andrew Bartlett
83c2d79774 Return 1 (rather than 0) on failure. This may well help get the build farm
back into order, becouse its the inverse tests that are 'failing' - they get
error 0 back and think that we just let sombody in without a password and the
like.

Andrew Bartlett
-
Andrew Bartlett
514c91b16b Various post AuthRewrite cleanups, fixups and tidyups.
Zero out some of the plaintext passwords for paranoia

Fix up some of the other passdb backends with the change to *uid_t rather than
uid_t.

Make some of the code in srv_netlog_nt.c clearer, is passing an array around,
so pass its lenght in is definition, not as a seperate paramater.

Use sizeof() rather than magic numbers, it makes things easier to read.

Cope with a PAM authenticated user who is not in /etc/passwd - currently by
saying NO_SUCH_USER, but this can change in future.

Andrew Bartlett
-
Andrew Tridgell
eeaa80aa09 zero the data, not a pointer to the data ... -
Tim Potter
c80641b6f3 Removed unneeded extern. -
Andrew Bartlett
8dc4f2e44b This should fix up the compile with krb5.
This needs to use the auth interface at some stage, but for now this will do.
-
Andrew Bartlett
531e249732 When you make a data_blob() then you probably need to free it too... -
Andrew Bartlett
c8b2718adf Fix up domain logons. Tested with NT4. -
Andrew Bartlett
e0b56a3148 ... and clean up the unused variables. -
Andrew Bartlett
813bf962ae Small changes for guest authenticated pipes. -
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. -
Andrew Bartlett
26a9479ad4 SPNEGO works perfectly well with security=domain, so don't exclude it. -
Andrew Bartlett
3b5e72bda3 Small 'const' updates ahead of some AuthRewrite merging. -
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
0f6207f455 This one's a doozy. A cut&paste bug incorrectly sets the max string length
of the lm challenge/response header in the NET_ID_INFO_2 structure included
in a network logon request.  It seems Windows 2000 is the only OS that
cares about this.
-
Tim Potter
27cd7ac857 Don't accidentally return success when sending a broken NET_SAMLOGON
request.  This exposes a domain authentication bug with win2k where a rpc
fault is returned but not propagated up as an error.
-
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
-
Andrew Bartlett
190898586f Spnego on the 'server' end of security=server just does not work, so set the
flags so we just do a 'normal' session setup.

Also add some parinoia code to detect when sombody attempts to do a 'normal'
session setup when spnego had been negoitiated.

Andrew Bartlett
-
Tim Potter
c78fec86c9 Fix debug in domain_client_validate() when password server = *. -
Tim Potter
c79e94ea27 Allow the logon level to be passed to cli_netlogon_sam_logon() rather than
the validation level.
-
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
b496936634 Removed confusing comment. -
Andrew Bartlett
cea6b6cb22 Fix up smbpasswd -e/-d so that it doesn't change the password under you any
more.

(Previously it set them to 'XXXX' or similar when only the flags were being
changed - a bug I must have introduced when I reworked the passdb end of things
a few weeks back.)

Adds a new local flag:  LOCAL_SET_PASSWORD to specify that the password is
actually to be changed.

Andrew Bartlett
-
Tim Potter
c3f5df8d67 Display some errors if the initial connection to the server could not be
made.
-
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.
-
Tim Potter
26fa0374bb Fixed typo in debug message. -
Andrew Bartlett
c2dc24ab63 Fix up auth_smbpasswd.c to use the password interface, rather than the
structures directly.

Andrew Bartlett
-
Andrew Bartlett
b02ed7ee19 Add a bit of 'const' for the data_blob code.
Add a new data_blob_clear_free() function - that zero's out the buffer
when its done.
-
Volker Lendecke
fd1d0064b3 Don't force winbind to use non-local DC's.
Volker
-
Simo Sorce
fd1bc3557a clear errno before a call, tdbsam will not update it.
just a hack to make things work.
-
Simo Sorce
92f953c156 another few changes to the new mangle code -
Simo Sorce
06a7c28ea1 change some more functions to the new mangle interface. -
Simo Sorce
8b9302b707 - fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 dos hars...
- addedd ascii compatibility functions
-