1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

504 Commits

Author SHA1 Message Date
Tim Potter
077e093d8a Some cosmetic changes to make the popt --usage output look nicer.
(This used to be commit 39124b9a62e1ba0f8089c36b27d6c79352a27973)
2003-03-17 03:56:58 +00:00
Andrew Bartlett
d21f97a25d If it's an fstring, use fstrcpy().
Andrew Bartlett
(This used to be commit bf5e0698eed72d7fc005be08feb36ef82ada716c)
2003-03-15 06:42:44 +00:00
Andrew Bartlett
3b580ff000 This patch attemptes to clean up winbindd's mutex locking.
The current locking scheme in winbind is a complete mess - indeed, the
next step should be to push the locking into cli_full_connection(), but
I'll leave it for now.

This patch works on the noted behaviour that 2 parts of the connection
process need protection - and independent protection.  Tim Potter did
some work on this a little while back, verifying the second case.

The two cases are:
 - between connect() and first session setup
 - during the auth2 phase of the netlogon pipe setup.

I've removed the counter on the lock, as I fail to see what it gains us.

This patch also adds 'anonymous fallback' to our winbindd -> DC connection.

If the authenticated connection fails (wbinfo -A specifed) - say that
account isn't trusted by a trusted DC - then we try an anonymous.

Both tpot and mbp like the patch.

Andrew Bartlett
(This used to be commit 0620320002082298a15cbba72bd79aecfc607947)
2003-03-11 11:28:59 +00:00
Tim Potter
dcf7cad4bf Remove obsolete file.
(This used to be commit c5c1a7979385778c08d6dd7796cfe8be1815992f)
2003-03-11 02:30:17 +00:00
Andrew Bartlett
01289b14a7 Make sure that the 'remote' machine name can only be set once. For some weird
reason, during a Win2003 installation, when you select 'domain join' it sends
one machine name in the name exchange, and litraly 'machinename' during the
NTLMSSP login.

Also fix up winbindd's logfile handling, so that it matches smbd and nmbd.

(This helps me, by seperating the logs by pid).

Andrew Bartlett
(This used to be commit afe5a3832f79131fb74461577f1db0e5e8bf4b6d)
2003-03-08 10:22:50 +00:00
Jeremy Allison
56d0621264 Fix "might be used uninitialised" warnings.
Jeremy.
(This used to be commit a670b57c563b220c2ede1dac4ce1e9c71c866498)
2003-03-03 19:36:16 +00:00
Andrew Tridgell
7972855b81 fixed a crash bug in the new winbindd 'sids rule!' code
(This used to be commit 7dfd59963dba921907893b9d1bffe797e9d8b4ad)
2003-02-28 06:03:35 +00:00
Jeremy Allison
9f0ae6fad2 *Excellent* patch from Michael Steffens <michael_steffens@hp.com> to limit
the unix domain sockets used by winbindd (also solves FD_SETSIZE problem
in winbindd to boot !). Adds a "last_access" field to winbindd connections,
and will close the oldest idle connection once the number of open connections
goes over WINBINDD_MAX_SIMULTANEOUS_CLIENTS (defined in local.h as 200
currently).
Jeremy.
(This used to be commit a82caefda49396641e8650db8a7ef51752ba6c41)
2003-02-28 00:26:20 +00:00
Andrew Bartlett
d62f60f53a Fix possible memory leak on failure.
(This used to be commit 052ebc44cde8d31571ed1edb602794349825be11)
2003-02-27 01:05:12 +00:00
Andrew Bartlett
cee64b5353 Kill RID-only and domain+RID madness from winbind.
Now we deal with SIDs in almost all of winbind (a couple of limited exceptions
remain, but I'm looking into them - they use non-winbind structs ATM).

This has particular benifits in returning out-of-domain SIDs for group
membership (Need to look into this a bit more) as well as general code quality.

This also removes much of the complexity from the idmap interface, which now
only deals with mapping IDs, not with SID->domain translations.

Breifly tested, but needs more.  Fixes some valgrind-found bugs from my
previous commit.

Winbind cache chagned to using SID strings in some places, as I could not
follow exactly how to save and restore multiple packed sids properly.

Andrew Bartlett
(This used to be commit 9247cf08c40f016a924d600ac906cfc6a7016777)
2003-02-26 12:21:01 +00:00
Tim Potter
b906a9df75 Merge from appliance:
>Another hopeful fix for CR#1168.  Change the RPC used in querying
>domain users from QueryDispInfo to EnumDomainUsers.  Hopefully this
>will fix the random dropouts that keep occuring when listing large
>domains.
>
>My thought is that since QueryDispInfo is only used in the NT user
>manager it may have a bug with large domains.  A more commonly used
>RPC may not have such problems.
(This used to be commit 0501b7d0b12fa8063ffe6a9d4ecc3391d0c2f45d)
2003-02-26 00:52:41 +00:00
Andrew Bartlett
589371e1d5 After some comments from tridge, clean the new usergroups code into a helper
function.

Andrew Bartlett
(This used to be commit 212a52b3d2ca39fcea2990f9293754b08e9b68e4)
2003-02-25 05:49:24 +00:00
Andrew Bartlett
f803c32376 Fix a really nasty bug where some users in AD domains (particularly child
domains) would not have the tokenGroups or memberOf attributes filled in.

This would cause a user to have no supplementary group membership.

Detect this by the fact that the primaryGid must be present in the tokenGroups,
and if it isn't (ie, if there is no tokenGroups at all), do a server-side
search on all groups using the 'member' attribute and the user's DN.

Andrew Bartlett
(This used to be commit a074f74e627e1d947a76bcf3a39e3c5df4d4ffe5)
2003-02-25 02:20:46 +00:00
Andrew Bartlett
301ebd6324 Fix a DEBUG() formatting, add some more debug to our SID pulling code and
inline the call to prs_copy_all_data_out() so that we can know we are not
overrunning our buffer.

Also check more return values.

Andrew Bartlett
(This used to be commit e3b73d5d658584428c81c9ef3ccf024687a56e2f)
2003-02-22 00:54:08 +00:00
Jim McDonough
db721d24c5 rename 'winbind backend' to 'idmap backend'. Put paramter in security section...does this make sense?
(This used to be commit 822083f73e8ba4e096c53ff0f7578f47bc21b7b5)
2003-02-21 13:25:10 +00:00
Tim Potter
7eff9dd5ef Fix another compiler warning.
(This used to be commit 1ea27d7987d2c0f67977371a99efec3ded13c872)
2003-02-21 05:06:49 +00:00
Jim McDonough
5bec7f5fca From aliguori@us.ibm.com:
This patch adds the architecture for an IDMAP backend system including a new
smb.conf parameter "winbind backend".  Right now, the only valid value is "tdb"
but I'm currently working on an LDAP backend.
(This used to be commit 35e4448dcb2deb0d5d34d9e974a49f2fb31f1356)
2003-02-20 22:46:37 +00:00
Andrew Bartlett
215ff67a03 for some (very weird) reason, the domain I was testing aginst would not
return a DN for the user.  Make sure we don't segfault.

Andrew Bartlett
(This used to be commit 9fdedeff6a3a9f8e8d048e6afd7001ad676c4e91)
2003-02-20 10:43:21 +00:00
Andrew Bartlett
6540693fea Missed one use of SETENV. (Compat macro no longer needed, as we have a
replace.c function).
(This used to be commit adad4c66fcfe756277de8c325ac9f8010f9d6f9c)
2003-02-19 12:19:52 +00:00
Andrew Bartlett
1f1125577c Move to a in-memory ccache for winbind, and replace setenv() properly.
(According to the manpages, you cannot put a stack variable into putenv()).

Yes, this leaks memory.

Andrew Bartlett
(This used to be commit 50bced1e26434ecc7474964062746e2831e5f433)
2003-02-19 11:33:35 +00:00
Jelmer Vernooij
5eb7b6113b Add -V option (to print out version) to utilities where possible
(pdbedit already has a -V option..)
(This used to be commit 5de622968d95c1436dbd34edc8d0a9bbff68916b)
2003-02-18 18:43:59 +00:00
Martin Pool
5511347b8d Check return code from string_to_sid.
(This used to be commit fe449328b226a33ad1c64e087fe63e79f90ab4ac)
2003-02-18 01:09:19 +00:00
Jeremy Allison
3b257cf500 Patch based on work by Michael Steffens <michael_steffens@hp.com> to wrap
all cm_get_XX calls and their subsequent requests in a retry loop in case
we've temporarily lost connection to the DC. Makes winbindd more reliable.
Jeremy.
(This used to be commit 81f358b632dbf7043d2a716359b0fcf7c647af0a)
2003-02-15 01:34:34 +00:00
Jeremy Allison
4cd6e31bd3 Ensure that only parse_prs.c access internal members of the prs_struct.
Needed to move to disk based i/o later.
Jeremy.
(This used to be commit 4c3ee228fcdb089eaeead95e79532a9cf6cb0de6)
2003-02-14 23:04:03 +00:00
Tim Potter
afb9105c3d Fix for trusted domains scan not working inspired by Ken Cross.
(Sorry - I should have checked this in yesterday but forgot)
(This used to be commit 7420ddcda8e7189cedacb2c60f5ea265b8c35bda)
2003-02-14 00:23:31 +00:00
Andrew Tridgell
0e42cf2460 setup the %U substitution in winbindd for the homedir template
(This used to be commit 6186c10ceb2e61cd684968b56d3f32d9916538f8)
2003-02-12 00:56:14 +00:00
Andrew Bartlett
c2b134cc3b Always escape ldap filter strings. Escaping code was from pam_ldap, but I'm to
blame for the realloc() stuff.

Plus a couple of minor updates to libads.

Andrew Bartlett
(This used to be commit 34b2e558a4b3cfd753339bb228a9799e27ed8170)
2003-02-01 05:20:11 +00:00
Jeremy Allison
351db1e6ee Ensure Luke Howard's (C) is added.
Jeremy.
(This used to be commit 6624fa59d749b0c0d6aacc35b9b6ba2b567d6eb4)
2003-01-31 18:34:12 +00:00
Tim Potter
7634efbfec Use new interface for cli_samr_query_dispinfo().
(This used to be commit d3962da61a5717dda7e99996bbeb4735d4373041)
2003-01-29 06:24:13 +00:00
Jeremy Allison
effbd70c21 Fixed up mutex protection around winbindd logon code. Sync with APP-HEAD.
Jeremy.
(This used to be commit 3d04872499332ef2d8e7479b924afc8fc1ac29d7)
2003-01-16 20:08:33 +00:00
Andrew Bartlett
d92b21280e Updates to the NTLMSSP code again - moving the base64 decode fuctionality out
of the SWAT code, and adding a base64 encoder.

The main purpose of this patch is to add NTLMSSP support to 'ntlm_auth', for
use with Squid.  Unfortunetly the squid side doesn't quite support what we need
yet.

Changes to winbind to get us the info we need, and a couple of consequential
changes/cleanups in the rest of the code.

Andrew Bartlett
(This used to be commit fe50ca8f54ded2e119bde08831785fbe0db2ee99)
2003-01-16 03:29:54 +00:00
Jeremy Allison
1e19c4a609 Add mutex protection around auth calls.
Jeremy.
(This used to be commit af8a5d79682410482646eea075dff2d344d60e31)
2003-01-16 00:27:30 +00:00
Gerald Carter
5fb5950258 small merges from SAMBA_3_0; mostly typos, renames, etc...
(This used to be commit 9ac196dad4893b0ceef13281a140be5d85391e6c)
2003-01-15 18:31:46 +00:00
Tim Potter
d1a0cc342f Remove wrapper function _get_trust_account_password() as it doesn't
seem to do anything useful anymore other than call
secrets_fetch_trust_account_password().
(This used to be commit 7b0c03cbf1376f82b0bb5f4cf86e2db3b0bc1dec)
2003-01-14 05:08:42 +00:00
Tim Potter
4c617a3746 Added a comment in case anyone is thinking of doing a SMB_ASSERT in winbindd.
(This used to be commit c64e2308bae31d48171685b3b67b8cace1b003b5)
2003-01-14 04:04:13 +00:00
Tim Potter
cf17d012e6 Merge of remove "winbindd holding pattern" from appliance. It's a bit
simpler as the rescanning of trusted domains helps us out a bit.
(This used to be commit 089729c02cb2088e85f0e7f8ec79afb58fe98be7)
2003-01-13 03:45:31 +00:00
Andrew Bartlett
f9d66d10c2 Return the 'freindly' NT error message if at all possible.
Andrew Bartlett
(This used to be commit 90d05176534cfd97ed3827bddfeb3a0cb7f22683)
2003-01-11 03:25:31 +00:00
Martin Pool
413e58e9a7 Correct misleading comment: winbindd_lookupname gets the SID for a
name, not vice versa.
(This used to be commit be835d01e10a75aecfb1b166bc6e0ea796c60cce)
2003-01-09 01:16:12 +00:00
Herb Lewis
3981c303a3 cannot make assignments to const values.
(This used to be commit e3b1e64d9f23347a5ecefeb15329b6ec8971a55e)
2003-01-07 17:43:37 +00:00
Jeremy Allison
cd02d53f0d Fix from "Ken Cross" <kcross@nssolutions.com> for enumerating
groups.
Jeremy.
(This used to be commit cde517cedf3521b815faf2bdaf7940a611a28650)
2003-01-06 07:29:34 +00:00
Gerald Carter
df4af79c78 patch to include support for daemontools from Michael Handler
(This used to be commit 4c48c475a28450ad4fd8dcc8263e841c0c39a80e)
2003-01-03 17:32:11 +00:00
Andrew Bartlett
81c6415aa1 Becouse these functions return a size_t, they can't return negitive numbers.
So a < 0 check is pointless, instead check against -1, which will be cast to
unsigned.

Andrew Bartlett
(This used to be commit c7e5797a95804d5779cdfc93795adcdf2fe82a59)
2003-01-02 13:01:44 +00:00
Andrew Bartlett
6d66fb308a BIG patch...
This patch makes Samba compile cleanly with -Wwrite-strings.
 - That is, all string literals are marked as 'const'.  These strings are
always read only, this just marks them as such for passing to other functions.

What is most supprising is that I didn't need to change more than a few lines of code (all
in 'net', which got a small cleanup of net.h and extern variables).  The rest
is just adding a lot of 'const'.

As far as I can tell, I have not added any new warnings - apart from making all
of tdbutil.c's function const (so they warn for adding that const string to
struct).

Andrew Bartlett
(This used to be commit 92a777d0eaa4fb3a1c7835816f93c6bdd456816d)
2003-01-02 09:07:17 +00:00
Jeremy Allison
7f23546730 Forward port the change to talloc_init() to make all talloc contexts
named. Ensure we can query them.
Jeremy.
(This used to be commit 842e08e52a665ae678eea239759bb2de1a0d7b33)
2002-12-20 20:23:06 +00:00
Gerald Carter
f6c4f25e43 merge of get_dc_name()-like code from APP_HEAD; better support password server = DC1 *
(This used to be commit 6b18ca9511ddcf1718f222af3f61491d1e5f3b60)
2002-12-12 23:35:55 +00:00
Andrew Bartlett
8f84d170af Remove extra headers, and ensure that we correctly bail out of winbindd if we
can't create the socket.

Andrew Bartlett
(This used to be commit 13b9af53bff8e42126a38f93c3bdd5b4d9b20aba)
2002-12-01 03:14:30 +00:00
Andrew Bartlett
8963cf1e58 After consultation with tpot, remove the 'winbind_domain' environment
variable hack, the feild on the pipe, and the server-side.

It only controlled some enum operations in any case.

This is to try and have less 'magic' environment variables.

Andrew Bartlett
(This used to be commit e4be82e4e2c7cdf15f3e20f73fe9f281f6384423)
2002-11-26 12:04:16 +00:00
Andrew Bartlett
65643516d7 Having waited for *way* too long, this is mimir's namecache and trusted domain
cache code.

This uses gencache, mimir's new caching code that stores at text-based cache
of various data.

Mimir has done a *lot* of work on this patch, and it is finally time to
get it in CVS.

Andrew Bartlett
(This used to be commit 47f3bfe9564e7f3aff60cefaefd599e0abb30a31)
2002-11-26 11:57:30 +00:00
Gerald Carter
191dff2d27 [merge from APP_HEAD]
90% fix for CR 1076.  The password server parameter will no take things
like

        password server = DC1 *

which means to contact DC1 first and the go to auto lookup if it
fails.


jerry
(This used to be commit c31a17889e3e4daf7c1e807038efc2c0fba78be3)
2002-11-23 14:27:56 +00:00
Tim Potter
ce93216c93 Bug fix from appliance - we must initialise the winbindd server state
before reading smb.conf parameters, not after.
(This used to be commit 2beebe252f8fc76366d38024b0578f83d8542d1d)
2002-11-18 22:46:45 +00:00