1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
Commit Graph

1665 Commits

Author SHA1 Message Date
Gerald Carter
11aa019bec WITH_MSDFS is not define anywhere. It's built by default.
(This used to be commit b51e5b07d9)
2001-11-22 05:29:04 +00:00
Tim Potter
646f8ca3e8 More spelling fixes, comment reformatting.
(This used to be commit edb556b474)
2001-11-21 21:10:13 +00:00
Tim Potter
54432c4129 Spelling fix, reformatted comment.
(This used to be commit 096868bd35)
2001-11-21 20:14:25 +00:00
Tim Potter
96d884cc0f Fixed sizeof vs array length bug in make_user_info_winbind_crap()
Spelling fix.
(This used to be commit 3d87c1a244)
2001-11-20 23:20:00 +00:00
Andrew Tridgell
c325264416 add a hook to save the krb5 PAC
(This used to be commit 1cbc18ae73)
2001-11-20 08:50:04 +00:00
Martin Pool
7883798301 Move all other paths into dynconfig
(This used to be commit d51ef6bfa3)
2001-11-19 05:49:20 +00:00
Tim Potter
0085229b2a Cosmetic fix for debug statement.
(This used to be commit 507ef80f48)
2001-11-19 04:35:00 +00:00
Tim Potter
4d5175c832 Don't resolve the hostname in smbd as we can pause for a long time while
waiting for DNS timeouts to occur.  The correct place to do this is in the
code that displays the session information.
(This used to be commit 2e89165f22)
2001-11-19 04:27:39 +00:00
Martin Pool
caef2d2884 LIBDIR and LOCKDIR are dynamically configured too.
(This used to be commit 868999ad3c)
2001-11-19 03:35:27 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Jeremy Allison
02eda2e251 Tidyups when I was doing the big merge...
Jeremy.
(This used to be commit 9148bb9eaa)
2001-11-17 03:19:17 +00:00
Jeremy Allison
5302dc1218 Fix detection of RedHat 7.2.
Remove unused old file.
Test 42 byte reply to SMBntcreate (W2K does this).
Jeremy.
(This used to be commit a55a63a4ca)
2001-11-15 01:18:10 +00:00
Jeremy Allison
1b579da9dd Fix from Herb. mincount/maxcount need to be ssize_t for comparisons.
Jeremy.
(This used to be commit 60983782ed)
2001-11-14 02:35:56 +00:00
Jeremy Allison
b00b04ebc6 Formatting fixes only.
Jeremy.
(This used to be commit 27081355a9)
2001-11-13 01:35:20 +00:00
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
Tim Potter
a9cf7fb2da Fixed compile warning.
(This used to be commit 320c21b7a9)
2001-10-26 22:58:32 +00:00
Tim Potter
fb328c9cc4 Made default vfs ops static so we can use this symbol in actual modules.
(This used to be commit 398ced6eef)
2001-10-24 00:35:55 +00:00
Herb Lewis
b8fe0f6711 more compiler warnings
(This used to be commit 12c10e876e)
2001-10-23 20:39:38 +00:00
Herb Lewis
3ea3492713 get rid of compiler warnings (casts and delete unused variables)
(This used to be commit 51cb4411df)
2001-10-23 19:10:30 +00:00
Herb Lewis
2a2cccabca IRIX compiler dies not like casts in macro args
(This used to be commit 1b3123df48)
2001-10-23 18:15:18 +00:00
Simo Sorce
b0152aaea0 ops, some testing code in compat function let only mangled name come back.
(This used to be commit e48eb7b572)
2001-10-22 23:25:11 +00:00
Jim McDonough
a443dea5d1 server support for RAP session list function
(This used to be commit d42c28fbad)
2001-10-22 18:14:42 +00:00
Simo Sorce
4e5eb48b07 lets try the new mangling code
all the calls go through a compatibility interface will
change that soon
a new mangle.tdb file will be set in the lock directory
it contains a static mapping longname<->manglename
(This used to be commit 1ffacd2068)
2001-10-22 06:53:28 +00:00
Andrew Tridgell
fba157123e - fixed link order of krb5 libs
- accept a wide range of principal names in session setup
(This used to be commit 672df66296)
2001-10-22 05:04:33 +00:00
Jeremy Allison
cfd68eaac4 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.
(This used to be commit b668d7d656)
2001-10-21 20:51:27 +00:00
Andrew Tridgell
51bc5f128c patch for neater output() function from vance
(This used to be commit 2472ecf7fc)
2001-10-21 06:04:46 +00:00
Andrew Tridgell
a0a42f2c1f change smbd to use HOST/hostname principle form until I work out how
to use the other form in netjoin

smb_wct is a char, not a word
(This used to be commit 3dbb48b188)
2001-10-21 03:27:13 +00:00
Andrew Tridgell
42a4e6890c change smbd to use HOST/hostname principle form until I work out how
to use the other form in netjoin
(This used to be commit 58cfa13d65)
2001-10-21 03:26:24 +00:00
Andrew Tridgell
cbe31055f8 support both old and new kerberos OIDs
(This used to be commit eac164c7e6)
2001-10-21 00:11:22 +00:00
Andrew Tridgell
b7331220c6 fixed the spnego detection code in session setup
this gets share mode working again
(This used to be commit 8286e5307c)
2001-10-21 00:10:16 +00:00
Tim Potter
7cd889f566 Converted a bunch of 0x85 constants to SMBkeepalive.
(This used to be commit b16a15a13e)
2001-10-20 23:34:40 +00:00
Jeremy Allison
88b55f47b4 Move from timestamp to gen count file id's for finding oplocked files
in a tdb.
Jeremy.
(This used to be commit 058ae6b58f)
2001-10-20 21:59:34 +00:00
Jim McDonough
e5868e1f57 Use asprintf, do bounds check, better rc logic
(This used to be commit 6a734158d9)
2001-10-20 21:50:51 +00:00
Andrew Tridgell
60747ab66e crude fix for anonymous session setup with extended security
negotiated
(This used to be commit b3caf21090)
2001-10-20 11:47:44 +00:00
Andrew Tridgell
93645be91f better krb5 error handling (thanks andrewb!)
(This used to be commit fd3a3daef3)
2001-10-20 06:50:24 +00:00
Andrew Tridgell
9884de2d3b finished auth when we get a valid kerberos ticket
smbd now works with kerberos authentication if you use a MIT KDC and
smbclient. Next step is to make it work with a windows client
(This used to be commit e0c99e1f37)
2001-10-20 06:31:25 +00:00
Andrew Tridgell
e82c34aab5 add non_root_mode() check
(This used to be commit 96f910bae5)
2001-10-20 06:29:52 +00:00
Andrew Tridgell
42fd55bd61 quick fix for krb5 compilation. I've told vance how to fix this module
properly and will wait for him to send a patch
(This used to be commit 7adad774d8)
2001-10-20 00:48:28 +00:00
Jim McDonough
d1006a96d0 Add RAP net share add support
(This used to be commit a70bc077a1)
2001-10-19 19:13:11 +00:00
Jean-François Micouleau
4be5c040b6 print in a human readable format when the password expired.
J.F.
(This used to be commit 255b197a5c)
2001-10-19 17:30:05 +00:00
Jeremy Allison
f1cd7f14e2 Fixed issues with changenotify only being called once in VC++.
Jeremy.
(This used to be commit ce59e4a772)
2001-10-19 09:41:35 +00:00
Jeremy Allison
4bb9cebf84 Tidy up debug in notify code.
Jeremy.
(This used to be commit 7707c5e073)
2001-10-19 08:37:32 +00:00
Jeremy Allison
6cc3953196 Restored old Bmpx code - actually used by OS/2.
Jeremy.
(This used to be commit 7c1688fd67)
2001-10-19 00:56:03 +00:00
Jeremy Allison
b49b5b9481 client : Fixed error return.
uid.c: Added missing void.
Jeremy.
(This used to be commit c2e06ed221)
2001-10-19 00:02:36 +00:00
Jeremy Allison
c416ff851b Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.
Ensure make_conection() can only be called as root.
Jeremy.
(This used to be commit 8d23a7441b)
2001-10-18 20:15:12 +00:00
Andrew Tridgell
904fca7684 got rid of start_background_queue()
THIS WAS A DISASTER!

it created hundreds of processes on the build farm machines, which we
can't kill.
(This used to be commit 04479db879)
2001-10-18 10:40:36 +00:00
Andrew Tridgell
5ad7448359 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.
(This used to be commit 353c290f05)
2001-10-18 10:26:06 +00:00
Tim Potter
f0e0dd6507 Renamed vfs_init() to smbd_vfs_init() to allow vfs modules to compile.
(This used to be commit 7c3542ba87)
2001-10-18 00:27:20 +00:00
Andrew Tridgell
adfa547aab removed some debug code
(This used to be commit b9e1f05393)
2001-10-17 10:46:46 +00:00
Andrew Tridgell
b728042334 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
(This used to be commit b74fda69bf)
2001-10-17 08:54:19 +00:00
Jeremy Allison
d731149a41 Fixed inconsistent definitions of InBuf/OutBuf/last_char.
Noticed by albert chin (china@thewrittenword.com) .
Jeremy.
(This used to be commit f5781f11eb)
2001-10-17 01:38:23 +00:00
Jean-François Micouleau
3f1d100842 very simple asynchronous "lpq" thread patch
To speed up operations with the lpq command, it's now run in a separate
asynchronous process.

Opening the Printers folder on NT is now fast ;-) I think even faster than
with a ** server

Jeremy, you should look at that patch to include it in 2.2.3

	J.F.
(This used to be commit 8ef9dff307)
2001-10-16 23:16:00 +00:00
Jeremy Allison
7acc2b977c Fix for connectinos.tdb error message from "Richard Bollinger" <rabollinger@home.com>
Jeremy.
(This used to be commit f1f1a14598)
2001-10-16 08:39:43 +00:00
Andrew Tridgell
0c0dd06dbd split session setup code out of reply.c in preparation for adding
NTLMSSP and kerberos support in smbd
(This used to be commit 38a43d75e2)
2001-10-15 07:50:21 +00:00
Simo Sorce
b7bd7ea153 introduce mangle backward compatibility functions
add talloc_asprintf()
(This used to be commit 7264d611ef)
2001-10-13 12:47:59 +00:00
Jeremy Allison
812dcab195 Made nt acl support a local parameter for w2ksp2 profile fix.
Jeremy.
(This used to be commit ebba334c15)
2001-10-12 22:00:38 +00:00
Tim Potter
2f7ce531ad fixed compiler warning.
(This used to be commit 2d5b0f7ad8)
2001-10-12 06:09:39 +00:00
Gerald Carter
cf167fe3c5 merge from 2.2
(This used to be commit 062bba07f2)
2001-10-11 16:44:17 +00:00
Simo Sorce
49307c2678 remove unused function in mangle.c
fix some alloc leaks spotted by andreas moroder.
(This used to be commit 39409a20f6)
2001-10-11 12:33:26 +00:00
Andrew Tridgell
81f56139b6 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
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00
Jeremy Allison
76745313b1 Fixed bug when status=no and max smbd processes > 0.
Jeremy.
(This used to be commit d1adaee373)
2001-10-11 05:53:15 +00:00
Tim Potter
89731dce4a Fixed some compile warnings.
(This used to be commit c9b3e6c714)
2001-10-10 01:01:15 +00:00
Jeremy Allison
ed94aa9d61 Fixes from John Trostel (modified somewhat by me) to ensure that all lookup_XX
functions correctly deal with the SID_NAME_TYPE. One fix for connection user
lookup in LSA.
Jeremy.
(This used to be commit 29730027d8)
2001-10-09 20:54:56 +00:00
Simo Sorce
d02b5fefba tim suggested to add a copyright note :)
(This used to be commit c0bb484e0f)
2001-10-08 11:58:25 +00:00
Simo Sorce
494bb7b980 more fixing and testing.
added ucs2_to_dos83 function.
the code should be ok now.
further test with japanese and other languages is needed at this point.
(This used to be commit 74f746fee2)
2001-10-07 14:53:40 +00:00
Andrew Bartlett
36c7d52ed8 Fix up indenting in out SAM password check code.
(This used to be commit ac11a23125)
2001-10-06 01:51:57 +00:00
Simo Sorce
44cc559418 init only in test code.
remove unused structure for tdb data.
fixes.
(This used to be commit c82cf58ae2)
2001-10-04 08:32:29 +00:00
Andrew Tridgell
9bcd133e9e switched over to a new method of handling uppercase/lowercase mappings
for unicode strings. The new method relies on 3 files that are mmap'd
at startup to provide the mapping tables. The upcase.dat and
lowcase.dat tables should be the same on all systems. The valid.dat
table says what characters are valid in 8.3 names, and differs between
systems. I'm committing the japanese valid.dat here, in future we need
some way of automatically installing and choosing a appropriate table.

This commit also adds my mini tdb based gettext replacement in
intl/lang_tdb.c. I have not enabled this yet and have not removed the
old gettext code as the new code is still being looked at by Monyo.

Right now the code assumes that the upcase.dat, lowcase.dat and
valid.dat files are installed in the Samba lib directory. That is not
a good choice, but I'll leave them there until we work out the new
install directory structure for Samba 3.0.

simo - please look at the isvalid_w() function and think about using
it in your new mangling code. That should be the final step to
correctly passing the chargen test code from monyo.
(This used to be commit 1c221994f1)
2001-10-03 12:18:20 +00:00
Jeremy Allison
facbdd692d Fixed up the change password bug when not using PAM.
The problem is we were trying to use mask_match as a generic
wildcard matcher for UNIX strings (like the password prompts).
We can't do that - we need a unix_wild_match (re-added into lib/util.c)
as the ms_fnmatch semantics for empty strings are completely wrong.
This caused partial reads to be accepted as correct passwd change
responses when they were not....
Also added paranioa test to stop passwd change being done as root
with no %u in the passwd program string.
Jeremy.
(This used to be commit 9333bbeb76)
2001-10-02 21:58:09 +00:00
Tim Potter
dc1fc3ee8e Removed 'extern int DEBUGLEVEL' as it is now in the smb.h header.
(This used to be commit 2d0922b0ea)
2001-10-02 04:29:50 +00:00
Andrew Tridgell
cf2ec80d4e honor the ACB_PWNOEXP flag in smbpasswd
(This used to be commit 70b7c900c9)
2001-10-01 13:07:46 +00:00
Andrew Tridgell
c6d1e75664 - fix handling of 0 last_change_time and must_change_time
- move the arbitrary 21 day timeout to local.h
(This used to be commit 11075f5434)
2001-10-01 10:54:11 +00:00
Andrew Bartlett
60d315cb72 Small changes to register_vuid ahead of a larger restructure.
(This used to be commit 7802bc94e7)
2001-09-30 04:28:43 +00:00
Simo Sorce
90841e8e13 undef the code for now
(This used to be commit 5ab220efd7)
2001-09-29 16:20:15 +00:00
Simo Sorce
b01e2e7098 further devel and test kit.
first tests show it still does not work.
work in progress...
(This used to be commit a4c746ac47)
2001-09-29 16:16:38 +00:00
Andrew Bartlett
81697d5ebe Fix up a number of intertwined issues:
The big one is a global change to allow us to NULLify the free'ed pointer to a
former passdb object.  This was done to allow idra's SAFE_FREE() macro to do
its magic, and to satisfy the input test in pdb_init_sam() for a NULL pointer
to start with.

This NULL pointer test was what was breaking the adding of accounts up until
now, and this code has been reworked to avoid duplicating work - I hope this
will avoid a similar mess-up in future.

Finally, I fixed a few nasty bugs where the pdb_ fuctions's return codes were
being ignored.  Some of these functions malloc() and are permitted to fail.
Also, this caught a nasty bug where pdb_set_lanman_password(sam, NULL) acheived
precisely didilly-squat, just returning False.  Now that we check the returns
this bug was spotted.  This could allow different LM and NT passwords.

 - the pdbedit code needs to start checking these too, but I havn't had a
chance to fix it.

I have also fixed up where some of the password changing code was using the
pdb_set functions to store *internal* data.  I assume this is from a previous
lot of mass conversion work...

Most likally (and going on past experience) I have missed somthing, probably in
the LanMan password change code which I havn't yet been able to test, but this
lot is in much better shape than it was before.

If all this is too much to swallow (particularly for 2.2.2) then just adding a
sam_pass = NULL to the particular line of passdb.c should do the trick for the
ovbious bug.

Andrew Bartlett
(This used to be commit 762c8758a7)
2001-09-29 13:08:26 +00:00
Simo Sorce
31a87fa4a6 get out unicode_from_buffer and buffer_from_unicode, unneeded.
store mangled filename in dos charset and unmangled in unicode.
clean ups
still lot to do.
againg compiled but not yet tested.
(This used to be commit 2d1aabb6d4)
2001-09-27 12:41:38 +00:00
Simo Sorce
59a02ecae1 minor fixes
(This used to be commit 57e639bbdd)
2001-09-27 02:05:30 +00:00
Gerald Carter
2c4d1d39b1 OpenSSL merge from 2.2
(This used to be commit efc6df5a39)
2001-09-26 17:29:53 +00:00
Andrew Bartlett
41821943da Kill of the reply.c end of the workstaion trust account mess.
Fix the NT errror codes, this time in line with WinXP/2k.
 - Return the normal error codes, expect for bad user/bad password.  These map
   to logon failure, as a quick security hack.  We follow suit.

Simplfy some of the password extraction code, the auth subsytem has the
 intelegence to sort this stuff out, no need to do it here.

Move to 'global_encrypted_passwords_negotiated' to determine the use of
unencrypted hacks, replacing the current mess.

Andrew Bartlett
(This used to be commit c04f063573)
2001-09-26 13:55:59 +00:00
Andrew Bartlett
865467c82f Process the workstation trust account code INSIDE the authenticaion subsystem,
just like any other logon.  Matching code removal in reply.c to follow.

Andrew Bartlett
(This used to be commit da4873d889)
2001-09-26 13:11:22 +00:00
Andrew Bartlett
71850be47e Rearrange the order of the checks in auth_smbpasswd.c, always check passwords
first.

Add password expiry and 'must change before first logon' support.
 - This requires that the passdb be up to the job to supply the info.
(This used to be commit 53c1c5091e)
2001-09-26 12:28:46 +00:00
Andrew Bartlett
83db39d2b5 Fix this to use the plaintext password code directly, like SWAT does.
This whole area needs to be cleaned up.  Should this kind of passowrd
change/check be permitted with encrypt passwords = yes?

In any case I've also had trouble testing this, as I can't find the right
software/configuration to exersise this behaviour.  But its better than the
previous situation.  Any assistance greatly appriciated.

Andrew Bartlett
(This used to be commit 37655b4289)
2001-09-26 12:12:26 +00:00
Andrew Bartlett
c907f33396 Update for new pdb_set_plaintext_passwd() interface.
(This used to be commit ce676f8bfc)
2001-09-26 11:55:13 +00:00
Andrew Bartlett
950bae4a22 Update build_options.c in line with new configure options.
(This used to be commit 3f10b04566)
2001-09-26 02:30:55 +00:00
Simo Sorce
deed36e40f - the inactive core of the new mangling code that use tdb
- some more utils for unicode string manipulation
(This used to be commit 4ade36446e)
2001-09-25 09:57:06 +00:00
Andrew Tridgell
827e189778 fixed a typo
(This used to be commit 11a2808e10)
2001-09-25 06:38:07 +00:00
Jeremy Allison
be6023b2fb Log sys_acl_set_XX at level 2 not zero.
Jeremy.
(This used to be commit 4a54a633c5)
2001-09-25 00:05:26 +00:00
Jeremy Allison
abaa4ab96a Change log message to 2 from zero when failing to create directory.
Stops spurious profile creation messages.
Jeremy.
(This used to be commit fa74d07207)
2001-09-24 23:50:28 +00:00
Andrew Bartlett
7cb54b29dc Lets call an NTSTATUS an nt_status, not an ecode.
(This used to be commit b6048e28ab)
2001-09-23 23:07:53 +00:00
Andrew Bartlett
5993238b0e Zero out these pstrings before we start: makes for much easier debugging.
(This used to be commit d417b6b5cb)
2001-09-23 22:51:27 +00:00
Andrew Bartlett
4eb7ef6b61 Fix up NT_STATUS return for session setups, Win2k objects to anything other
than NT_STATUS_LOGON_FAILURE.  This also brings us (almost) back in line with
their implementation.

Kill off SMBENCRYPT() macro

Kill off 'nt smb support' paramater - tridge okayed this one.

Andrew Bartlett
(This used to be commit 67947bf6e3)
2001-09-23 05:16:03 +00:00
Jeremy Allison
0492effcf3 Ignore unmappable (NT Authority, BUILTIN etc.) SIDs in an ACL set.
Jeremy.
(This used to be commit bc7963bd64)
2001-09-22 06:45:24 +00:00
Jeremy Allison
d76dfbb879 Attempt to make quotas work with RH7.1, and with other Linuxen... This is
*HARD*, dammit !
Jeremy.
(This used to be commit 59a4684201)
2001-09-21 22:06:03 +00:00
Andrew Tridgell
b49a1f01b0 fixed the error code handling in can_delete() by converting it to
NTSTATUS. This gets the right error codes in SMBunlink
(This used to be commit c82f7828c0)
2001-09-21 14:27:43 +00:00
Andrew Bartlett
fa6713bf8b Move pass_check.c over to NTSTATUS, allowing full NTSTATUS from PAM to wire!
Add the ability for swat to run in non-root-mode (ie non-root from inetd).
 - we still need some of the am_root() calls fixed however.
(This used to be commit 2c2317c56e)
2001-09-20 13:15:35 +00:00
Andrew Bartlett
994a449703 We are not meant to touch the username, so use the pass->pw_name output rather
than Get_Pwnam(user, True).
(This used to be commit bf81f00213)
2001-09-20 10:26:50 +00:00
Andrew Bartlett
8bb1479500 Rearrange the ordering of the checks in make_connection(). The new order has
some sainity, avoiding things like 'root preexec' when the connection would
otherwise already be denied (max connections).

This does change behaviour, but I think its for the best.

Andrew Bartlett
(This used to be commit 99e8a263ad)
2001-09-20 07:09:28 +00:00
Andrew Bartlett
395454db5d Fix for MiXed and UPPER case usernames with plaintext PAM passwords.
(This used to be commit ba1b411f55)
2001-09-20 03:31:57 +00:00
Andrew Bartlett
79009d6afa Revert this one: The NTLMv2 checks need the original username as found
on the wire.
(This used to be commit 7c9ae76b3f)
2001-09-20 00:19:55 +00:00
Andrew Bartlett
158a5b8399 - Fix up to use sampass->username insted of user_info->smb_username
- Fix initial lookup to use the mapped username.
(This used to be commit 162b88e231)
2001-09-19 23:53:51 +00:00