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

434 Commits

Author SHA1 Message Date
cvs2svn Import User
3054ef8a6e This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit 9a5541595f) 2002-09-25 12:59:48 +00:00
Jeremy Allison
f63ed5295a Moved -ve cache check to correct place.
Jeremy.
(This used to be commit 38c67632ad)
2002-09-24 22:56:59 +00:00
Jeremy Allison
fe92e9caed Reverted my earlier change. It was incorrect. We must be protected by
pidfile before doing secrets_init().
Jeremy.
(This used to be commit f8a0e6ad8b)
2002-09-17 20:53:21 +00:00
Jeremy Allison
fa184ea169 Only create the pidfile once we're ready to receive requests.
This allows external programs to correctly synchronise with us.
Jeremy.
(This used to be commit ffb7632d05)
2002-09-17 20:47:59 +00:00
Andrew Tridgell
b33681fc0b Add clock skew handling to our kerberos code. This allows us to cope with
the DC being out of sync with the local machine.
(This used to be commit 0d28d76947)
2002-09-17 12:12:50 +00:00
Jelmer Vernooij
479e82b8d8 Put unixsocket calls between #ifdef HAVE_UNIXSOCKET's - required for Stratus VOS
(Double checked)
(This used to be commit dc3c14fc2b)
2002-09-15 17:49:53 +00:00
Tim Potter
21a738b8d0 Merge undone cleanups.
(This used to be commit d87c1f507d)
2002-09-12 05:39:55 +00:00
Tim Potter
a9b450cba8 Merge of winbind auth cleanups from appliance.
(This used to be commit 26d486aa74)
2002-09-12 04:30:23 +00:00
Tim Potter
b060593287 Merge of cut&paste fix from appliance.
(This used to be commit f75d61b03a)
2002-09-12 01:44:53 +00:00
Tim Potter
bb6d5bfce2 Spelling fix.
(This used to be commit d9fa865e5c)
2002-09-12 01:25:50 +00:00
Tim Potter
6b694ec39c Put pid number in invalid request size debug.
(This used to be commit e63afabf98)
2002-09-11 03:57:19 +00:00
Tim Potter
7c152afe16 Bugfix merge:
>Initialise user_rid value in WINBIND_USERINFO structure returned by
>the rpc version of query_user().  This fixes a caching bug found by
>Gavrie Philipson from disksite.
(This used to be commit 77bde1fa33)
2002-09-11 03:53:41 +00:00
Andrew Bartlett
8352336ad0 This is the 'main' inclue for for winbind clients - all clients should include
only this file, and not any others.  It includes the function prototypes.
(Forgot to commit with earlier patch)

Andrew Bartlett
(This used to be commit 3ec3861445)
2002-09-07 09:25:36 +00:00
Andrew Bartlett
9378cbb019 Don't leak file desciptors in this (impossible?) error case.
(This used to be commit b440418f13)
2002-09-07 06:04:28 +00:00
Andrew Bartlett
885f4f9379 Winbind client-side cleanups.
The global winbind file descriptor can cause havoc in some situations -
particulary when it becomes 0, 1 or 2.  This patch (based on some very nice
work by Hannes Schmidt <mail@schmidt-net.via.t-online.de>) starts to recitfy
the problem by ensuring that the close-on-exec flag is set, and that we move
above 3 in the file descriptor table.

I've also decided that the PAM module can close it's pipe handle on every
request - this isn't performance-critical code.

The next step is to do the same for nss_winbind.  (But things like getent()
might get in our way there).

This also cleans up some function prototypes, puts them in just one place.

Andrew Bartlett
(This used to be commit 442eb39657)
2002-09-07 05:41:23 +00:00
Andrew Bartlett
eec38ee3bb Patch from "Stefan (metze) Metzmacher" <metze@metzemix.de>
to extend the ADS_STATUS system to include NTSTATUS, and to provide a better
general infrustructure for his sam_ads work.

I've also added some extra failure mode DEBUG()s to parts of the code.

NOTE:  The ADS_ERR_OK() macro is rather sensitive to braketing issues - without
the final set of brakets, the test is essentially inverted - causing some
intersting 'error = success' messages...

Andrew Bartlett
(This used to be commit 5b9a7ab901)
2002-09-06 11:46:59 +00:00
Tim Potter
abff9f492a Quietened some debugs.
(This used to be commit ea26b3e8ef)
2002-09-04 02:57:16 +00:00
Jean-François Micouleau
cfb5e91178 added cli_net_auth_3 client code.
changed cli_nt_setup_creds() to call cli_net_auth_2 or cli_net_auth_3 based on a switch.
pass also the negociation flags all the way.
all the places calling cli_nt_setup_creds() are still using cli_net_aut2(), it's just for future use and for rpcclient.

in the future we will be able to call auth_2 or auth_3 as we want.

	J.F.
(This used to be commit 4d38caca40)
2002-08-30 10:46:59 +00:00
Andrew Tridgell
b2ee64955a fix connecting to a BDC when the PDC is down but in WINS and no bcast
can be used to find a BDC

2nd try ....
(This used to be commit f757223ebe)
2002-08-29 23:23:42 +00:00
Andrew Tridgell
36df325533 fix connecting to a BDC when the PDC is down but in WINS and no bcast
can be used to find a BDC
(This used to be commit e95d8e2c9e)
2002-08-29 23:16:45 +00:00
Jelmer Vernooij
1ddc80f1b9 Use popt for --help
(This used to be commit 073106ad25)
2002-08-29 16:36:37 +00:00
Tim Potter
4896421e30 Fix typo in debug.
(This used to be commit 86433a3492)
2002-08-27 19:43:19 +00:00
Tim Potter
55315b4b4e Moved calculation of secure channel type into a new function.
(This used to be commit b8dba26978)
2002-08-23 13:38:00 +00:00
Jelmer Vernooij
d3aa76cef5 Patch from Paul Green <Paul.Green@stratus.com> to be more POSIX-compatible
(This used to be commit addf29e676)
2002-08-21 19:59:23 +00:00
Andrew Tridgell
d86b5fff06 be a bit more paranoid about not getting duplicate domain names (can
happen when the LDAP call to get the flatname for the primary domain
fails)
(This used to be commit 8d40f34e2f)
2002-08-18 15:46:03 +00:00
Jelmer Vernooij
b2edf254ed sync 3.0 branch with head
(This used to be commit 3928578b52)
2002-08-17 17:00:51 +00:00
Andrew Bartlett
22404245b4 Becouse of changes to the meaning of this feild over time, this doesn't
actually work.  Also, the idea of 'loopback winbind' isn't that bad an idea
anyway (potential PDC/BDC applications).

Given all that, remove it...

Andrew Bartlett
(This used to be commit fc0d6e53fc)
2002-08-17 05:26:58 +00:00
Tim Potter
88d321becd Merge of netbios namecache code from APPLIANCE_HEAD.
Tridge suggested a generic caching mechanism for Samba to avoid the
proliferation of little cache files hanging around limpet like in the
locks directory.  Someone should probably implement this at some
stage.
(This used to be commit dad31483b3)
2002-08-16 00:25:48 +00:00
Andrew Bartlett
39d575d68e Add some more const :-)
This also makes it a easier to see which paramaters are 'in', and which are
'out'.

Andrew Bartlett
(This used to be commit 122cf648d7)
2002-08-07 07:28:24 +00:00
Andrew Tridgell
e04c25b406 fixed wbinfo -t for netbiosless domains
(This used to be commit 68e70b000b)
2002-08-05 05:04:13 +00:00
Andrew Tridgell
ab9ff0fa73 This fixes a number of ADS problems, particularly with netbiosless
setups.

- split up the ads structure into logical pieces. This makes it much
  easier to keep things like the authentication realm and the server
  realm separate (they can be different).

- allow ads callers to specify that no sasl bind should be performed
(used by "net ads info" for example)

- fix an error with handing ADS_ERROR_SYSTEM() when errno is 0

- completely rewrote the code for finding the LDAP server. Now try DNS
  methods first, and try all DNS servers returned from the SRV DNS
  query, sorted by closeness to our interfaces (using the same sort code
  as we use in replies from WINS servers). This allows us to cope with
  ADS DCs that are down, and ensures we don't pick one that is on the
  other side of the country unless absolutely necessary.

- recognise dnsRecords as binary when displaying them

- cope with the realm not being configured in smb.conf (work it out
  from the LDAP server)

- look at the trustDirection when looking up trusted domains and don't
  include trusts that trust our domains but we don't trust
  theirs.

- use LDAP to query the alternate (netbios) name for a realm, and make
  sure that both and long and short forms of the name are accepted by
  winbindd. Use the short form by default for listing users/groups.

- rescan the list of trusted domains every 5 minutes in case new trust
  relationships are added while winbindd is running

- include transient trust relationships (ie. C trusts B, B trusts A,
  so C trusts A) in winbindd.

- don't do a gratuituous node status lookup when finding an ADS DC (we
  don't need it and it could fail)

- remove unused sid_to_distinguished_name function

- make sure we find the allternate name of our primary domain when
  operating with a netbiosless ADS DC (using LDAP to do the lookup)

- fixed the rpc trusted domain enumeration to support up to approx
  2000 trusted domains (the old limit was 3)

- use the IP for the remote_machine (%m) macro when the client doesn't
  supply us with a name via a netbios session request (eg. port 445)

- if the client uses SPNEGO then use the machine name from the SPNEGO
  auth packet for remote_machine (%m) macro

- add new 'net ads workgroup' command to find the netbios workgroup
  name for a realm
(This used to be commit e358d7b24c)
2002-08-05 02:47:46 +00:00
Andrew Bartlett
2d67a683b7 Winbind updates!
This updates the 'winbind' authentication module and winbind's 'PAM' (actually
netlogon) code to allow smbd to cache connections to the DC.

This is particulary relevent when we need mutex locks already - there is no
parallelism to be gained anyway.

The winbind code authenticates the user, and if successful, passes back the
'info3' struct describing the user.  smbd then interprets that in exactly the
same way as an 'ntdomain' logon.

Also, add parinoia to winbind about null termination.

Andrew Bartlett
(This used to be commit 167f122b67)
2002-07-31 12:05:30 +00:00
Andrew Tridgell
d7f77b5a65 support netbiosless search for the DC using ADS in the winbindd AUTH
code.
(This used to be commit 3929532e3b)
2002-07-31 09:36:05 +00:00
Tim Potter
58fa0ad55a Fixed for memory leak in connection caching code when a dc is
permanently down.   Found by Dan Coppock.
(This used to be commit 13c0cc830e)
2002-07-30 01:06:20 +00:00
Andrew Bartlett
fc6ae0994d Add another message rather than 'internal module error'
Andrew Bartlett
(This used to be commit e09c4bd69a)
2002-07-24 03:13:43 +00:00
Andrew Bartlett
afb7d1dc48 Another smattering of static and const
(This used to be commit 897cc4a610)
2002-07-21 03:26:10 +00:00
Tim Potter
0357388636 Renamed all the new_cli_netlogon_* functions to cli_netlogon_*
as they're no longer new!
(This used to be commit 277f6bbb9a)
2002-07-21 00:49:16 +00:00
Andrew Bartlett
4815976435 Compilers do find bugs :-)
This was a mixup between the enum type NSS_STATUS and a BOOL (extra test for
equality).

Andrew Bartlett
(This used to be commit 63b7820b65)
2002-07-21 00:00:22 +00:00
Andrew Bartlett
ea9d3057e9 Try to fix up warnings - particularly on the IRIX 64 bit compiler (which had a
distinction between uchar and char).

Lots of const etc.

Andrew Bartlett
(This used to be commit 8196ee908e)
2002-07-20 11:58:06 +00:00
Andrew Tridgell
b0b28531c8 more bug updates from head
(This used to be commit 8b769bf5bb)
2002-07-15 11:16:26 +00:00
Andrew Tridgell
159118de5c fixed a number of real bugs found by warnings on the 64 bit irix compiler
(This used to be commit 04de6bbc80)
2002-07-15 10:54:35 +00:00
Andrew Tridgell
e90b652848 updated the 3.0 branch from the head branch - ready for alpha18
(This used to be commit 03ac082dcb)
2002-07-15 10:35:28 +00:00
Andrew Tridgell
4dd9357dd5 after thinking about the env variable hack for avoiding group membership
enumeration I realised it could be a security hole for setuid progs.

This adds a proper nss function instead.
(This used to be commit c7c49d87af)
2002-07-14 23:45:55 +00:00
cvs2svn Import User
ec167dc9cc This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to be commit b8d39651fb) 2002-07-14 22:15:21 +00:00
Andrew Tridgell
13157d1494 this is a trick to work around the fact that posix does not supply
a getgr*() function that lists groups without numerating all the
group members. Instead of definiing a new nss method (which might
cause problems) I added an environment variable WINBIND_GETGRLST
that tells winbind not to fill in the group members in a gergrent()
request. This can speed up group listing by a factor of 20 or more
(on my test system with 50000 groups it reduces the time from an hour
to 2 minutes)
(This used to be commit e3f73256d3)
2002-07-14 22:15:20 +00:00
Andrew Bartlett
35150ef8b5 I just noticed that I never added my copyright when I messed with this
previously.  Fix that.

Andrew Bartlett
(This used to be commit c552910477)
2002-07-13 09:11:20 +00:00
Tim Potter
e4722d2fcb Usage fixes from APPLIANCE_HEAD.
(This used to be commit 952d722a3b)
2002-07-11 23:11:42 +00:00
Tim Potter
2dc9d4cfa1 Merge of init_domain_list() fix from APPLIANCE_HEAD.
(This used to be commit 66c9cab369)
2002-07-11 17:31:49 +00:00
Andrew Tridgell
5d82785756 this implements a completely new strategy for fetching group
membership from an ADS server. We now use a 'member' query on the
group and do a separate call to convert the resulting distinguished
name to a name, rid etc. This is *much* faster for very large numbers
of groups (on a quantum test system with 10000 groups it drops the
time from an hour to about 35 seconds).

strangely enough, this actually *increases* the amount of ldap
traffic, its just that the MS LDAP server answers these queries much
faster.
(This used to be commit 5538048e4f)
2002-07-11 05:28:08 +00:00
Andrew Bartlett
0df1e25542 Kill off codepage related stuff, now we don't use codepages any more.
Andrew Bartlett
(This used to be commit d1ca2b9f23)
2002-07-03 00:44:39 +00:00