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

281 Commits

Author SHA1 Message Date
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
Jeremy Allison
720a917205 r16593: Make the invarient explicit to Klocwork. Bug #2023.
Jeremy.
2007-10-10 11:19:02 -05:00
Jeremy Allison
a0d368197d r16241: Fix Klocwork #106 and others like it.
Make 2 important changes. pdb_get_methods()
returning NULL is a *fatal* error. Don't try
and cope with it just call smb_panic. This
removes a *lot* of pointless "if (!pdb)" handling
code. Secondly, ensure that if samu_init()
fails we *always* back out of a function. That
way we are never in a situation where the pdb_XXX()
functions need to start with a "if (sampass)"
test - this was just bad design, not defensive
programming.
Jeremy.
2007-10-10 11:17:27 -05:00
Volker Lendecke
40339fdcce r16014: Correctly set the group RID in init_sam_from_buffer.
BIG THANKS to Tom Bork for reporting that Bug!

Volker
2007-10-10 11:17:17 -05:00
Volker Lendecke
ea7cced6bc r15601: Fix segfaults with 'security=share' and 'guest only = yes'
Volker
2007-10-10 11:17:03 -05:00
Gerald Carter
d2c1842978 r14457: Add a few more special cases for RID 513 in the samr code.
Now that I know what all the requirements for this group are
I can generalize the code some more and make it cleaner.
But at least this is working with lusrmgr.msc on XP and 2k now.
2007-10-10 11:15:31 -05:00
Simo Sorce
a374546c7e r13776: Merge in the editposix ldapsam optimization 2007-10-10 11:10:53 -05:00
Günther Deschner
5b89e8bc24 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
2007-10-10 11:10:25 -05:00
Gerald Carter
bcf269e2ec r13679: Commiting the rm_primary_group.patch posted on samba-technical
* ignore the primary group SID attribute from struct samu*
* generate the primary group SID strictlky from the Unix
  primary group when dealing with passdb users
* Fix memory leak in original patch caused by failing to free a
  talloc *
* add wrapper around samu_set_unix() to prevent exposing the create
  BOOL to callers.  Wrappers are samu_set_unix() and samu-allic_rid_unix()
2007-10-10 11:10:23 -05:00
Gerald Carter
92c251fdf0 r13601: * Remove unused code from pdb_ldap.c
* Add a 'struct passwd *' to the struct samu for later reference
  (I know this may be controversial but its easily reverted which is
  is why I'm checking this is as a seaparate patch before I get
  too deep).
* Remove unix_homedir from struct samu {} and update the pdb wrapper
  functions associated with it.
2007-10-10 11:10:18 -05:00
Gerald Carter
e3489f7edd r13600: Move functions local to tdbsam to pdb_tdb.c 2007-10-10 11:10:18 -05:00
Gerald Carter
6568c9cb03 r13593: consolidate pdb_set_sam_sids() into samu_set_unix() which
was the only place it was called from.
2007-10-10 11:10:18 -05:00
Gerald Carter
6f1afa4acc r13590: * replace all pdb_init_sam[_talloc]() calls with samu_new()
* replace all pdb_{init,fill}_sam_pw() calls with samu_set_unix()
2007-10-10 11:10:16 -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
b65be8874a r13571: Replace all calls to talloc_free() with thye TALLOC_FREE()
macro which sets the freed pointer to NULL.
2007-10-10 11:10:14 -05:00
Gerald Carter
f79f4dc4c5 r13545: A patch which I think it's time has come. VOlker, we can talk about
this more but it gets around the primary group issue.

* don't map a SID to a name from the group mapping code if
  the map doesn't have a valid gid.  This is only an issue
  in a tdb setup
* Always allow S-1-$DOMAIN-513 to resolve (just like Windows)
* if we cannot resolve a users primary GID to a SID, then set
  it to S-1-$DOMAIN-513
* Ignore the primary group SID inside pdb_enum_group_memberships().
  Only look at the Unix group membersip.

Jeremy, this fixes a fresh install startup for smbd as far as my tests
are concerned.
2007-10-10 11:10:12 -05:00
Volker Lendecke
bb40e544de r13494: Merge the stuff I've done in head the last days.
Volker
2007-10-10 11:10:06 -05:00
Gerald Carter
7a2da5f0cc r13460: by popular demand....
* remove pdb_context data structure
* set default group for DOMAIN_RID_GUEST user as RID 513 (just
  like Windows)
* Allow RID 513 to resolve to always resolve to a name
* Remove auto mapping of guest account primary group given the
  previous 2 changes
2007-10-10 11:10:04 -05:00
Gerald Carter
17e63ac4ed r13316: Let the carnage begin....
Sync with trunk as off r13315
2007-10-10 11:06:23 -05:00
Gerald Carter
77575c64e4 r12913: missed merge to fix BUG 3391; ensure we can lookup account policies 2007-10-10 11:06:06 -05:00
Jeremy Allison
c2752347eb r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C")
and replace calls to isupper/islower/toupper/tolower with
ASCII equivalents (mapping into _w variants).
Jeremy.
2007-10-10 11:05:58 -05:00
Volker Lendecke
b15815c804 r12163: Change lookup_sid and lookup_name to return const char * instead of char *,
use a temporary talloc_ctx for clarity.

Volker
2007-10-10 11:05:46 -05:00
Volker Lendecke
9f99d04a54 r12051: Merge across the lookup_name and lookup_sid work. Lets see how the build farm
reacts :-)

Volker
2007-10-10 11:05:43 -05:00
Volker Lendecke
30fcdf84d8 r11999: Re-add "passdb expand explicit".
We came to the conclusion that changing the default is something that has to
wait one or two more releases, but it will happen one way or the other.

Volker
2007-10-10 11:05:41 -05:00
Volker Lendecke
d228cb62a7 r11947: Back out passdb:expand_explicit until we find consensus. I'll file this as a
bugzilla entry.

Volker
2007-10-10 11:05:38 -05:00
Volker Lendecke
bc8836d5d7 r11920: Rename local_lookup_rid to lookup_global_sam_rid, add lookup_builtin_rid.
Volker
2007-10-10 11:05:35 -05:00
Volker Lendecke
35ba5e083c r11919: The generic mappings in srv_samr_nt.c are only used there -- make them
static.

One long overdue simplification: Change local_lookup_sid to local_lookup_rid
its responsible for "our" domain only, in fact it checked for it.

Volker
2007-10-10 11:05:35 -05:00
Volker Lendecke
6622db97bb r11914: After talking to Jeremy, implement passdb:expand_explicit with a default of
no. This changes our default behaviour.

Sorry, Ingo, this *is* a bug that needs fixing.

Jerry, you might want to put a marker into the WHATSNEW.txt when this is due.

Volker
2007-10-10 11:05:34 -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
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
Volker Lendecke
5b4720598b r7730: Some merges 2007-10-10 10:57:20 -05:00
Volker Lendecke
6af57d4bae r6774: Fix 2 memleaks 2007-10-10 10:56:54 -05:00
Gerald Carter
e84d070275 r5951: gotta love that SGI compiler :-) (thanks Jason) 2007-10-10 10:56:10 -05:00
Volker Lendecke
a7df3b5f06 r5421: Fix a memleak 2007-10-10 10:55:40 -05:00
Günther Deschner
fdf9bdbbac r5349: After talking with Jerry, reverted the addition of account policies to
passdb in 3_0 (they are still in trunk).

Guenther
2007-10-10 10:55:38 -05:00
Gerald Carter
a882a349df r5337: BUG 1439: make sure to initialize pointer to prevent invalide free()'s on exit 2007-10-10 10:55:38 -05:00
Günther Deschner
168ddf31d1 r5058: Due to the fragileness how windows reacts on unmapped sids sometimes,
don't leave administator-sid unmapped. Simply return "Administrator"

Guenther
2007-10-10 10:55:13 -05:00
Günther Deschner
4cbe37ecd5 r4988: After speaking with Jerry, remove old lp_admin_users to
administrator-sid mapping completely.

Guenther
2007-10-10 10:55:10 -05:00
Günther Deschner
d319c0e189 r4964: Fix our lsa lookupsid $OURDOMAINSID-500.
Give the admin-user (rid 500) a chance to be found in passdb, not
returning the (possibly obscure) first entry of "admin users" before
that.

Guenther
2007-10-10 10:55:09 -05:00
Günther Deschner
75af83dfcd r4925: Migrate Account Policies to passdb (esp. replicating ldapsam).
Does automated migration from account_policy.tdb v1 and v2 and offers a
pdbedit-Migration interface. Jerry, please feel free to revert that if
you have other plans.

Guenther
2007-10-10 10:55:08 -05:00
Gerald Carter
504ea4ac68 r4860: fix silly limitation in ldapsam and tdbsam. Expand variables in the profile path, logon home and logon script values 2007-10-10 10:54:00 -05:00
Jeremy Allison
620f2e608f r4088: Get medieval on our ass about malloc.... :-). Take control of all our allocation
functions so we can funnel through some well known functions. Should help greatly with
malloc checking.
HEAD patch to follow.
Jeremy.
2007-10-10 10:53:32 -05:00
Günther Deschner
bb191c1098 r3875: Allow to look up at least or own sid in _lsa_lookup_sids.
This fixes Bugzilla #1076 and Exchange 5.5 SP4 can then be finally
installed on NT4 in a samba-controlled domain.

Guenther
2007-10-10 10:53:22 -05:00
Volker Lendecke
3298f6105e r3563: During a typical logon a modern workstation makes a lot of anonymous session
setups on its way to open a pipe. This gets rid of many round-trips to the
LDAP server during logon by setting up the server_info_guest once and not
asking the LDAP server and nss every time. Make sure that the ldap connection
is reopened in the child. (I did not look at the sql backends.)

Volker
2007-10-10 10:53:09 -05:00
Volker Lendecke
67d8bc4853 r1906: Revert lukeh's change for primary uid/gid change. This creates a recursion
loop between uid_to_sid -> getsampwnam -> uid_to_sid. It needs further
inspection.

Volker
2007-10-10 10:52:23 -05:00
Jeremy Allison
dae084d713 r1871: Patch from Luke Howard <lukeh@PADL.COM> to correctly use
uid_to_sid() and gid_to_sid() in pdb_set_sam_sids().
Jeremy.
2007-10-10 10:52:22 -05:00
Jeremy Allison
f44b4ba381 r1869: Rename "fallback_XXXX" mapping to "algorithmic_XXX" as
that's what it actually does, and "fallback_" is just
confusing.
Jeremy.
2007-10-10 10:52:22 -05:00
Jeremy Allison
dac72638fb r1810: Patch from Richard Renard <rrenard@idealx.com> to store
logon hours attributes in an LDAP database.
Jeremy.
2007-10-10 10:52:21 -05:00
Jeremy Allison
82e4036aaa r1661: Changed the password history format so that each history entry
consists of a 16 byte salt, followed by the 16 byte MD5 hash of
the concatination of the salt plus the NThash of the historical
password. Allows these to be exposed in LDAP without security issues.
Jeremy.
2007-10-10 10:52:17 -05:00
Jeremy Allison
14bd2a9ffc r1539: If a account was locked out by an admin (and has a bad password count of zero)
leave it locked out until an admin unlocks it (but log a message).
Jeremy.
2007-10-10 10:52:14 -05:00