1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-30 13:18:05 +03:00
Commit Graph

1551 Commits

Author SHA1 Message Date
Tim Potter
e5bd418963 Spelling fixes.
(This used to be commit 5c486bd28a)
2001-11-12 20:14:18 +00:00
Jeremy Allison
a32754589a Don't check space on every extend if strict allocate not set.
Jeremy
(This used to be commit 9391efb38e)
2001-11-12 02:03:44 +00:00
Jeremy Allison
22afba62c9 Fixed allocation bug in database prog. Some format fixes.
Jeremy.
(This used to be commit 9ff6b0c20c)
2001-11-12 01:00:54 +00:00
Simo Sorce
8424424471 some bugfix and new functions,
modified mangle.c to use mosltly acnv_????() functions.
this should make also build farm happy
(This used to be commit 8bb5cb27c2)
2001-11-12 00:53:34 +00:00
Andrew Bartlett
5abe3932cc Code duplication is bad. So add an add_signiture() function and just refernce
that.
(This used to be commit a82c863857)
2001-11-12 00:08:30 +00:00
Andrew Bartlett
3d6154599a Kill off 'restrict anonymous' becouse it is useless in its current form.
To be replaced with a real restriction in consultation with jra.  (Hence why
I've not touched loadparm.c).

Andrew Bartlett
(This used to be commit 9590144915)
2001-11-11 12:42:39 +00:00
Andrew Bartlett
989e0409ba Fix up some DEBUG()s
Add and fix comments

Add 'const' to some more input paramaters.
(This used to be commit 0c7eefcb5c)
2001-11-11 11:34:46 +00:00
Andrew Bartlett
5edc597786 Add back the not null checks in a better place.
Check the pdb_init_sam() for failure.
(This used to be commit 1808cd5210)
2001-11-11 11:18:45 +00:00
Andrew Bartlett
63a8a2ebe8 make sam_account_ok static.
remove rudundent  not null checks

fix indenting
(This used to be commit 3eada888fd)
2001-11-11 11:15:28 +00:00
Andrew Bartlett
2d07327a95 This extra check isn't needed, we can only get here if secuirty=domain
(This used to be commit 600d83e43f)
2001-11-11 11:11:56 +00:00
Andrew Bartlett
e903a34b2e Minor updates. A small dose of const.
(This used to be commit 80667cb0dd)
2001-11-11 11:00:38 +00:00
Simo Sorce
5d152d24a3 fixed, moved and added some functions
note the useful acnv_uxu2 and acnv_u2ux functions in charcnv.c
(This used to be commit 64dde3b64f)
2001-11-10 15:21:54 +00:00
Jeremy Allison
461641d0de Use defined constants not integers.
Jeremy.
(This used to be commit d20949fe50)
2001-11-10 01:49:50 +00:00
Jeremy Allison
67f5bea484 Fixup __LPID -> _LPID.
Jeremy.
(This used to be commit ab607cdf15)
2001-11-09 20:34:12 +00:00
Andrew Bartlett
395aa946cd This change updates lp_guestaccount() to be a *global* paramater, rather than
per-share.  I beleive that almost all the things that this could have done on
a per-share basis can be done with other tools, like 'force user'.

Almost all the user's of this paramater used it as a global anyway...

While this is one step at a time, I hope it will allow me to considerably
simplfy the make_connection() code, particularly for the user-level security
case.

This already removes an absolute truckload of extra attempted password lookups
on the guest account.

Andrew Bartlett
(This used to be commit 8e708332ed)
2001-11-09 11:16:06 +00:00
Andrew Tridgell
50093d3bbd fix the tree so it compiles again
grumble, mumble, ...
(This used to be commit 72c1af6f8d)
2001-11-09 02:44:49 +00:00
Andrew Bartlett
55dfb66079 Change to guest logon code.
This changes the way we process guest logons - we now treat them as normal
logons, but set the 'guest' flag.  In particular this is needed becouse Win2k
will do an NTLMSSP login with username "", therefore missing our previous guest
connection code - this is getting a pain to do as a special case all over the
shop.

Tridge:  We don't seem to be setting a guest bit for NTLMSSP, in either the
anonymous or authenticated case, can you take a look at this?

Also some cleanups in the check_password() code that should make some of the
debugs clearer.

Various other minor cleanups:

 - change the session code to just take a vuser, rather than having to do a
   vuid lookup on vuser.vuid

 - Change some of the global_client_caps linking

 - Better debug in authorise_login(): show the vuid.

Andrew Bartlett
(This used to be commit 62f4e4bd0a)
2001-11-08 22:19:01 +00:00
Tim Potter
f56a3ea612 Fixed incorrect debug message. )-:
(This used to be commit a99d9cec7e)
2001-11-08 04:41:13 +00:00
Jeremy Allison
c517caf305 Only 1mb allocate slop.
Jeremy.
(This used to be commit c339a99a89)
2001-11-08 02:17:03 +00:00
Jeremy Allison
00404139e1 Merge overdue changes from 2.2. Fix <4gb write problem.
Jeremy.
(This used to be commit 36ea09d3a0)
2001-11-08 01:49:57 +00:00
Jeremy Allison
04a0293601 Added more define bits. Fixed error in vol attributes.
Jeremy.
(This used to be commit eba8204bfa)
2001-11-08 00:21:26 +00:00
Jeremy Allison
3343d0281d Added debug in truncate, fixed warning with gcc3.
Jeremy.
(This used to be commit 970ec14b4b)
2001-11-07 23:47:20 +00:00
Jeremy Allison
bdd5c8bd56 Fixed unsigned / long unsigned format missmatch.
Jeremy
(This used to be commit 86c2f96366)
2001-11-06 22:07:04 +00:00
Tim Potter
9d56e23591 Renamed make_user_info_for_winbindd() to be more consistent with the
names of the other functions in this file.
(This used to be commit 4880f37e4e)
2001-11-05 01:04:45 +00:00
Tim Potter
c159d0f47d Fixed compiler warnings.
(This used to be commit 54e40b2702)
2001-11-05 00:42:33 +00:00
Tim Potter
d876260d88 Don't put a \n on the end of the arg to exit_server()
(This used to be commit dfb8566220)
2001-11-05 00:02:38 +00:00
Simo Sorce
740d6f5dd6 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.
(This used to be commit ee19f7efb6)
2001-11-04 18:26:53 +00:00
Andrew Bartlett
c42bdbdace Fix segfault. sup_tok might not always be with us.
(This used to be commit 1f409a1f3f)
2001-11-04 04:58:17 +00:00
Jeremy Allison
f8e2baf39e 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.
(This used to be commit ee5e7ca547)
2001-11-03 23:34:24 +00:00
Andrew Bartlett
0e14d9bee0 anonymous logins are guest logins, so mark them as such. (Otherwise they can
browse non-guest shares).
(This used to be commit 7131fe3be4)
2001-11-03 00:59:57 +00:00
Andrew Bartlett
b3014b1840 Minor cleanups/fixes in the NTLMv2 code
(This used to be commit 253790f6d7)
2001-11-03 00:20:31 +00:00
Andrew Bartlett
fdc03603c1 Move the test for non-SPNEGO session setups when using SPNEGO, becouse its a
perfectly vailid behaviour for guest logins.
(This used to be commit 4db8d70ad7)
2001-11-03 00:19:56 +00:00
Andrew Bartlett
acb81fe408 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
(This used to be commit 514c91b16b)
2001-11-01 05:02:41 +00:00
Andrew Bartlett
f32cf6dfba This should fix up the compile with krb5.
This needs to use the auth interface at some stage, but for now this will do.
(This used to be commit 8dc4f2e44b)
2001-10-31 12:37:56 +00:00
Andrew Bartlett
bdca4e32aa When you make a data_blob() then you probably need to free it too...
(This used to be commit 531e249732)
2001-10-31 12:28:40 +00:00
Andrew Bartlett
be93100240 Fix up domain logons. Tested with NT4.
(This used to be commit c8b2718adf)
2001-10-31 12:07:59 +00:00
Andrew Bartlett
60f0627afb 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
(This used to be commit f70fb819b2)
2001-10-31 10:46:25 +00:00
Andrew Bartlett
d8f0f3a6d4 SPNEGO works perfectly well with security=domain, so don't exclude it.
(This used to be commit 26a9479ad4)
2001-10-31 06:24:25 +00:00
Tim Potter
6f0b8a38ec 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.
(This used to be commit 4eeb7bcd78)
2001-10-31 06:20:58 +00:00
Andrew Bartlett
1f829e19eb 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
(This used to be commit 190898586f)
2001-10-30 13:54:54 +00:00
Andrew Bartlett
11dc29786e Fix up auth_smbpasswd.c to use the password interface, rather than the
structures directly.

Andrew Bartlett
(This used to be commit c2dc24ab63)
2001-10-29 22:28:21 +00:00
Simo Sorce
a972d2c448 another few changes to the new mangle code
(This used to be commit 92f953c156)
2001-10-29 13:21:29 +00:00
Simo Sorce
95aa4c6bbe change some more functions to the new mangle interface.
(This used to be commit 06a7c28ea1)
2001-10-29 13:19:22 +00:00
Simo Sorce
f93a8a3f90 - fix string len for an ucs2_to_dos function as any ucs2 char may be up to 4 dos hars...
- addedd ascii compatibility functions
(This used to be commit 8b9302b707)
2001-10-29 11:37:42 +00:00
Andrew Bartlett
d9d7f023d8 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
(This used to be commit c95f5aeb93)
2001-10-29 07:35:11 +00:00
Andrew Bartlett
2038649e51 This commit is number 3 of 4.
In particular this commit focuses on:

Changing the Get_Pwnam code so that it can work in a const-enforced
environment.

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

----

These changes allow for 'const' in 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 used to be commit e7634f81c5)
2001-10-29 07:28:32 +00:00
Andrew Bartlett
ab5d5cfbe0 This commit is number 1 of 4.
In particular this commit focusses on:

Adding the new 'pass changed now' helper function.

While these changes have been mildly tested, and are pretty small, any
assistance in this is appreciated.
(This used to be commit a8971a5448)
2001-10-29 07:15:51 +00:00
Tim Potter
67dae09cc6 Fixed confusing debug message - it was always printing uid 0 instead of the
correct uid.
(This used to be commit ad30a35ebc)
2001-10-29 03:46:09 +00:00
Simo Sorce
7433cb7c75 fix a logic bug on max size of a returned string,
this fixes also the bug with file renaming.
(This used to be commit 5246d7609c)
2001-10-28 19:19:57 +00:00
Jeremy Allison
b947ad3a49 smbd/notify_hash.c: Merged Herb's fix.
lib/debug.c: Fix for potential null pointer access.
Jeremy.
(This used to be commit 5a4d22dd66)
2001-10-27 07:17:21 +00:00