1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00
Commit Graph

1797 Commits

Author SHA1 Message Date
Stefan Metzmacher
432a77e0d7 wbinfo: ask wbcAuthenticateUserEx() for user info to test the more complex code path
metze
2008-02-15 11:55:17 +01:00
Stefan Metzmacher
237c2e9738 libwbclient: let wbcAuthenticateUser() use wbcAuthenticateUserEx()
metze
2008-02-15 11:55:17 +01:00
Stefan Metzmacher
423f139fd3 libwbclient: implement WBC_AUTH_USER_LEVEL_PLAIN in wbcAuthenticateUserEx()
metze
2008-02-15 11:55:17 +01:00
Stefan Metzmacher
491ba9c0c9 libwbclient: wbcAuthenticateUserEx() be more strict regarding invalid parameters
metze
2008-02-15 11:55:17 +01:00
Stefan Metzmacher
923cb37837 wbinfo: use wbcAuthenticateUserEx()
metze
2008-02-13 13:30:16 +01:00
Stefan Metzmacher
72af96a320 libwbclient: add wbcAuthenticateUserEx() function
This function will be used by auth_winbind.c.

metze
2008-02-13 13:30:15 +01:00
Stefan Metzmacher
5f623f54a9 nsswitch: convert winbind_env_set(), winbind_on() and winbind_off() into macros
metze
2008-02-13 10:44:52 +01:00
Stefan Metzmacher
97a8069075 libwbclient: implement wbcErrorString()
metze
2008-02-11 17:57:05 +01:00
Jeremy Allison
a769acc0ba The krb5 locator should now be correctly able to handle
IPV6, so (a) use the correct #ifdef (it's HAVE_IPV6, not
HAVE_IPv6) and (b) don't deliberately terminate on an
IPv6 address family.
Jeremy.
2008-02-05 13:44:22 -08:00
Günther Deschner
3442abd26d Remove unused marshalling for SAMR_CONNECT.
Guenther
2008-02-05 09:39:34 +01:00
Michael Adam
be57475cd1 Use the proper boolean constants in wbinfo.c .
Michael
2008-02-04 17:27:54 +01:00
Michael Adam
617928cbae Reformatting: Fix spacing in wbinfo.c .
This fixes mixed tabs/spaces and trailing whitespaces
I just ran across.

Michael
2008-02-04 17:27:54 +01:00
Michael Adam
3cbc7c19eb Prevent a segfault when "wbinfo -a" is called without password.
wbcAuthenticateUser segfaults when passed NULL as password.
This only changes the caller in wbinfo.c to pass an empty
password string to wbcAuthenticateUser().

Michael
2008-02-04 17:27:54 +01:00
Volker Lendecke
e26ba6a3c6 NetBSD needs PAM_SM_SESSION
Otherwise no prototype for pam_sm_close_session is defined
2008-02-01 13:06:23 +01:00
Günther Deschner
a3417be934 Fix build warning.
Guenther
2008-01-30 14:49:37 +01:00
Volker Lendecke
e9b3115c85 Fix uninitialized variables
response.extra_data.data is not initialized on the first error path

Found by the IBM checker
2008-01-29 16:24:59 -06:00
Gerald W. Carter
c1cdf60853 Allow NULL request and/or response pointers to be passed to wbcRequestResponse().
This is a valid parameter set for things like setpwent() and ping().
2008-01-29 14:49:38 -06:00
Jeremy Allison
f5ca241e2c Fix missing error check that caused crash when winbindd not running.
Jeremy.
2008-01-24 17:40:35 -08:00
Stefan Metzmacher
0b85f7173d libwbclient: use the same style in each switch case for the error mapping
metze
2008-01-21 13:20:07 +01:00
Günther Deschner
f7100156a7 Finally enable pidl generated SAMR & NETLOGON headers and clients.
Guenther
2008-01-17 16:54:46 +01:00
Stefan Metzmacher
40aeb43160 nsswitch/: we don't need socket or nss wrapper in the winbind client code
As we don't need socket wrapper of nss wrapper in the winbind client code
we disable the function macros so that we don't endup with swrap_close()
or similar functions.

metze
2008-01-15 13:58:32 +01:00
Stefan Metzmacher
7dd65599a1 libwbclient: move wbc_err.h into wbclient.h as we only install one header
This makes the installed wbclient.h header usable.

metze
2008-01-15 10:43:42 +01:00
Günther Deschner
338baf96cb Some coding convention pedantism.
Guenther
2008-01-03 12:11:18 +01:00
Gerald (Jerry) Carter
518168410c Fix some C++ warnings (patch was Volker's) - implicit case from void* to char* 2008-01-02 17:34:41 -06:00
Gerald (Jerry) Carter
39c2059f66 Make sure that wbcLookupSid() and wbcLookupRids() use talloc()'d memory.
Follows existing convention that all returned memory should be freed with
wbcFreeMemory() and not directly with free().  Noticed by Volker.  Txs.
2008-01-02 14:50:59 -06:00
Volker Lendecke
1bbdbdef99 Fix wbcAllocate[GU]id
wbcRequestResponse() returns a wbcErr, not NSS_STATUS
2007-12-23 00:49:32 +01:00
Volker Lendecke
9a24753d35 Fix wbcPing()
Without request and response, wbcRequestResponse() will always return
WBC_ERR_INVALID_PARAM, so the ping will never reach winbind.
2007-12-23 00:49:32 +01:00
Jeremy Allison
5159f897dd Fix const warning.
Jeremy.
2007-12-21 12:18:17 -08:00
Gerald (Jerry) Carter
290ab64e9e Compile fix: Correct use of wbcDomainInfo() after function signature change.
Also fixes a doxygen warngin about an undocumented parameter in the same
function.
2007-12-21 13:49:19 -06:00
Gerald (Jerry) Carter
42787bccff De-couple smbd from staticly linking against winbindd client files.
Implements a wrapper layer in winbind_util.c which are just stubs
if compiled --without-winbind.  When building with winbindd, it
is now required to build the libwbclient DSO first (in the Makefile)
and then either set LD_LIBRARY_PATH or /etc/ld.so.conf to pick up the
library PATH.
2007-12-21 11:59:56 -06:00
Gerald (Jerry) Carter
83d274b460 Add files for new LGPL libwbclient DSO implementing the Winbind client API
(based on the winbind_struct_protocol.h).

The API in incomplete, but sufficient to merge.  See wbclienbt.h for the i
interface functions.
2007-12-21 11:58:04 -06:00
Michael Adam
6d765e0de5 Only retrieve password policies in pam_auth when WBFLAG_PAM_GET_PWD_POLICY is set.
This essentially re-establishes r14496 (2155bb0535)
which was undone in r17723 (43bd8c00ab) for
reasons that are unclear to me. Maybe I am being too naive.

Now we do again only retrieve the password policy when called from
the pam_winbind module. This fixes logons delegated to AD trusted
domain controllers: We need to connect to the sam to retrieve the
password policy. But auhtenticated session setup is not possible
when contacting the trusted domain dc and afterwards, SamrConnect
also fails with whatever credentials and method used.

Michael
2007-12-20 02:05:55 +01:00
Volker Lendecke
eb523ba776 s/sid_to_string/sid_to_fstring/
least surprise for callers
2007-12-15 22:47:30 +01:00
Volker Lendecke
c221c246b1 Use sid_to_string directly
It seems a bit pointless to do a fstrcpy(dst, sid_string_static(src))
2007-12-15 22:09:36 +01:00
Volker Lendecke
bb35e794ec Replace sid_string_static by sid_string_dbg in DEBUGs 2007-12-15 22:09:36 +01:00
Stefan Metzmacher
33cbd6903e wbinfo: use POPT_COMMON_CONFIGFILE
We can't use POPT_COMMON_SAMBA as the -s option is
already used by -s, --sid-to-name=SID.

Also load the config file after processing the cmdline options

metze
2007-12-14 19:38:23 +01:00
Stefan Metzmacher
ce7fe8acf4 winbindd: remove unused WINBINDD_DUMP_MAPS support
Also the design of this function was really bad,
instead do the dump into a file, the client should get
back the list of mappings.

metze
2007-12-12 10:07:05 +01:00
Stefan Metzmacher
fd4499ee43 winbindd: remove unused WINBINDD_DUAL_NAME2*ID and WINBINDD_DUAL_*ID2NAME calls
WINBINDD_DUAL_UID2NAME
WINBINDD_DUAL_NAME2UID
WINBINDD_DUAL_GID2NAME
WINBINDD_DUAL_NAME2GID

metze
2007-12-12 09:34:20 +01:00
Jeremy Allison
657bf8c347 Add patches for bug #4866 from jiri sasek - Sun Microsystems - Prague Czech Republic <Jiri.Sasek@Sun.COM>
- slightly modified - Jiri please check !  to allow Solaris to get passwords > 8 chars.
Jeremy.
2007-12-11 13:16:35 -08:00
Jeremy Allison
52dc5eaef2 Remove the char[1024] strings from dynconfig. Replace
them with malloc'ing accessor functions. Should save a
lot of static space :-).
Jeremy.
2007-12-10 11:30:37 -08:00
Jeremy Allison
ec003f3936 Remove next_token - all uses must now be next_token_talloc.
No more temptations to use static length strings.
Jeremy.
2007-12-07 17:32:32 -08:00
Jeremy Allison
822b2ead9b Don't double define fstring.
Jeremy.
2007-12-07 12:04:40 -08:00
Jeremy Allison
46b67fd82c Remove pstrings completely except for smbctool (what does this do ?).
Don't build this for now.
Jeremy.
2007-12-07 12:02:44 -08:00
Jeremy Allison
9ccac8abb0 Remove more pstrings, from the winbindd protocol def and
inside winbindd. Remove unused pstring types.
Jeremy.
2007-12-03 17:57:46 -08:00
Jeremy Allison
331c0d6216 Remove pstrings from nsswitch/ and registry/
Jeremy.
2007-11-26 17:24:56 -08:00
Gerald (Jerry) Carter
30c9e3557b Allocate a talloc_stackframe() in main() for wbinfo. 2007-11-21 10:27:22 -06:00
Jeremy Allison
35aaa36f82 Remove more static data from lib/util_sock.c and
callers.
Jeremy.
2007-11-03 22:34:46 -07:00
Jeremy Allison
98e154c312 This is a large patch (sorry). Migrate from struct in_addr
to struct sockaddr_storage in most places that matter (ie.
not the nmbd and NetBIOS lookups). This passes make test
on an IPv4 box, but I'll have to do more work/testing on
IPv6 enabled boxes. This should now give us a framework
for testing and finishing the IPv6 migration. It's at
the state where someone with a working IPv6 setup should
(theorecically) be able to type :
smbclient //ipv6-address/share
and have it work.
Jeremy.
2007-10-24 14:16:54 -07:00
Günther Deschner
36578b22f1 Merge Tridge's fix for the winbind 32/64bit padding.
Guenther
2007-10-19 13:03:49 +02:00
Jeremy Allison
f35a266b3c RIP BOOL. Convert BOOL -> bool. I found a few interesting
bugs in various places whilst doing this (places that assumed
BOOL == int). I also need to fix the Samba4 pidl generation
(next checkin).
Jeremy.
2007-10-18 17:40:25 -07:00