1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

1148 Commits

Author SHA1 Message Date
Simo Sorce
a374546c7e r13776: Merge in the editposix ldapsam optimization 2007-10-10 11:10:53 -05:00
Gerald Carter
085c6859ee r13765: Fix bug reported by jra. Don't check for a group SID when storing
a user since we no longer pay any attention to the value.
2007-10-10 11:10:53 -05:00
Gerald Carter
c13af58f63 r13756: use samu_new() rather than calling talloc() directly. 2007-10-10 11:10:52 -05:00
Jeremy Allison
993069eb87 r13747: Fix the reference count for tdbsam_open() - on an
upgrade it calls tdbsam_convert() which calls tdbsam_open()
deep inside the init_sam_from_buffer_vX call.
If the ref count hasn't been set yet then we will close
the tdbsam reference in tdbsam_getsampwsid().
smbpasswd -a was core-dumping again :-).
Jeremy
2007-10-10 11:10:51 -05:00
Volker Lendecke
2afcbbfb6f r13729: Fix smbpasswd -x 2007-10-10 11:10:51 -05:00
Volker Lendecke
59f95ea752 r13728: No, we have not talked about this on irc less than 24h ago... ;-) 2007-10-10 11:10:51 -05:00
Volker Lendecke
76c100834d r13727: Fix a segfault 2007-10-10 11:10:51 -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
Jeremy Allison
7e243104eb r13704: Janitor for tpot.
Jeremy
-------------
Slightly smaller version of pdb_get_methods() patch.  Turns out that
callers to initialize_password_db() use the reload parameter so this
has turned in to a smaller cleanup than I thought.
2007-10-10 11:10:24 -05:00
Volker Lendecke
7c098ca0ae r13693: More Solaris/LDAP fixes from Bjoern <bjoern@j3e.de> 2007-10-10 11:10:24 -05:00
Volker Lendecke
dbdb8bdb99 r13683: Fix the 'valid users = +users' problem I introduced.
Volker
2007-10-10 11:10:23 -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
Volker Lendecke
faf1d832a1 r13678: Remove unneeded braces 2007-10-10 11:10:23 -05:00
Günther Deschner
b2eac2e6eb r13622: Allow to rename machine accounts in a Samba Domain. This still uses the
"rename user script" to do the rename of the posix machine account (this
might be changed later). Fixes #2331.

Guenther
2007-10-10 11:10:19 -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
77332f0738 r13589: Make sure we only try to close the tdbsam file in endsampwent() when we
have a valid pwent list from a setsampwent().  Fixes a bug with the
reference count on the open tdb.
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
db575c7641 r13550: remove pdb_guest 2007-10-10 11:10:13 -05:00
Jeremy Allison
43f095a38d r13548: Always use the get_remote_macinhe_name() as the key
for the creds store. This should fix the problems
Jerry reported (but I have still to run tests :-).
Jeremy.
2007-10-10 11:10:13 -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
Jeremy Allison
e755155b0e r13542: Don't reuse a pointer we just freed (Doh!).
Jeremy.
2007-10-10 11:10:11 -05:00
Jeremy Allison
cef240d571 r13538: Make sure we store all 16 bytes of credentials session
key and delete records that are old. We will need this
for the full 16 byte session key support.
Jeremy.
2007-10-10 11:10:11 -05:00
Jeremy Allison
80f4868944 r13519: Fix the credentials chaining across netlogon pipe disconnects.
I mean it this time :-).
Jeremy.
2007-10-10 11:10:09 -05:00
Gerald Carter
94c37e0652 r13512: Rewrite tdbsam code to use a reference count based open/close
on the tdb file.  This allow recusive calls to succeed
without complaining about failed opens since a tdb can
only be opened once per process.  We probably still need to backport
the transaction support from Samba 4 here though.
2007-10-10 11:10:08 -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
Volker Lendecke
5a92df31d6 r13493: module_name and module_location are the same string. Fix a valgrind
error.

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
Jeremy Allison
5b3c2e63c7 r13407: Change the credentials code to be more like the Samba4 structure,
makes fixes much easier to port. Fix the size of dc->sess_key to
be 16 bytes, not 8 bytes - only store 8 bytes in the inter-smbd
store in secrets.tdb though. Should fix some uses of the dc->sess_key
where we where assuming we could read 16 bytes.
Jeremy.
2007-10-10 11:09:59 -05:00
Volker Lendecke
d3b66fb871 r13389: get_ldap_filter is only used once, make it static 2007-10-10 11:09:58 -05:00
Volker Lendecke
a3bc4f5114 r13338: Remove the experimental pdb modules 2007-10-10 11:06:25 -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
6c3480f9ae r13310: first round of server affinity patches for winbindd & net ads join 2007-10-10 11:06:23 -05:00
Volker Lendecke
e747ea7250 r13209: Make smbpasswd -a work again if passdb did not exist.
Volker
2007-10-10 11:06:17 -05:00
Jeremy Allison
c0ba64297a r13190: Fix #3458 from Andriy Gapon <avg@icyb.net.ua>. Don't
access free'd memory.
Jerry please pick up for 3.0.21b !
Jeremy.
2007-10-10 11:06:16 -05:00
Jeremy Allison
31b3201f53 r13175: Actually make adding a new user into an empty pdbtdb
file create the file.
Jeremy.
2007-10-10 11:06:16 -05:00
Jeremy Allison
e5f19ad5ac r13172: Fix incorrect error message when new tdb not created correctly.
Jeremy.
2007-10-10 11:06:16 -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
Günther Deschner
f78c7f8abe r12714: Fix segfault in pdb_nds.c.
Guenther
2007-10-10 11:06:01 -05:00
Volker Lendecke
3ee6b732f4 r12663: Fix a memleak 2007-10-10 11:06:01 -05:00
Volker Lendecke
dc167037b0 r12645: Fix some memleaks. This will also be in the trunk checkin that comes next.
Volker
2007-10-10 11:06:00 -05:00
Volker Lendecke
082763988d r12603: NO, I'm not claiming maintainership of this.
Fix bug 3351.

Volker
2007-10-10 11:06:00 -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
Gerald Carter
5121d38069 r12400: one line patch for Sun LDAP libs pointed out by Nicholas Brealey <nick@brealey.org> 2007-10-10 11:05:55 -05:00
Gerald Carter
be32f10609 r12398: adding Guenther's account policy migration fix 2007-10-10 11:05:54 -05:00
Volker Lendecke
be6c9012da r12313: Introduce yet another copy of the string_sub function:
talloc_string_sub. Someone with time on his hands could convert all the
callers of all_string_sub to this.

realloc_string_sub is *only* called from within substitute.c, it could be
moved there I think.

Volker
2007-10-10 11:05:53 -05:00
Jeremy Allison
43c2d545ab r12245: eDirectory returns LDAP_UNWILLING_TO_PERFORM if the
account is disabled. If we get this we can't check
the password so have to tell the client the account
was disabled.
Jeremy.
2007-10-10 11:05:50 -05:00