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

75389 Commits

Author SHA1 Message Date
Jelmer Vernooij
2b40283591 wbclient: Add pkg-config file. 2011-08-21 03:22:04 +02:00
Jelmer Vernooij
7ebdd3f683 samba-credentials: Add pkg-config file. 2011-08-21 03:22:04 +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
Matthias Dieter Wallnöfer
aefde815ac ldb:ldb_controls.c - cosmetic indentation fix 2011-08-19 19:31:04 +02:00
Matthias Dieter Wallnöfer
87b482a89e ldb - two cosmetic fixes
@ldb.h: Removes an invalid comment line
@pyldb.c: Fixes indentation
2011-08-19 19:31:03 +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
2ecb5003eb s3_upgrade: Set the administrator password on upgrade
In the upgrade process, set the administrator password from the
existing root or administrator account.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:12 +10: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
149845fb18 s3_upgrade: Do not add administrator and root accounts from s3 to s4
Need to copy the password from s3 for administrator/root to s4.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:10 +10:00
Amitay Isaacs
0ffb4e6f6f python-samba3: Secrets file loaded from private dir, not lib dir
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:09 +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
2a3f5c04bd s3upgrade: Add idmap migration, users/groups import
Added users/groups import from s3 using python wrapper for passdb.
Fix idmap entries for users/groups when migrating from s3 idmap.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:06 +10:00
Amitay Isaacs
dfa1c751c6 provision: Add idmap database handle to the result of provision
It is required in s3_upgrade script to migrate idmap database from s3 to s4.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:05 +10:00
Amitay Isaacs
57b9f1b502 samba3-python: Add methods to get any entry (user/group) and its sid from idmap
This is required in upgrade_s3 script to migrate idmap database from s3 to s4

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:04 +10:00
Amitay Isaacs
c71e781e7d py_security: Fix comparison between two dom_sid objects
dom_sid_compare() function can return values other than -1, 0, 1.
Python requires compare function to return value from [-1, 0, 1].

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2011-08-19 16:35:03 +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
Jelmer Vernooij
292fe74971 credentials: Rename library to samba-credentials to avoid name clashes.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 22:16:38 CEST 2011 on sn-devel-104
2011-08-18 22:16:38 +02:00
Jelmer Vernooij
97afeaceda smb_common: Fix include paths.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 16:54:01 CEST 2011 on sn-devel-104
2011-08-18 16:54:01 +02:00
Jelmer Vernooij
9ee1e1f0ac cli-raw: Add public libsmbclient-raw library. 2011-08-18 14:19:18 +02:00
Jelmer Vernooij
6fefd217ca libcliraw: Install more header files. 2011-08-18 14:01:12 +02:00
Jelmer Vernooij
f0d15e8ffa smb_common: Install some more headers. 2011-08-18 13:43:42 +02:00
Jelmer Vernooij
9fc20f4d26 libcliraw: Install request.h and signing.h. 2011-08-18 13:31:03 +02:00
Jelmer Vernooij
6e8f6da31a smb_composite: Remove unnecessary include of signing header. 2011-08-18 13:08:34 +02:00
Jelmer Vernooij
56f7bebd3a smb_composite: Integrate prototypes in header file. 2011-08-18 12:59:25 +02:00
Jelmer Vernooij
eeee09d273 Use public pytalloc header file. 2011-08-14 15:34:08 +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
Andrew Tridgell
5f3301759e s4-test: use dbcheck on more of our selftest databases
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Aug 18 02:58:55 CEST 2011 on sn-devel-104
2011-08-18 02:58:55 +02:00
Andrew Tridgell
97b2f30b9e s4-test: only check one database in quickcheck 2011-08-18 09:26:59 +10:00
Andrew Tridgell
46a76bc229 s4-dsdb: fixed deletion of backlinks for fl2000 DCs
when in FL 2000 we were not correctly deleting backlinks as we uses
dsdb_find_dn_by_guid() which doesn't find deleted objects. Modules
should use dsdb_module_dn_by_guid() which prevents going to the top
level, and finds deleted objects

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18 09:26:59 +10:00
Andrew Tridgell
c5dc26b976 s4-dsdb: added comments and fixed backlink check in repl_meta_data
added comments explaining the backlink deletion code, plus fix a use
of a bitwise operation in a boolean expression, and avoid calling
dsdb_functional_level() inside a loop

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-08-18 09:26:59 +10:00