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

437 Commits

Author SHA1 Message Date
Stefan Metzmacher
692c42c427 s4:winbind: use ncalrpc for connections to ourself
That avoids recursion if "smbd" is used as file server.

metze
2012-02-29 10:41:07 +01:00
Andrew Bartlett
71587285cc s4-winbindd: Do not ask for a tree that we will not use 2012-02-29 10:41:06 +01:00
Andreas Schneider
17d124490b s4-librpc: Fix NETLOGON credential chain with Windows 2008.
Windows Server 2008 returns NT_STATUS_DOWNGRADE_DETECTED if you call
netrServerAuthenticate2 during a domain join without setting the strong
keys flag (128bit crypto).

Only for NT4 we need to do a downgrade to the returned negotiate flags.

See also 0970369ca0.
2011-12-14 13:41:28 +01: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
Andrew Bartlett
078db8f6c9 build: build wbinfo only once in the waf build
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sat Oct  8 04:52:03 CEST 2011 on sn-devel-104
2011-10-08 04:52:03 +02:00
Kai Blin
649bfc474d s4 winbind: Don't drop workgroup name for getpw*
Autobuild-User: Kai Blin <kai@samba.org>
Autobuild-Date: Sat Sep 24 22:49:50 CEST 2011 on sn-devel-104
2011-09-24 22:49:49 +02:00
Andrew Tridgell
2ff88386d5 s4-winbindd: implement WINBINDD_SIDS_TO_XIDS
this fixes wbinfo --sids-to-unix-ids

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 15:09:54 +02:00
Andrew Tridgell
5196d265f7 s4-winbindd: fixed handling of extra_data in s3 requests
extra_data in s3 winbind requests is appended to the end of the
request, but does not change the length header of the packet. Instead
you need to get it from the extra_len element of the request
structure.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 15:09:54 +02:00
Andrew Tridgell
5e1e33114c s4-winbind: added count argument to wb_sids2xids_recv()
this allows callers to know how many SIDs were mapped

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 15:09:54 +02:00
Andrew Bartlett
af5f494bd2 build: provide tevent-util as a public library
This is needed so that OpenChange can get at _tevent_req_nterr(), which is referenced
by generated PIDL output.

Andrew Bartlett
2011-08-08 13:34:06 +02:00
Andrew Bartlett
39af6a0927 s4-winbind handle all values for server role
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Jul 14 08:20:13 CEST 2011 on sn-devel-104
2011-07-14 08:20:13 +02:00
Stefan Metzmacher
ae6a7f945f s4:winbind/wb_init_domain: use DCERPC_SCHANNEL_128 in order to work against w2k8r2
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jun 22 19:40:47 CEST 2011 on sn-devel-104
2011-06-22 19:40:46 +02:00
Matthias Dieter Wallnöfer
03ea6b5b9e s4:winbind/wb_samba3_protocol.c - rework it using concrete enum values
This changes commit 49352cafb4 to comply
with kblin's plans.

Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org>
Autobuild-Date: Thu Jun 16 10:14:52 CEST 2011 on sn-devel-104
2011-06-16 10:14:52 +02:00
Matthias Dieter Wallnöfer
49352cafb4 s4:winbind/wb_samba3_protocol.c - quiet enum warning
Don't enumerate all unimplemented types of call which simply leads to
incompleteness.

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Andrew Bartlett
834d590bcf s4-param Remove 'idmap database'
This is now just idmap.ldb in the private dir, which remains.
2011-06-06 15:02:39 +10:00
Jeremy Allison
017e0c8d95 Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1. 2011-05-04 12:12:13 -07:00
Jelmer Vernooij
942c6eedf7 source4/winbind: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Günther Deschner
9867b7bf34 s4-waf: move wbinfo buildrule to winbind.
Will be moved back later, once we have a more common samba-util.so

Guenther
2011-02-17 00:52:16 +01:00
Andrew Tridgell
8dc92c8f71 ldb: use #include <ldb.h> for ldb
thi ensures we are using the header corresponding to the version of
ldb we're linking against. Otherwise we could use the system ldb for
link and the in-tree one for include

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-02-10 06:51:07 +01:00
Günther Deschner
34722c72f6 pam: share pam errors in a common location.
Guenther
2011-02-08 14:05:36 +01:00
Matthias Dieter Wallnöfer
90db6a793a s4:winbind/idmap.c - we cannot use "failed" until we are in a transaction
We've to wait until "trans" is initialised.
2011-01-12 19:52:19 +01:00
Matthieu Patou
e723de8fa1 Add some debug in s4's winbind server
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed Jan 12 01:43:11 CET 2011 on sn-devel-104
2011-01-12 01:43:11 +01:00
Matthias Dieter Wallnöfer
34c5bdc1c3 s4:libcli/finddc.h - fix header dependancies
And optimise includes
2010-12-12 20:06:24 +01:00
Andrew Tridgell
ef7f4a1420 s4-server: make server sockets a child of the task context
We previously allocated sockets as direct children of the event
context. That led to crashes if a service called
task_server_terminate(), as it left the socket open and handling
events for a dead protocol.

Making them a child of the task allows the task to terminate and take
all its sockets with it.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-11-15 10:19:34 +11:00
Jelmer Vernooij
f6c8bc6a7b winbind: Build as shared module. 2010-11-14 17:14:05 +00:00
Jelmer Vernooij
e28cec7817 ldbsamba: Lowercase library name. 2010-11-07 01:57:34 +01:00
Jelmer Vernooij
3deece5591 s4: Remove the old perl/m4/make/mk-based build system.
The new waf-based build system now has all the same functionality, and
the old build system has been broken for quite some time.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Oct 31 02:01:44 UTC 2010 on sn-devel-104
2010-10-31 02:01:44 +00:00
Andrew Tridgell
046d38faa5 s4-smbd: don't initialise process models more than once
this also removes the event_context parameter from process model
initialisation. It isn't needed, and is confusing when a process model
init can be called from more than one place, possibly with different
event contexts.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-10-30 23:49:00 +11:00
Jelmer Vernooij
a74e8be6d1 waf: Stop automaticaly changing dashes to underscores in library names. 2010-10-26 10:17:18 -07:00
Jelmer Vernooij
d9cbcdd410 s4: Drop duplicate 'lib' prefix for private libraries. 2010-10-26 10:17:16 -07:00
Jelmer Vernooij
5224de3f74 s4: Rename LIBCLI_LDAP to libcli_ldap. 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
833480d3ad s4: Rename LIBSAMBA-* to libsamba-* 2010-10-24 00:20:04 +00:00
Jelmer Vernooij
7a731ccdfc s4: Rename SAMDB_COMMON to samdb_common. 2010-10-24 00:20:04 +00:00
Andrew Bartlett
5742f5115c libcli/security Use common security.h
This includes dom_sid.h and security_token.h and will be moved
to the top level shortly.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Oct 12 03:35:36 UTC 2010 on sn-devel-104
2010-10-12 03:35:36 +00:00
Andrew Bartlett
5cd9495fb3 s4-param Refactor secrets code to not require an event context.
A new event context is constructed by LDB when required for secrets.ldb
This will be essentially unused, as LDB on TDB will only trigger 'fake'
events, and blocks on transactions and lock operations anyway.

Andrew Bartlett
2010-10-11 13:02:15 +00:00
Jelmer Vernooij
7ba7ca7062 idmap: Add missing dependency on ldbsamba. 2010-10-10 23:30:43 +02:00
Andrew Bartlett
39bd61e018 s4-winbind Add a proxy method to update DNS records with a read-write DC
This must be done in winbindd as it already has the schannel connection
and the credential chain.  If we re-established that elsewhere, we
would break the chain in winbindd.

Andrew Bartlett

Signed-Off-By: Andrew Tridgell <tridge@samba.org>
2010-09-17 19:02:18 +10:00
Andrew Tridgell
43d54406b1 s4-winbind: fixed two valgrind errors
- allocate the dc info on the right structure
- zero the number of group members when allocating the winbindd_gr
  return

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-16 21:58:58 +10:00
Andrew Tridgell
59d415f43f s4-finddc: use NBT lookup for a 1C name if joining a short domain name
once we get the 1C lookup reply, use a CLDAP query to find the details
for the server

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:36 +10:00
Andrew Tridgell
58d59a08ad s4-libcli: change finddcs.h -> finddc.h
this prevents conflicts with old generated files and we can only even
return one DC with this interface.

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:35 +10:00
Andrew Tridgell
ee61568be6 s4-winbind: use finddcs_cldap() in winbind
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:35 +10:00
Andrew Tridgell
041c699f3a s4-libnet: converted finddcs call to tevent_req
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10:00
Andrew Tridgell
94fb6120d8 s4-secrets: fetch secure channel type with domain SID
The secure channel type is needed to work out what DC to connect to

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:34 +10:00
Michael Adam
c03fa64a2c s4: remove REMOVE_MAPPING from wb_samba3_protocol
Michael
2010-08-14 02:10:34 +02:00
Michael Adam
74da3163f6 s4: remove SET_MAPPING from wb_samba3_protocol
Michael
2010-08-14 02:10:33 +02:00
Michael Adam
61f019d61d s4: remove SET_HWM and SET_DUAL_HWM from wb_samba3_protocol
Michael
2010-08-14 02:10:31 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Stefan Metzmacher
80f9ad4074 s4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer
We should not send uninitialized bytes to the winbind pipe,
this makes also makes valgrind very unhappy.

metze
2010-07-10 09:35:03 +02:00
Stefan Metzmacher
751a26214e s4:wb_cmd_list_groups: also handle NT_STATUS_NO_MORE_ENTRIES
metze
2010-07-10 09:35:03 +02:00
Stefan Metzmacher
c7a30c6b17 s4:wb_cmd_list_users: also handle NT_STATUS_NO_MORE_ENTRIES
metze
2010-07-10 09:35:02 +02:00
Matthias Dieter Wallnöfer
1d166fd3cf s4:winbind/wb_cmd_setpwent.c - fix a possible crash condition in the "winbind struct test"
Use a "talloc_strdup" for duplicating usernames.
2010-07-05 15:36:12 +02:00
Matthias Dieter Wallnöfer
83dedef2c7 s4:wb_cmd_list_groups.c - don't crash when we don't get any group at all 2010-07-04 22:05:17 +02:00
Matthias Dieter Wallnöfer
680453a906 s4:wb_cmd_list_groups.c - indentation and comment fixes 2010-07-04 22:05:17 +02:00
Matthias Dieter Wallnöfer
75d6842c40 s4:winbind/wb_samba3_protocol.c - add cast to suppress warnings on Solaris 10 cc 2010-06-26 19:45:07 +02:00
Stefan Metzmacher
6dbcffb51d s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-06-16 14:07:28 +02:00
Andrew Bartlett
1d66cb0e20 s4:winbind Give more detail on the parameters when reporting idmap failure 2010-05-24 23:08:57 +10:00
Andrew Bartlett
dceca3d8ae s4:winbind Change idmap API to match that used by the source3/ idmap subsystem
This makes it much easier to write an idmap module that bridges the gap.

We should finish the change to the new API, but for the moment this
choke point works for the conversion.

Andrew Bartlett
2010-05-24 23:08:57 +10:00
Andrew Bartlett
9573c35636 s4:winbind Change include guard so as not to conflict with idmap.h in source3 2010-05-24 23:08:57 +10:00
Andrew Bartlett
e7fe4d3885 s4:winbind Fix up includes after seperation of idmap.idl from winbind.idl 2010-05-24 23:08:57 +10:00
Andrew Bartlett
285647664c s4:idmap Adjust code to new idmap structure names and layout.
Andrew Bartlett
2010-05-24 23:08:56 +10:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Andrew Bartlett
e11a67de7d s4:winbindd Record the privilaged pipe dir
This may help us return an accurate priv pipe dir later on.

Andrew Bartlett
2010-05-18 13:20:30 +10:00
Andrew Bartlett
8da50c8da1 s4:winbindd Rework some winbind structures to make s3compat easier
By making the winbindd_request and winbindd_response structures
pointers, we can more easily integrate with the winbindd from
source3/winbindd

Andrew Bartlett
2010-05-14 23:25:45 +10:00
Matthias Dieter Wallnöfer
2f339f71bd s4:wb_cmd_getdcname.c - fix s4 winbind up regarding the new correct "GetAnyDCName" behaviour
We get back "NO_SUCH_DOMAIN" when we query the PDC. This is fine and therefore
we use the "logon_server" variable as "dcname".
2010-04-27 08:09:13 +02:00
Stefan Metzmacher
23fd76433a s4:winbind: fill response.data.num_entries for WINBINDD_LIST_USERS
metze
2010-04-19 16:09:14 +02:00
Stefan Metzmacher
629e73eeed s4:winbind: fill response.data.num_entries for WINBINDD_LIST_GROUPS
metze
2010-04-19 16:09:14 +02:00
Stefan Metzmacher
da17719241 s4:winbind: fill response.data.num_entries for WINBINDD_LIST_TRUSTDOM
metze
2010-04-19 16:09:14 +02:00
Stefan Metzmacher
7f6cdad706 s4:winbind: use WINBINDD_SOCKET_NAME instead of WINBINDD_SAMBA3_SOCKET
metze
2010-04-15 09:34:02 +02:00
Stefan Metzmacher
a1cf6a52af s4:winbind: wbsrv_samba3_priv_pipe_dir() needs to return the directory not the pipe path
metze
2010-04-15 09:34:02 +02:00
Matthias Dieter Wallnöfer
8ae956d7ba s4:winbind/wb_server.c - fix indentation 2010-04-07 19:37:35 +02:00
Andrew Tridgell
b690fedef5 s4-waf: removed the AUTOGENERATED markers
we won't be using the mk -> wscript generator again
2010-04-06 20:27:16 +10:00
Andrew Tridgell
f9eae32f4b s4-waf: mark the wscript files as python so vim/emacs knows how to highlight them 2010-04-06 20:27:11 +10:00
Andrew Tridgell
844acb2260 build: waf quicktest nearly works
Rewrote wafsamba using a new dependency handling system, and started
adding the waf test code
2010-04-06 20:26:48 +10:00
Andrew Tridgell
845e0cbe6f build: commit all the waf build files in the tree 2010-04-06 20:26:48 +10:00
Matthias Dieter Wallnöfer
4c29a4e126 s4:wb_cmd_getgroups - fix failure in s4 winbind's "getgroups" 2010-03-16 17:11:47 +01:00
Stefan Metzmacher
e9cae3b5bc s4:winbind/wb_sam_logon.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:48 +01:00
Stefan Metzmacher
399cbb6479 s4:winbind/wb_init_domain.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:47 +01:00
Stefan Metzmacher
7681260e1e s4:winbind/wb_dom_info_trusted.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:47 +01:00
Stefan Metzmacher
53bdd25829 s4:winbind/wb_connect_sam.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:47 +01:00
Stefan Metzmacher
d836dd9ea7 s4:winbind/wb_connect_lsa.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:47 +01:00
Stefan Metzmacher
6ecae51e18 s4:winbind/wb_cmd_usersids.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:46 +01:00
Stefan Metzmacher
765d4a52cb s4:winbind/wb_cmd_list_trustdom.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:45 +01:00
Stefan Metzmacher
05d6343ac7 s4:winbind/wb_cmd_getdcname: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:45 +01:00
Stefan Metzmacher
9e87e6dc9a s4:winbind/wb_async_helpers.c: make use of use tevent_req based dcerpc_binding_handle stubs
metze
2010-03-12 15:25:45 +01:00
Matthias Dieter Wallnöfer
2ee3cca4ff s4:winbind - use "unsigned" variables where possible 2010-03-09 17:54:12 +01:00
Matthias Dieter Wallnöfer
1310eba970 s4:winbind/wb_cmd_getgroups.c - fix up warnings
Also fix some indentations.
2010-03-09 17:52:10 +01:00
Matthieu Patou
bc766a9a84 s4:winbind: stub implementation of WINBINDD_PAM_LOGOFF
Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:31 +01:00
Matthieu Patou
238ff24341 s4:winbind: Fix a misplaced returned info
libwbclient expect to have in auth.exra_data the INFO3_TXT and in auth.unix_username the username

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Matthieu Patou
42b5b38187 s4:winbind Implement logic for getgroups to work
This function is called by the system everytime we do a id user or when we do wbinfo -r

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Matthieu Patou
30baf31411 s4:winbind: implement calls for allowing getent groups
This is to say getgrent and setgrent, and the associated technical objects (states, build directives,...) needed.

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
2010-03-09 17:20:30 +01:00
Stefan Metzmacher
598cf9f509 s4:winbind: make use of explicit dcerpc_*_recv functions
metze
2010-03-01 16:11:54 +01:00
Andreas Schneider
062a8cf006 s4-winbind: Fixed the memory context of tstream_bsd_existing()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-02-26 12:08:54 +01:00
Matthieu Patou
b792e5575c s4: Winbind allow to behave more correctly when we have more than a few users 2010-02-26 21:38:43 +11:00
Andrew Bartlett
af4a7c0f4b s4:winbind Make the 'no SID found' message even more detailed
Now we give the user a clue as to what may be wrong, and the file path
that we could not find the domain SID in.

Andrew Bartlett
2010-02-19 11:18:27 +11:00
Andrew Bartlett
7202dcdcc0 s4:param Modify secrets_get_domain_sid to give more useful errors
This also moves the calls to secrets_get_domain_sid back into
winbind_task_init(), so that we can terminate with a much more
detailed error message.  (The previous message was simply
NT_STATUS_CANT_ACCESS_DOMAIN_INFO).

Andrew Bartlett
2010-02-18 10:58:24 +11:00
Kai Blin
ea055e8c79 s4: Switch to S3-style id mapping data types. 2010-02-11 23:56:35 +01:00
Kai Blin
86d70ae944 s4 idmap: Make the sid_to_xid and xid_to_sid calls static.
Looking at the winbind interface, we should only be using the bulk conversion calls.
2010-02-11 23:56:35 +01:00
Andreas Schneider
fd6a792283 s4-winbind: Migrated winbind connection to tsocket.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-01-20 22:46:59 +01:00
Matthias Dieter Wallnöfer
663a1f599a s4:winbind - Fix it another time up
The first fix attempt did break some configurations (incl. "make test").
This now is the right fix with the right comment.
2009-11-27 17:45:20 +01:00
Matthias Dieter Wallnöfer
a5d854afbc s4:provision - Fix up the provision of "standalone" and "member" mode
Both modes weren't possible anymore since 1.) the secrets entry wasn't created,
2.) a lookup in winbindd was done using "lp_workgroup()" rather than
"lp_sam_name()" (since on the mentioned two configurations we use the netbios
name as domainname - and not the workgroup).
2009-11-27 14:51:14 +01:00