1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-05 21:57:51 +03:00

1088 Commits

Author SHA1 Message Date
Gerald Carter
68fe1f194a r5746: remove unneeded header that caused problems on rh73 2007-10-10 10:55:59 -05:00
Jelmer Vernooij
a281148168 r5733: Don't crash when the SID column contains NULL (Fixes #2316)
Patch by Justin Ossevoort
2007-10-10 10:55:58 -05:00
Jelmer Vernooij
5c682c665d r5718: Don't update fields that haven't changed (fixes #1957) 2007-10-10 10:55:57 -05:00
Gerald Carter
c1727dc9e0 r5708: BUG 2424: patch from Vince Brimhall <vbrimhall@novell.com> to ensure that uidNumber and gidNumber use match the rfc2307 schema 2007-10-10 10:55:56 -05:00
Jeremy Allison
6f5ea963ab r5655: Added support for Novell NDS universal password. Code donated by
Vince Brimhall <vbrimhall@novell.com> - slight tidyup by me to
use Samba conventions.
Vince - thanks a *lot* for this code - please test to make sure
I haven't messed anything up.
Jeremy.
2007-10-10 10:55:54 -05:00
Volker Lendecke
36bcfc5dae r5481: Fix a memleak 2007-10-10 10:55:42 -05:00
Volker Lendecke
e1c3ca182b r5467: Optimize _samr_query_groupmem with LDAP backend for large domains.
Could someone else please look at this patch, verifying that I did not break
the ldapsam:trusted = False fallback to the old behaviour? It works fine for
me, but you never know. You're certainly free to review the new code as well :-)

Thanks,

Volker
2007-10-10 10:55:41 -05:00
Volker Lendecke
543799fc0d r5428: Apply some const. LDAP attribs should now be declared const char *attr[]. This
gives some new warnings in smbldap.c, but a the callers are cleaned up.

Volker
2007-10-10 10:55:40 -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
Jeremy Allison
54ac409d4f r5166: From James Peach - remove minor C99-isms.
Jeremy.
2007-10-10 10:55:31 -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
Gerald Carter
f9f9e6039b r5015: (based on abartlet's original patch to restrict password changes)
* added SE_PRIV checks to access_check_samr_object() in order
  to deal with the run-time security descriptor and their
  interaction with user rights

* Reordered original patch in _samr_set_userinfo[2] to still
  allow root/administrative password changes for users and machines.
2007-10-10 10:55:12 -05:00
Gerald Carter
8946efe102 r4996: sync up copytights with trunk 2007-10-10 10:55:11 -05:00
Günther Deschner
78c3c71274 r4994: Patch from abartlet:
When migrating account policies to ldapsam, handle the fact that an
admin might have changed the default location of the sambaDomain-object
after installation.

Guenther
2007-10-10 10:55:11 -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
eee0bd806b r4926: Use LDAP_SCOPE_ONELEVEL instead of OpenLDAP's LDAP_SCOPE_ONE-scope.
Guenther
2007-10-10 10:55:08 -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
Günther Deschner
853a8b7f1c r4851: Preleminary fix for ldapsam_enum_group_memberships when
ldapsam:trusted=True. Don't bail out when ldap-search returns pure
posixgroups (w.o. samba group-mapping).

This way those unix-memberships do not appear in user and nt user token.
Volker, could you please look over that one?

Guenther
2007-10-10 10:53:59 -05:00
Günther Deschner
6394257cc7 r4847: Hand over a acb_mask to pdb_setsampwent in load_sampwd_entries().
This allows the ldap-backend to search much more effeciently. Machines
will be searched in the ldap_machine_suffix and users in the
ldap_users_suffix. (Note that we already use the ldap_group_suffix in
ldapsam_setsamgrent for quite some time).

Using the specific ldap-bases becomes notably important in large
domains: On my testmachine "net rpc trustdom list" has to search through
40k accounts just to list 3 interdomain-trust-accounts, similiar effects
show up the non-user query_dispinfo-calls, etc.

Also renamed all_machines to only_machines in load_sampwd_entries()
since that reflects better what is really meant.

Guenther
2007-10-10 10:53:59 -05:00
Günther Deschner
ced58bd884 r4840: * Add more generic root-dse inspection function to check for given
controls or extensions.
* Check and remember if ldapsam's LDAP Server support paged results
(in preparation of adding async paged-results to set|get|end-sampwent in
ldapsam).

Guenther
2007-10-10 10:53:57 -05:00
Jelmer Vernooij
ed38e60264 r4802: Don't try to update a column with the name "NULL" 2007-10-10 10:53:55 -05:00
Jelmer Vernooij
760455875f r4788: Don't log mysql password at debug level 1. 2007-10-10 10:53:54 -05:00
Gerald Carter
4b351f2fcc r4736: small set of merges from rtunk to minimize the diffs 2007-10-10 10:53:52 -05:00
Gerald Carter
77c10ff9aa r4724: Add support for Windows privileges in Samba 3.0
(based on Simo's code in trunk).  Rewritten with the
following changes:

* privilege set is based on a 32-bit mask instead of strings
  (plans are to extend this to a 64 or 128-bit mask before
   the next 3.0.11preX release).
* Remove the privilege code from the passdb API
  (replication to come later)
* Only support the minimum amount of privileges that make
  sense.
* Rewrite the domain join checks to use the SeMachineAccountPrivilege
  instead of the 'is a member of "Domain Admins"?' check that started
  all this.

Still todo:

* Utilize the SePrintOperatorPrivilege in addition to the 'printer admin'
  parameter
* Utilize the SeAddUserPrivilege for adding users and groups
* Fix some of the hard coded _lsa_*() calls
* Start work on enough of SAM replication to get privileges from one
  Samba DC to another.
* Come up with some management tool for manipultaing privileges
  instead of user manager since it is buggy when run on a 2k client
  (haven't tried xp).  Works ok on NT4.
2007-10-10 10:53:51 -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
Jelmer Vernooij
99dc2f36d1 r3974: - Fix assignment of a couple of fields in pdb_{mysql,pgsql}
- Use new DTD URL in pdb_xml
2007-10-10 10:53:26 -05:00
Jeremy Allison
05b905a28f r3948: Fix incorrect declaration. Bug #2083.
Jeremy.
2007-10-10 10:53:26 -05:00
Jeremy Allison
8e979772a6 r3931: Fix all "may be used uninitialized" and "shadow" warnings.
Jeremy.
2007-10-10 10:53:25 -05:00
Volker Lendecke
2d952c86c7 r3883: Fix error return -- thanks to rsharpe 2007-10-10 10:53:23 -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
dbfdde5f63 r3871: Fix memleak 2007-10-10 10:53:22 -05:00
Volker Lendecke
3bd72b864f r3852: Fix the build... 2007-10-10 10:53:21 -05:00
Volker Lendecke
b94838aff1 r3705: Nobody has commented, so I'll take this as an ack...
abartlet, I'd like to ask you to take a severe look at this!

We have solved the problem to find the global groups a user is in twice: Once
in auth_util.c and another time for the corresponding samr call. The attached
patch unifies these and sends them through the passdb backend (new function
pdb_enum_group_memberships). Thus it gives pdb_ldap.c the chance to further
optimize the corresponding call if the samba and posix accounts are unified by
issuing a specialized ldap query.

The parameter to activate this ldapsam behaviour is

ldapsam:trusted = yes

Volker
2007-10-10 10:53:15 -05:00
Volker Lendecke
3d9758fa3c r3704: Implement a cache get saves the result of a pdb_getsampwnam for later
retrieval by pdb_getsampwsid. This solves our problem that we do lots of calls
to LDAP during a typical XP login. XP does a lookupnames, then an openuser and
some queryinfo stuff. Lookupnames triggers the initial getsampwnam, and all
the subsequent ones make us call getsampwsid. This patch gets this down to one
call to LDAP.

Yes, a more "correct" way would be to stick the information to the open user
handle, but this one is simpler and saves the LDAP roundtrip for the openuser
call.

Volker
2007-10-10 10:53:15 -05:00
Günther Deschner
906d5f88aa r3628: A typo and a compile-warning.
Guenther
2007-10-10 10:53:10 -05:00
Volker Lendecke
2508d4ed1e r3566: Completely replace the queryuseraliases call. The previous implementation does
not exactly match what you would expect.

XP workstations during login actually do this, so we should better become a
bit more correct. The LDAP query issued is not really fully optimal, but it is
a lot faster and more correct than what was there before. The change in
passdb.h makes it possible that queryuseraliases is done with a single ldap
query.

Volker
2007-10-10 10:53:09 -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
Günther Deschner
94f48d06c7 r2923: Fix some obvious copy/paste leftover debug-messages.
Guenther
2007-10-10 10:52:56 -05:00
Günther Deschner
a4b47e7147 r2819: Make 'password history'-behaviour in ldapsam more consistent.
Currently we cannot store more then 15 password history entries (windows
NT4 allows to store 24) in ldapsam. When choosing more then "15" with
pdbedit -P "password history", we fail to initialize the password
history upon password change and overwrite the history, effectively
using a password history of "1". We do already decrease any
history-policy larger then 15 to 15 while storing the password history
list attribute in ldap.

Guenther
2007-10-10 10:52:53 -05:00
Günther Deschner
c5b8bc6c2e r2752: Fix the paranoia-check to ensure the ldap-attribute and the
smb.conf-parameter for samba's "algorithmic rid base" in ldapsam are
identical.

It tried to get the value of LDAP_ATTR_ALGORITHMIC_RID_BASE via
get_userattr_key2string() for a very long time now. This just can not
work because LDAP_ATTR_ALGORITHMIC_RID_BASE is neither in attrib_map_v22
nor in attrib_map_v30. Instead, get it directly from dominfo_attr_list.

Ldapsam will now correctly refuse to initialize when admins tried
manually to have differing values for "algorithmic rid base" in ldap and
smb.conf. idmap_ldap is another story...

Guenther
2007-10-10 10:52:50 -05:00
Volker Lendecke
a32ea3bc88 r2619: Only issue the ldap extended password change operation if the ldap server
supports it. This might be a fix for bugs 1823 and 1545, notifying both.

Also ignore object class violation errors from the extended operation. We
don't have the userPassword field in sambaSamAccount, and if we have such
broken setup with user in /etc/passwd and only samba attribs in ldap, we fail
this :-)

Volker
2007-10-10 10:52:48 -05:00
Jeremy Allison
0351bf8b03 r2479: Stop attribute "modifyTimestamp" from being deleted.
Jeremy.
2007-10-10 10:52:45 -05:00
Jelmer Vernooij
8be3fa5bfa r2473: Convert internal data to UTF-8 before calling libxml2 2007-10-10 10:52:44 -05:00
Volker Lendecke
6957d6a892 r2444: Based on jmcd's patch, implement special lists for the ldap user attributes to
delete.

Richard, IMHO this is the better solution to the problem you currently
have. Please review.

Thanks,

Volker
2007-10-10 10:52:43 -05:00
Jeremy Allison
727fc341b5 r2374: Fix from Vince Brimhall vbrimhall@novell.com for
ldapsam_compat. Be robust against NULL attributes.
Jeremy.
2007-10-10 10:52:41 -05:00
Jeremy Allison
8ae10c74ec r2317: Fixup error messages and reformat.
Jeremy.
2007-10-10 10:52:39 -05:00