1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

666 Commits

Author SHA1 Message Date
Andrew Bartlett
c0b7ee6ee5 Add 'net rpc join' to match the ADS equiv.
This kills off the offending code in smbpasswd -j -Uab%c

In the process we have changed from unsing compelatly random passwords
to random, 15 char ascii strings.  While this does produce a decrese in
entropy, it is still vastly greater than we need, considering the application.

In the meantime this allows us to actually *type* the machine account
password duruign debugging.

This code also adds a 'check' step to the join, confirming that the
stored password does indeed do somthing of value :-)

Andrew Bartlett
-
Andrew Bartlett
0692d792f2 Fix up funtion name, as this finds local, not domain master browsers.
(as per tridge's instructions)
-
Tim Potter
9f5d7e8a04 Added error message for ERRdiskfull. -
Andrew Tridgell
c7665706cd when using non-encrypted password ignore the ntpass variable to
session setup
-
Andrew Tridgell
359ca8f246 const religion -
Andrew Bartlett
eee925861a This change reworkes the connection code for both rpcclient and net new
'net' untility.

This should make it easier to port rpcclient code across to net.

It also allows SPNEGO (the NTLMSSP subsystem in particular) to work, becouse
it kills off the early destruction of the clear-text password.

Andrew Bartlett
-
Jean-François Micouleau
06cb20a46d added queryuseraliases to rpcclient
and some comments to the samr server code, to explain what we should
return here.

	J.F.
-
Jean-François Micouleau
d8809c5861 added samr_query_sec_obj for rpcclient
J.F.
-
Tim Potter
4215048f7b I think the lookup_pdc_name() should be called lookup_dc_name() and the
name_status_find() call here should look up a #1c name instead of #1d.
This fixes some bugs currently with BDC authentication in winbindd and in
smbd as you can't query the #1d name with the ip address of a BDC.

Who is Uncle Tom Cobbley anyway?
-
Andrew Tridgell
23ef22f117 fixed some krb5 ifdefs -
Andrew Tridgell
e790bb21d3 fixed a core dump in server level security -
Andrew Tridgell
e2ba2383c9 fix a bunch of places where we can double-free a cli structure -
Jeremy Allison
39f076b56c Cross merge to make 2.2 and HEAD closer.
Jeremy.
-
Richard Sharpe
6e2c06a6e6 Fix another memory leak spotted by Tom Jansen. -
Andrew Tridgell
1976a8f875 prevent a bogus insure wild ptr message -
Andrew Tridgell
911c57403b prevent a memory leak of cli structures -
Andrew Tridgell
e3698259af increment the value not the pointer -
Andrew Bartlett
6a919bcf3d Fix --enable-developer shadow warning -
Tim Potter
778f5f77a6 Got medieval on another pointless extern. Removed extern struct ipzero
and replaced with two functions:

	void zero_ip(struct in_adder *ip);
	BOOL is_zero_ip(struct in_addr ip);
-
Andrew Bartlett
6caca4301b And delete domain_client_validate.c...
Andrew Bartlett
-
Andrew Tridgell
5100ae4ae0 use DEBUG() not d_printf() in libraries -
Jeremy Allison
4aca67761f Use "password server" for searching for BDC's also as Tim suggested.
Jeremy.
-
Andrew Bartlett
adc7a6048c Add a new torture test to extract a NT->DOS error map from an NT member of a
samba domain.

The PDC must be running a special authenticaion module that spits out NT errors
based on username.

Andrew Bartlett
-
Andrew Tridgell
058a5aee90 added "net join" command
this completes the first stage of the smbd ADS support
-
Andrew Bartlett
8d31eae52a This is another rather major change to the samba authenticaion
subystem.

The particular aim is to modularized the interface - so that we
can have arbitrary password back-ends.

This code adds one such back-end, a 'winbind' module to authenticate
against the winbind_auth_crap functionality.  While fully-functional
this code is mainly useful as a demonstration, because we don't get
back the info3 as we would for direct ntdomain authentication.

This commit introduced the new 'auth methods' parameter, in the
spirit of the 'auth order' discussed on the lists.  It is renamed
because not all the methods may be consulted, even if previous
methods fail - they may not have a suitable challenge for example.

Also, we have a 'local' authentication method, for old-style
'unix if plaintext, sam if encrypted' authentication and a
'guest' module to handle guest logins in a single place.

While this current design is not ideal, I feel that it does
provide a better infrastructure than the current design, and can
be built upon.

The following parameters have changed:
 - use rhosts =

  This has been replaced by the 'rhosts' authentication method,
 and can be specified like 'auth methods = guest rhosts'

 - hosts equiv =

  This needs both this parameter and an 'auth methods' entry
  to be effective.  (auth methods = guest hostsequiv ....)

 - plaintext to smbpasswd =

  This is replaced by specifying 'sam' rather than 'local'
  in the auth methods.

The security = parameter is unchanged, and now provides defaults
for the 'auth methods' parameter.

The available auth methods are:

guest
rhosts
hostsequiv
sam (passdb direct hash access)
unix (PAM, crypt() etc)
local (the combination of the above, based on encryption)
smbserver (old security=server)
ntdomain (old security=domain)
winbind (use winbind to cache DC connections)


Assistance in testing, or the production of new and interesting
authentication modules is always appreciated.

Andrew Bartlett
-
Jean-François Micouleau
1748d5a2af added lsaenumprivsaccount and lsalookupprivvalue to rpcclient
and more to come ...

	J.F.
-
Jean-François Micouleau
f29774e589 Changed how the privileges are stored in the group mapping code. It's now
an array of uint32. That's not perfect but that's better.

Added more privileges too.

Changed the local_lookup_rid/name functions in passdb.c to check if the
group is mapped. Makes the LSA rpc calls return correct groups

Corrected the return code in the LSA server code enum_sids.

Only enumerate well known aliases if they are mapped to real unix groups.
Won't confuse user seeing groups not available.

Added a short/long view to smbgroupedit.

now decoding rpc calls to add/remove privileges to sid.

        J.F.
-
Andrew Bartlett
f199e95182 Update some of the error mapping, based on on-the-wire observations of an NT4 server.
This lets our Win9X clients give sane error messages when you get passwords wrong
and the like.

Andrew Bartlett
-
Tim Potter
80dca2c9e4 Finally worked out why a enumerate trusted domains was returning a
NT_STATUS_UNABLE_TO_FREE_VM error.  This error code was mis-defined
as 0x8000001a instead of 0xc000001a.  The former is actually a
NT_STATUS_NO_MORE_ENTRIES warning which is what we see in the status
code.

Removed the & 0xffffff from the loop in get_nt_error_msg() as all the
error constants now have the correct high bits set.
-
Tim Potter
6ce1eec09d Added constants and error message for dos error code 1326 (logon failure). -
Jean-François Micouleau
646651018a added lsa_enum_sids to rpcclient
fixed lsa_enum_rpivs server code. This time it works as W2K.
fixed smbgroupedit to compile and work.

	J.F.
-
Tim Potter
d1dee2d032 Removed unused variable. -
Tim Potter
d2034bc5f7 Oops - opening wrong pipe name in cli_lsa_initialise() helper function. -
Jean-François Micouleau
84035ae72f add another command to rpcclient: getdispname. Show the full description
of a privilege.

	J.F.
-
Jean-François Micouleau
fa63cb78e3 add a command to rpcclient: enumprivs
J.F.
-
Jeremy Allison
9f8c644abc Got positive and negative name caching working correctly with lookupname/lookupsid.
There was a bug in cli_lsa_lookup_name/lookup_sid where NT_STATUS_NONE_MAPPED was
being mapped to NT_STATUS_OK, and also the *wrong* number of entries mapped
was being returned. The correct field is mapped_count, *NOT* num_entries.
Jeremy.
-
Jeremy Allison
54c968913d W2K doesn't seem to respond to *#0 names in node status. Ensure name
lookup uses password server parameter when looking for PDCs.
Jeremy.
-
Richard Sharpe
6d7c0f0bb4 One more patch from Tom Jansen. Hope I didn't break the tree :-) -
Andrew Bartlett
a34c07377b Fix up the build again...
Andrew Bartlett
-
Richard Sharpe
7ac404c853 Fix up libsmbclient in head.
Apply the patches from Tom Jansen, get rid of fprintfs and change them to
DEBUGs, etc ...
-
Andrew Tridgell
74303b75e4 add asn1 integer handling ready for the ldap netjoin code -
Andrew Tridgell
618989b386 - make sure we use a non-zero session id so we can have multiple conns
open to w2k

- fix the string handling in the device name to match NT and smbd

- don't pull the domain from negprot if CAP_EXTENDED_SECURITY is set
-
Martin Pool
a779710fff LMHOSTSFILE is now dynamically configured too. -
Richard Sharpe
ac2562a0fb Fix problems with lp_workgroup() being passed to routines that will modify
it and fix smb://<IP-addr>.
-
Jeremy Allison
5e8df83ba9 Tidyup formatting a bit (spaces->tabs) whilst reading new code to understand
connection caching. Getting ready for back-merge to 2.2.3.
Jeremy.
-
Martin Pool
5c892badbc Doxygen demo for Tim. -
Tim Potter
bedd9c8215 Close the socket and set the file descriptor to -1 if there was a socket
error in cli_receive_smb() and cli_send_smb().
-
Jeremy Allison
e6afe40f85 Removed the "reestablish" code. Tridge - scream if this was needed....
Jeremy.
-
Andrew Bartlett
80667cb0dd Minor updates. A small dose of const. -
Steve French
3fd96a4754 Add function to add those hosts who have added msbrowse (domain master browsers) -