1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
Commit Graph

140 Commits

Author SHA1 Message Date
Andrew Tridgell
cbe31055f8 support both old and new kerberos OIDs
(This used to be commit eac164c7e6)
2001-10-21 00:11:22 +00:00
Andrew Tridgell
5ad7448359 the beginnings of kerberos support in smbd. It doesn't work yet, but
it should give something for others to hack on and possibly find what
I'm doing wrong.
(This used to be commit 353c290f05)
2001-10-18 10:26:06 +00:00
Andrew Tridgell
b728042334 added basic NTLMSSP support in smbd. This is still quite rough, and
loses things like username mapping. I wanted to get this in then
discuss it a bit to see how we want to split up the existing
session setup code
(This used to be commit b74fda69bf)
2001-10-17 08:54:19 +00:00
Andrew Tridgell
b46f6d865e fixed NTLMSSP with XP servers (who don't send the duplicate challenge
in the asn1 spnego structures)
(This used to be commit 131010e9fb)
2001-10-14 06:14:11 +00:00
Andrew Tridgell
81756ba744 fixed two bugs in the NTLMSSP code
- handle servers that don't send a kerberos principle (non-member servers)
 - enable spnego without KRB5
(This used to be commit b218d465a1)
2001-10-14 05:42:28 +00:00
Andrew Tridgell
d726eb216a moved some OIDs to the ASN.1 header
(This used to be commit 7092beef9d)
2001-10-12 04:54:53 +00:00
Andrew Tridgell
9f7cb41f11 added NTLMSSP authentication to libsmb. It seems to work well so I have enabled it by default if the server supports it. Let me know if this breaks anything. Choose kerberos with the -k flag to smbclient, otherwise it will use SPNEGO/NTLMSSP/NTLM
(This used to be commit 076aa97bee)
2001-10-12 04:49:42 +00:00
Andrew Tridgell
7cd9c611e2 added a ASN.1 parser, so now I can properly parse the negTokenInit
packet which means I can extract the service and realm, so we should
now work with realms other than the local realm.

it also means we now check the list of OIDs given by the server just
in case it says that it doesn't support kerberos. In that case we
should fall back to NTLMSSP but that isn't written yet.
(This used to be commit 395cfeea94)
2001-10-11 13:13:06 +00:00
Andrew Tridgell
81f56139b6 initial kerberos/ADS/SPNEGO support in libsmb and smbclient. To
activate you need to:

- install krb5 libraries
- run configure
- build smbclient
- run kinit to get a TGT
- run smbclient with the -k option to choose kerberos auth
(This used to be commit d330575856)
2001-10-11 07:42:52 +00:00
Andrew Tridgell
d53d5beeb2 use cli_is_error() instead of looking in smb_rcls, otherwise NT status
codes don't work correctly
(This used to be commit 55d5828e60)
2001-09-05 11:32:59 +00:00
Andrew Tridgell
464237cdb8 fixed handling of 139/445 in clients
(This used to be commit 22b372f8a7)
2001-08-24 20:11:09 +00:00
Tim Potter
705fb73e50 Fixed debug in cli_establish_connection() - print out the called name on
connection failure rather than the calling name.
(This used to be commit 946f6eb932)
2001-08-24 19:52:01 +00:00
Andrew Tridgell
c45fbe69f5 better error reporting for servers that don't do port 445
(This used to be commit a896dc299e)
2001-08-23 16:25:57 +00:00
Andrew Tridgell
c5004cf0e6 added port 445 support to our client code
(This used to be commit 0c3120ae47)
2001-08-22 22:39:39 +00:00
Andrew Tridgell
11ce0f4d2d a bunch of fixes from the sflight to seattle
in particular:
 - fixed NT status code for a bunch of ops
 - fixed handling of protocol levels in ms_fnmatch
(This used to be commit 3eba9606f7)
2001-08-20 05:15:26 +00:00
Tim Potter
2ccfea3de7 A rewrite of the error handling in the libsmb client code. I've separated
out the error handling into a bunch of separate functions rather than all
being handled in one big function.

Fetch error codes from the last received packet:

    void cli_dos_error(struct cli_state *cli, uint8 *eclass, uint32 *num);
    uint32 cli_nt_error(struct cli_state *);

Convert errors to UNIX errno values:

    int cli_errno_from_dos(uint8 eclass, uint32 num);
    int cli_errno_from_nt(uint32 status);
    int cli_errno(struct cli_state *cli);

Detect different kinds of errors:

    BOOL cli_is_dos_error(struct cli_state *cli);
    BOOL cli_is_nt_error(struct cli_state *cli);
    BOOL cli_is_error(struct cli_state *cli);

This also means we now support CAP_STATUS32 as we can decode and understand
NT errors instead of just DOS errors.  Yay!

Ported a whole bunch of files in libsmb to use this new API instead of the
just the DOS error.
(This used to be commit 6dbdb0d813)
2001-08-10 06:00:33 +00:00
Andrew Tridgell
3ad0801dd3 formatting fix
(This used to be commit 3dc9fd076a)
2001-07-08 18:23:53 +00:00
Andrew Tridgell
527e824293 strchr and strrchr are macros when compiling with optimisation in gcc, so we can't redefine them. damn.
(This used to be commit c41fc06376)
2001-07-04 07:36:09 +00:00
Andrew Tridgell
87fbb7092b The big character set handling changeover!
This commit gets rid of all our old codepage handling and replaces it with
iconv. All internal strings in Samba are now in "unix" charset, which may
be multi-byte. See internals.doc and my posting to samba-technical for
a more complete explanation.
(This used to be commit debb471267)
2001-07-04 07:15:53 +00:00
Andrew Tridgell
8b79a473fa - make the regresison test mode code build in by default. This should
allow us to have test targets without special configure options
- fixed make proto so that it actually does something
(This used to be commit 55109a7525)
2001-06-25 00:46:34 +00:00
Andrew Tridgell
868d010aa1 added the ability to test smbd safely as an ordinary user. The way it works is
that libsmb/ creates a local tcp socket then launches smbd as a subprocess
attached to that socket. smbd thinks it is being launched from inetd.

to use it do the following:

- compile with -DSMB_REGRESSION_TEST
- run like this (also works with smbtorture etc)
    export SMBD_TEST=1
    export LIBSMB_PROG=bin/smbd
    smbclient //server/share -Uuser%pass

obviously you need to setup a smb.conf etc. Using --prefix to configure
is useful.

The aim of all this stuff is to add a decent set of regression tests
to the build farm, so we know if smbd actually runs correctly on all the
platforms, not just builds. We can run smbtorture, masktest, locktest etc,
plus a bunch of smbclient scripts and any new tests we write.

This doesn't help much with nmbd (at least not yet) but its a good start.
(This used to be commit 7e8e6ae9a8)
2001-06-22 15:14:45 +00:00
Andrew Tridgell
4ff011d88e Added STR_NOALIGN flags to clistr and srvstr fns. Yes, NT actually does
send unaligned unicode strings sometimes!
Fixed our handling of the workgroup name tacked on the end of the
NT1 negprot response (a unaligned unicode)
fixed a couple of places where we should be using the message_end fns instead
of pre-calculated buffer lengths
(This used to be commit 86613493a9)
2001-06-21 05:38:28 +00:00
Gerald Carter
fb3d8452e5 set of changes in the beginning of bringing rpcclient changes
back to working order.  The main change is that the cli_*() RPC
functions from libsmb/*.c now should accept a struct cli_state*.

The reason for this is that rpcclient should establish the
connection to the server at startup so that it is not necessary
to keep the clear test or password hash in memory for each command.

enumports and enumprinters now works as well.  lsa* functions
have been tested.  SAMR calls may or may not work (one of the core
dumps I know), but it compiles :-)



jerry
(This used to be commit d98ac8852a)
2001-03-14 20:22:57 +00:00
Andrew Tridgell
45c2ee3ff2 to use the same macros in the client and server rename the CLISTR_
macros to STR_
(This used to be commit 95c9e4e0ba)
2001-03-10 11:35:25 +00:00
Tim Potter
ff2616aaf9 Fixed compiler warning.
(This used to be commit 33e5c56ab0)
2001-03-01 06:36:57 +00:00
Andrew Tridgell
57467a9f60 neater negprot code using the new cli_setup_bcc() call
(This used to be commit 5b17284265)
2001-02-25 23:46:02 +00:00
Andrew Tridgell
a8ab984078 the unicode conversion of our client code is complete enough to be
enabled by default

you can disable it by setting the environment variable CLI_FORCE_ASCII
(This used to be commit 4d59c08c5e)
2001-02-21 03:40:20 +00:00
Andrew Tridgell
8acf5e0448 - neater setting of bcc
- converted cli_rename and cli_unlink
(This used to be commit 0a8992e224)
2001-02-20 12:45:50 +00:00
Andrew Tridgell
c7c3db2f16 converted cli_list()
(This used to be commit bdce09b778)
2001-02-20 12:22:30 +00:00
Andrew Tridgell
c565c98723 pipe opening now works with unicode
(This used to be commit ba3ce3404e)
2001-02-20 10:11:40 +00:00
Andrew Tridgell
6492d6b2f6 initial client side unicode support (needed for netapp filer)
I've currently got this code disabled by default as it is
incomplete. You enable it by setting a USE_UNICODE environment
variable. Once the support is complete this check will be removed and
the CAP_UNICODE capability bit will be the sole determination of
whether the client library code uses unicode

right now I have converted session_setup and tconx. I will do more fns
over the next few days.

see clistr.c for the new client side string interface. Luckily it
tends to make the code smaller and neater while adding unicode
support.
(This used to be commit e1a04e621f)
2001-02-20 08:09:06 +00:00
Tim Potter
7f9fbcd0ef Merge of i18n password fix for smbclient.
(This used to be commit ec217eb8fc)
2001-02-15 05:42:04 +00:00
Tim Potter
64172d82fc Merge of i18n fixes from appliance branch. Samba can now talk to a network
with a PDC that has international netbios name and domain name.  There's
still quite a bit of i18n stuff to fix though...
(This used to be commit 79045bd72a)
2001-02-14 05:34:50 +00:00
Tim Potter
b37ac378cf Replace magic number with constant.
(This used to be commit 1a228868cf)
2000-12-21 00:30:32 +00:00
Andrew Tridgell
ca784bb028 in cli_session_setup() accept usernames of the form DOMAIN/USER or
DOMAIN\USER

this means all our tools can now put the domain name in the -U option
(This used to be commit bac1c76f03)
2000-12-04 04:26:22 +00:00
Jeremy Allison
6f58dd5871 Ok - fixed a bug in our levelII oplock code. We need to break a level II on
a byte range lock (write lock only, but Win2k breaks on read lock also so I
do the same) - if you think about why, this is obvious. Also fixed our client
code to do level II oplocks, if requested, and fixed the code where we would
assume the client wanted level II if it advertised itself as being level II
capable - it may not want that.
Jeremy.
(This used to be commit 213cd0b519)
2000-11-16 00:59:18 +00:00
Jeremy Allison
e2d1dd47d8 Another patch to fix cli_reestablish_connection from Kenichi Okuyama@Tokyo Research Lab. IBM-Japan. Co. Jp.
Jeremy.
(This used to be commit 06f5da5d4b)
2000-10-28 20:54:45 +00:00
Luke Leighton
dda54bcd7d added NEGNOWAIT. sent to secure@microsoft.com
(This used to be commit b211793318)
2000-09-26 05:44:42 +00:00
Gerald Carter
d2b40a7de2 More rpcclient merge issues:
* fixes some readline bugs from the merge
        * first attempt at commands (spoolenum almost works)
        * no changes to existing functions in HEAD; only additions
          of new functions.  I'll weed out what I can as I go.




--jerry
(This used to be commit 61d2aad5dc)
2000-07-07 06:20:46 +00:00
Andrew Tridgell
858e63cab3 split clientgen.c into several parts
the next step is splitting out the auth code, to make adding lukes
NTLMSSP support easier
(This used to be commit 10c5470835)
2000-04-25 14:04:06 +00:00