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

38067 Commits

Author SHA1 Message Date
Andreas Schneider
7abdf6e57f s3-rpc_server: Correctly register lsa, samr and netlogon.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
0364bf025c s3-lsasd: Create a lsa service daemon.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
dea21619a2 s3-spoolssd: Check if we were able to create the prefork pool.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
5169dff380 s3-prefork: Fix cast warning.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
e4b566d6cf s3-rpc_server: Make dcerpc_ncacn_accept() public.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
312c519c5c s3-rpc_server: Check explicit for external and daemon server type.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Andreas Schneider
ea3fa586e7 s3-rpc_server: Fix include order in srv_pipe_hnd.c.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Simo Sorce <idra@samba.org>
2011-08-21 09:05:02 -04:00
Jelmer Vernooij
12e1fdf089 wafsamba: Require public libraries to have a pc file specified, or explicitly specified that they don't need one. 2011-08-21 03:22:05 +02:00
Jeremy Allison
e25345a7a6 Ensure we never wait past absolute entime to do a get_cached_ldap_connect().
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Aug 20 20:09:37 CEST 2011 on sn-devel-104
2011-08-20 20:09:37 +02:00
Jeremy Allison
6c3779c80b Remove the tortured logic in another_ldap_try() and turn it into
get_cached_ldap_connect(), which much better describes it's function.

Now we always break at the right places in the loop, we can replace
the while (another_ldap_try(ldap_state, &rc, &attempts, abs_endtime))
construct with simply while (1).
2011-08-19 21:40:54 -07:00
Jeremy Allison
ce8a1a29ad Factor out the ldap_get_option calls into a function. 2011-08-19 21:30:04 -07:00
Jeremy Allison
832dce1a0a Simplify the logic on the another_ldap_try() loops by breaking
early out of the loop on success.
2011-08-19 21:27:18 -07:00
Jeremy Allison
03bdb26c5b Move the alarm setup/teardown out of another_ldap_try() and into separate
functions that bracket the another_ldap_try() loop. We now never leave a
dangling alarm pending on success.
2011-08-19 21:19:28 -07:00
Jeremy Allison
a357d044d4 Allow the timeout pointer to ldap_search_ext_s() to be NULL if lp_ldap_timeout() == 0. 2011-08-19 21:08:10 -07:00
Jeremy Allison
da89f7e24c Make it clear the time here is an absolute endtime. Don't set the alarm if the LDAP timeout is zero. 2011-08-19 21:01:49 -07:00
Jeremy Allison
f00c6c8561 Always remove the alarm before changing the handler, not the other way around. 2011-08-19 20:55:41 -07:00
Jeremy Allison
ec07aca7d5 Remove old_handler as alarms can't be nested. Use SIG_IGN instead. 2011-08-19 20:54:41 -07:00
Jeremy Allison
7cbcbee484 Change got_alarm from bool to the correct type of SIG_ATOMIC_T. 2011-08-19 20:53:49 -07:00
Jeremy Allison
92a655da86 If "ldap timeout" is non-zero, set the local search timeout to
be one second longer than the remote search timeout (which is
set to the "ldap timeout" value). This allows the remote search
timeout to fire in preference.

Allow lp_ldap_timeout() to be zero. Don't set the any local alarm
if so.
2011-08-19 18:43:51 -07:00
Ira Cooper
f6e3484ba6 Re-arrange the optimization to reduce tdb fcntl calls if smbd is not
clustered. procid_is_me() is much cheaper to test and can optimize
up to 50% of the calls to serverid_exists(). Volker please check.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Aug 20 01:15:07 CEST 2011 on sn-devel-104
2011-08-20 01:15:07 +02:00
Matthias Dieter Wallnöfer
c21c254508 s3:passdb/py_passdb.c - restore Python >= 2.4 compatibility
Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Fri Aug 19 21:03:44 CEST 2011 on sn-devel-104
2011-08-19 21:03:44 +02:00
Simo Sorce
0825a52a36 Revert "s3-messaging: IDMAP_ messages belongs to the Winbind range"
This reverts commit 102f39ae3e.

These messages are handled by smbd not winbind, and could potentially be of
general interest.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Fri Aug 19 16:16:05 CEST 2011 on sn-devel-104
2011-08-19 16:16:05 +02:00
Andrew Bartlett
0db0e93517 s3-passdb pdb_samba4 handles PDB_PWHISTORY already
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Aug 19 10:40:16 CEST 2011 on sn-devel-104
2011-08-19 10:40:16 +02:00
Amitay Isaacs
22cce00151 s3-passdb: Fix the get/set routines for pw_history for samu
Return pw_history with current string length (which is a multiple
of PW_HISTORY_ENTRY_LEN) and same thing for setting the pw_history.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:11 +10:00
Amitay Isaacs
dadaca01d2 s3-passdb: Display username when reporting error on add_sam_account.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:08 +10:00
Amitay Isaacs
876f9cc290 s3-passdb: Use pdb_get_nt_passwd() to get nt passwd.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:07 +10:00
Amitay Isaacs
0fef5a3a26 s3-passdb: Fix call for search_aliases(). It returns bool and not NTSTATUS.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:02 +10:00
Amitay Isaacs
1c1f4e27a8 s3-passdb: Return list of sids from python wrapper enum_group_members
Instead of returning rids as the C api does, return sids, so it is
similar to enum_aliasmem and can be used easily in s3_upgrade.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:01 +10:00
Amitay Isaacs
590ed81c48 s3-passdb: Make arguments for python wrapper enum_group_mapping() optional
Set the defaults, if no arguments are provided.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:00 +10:00
Amitay Isaacs
f4c7a448d4 s3-passdb: Added python wrapper for passdb methods
Added following methods
 - uid_to_sid, gid_to_sid, sid_to_id, new_rid
 - get_trusteddom_pw, set_trusteddom_pw, del_trusteddom_pw, enum_trusteddoms
 - get_trusted_domain, get_trusted_domain_by_sid, set_trusted_domain,
   del_trusted_domain, enum_trusted_domains
 - get_secret, set_secret, delete_secret

Updated documentation for all methods

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:59 +10:00
Amitay Isaacs
5b444916bf s3-passdb: Python wrapper for passdb
- Added Groupmap python wrapper
- Added passdb methods

   getgrsid, getgrgid, getgrnam
   create_dom_group, delete_dom_group
   add_group_mapping_entry, update_group_mapping_entry, delete_group_mapping_entry
   enum_group_mapping, enum_group_members
   add_groupmem, del_groupmem
   create_alias, delete_alias
   get_aliasinfo, set_aliasinfo
   add_aliasmem, del_aliasmem, enum_aliasmem
   get_account_policy, set_account_policy
   search_groups, search_aliases

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:57 +10:00
Amitay Isaacs
4201d6fd68 s3-passdb: Replace SMB_MALLOC_ARRAY()/SAFE_FREE() with talloc equivalents.
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:34:56 +10:00
Jeremy Allison
a6d06c0697 Fix bug #8370 - vfs_chown_fsp broken -- returns in the wrong directory
Ensure we always use vfs_ChDir() to keep the singleton cache coherent.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Aug 19 00:43:05 CEST 2011 on sn-devel-104
2011-08-19 00:43:04 +02:00
Björn Jacke
dcb5720ad0 s3/ldap: don't continue if we couldn't get the domain info on startup
while some things work without the domain info, some important things don't,
which is highly irritating. As even calls like EnumTrustDom fail and
thus clients' domain logins fail we are sufficiently broken to refuse to go on.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Thu Aug 18 12:48:37 CEST 2011 on sn-devel-104
2011-08-18 12:48:37 +02:00
Volker Lendecke
3c0b882756 s3: Next step to fix MIT trusts
aa3f10c was not complete in the sense that it did not fully cover some
conditions that led to invalid domains in the winbind parent

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Aug 17 13:59:06 CEST 2011 on sn-devel-104
2011-08-17 13:59:05 +02:00
Volker Lendecke
31ee78fea9 s3: Increase a debug level in ads_find_dc
This message can happen with AD trusts that winbind can not cope with. The
message is not really clear and not worth spamming syslog always.
2011-08-17 12:30:08 +02:00
Volker Lendecke
8fd5e0ff2e Replace calls to sid_equal with calls to dom_sid_equal 2011-08-17 12:30:08 +02:00
Simo Sorce
102f39ae3e s3-messaging: IDMAP_ messages belongs to the Winbind range
Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Aug 16 22:27:05 CEST 2011 on sn-devel-104
2011-08-16 22:27:05 +02:00
Volker Lendecke
6c8ee02e17 s3: Use ZERO_STRUCT where appropriate
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug 16 13:59:55 CEST 2011 on sn-devel-104
2011-08-16 13:59:55 +02:00
Michael Adam
689f42af29 s3:registry: enhance debugging of deletekey_recursive
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Aug 15 19:34:44 CEST 2011 on sn-devel-104
2011-08-15 19:34:44 +02:00
Michael Adam
7eeb168523 s3:dbwrap_ctdb: improve transaction start/commit/cancel debugging
* also log nesting transaction start/commit/cancel
* unify transaction log messages slightly
2011-08-15 17:15:15 +02:00
Michael Adam
0aa85ec43a s3:lib: fix a comment in tdb_unpack() 2011-08-15 17:15:15 +02:00
Michael Adam
32b7411104 s3:registry: fix regdb_key_exists: the record has to contain at least the 4-byte subkey counter
More precisley, we return false if the record does not match the required
structure of a leading 4-byte subkey counter followed by the corresponding
number zero-terminated strings.
2011-08-15 17:15:14 +02:00
Gregor Beck
8a36e72140 s3: avoid reading past the end of buffer in tdb_unpack 'f' if zero termination is missing
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-15 17:15:14 +02:00
Gregor Beck
39f9c854ae s3: avoid reading past the end of buffer in tdb_unpack 'P' if zero termination is missing
Signed-off-by: Michael Adam <obnox@samba.org>
2011-08-15 17:15:14 +02:00
Andrew Bartlett
043c521932 build: link pys3param against pytalloc-util not pytalloc
pytalloc is the python module, pytalloc-util is the library that we can depend on

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Mon Aug 15 09:54:02 CEST 2011 on sn-devel-104
2011-08-15 09:54:02 +02:00
Andrew Bartlett
3df9e62c97 s3-passdb Use supplied pdb_methods in default passdb search handlers 2011-08-15 08:26:06 +02:00
Simo Sorce
2e5fc83350 s3-prefork: Do not use mmap/mremap/munmap directly
Use the wrappers in util.h as they deal with trying to do the best they can on
platfroms that do not support mmap extensions.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Mon Aug 15 04:13:51 CEST 2011 on sn-devel-104
2011-08-15 04:13:50 +02:00
Volker Lendecke
1022c28e15 s3: Fix bug 8360
OS/2 sends an unexpected write&x/read&x chain

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Aug 14 08:48:58 CEST 2011 on sn-devel-104
2011-08-14 08:48:58 +02:00
Andrew Bartlett
d2d2e7ab02 s3-passdb: Fix python < 2.6 build errors in passdb python wrapper
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Aug 14 03:59:48 CEST 2011 on sn-devel-104
2011-08-14 03:59:48 +02:00