1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-14 19:24:43 +03:00

691 Commits

Author SHA1 Message Date
Andrew Bartlett
ef40945a5b Add a specialised version of tpot's libsmb samlogon code for use with
presupplied challange-response pairs, and only using the 'network' version.

This will be used to move the auth subsystem over to a libsmb (rather than
rpc_client) base.

Andrew Bartlett
(This used to be commit fe9d77791583737320f8c7560861168df7388c2f)
2002-01-01 02:34:29 +00:00
Andrew Bartlett
af7bd393da Ensure the output cli can't have spurious values if the connection fails...
(This used to be commit 2d1612dd3560bb5ef35fa1eeee00e3d7976bcd62)
2001-12-31 13:06:10 +00:00
Andrew Bartlett
82cfa2b248 Fix up the comment in the copyright header
(This used to be commit 45042bef7cdede6f991572677654903bbf7d9144)
2001-12-31 12:50:44 +00:00
Simo Sorce
0608a60390 util_sid.c - respect a const variabile (addedd strdup)
cli_reg.c  - indentation
pdb_ldap.c - some checks on init fns parameters
pdb_tdb.c  - some checks on init fns parameters + make sure we close the db on failure
(This used to be commit 49f5cb7a3df6d673f86e6769319aa657e30d8380)
2001-12-30 19:21:25 +00:00
Andrew Bartlett
72898d4821 Finish idra's cleanup of the RPC remote shutdown code.
(This used to be commit 79031b68ce6bdf882d9c9bd4f3310f597e0c1fda)
2001-12-30 10:19:56 +00:00
Andrew Tridgell
caaac2803a - handle kerberos session setup reply with broken null termination
- don't display Domain=[] for auth protocols that don't give us a domain
(This used to be commit 20368455ea59e6e9b85632848bbe92069e7b0f38)
2001-12-21 12:29:51 +00:00
Andrew Tridgell
384ce26f5b try to handle end of packet for not null terminated domain strings
(This used to be commit 1da988456dbd885820093ae43c74e0ac66f72802)
2001-12-21 11:58:30 +00:00
Andrew Tridgell
9126a40e2c added trusted realm support to ADS authentication
the method used for checking if a domain is a trusted domain is very
crude, we should really call a backend fn of some sort. For now I'm
using winbindd to do the dirty work.
(This used to be commit adf44a9bd0d997ba4dcfadc564a29149531525af)
2001-12-19 09:53:30 +00:00
Jean-François Micouleau
6e76486505 there is no unknown field in LSA_SEC_QOS
some cleanup of the lsa_open_policy and lsa_open_policy2 parser. the
length fields are not correct but that's what NT send. We don't anymore
underflow or overflow the decoding.

added the domain admins group to the default SD.

we are now checking the desired access flag in the lsa_open_policy_X()
calls and in most functions also.

        J.F.
(This used to be commit a217c4e4ff4d13122703d22258792fe5e8e9f02f)
2001-12-17 23:03:23 +00:00
Tim Potter
63bd99aec2 Added comment.
(This used to be commit 594634ff1a1d5f780ddb9909f5365ee3e420a76c)
2001-12-13 23:43:44 +00:00
Jean-François Micouleau
9f59fc64b8 update the ldap support code. it compiles.
Ignacio you can update your howto ;-)

samsync: a small patch to try chaning challenges.

	J.F.
(This used to be commit c99bc305599698f2291efbfe20024355cb2bcde0)
2001-12-13 18:09:29 +00:00
Jeremy Allison
a85390ae69 Always use ASCII strings when changing passwords with RAP.
Jeremy.
(This used to be commit d3ac2265b1b83e2e030688ee8e0d43918ce4d203)
2001-12-12 19:40:22 +00:00
Andrew Tridgell
70095b09c3 handle a NULL hostname in cli_connect()
(This used to be commit a181f49b4269baa1752ce6ed4f9093e38d2d3ce5)
2001-12-11 05:48:27 +00:00
Andrew Tridgell
5ffe722a55 detect attempts to connect to names of the type NAME#xx and do a
netbios lookup for name NAME with node type xx.

This affects all our client progs. Very useful :)
(This used to be commit b4304c5231159fc6295c445f2eb4470c179b8d5e)
2001-12-11 05:16:48 +00:00
Tim Potter
b872787f01 Doing some research into ACLs on the LSA and SAM policy objects.
- added lsaquerysecobj to rpcclient
 - renamed querysecobj to samquerysecobj
 - removed duplicated display_sec_acl() code from cmd_spoolss.c and
   cmd_samr.c and moved it into display_sec.c
(This used to be commit 59b2e3f408a5ff22f2d81a927d010a7df5f19f7f)
2001-12-11 02:17:26 +00:00
Jean-François Micouleau
bf5a0e6717 NT_STATUS(0x80000005) maps to ERRDOS,234
J.F.
(This used to be commit 80e36549b61cc2bb5148f6abb175d31a0c7782a1)
2001-12-10 23:34:32 +00:00
Jean-François Micouleau
ecf7017eca added enum alias groups to rpcclient
(This used to be commit d4bc8f02f7dc856ffb29e95a81ffcc3a9d4b1695)
2001-12-10 22:30:31 +00:00
Jeremy Allison
a427fafc1f Treat RAP codes differently.
Jeremy.
(This used to be commit 919b11a787145139e6255674179b2ff7e587475d)
2001-12-10 19:48:43 +00:00
Jeremy Allison
775c3876db RAP error strings take precedence as they are not encoded in the SMB header
(ie. the call can succeed, but still be an encoded error).
Jeremy.
(This used to be commit 3c68b94199ff08b205d1eb14da56804936b900a8)
2001-12-10 19:18:56 +00:00
Tim Potter
4f53486d78 Added client and server code for the GetPrintProcessorDirectory SPOOLSS
rpc.  This was supposed to fix a printer driver download bug but it didn't
but it seemed a shame to trash all this code so I'm commiting it #ifdef'ed
out in case someone needs it one day.
(This used to be commit bef43656471741c6c10b12e7516c15de9ae76394)
2001-12-10 05:03:17 +00:00
Andrew Tridgell
5d378a280f added internal sasl/gssapi code. This means we are no longer dependent on cyrus-sasl which makes the code much less fragile. Also added code to auto-determine the server name or realm
(This used to be commit 435fdf276a79c2a517adcd7726933aeef3fa924b)
2001-12-08 11:18:56 +00:00
Andrew Bartlett
3c64bd4c50 Leak less memory.
Now, is there any reason that the prs_init() doesn't use the talloc context
that it is supplied as an argument for the actual data buffer?

It would seem logical to replace the malloc with a talloc, but I'm sure
there is some method to the madness (extrnal use/Reallocing of it I presume)

Andrew Bartlett
(This used to be commit ad18f33bfa79ce93024f3cb3a334cff622fe82a4)
2001-12-08 02:14:56 +00:00
Jeremy Allison
7077558fb3 Added fetch_domain_sid. Not used in current code, but a nice example
of how to use this interface.
Jeremy.
(This used to be commit 291985123515f99bb3fd86605d5b8a08301070a2)
2001-12-05 19:33:35 +00:00
Andrew Bartlett
8ba00d147b OK. Smbpasswd -j is DEAD.
This moves the rest of the functionality into the 'net rpc join' code.

Futhermore, this moves that entire area over to the libsmb codebase, rather
than the crufty old rpc_client stuff.

I have also fixed up the smbpasswd -a -m bug in the process.

We also have a new 'net rpc changetrustpw' that can be called from a
cron-job to regularly change the trust account password, for sites
that run winbind but not smbd.

With a little more work, we can kill rpc_client from smbd entirly!
(It is mostly the domain auth stuff - which I can rework - and the
spoolss stuff that sombody else will need to look over).

Andrew Bartlett
(This used to be commit 575897e879fc175ba702adf245384033342c903d)
2001-12-05 11:00:26 +00:00
Andrew Bartlett
8818847c85 Ditto on the const religion.
(This used to be commit e1b940c91b748230664544fd9191123247dd1f24)
2001-12-05 00:24:57 +00:00
Andrew Bartlett
3bc87626ae 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
(This used to be commit c0b7ee6ee547dc7ff798eaf8cb63fbe344073029)
2001-12-04 05:03:03 +00:00
Andrew Bartlett
7b0b556804 Fix up funtion name, as this finds local, not domain master browsers.
(as per tridge's instructions)
(This used to be commit 0692d792f24f1c82c69532e50a6c4373c9a8b476)
2001-12-04 04:45:17 +00:00
Tim Potter
bca2bcd87e Added error message for ERRdiskfull.
(This used to be commit 9f5d7e8a04c36395570247bc5e1b7b3fc5d1a322)
2001-12-04 00:46:12 +00:00
Andrew Tridgell
0dc386855f when using non-encrypted password ignore the ntpass variable to
session setup
(This used to be commit c7665706cd5633ede710afe41413624124038238)
2001-12-04 00:07:08 +00:00
Andrew Tridgell
b6b84cf709 const religion
(This used to be commit 359ca8f246c46b1700418fe0226458023f808d67)
2001-12-03 08:16:51 +00:00
Andrew Bartlett
3ea7519b06 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
(This used to be commit eee925861a3af3aa16efa3b1700a980c9510c14e)
2001-12-03 07:42:18 +00:00
Jean-François Micouleau
633ee99afa added queryuseraliases to rpcclient
and some comments to the samr server code, to explain what we should
return here.

	J.F.
(This used to be commit 06cb20a46d9d9f8abf0d92ba4cfa4d23187ad715)
2001-12-02 01:45:50 +00:00
Jean-François Micouleau
d78f6366e8 added samr_query_sec_obj for rpcclient
J.F.
(This used to be commit d8809c58614cd97ef78d398645788e41022a8c39)
2001-12-01 23:57:11 +00:00
Tim Potter
ff27a326f1 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?
(This used to be commit 4215048f7b20a8f9e5877bdbb2f54841b2f7fa64)
2001-11-29 05:50:32 +00:00
Andrew Tridgell
f6b962fba3 fixed some krb5 ifdefs
(This used to be commit 23ef22f11700bbaa5778a9678a990a2b041fcefe)
2001-11-28 23:54:07 +00:00
Andrew Tridgell
b1ade34705 fixed a core dump in server level security
(This used to be commit e790bb21d3895bef97522b68c6f00812e6c286f2)
2001-11-28 05:49:36 +00:00
Andrew Tridgell
eec9e8a052 fix a bunch of places where we can double-free a cli structure
(This used to be commit e2ba2383c9f679c076749a8f4fccefc3559e37ec)
2001-11-28 03:56:30 +00:00
Jeremy Allison
a6b73b9767 Cross merge to make 2.2 and HEAD closer.
Jeremy.
(This used to be commit 39f076b56cf457cc780dd30a4d3150d8bfc60d13)
2001-11-28 02:42:55 +00:00
Richard Sharpe
7527ec3ffd Fix another memory leak spotted by Tom Jansen.
(This used to be commit 6e2c06a6e6173e68a75fd1adfaa73fe9a9210fef)
2001-11-27 10:42:39 +00:00
Andrew Tridgell
4d726d0091 prevent a bogus insure wild ptr message
(This used to be commit 1976a8f87544140363449a361f7c7347ef2c44f5)
2001-11-27 03:50:53 +00:00
Andrew Tridgell
701ecfc7a0 prevent a memory leak of cli structures
(This used to be commit 911c57403bd116405876e73913ad73efd15f659b)
2001-11-27 03:29:20 +00:00
Andrew Tridgell
df81a6ec23 increment the value not the pointer
(This used to be commit e3698259afa79fcd318592b1d628803695406337)
2001-11-26 09:28:00 +00:00
Andrew Bartlett
fc93f4f403 Fix --enable-developer shadow warning
(This used to be commit 6a919bcf3d5848e09ddba1e8946f985661af8f67)
2001-11-26 07:53:33 +00:00
Tim Potter
585d0efbc6 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);
(This used to be commit 778f5f77a66cda76348a7c6f64cd63afe2bfe077)
2001-11-26 03:11:44 +00:00
Andrew Bartlett
f6e94b64b4 And delete domain_client_validate.c...
Andrew Bartlett
(This used to be commit 6caca4301ba88d026ce1989cefd3e9eeb65df376)
2001-11-26 01:37:44 +00:00
Andrew Tridgell
26f1e3f83c use DEBUG() not d_printf() in libraries
(This used to be commit 5100ae4ae032545edaf525de1dfbe5dc9dafecfc)
2001-11-26 00:45:51 +00:00
Jeremy Allison
86dee43f39 Use "password server" for searching for BDC's also as Tim suggested.
Jeremy.
(This used to be commit 4aca67761fbe601e27f8f768c28a11241f088bba)
2001-11-25 06:38:17 +00:00
Andrew Bartlett
a71f3f66a1 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
(This used to be commit adc7a6048c13342b79b6228beafb5142c50f318d)
2001-11-25 02:35:37 +00:00
Andrew Tridgell
ad2974cd05 added "net join" command
this completes the first stage of the smbd ADS support
(This used to be commit 058a5aee901e6609969ef7e1d482a720a84a4a12)
2001-11-24 14:16:41 +00:00
Andrew Bartlett
d0a2faf78d 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
(This used to be commit 8d31eae52a9757739711dbb82035a4dfe6b40c99)
2001-11-24 12:12:38 +00:00