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

49 Commits

Author SHA1 Message Date
Günther Deschner
26c844902c s3-samr: move samr helper prototypes outside of proto.h
Guenther
2010-05-18 00:44:27 +02:00
Günther Deschner
9f15ef11bd s3-account_policy: add pdb_policy_type enum.
Guenther
2009-07-14 12:12:18 +02:00
Günther Deschner
a21bfc4daf s3-samr: Fix SetUserInfo level 16 and 21 w.r.t. ACB_AUTOLOCK acct_flag.
It is not allowed to *set* this flag remotely if it has been not set already.

Found by torture test.

Guenther
2009-05-09 00:03:50 +02:00
Günther Deschner
f05d888d7a s3-samr: let set_user_info_16 and 20 follow the same pattern as all other levels.
Guenther
2009-05-08 00:41:40 +02:00
Günther Deschner
f93f713898 s3-samr: support some more info levels in samr_SetUserInfo calls.
Guenther
2009-05-08 00:41:40 +02:00
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 0f292d70f6)
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 c4f248df8e)
2008-03-31 20:55:40 +02:00
Günther Deschner
7269a504fd Add my copyright.
Guenther
(This used to be commit d078a87571)
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 cd5bf3449a)
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 ef7c74401c)
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 ed89daec1d)
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 16199c2694)
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 118e166c00)
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 d148ffbc95)
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 0b630db298)
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 ab0ee6e9a6)
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 55b4f9d003)
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 5f205ab48d)
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 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
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 afabd68b6a)
2007-10-10 12:23:36 -05:00
Volker Lendecke
18bf0b29b4 r20546: Fix some IBM checker errors
(This used to be commit 8f67efd582)
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 3840d3785f)
2007-10-10 12:00:54 -05:00
Jim McDonough
77a7066d79 r18724: Fixup time(0) -> time(NULL)
(This used to be commit 6b17af0769)
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 fd5761c9e5)
2007-10-10 12:00:52 -05:00
Jelmer Vernooij
995205fc60 r18188: merge 3.0-libndr branch
(This used to be commit 1115745cae)
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 9dafb7f48c)
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 5a37aba105)
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 19b7593972)
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 939c3cb5d7)
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 b1e4b72c1c)
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 9506b8e145)
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 ede9fd08cf)
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 ffac752875)
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 7fa2caec5e)
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 0930ad6627)
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 6fb64d8b36)
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 55fd1e490e)
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 fbf909926b)
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 840340bd96)
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 1976843345)
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 e591854eda)
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 cd7bd8c2da)
2003-09-18 23:53:48 +00:00
Simo Sorce
43b3ea968b back port from HEAD
(This used to be commit f7cfdf20b7)
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 91ca4771c6)
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 2044d60bbe)
2002-11-02 03:47:48 +00:00
Gerald Carter
d9729d81a9 syncing up with HEAD again....
(This used to be commit e026b84815)
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 5a2a6f1ba3)
2002-07-03 07:37:54 +00:00