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

1333 Commits

Author SHA1 Message Date
Luke Leighton
6909350ed9 dce/rpc
(This used to be commit 62fdeef1b7)
1998-10-08 23:57:46 +00:00
Luke Leighton
48b31ae44f dce/rpc
(This used to be commit 6677b888bd)
1998-10-07 21:42:24 +00:00
Luke Leighton
c07b2bdf90 dce/rpc
(This used to be commit eb279cabd0)
1998-10-06 22:03:04 +00:00
Andrew Tridgell
40984f6b55 - modified resolve_name() to take a name_type
- cleaned up resolve_name() (split into separate functions for each resolver)
- if can't find local master then use #1B name
- support listing of foreign workgroups in /smb/
(This used to be commit a4e607c17d)
1998-10-04 12:00:40 +00:00
Luke Leighton
732d4ff7da Makefile.in :
- added srvsvc client files

clientgen.c :

	- replaced cli_error(cli, int *cls, int *err) with
	  cli_error(cli, uint8 cls, uint32 *err).  this version detects
	  32 bit status messages.  the DOS error "MORE_DATA", the
	  equivalent of the 32 bit *warning* 0x8000 0005
	  (STATUS_BUFFER_OVERFLOW), was being processed as an error,
	  terminating the cli_receive_trans() call.

cli_pipe.c :

	- replaced calls that had been incorrectly modified from
	  32 bit warnings (0x8000 0005 - STATUS_BUFFER_OVERFLOW)
	  to 8 bit DOS errors (0x01 0xEA - MORE_DATA).
	  the use of the old version of cli_error (DOS only)
	  instead of the new one (DOS and 32 bit) caused the
	  dce/rpc client code to fail.

	- replaced 2 space indentation with tab indentation in all functions.

cli_srvsvc.c :
cmd_srvsvc.c :

	- added these files back in, fixing them up to use jeremy's
	  modified versions of the dce/rpc client functions.

parse_srv.c :

	- added back in some "unused" functions required by dce/rpc
	  client-side code.  it would be helpful if all such "unused"
	  functions could be added back in.

rpcclient.c :

	- added "session", "file", "share", "connection" enumeration
	  functions back in.  these are equivalent to nt's "NetXXXXXEnum"
	  Win32 (MSDN) functions.

	- added "srvinfo" function back in.  this is equivalent to
	  nt's NetServerGetInfo Win32 (MSDN) function.
(This used to be commit bcf39ffdcc)
1998-10-02 21:09:23 +00:00
Luke Leighton
c43c53b886 microsoft is slowly fixing some buffer overflow errors in dce/rpc code (SP4).
therefore, they are being more strict, first in the server-side code, and
now in the client-side code.

this fixes a bind-request that was too short by 16 bytes, and an rpc-request
that was too long by 24 bytes.
(This used to be commit a69ed7846a)
1998-10-02 18:14:38 +00:00
Luke Leighton
d8f609aeeb lsa_lookup_sids command added. severe debugging needed on lookup_sids
code.  added "quality of service" capability to lsa_open_policy code.

different lsa_open_policy queries are *not* dealt with in the server code.
answers like "0xC000 0022" - access denied - will have to be made to
lsa_lookup_sids calls when a "quality of service" request is *not* specified
in the lsa_open_policy call.
(This used to be commit 299a723d4e)
1998-09-30 19:09:57 +00:00
Alexandre Oliva
cf971f88ac automated generation of .dummy files for each subdirectory;
dummy.in files are no longer needed, and new directories will be taken
care of automatically, at configure (or config.status --recheck) time
(This used to be commit 237a8e5fe6)
1998-09-28 00:14:36 +00:00
Luke Leighton
4b9e0941b9 rpcclient: got samr command "enumusers -g -u" working
(This used to be commit 3a00023efe)
1998-09-25 23:14:20 +00:00
Luke Leighton
6fb5804b28 added in samr commands. assistance in returning the missing functions,
automatically removed because they were "unused", would be appreciated.
(This used to be commit d0f7b0d915)
1998-09-25 22:20:05 +00:00
Luke Leighton
ff07b2e4a3 added wksinfo command to rpcclient, which don't work too good.
(This used to be commit 8d23da91cb)
1998-09-25 21:20:37 +00:00
Luke Leighton
66d5d73a5d added rpcclient program
(This used to be commit aa38f39d67)
1998-09-25 21:01:52 +00:00
Alexandre Oliva
e649750cb4 major autoconf clean-up
fix problems in builds with srcdir!=builddir
(This used to be commit 1ffc3b807a)
1998-09-21 09:07:08 +00:00
Andrew Tridgell
f6044c87c0 some cleanups to use ZERO_STRUCT() and friends
(This used to be commit 7b154dc431)
1998-09-05 13:24:20 +00:00
Andrew Tridgell
e9ea36e4d2 tridge the destroyer returns!
prompted by the interpret_security() dead code that Jean-Francois
pointed out I added a make target "finddead" that finds potentially
dead (ie. unused) code. It spat out 304 function names ...

I went through these are deleted many of them, making others static
(finddead also reports functions that are used only in the local
file).

in doing this I have almost certainly deleted some useful code. I may
have even prevented compilation with some compile options. I
apologise. I decided it was better to get rid of this code now and add
back the one or two functions that are needed than to keep all this
baggage.

So, if I have done a bit too much "destroying" then let me know. Keep
the swearing to a minimum :)

One bit I didn't do is the ubibt code. Chris, can you look at that?
Heaps of unused functions there. Can they be made static?
(This used to be commit 2204475c87)
1998-09-05 05:07:05 +00:00
Andrew Tridgell
61b5fd6f32 bounds check next_token() to prevent possible buffer overflows
(This used to be commit 3eade55dc7)
1998-08-31 03:11:42 +00:00
Andrew Tridgell
b9623ab59e this is the bug change to using connection_struct* instead of cnum.
Connections[] is now a local array in server.c

I might have broken something with this change. In particular the
oplock code is suspect and some .dll files aren't being oplocked when
I expected them to be. I'll look at it after I've got some sleep.
(This used to be commit c7ee025ead)
1998-08-14 17:38:29 +00:00
Andrew Tridgell
8d42ee0f2c some merge cleanups
(This used to be commit 1d655b7c64)
1998-07-29 03:15:02 +00:00
Jeremy Allison
7a2b695bcb password.c: Fixes to allow Win95 clients to have lm encrypted passwords
recognised.
lib/rpc/client/cli_login.c: Fix debug comment.
lib/rpc/parse/parse_misc.c: Fix for passing null pointers.
lib/rpc/parse/parse_net.c: Send correct password lengths when called
                           from Win95.
Jeremy.
(This used to be commit ad1848b355)
1998-07-06 22:48:21 +00:00
Jeremy Allison
9bd7e1e887 loadparm.c: Added machine password timeout parameter - set to 7 days be default.
password.c: Added code to tell server.c when machine password needs changing.
server.c: Change machine password in idle cycles if it needs it.
smbpassfile.c: Fixed up length calculations for machine password file.
smbpasswd.c: Moved domain joining code/machine password changing code.
lib/rpc/client/cli_netlogon.c: And this is where it now lives.
Jeremy.
(This used to be commit b8fedca619)
1998-05-27 00:30:52 +00:00
Jeremy Allison
a4276507e4 chgpasswd.c: Added comments to #ifdefs
ipc.c: Caused samba password changing not to be done if UNIX password
       changing requested and not successful.
util.c: Added string_to_sid() and sid_to_string() functions.
lib/rpc/client/cli_samr.c:
lib/rpc/include/rpc_misc.h:
lib/rpc/parse/parse_lsa.c:
lib/rpc/parse/parse_misc.c:
lib/rpc/parse/parse_net.c:
lib/rpc/parse/parse_samr.c:
lib/rpc/server/srv_lsa.c:
lib/rpc/server/srv_lsa_hnd.c:
lib/rpc/server/srv_netlog.c:
lib/rpc/server/srv_samr.c:
lib/rpc/server/srv_util.c: Changes so that instead of passing SIDs
around as char *, they are converted to DOM_SID at the earliest
opportunity, and passed around as that. Also added dynamic memory
allocation of group sids. Preparing to auto-generate machine sid.
Jeremy.
(This used to be commit 134d6fa79c)
1998-05-14 01:30:40 +00:00
Jeremy Allison
f888868f46 This is a security audit change of the main source.
It removed all ocurrences of the following functions :

sprintf
strcpy
strcat

The replacements are slprintf, safe_strcpy and safe_strcat.

It should not be possible to use code in Samba that uses
sprintf, strcpy or strcat, only the safe_equivalents.

Once Andrew has fixed the slprintf implementation then
this code will be moved back to the 1.9.18 code stream.

Jeremy.
(This used to be commit 2d77445400)
1998-05-12 00:55:32 +00:00
Andrew Tridgell
3dfc0c8472 changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf()
using mprotect() and a non-writeable page.

This should prevent any sprintf based security holes.
(This used to be commit ee09e9dadb)
1998-05-11 06:38:36 +00:00
Jeremy Allison
90177708aa Makefile: Added files to smbpasswd.c.
loadparm.c: Patch from tim@quiknet.com for static string problems.
server.c: Setup global_myname.
smbpass.c: Fix up locking. Add machine_password_delete() call.
smbpasswd.c: Added provisional code to add to a domain.
lib/rpc/client/cli_login.c: Fixed incorrect cred_hash3 call when setting machine password.
lib/rpc/server/srv_netlog.c: Fixed incorrect cred_hash3 call when setting machine password.
Jeremy.
(This used to be commit 6a7164233e)
1998-04-29 22:27:26 +00:00
Jeremy Allison
e305c2c9e2 clientgen.c: Fixed null session setup bug.
password.c: Stopped cli_nt_logout call (we don't have it correct yet).
            Added Luke object-orientation fix :-).
smb.h: Added clnt_name_slash to cli_state.
lib/rpc/client/cli_login.c: Changed global_myname to clnt_name_slash where needed.
lib/rpc/client/cli_netlogon.c: Fixed debug messages, don't check creds on error.
lib/rpc/client/cli_pipe.c: Fixed debug messages, Added Luke object-orientation fix.
lib/rpc/parse/parse_misc.c: Fixed STRING2 linearization bug that was adding 1.
Jeremy.
(This used to be commit c6c22df201)
1998-04-29 19:22:01 +00:00
Jeremy Allison
d3832506b2 This is the checkin that adds the security=domain functionality.
WARNING - so far this has only been tested against a Samba PDC
(still waiting for IS to add me the machine accounts :-).

Still missing is the code in smbpasswd that will add a machine
account password and change it on the domain controller, but
this is not hard, and I will check it in soon.

Jeremy.
(This used to be commit 17b94a7084)
1998-04-29 00:02:57 +00:00
Jeremy Allison
22abe47e29 First version that compiles. Much more to do.....
Jeremy.
(This used to be commit 45393a19ad)
1998-04-28 01:24:40 +00:00
Jeremy Allison
e7ac86607c This looks like a big change but really isn't.
It is changing the global variables "myname" and "myworkgroup"
to "global_myname" and "global_myworkgroup" respectively.

This is to make it very explicit when we are messing
with a global (don't ask - it makes the domain client
code much clearer :-).

Jeremy.
(This used to be commit 866406bfe3)
1998-04-25 01:12:08 +00:00
Jeremy Allison
42058f3c66 cli_pipe.c: Corrected cli_api_pipe() calls.
Jeremy.
(This used to be commit 2571ba0213)
1998-04-24 00:34:21 +00:00
Jeremy Allison
d5114f6245 These don't compile yet - but they are the core code in what
will be DOMAIN_CLIENT called code.
Jeremy.
(This used to be commit ad81735fa1)
1998-04-23 22:45:53 +00:00
Luke Leighton
76d3bc36a5 put server-side long dce/rpc code in main branch.
(This used to be commit 2e1a08b28c)
1998-04-21 02:36:37 +00:00
Luke Leighton
92e2ecc3b5 cli_login.c :
start to create the calls needed for client-side of "network" logins,
	which will be used for domain version of pass-through authentication.
	unfortunately, none of this code is called in the main branch, because
	smbclient BRANCH_NTDOM code isn't in use, yet!

srv_netlog.c :

	fixed a problem with static net_login_network() which was being
	stubborn: the if() statement looked horrendous, so i split it into
	two if() statements, one to deal with the lm password; the other to
	deal with the nt password.

	the smb_password_check() functions should _not_ be called here, in
	case we decide to disable lm hashes for security reasons, just like
	nt does.

	so, we now get a response to the SAM_LOGON "network" call, but the
	connection is still dropped.  a trace is needed from an nt server,
	which is why i started on the client-side code.  see above, which
	is why i'm calling it a day :-)
(This used to be commit 2c29a7d9cf)
1998-04-01 21:31:06 +00:00
Jeremy Allison
fdeea341ed "For I have laboured mightily on Luke's code, and hath broken
all I saw" - the book of Jeremy, chapter 1 :-).

So here is the mega-merge of the NTDOM branch server code.
It doesn't include the new client side pieces, we'll look
at that later.

This should give the same functionality, server wise, as
the NTDOM branch does, only merged into the main branch.

Any fixes to domain controler functionality should be
added to the main branch, not the NTDOM branch.

This code compiles without warnings on gcc2.8, but will
need further testing before we are sure all the working
functionality of the NTDOM server branch has been
correctly carried over.

I hereby declare the server side of the NTDOM branch
dead (and all who sail in her :-).

Jeremy.
(This used to be commit 118ba4d77a)
1998-03-11 21:11:04 +00:00