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

53 Commits

Author SHA1 Message Date
Andreas Schneider
1834513ebe wbclient: Add wbcSetClientProcessName()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2018-11-12 09:50:25 +01:00
Ralph Boehme
ec85579d87 libwbclient: add trust routing and more trust-types
This adds the struct member and the defines, the implementation comes
later.

Signed-off-by: Ralph Boehme <slow@samba.org>
2018-01-13 12:55:08 +01:00
Stefan Metzmacher
1e0df575bc libwbclient: add WBC_SID_NAME_LABEL
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Mar 23 12:55:26 CET 2017 on sn-devel-144
2017-03-23 12:55:26 +01:00
Volker Lendecke
a6f4e60306 libwbclient: Add "authoritative" to wbcAuthErrorInfo
smbd needs to react to "authoritative"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2017-03-07 09:15:17 +01:00
Herwin Weststrate
0b500d413c Added MSV1_0_ALLOW_MSVCHAPV2 flag to ntlm_auth
An implementation of https://lists.samba.org/archive/samba/2012-March/166497.html (which has been discussed in 2012, but was never implemented).

It has been tested on a Debian Jessie system with this patch added to the Debian package (which is currently 4.1.17). Even though this is Samba 4, the ntlm_auth installed is the one from Samba 3 (yes, it surprised me too). The backend was a machine with Windows 2012R2.

It was first tested with the local security policy 'Network Security: LAN Manager authentication level' setting changed to 'Send NTLMv2 Response Only' (allow ntlm v1). This way we are able to authenticate with and without the MSV1_0_ALLOW_MSVCHAPV2 flag (as expected).

After the basic step has been verified, the local security policy 'Network Security: LAN Manager authentication level' setting was changed to 'Send NTLMv2 Response Only. Refuse LM & NTLM' (only allow ntlm v2). The behaviour now changed according to the MSV1_0_ALLOW_MSVCHAPV2 flag (again: as expected).

  $ ntlm_auth --request-nt-key --username=XXXXXXXXXXXXX --challenge=XXXXXXXXXXXXXXXXX --nt-response=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --domain=
  Logon failure (0xc000006d)
  $ ntlm_auth --request-nt-key --username=XXXXXXXXXXXXX --challenge=XXXXXXXXXXXXXXXXX --nt-response=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX --domain= --allow-mschapv2
  NT_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

The changes in `wbclient.h` are intended for programs that use libwinbind directly instead of authenticating via `ntlm_auth`. I intend to use that within FreeRADIUS (see https://bugzilla.samba.org/show_bug.cgi?id=11149).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=11694
Signed-off-by: Herwin Weststrate <herwin@quarantainenet.nl>
Reviewed-by: Kai Blin <kai@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2016-03-11 22:58:18 +01:00
Volker Lendecke
171931cf7d libwbclient: Implement wbc[Ctx]UnixIdsToSids
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2016-02-22 20:29:15 +01:00
Matthew Newton
c6cb2d6508 Update libwbclient version to 0.12
Increment the minor version of the libwbclient library after new
context functions added. (Major version increase not required as
the only two functions with changed parameters are private to the
library.)

Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Mar 10 03:24:45 CET 2015 on sn-devel-104
2015-03-10 03:24:45 +01:00
Matthew Newton
063c56dba5 Add context versions of wbclient functions
To make the libwbclient library thread-safe, all functions
that call through to wb_common winbindd_request_response need
to have context that they can use. This commit adds all the
necessary functions.

Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-10 00:50:10 +01:00
Matthew Newton
bc75e723ce Add wbcContext struct, create and free functions
The basic context structure and functions for libwbclient so that
libwbclient can be made thread-safe.

Signed-off-by: Matthew Newton <matthew-git@newtoncomputing.co.uk>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2015-03-10 00:50:10 +01:00
Christian Ambach
1a7bd5e12c nsswitch: fix some typos
Signed-off-by: Christian Ambach <ambi@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 17 01:09:33 CEST 2013 on sn-devel-104
2013-05-17 01:09:33 +02:00
Andrew Bartlett
914b02be5a libwbclient: bump ABI to 0.11 as wbcAuthenticateUserEx now provides PAC parsing
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Sep 21 06:37:15 CEST 2012 on sn-devel-104
2012-09-21 06:37:15 +02:00
Christof Schmitt
1bc2f28b94 winbind: Extend wbcAuthenticateUserEx to provide PAC
With this new interface, external applications that have authenticated
to an ADS can pass the PAC from the Kerberos ticket to
wbcAuthenticateUserEx. winbindd decodes and extracts the info3
information for the external application. If winbindd can verify the PAC
signature, the info3 from the PACis also added to the netsamlogon_cache.

The info3 data can be used by the external application to get the uid
and primary gid. The data in netsamlogon_cache allows to retrieve the
complete group list through the NSS function getgrouplist.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-09-20 19:49:32 -07:00
Christof Schmitt
bdb1f23e1d libwbclient: Add wbcPingDc2
Add wbcPingDc2 that optionally returns the DC that was attempted to
ping. wbcPing is implemented as a wrapper around wbcPingDc2.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2012-08-15 11:44:42 +10:00
Andrew Bartlett
18e8d49d7e libwbclient: bump version to 0.9, and add this version to .pc file 2012-04-20 01:54:33 +02:00
Andrew Tridgell
7945949177 libwbclient: added support for WBC_ID_TYPE_BOTH
the Samba4 winbindd allows for a single SID to map to both a user and
group id. This is used to support files with the owner_sid set to a
group

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
2011-09-23 00:16:41 +02:00
Volker Lendecke
a93c49d7e6 libwbclient: Add wbcSidsToUnixIds
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00
Volker Lendecke
cfe30df98e libwbclient: Add wbcLookupSids
Signed-off-by: Jeremy Allison <jra@samba.org>
2011-04-13 14:13:25 -07:00
Volker Lendecke
afb6752fa7 libwbclient: Add wbcSidToStringBuf 2011-03-05 14:29:32 +01:00
Michael Adam
6d3625de67 libwbclient: doxygen: mark wbcSetGidHwm deprecated
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Thu Feb 10 14:42:24 CET 2011 on sn-devel-104
2011-02-10 14:42:24 +01:00
Michael Adam
3c6ae6d4d7 libwbclient: doxygen: mark wbcSetUidHwm deprecated 2011-02-10 13:57:32 +01:00
Michael Adam
37575560bf libwbclient: doxygen: mark wbcRemoveGidMapping deprecated 2011-02-10 13:57:32 +01:00
Michael Adam
7494724b84 libwbclient: doxygen: mark wbcRemoveUidMapping deprecated 2011-02-10 13:57:32 +01:00
Michael Adam
d75ad33598 libwbclient: doxygen: mark wbcSetGidMapping deprecated 2011-02-10 13:57:32 +01:00
Michael Adam
cb5e685d54 libwbclient: doxygen: mark wbcSetUidMapping deprecated 2011-02-10 13:57:32 +01:00
Michael Adam
7dca8bcbb9 Revert "libwbclient: remove wbcSetUidMapping() - not implemented any more"
This reverts commit 25a0dc44f7.

Undo the library version bump.
2011-02-10 13:57:32 +01:00
Michael Adam
1f4a06e64f Revert "libwbclient: remove wbcSetGidMapping() - not implemented any more"
This reverts commit 52e1be2139.

Undo the library version bump.
2011-02-10 13:57:32 +01:00
Michael Adam
ecbb223989 Revert "libwbclient: remove wbcRemoveUidMapping() - not implemented any more"
This reverts commit 1ed5961df2.

Undo the library version bump.
2011-02-10 13:57:32 +01:00
Michael Adam
75b2a2f999 Revert "libwbclient: remove wbcRemoveGidMapping() - not implemented any more"
This reverts commit 393c866c51.

Undo the library version bump.
2011-02-10 13:57:32 +01:00
Michael Adam
748cccde42 Revert "libwbclient: remove wbcSetUidHwm() - not implemented any more"
This reverts commit 6558323c84.

Undo the library version bump.
2011-02-10 13:57:32 +01:00
Michael Adam
7a3bc46e7b Revert "libwbclient: remove wbcSetGidHwm() - not implemented any more"
This reverts commit 68a9b726be.

Undo the library version bump.
2011-02-10 13:57:31 +01:00
Michael Adam
9bc1a7ba16 Revert "libwbclient: bump version to 0.6 -> 1.0 due to ABI change (removed symbols)"
This reverts commit 128bed20c4.

Undo the library version bump.
2011-02-10 13:57:31 +01:00
Michael Adam
128bed20c4 libwbclient: bump version to 0.6 -> 1.0 due to ABI change (removed symbols) 2011-01-27 22:00:33 +01:00
Michael Adam
68a9b726be libwbclient: remove wbcSetGidHwm() - not implemented any more 2011-01-27 21:58:02 +01:00
Michael Adam
6558323c84 libwbclient: remove wbcSetUidHwm() - not implemented any more 2011-01-27 21:57:24 +01:00
Michael Adam
393c866c51 libwbclient: remove wbcRemoveGidMapping() - not implemented any more 2011-01-27 21:56:47 +01:00
Michael Adam
1ed5961df2 libwbclient: remove wbcRemoveUidMapping() - not implemented any more 2011-01-27 21:56:11 +01:00
Michael Adam
52e1be2139 libwbclient: remove wbcSetGidMapping() - not implemented any more 2011-01-27 21:55:42 +01:00
Michael Adam
25a0dc44f7 libwbclient: remove wbcSetUidMapping() - not implemented any more 2011-01-27 21:54:25 +01:00
Volker Lendecke
7f87d58900 s3: Add wbinfo --dc-info
wbinfo --dc-info prints the current DC name and IP address. This helps
diagnosing problems that might happen when a later wbinfo --ping-dc fails.

This patch started out by using the SAF and NBT cache entires, but those are
relatively short-lived. So I decided to invent a new gencache entry with a very
long timeout. We need to go via the gencache because when for some reason a
winbind child process is stuck, we can't query it for the current DC it's
connected to. This must eventually go away again when we have a fully async
winbind.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jan 19 08:40:28 CET 2011 on sn-devel-104
2011-01-19 08:40:28 +01:00
Andreas Schneider
b4c46bd7df libwbclient: Fixed doxygen errors. 2010-05-05 15:36:10 +02:00
Kai Blin
33bbe1cafd libwbclient: Add wbcInterfaceDetails_send/recv 2010-02-11 23:56:33 +01:00
Volker Lendecke
7d18d058a1 s3: Add wbinfo --ccache-save
With this command you can give winbind your password for later use by
the automatic ntlm_auth
2010-01-24 20:32:16 +01:00
Volker Lendecke
9b6b01aab6 s3:winbind: Add a lower-cost alternative to wbinfo -t: wbinfo --ping-dc
This just does a NULL RPC call through an existing NETLOGON connection. If
someone knows an operation that "just works" and does not return NOT_SUPPORTED,
please tell me :-)
2009-12-21 23:23:52 +01:00
Günther Deschner
20c07674f6 nsswitch: increase libwbclient version after adding wbcChangeTrustCredentials().
Guenther
2009-10-16 16:08:55 +02:00
Günther Deschner
74948c979a libwbclient: add wbcChangeTrustCredentials.
Guenther
2009-10-13 12:42:44 +02:00
Matthias Dieter Wallnöfer
926a935a61 s4:wbclient.h - add compatibility constants
This is the result of a discussion on samba-technical on how to deal best with
existing programs which don't support my changes in the interface yet. Metze
pointed out this "defines" as a possibility and simo and I agreed.
2009-10-12 16:28:34 +02:00
Matthias Dieter Wallnöfer
1e2f455b4a winbind: adapt the new reject constants also there
Please note: in the past the value "0" was misinterpreted as other error. This
isn't true. "0" means no error.
Therefore a solution for this one has to found.
2009-10-08 11:01:22 +02:00
Günther Deschner
2df47b0a54 libwbclient: implement secure channel verification for specific domains in wbcCheckTrustCredentials().
Guenther
2009-10-07 11:18:03 +02:00
Kai Blin
a7128709d2 libwbclient: Add wbcSidTypeString function. 2009-08-18 19:53:41 +02:00
Günther Deschner
48f14949b1 libwbclient: Fix undocumented arguments doxygen warnings.
Guenther
(cherry picked from commit f2b3fbf0c0)
2009-04-14 20:05:21 +02:00