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

1635 Commits

Author SHA1 Message Date
Andrew Bartlett
40715e1251 s3-librpc: pass struct ndr_interface_table down to cli_pipe_open_generic/spnego()
This allows the target service (as determined from the IDL) to be
passed to GSSAPI (rather than the current, incorrect, "cifs").

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:24 +01:00
Andrew Bartlett
c62af4f652 s3-librpc Make cli_rpc_pipe_open_spnego_ntlmssp() generic
This also avoids passing NULL as the server to
gensec_set_target_hostname() in spnego_generic_init_client().

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-18 16:23:23 +01:00
Volker Lendecke
45e61fcf61 s3: Add a "lock_order" argument to db_open
This will be used to enforce a lock hierarchy between the databases. We have
seen deadlocks between locking.tdb, brlock.tdb, serverid.tdb and notify*.tdb.
These should be fixed by refusing a dbwrap_fetch_locked that does not follow a
defined lock hierarchy.
2012-01-18 14:48:04 +01:00
Andrew Bartlett
af19532d4d s3-winbindd: convert cached credentials to use auth_generic/gensec for NTLMSSP
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-06 13:05:44 +01:00
Volker Lendecke
ab58469ff4 s3: Remove some redundant code
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jan  5 17:16:45 CET 2012 on sn-devel-104
2012-01-05 17:16:45 +01:00
Andreas Schneider
b9d208bdaa s3-winbind: Fix segfault if we can't map the last user.
This fixes bug #8678.

The issue is caused by bug #8608.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Jan  4 18:30:53 CET 2012 on sn-devel-104
2012-01-04 18:30:52 +01:00
Andreas Schneider
5075e56568 s3-winbind: Move finding the domain to it's own function.
This the first part to fix bug #8678.
2012-01-04 16:56:06 +01:00
Volker Lendecke
75d3b9ce08 s3: Fix some False/NULL hickups
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Dec 20 13:13:17 CET 2011 on sn-devel-104
2011-12-20 13:13:17 +01:00
Christian Ambach
75b8a24a42 s3:idmap_autorid: use less transactions
reduce the amount of transactions that are mostly unnecessary because no
updates were done, only reads

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Fri Dec 16 20:18:37 CET 2011 on sn-devel-104
2011-12-16 20:18:37 +01:00
Volker Lendecke
0f9d14820e s3: Remove a bunch of calls to procid_self()
All callers to messaging_[re]init only used procid_self()
2011-12-12 21:50:25 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Andreas Schneider
a3f6005211 s3-winbind: Add an update function for winbind cache.
With 57b3d32 we changed the format for the winbind cache database and
the code deleted the database for the upgrade. As this database holds
also cached credentials, removing it is not an option. We need to update
from version 1 to version 2.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Sat Dec  3 03:47:58 CET 2011 on sn-devel-104
2011-12-03 03:47:57 +01:00
Andreas Schneider
20654d6a98 s3-winbind: Remove unused keys from list.
DR and DE have been removed with
0834574fdd.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Fri Dec  2 19:02:45 CET 2011 on sn-devel-104
2011-12-02 19:02:45 +01:00
Volker Lendecke
5c53926fa7 s3: Use tevent_req_simple_recv_ntstatus
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Nov 28 17:14:27 CET 2011 on sn-devel-104
2011-11-28 17:14:27 +01:00
Volker Lendecke
47a94f7f81 s3: user_domain is not used in wb_getpwsid
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Nov 25 13:23:30 CET 2011 on sn-devel-104
2011-11-25 13:23:30 +01:00
Stefan Metzmacher
c53a52a264 s3:winbindd_cm: make use of cli_tree_connect()
metze
2011-11-24 19:02:32 +01:00
Volker Lendecke
d5d17f0f57 s3: Fix wb_next_pwent_fill_done
Within a callback routine it is not possible to call tevent_req_post

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Nov 22 19:17:30 CET 2011 on sn-devel-104
2011-11-22 19:17:30 +01:00
Stefan Metzmacher
aa2e415442 s3:winbindd_cm: close sockfd on error in cm_prepare_connection()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Nov 21 19:58:58 CET 2011 on sn-devel-104
2011-11-21 19:58:57 +01:00
Günther Deschner
8a4c8e3f85 s3-smbldap: move ldap_open_with_timeout out of smb_ldap.h to ads where it lives.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Nov 17 03:47:53 CET 2011 on sn-devel-104
2011-11-17 03:47:53 +01:00
Günther Deschner
21691b38bc s3-winbindd: no need to globally include ldap headers in winbindd.
Guenther
2011-11-17 02:11:46 +01:00
Björn Baumbach
aef5fcbfc7 s3-winbindd/winbindd_cm.c: remove cli_nt_error()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-16 19:02:12 +01:00
Stefan Metzmacher
c64ebcf643 s3:winbindd_cm: remove unused ads_status
metze
2011-11-16 19:02:12 +01:00
Günther Deschner
693781db89 s3-waf: create a smbldap.so library.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov 16 14:03:05 CET 2011 on sn-devel-104
2011-11-16 14:03:05 +01:00
Günther Deschner
65e2944c67 s3-smbldap: extend smbldap_init() with binddn/bindsecret arguments.
Guenther
2011-11-16 12:26:26 +01:00
Günther Deschner
8312ee1367 s3-passdb: split out passdb/pdb_ldap_schema.c
Guenther
2011-11-16 12:26:26 +01:00
Andreas Schneider
10b285ccc2 s3-winbind: Don't fail on users without a uid.
This fixes bug #8608.

If you join samba with idmap_ad backend to an AD. When you try to
enumerate users with 'getent passwd' and the user doesn't have a uid
set, then getent is aborted cause of NT_STATUS_NONE_MAPPED. If we can't
map a user we should not stop but continue enumerating users.

This normally happens with the default user 'krbtgt' with idmap_ad but
could also happen with other backends.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Tue Nov 15 16:52:04 CET 2011 on sn-devel-104
2011-11-15 16:52:04 +01:00
Andreas Schneider
2fe5cd20b4 s3-winbind: Make sure the map is clean. 2011-11-15 14:22:00 +01:00
Günther Deschner
e80e218152 s3-modules: remove the last "init_module" traces.
Guenther
2011-11-14 18:44:41 +01:00
Stefan Metzmacher
6db670386b s3:winbindd: s/Undefined/SMB_SIGNING_DEFAULT/
metze
2011-11-03 16:55:12 +01:00
Jeremy Allison
f30f71c14a Fix bug #8548 - winbind_samlogon_retry_loop ignores logon_parameters flags.
Fix confirmed by reporter.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Oct 28 23:04:47 CEST 2011 on sn-devel-104
2011-10-28 23:04:47 +02:00
Andrew Bartlett
b256799eaf lib/util Rename samba_init_module -> samba_module_init
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
Christian Ambach
ed45a558ae s3:idmap_autorid: add an allocation range to autorid
this is needed to allocate gids for BUILTIN\Users and
BUILTIN\Administrators and for local users/group that
admins might want to create

autorid will now allocate one range for this purpose
and can so give out as many uids and gids as the
configured rangesize allows
2011-10-21 16:30:56 +02:00
Christian Ambach
0a85d1c891 s3:idmap_autorid: move HWM initialization into a function
we will need some more HWM soon, so move out initialization and
optimize the logic using the new interface of dbwrap_fetch_uint32
2011-10-21 16:30:56 +02:00
Christian Ambach
8d9aea2a66 s3:idmap_autorid: use strings as parameter for range allocator
this prepares for allocation of non-domain ranges that cannot be
expressed by a SID (e.g. an allocation pool)
2011-10-21 16:30:56 +02:00
Christian Ambach
a4d245b3e8 s3:winbindd/idmap make idmap modules loadable again
commit 355b5e3a83 changed the module system to
expect 'samba_init_module' as fixed initializer function
2011-10-21 16:30:56 +02:00
Christian Ambach
bfe1385e31 Revert "s3:idmap/autorid add a small alloc pool to autorid"
This reverts commit 0aa558718a.

just having 500 uid/gids values is not good enough for
users using local users and groups in the order of thousands

better solution which will use a complete range for allocated
uids/gids will come next.
2011-10-21 16:30:56 +02:00
Simo Sorce
605d7d965a pdb-interface: Do not use unid_t here
This interface needs to be publicly available, unid_t here is not really useful
and makes it harder to use it as unid_t is not a public union.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Oct 18 20:57:16 CEST 2011 on sn-devel-104
2011-10-18 20:57:16 +02:00
Andrew Bartlett
0c6e4adcb2 ntlmssp: Move ntlmssp code to auth/ntlmssp
This brings in the code from both libcli/auth and
source4/auth/ntlmssp.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:31 +11:00
Jeremy Allison
1e4761d059 Fix bug #8521 - winbindd cache timeout expiry test was reversed
Found and fix reported by Micha Lenk <micha@lenk.info>. Thanks !
2011-10-12 19:29:30 +02:00
Michael Adam
6760011761 s3:dbwrap: change dbwrap_store_uint32() to NTSTATUS return type
for consistency and better error propagation

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Oct 11 15:51:00 CEST 2011 on sn-devel-104
2011-10-11 15:51:00 +02:00
Michael Adam
c9bc1e4924 s3:dbwrap: change dbwrap_store_int32() to NTSTATUS return type
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
658f72128f s3:dbwrap: change dbwrap_fetch_uint32() to NTSTATUS return type (instead of bool)
for consistency and better error propagation
2011-10-11 14:17:58 +02:00
Michael Adam
603c3e1bcb s3:dbwrap: convert dbwrap_fetch_int32() to NTSTATUS return code
Return the int32 value retrieved from the db by reference.
Before this, return value "-1" was used as a error indication,
but it could also be a valid value from the database.
2011-10-11 14:17:58 +02:00
Michael Adam
ce8626cbbe s3:idmap_tdb2: fix hwm-handling to use uint32 consistently
The initialization code user int32, later writes used uint32...
2011-10-11 14:17:58 +02:00
Michael Adam
ba88e4e0d8 s3:idmap_tdb: fix hwm-handling to use uint32 consistently
The initialization code user int32, later writes used uint32...
2011-10-11 14:17:58 +02:00
Michael Adam
f8cad3a768 s3:idmap_autorid: make a debug message more precise 2011-10-11 14:17:58 +02:00
Michael Adam
b4e528ab54 s3:idmap_autorid: untangle function from check and log status in idmap_autorid_db_init() 2011-10-11 14:17:58 +02:00
Michael Adam
3d52de343a s3:idmap: convert idmap_tdb to use dbwrap wrapper functions.
Avoid direct use of the db_record and db_context structs.
2011-10-11 14:17:57 +02:00
Michael Adam
0e28448a78 s3:dbwrap: convert dbwrap_fetch(), dbwrap_fetch_bystring() and dbwrap_fetch_bystring_upper() to NTSTATUS 2011-10-11 14:17:56 +02:00