1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-19 10:03:58 +03:00

44 Commits

Author SHA1 Message Date
Günther Deschner
842edcd2b0 s3-samr: try to to fix password_expired flag handling.
Guenther
2009-03-20 10:39:18 +01:00
Jim McDonough
13b2f59383 Don't reset password last set time just because the expired flag
is set to 0.  If the account wasn't expired but autolocked,
using "net user /dom <username> /active:y" would clear this,
incorrectly setting the current time as the new "password last set"
time.
(This used to be commit 0f292d70f698b8ae885005b5704a96476e876571)
2008-06-09 11:49:29 -04:00
Günther Deschner
4369c14a66 Re-add support for the samr parameters string.
(dialin settings, terminal server settings, etc.)

Guenther
(This used to be commit c4f248df8e34c6a028bf8d789fe9763b0ea063fe)
2008-03-31 20:55:40 +02:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a8757182d84dfd3307a2e1b751cf173aaa97)
2008-02-27 19:38:48 +01:00
Günther Deschner
b462e92b2a Some minor, cosmetic cleanup in srv_samr_util.c.
Guenther
(This used to be commit cd5bf3449adee7537ae6ca4e3b398e99d34555fd)
2008-02-13 09:42:47 +01:00
Günther Deschner
f0149d23d2 Fix SAMR_FIELD_PARAMETERS handling in rpc_server/srv_samr_util.c.
Guenther
(This used to be commit ef7c74401c71a238944cb1a9bbd448a4693339bf)
2008-02-11 23:37:44 +01:00
Günther Deschner
14ee7be97b Fix SAMR_FIELD_LOGON_HOURS handling in rpc_server/srv_samr_util.c.
Guenther
(This used to be commit ed89daec1d170128047f157d7a9314ae83a21733)
2008-02-11 23:37:36 +01:00
Günther Deschner
f0e8c5d4c2 Use SAMR_FIELDS for fields_present in rpc_server/srv_samr_util.c.
Guenther
(This used to be commit 16199c26948ee3b501c051ef530d1b167cbb6196)
2008-02-11 23:37:24 +01:00
Günther Deschner
326477e522 Allow to set correct info level log prefix in duplicates of copy_id21_to_sam_passwd.
Guenther
(This used to be commit 118e166c003a931884c662423e1e280a5be3eb48)
2008-02-11 22:50:07 +01:00
Günther Deschner
6bb6af65ab Use pidl for _samr_SetUserInfo and _samr_SetUserInfo2.
Guenther
(This used to be commit d148ffbc955aa62e42ab480e41d3a9b8c63117cd)
2008-02-11 22:49:10 +01:00
Günther Deschner
ca790c96d2 Remove trailing whitespace in samr client and server.
Guenther
(This used to be commit 0b630db298a863ca5e38c9ee7b0202a58c51c6d1)
2008-02-07 14:40:39 +01:00
Kai Blin
805caafd44 util_str: Don't return memory from talloc_tos(), use mem_ctx instead.
(This used to be commit ab0ee6e9a6a9eee317228f0c2bde254ad9a59b85)
2008-01-19 02:20:16 +01:00
Jeremy Allison
3a452a15b7 Remove pstring from everything in rpc_server except
srv_spoolss_nt.c and srv_srvsvc_nt.c.
They're next :-).
Jeremy.
(This used to be commit 55b4f9d003b036af69085f7b64e0df08c5ba440d)
2007-11-27 11:22:58 -08:00
Volker Lendecke
62b97b0156 Make base64_encode_data_blob return a talloced string
(This used to be commit 5f205ab48d8ac3b7af573ea0be1ce095ab835448)
2007-11-09 15:12:30 +01:00
Andrew Tridgell
5e54558c6d r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
(This used to be commit b0132e94fc5fef936aa766fb99a306b3628e9f07)
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 407e6e695b8366369b7c76af1ff76869b45347b3)
2007-10-10 12:28:20 -05:00
Jim McDonough
9c3db7adf3 r23616: Fix bugzilla #4719: must change password is not set from usrmgr.exe.
This was only affecting the newer versions of usrmgr.exe, because they
use a user_info_25 struct.  The password is getting set separately
inside that code, so the password last set time was getting set from the
password change logic.

We also were not parsing a number of fields (like logon hours) from the
user_info_25.  That should also be fixed.
(This used to be commit afabd68b6ae874aceba708dc36808ed007ad496c)
2007-10-10 12:23:36 -05:00
Volker Lendecke
18bf0b29b4 r20546: Fix some IBM checker errors
(This used to be commit 8f67efd582655e03fea746eee499f3cab6cbdb4d)
2007-10-10 12:16:56 -05:00
Jim McDonough
f002bb2a46 r18754: Get rid of some more invalid time sets
(This used to be commit 3840d3785f1d61885aa7c83675a3e19673eb4b2a)
2007-10-10 12:00:54 -05:00
Jim McDonough
77a7066d79 r18724: Fixup time(0) -> time(NULL)
(This used to be commit 6b17af0769ab0d04ec01cc83ed6e7fad822b00b1)
2007-10-10 12:00:52 -05:00
Jim McDonough
e04dda6a2a r18722: Fix up password change times. The can change and must change times are
calculated based on the last change time, policies, and acb flags.

Next step will be to not bother storing them.  Right now I'm just trying to
get them reported correctly.
(This used to be commit fd5761c9e52cbf8f1f7e45e71693598b27ecbf57)
2007-10-10 12:00:52 -05:00
Jelmer Vernooij
995205fc60 r18188: merge 3.0-libndr branch
(This used to be commit 1115745caed3093c25d6be01ffee21819fb0a675)
2007-10-10 11:43:56 -05:00
Jeremy Allison
fbdcf2663b r16945: Sync trunk -> 3.0 for 3.0.24 code. Still need
to do the upper layer directories but this is what
everyone is waiting for....

Jeremy.
(This used to be commit 9dafb7f48ca3e7af956b0a7d1720c2546fc4cfb8)
2007-10-10 11:19:14 -05:00
Volker Lendecke
c594a5519d r16060: This is one of the more dirty patches I've put in lately. Parse enough of
SetUserInfo level 25 to survive the join method XP uses if the user did not
exist before. For good taste this contains way too much cut&paste, but for a
real fix there is just not enough time.

Up to 3.0.22 we completely ignored that a full level 21 is being sent together
with level 25, but we got away with that because on creation we did not set
the "disabled" flag on the workstation account. Now we correctly follow W2k3
in this regard, and we end up with a disabled workstation after join.

Man, I hate rpc_parse/. The correct fix would be to import PIDL generated samr
parsing, but this is would probably be a bit too much for .23...

Thanks to Tom Bork for finding this one.

Volker
(This used to be commit 5a37aba10551456042266443cc0a92f28f8c3d0d)
2007-10-10 11:17:18 -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 19b7593972480540283c5bf02c02e5ecd8d2c3f0)
2007-10-10 11:10:15 -05:00
Gerald Carter
54abd2aa66 r10656: BIG merge from trunk. Features not copied over
* \PIPE\unixinfo
* winbindd's {group,alias}membership new functions
* winbindd's lookupsids() functionality
* swat (trunk changes to be reverted as per discussion with Deryck)
(This used to be commit 939c3cb5d78e3a2236209b296aa8aba8bdce32d3)
2007-10-10 11:04:48 -05:00
Günther Deschner
3662fb6d3a r9229: merge from trunk:
allow admins to uncheck the "User must change Password at next Logon"
checkbox in Usermanager.

Guenther
(This used to be commit b1e4b72c1c36869c4dfc5ed284be24edc99f6774)
2007-10-10 11:00:28 -05:00
Jeremy Allison
19ca97a70f r7882: Looks like a large patch - but what it actually does is make Samba
safe for using our headers and linking with C++ modules. Stops us
from using C++ reserved keywords in our code.
Jeremy
(This used to be commit 9506b8e145982b1160a2f0aee5c9b7a54980940a)
2007-10-10 10:58:00 -05:00
Tim Potter
5d88feaaad r5909: Remove some unecessary casts. Patch from Jason Mader for bugzill #2468.
(This used to be commit ede9fd08cf0ce04528f73c74e2345ba46d26f1e2)
2007-10-10 10:56:08 -05:00
Jim McDonough
180fa12026 r5580: Fix "net rpc trustdom add". Much closer to what windows does. Also stop
referencing unknown_6 from sam, because it's just fixed at 1260, the max
len of LOGON_HRS.  Need to go in and mark it as "remove me" from passdb.
(This used to be commit ffac752875938d510446ebbeba6fc983f65cda1e)
2007-10-10 10:55:48 -05:00
Jelmer Vernooij
d1a61c18fb r4370: Don't assume the compiler supports declarations after statements.
(This used to be commit 7fa2caec5ec2de4c5e7359621745a65ca9df255c)
2007-10-10 10:53:46 -05:00
Günther Deschner
b314cf95ce r4351: Vampire Logon-Hours. Update Logon-Hours only when they have changed.
Guenther
(This used to be commit 0930ad662770278cbe9fd4e3deaa523957b96697)
2007-10-10 10:53:45 -05:00
Jeremy Allison
bd178fd7a2 r1171: Patch from "Lu, Jianliang" <Jianliang.Lu@getronics.com> to
reset password counts when account is reset.
Jeremy.
(This used to be commit 6fb64d8b368d1b24768c5817d5deac1e502e694a)
2007-10-10 10:51:58 -05:00
Volker Lendecke
9259481d86 r545: Handing a NULL blob to base64_encode_data_blob leads to an invalid write of a
0 in base64_encode_data_blob. I don't know what the base64 encoding of a NULL
string is, so fix the problematic caller I found. The real fix should go into
base64_encode_data_blob.

Volker
(This used to be commit 55fd1e490efbe91c391c27101166284034cd32ef)
2007-10-10 10:51:28 -05:00
Jim McDonough
8d12b8768a quick for for usrmgr. unknown_6 is really max dimension of logon hours array. need to update passdb for this.
(This used to be commit fbf909926b7d7b1e92ebeba44469392296c35c1a)
2004-03-03 04:23:43 +00:00
Jim McDonough
78b8f3ca0c Merge fields_present function from HEAD. Now, a field will not be updated
on setuserinfo levels which include this field, unless the corresponding
bit (defined in passdb.h) is turned on.  Without this, newer versions
of usrmgr break us pretty bad.
(This used to be commit 840340bd96d3c6693b451bc61e155b7b426271e4)
2004-03-02 21:02:09 +00:00
Jim McDonough
1fa1e931a3 More sync between passdb on 3.0 and HEAD.
Replace unknown_3 with fields_present.  Also causes rpc_samr structure field changes.
(This used to be commit 1976843345efb6ca4f9cebd964a61acd8ae11d41)
2004-02-12 16:16:53 +00:00
Jeremy Allison
5cfe36d09d Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>with memory leak fixes by me.
Jeremy.
(This used to be commit e591854eda8568ed1a4ad6b9de64e523c02b4392)
2003-11-07 18:32:23 +00:00
Jeremy Allison
3a48e4b287 The "unknown_5" 32 bit field in the user structs is actually 2 16-bit
fields, bad_password_count and logon_count. Ensure this is stored/fetched
in the various SAMs. As it replaces the unknown_5 field this fits
exactly into the tdb SAM without any binary problems. It also is added
to the LDAP SAM as two extra attributes. It breaks compatibility with
the experimental SAMs xml and mysql. The maintainers of these SAMs must
fix them so upgrades like this can be done transparently. I will insist
on the "experimental" status until this is solved.
Jeremy.
(This used to be commit cd7bd8c2daff3293d48f3376a7c5a708a140fd94)
2003-09-18 23:53:48 +00:00
Simo Sorce
43b3ea968b back port from HEAD
(This used to be commit f7cfdf20b7b3b7743c0c3af4ff62fdde00e45fdc)
2003-04-26 01:15:57 +00:00
Andrew Bartlett
302bffc08f Merge from HEAD - we already have one function for converting a unistr2 to a
static 'unix' string, so we don't need a second pdb specific version.

Andrew Bartlett
(This used to be commit 91ca4771c6b834747b06fff21822a14e929de2c1)
2003-01-04 08:57:51 +00:00
Andrew Bartlett
6d7195d1d7 Merge passdb from HEAD -> 3.0
The work here includes:
 - metze' set/changed patch, which avoids making changes to ldap on unmodified
attributes.

 - volker's group mapping in passdb patch

 - volker's samsync stuff
 - volkers SAMR changes.

 - mezte's connection caching patch

 - my recent changes (fix magic root check, ldap ssl)

Andrew Bartlett
(This used to be commit 2044d60bbe0043cdbb9aba931115672bde975d2f)
2002-11-02 03:47:48 +00:00
Gerald Carter
d9729d81a9 syncing up with HEAD again....
(This used to be commit e026b84815ad1a5fa981c24fff197fefa73b4928)
2002-09-26 18:37:55 +00:00
Andrew Bartlett
8e52737efc Break up the passdb objects (to allow RPC clients to link without brining in
*.o) and implment new enum_dom_users code in the SAMR RPC subsystem.

Incresingly, we are using the pdb_get_{user,group}_sid() functions, in the
eventual hope that we might one day support muliple domains off a single
passdb.  To extract the RID, we use sid_peek_check_rid(), and supply an
'expected' domain SID.

The id21 -> SAM_ACCOUNT and id23 -> SAM_ACCOUNT code has been moved to
srv_samr_util.c, to ease linking in passdb users.

Compatiblity code that uses 'get_global_sam_sid()' for the 'expected' sid is in
pdb_compat.c

Andrew Bartlett
(This used to be commit 5a2a6f1ba316489d118a8bdd9551b155226de94f)
2002-07-03 07:37:54 +00:00