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
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
Andrew Bartlett
31c44c4744 Adding the appropirate files might help...
(These are part of the build_options patch).

Andrew Bartlett
(This used to be commit 4e5c7724b4)
2001-09-19 10:45:33 +00:00
Andrew Bartlett
6794b58a8c Add the ability to display Samba's build options with smbd -b and as a level 4
DEBUG().  Also included are details like build date/time, location and
compiler.

This should get most of the options we set, except those that don't affect
smbd, like WITH_PAM_SMBPASSWD or WITH_WINBINDD.

This work due to Vance Lankhaar <vlankhaar@hotmail.com>

Some work needs to be done to make it only rebuild when needed (ie smbd being
rebuilt) but its in pretty good shape already.

Also fix up some printf() -> d_printf().

Andrew Bartlett
(This used to be commit beff1d2bea)
2001-09-19 09:44:12 +00:00
Andrew Bartlett
ebe02a7e87 printf() -> d_printf()
(This used to be commit e8bd42edc0)
2001-09-19 09:37:33 +00:00
Jeremy Allison
79a9902d39 Removed unneeded variable, added comment on deadlock prevention.
Jeremy.
(This used to be commit 3f52632ac9)
2001-09-19 07:06:34 +00:00
Andrew Tridgell
01bb01b3ca removed anti-race code that could cause a classic ABBA deadlock
I'd rather get the connection count wrong with a small probability
than deadlock
(This used to be commit d4e4e81328)
2001-09-19 06:46:35 +00:00
Andrew Tridgell
2bc9ef3846 added a hook to reopen all tdb's after the server fork
this prevents the fd seek pointer problem
(This used to be commit f49518e497)
2001-09-19 05:43:15 +00:00
Andrew Bartlett
6adafe50d4 Remove the ugly hacks to get around the Get_Pwnam() calls in pass_check.c by
simply not doing Get_Pwnam() calls in pass_check.c

We now make *one* sys_getpnam() call in cgi.c and we always call PAM no matter
what it returns.  We also no longer run the password cracker for these logins.

The truly parinod will note the slight difference in call paths, in that we only
call crypt for valid password structs (if not --with-pam).  The truly parinoid
don't run SWAT either, so I don't think this is an issue.

Andrew Bartlett
(This used to be commit 9020d88493)
2001-09-19 05:26:11 +00:00
Andrew Tridgell
56aa0a274d got rid of bogus write list substitution error messages
(This used to be commit 0deae6c407)
2001-09-19 04:11:23 +00:00
Andrew Tridgell
3e9bcd111d don't try to initgroups in non root mode
(This used to be commit 1a04ea2476)
2001-09-19 03:30:20 +00:00
Simo Sorce
61b2794968 move to SAFE_FREE()
(This used to be commit a95943fde0)
2001-09-17 11:25:41 +00:00
Andrew Tridgell
23af074326 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
(This used to be commit 2d507ec669)
2001-09-17 04:23:48 +00:00
Andrew Bartlett
dec3cbcaf0 Fix up workstaion and kickoff time checks, moved to auth_smbpasswd.c where
they can have general effect.

Fixed up workstaion support in the rest of samba, so that we can do these
checks.

Pass through the workstation for cli_net_logon(), if supplied.
(This used to be commit 7f04a139b2)
2001-09-16 06:35:35 +00:00
Andrew Bartlett
4d89a65a84 Start pushing the NTSTATUS stuff out to the wire for session setups.
Rework the 'map to guest' code, its now possible to follow what its trying
to do...

Add an NT_STATUS_EQUAL(x,y) macro to make this stuff sane to look at.

Andrew Bartlett
(This used to be commit d618880661)
2001-09-16 02:35:55 +00:00
Simo Sorce
72c35310b2 use variables _before_ freeing them!
thanks to Andreas Moroder for spotting these two.
(This used to be commit 01f30ca0ad)
2001-09-15 13:21:54 +00:00
Andrew Bartlett
7892c494e7 Kill off the //server/share%user hack in share level security.
This should help make much of this code simpiler.

Andrew Bartlett
(This used to be commit fb0c3629c3)
2001-09-15 12:55:59 +00:00
Andrew Bartlett
eb8a3778d0 Oops... For reference, NTLMv2 passwords are > 24 chars in length, while
NTLMv1 passwords (and old LM passwords) are exactly 24 in lenghth.
(This used to be commit 51baa1614d)
2001-09-15 12:20:21 +00:00
Andrew Bartlett
90b5a6279e This looked suspicious now we are attempting to to NTLMv2.
Andrew Bartlett
(This used to be commit 21baa33946)
2001-09-15 12:16:22 +00:00
Andrew Bartlett
1c8c7c558b Actually fill in the status for sainity checks
Andrew Bartlett
(This used to be commit d47016de52)
2001-09-15 01:59:44 +00:00
Andrew Bartlett
b7a0c13289 Now that we always get back an NTSTATUS code actually pass it on to the
auth subsytem.  Also kill off the (unneeded) wrapper fuction.

Andrew Bartlett
(This used to be commit 96f06b490a)
2001-09-14 10:38:40 +00:00
Tim Potter
b800a36b1c Some patches to authentication:
- the usersupplied_info now contains a smb_username (as it comes across on
   the wire) and a unix_username (after being passed through mapping
   functions)

 - when doing security={server,domain} use the smb_username, otherwise use
   the unix_username
(This used to be commit d34fd8ec07)
2001-09-12 06:39:50 +00:00
Andrew Tridgell
39d7983a47 - enable MSDFS by default, there seems no reason not to have it enabled
by default in Samba 3.x

- got rid of some unused parameters in Makefile.in

- declare DEBUGLEVEL in debug.h rather than in each file
(This used to be commit b8651acb9c)
2001-09-12 03:08:51 +00:00
Jeremy Allison
45706091f3 Fix for second logic bug when handing oplock breaks and client messages
simultaneously.
Jeremy.
(This used to be commit 227325b2d6)
2001-09-10 23:03:14 +00:00
Andrew Tridgell
11bd06e99c made a couple of local fns static
(This used to be commit f0851202a8)
2001-09-10 11:23:41 +00:00
Andrew Tridgell
b30e75692d replaced stdio in many parts of samba with a XFILE. XFILE is a cut-down
replacemnt of stdio that doesn't suffer from the 8-bit filedescriptor
limit that we hit with nasty consequences on some systems

I would eventually prefer us to have a configure test to see if we need
to replace stdio, but for now this code needs to be tested widely so
I'm enabling it by default.
(This used to be commit 1af8bf34f1)
2001-09-10 11:08:57 +00:00
Andrew Tridgell
65c5a1c0ba convert more code to using d_printf
(This used to be commit 60d2973034)
2001-09-08 02:59:23 +00:00
Jeremy Allison
84cca75739 Don't fail if no owner/group owner set. Use existing owners.
Jeremy.
(This used to be commit 9961c4c1a3)
2001-09-07 20:08:16 +00:00
Jeremy Allison
0135666934 #ifdef out function when not used.
Jeremy.
(This used to be commit fa8d626a27)
2001-09-07 20:01:19 +00:00
Jeremy Allison
83ebf2b6b2 Fix the 62bit locking onto 32 bit NFS mounts problem generically for HPUX.
Don. please check this out.
Jeremy.
(This used to be commit ce9f959964)
2001-09-06 22:43:21 +00:00
Andrew Tridgell
9a9ac2739b got rid of USE_TDB_MMAP_FLAG as its not needed any more
(This used to be commit c26e0d3f27)
2001-09-06 22:08:19 +00:00
Jeremy Allison
851e60c382 Removed unneeded set of delete on close in fsp->share_mode.
Jeremy.
(This used to be commit 7816f79075)
2001-09-05 23:34:41 +00:00
Jeremy Allison
11f0402a74 Fix I think for the fcntl spinning problem. Re-prioritize so
that oplock break messages get priority over incoming client messages.
Jeremy.
(This used to be commit 1779f6a223)
2001-09-05 22:45:48 +00:00
Andrew Tridgell
627b1d0a61 when you update the share mode in the db you must also update
fsp->share_mode otherwise the check to see if the fsp share mode
matches the one in the db will fail when you come to delete it,
thus leaving us with a share mode on a file that isn't even open!
(This used to be commit 2020738b88)
2001-09-05 21:13:58 +00:00
Andrew Tridgell
387f1fd09c fixed formatting to make the code vaguely readable. It's still a dogs
breakfast, but at least you can follow the indents
(This used to be commit 9955ea0aaa)
2001-09-05 21:11:52 +00:00
Herb Lewis
7528728071 merge profile data changes from 2.2
(This used to be commit c105859304)
2001-09-05 18:43:55 +00:00
Andrew Tridgell
851a06e1fd added filename to error_packet()
(This used to be commit 2c424788de)
2001-09-05 10:18:58 +00:00
Jeremy Allison
15472c4ee7 Fixes to ensure invalid vuids cannot stop oplock breaks.
This may have bearing on the Solaris fcntl spin bug.
Jeremy.
(This used to be commit 0f67620252)
2001-09-04 19:58:01 +00:00
Jeremy Allison
7e75921e24 Merge of transfer file code from 2.2, fix for readbraw.
Jeremy.
(This used to be commit c05e794536)
2001-09-04 19:10:30 +00:00
Andrew Tridgell
19fea3242c the next stage in the NTSTATUS/WERROR change. smbd and nmbd now compile, but the client code still needs some work
(This used to be commit dcd6e735f7)
2001-09-04 07:13:01 +00:00
Andrew Tridgell
2771d77c60 tidied up some unused vars in JFs new fns
(This used to be commit e26502b1f8)
2001-09-03 08:54:24 +00:00
Andrew Tridgell
bd7ba65dda more NTSTATUS changes
(This used to be commit 8a49b2f7df)
2001-09-01 23:06:57 +00:00
Jeremy Allison
4bd774f458 Fix crash bug with indirecting through null pointer on recursive delete.
Jeremy.
(This used to be commit a6f04d1661)
2001-08-30 22:20:02 +00:00
Herb Lewis
e555b969b2 if no ACL elements then use chmod - fixes ability to set read-only bit
on files that do not have an ACL
(This used to be commit 65ea13420c)
2001-08-30 18:56:35 +00:00
Simo Sorce
3bd7e65cac this was a stupid typo,
thanks to Jochen Dolze (dolze@epcnet.de) for pointing out.
(This used to be commit a554d5a99a)
2001-08-30 08:14:16 +00:00
Jean-François Micouleau
b03a2011bb Ouch ! I didn't think I would have to do that: add 2 new rap calls !
It's a quick and ugly hack as a proof of concept: the dell powervault 705
works with a samba PDC.

I'll do a correct user enumeration later.

	J.F.
(This used to be commit 9ec6a87356)
2001-08-28 16:05:55 +00:00
Tim Potter
cb9b39dd82 Added dummy handlers for SAM_SYNC and SAM_REPL messages.
(This used to be commit 08e05f1b3c)
2001-08-28 06:34:53 +00:00
Andrew Tridgell
b031af348c converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e33)
2001-08-27 19:46:22 +00:00
Andrew Tridgell
ee5f7237de started converting NTSTATUS to be a structure on systems with gcc in order to make it type incompatible with BOOL so we catch errors sooner. This has already found a number of bugs
(This used to be commit 1b778bc7d2)
2001-08-27 17:52:23 +00:00
Andrew Tridgell
e8e98c9ea0 converted smbd to use NTSTATUS by default
major changes include:

- added NSTATUS type
- added automatic mapping between dos and nt error codes
- changed all ERROR() calls to ERROR_DOS() and many to ERROR_NT()
  these calls auto-translate to the client error code system
- got rid of the cached error code and the writebmpx code

We eventually will need to also:
- get rid of BOOL, so we don't lose error info
- replace all ERROR_DOS() calls with ERROR_NT() calls

but that is too much for one night
(This used to be commit 83d9896c1e)
2001-08-27 08:19:43 +00:00
Herb Lewis
717533483b get rid of compiler warnings
(This used to be commit 0768991d04)
2001-08-24 20:32:01 +00:00
Andrew Tridgell
db93134c32 fixed level2 find first for unisys clients
(This used to be commit cb8b21f71d)
2001-08-24 20:11:26 +00:00
Tim Potter
bb94537ab5 Fixed incorrect debug.
(This used to be commit cec051cf5f)
2001-08-24 18:55:56 +00:00
Andrew Tridgell
a22db179a9 flush on a invalid fsp should give an error
(This used to be commit ef5f4866fb)
2001-08-24 04:56:33 +00:00
Jeremy Allison
964bfb2193 Fix W2K profiles writing to a Samba PDC. Thanks to Microsoft for their help !
Jeremy.
(This used to be commit faae7512e0)
2001-08-23 23:37:40 +00:00
Andrew Bartlett
7495a1a894 Fix to only send the status32 error for status32 clients, not to other
nt_smb clients.  As spotted by Thursby.
(This used to be commit 22de76a920)
2001-08-23 20:45:23 +00:00
Andrew Bartlett
2f6486b55f Fix up some unused variables and functions, fix up formatting
(This used to be commit bfce4ba7b6)
2001-08-23 18:13:56 +00:00
Andrew Bartlett
2051bb7d03 A few changes:
drop paramaters:
 status
 utmp hostname

change session code to always record each vuid current on the server.  The sessionid struct is no longer packed, as I couldn't get that to work ;-)

change smbstatus to show this info and less of the connections.tdb info (its not actualy that accurate).

I'll get swat doing some of this shortly.
(This used to be commit b068ad3005)
2001-08-22 19:11:55 +00:00
Jean-François Micouleau
fe626d22bf The DELL powervault 705 is sending a tcon&x with the service name being
"share" instead of "\\server\share".
Fix that. Still not able to get the user list but that's something else.

Jeremy I don't think I broke anything ;-)

	J.F.
(This used to be commit 59018c58e4)
2001-08-22 13:08:01 +00:00
Herb Lewis
c50ef23215 force checking of log size after 200 smbd in a row or after 30 sec with no
smbds. This should fix one case of logs not getting rotated properly.

We may need to test this to make sure there is no big performance hit from
the extra stat call.
(This used to be commit 2501fe7c04)
2001-08-22 04:58:00 +00:00
Jeremy Allison
ecea36501e Missed '\' at eol...
Jeremy.
(This used to be commit 0dbd1be704)
2001-08-22 01:06:27 +00:00
Jeremy Allison
85e063f5b8 Tidyup fixes for fcntl spin problem.
Jeremy.
(This used to be commit 27d3dd0e7c)
2001-08-22 01:01:37 +00:00
Jeremy Allison
e4275a35a6 Fixed the (incorrect) paranioa fix I put in for the fcntl lock spin.
Don't delete a share mode that failed to remove the oplock (doh!),
just set the oplock entry to zero....
Jeremy.
(This used to be commit fe4aa72018)
2001-08-22 00:29:40 +00:00
Andrew Bartlett
252742f2b0 Add a new option to disable our paranoid server check.
Defaults to ON, ie checking
(This used to be commit bd3010263b)
2001-08-21 02:58:07 +00:00
Volker Lendecke
e6a6dee027 This is Jeremy pretending to be Volker, 'cos the
link from Seattle is having problems.
I've added 3 things here to work on the fcntl spin
problem.
1). Check *all* tdb return codes... :-).
2). If we're asking ourselves to break an oplock, and we can't
find a fsp pointer that matches the entry, this is a *logic bug*
and we should abort and panic so someone with gdb can pick up
the pieces.
3). After we've broken an oplock, ensure that the entry itself
has been removed, and if not remove it ourselves. This should
not be neccessary in a correctly working environmen,t, but will
provide an added layer of robustness in error situations.
4). I hate german keyboards :-) :-).
Jeremy.
(This used to be commit 1c94fa8064)
2001-08-21 01:25:45 +00:00
Andrew Bartlett
68525e9021 Add comment to clarify why we call this twice.
(This used to be commit afece03d02)
2001-08-20 22:01:44 +00:00
Andrew Tridgell
f9ce202810 two fixes for NT clients -> share level Samba server
(This used to be commit a25911d58c)
2001-08-20 21:11:55 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Andrew Bartlett
8db28234c5 OK, so not freeing these was a mistake. I'll try to be less exuberent next
time :-)
(This used to be commit 8c3cf2db95)
2001-08-17 08:57:58 +00:00
Andrew Bartlett
9ed5f60a5b Move the claim_connection stuff till a little later in the process.
(You don't have to clean up somthing you haven't done yet...)
(This used to be commit ba76564c2a)
2001-08-17 08:44:04 +00:00
Andrew Bartlett
327fda27ed Move admin user check into a helper function.
Formatting fixes.
(This used to be commit 6fd8eb08c1)
2001-08-17 08:12:33 +00:00
Andrew Bartlett
67967749a2 Move read only check into a helper funcion. Ensure conn->service is set
before we use it to find a share's details.
(This used to be commit 7dc716f174)
2001-08-17 07:48:25 +00:00
Andrew Bartlett
7c332851b0 Restore a debug I think I dropped earlier
(This used to be commit dc635bde22)
2001-08-17 07:47:10 +00:00
Andrew Bartlett
578a39d44f smbd/auth_server: Doco, we want to use cli_nt_error here soon
smbd/password.c: We don't use globals here anymore

smbd/reply.c: Tidyness, global_myworkgroup must die!

smbd/service.c:  Move some of the make_connection code into a helper
                 function.
(This used to be commit 15c87e404f)
2001-08-17 07:03:27 +00:00
Andrew Bartlett
a0171765ff Style cleanup for the last vuid change.
Style, doco and DEBUG() fixes for auth_smbpasswd.c
(In particular for the account control call).

Andrew Bartlett
(This used to be commit 3d91c11942)
2001-08-17 06:06:56 +00:00
Andrew Bartlett
90d2460cf0 One less getpwnam() call...
Andrew Bartlett
(This used to be commit 204da7ba96)
2001-08-17 05:38:44 +00:00
Simo Sorce
2e783a4707 this is a big global fix for the ptr = Realloc(ptr, size) bug.
many possible mem leaks, and segfaults fixed.

someone should port this fix to 2.2 also.
(This used to be commit fa8e55b8b4)
2001-08-12 17:30:01 +00:00
Andrew Bartlett
6ad80352dd This patch does a number of things, mostly smaller than they look :-)
In particuar, it moves the domain_client_validate stuff out of
auth_domain.c to somwhere where they (I hope) they can be shared
with winbind better.  (This may need some work)

The main purpose of this patch was however to improve some of the
internal documentation and to correctly place become_root()/unbecome_root()
calls within the code.

Finally this patch moves some more of auth.c into other files, auth_unix.c
in this case.

Andrew Bartlett
(This used to be commit ea1c547ac8)
2001-08-12 11:19:57 +00:00
Tim Potter
62f7f6a022 Use the new client error api.
(This used to be commit 688da3c41d)
2001-08-10 06:01:11 +00:00
Tim Potter
4bbd1ddb27 More constant conversions.
(This used to be commit 00703d306f)
2001-08-10 05:50:47 +00:00
Gerald Carter
de5f42c9d9 merge from 2.2
(This used to be commit 6ab0e949d1)
2001-08-10 04:27:26 +00:00
Jeremy Allison
c604830585 Fixed wrong placement of allocate code :-(.
Changed alignment offset to 1 to allow netmon to parse ok.
Jeremy.
(This used to be commit fd89261a2c)
2001-08-09 20:01:35 +00:00
Jeremy Allison
541f2b73bc Fix inspired by Don @ HP. Close down password server connection if keepalive
fails.
Jeremy.
(This used to be commit 1f6e3d18cd)
2001-08-09 19:22:51 +00:00
Gerald Carter
f8d3cac8af a few cleanups while mergeing the passdb code into 2.2
(This used to be commit ef01739708)
2001-08-09 15:53:49 +00:00
Andrew Bartlett
3dbd870d37 Try to set the socket options early for some OSs (like Sol 8) where they
can't be set after the listen().

Andrew Bartlett
(This used to be commit 23b6772a24)
2001-08-09 12:52:05 +00:00
Andrew Bartlett
0897979a8b Some better debugs for our security=server code. I want to track down why
we occasionally don't make the connection to the server.
(This used to be commit 08e99f4c12)
2001-08-08 03:25:47 +00:00
Jeremy Allison
64c24ebf6d Always return NT_STATUS_DISK_FULL, even for quota errors.
Jeremy.
(This used to be commit e4a295b730)
2001-08-07 19:18:27 +00:00
Jeremy Allison
0c218e1abe Added fixes to return correct error codes on space allocation fail.
Jeremy.
(This used to be commit 3bf2419f4b)
2001-08-07 01:19:32 +00:00
Jeremy Allison
d851036d82 Correctly report amount written in debug when allocation space.
Jeremy.
(This used to be commit d1e7cf6073)
2001-08-07 00:36:10 +00:00
Jeremy Allison
b026e6edf2 Added Gerald's lanman printing only change to HEAD.
Jeremy.
(This used to be commit b7bd512d9a)
2001-08-06 22:39:51 +00:00
Jeremy Allison
f8d9da9983 Fix for getting allocate_file_space to return the correct errno.
Jeremy.
(This used to be commit 298595e8cb)
2001-08-06 19:21:23 +00:00
Andrew Bartlett
ac989cbe07 Record the NT_STATUS constant rather than its number in the logfiles
Fix typo in lmhosts manpage
(This used to be commit 9fff946cf1)
2001-08-06 09:35:08 +00:00
Jeremy Allison
27bdf594fb Extra debug to see what errno is on write fail.
Jeremy.
(This used to be commit 352a02bf5c)
2001-08-04 00:24:54 +00:00
Jeremy Allison
4f415ef128 The write zero bytes is an allocate, not set EOF.
Jeremy.
(This used to be commit 28b4ee1eba)
2001-08-03 19:32:33 +00:00
Andrew Bartlett
384b522c92 This is the fix for the PAM bug I probably introduced in the previous commit,
which I will confirm once I can find a box it would break on in the first place.

(this is the pam accounts as nobody thing we had with 2.2.0)

Andrew Bartlett
(This used to be commit 9746ad12bd)
2001-08-03 13:24:38 +00:00
Andrew Bartlett
986372901e This is my 'Authentication Rewrite' version 1.01, mostly as submitted to
samba-technical a few weeks ago.

The idea here is to standardize the checking of user names and passwords,
thereby ensuring that all authtentications pass the same standards.  The
interface currently implemented in as

nt_status = check_password(user_info, server_info)

where user_info contains (mostly) the authentication data, and server_info
contains things like the user-id they got, and their resolved user name.

The current ugliness with the way the structures are created will be killed
the next revision, when they will be created and malloced by creator functions.

This patch also includes the first implementation of NTLMv2 in HEAD, but which
needs some more testing.  We also add a hack to allow plaintext passwords to be
compared with smbpasswd, not the system password database.

Finally, this patch probably reintroduces the PAM accounts bug we had in
2.2.0, I'll fix that once this hits the tree.  (I've just finished testing
it on a wide variety of platforms, so I want to get this patch in).
(This used to be commit b30b6202f3)
2001-08-03 13:09:23 +00:00
Jeremy Allison
819a911735 Added "strict allocate" per share parameter. This causes actual on-disk allocation
to be done. Without it just does the ftruncate.
Jeremy.
(This used to be commit 0b052f103e)
2001-08-01 22:13:50 +00:00
Jeremy Allison
61bb3093e3 Pidfile check can be read-only. Removed old ifdef in password.c
Jeremy.
(This used to be commit d82efc61ef)
2001-08-01 17:32:45 +00:00
Jeremy Allison
996719cce2 Added "use mmap" for HPUX.
Jeremy.
(This used to be commit 840802f106)
2001-07-30 22:21:31 +00:00
Jeremy Allison
f31a7ab1e2 uint -> uint32.
Jeremy.
(This used to be commit 3e3155812c)
2001-07-30 17:53:39 +00:00
Jeremy Allison
bd0eacb24c Fix invalid uid being used after logoff. Thanks to Nigel Williams
for this bug report.
Jeremy.
(This used to be commit 50d8e5b22f)
2001-07-28 01:46:47 +00:00
Jeremy Allison
4b28b5a1bb Fix for potential crash bug with bad fid.
Jeremy.
(This used to be commit 82f81c830d)
2001-07-28 01:26:44 +00:00
Simo Sorce
b99e314cfb better debug messages + fix typo in debug message
(This used to be commit b377f06fd9)
2001-07-26 22:05:51 +00:00
Jeremy Allison
08138a3244 Fix from Michael Davidson <md@caldera.com> for DEC OSF/1 ACLs (ie.
Digital UNIX).
Jeremy.
(This used to be commit 324ba0512e)
2001-07-26 21:16:39 +00:00
Jeremy Allison
e662983fbe Excellent patch from Anselm Kruis <A.Kruis@science-computing.de> to fix
problem with wrong token being used in current_user.
Jeremy.
(This used to be commit 2c7d2a1d53)
2001-07-25 18:07:36 +00:00
Andrew Tridgell
1d07607b39 we need to pull passwords in client charset for crypto to work
(This used to be commit 9a87d6f58f)
2001-07-25 13:25:31 +00:00
Andrew Tridgell
9de7c5e521 - don't try to print pointers
- removed some unused mangling code
(This used to be commit 36af1c0dc4)
2001-07-25 06:29:26 +00:00
Simo Sorce
1cbae7315f Convert other parameters (read list, write list, valid users...) to the P_LIST format.
changed functions to use list instead of strings
addedd lp_list_substitute function
(This used to be commit 7257d07563)
2001-07-24 20:02:48 +00:00
Jeremy Allison
76f36b8c36 We were making an assumption in the oplock
break code path that was invalid (ie. we were assuming
we could infer a non-levelII oplock when such an oplock
was detected - this may no longer be valid once we've
processed the break process dealing with the break will
change the state of it anyway.
This prevents the state where we get the following packet
trace :

client                      server
NTcreate ->
                         <- NTcreate resp
NTcreate ->
                         <- break to level II
ok - broken ->
                         <- break to none

Thanks to Alan Romeril for providing the trace that allowed
me to track this down.

Jeremy.
(This used to be commit c343e4f490)
2001-07-24 01:18:43 +00:00
Jeremy Allison
a9ab7eaa5d Fix case insensitive password change code.
Fixed crash bug with un-zeroed talloced memory.
Jeremy.
(This used to be commit eea1c30df2)
2001-07-23 22:06:05 +00:00
Andrew Bartlett
9cbe6e8166 This patch fixes up a few issues where we would do lookups in the local system
on username we already know are perfectly valid, and in their final form.  In
particular we don't want to do a lookup for DOMAIN\nobody, it just does not
make sense, nor should we do map_username and the like if the username is as
specified in the vuid - we have done it already.

Andrew Bartlett
(This used to be commit 7cb517329b)
2001-07-21 02:23:19 +00:00
Jeremy Allison
54068ae8f3 Tidied up calling yield_connection on connection allocation fail.
Restore debug message to level zero.
Jeremy.
(This used to be commit 0b13f495b3)
2001-07-17 22:04:46 +00:00
Jeremy Allison
c2aa4b762f Connection record not existing is not a debug level 0.
Jeremy.
(This used to be commit d7da59f54e)
2001-07-17 21:32:33 +00:00
Jeremy Allison
c6b51500af Fixes from Jens-Uwe.Walther@force.de to make the -l option behave
consistently.
Jeremy.
(This used to be commit f591ca9f25)
2001-07-17 20:42:59 +00:00
Simo Sorce
0cf44bb347 move the global_machine_password_needs_changing where we need it.
(This used to be commit 8a2f6fbacd)
2001-07-17 08:34:12 +00:00
Simo Sorce
e3fbb09ced Test if machine password has expired.
This test was lost somehow...
(This used to be commit 065d8f69d5)
2001-07-16 12:16:48 +00:00
Jeremy Allison
1f9a689f1f Toomas Soome's fix for joining a domain the old way.
Jeremy.
(This used to be commit 8db233c8b5)
2001-07-11 18:52:43 +00:00
Andrew Tridgell
6baa40e3fe added winbind_exclude_domain() so smbd can tell the winbind client
code not to do lookups for a particular domain. This allows winbind to
operate on a Samba PDC
(This used to be commit d472ee3a69)
2001-07-10 02:28:17 +00:00
Andrew Bartlett
5b8d230e39 This removes unused paramaters from various authtication functions, and should
not change behaviour.

This should make my later diffs smaller, where I actualy start cleaning up this
mess...

Andrew Bartlett
(This used to be commit 04f090c224)
2001-07-08 14:10:30 +00:00
Andrew Tridgell
1cc543ffa1 fixed some unicode and LANMAN2 bugs in trans2 find first/next
(This used to be commit d5097b2f20)
2001-07-07 21:24:00 +00:00
Andrew Bartlett
1c3c995221 You can't dump_data() a function pointer...
Andrew Bartlett
(This used to be commit 4f7b2f51b0)
2001-07-07 06:44:50 +00:00
Jeremy Allison
9df203f876 Wrapped dlerror() in the same way as the other dlxxx() calls.
Jeremy.
(This used to be commit ed5a1f70c6)
2001-07-06 18:45:59 +00:00
Andrew Tridgell
7a58c800ed fixed bug where we looked at the first byte of a password to determine
if the password is blank. That ain't valid with encrypted passwords!

Jeremy, this changes the semantics of session setup. We no longer
automatically set guest=True when the client happens to choose their
username == the guest username. Instead we rely on the map_to_guest
code. I'm pretty sure this is now the right thing, but please look at
it carefully before putting it in 2.2

This is the bug that was causing the build farm to sometimes
fail. Basically we failed every 256 attempts - ie. when the first byte
of the encrypted password happened to be 0
(This used to be commit 4b35a3494c)
2001-07-06 04:08:24 +00:00
Jeremy Allison
aa91def29f Fix race where wrong action (created or opened) could be returned.
Jeremy.
(This used to be commit af5b649b01)
2001-07-05 23:37:09 +00:00
Jeremy Allison
aff5f5c158 Fix for rabbit-pellet mode. Chris please test this. Thanks for Dave CB
for help on this.
Jeremy.
(This used to be commit 7efaefdf60)
2001-07-05 18:07:46 +00:00
Andrew Tridgell
c9291d02c1 this fixes the failure of MS office on VFAT partitions on Linux
The problem is that ftruncate can't expand on VFAT, but it can on
ext2. That means our autoconf test is useless. I have recoded it to
use the alternative to ftruncate when then sys_ftruncate fails.

Jeremy, do you want this for 2.2.1?
(This used to be commit 970236ee99)
2001-07-05 10:33:10 +00:00
Andrew Tridgell
8ffcec213e fixed a bug in the parameters SMBctemp uses in open_file_shared()
(This used to be commit a1dee993cb)
2001-07-05 06:39:15 +00:00
Andrew Tridgell
55bd0867d8 use alpha_strcpy on the domain as it comes off the wire
(This used to be commit 3b9eb528f5)
2001-07-05 04:34:50 +00:00
Jean-François Micouleau
6b97f76be8 allow to use usrmgr/svrmgr tools in win95
pretty cool
(This used to be commit 04575ff17b)
2001-07-04 21:57:03 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
59db9bcbf0 check for bad usernames early in session setup
(This used to be commit 657836599a)
2001-07-04 04:17:58 +00:00
Jeremy Allison
17a0a89c79 Ensure we correctly round down to 2 second boundary if dos filetime
set for a share.
Jeremy.
(This used to be commit 8f57233c0f)
2001-07-04 01:01:02 +00:00
Jeremy Allison
b96c379dae Remove the exit_server() calls that stop nmbd linking.
Jeremy.
(This used to be commit 110061ff5a)
2001-07-03 21:32:23 +00:00
Jeremy Allison
0eb28dc851 Fixed incorrect debug parameters for lock_pid.
Jeremy.
(This used to be commit 310d2af6b0)
2001-07-03 17:40:43 +00:00
Christopher R. Hertel
56b2a0c114 Very minor cleanup. I was looking for another problem and found some bits
of code that were unclear.

Chris -)-----
(This used to be commit c2977be340)
2001-07-02 16:25:00 +00:00
Jeremy Allison
5b69009b25 Fixed the nastiest locking bug to track down.... smb_pids are sent in the
lockingX calls - use that instead of smb_pid in the packet.
Jeremy.
(This used to be commit a3925cb9c6)
2001-07-02 02:42:41 +00:00
Simo Sorce
247acd5521 - fix bug in reply_nt- fix bug in reply_nt1
(This used to be commit 200110a3b4)
2001-07-01 10:39:37 +00:00
Jeremy Allison
d1f38ac531 Fixed the first locking error (test #8 found by locktest code from
Clarion locktest.
Jeremy.
(This used to be commit 5c42845b5b)
2001-06-30 01:59:48 +00:00
Jeremy Allison
e2ced932db Ensured all the system calls in msdfs.c go through the vfs layer.
Added vfs calls to symlink() and readlink() with appropriate configure
checks.
Jeremy.
(This used to be commit c24e6b41ea)
2001-06-29 22:32:24 +00:00
Tim Potter
f83f2cd4fa Win9x weirdness. When setting the named pipe handle state on a Unicode
server, Win9x only sends \PIPE instead of \PIPE\.  Looks suspiciously like
an off-by one bug in the Win9x dce/rpc pipe code.
(This used to be commit b4a9079833)
2001-06-29 01:58:48 +00:00
Jeremy Allison
629a59fe85 Always use DOMAIN\user first that this is the more specific case.
Jeremy.
(This used to be commit 52143c0853)
2001-06-26 06:06:42 +00:00
Andrew Bartlett
90498a10c7 Remove warning about trapdoor systems for non-root mode.
Andrew Bartlett
(This used to be commit b33000cdc0)
2001-06-26 03:45:45 +00:00
Jeremy Allison
31ab8ae3ff Fixed stupid typo that would stop trusted domains working.
Jeremy.
(This used to be commit fa721b4adf)
2001-06-25 19:08:30 +00:00
Andrew Tridgell
b95a294a08 fixed usage of socklen_t and also tidied up SIG_ATOMIC_T, using a typedef instead of a define
(This used to be commit e2ecff419f)
2001-06-25 02:53:13 +00:00
Andrew Tridgell
8b79a473fa - make the regresison test mode code build in by default. This should
allow us to have test targets without special configure options
- fixed make proto so that it actually does something
(This used to be commit 55109a7525)
2001-06-25 00:46:34 +00:00
Jeremy Allison
08bda36755 Log debug before and after netbios names copied so we know if they've been
changed.
Jeremy.
(This used to be commit f8c121c69c)
2001-06-23 20:01:23 +00:00
Jeremy Allison
37eb0d6c74 Added other_safe_chars to alpha_strcpy(). Needs testing but is a better
fix for the problem.
Jeremy.
(This used to be commit e059fffd03)
2001-06-23 07:22:16 +00:00
Jeremy Allison
7133aed083 Better fix for client name vulnarability.
Jeremy.
(This used to be commit 17c3faa367)
2001-06-23 00:22:14 +00:00
Jeremy Allison
5ba566efb7 Fixed logic bug in timeout processing spotted by Ying Chen <ying@almaden.ibm.com>.
Jeremy.
(This used to be commit 08c1682423)
2001-06-22 20:56:52 +00:00
Andrew Tridgell
868d010aa1 added the ability to test smbd safely as an ordinary user. The way it works is
that libsmb/ creates a local tcp socket then launches smbd as a subprocess
attached to that socket. smbd thinks it is being launched from inetd.

to use it do the following:

- compile with -DSMB_REGRESSION_TEST
- run like this (also works with smbtorture etc)
    export SMBD_TEST=1
    export LIBSMB_PROG=bin/smbd
    smbclient //server/share -Uuser%pass

obviously you need to setup a smb.conf etc. Using --prefix to configure
is useful.

The aim of all this stuff is to add a decent set of regression tests
to the build farm, so we know if smbd actually runs correctly on all the
platforms, not just builds. We can run smbtorture, masktest, locktest etc,
plus a bunch of smbclient scripts and any new tests we write.

This doesn't help much with nmbd (at least not yet) but its a good start.
(This used to be commit 7e8e6ae9a8)
2001-06-22 15:14:45 +00:00
Jeremy Allison
100a54e221 Andrew - please look this over. I've fixed a long standing (maybe 4-5
years old) bug when chainging a sessionsetup_and_X and tcon together.
The wrong username was being entered into the tdb, even though the
correct user was used for accessing files. This is related to the fact
that authorise_login() is not used for sessionsetup, but only for tcon
auths.
Jeremy.
(This used to be commit 0187cd6aef)
2001-06-22 00:57:59 +00:00
Andrew Tridgell
91b8a8d1d2 next_token() was supposed to be a reentrant replacement for strtok(),
but the code suffered from bitrot and is not now reentrant. That means
we can get bizarre behaviour
i've fixed this by making next_token() reentrant and creating a
next_token_nr() that is a small non-reentrant wrapper for those lumps
of code (mostly smbclient) that have come to rely on the non-reentrant
behaviour
(This used to be commit 674ee2f1d1)
2001-06-21 09:10:42 +00:00
Andrew Tridgell
4ff011d88e Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually does
send unaligned unicode strings sometimes!
Fixed our handling of the workgroup name tacked on the end of the
NT1 negprot response (a unaligned unicode)
fixed a couple of places where we should be using the message_end fns instead
of pre-calculated buffer lengths
(This used to be commit 86613493a9)
2001-06-21 05:38:28 +00:00
Jeremy Allison
fda0f83d75 Following info from TAKAHASHI Motonobu <monyo@samba.gr.jp>,
Samba Users Group Japan, ensure that we don't use dos_to_unix(xx,True),
but always use dos_to_unix(xx,False) to prevent overwriting.
Jeremy.
(This used to be commit 244aec8ea6)
2001-06-21 01:01:15 +00:00
Jeremy Allison
3f1254bee1 Fixed W2K SP2 joining a Samba PDC hosted domain.
Jermey.
(This used to be commit 05a2911403)
2001-06-20 19:55:59 +00:00
Andrew Tridgell
fcda2645f0 added a close-share smbcontrol message that forcibly closes a share in smbd (to allow unmount)
(This used to be commit 15b17a80db)
2001-06-20 03:05:09 +00:00
Jeremy Allison
850a0e27e1 Extra debug in open.c, fix for bad debug message in reply.c
Jeremy.
(This used to be commit 2c2fc85136)
2001-06-19 07:31:55 +00:00
Jeremy Allison
5f633c0e5e Set support for info levels...
Jeremy.
(This used to be commit e033f75891)
2001-06-19 00:11:12 +00:00
Jeremy Allison
c0be2fc029 Best-effort so far implementation of new W2K info levels.
An-embrace-and-extending we will go...
Jeremy.
(This used to be commit 43bf9b2c7a)
2001-06-18 23:42:41 +00:00
Simo Sorce
9b70bdfc38 Be sure to not use strlen with NULL pointer.
(This used to be commit 53803b0087)
2001-06-15 08:00:36 +00:00
Tim Potter
1aa05a31ac Fixed some return code checks for cli_initialise() from False to NULL.
Spotted by Joe Doran <joed@interlude.eu.org>
(This used to be commit 3e3b9bc538)
2001-06-14 00:08:42 +00:00
Tim Potter
10f8162124 Removed commented out msdfs code that was being called anyway.
(This used to be commit a542f4513a)
2001-06-12 09:51:03 +00:00
Jeremy Allison
2f99c0e602 lib/util_getent.c: removed debug code.
smbd/posix_acls.c: Attempt to fix the "lose default acl" problem in Solaris.
Needs testing.
lib/sysacls.c: Typo fix.
Jeremy.
(This used to be commit d989f8bd3e)
2001-06-12 01:49:30 +00:00
Jeremy Allison
f63ee18c68 *Wonderful* patch from Andrew Bartlett that will help ensure tdb's are
cleaned on clients abending connections. Thanks Andrew !
Jeremy.
(This used to be commit 1b3977c536)
2001-06-09 01:38:54 +00:00
Jeremy Allison
a72b714822 Log tdb failures.
Jeremy.
(This used to be commit f004471aac)
2001-06-08 20:26:46 +00:00
Jeremy Allison
3414c71f6d Extra stuff for large readwrite support.
Jeremy.
(This used to be commit 4338ee78c3)
2001-06-08 03:02:34 +00:00
Jeremy Allison
79ca1f75bb Correctly make max pathlength 255.
Jeremy.
(This used to be commit 30cffea8fa)
2001-06-08 02:49:30 +00:00
Jeremy Allison
5264e9a2a7 Set correct reply word in large writeX (greater than 64k) replies.
Also added smbtorture test for this.
Jeremy.
(This used to be commit 6d65556ae8)
2001-06-05 08:17:16 +00:00
Jeremy Allison
091fd5a174 Deal with incorrect large writes from old NT4.x clients.
We still need to set the large write reply correctly.
Jeremy.
(This used to be commit 810dae29b8)
2001-06-05 06:29:57 +00:00
Andrew Tridgell
05fc3e578c use LDSHFLAGS not -shared in several places
(This used to be commit 8ec9c87b5d)
2001-06-04 05:13:59 +00:00
Tim Potter
e07b85ab19 Added *.po to .cvsignore files.
(This used to be commit 870e9e4e89)
2001-06-01 11:26:20 +00:00
Jeremy Allison
63c7ca9d62 Fix debug statement so it doesn't use lp_workgroup() either.
Jeremy.
(This used to be commit 18e652a5e0)
2001-05-31 14:13:53 +00:00
Andrew Tridgell
5237500c73 use the new tdb_open_log() fn on connections database
(This used to be commit 68c0dcec3d)
2001-05-30 06:08:23 +00:00
Tim Potter
22242c5038 i18n fix for domain_client_validate()
(This used to be commit d6dcca7cc9)
2001-05-25 07:36:58 +00:00
Andrew Tridgell
fe6208d09a return an error code on password attack, rather than exiting.
otherwise security scanners may think we are vulnerable!
(This used to be commit ee8cb88682)
2001-05-25 02:45:07 +00:00
Jeremy Allison
15e66ba37a Added tdb_change_int_atomic() to allow atomic updates of a tdb int value.
Jeremy.
(This used to be commit cf5015f159)
2001-05-25 00:48:28 +00:00
Jeremy Allison
9ff6634db9 Fixup the large_writex problem (a large_writex can send a full 64k of data,
we already have space for this we just need to understand the length correctly).
Jeremy.
(This used to be commit 19145bae72)
2001-05-24 19:28:22 +00:00
Jeremy Allison
b065de612c Added tdb_errstr() messages so we can see if these functions fail.
Jeremy.
(This used to be commit ec64ddac5f)
2001-05-23 21:33:43 +00:00
Jeremy Allison
4d86a2841c This is *very* cool. I'm pretty convinced we can just set the
CAP_LARGE_READX|CAP_LARGE_WRITEX bits on negprot and out W2K
performance goes through the roof......
And as we *always* offer 64 buffers we can do this with this
simple change.....
Jeremy.
(This used to be commit c328dda0fa)
2001-05-23 18:47:52 +00:00
Jeremy Allison
faa0bef196 Defensive brlock and locking database cleaning code.
Jeremy.
(This used to be commit d7aa42e459)
2001-05-22 20:35:48 +00:00
Tim Potter
2d27d8c720 Fixes to get pam_auth() functionality working again.
(This used to be commit 083b74c743)
2001-05-17 06:08:49 +00:00
Jeremy Allison
8c4d6548a9 groupdb/mapping.c: Fix gcc compiler warning.
smbd/connection.c: Sync up with code in 2.2
Jeremy.
(This used to be commit 87025c223d)
2001-05-17 00:24:34 +00:00
Jeremy Allison
10211f53f9 Check sizes of data entries in connections.tdb before deciding they're crecs...
We will need this when we use finer grained locking for max connections.
Jeremy.
(This used to be commit c6cd42a679)
2001-05-15 18:12:02 +00:00
Andrew Tridgell
8410ef028a make the max_connections code less horrendously inefficient
- it didn't honour the clear flag
- it locked the database (not necessary)

the previous code would do 10^6 kill() operations for 1000 people
logging in - and all with the database locked. Not very scalable.

Still haven't added the counter, that would make it really efficient
(This used to be commit 6bdbeb4a32)
2001-05-15 00:53:15 +00:00
Jeremy Allison
de6b5d8fb2 tdb_traverse returns number of records, not zero, on success.
Now tested max connections and it works again. Hurrah !
Jeremy.
(This used to be commit 6565b8c978)
2001-05-14 18:43:49 +00:00
Jeremy Allison
363e378dee Implemented max connections in a similar way to 2.0.x (scan of connection db).
This needs testing !
Tidied up tabs in tdb.c.
Jeremy.
(This used to be commit 0852465053)
2001-05-14 06:15:46 +00:00
Andrew Tridgell
9c54ddc7f9 statcache initialisation fix
pointed out by Elrond
(This used to be commit 572a37534b)
2001-05-12 13:04:15 +00:00
Jeremy Allison
8efe942751 Now we're doing the substituion in the lp_string code remove the erroneous
debug 0 warning.
Jeremy.
(This used to be commit be7e1d0f2c)
2001-05-12 00:31:59 +00:00
Jeremy Allison
6e41b74e6d Fixed nasty little bug found by Gerald where we were corrupting the mode
bits before checking if we should change them on non-acl systems.
Jeremy.
(This used to be commit aba243ca08)
2001-05-10 19:27:00 +00:00
Jeremy Allison
f5243954fa Made "security XXX" masks apply to ACL set. By default they have no effect.
Removed "restrict acl with mask" - redundent.
Jeremy.
(This used to be commit 0db8a61d71)
2001-05-10 01:03:44 +00:00
Tim Potter
55eab3e232 More compiler warning fixes.
(This used to be commit 88a7b2c3f8)
2001-05-08 06:14:08 +00:00
Jeremy Allison
061beddc61 Patch from ackley@cs.unm.edu to clear server_fd/client_fd in root daemon to stop
%I getpeername() failure.
Jeremy.
(This used to be commit 15584d30cd)
2001-05-08 00:03:45 +00:00
Jeremy Allison
1cebd0fe98 Fix for bad profile perms. Ensure r on files and rwx on directories.
Jeremy.
(This used to be commit f100e091ab)
2001-05-07 21:17:42 +00:00
Gerald Carter
30c4c04c2f Patch from Simo:
o sed 's/pdb_clear_sam/pdb_free_sam/g'
  o add pdb_reset_sam()
  o password changing should be ok now as well.
(This used to be commit 96d0e7c330)
2001-05-07 14:04:46 +00:00
Jeremy Allison
998fcd3f1e Patch from David_Tiller@ccnotes.ccity.com finally applied now I've thought
about it to stop account lockouts with "security=server" mode. Sorry for
the delay David.
Jeremy.
(This used to be commit e881971503)
2001-05-06 20:56:14 +00:00
Jean-François Micouleau
f35157f392 Big cleanup of passdb and backends.
I did some basic tests but I have probably broken something. Notably the
password changing. So don't cry ;-)

	J.F.
(This used to be commit a4a4c02b12)
2001-05-04 15:44:27 +00:00
Gerald Carter
1f7a451c1e merge from 2.2 in password_ok() to ensure that we check the
return code from smb_pam_accountcheck()
(This used to be commit d5d6f01aaf)
2001-05-04 14:28:28 +00:00
Jeremy Allison
548d16869a Fixed SHM_R/SHM_W warnings by moving sys/ipc.h and sys/shm.h into includes.h
and using autoconf tests.
Added "restrict acl with mask" parameter.
Jeremy.
(This used to be commit 7792e32ba7)
2001-05-03 19:47:30 +00:00
Jeremy Allison
aac630b382 Had to add a "pam password change" parameter (defaults to "off") and inlined
the pam password change code to ensure that existing and working password
chat scripts don't break with 2.2.1. PAM password changing has to be explicitly
requested.
Allowed wildcards in pam password change matching (matches password chat
script matching). Had to add const (sorry Tim :-) to ms_fnmatch() to
stop warnings. Don't worry - the const changes are isolated and don't
cause any other warnings :-).
Jeremy.
(This used to be commit 47b4d82536)
2001-05-02 23:32:09 +00:00
Jeremy Allison
c3a999409d Based on an original PAM patch by Andrew Bartlett, re-written by me to
remove global static PAM variables, and to tidy up the PAM internals code.
Now looks like the rest of Samba.
Still needs testing.
Jeremy.
(This used to be commit 1648ac64a7)
2001-04-30 21:05:58 +00:00
Andrew Tridgell
63602d15af - fixed some compiler warnings
- fixed slprintf and vsprintf macros
(This used to be commit c986a3c51e)
2001-04-28 14:01:02 +00:00