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

35 Commits

Author SHA1 Message Date
Herb Lewis
93af72fe45 merge winbindd WINS changes from 2.2
(This used to be commit 205399dc17)
2002-03-29 15:37:39 +00:00
Tim Potter
97ec0686f1 Cache call to winbind separator.
Some random reformatting and cleanup.

Display output of wbinfo -s using actual winbind separator.
(This used to be commit 099f8c5dfd)
2002-03-20 03:54:47 +00:00
Andrew Bartlett
f8b06e0dab Move wbinfo over to d_printf(). Patch by Hasch@t-online.de (Juergen Hasch)
Andrew Bartlett
(This used to be commit 5710e588ce)
2002-03-01 01:13:42 +00:00
Andrew Bartlett
e91e0a83af Winbind cleanup.
This patch fixes the segfaults I introduced in the previous conneciton caching
patch.  It cleans up the connection cache a *lot* - in particular it adds
significant robustness to the operation.

If a the DC goes down, we no longer fail the next operation - the code checks
if the connection died during one of its own operations on the socket, and
restarts the conneciton as required.

There is still a memory leak in here somewhere - but this code also cleans up a
number of these.

Also added is the abilty to sepecify the domain of the 'get around restrict anonymous'
user that winbind uses.

Andrew Bartlett
(This used to be commit 92cbefdf27)
2002-02-15 13:28:59 +00:00
Andrew Bartlett
14e6be4975 A few small winbind updates:
Add a connection cache to the netlogon pipe.  This makes a *massive* difference
to the time-per-auth.  Also fix up *some* of the memory leaks in other
connection caches.

Add some debugging messages for the is_connected() code.  I'm thinking we
should get a client implementation of SMBecho and call it here - as it would
allow us to always know the DC is around before we start.

Down the debug level for some of the pam_winbind code - I'll probably down it
further when I'm finished debugging.

Andrew Bartlett
(This used to be commit 49d3e47666)
2002-02-11 01:29:07 +00:00
Tim Potter
1e94977a9b 0x is the traditional prefix for displaying hex numbers.
(This used to be commit f424b691ea)
2002-02-06 02:22:33 +00:00
Andrew Bartlett
ed389ee8dc Drastic impromvents to pam_winbind.
This adds code to do generic PAM -> NTSTATUS and NTSTATUS -> PAM error
conversions, and uses them to make the error handling in pam_winbind sane.

In particular, pam_winbind now uses PAM error codes, not silly '-1, -2 ...'
stuff, and logs the NTSTATUS error that winbind now sends over the pipe.

Added code to wbinfo to display these - makes a big difference in debugging
winbindd.

The main change here is the code to allow pam_winbind password changing to
correctly stack - This code ripped from pam_unix, and the copyright attached.
(Same as for all pam modules, including pam_winbind)

Andrew Bartlett
(This used to be commit dc1a72f896)
2002-02-05 09:40:36 +00:00
Andrew Tridgell
3a1a53c88a added 'wbinfo --sequence' to show sequence numbers of all domains
(This used to be commit bcd234a3da)
2002-01-31 11:49:29 +00:00
Tim Potter
cd68afe312 Removed version number from file header.
Changed "SMB/Netbios" to "SMB/CIFS" in file header.
(This used to be commit 6a58c9bd06)
2002-01-30 06:08:46 +00:00
Andrew Bartlett
06c79a1757 Change the winbind interface to use seperate 'domain' and 'username' feilds for
the sid->uid and uid->sid conversions.

Remove some duplicate arguments from these funcitons, and update the
request/response structures for this and the 'winbind domain name' feature.

As such 'winbindd_lookup_name' now takes both a domain and username.
(This used to be commit ce1b4d4c30)
2002-01-26 09:55:38 +00:00
Andrew Bartlett
93a8358910 This patch makes the 'winbind use default domain' code interact better with
smbd, and also makes it much cleaner inside winbindd.

It is mostly my code, with a few changes and testing performed by Alexander
Bokovoy <a.bokovoy@sam-solutions.net>.  ab has tested it in security=domain and
security=ads, but more testing is always appricatiated.

The idea is that we no longer cart around a 'domain\user' string, we keep them
seperate until the last moment - when we push that string into a pwent on onto
the socket.

This removes the need to be constantly parsing that string - the domain prefix
is almost always already provided, (only a couple of functions actually changed
arguments in all this).

Some consequential changes to the RPC client code, to stop it concatonating the
two strings (it now passes them both back as params).

I havn't changed the cache code, however the usernames will no longer have a
double domain prefix in the key string.  The actual structures are unchanged
 - but the meaning of 'username' in the 'rid' will have changed.  (The cache is
invalidated at startup, so on-disk formats are not an issue here).

Andrew Bartlett
(This used to be commit e870f0e727)
2002-01-20 01:24:59 +00:00
Andrew Bartlett
1fb9ccc4e2 This is the 'winbind default domain' patch from Alexander Bokovoy
<a.bokovoy@sam-solutions.net>.

The idea is the domain\username is rather harsh for unix systems - people don't
expect to have to FTP, SSH and (in particular) e-mail with a username like
that.

This 'corrects' that - but is not without its own problems.

As you can see from the changes to files like username.c and wb_client.c (smbd's
winbind client code) a lot of assumptions are made in a lot of places about
lp_winbind_seperator determining a users's status as a domain or local user.

The main change I will shortly be making is to investigate and kill off
winbind_initgroups() - as far as I know it was a workaround for an old bug in
winbind itself (and a bug in RH 5.2) and should no longer be relevent.

I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters
to determine a user/groups's 'local' status, rather than the presence of the
seperator.

As such, this functionality is recommended for servers providing unix services,
but is currently less than optimal for windows clients.

(TODO: remove all references to lp_winbind_seperator() and
lp_winbind_use_default_domain() from smbd)

Andrew Bartlett
(This used to be commit 07a21fcd23)
2002-01-18 02:37:55 +00:00
Tim Potter
9ee8213f9a Some memory leak fixes.
(This used to be commit da4db0373b)
2002-01-11 03:49:51 +00:00
Andrew Bartlett
7d6dd0b3a0 Return the winbind separator over the socket, so programs don't have to parse
smb.conf to get it right.

While wb_client needs its lp_load() for samba dependency reasons, it now uses
the new method both to example and test the new code.

Also add an interface version function, and return the winbind's samba version
string.

In preperation for default domains, its now up to winbindd to reject plaintext
auths that don't have a seperator, but NTLM (CRAP) auths now have two feilds,
hence need parsing.

Andrew Bartlett
(This used to be commit 2bd2a092ee)
2002-01-10 11:28:14 +00:00
Andrew Bartlett
cf00e41421 This changes the winbind protcol a bit:
It adds a 'ping' request, just to check winbind is in fact alive

It also changes winbindd_pam_auth_crap to take usernames and domain seperatly.

(backward incompatible change, needs merge to 2.2, but this is not yet released
code, so no workarounds)

Finally, it adds some debugs and fixes a few memory leaks (uses talloc to do
it).

Andrew Bartlett
(This used to be commit 6df29bfe33)
2002-01-10 10:23:54 +00:00
Andrew Tridgell
a062e58d9e - added initial support for trusted domains in winbindd_ads
- gss error code patch from a.bokovoy@sam-solutions.net
- better sid dumping in ads_dump
- fixed help in wbinfo
(This used to be commit ee1c3e1f04)
2001-12-19 08:44:23 +00:00
Tim Potter
6526a42558 Oops, the -a option disappeared.
(This used to be commit 6194f874bb)
2001-12-11 23:27:45 +00:00
Herb Lewis
ee4d682115 fix for IRIX compilers
(This used to be commit b110f57e49)
2001-12-11 18:08:48 +00:00
Tim Potter
f4dfa9b6b2 Converted wbinfo to use popt instead of getopt - popt is very nice!
Added a --set-auth-user function to set a username and password that can be
used by winbindd when making connections to domain controllers.  This is
necessary when restrictions have been placed on anonymous connections
either through the RestrictAnonymous registry setting, or the win2k Local
Security Policy -> Security Settings -> Local Policies -> Security Options
-> Additional restrictions for anonymous connections.  (phew)

Two new keys are set in secrets.tdb: SECRETS/AUTH_USER and
SECRETS/AUTH_PASSWORD which hold the username and plaintext password of the
user to connect as.

To reset these values, run wbinfo --set-auth-user ""
(This used to be commit 507003522b)
2001-12-11 05:18:36 +00:00
Jeremy Allison
4d3ec230b4 Correct message on wbinfo fail to open config file.
Jeremy.
(This used to be commit 9b7182a9da)
2001-12-04 21:30:52 +00:00
Tim Potter
79b34d1b11 Removed TimeInit() call from every client program (except for one place
in smbd/process.c where the timezone is reinitialised.  Was replaced with
check for a static is_initialised boolean.
(This used to be commit 8fc772c9e5)
2001-11-23 00:52:29 +00:00
Martin Pool
f741f65673 Store some path names in global variables initialized to configure
default, rather than in preprocessor macros.
(This used to be commit 79ec88f0da)
2001-11-19 02:49:53 +00:00
Jeremy Allison
c51f7bd4d0 Fix winbind client code so that winbind calls are not made if the
requested name does not have a winbind separator character. This
makes the intent explicit. Tim, contact me if this is not what
you indended.
Jeremy.
(This used to be commit 86b7cf7f85)
2001-11-13 21:28:31 +00:00
Andrew Tridgell
7deed93dd7 fixed a bunch of compilation errors on Solaris, mostly people getting NSS_STATUS and WINBINDD error codes mixed up
(This used to be commit 66698d6b84)
2001-09-05 07:55:54 +00:00
Tim Potter
b0f167cdf2 Added another authentication interface to winbindd. The Challenge Response
Authentication Protocol (CRAP) takes a tuple of (username, random
challenge, encrypted lm password, encrypted nt password) where the
passwords are encrypted with the random challenge ala ntlmssp.
(This used to be commit 11f72a78e3)
2001-08-22 02:48:16 +00:00
Andrew Tridgell
e8c2eeb0d8 the nss and pam modules in winbind don't have strchr_m() yet, so use
strchr() for the moment
(This used to be commit c2c1f2027e)
2001-07-18 21:50:20 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Tim Potter
da3943ed35 More compile fixups for winbind portability.
(This used to be commit 086f332bb1)
2001-06-04 04:12:38 +00:00
Tim Potter
a5f7cd89e1 Compile fix for solaris.
Fixed some compiler warnings.
(This used to be commit b44d3f912c)
2001-06-04 03:14:56 +00:00
Andrew Tridgell
5f9dca64da merge some of the nsswitch code from tng to head
the libnss_winbind.so from head now works with
the winbindd from tng
(This used to be commit 67ccfd2826)
2001-04-25 05:47:50 +00:00
Tim Potter
8c7f2fbab2 Fixed merging mess.
(This used to be commit 7b8c03de1f)
2000-10-13 05:19:57 +00:00
Tim Potter
76aab4ad56 Renamed WINBINDD_INITGROUPS constant to WINBINDD_GETGROUPS.
(This used to be commit 5f3cf2eb78)
2000-10-11 05:45:06 +00:00
Tim Potter
c72f94dad9 Modified initgroups to provide a get groups a user is a member of
functionality.  This is much faster than inverting the group database.

Added client side command for this to wbinfo.
(This used to be commit e87b2d3d1f)
2000-10-11 05:25:32 +00:00
Tim Potter
e7b5aba7f1 Merge of wbinfo program from TNG.
(This used to be commit 659e4d88ff)
2000-07-05 11:24:26 +00:00