1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-15 23:24:37 +03:00

9195 Commits

Author SHA1 Message Date
Andrew Bartlett
ab0ca0f0b2 Patch from Steve Langasek <vorlon@netexpress.net> to split up our -l
dependencies.  This benifits packagers (like debian) becouse then our client
code won't have references to 'server only' libraries.

(In particular, it removes the client dependency on CUPS, which was raised in
a debian bug report).

Andrew Bartlett
(This used to be commit d5f2e33b34fe0e67153894b6bf582b7eaca40e7f)
2002-08-07 09:51:59 +00:00
Andrew Bartlett
7a0af712b0 Add 'const' to the function prototypes to match the recent commit.
(This used to be commit 0118e459b603a991f23d48cfd7f5e68c4374f950)
2002-08-07 07:46:01 +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 122cf648d7f364c68ecb7a576a42e94a954e9e56)
2002-08-07 07:28:24 +00:00
Andrew Bartlett
a51897cf9b Add const to a pile of const to *DOM_SID paramaters.
Andrew Bartlett
(This used to be commit fd0ebf976eb6e5fc25bc75ff471c69c3f3761e32)
2002-08-07 07:22:43 +00:00
Jim McDonough
6f1245822e Ooops...forgot to put this in with the new nmbd samlogon response code.
THis should fix the build.
(This used to be commit ef984b99614c07ef5934849a9ad85190b636d421)
2002-08-06 19:52:43 +00:00
Jim McDonough
6cfff280d8 Add AD version of samlogon replies for getdc. ATM it will only function
if you have an ADS DC.
(This used to be commit 059a352ebb7c7286d205bc86a92f5fd26ab1ff8e)
2002-08-06 18:16:28 +00:00
Jim McDonough
5e42dcfe46 Add SAMR 0x3e, which is samr_connect4. Seems to be the same as our
existing connect (which I've been told is really connect2), with one
extra dword.  We've only seen 0x00000002 there...
(This used to be commit 266344634944dff30f56453f9d86c490e7ac7a55)
2002-08-06 18:02:56 +00:00
Andrew Bartlett
f23d88ab78 Try to bind with LDAPv3 if possible.
Andrew Bartlett
(This used to be commit 0e420878f26bdd19b5defb78a5fe4c31662ec941)
2002-08-06 11:48:17 +00:00
Andrew Bartlett
9542ef87c0 Back out idra's change (at his request) - the values in the tdb *should* be
upper cased already.

However, if you created your registry tdb in the very early versions of jerry's
patch, you could find that usrmgr doesn't function.  Simply delete the
registry.tdb, it will be recreated on startup.

Andrew Bartlett
(This used to be commit 17136a88c326bf338f948a67c92bb048c5a148af)
2002-08-06 10:10:54 +00:00
Andrew Tridgell
db20fa5d4e fixed 'net ads chostpass' for new ads structures
(This used to be commit 3b0e60e522b669bad77e70d9c6f484a08ff84612)
2002-08-06 10:01:38 +00:00
Andrew Tridgell
4361b5cea5 when using netbios lookup methods make sure we try any BDCs even if
we get a response from WINS for a PDC, if the PDC isn't responding.
(This used to be commit 57916316ffc70b0b6659f3ad9d14aad41fad4c71)
2002-08-06 05:11:57 +00:00
Andrew Tridgell
74c8441e9d fixed a memory corruption bug in ads_try_dns()
(This used to be commit 2ee0abb50f25e5a4529d8c9409c979a7a00e5984)
2002-08-06 03:26:58 +00:00
Tim Potter
269c713edf Compile fix for new cli_lsa_enum_trust_dom() argument list.
(This used to be commit 2f46bdeb4fa1d32fe948af5d7fa80480ff2d2c86)
2002-08-06 01:07:07 +00:00
Andrew Tridgell
4da476001e fixed a memory corruption bug in the wins code
(This used to be commit 3f6ca04003172c22d02111f2170ad60f0d7936d9)
2002-08-06 00:56:39 +00:00
Andrew Tridgell
cded51d936 added 'net rpc testjoin' and 'net ads testjoin' commands
unfortuately we don't seem to be able to auto-test the ADS join due to
a rather nasty property of the GSSAPI library.
(This used to be commit 87c34a974a91e940bd26078a68dd84f4341d6913)
2002-08-05 14:11:50 +00:00
Tim Potter
ff2132e1b3 Spelling fix.
(This used to be commit 28ba237a9e02e284fb541562270db758612e425a)
2002-08-05 06:28:58 +00:00
Andrew Tridgell
e04c25b406 fixed wbinfo -t for netbiosless domains
(This used to be commit 68e70b000b273ba72206c87ad1efd6efc2c7c487)
2002-08-05 05:04:13 +00:00
Andrew Bartlett
b0565dac76 I must have missed this when I was adding 'const' to these earlier...
Andrew Bartlett
(This used to be commit ce6c8a647ca56dcbb60ff898d77c2df297c1fe79)
2002-08-05 03:43:26 +00:00
Andrew Bartlett
b745d8b1cd Try to make this easier to debug - display the username that failed.
Andrew Bartlett
(This used to be commit 8405bccd4e7a5315e58890ffa5d481031636f88a)
2002-08-05 03:27:04 +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 e358d7b24c86a46d8c361b9e32a25d4f71a6dc00)
2002-08-05 02:47:46 +00:00
Simo Sorce
dd93ff381d passwords where not checked (you cannot check if the same buffer differs from itself).
they where alo not clean after use!

Simo.
(This used to be commit 5a257096e9afdcd1dea863dff43952457a74a9f1)
2002-08-04 15:40:39 +00:00
Simo Sorce
918e681894 commented out strupper before key check against internal db, it's no good
to check for uppercased strings when we store them not uppercased.

jerry, this fix is needed to make usrmgr.exe work again.
meanwhile we found out that NT_STATUS code may not be appropriate there.
In particular it seem that an NT PDC will send back 02 as error
(ERRbadfile) not 0xc000000f (NT_STATUS_NO_SUCH_FILE NT)

I think further investigation is need to understand which are aprropriate
return codes here.
(This used to be commit 2ad0e81c8da62b7e15ab3e414b5e15a94fe5de87)
2002-08-04 14:25:32 +00:00
Andrew Bartlett
056f849f0c Now that I got the function arguments sane, remove the silly (void **) casts
from some of the callers.

Andrew Bartlett
(This used to be commit eb3354aa6c7293df9a728565a6774049b2e6d57f)
2002-08-04 01:16:37 +00:00
Andrew Tridgell
c7597b144a fixed a bug where we were truncating the returned names in a netbios
name status query to 14 bytes, so we could not join a DC who had a
netbios name of 15 bytes in length.
(This used to be commit a7588f21c24dac833f098c48e2337c100cf75ba4)
2002-08-03 01:55:44 +00:00
Simo Sorce
65608eb587 updates the log level parameter man section
can someone regenerate and commit the other formats?
thanks
(This used to be commit cfc03b9257feeec1ae4b4cbf19d5ddcdabade133)
2002-08-03 01:20:42 +00:00
Simo Sorce
595145337e fix log level, set a default, and also copy the value set in smb.conf into parm_struct.ptr
this one also fixes log level not shown in swat
fix swat help system
(This used to be commit 7532e828966f3baaa418b528a5b7fe450c488401)
2002-08-03 01:11:16 +00:00
Jim McDonough
60078160de Fix length on mailslots. Looks like it should have been 0x17, not decimal 17.
(This used to be commit 8e906a948196be7d630a9b20f3c3d2cbafd545f1)
2002-08-02 17:44:02 +00:00
Jelmer Vernooij
4d98ca211e Escape ampersand(&) to better comply to SGML syntax
(This used to be commit d234f04a5f3ecd4debf66ce80e76f6b9aedaed6c)
2002-08-02 10:53:40 +00:00
Tim Potter
e9360f1a45 Moved rpc client routines from libsmb back to rpc_client where they belong.
(This used to be commit cb946b5dadf3cfd21bf584437c6a8e9425f6d5a7)
2002-08-02 07:20:56 +00:00
Tim Potter
598d62bd53 Added connect, session_request, session_setup and tconx methods.
(This used to be commit 76eacaa28546d65b9ddb7ff356f0bd2aaf2f86d8)
2002-08-02 05:35:09 +00:00
Tim Potter
81a4862ae7 Broke out unpacking of a username/password stored in a Python
dictionary into a separate function.
(This used to be commit 10889241d5f5813f499501a45edccc4acd3e9f74)
2002-08-02 05:28:54 +00:00
Tim Potter
0efda5cc21 Merge of print notify fixes from APPLIANCE_HEAD.
(This used to be commit 7bf9ca6ca36fa319a57eab05567d49a003237bb5)
2002-08-02 03:57:40 +00:00
Tim Potter
dcb4aec627 Fixed compiler warning.
(This used to be commit 81322f4d63095d828be7983eb4b47775abe8d33f)
2002-08-01 23:14:48 +00:00
Andrew Tridgell
a4e3bdbbee make sure we null terminate plaintext passwords
(This used to be commit cf2abf677ed9942d841ef61ffb2565244c8979ac)
2002-08-01 03:38:21 +00:00
Gerald Carter
c4d68a29c9 merge from SAMBA_2_2
(This used to be commit 72d36c9b2596cda6c3c25c18ddb4c58d55519ff8)
2002-07-31 14:56:40 +00:00
Simo Sorce
255288df65 forgot to change the makefile system, sorry
(This used to be commit 3e6a11f56a3878e75c4354db214971208d911be3)
2002-07-31 13:16:14 +00:00
Andrew Bartlett
70eaa4233f Add the current working document on the interface to the tree that we have
*somthing* in the directory.  (Stops cvs update -P eating it).

This is the combined effort of many from #samba-technical, kai, metze,
ctrlsoft, idra and abartlet in particular.  It will no doubt change :-)

Andrew Bartlett
(This used to be commit 40fc43296def1f5ac3c23aba8b283a91f1d10239)
2002-07-31 12:53:56 +00:00
Andrew Bartlett
640e1dd446 Let everybody enjoy my new toy - make it the default!
Authenticaions will now attempt to use winbind, and only fall back to
'ntdomain' (the old security=domain) code if that fails (for any reason,
including wrong password).

I'll fix up the authenticaion code to better handle the different types of
failures in the near future.

Andrew Bartlett
(This used to be commit 78f0d4337bd263d26d7b349eaf8148e863c62f69)
2002-07-31 12:17:32 +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 167f122b670d4ef67d78e6f79a2bae3f6e8d67df)
2002-07-31 12:05:30 +00:00
Andrew Bartlett
2307a6f504 Rework parinioa to ensure we never get passwords longer than MAX_PASS_LEN, nor
longer than the buffer they claim to be in.

Many thanks to tridge for explaining the macros.

Andrew Bartlett
(This used to be commit 3efd462bf2f1ed50c108c2b8ddecc461d002745d)
2002-07-31 11:57:56 +00:00
Andrew Tridgell
f5a85fe247 fixed the length checking for plaintext passwords (thanks to andrewb
for spotting this)
(This used to be commit d4c905e5a0a67c8e01a4fcf78aa992a3b7beff02)
2002-07-31 10:47:26 +00:00
Andrew Bartlett
6be547fc6b Don't accidenity mess with the wrong domain's sids.
(This used to be commit 0e2207c9c1ce573098f764e85a65c17cc1f1d284)
2002-07-31 10:12:52 +00:00
Andrew Bartlett
2dfdf744c0 fix debug, at idra's suggestion.
Andrew Bartlett
(This used to be commit bc17b91c2f1a1df58614b67bff94f228be6b9bb2)
2002-07-31 10:11:03 +00:00
Andrew Bartlett
c3c5347601 Only allow 'security=ads' when we HAVE_ADS.
Andrew Bartlett
(This used to be commit f77335b6f86c736e72b66eab6a2aee046ddbee41)
2002-07-31 10:07:35 +00:00
Andrew Tridgell
d7f77b5a65 support netbiosless search for the DC using ADS in the winbindd AUTH
code.
(This used to be commit 3929532e3bfb98b925d73d331c8cbb319fdc8b9a)
2002-07-31 09:36:05 +00:00
Andrew Tridgell
76fb289cd8 fixed multi-line strings for portability
(This used to be commit 9f9e0cbd2c9920b730286f8bf560dc3415c29aa6)
2002-07-31 09:34:00 +00:00
Andrew Tridgell
ab0b4e6f58 make sure we zero the unusued elements in a SID when parsing
(This used to be commit aa5beb63f1b1133c4ad28118ddd33e21198d79bb)
2002-07-31 09:32:45 +00:00
Andrew Tridgell
dcff12797e added 'disable netbios = yes/no' option, default is no
When this option is disabled we should not do *any* netbios
operations. You should also not start nmbd at all. I have put initial
checks in at the major points we do netbios operations in smbd but
there are bound to be more needed. Right now I've disabled all netbios
name queries, all WINS lookups and node status queries in smbd and
winbindd.

I've been testing this option and the most noticable thing is how much
more responsive things are! wthout those damn netbios timeouts things
certainly are much slicker.
(This used to be commit 12e7953bf2497eeb7c0bc6585d9fe58b3aabc240)
2002-07-31 05:41:51 +00:00
Andrew Tridgell
ce344ad4b7 fixed a net crash bug if we can't find a DC in a 'net rpc' command
(This used to be commit ced5dc4e05badfb07cbae7a2880825b9bad4e68d)
2002-07-31 05:38:53 +00:00
Andrew Tridgell
4516a14dbb added support for smbd listening on port 445 and 139. It now listens
on both by default, and you can specify a list of ports to listen on
either with "smb ports = " in smb.conf or using the -p option to smbd.

this is needed for proper netbiosless operation.
(This used to be commit 5dee0a7b5e0fcb298a9d36661c80e60d8b9bcc3a)
2002-07-31 04:56:16 +00:00