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

187 Commits

Author SHA1 Message Date
Günther Deschner
1d2dd47d31 s3-crypto: only include crypto headers when crypto is done.
Guenther
2010-05-18 00:44:27 +02:00
Volker Lendecke
9cd712d1bc s3: Fix a cut&paste error in a debug message in check_oem_password() 2010-04-23 07:07:04 +02:00
Volker Lendecke
6f998b4b9a s3: Slightly simplify the logic of check_password_complexity()
The whole routine was just one if-branch. Do an early return instead.
2010-04-17 12:01:18 +02:00
Volker Lendecke
b0b077f27c s3: Fix some nonempty blank lines 2010-04-17 12:01:18 +02:00
Michael Adam
667b6f3322 s3:smbd:password_in_history: treat entry with 0 salt as 0 + plain nt hash
This is to introduce a new format of the password history, maintaining backwards
compatibility: The old format was 16 byte hash + 16 byte md5(salt + nt hash).
The new format is 16 zero bytes and 16 bytes nt hash.

This will allow us to respect the last X entries of the nt password history
when deciding whether to increment the bad password count.

This is part of the fix for bug #4347 .

Michael
2010-01-07 16:51:17 +01:00
Volker Lendecke
53a1ed9b6c s3: Factor password_in_history() out of check_passwd_history() 2010-01-07 11:07:55 +01:00
Volker Lendecke
3d8394986a s3: Fix a typo 2010-01-07 11:07:52 +01:00
Volker Lendecke
147a2c057c s3: Avoid a memset(, 0, ) call 2010-01-07 11:07:51 +01:00
Günther Deschner
46784b4d99 s3-chgpasswd: split out a check_password_complexity() function.
Guenther
2009-11-10 13:08:28 +01:00
Matthias Dieter Wallnöfer
607ceff234 s3/s4 - Adapt the IDL changes on various locations 2009-10-08 09:50:19 +02:00
Jeremy Allison
43c766a14a Fix bug 6673 - smbpasswd does not work with "unix password sync = yes".
Revert change from 3.3 -> 3.4 with read_socket_with_timeout changed
from sys_read() to sys_recv(). read_socket_with_timeout() is called
with non-fd's (with a pty in chgpasswd.c and with a disk file in
lib/dbwrap_file.c via read_data()). recv works for the disk file,
but not the pty. Change the name of read_socket_with_timeout() to
read_fd_with_timeout() to make this clear (and add comments).
Jeremy.
2009-09-06 21:38:50 -07:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Simo Sorce
efa9bc9dc6 Pass also sername to check password script 2009-05-09 11:44:12 -04:00
Günther Deschner
c400fc1e1e s3-samr: disable check for ACB_DISABLED in check_oem_password().
It is a bad idea to just tell everyone that an account is disabled without
really having checked the password first.

Found by torture test.

Guenther
2009-05-08 00:43:24 +02:00
Günther Deschner
b9fa8285f7 s3-samr: rework check_oem_password() to take a struct samu, not to return one.
Guenther
2009-05-08 00:43:01 +02:00
Andrew Bartlett
f28f113d8e Rework Samba3 to use new libcli/auth code (partial)
This commit is mostly to cope with the removal of SamOemHash (replaced
by arcfour_crypt()) and other collisions (such as changed function
arguments compared to Samba3).

We still provide creds_hash3 until Samba3 uses the credentials code in
netlogon server

Andrew Bartlett
2009-04-14 16:23:35 +10:00
Volker Lendecke
fdd282afa3 Remove an unused extern reference 2009-02-10 21:55:13 +01:00
Stefan Metzmacher
2f9f8fe81e s3:smbd: remove pointless static variables in chgpasswd.c
metze
2009-01-08 12:22:18 +01:00
Jelmer Vernooij
5a56c0adf2 Use dup2() replacement from libreplace. 2008-11-01 03:58:14 +01:00
Jelmer Vernooij
cb78d4593b Cope with changed signature of http_timestring(). 2008-10-11 23:57:44 +02:00
Volker Lendecke
c071b941e6 Fix bug 5398
Thanks to Jason Mader for sending the compiler output :-)

Volker
(This used to be commit 7a57c2da1a)
2008-04-19 17:04:09 +02:00
Volker Lendecke
245ebca937 Fix bug 5366
(This used to be commit 448a8fe6c1)
2008-04-11 11:32:47 +02:00
Volker Lendecke
6ddfa6ae77 read_socket_with_timeout_ntstatus->read_socket_with_timeout
(This used to be commit 90554799af)
2008-02-02 11:03:22 +01:00
Volker Lendecke
5e43eeb1b6 Get rid of read_socket_with_timeout
(This used to be commit f9c8ac83ff)
2008-02-02 11:03:22 +01:00
Günther Deschner
a92eb76688 Finally enable pidl generated SAMR & NETLOGON headers and clients.
Guenther
(This used to be commit f7100156a7)
2008-01-17 16:54:46 +01:00
Volker Lendecke
e518e19bc0 Remove Get_Pwnam and its associated static variable
All callers are replaced by Get_Pwnam_alloc
(This used to be commit 735f593154)
2007-12-19 21:09:10 +01:00
Jeremy Allison
8f28bda7f8 Fix bug #5121 (unix passwd sync not working on a streams based
system).
Jeremy.
(This used to be commit 545cd2139c)
2007-12-17 10:44:09 -08:00
Jeremy Allison
bd1172d106 Remove a static fstring.
Jeremy.
(This used to be commit 898c56c0ea)
2007-12-16 18:02:32 -08:00
Jeremy Allison
d76b086cc9 More work on bug #5082, use LC_ALL as this takes
precedence.
Jeremy.
(This used to be commit 446ebae76d)
2007-12-15 22:28:38 -08:00
Jeremy Allison
3cdd8da3ca Fix for bug #5082 from Mathias Gug <mathiaz@ubuntu.com>, Steve Langasek <vorlon@debian.org>.
Recent versions of Linux-PAM support localization of user prompts,
so Samba must use the C locale when invoking PAM (directly or via
/usr/bin/passwd) to ensure that password chat values match the prompts in a
locale-invariant fashion.
Jeremy.
(This used to be commit bc13e93954)
2007-12-14 17:02:50 -08:00
Jeremy Allison
42cfffae80 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
(This used to be commit ec003f3936)
2007-12-07 17:32:32 -08:00
Jeremy Allison
79266500cd Remove all pstrings from smbd/chgpasswd.c.
Jeremy.
(This used to be commit eaf14c701b)
2007-11-12 15:02:50 -08:00
Jeremy Allison
d068bc64b6 Three more pstring removals.
Jeremy.
(This used to be commit c15819b757)
2007-11-11 21:46:52 -08:00
Jeremy Allison
36441da424 Remove the horror that was the global smb_rw_error.
Each cli struct has it's own local copy of this variable,
so use that in client code. In the smbd server, add one
static to smbd/proccess.c and use that inside smbd. Fix
a bunch of places where smb_rw_error could be set by
calling read_data() in places where we weren't reading
from the SMB client socket (ie. winbindd).
Jeremy.
(This used to be commit 255c2adf7b)
2007-11-05 11:12:56 -08:00
Jeremy Allison
30191d1a57 RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
(This used to be commit f35a266b3c)
2007-10-18 17:40:25 -07:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc)
2007-10-10 12:28:22 -05:00
Jeremy Allison
d824b98f80 r23779: Change from v2 or later to v3 or later.
Jeremy.
(This used to be commit 407e6e695b)
2007-10-10 12:28:20 -05:00
Simo Sorce
b85bfd5066 r23682: Old patch I forgot in one of my 3.0.25 trees.
Make sure we honour the directive not to allow machine password changes.
(This used to be commit 436555f05c)
2007-10-10 12:23:45 -05:00
Stefan Metzmacher
56ba447668 r22001: change prototype of dump_data(), so that it takes unsigned char * now,
which matches what samba4 has.

also fix all the callers to prevent compiler warnings

metze
(This used to be commit fa322f0cc9)
2007-10-10 12:18:59 -05:00
Günther Deschner
a8281b19c7 r19094: Fix debug statement.
Guenther
(This used to be commit e99696c970)
2007-10-10 12:15:11 -05:00
Jim McDonough
dc1f0804dd r19058: Implement "user cannot change password", and complete "user must change
password at next logon" code.  The "password last set time" of zero now
means "user must change password", because that's how windows seems to
use it.  The "can change" and "must change" times are now calculated
based on the "last set" time and policies.

We use the "can change" field now to indicate that a user cannot change
a password by putting MAX_TIME_T in it (so long as "last set" time isn't
zero).  Based on this, we set the password-can-change bit in the
faked secdesc.
(This used to be commit 21abbeaee9)
2007-10-10 12:15:06 -05:00
Volker Lendecke
580e9817a2 r16248: Fix Coverity ID 297
(This used to be commit e56e3c19e1)
2007-10-10 11:17:27 -05:00
Jeremy Allison
9f6631b469 r15887: Ensure we use sys_write so we're not interrupted.
Jeremy.
(This used to be commit c66620770d)
2007-10-10 11:17:12 -05:00
James Peach
40d0707827 r14668: Set the FILE_STATUS_OFFLINE bit by observing the events a DMAPI-based
HSM is interested in. Tested on both IRIX and SLES9.
(This used to be commit 514a767c57)
2007-10-10 11:15:42 -05:00
James Peach
97ee5b1afa r14600: Refactor capability interface from being IRIX-specific to using only
the POSIX interface. Note that this removes support for inherited
capabilities. This wasn't used, and probably should not be.
(This used to be commit 763f4c0148)
2007-10-10 11:15:39 -05:00
Günther Deschner
e54786b535 r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.
* Fix a couple of related parsing issues.
* in the info3 reply in a samlogon, return the ACB-flags (instead of
  returning zero)

Guenther
(This used to be commit 5b89e8bc24)
2007-10-10 11:10:25 -05:00
Gerald Carter
cd55919263 r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
(This used to be commit 6f1afa4acc)
2007-10-10 11:10:16 -05:00
Gerald Carter
2203bed32c r13576: This is the beginnings of moving the SAM_ACCOUNT data structure
to make full use of the new talloc() interface.  Discussed with Volker
and Jeremy.

* remove the internal mem_ctx and simply use the talloc()
  structure as the context.
* replace the internal free_fn() with a talloc_destructor() function
* remove the unnecessary private nested structure
* rename SAM_ACCOUNT to 'struct samu' to indicate the current an
  upcoming changes.  Groups will most likely be replaced with a
  'struct samg' in the future.

Note that there are now passbd API changes.  And for the most
part, the wrapper functions remain the same.

While this code has been tested on tdb and ldap based Samba PDC's
as well as Samba member servers, there are probably still
some bugs.  The code also needs more testing under valgrind to
ensure it's not leaking memory.

But it's a start......
(This used to be commit 19b7593972)
2007-10-10 11:10:15 -05:00
Volker Lendecke
301d51e13a r13494: Merge the stuff I've done in head the last days.
Volker
(This used to be commit bb40e544de)
2007-10-10 11:10:06 -05:00
Günther Deschner
72b30eba64 r13444: Add REJECT_REASON_OTHER for samr_chgpasswd_user3
Guenther
(This used to be commit 58baf718be)
2007-10-10 11:10:03 -05:00