1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

5564 Commits

Author SHA1 Message Date
Jeremy Allison
cb4b13a82b Fixed the bug with member servers in a Samba PDC hosted domain not allowing
other access. Problem was max time was being set to 0xffffffff, instead of
0x7fffffff.
Jeremy.
(This used to be commit 94403d8417)
2001-10-02 06:57:18 +00:00
Andrew Tridgell
58bc10518b the CASETABLE torture target now generates the complete unicode
equivalence table for a server. This was inspired by the chargen win32
code from monyo.

This takes a *long* time to run against a Samba server due to the case
insensitive comparisons in the filesystem. That makes it a N^2
operation, and N is 64k. It is linear on NT.
(This used to be commit 441f9415b3)
2001-10-02 05:52:11 +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
Tim Potter
260002f0e7 Added copyright (not sure who owns it though) and #include guards.
(This used to be commit f9eb370806)
2001-10-02 03:46:12 +00:00
Tim Potter
33fb598731 Added copyright and include guards.
(This used to be commit 9efa93556e)
2001-10-02 03:43:26 +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
2e3be37878 Don't try to write the LM password in the NT password feild.
(This used to be commit 90dcbe16be)
2001-09-30 14:51:38 +00:00
Andrew Tridgell
b7ca6ec034 make strupper() and strlower() not modify the string if it doesn't
need modifying

that makes constant strings OK
(This used to be commit 57196635d9)
2001-09-30 13:30:52 +00:00
Christopher R. Hertel
9a22ac94a4 I told Jeremy at the CIFS conference that I would sort the command list
in smbclient.  Done.  I had a little trouble because the "!" command is
a special case and must be listed last.  Awkward.

Chris -)-----
(This used to be commit 14bfd9107a)
2001-09-30 06:49:44 +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
Andrew Bartlett
99b9f80852 Make header comment clearer, these are RIDs, not UIDs.
(This used to be commit 663c1c91bd)
2001-09-30 02:51:45 +00:00
Andrew Bartlett
73f8da3a87 Finally kill off the SMBENCRYPT() macro.
(This used to be commit 0591048335)
2001-09-30 01:39:47 +00:00
Gerald Carter
59681e1655 merge from 2.2
(This used to be commit c308459bda)
2001-09-30 01:33:02 +00:00
Motonobu Takahashi
14b47c8c53 fixed in *BSD
(This used to be commit d3cb139aff)
2001-09-29 20:07:26 +00:00
Motonobu Takahashi
51bb6e8248 fixed not to install in *BSD, but perhaps on Solaris, cannot install
(This used to be commit a91777fb47)
2001-09-29 20:06:35 +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
Motonobu Takahashi
b4dc377673 not to creat gmo files from po files during making
this is because some platforms such as HP-UX do not have any msgfmt
command.

if someone updates po file,
then he has to update gmo files manually and commit.
(This used to be commit ca350fdf03)
2001-09-29 16:07:01 +00:00
Andrew Bartlett
a28dd18fe7 This is the passdb section of the previously mentioned commit.
Of particular note is the change to pdb_free_sam() to take its sam argument by
reference, allowing it to be NULLified by the SAFE_FREE() macro, and the
changed to local_password_change() both to make it work and to remove the
duplicate code that caused so much breakage over the last few days.

 - Small change in behaviour:  when LOCAL_ADD_USER is set, the user doesn't
actually exist locally but does exist in the passdb we don't attempt to do a
GetPwnam().  (How the entry got there is another matter, and most passdbs won't
allow this anyway).

Andrew Bartlett
(This used to be commit 6b45e342fd)
2001-09-29 13:14:19 +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
14cc9a3101 return NT_STATUS_NO_MEMORY istead of NT_STATUS_OK if we are out of memory.
(This used to be commit d38bc1dcec)
2001-09-29 12:26:40 +00:00
Andrew Bartlett
d25c2b146b Add a few const statements to various odd bits of the tree. (Fixes some
warnings)
(This used to be commit b648cc669d)
2001-09-29 11:51:40 +00:00
Gerald Carter
00d1bccaab Don't build make_printerdef in HEAD. This tool is not needed except
to support 2.0.x style WIn9x driver download.
(This used to be commit d0628d0d2d)
2001-09-29 04:04:35 +00:00
Jeremy Allison
bf1697bc88 Fixed CUPS detection - patch from Michael Sweet.
Jeremy.
(This used to be commit 4c5158d1e5)
2001-09-28 18:07:11 +00:00
Andrew Bartlett
b2e39ddcf7 How the heck I missed this I don't know, but somehow I got a copy-and-paste
error in here...

Now you can change local passwords again.  There is stil somthing broken about
remote (via windows/sampasswd) password changing.

I shall have to revise my testing, I honestly don't know how this slipped
through the net.

MERGE for 2.2.2.

Sorry,
Andrew Bartlett
(This used to be commit 1f83184f88)
2001-09-28 04:48:36 +00:00
Jeremy Allison
75c5061331 Removed smbpasswd_XX call (how did this get re-added, I removed all
these yesterday ?).
Jeremy.
(This used to be commit e25dc68843)
2001-09-27 21:27:12 +00:00
Jeremy Allison
a69e900d97 Sync 2.2.2 and HEAD (I will keep these the same if it kills me :-).
Jeremy.
(This used to be commit 76fac3eb94)
2001-09-27 21:20:14 +00:00
Jeremy Allison
3bd48ad718 Merge HEAD and 2.2 - try frantically to keep in sync.
Jeremy.
(This used to be commit 65bf4a36ef)
2001-09-27 20:40:47 +00:00
Volker Lendecke
f7fb26f675 How often did I read the CVS commit message
"Always compile before commit" :-((

Volker
(This used to be commit 69a3277fc5)
2001-09-27 16:28:50 +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
Andrew Bartlett
415cfe0912 Major update to pdbedit's import and export code, in line with reqests for it
to use the pdb_ formatting functions.

Similarly, it now uses pdb_set...() rather than accessing passdb members
directly.

Andrew Bartlett
(This used to be commit e3b7cac47f)
2001-09-27 09:36:38 +00:00
Andrew Bartlett
f6ce758e5b Kill unused variables
(This used to be commit 758d923fa1)
2001-09-27 09:18:13 +00:00
Andrew Bartlett
2a9cd3b79a Fix memory leak in get_sampwd_entries(), reindent for clarity.
- call pdb_reset_sam() after each getent call.

Fix bug in get_group_alias_entries(), were if num_entries was zero this caused
talloc() to return NULL, failing a test below with NT_STATUS_NO_MEMORY.

Fix pdb_reset_sam() to correctly initalise the sam structure.

Move default value code into a single place, likewise for sam freeing code.
 - should make things easier if we decide to malloc other strings, or get more
 non-zero default values.

Finally, add a function in init a sam struct from a getpwnam() return.

Andrew Bartlett
(This used to be commit a41fb44f5e)
2001-09-27 09:13:26 +00:00
Simo Sorce
59a02ecae1 minor fixes
(This used to be commit 57e639bbdd)
2001-09-27 02:05:30 +00:00
Andrew Tridgell
c61d1a1679 fixed compilation of tdbtorture
(This used to be commit 2f44756233)
2001-09-27 01:57:02 +00:00
Gerald Carter
2c4d1d39b1 OpenSSL merge from 2.2
(This used to be commit efc6df5a39)
2001-09-26 17:29:53 +00:00
Volker Lendecke
29d3318437 From 2.2.
Volker
(This used to be commit 50ea73426f)
2001-09-26 16:47:02 +00:00
Gerald Carter
c10dc7a4cc merge from 2.2
(This used to be commit 247b9c3eba)
2001-09-26 14:40:21 +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
d74d82bddc Make use of the pdb_set_plaintext_passwd() update to vastly simplify
decode_pw_buffer() and the samr password changing routines.

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

This also takes into account the possability of multibyte passwords.

Andrew Bartlett
(This used to be commit 42402c87d6)
2001-09-26 11:51:25 +00:00
Andrew Bartlett
1ef468f805 Fix the uninitialised variable, but more importantly fix the SEGFAULT.
Merge for 2.2.2

Should TDB cope with TDB pointers itself?

Andrew Bartlett
(This used to be commit 27f0510a0b)
2001-09-26 11:44:25 +00:00
Andrew Bartlett
f12ebc00a8 Fix up TDB_SAM with repect to case sensitvity. (need to use unix_strlower)
Also attempt to make some of the syntax clearer, its confusing enought for the
compiler... (it thinks that there is use of an unitilaised variable)

In fact there is, see next patch...
(This used to be commit 540abc8125)
2001-09-26 11:36:37 +00:00
Andrew Bartlett
9b1c40b7a4 Fix up pdbedit to initialise its structures with the standard functions,
therfore ensuring sensible defaults for some values, notably account expriries
which mean 'locked out' if == 0.

This NEEDS to be merged into 2.2.2 or people can get wrongly initilaised TDB
records.  (which will only fail on future versions of samba).

Andrew Bartlett
(This used to be commit f0f315f315)
2001-09-26 11:28:26 +00:00
Andrew Bartlett
dc62feccb6 Add a new interface pdb_set_plaintext_passwd() to the passdb. This simply
interfaces to the existing set NT and LM functions, but ensures we always do it
in the same way.

This also allows for the possibility for the unix password sync code to be
hidden behind the passdb interface as some stage.
(This used to be commit 33e3591b2d)
2001-09-26 11:23:08 +00:00
Andrew Bartlett
6744ca0a36 More updates to prevent account-guessing.
This moves the check that ensures that the account being looked up is the same
account as the machine logged in as to the front, before we even start with
passdb.

Merge for 2.2.2?

Andrew Bartlett
(This used to be commit f7ed0ecc14)
2001-09-26 11:13:55 +00:00