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

40 Commits

Author SHA1 Message Date
Günther Deschner
cd5bf3449a Some minor, cosmetic cleanup in srv_samr_util.c.
Guenther
2008-02-13 09:42:47 +01:00
Günther Deschner
ef7c74401c Fix SAMR_FIELD_PARAMETERS handling in rpc_server/srv_samr_util.c.
Guenther
2008-02-11 23:37:44 +01:00
Günther Deschner
ed89daec1d Fix SAMR_FIELD_LOGON_HOURS handling in rpc_server/srv_samr_util.c.
Guenther
2008-02-11 23:37:36 +01:00
Günther Deschner
16199c2694 Use SAMR_FIELDS for fields_present in rpc_server/srv_samr_util.c.
Guenther
2008-02-11 23:37:24 +01:00
Günther Deschner
118e166c00 Allow to set correct info level log prefix in duplicates of copy_id21_to_sam_passwd.
Guenther
2008-02-11 22:50:07 +01:00
Günther Deschner
d148ffbc95 Use pidl for _samr_SetUserInfo and _samr_SetUserInfo2.
Guenther
2008-02-11 22:49:10 +01:00
Günther Deschner
0b630db298 Remove trailing whitespace in samr client and server.
Guenther
2008-02-07 14:40:39 +01:00
Kai Blin
ab0ee6e9a6 util_str: Don't return memory from talloc_tos(), use mem_ctx instead. 2008-01-19 02:20:16 +01:00
Jeremy Allison
55b4f9d003 Remove pstring from everything in rpc_server except
srv_spoolss_nt.c and srv_srvsvc_nt.c.
They're next :-).
Jeremy.
2007-11-27 11:22:58 -08:00
Volker Lendecke
5f205ab48d Make base64_encode_data_blob return a talloced string 2007-11-09 15:12:30 +01:00
Andrew Tridgell
b0132e94fc r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text 2007-10-10 12:28:22 -05:00
Jeremy Allison
407e6e695b r23779: Change from v2 or later to v3 or later.
Jeremy.
2007-10-10 12:28:20 -05:00
Jim McDonough
afabd68b6a 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.
2007-10-10 12:23:36 -05:00
Volker Lendecke
8f67efd582 r20546: Fix some IBM checker errors 2007-10-10 12:16:56 -05:00
Jim McDonough
3840d3785f r18754: Get rid of some more invalid time sets 2007-10-10 12:00:54 -05:00
Jim McDonough
6b17af0769 r18724: Fixup time(0) -> time(NULL) 2007-10-10 12:00:52 -05:00
Jim McDonough
fd5761c9e5 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.
2007-10-10 12:00:52 -05:00
Jelmer Vernooij
1115745cae r18188: merge 3.0-libndr branch 2007-10-10 11:43:56 -05:00
Jeremy Allison
9dafb7f48c 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.
2007-10-10 11:19:14 -05:00
Volker Lendecke
5a37aba105 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
2007-10-10 11:17:18 -05:00
Gerald Carter
19b7593972 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......
2007-10-10 11:10:15 -05:00
Gerald Carter
939c3cb5d7 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)
2007-10-10 11:04:48 -05:00
Günther Deschner
b1e4b72c1c r9229: merge from trunk:
allow admins to uncheck the "User must change Password at next Logon"
checkbox in Usermanager.

Guenther
2007-10-10 11:00:28 -05:00
Jeremy Allison
9506b8e145 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
2007-10-10 10:58:00 -05:00
Tim Potter
ede9fd08cf r5909: Remove some unecessary casts. Patch from Jason Mader for bugzill #2468. 2007-10-10 10:56:08 -05:00
Jim McDonough
ffac752875 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.
2007-10-10 10:55:48 -05:00
Jelmer Vernooij
7fa2caec5e r4370: Don't assume the compiler supports declarations after statements. 2007-10-10 10:53:46 -05:00
Günther Deschner
0930ad6627 r4351: Vampire Logon-Hours. Update Logon-Hours only when they have changed.
Guenther
2007-10-10 10:53:45 -05:00
Jeremy Allison
6fb64d8b36 r1171: Patch from "Lu, Jianliang" <Jianliang.Lu@getronics.com> to
reset password counts when account is reset.
Jeremy.
2007-10-10 10:51:58 -05:00
Volker Lendecke
55fd1e490e 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
2007-10-10 10:51:28 -05:00
Jim McDonough
fbf909926b quick for for usrmgr. unknown_6 is really max dimension of logon hours array. need to update passdb for this. 0001-01-01 00:00:00 +00:00
Jim McDonough
840340bd96 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.
0001-01-01 00:00:00 +00:00
Jim McDonough
1976843345 More sync between passdb on 3.0 and HEAD.
Replace unknown_3 with fields_present.  Also causes rpc_samr structure field changes.
0001-01-01 00:00:00 +00:00
Jeremy Allison
e591854eda Handle munged dial string. Patch from Aur?lien Degr?mont <adegremont@idealx.com>with memory leak fixes by me.
Jeremy.
0001-01-01 00:00:00 +00:00
Jeremy Allison
cd7bd8c2da 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.
0001-01-01 00:00:00 +00:00
Simo Sorce
f7cfdf20b7 back port from HEAD 0001-01-01 00:00:00 +00:00
Andrew Bartlett
91ca4771c6 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
0001-01-01 00:00:00 +00:00
Andrew Bartlett
2044d60bbe 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
0001-01-01 00:00:00 +00:00
Gerald Carter
e026b84815 syncing up with HEAD again.... 0001-01-01 00:00:00 +00:00
Andrew Bartlett
5a2a6f1ba3 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
0001-01-01 00:00:00 +00:00