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

242 Commits

Author SHA1 Message Date
Jeremy Allison
5f38824696 Bugfix from Branko Cibej <branko.cibej@hermes.si>
- client.c had a workaround embedded in it for his
earlier bug in StrnCaseCmp - removed this.
Jeremy.
(This used to be commit 7cb4e4b099)
1997-12-24 04:32:01 +00:00
Jeremy Allison
be71d43585 client.c:
clientgen.c:
clientutil.c:
clitar.c: Changed usage of receive_smb to new function client_receive_smb
          except for one use of receive_smb in client.c. This is the
          receive_smb used to discard packets received whilst in a
          keyboard wait state.
util.c: Created new function client_receive_smb that ignores session
        keepalives just as the old receive_smb used to do. Created
        internal function read_smb_length_return_keepalive that is
        used internally by the changed receive_smb call.
        Changed read_smb_len to not use an internal buffer - it is
        never called with a null buffer so such code is redundant.
Jeremy.
(This used to be commit 1084fb4682)
1997-12-20 14:36:11 +00:00
Andrew Tridgell
edc0554f7c fix a bug that sometimes prevented smbclient from connecting with
protocol < LANMAN1
(This used to be commit 95ad2c284d)
1997-12-14 17:48:55 +00:00
Jeremy Allison
64f0348a3f This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
(This used to be commit d80b0cb645)
1997-12-13 14:16:07 +00:00
Andrew Tridgell
1463cb1a43 fixed the help message for -p (someone complained!)
(This used to be commit c779ed654e)
1997-12-02 23:32:03 +00:00
Andrew Tridgell
e54a611dad get rid of stat command (it is a hangover from an old experiment)
(This used to be commit 8ced76c4c7)
1997-11-25 12:20:55 +00:00
Andrew Tridgell
51f20adc6b added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.

While I was doing this I found a couple of very nasty bugs in the
parm_table code. Someone had added a handle_character_set() function
that treated the char** pointer for a P_STRING as an integer! This
would have caused memory corruption for anyone using the "character
set" option. The loadparm code is delicate - please be careful about
using it's more esoteric features!

I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
(This used to be commit bac6b0daa2)
1997-11-22 07:09:12 +00:00
Jeremy Allison
77aec4ae63 Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems.
Jeremy
(This used to be commit 4a36ac236c)
1997-11-10 19:23:17 +00:00
Luke Leighton
cc512947c9 byteorder.h :
typecasting for the debug messages of the data dump.  hm.

#ifdef NTDOMAIN

ntclient.c rpc_pipes/lsaparse.c rpc_pipes/ntclientnet.c rpc_pipes/smbparse.c :

	adding "Net Server Password Set" functionality to smbclient.

#endif
(This used to be commit ad43183d2d)
1997-11-09 20:42:47 +00:00
Luke Leighton
e357d91068 attempting to mark up 32 bit error codes, needed for NT domains.
separated out smb server-mode password validation into a separate file.
added called and calling netbios names to client gen state: referenced
section in rfc1002.txt.
created workstation trust account checking code in ntclient.c

there might be a bug in reply_session_setup_andX.  i indented and added { }
around single-line if statements: the lm password checking code now doesn't
look right (around the GUEST_SESSSETUP bits).  *no code semantics have been
changed by the indentation process*.
(This used to be commit f27966957f)
1997-11-09 17:30:10 +00:00
Luke Leighton
4039df6d4b added code that _uses_ arcfour. arcfour itself, or anything remotely
like it, has *not* been added.

this is the client and server side of the SAM Logon NT and LM OWF password
obfuscation (rc4 with the long-term session key).
(This used to be commit 4cf4dd6967)
1997-11-03 15:47:03 +00:00
Andrew Tridgell
4012c1cc8f convert the credentials code back to uchar[8] from uint32[2]
This should fix the byte order problems (maybe!)
(This used to be commit 21878e7d86)
1997-11-02 04:01:57 +00:00
Luke Leighton
c533c07553 client.c clientutil.c proto.h
rpc_pipes/ntclientlsa.c rpc_pipes/ntclientnet.c
rpc_pipes/ntclientpipe.c :

	added extra argument to cli_call_api() to allow specifying the length of
	the \PIPE\ name.  it appears that, like when the name of the pipe is NULL
	and OS-2 requires two extra bytes _after_ the NULL name, that NT requires
	two bytes after the NULL-terminated name "\PIPE\".  these two bytes vary,
	but values seen so far are: 0x72 0x70; 0x63 0x65; 0x44 0x65; 0x4E 0x00.

	there appears not to be much logic to this.  purpose unknown.

ntclient.c:

	put Set Named Pipe Handle State call directly after SMBopenX call.
(This used to be commit 54c245be15)
1997-11-01 19:20:29 +00:00
Andrew Tridgell
224c40a523 a simple SMB torture tester. This will allow us to evaluate locking
techniques more accurately.
(This used to be commit 054e3b2ae3)
1997-11-01 13:22:16 +00:00
Luke Leighton
9fc5056a4a added a client-side "set named pipe handle state" function. not known
exactly when you call this (before or after a bind).  can sort that out
later.
(This used to be commit a64ba16db6)
1997-10-30 22:21:49 +00:00
Luke Leighton
a275e5d4e1 removed mechanism that created actual files NETLOGON, lsarpc and the like,
which are pipes on the IPC$ connection.

created mechanism to record pipe names in a separate pipes_struct.  it
is planned to expand this, to return sensible things like interface
structures, and policy handles (RPC_IFACE and LSA_POL_HND).  and the like.
(This used to be commit 33cce5fac0)
1997-10-30 01:05:13 +00:00
Luke Leighton
a2cbf43a6d split ntclient.c down into appropriate modules.
(This used to be commit 50d7e4d6f6)
1997-10-29 13:24:42 +00:00
Luke Leighton
b925b3d20c added frag field to make_rpc_hdr() function
(This used to be commit 6b0e519294)
1997-10-29 01:05:46 +00:00
Luke Leighton
fe0a702322 byteorder.h :
added mode for printing debug array data as chars not uint8/16/32s.
	only really useful for (uint8) strings or (uint16) unicode strings

lsaparse.c smbparse.c smb.h :

	rpc bind and rpc bind ack structures and parsing and creation functions.

ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c :

	using rpc bind / bind ack parsing routines instead of incorrect use of
	api_LsarpcTNP1 function.

ntclient.c :

	creation of do_rpc_bind() function.

THAT'S IT, FOLKS!
(This used to be commit 21c89e2f17)
1997-10-29 00:04:14 +00:00
Luke Leighton
d8e79427c9 smb.h smbparse.c pipeutil.c :
added bind and bind ack structures and parsing functions.  restructured
	rpc header stuff.

ntclient.c pipenetlog.c pipentlsa.c pipesrvsvc.c :

	having to deal with restructuring above.
(This used to be commit 9f2c4f1fee)
1997-10-28 17:54:10 +00:00
Luke Leighton
aee261e784 added LSA_Q_CLOSE and LSA_R_CLOSE (also to smb.h). implemented in smbclient.
updated Query Info Policy to report domain name and domain sid for info levels
3 and 5.
fixed bug in dom_sid_to_string (idauths decoded wrong).  fixed bug in DOM_SID:
subauths are 32 bit not 16.
(This used to be commit 2f3cca23e2)
1997-10-27 19:00:38 +00:00
Jeremy Allison
a030c93878 Fixed ntclient.c so it would compile.
Jeremy.
(This used to be commit 598e98e561)
1997-10-27 18:07:36 +00:00
Luke Leighton
13291ce01d added LSA Query Info Policy.
fixed a problem with byte ordering (doing an SIVAL of the setup parameters
which was _also_ being done in the creation of the SMB header.  oops).
(This used to be commit 541fb82895)
1997-10-27 17:04:15 +00:00
Luke Leighton
8586dda29b added LSA Open Policy query and response processing to smbclient
(This used to be commit 16cc27852b)
1997-10-27 15:09:23 +00:00
Luke Leighton
95b3b1473f hooray. hooray some more. hooray a lot. got the client-side working.
Q/R LSA_REQ_CHAL; Q/R LSA_AUTH2; Q/R LSA_SAMLOGON; Q/R LSA_SAMLOGOFF.
the last (non-essential right now) bit is the LSA_SRV_PWSET.

the next stage is to do LSA_OPENPOLICY; add the pipe binds (missing right
now); then we can test against an NT Server.
(This used to be commit 0a549e62fb)
1997-10-26 18:42:47 +00:00
Andrew Tridgell
f8c059517a fix some casting errors in smbencrypt and some multiply-defined errors
in clientutil.c (Luke, you can't just copy a global variable
declaration from one file to another, you need to declare one of them
extern)
(This used to be commit 944ecbcbd4)
1997-10-26 07:45:36 +00:00
Andrew Tridgell
a342ff5bf4 The browse synchronisation code in nmbsync.c now uses the clientgen.c
code, which means we don't have to link with a fake getpass routine
and we don't have a whole pile of global variables that really have
nothing to do with nmbd and were there to keep the client code happy.

The code should function identically to what it did before (hopefully
it was correct)

The only thing that now uses the horrible clientutil.c code is
smbclient.
(This used to be commit 4bf5c03b18)
1997-10-26 07:32:02 +00:00
Luke Leighton
7e56b5a173 added correct client-side credential generation / checking to the LSA SAM
Logon query.  i think i even got the client-side checking of the response
credentials right!
(This used to be commit f14c111835)
1997-10-25 17:38:37 +00:00
Luke Leighton
5493293442 got the SAM logon request generated, and received a SAM logon response back.
YEAH!

need to add:

	- client-side credential calculation
	- client-side parsing of the SAM logon response.
(This used to be commit 349677de3f)
1997-10-25 15:49:27 +00:00
Luke Leighton
390c1f3c4d Makefile :
adding bits for new nt domain code

byteorder.h :

	trying to get macros right, and not to crash on SUNOS5...

client.c :

	added #ifdef NTDOMAIN, and created do_nt_login() function.  don't
	want to have to recompile client.c unless absolutely necessary.

credentials.c :

	moved deal_with_creds() [possibly inappropriately] into credentials.c

ipc.c reply.c server.c uid.c :

	attempting to make (un)become_root() functions calleable from smbclient.
	this is a little tricky: smbclient might have to be another setuid
	root program, immediately setuid'ing to non-root, so that we can
	reset-uid to root to get at the smbpasswd file.  or, have a secure
	pipe mechanism to smbd to grab smbpasswd entries.  or the like.

smbdes.c smbencrypt.c :

	created a function to generate lm and nt owf hashes.

lsaparse.c ntclient.c smbparse.c :

	added nt client LSA_AUTH2 code.  it works, too!

pipenetlog.c pipentlsa.c pipesrvsvc.c :

	simplification.  code-shuffling.  getting that damn offset right
	for the opcode in RPC_HDR.

smb.h :

	changed dcinfo xxx_creds to DOM_CRED structures instead of DOM_CHAL.
	we might need to store the server times as well.

proto.h :

	the usual.
(This used to be commit 82436a3d99)
1997-10-25 10:58:18 +00:00
Luke Leighton
a12f047533 nterr.c :
added a structure that wraps nt errors as strings and enums, so we
	can do a smb_nt_error() function.

Makefile ntclient.c :

	added ntclient.c, broken out nt domain stuff into a separate file.
	getting fed up of compile-times and size of client.c.

	fixed the do_lsa_req_chal() function.  made it read the response,
	and return the challenge credentials received from the server.

	next stop: do_lsa_auth_2().

client.c :

	removed nt domain logon functions into a separate file.

pipenetlog.c pipentlsa.c pipesrvsvc.c smbparse.c :

	i'd broken the offsets of the RPC_HDR while trying to sort out the
	nt client code.  fixed it again.  added some robustness stuff.

util.c :

	the unistrn2() function was null-terminating the string at one
	character too many.
(This used to be commit 39cec7f698)
1997-10-24 13:15:34 +00:00
Luke Leighton
310536a709 missed nmbsync.c when adding setup count and setup pointer arguments to
cli_call_api().  sorting this for jeremy.

there is a discrepancy between the client.c list_servers() and the nmbsync.c
add_info() calls to cli_call_api() - one has an mdrcount of 1024, the other
of zero.

i don't know what difference this makes.
(This used to be commit d8c265c515)
1997-10-23 17:54:21 +00:00
Luke Leighton
203c93e922 general sorting out, from crashes generated by do_lsa_req_chal() in client.c
trying to set up the data parameters etc and not understanding what's going on.

in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received
(and in this instance, generated by do_lsa_req_chal()).  and then noticed
that it's two bytes out.  but i don't know how to do "byte parameters"
and it's not the same format as the LSA_REQCHAL received from nt workstations.

agh!
(This used to be commit 0cc8ce43e1)
1997-10-23 16:17:07 +00:00
Luke Leighton
5cd52a56a4 playing about, trying to SMBopenX a \PIPE\NETLOGON (should be a SMBopen)
and then send a LSA_REQ_CHAL down it.
(This used to be commit 473f21071f)
1997-10-23 13:38:46 +00:00
Luke Leighton
d38aba33af client.c :
send to \PIPE\ not \PIPE\NETLOGON.

ipc.c :

	fstring name not being bzero'd caused problems when calling named_pipe().
(This used to be commit 2393c49b05)
1997-10-22 18:37:43 +00:00
Luke Leighton
a947dff4c0 Makefile client.c :
adding start of undocumented options to do NT domain logons, client-side.
	starting with LSA_REQCHAL.

	the code here happily crashes smbd: i'll investigate this further... :-)

smbparse.c pipeutil.c lsaparse.c :

	moved some of the common make_xxxx() functions out of pipeutil.c
	so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit
	together.  makes sense, really...

	added a make_q_req_chal() function.

	restructured make_rpc_reply() and called it make_rpc_hdr().  created
	functions create_rpc_reply() and create_rpc_response().

pipenetlog.c pipentlsa.c pipesrvsvc.c

	calling new create_rpc_reply() function instead of old make_rpc_reply().

proto.h :

	usual.

smb.h:

	added enum for RPC_PACKET_TYPE
(This used to be commit b88ee3e16c)
1997-10-22 17:51:02 +00:00
Luke Leighton
5897f0493d Makefile client.c clientutil.c clitar.c nmbsync.c :
redid the split that i did a year ago, taking the functions in client.c
	out into clientutil.c.  guess what?  we could now do encrypted password
	NetServerEnum2 calls in nmbd, if we wanted to.

	i can now use cli_call_api() to send to different pipes.  i hope.

pipenetlog.c:

	allow adding to users group _and_ to admin group.  if adding to
	guest group, don't allow adding to users or admin as well.

smb.h :

	added some pipe #defines (\PIPE\NETLOGON \PIPE\srvsvc ...)

proto.h :

	usual.
(This used to be commit 6ee065ce6e)
1997-10-22 14:28:19 +00:00
Andrew Tridgell
6032872209 some cleanups in the clientutil.c code.
I'm actually hoping to remove this module completely once we convert
nmbd to using the new (much cleaner) clientgen.c

smbclient now also reports if it connects as a guest user
(This used to be commit 3af8d855fa)
1997-10-21 09:39:08 +00:00
Andrew Tridgell
ae9b654a6b add ERRDOS/67 ERRnosuchshare to the client.c list of error strings
(This used to be commit 1cccd7c519)
1997-10-16 08:01:00 +00:00
Andrew Tridgell
e5494e2c09 bracket some macros
change MAX_PASSWORD_LENGTH to MAX_PASS_LEN to prevent conflict on some
systems

add #ifdef around soft link dependent code (for systems that don't
have soft links)
(This used to be commit e10ba4b97a)
1997-10-09 06:36:04 +00:00
Jeremy Allison
2e92be3aaf client.c: Changed shadowed variable.
locking.c: Removed USE_OPLOCKS - now the default.
params.c: Removed unused variable.
proto.h: Updated.
reply.c: Removed USE_OPLOCKS - now the default.
server.c: Removed USE_OPLOCKS - now the default.
smb.h: Removed USE_OPLOCKS - now the default.
smbparse.c: Changed shadowed variable.
status.c: Removed USE_OPLOCKS - now the default.
util.c: Removed USE_OPLOCKS - now the default.
Jeremy (jallison@whistle.com)
(This used to be commit b93509846d)
1997-10-06 17:52:25 +00:00
Andrew Tridgell
b6a3fd6777 a bit of bounds checking
(This used to be commit d40199f4fe)
1997-10-04 05:21:47 +00:00
Andrew Tridgell
c549112d4b a little hack to smbclient to support extracting NT error codes
(This used to be commit 0eb9a59043)
1997-10-04 05:21:14 +00:00
Jeremy Allison
cef59090bb Adding Andrews buffer overflow fixes into the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit e7eb1f044d)
1997-09-26 18:55:29 +00:00
Andrew Tridgell
5a7b3294db add error string reporting to clitar
(This used to be commit 2c5587a6fe)
1997-09-26 09:06:51 +00:00
Jeremy Allison
a2d2206cc9 Makefile: Changed proto: target to not include c files not used currently.
Caused proto.h to be from a sorted list of C files.
arcfour.h: Added prototypes.
client.c: Added username%password in environment patch from John Blair <jdblair@frodo.tucc.uab.edu>
loadparm.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au]
username.c: Added username manipulation code from Peter McCool [SMTP:peter@qimr.edu.au]
mkproto.awk: Added arc4_key type.
proto.h: Updated & sorted.
Jeremy (jallison@whistle.com)
(This used to be commit 97ed4fea67)
1997-09-19 17:12:08 +00:00
Andrew Tridgell
102fb71537 John asked the other day about using the tar feature in smbclient to
handle file paths longer than 100 characters (the limit of the normal
tar format).

This patch adds support for producing GNU tar files (which have no
real limit on the path length) in smbclient.

Note that I have only added support for producing GNU tar files, I
haven't added support for accepting them when restoring. I thought I'd
leave that up to John :-)
(This used to be commit d5daf85162)
1997-09-18 06:52:49 +00:00
Andrew Tridgell
33a003de40 This commit does 3 main things:
1) put the encryption code in by default, with no #ifdef. It is still
disabled by default so you need to add "encrypt passwords = yes" in
smb.conf but at least all binaries will have it.

2) cleanup the kanji code so it compiles with no warnings

3) get rid of lots of uses of ugly non-portable C code. The main
offender being things like "register" but also remove uses of the
"const" keyword as there are compilers out there that don't support it
and even those that do often complain about its usage. Users don't
like warnings :-(

There is still some work to do. We need to replace the md4 code with
our own implementation. The current code (from rfc1186) is PD but is
not very portable. The new RFC (rfc1320) is more portable but adds
copyright restrictions. I'll do a from-scratch MD4 soon.

We also need to test that what I've implemented is portable. It should
be, but I'm too tired right now to test it on anything other than
intel linux.
(This used to be commit db917c62c1)
1997-09-14 16:37:18 +00:00
Jeremy Allison
30416c0b8a charcnv.c client.c clitar.c kanji.c kanji.h loadparm.c
mangle.c smb.h util.c:

  Big merge to allow KANJI support to be in the main
binary without explicitly compiling with it.

locking.c: Fix for smbstatus not being able to read files.
namepacket.c: Removed unneccesary debug statement.
trans2.c: Added Luke's proposed fix (ifdefed out until further testing).
nmblookup.c: Fixed bug where query fails and status is done on bogus IP.

Jeremy (jallison@whistle.com)
(This used to be commit 9196255022)
1997-09-11 20:17:32 +00:00
Jeremy Allison
e7e49a6e6a client.c: Made sure myhostname was initialised before substitutions.
status.c: Made sure myhostname was initialised before substitutions.
server.c
trans2.c: Moved OS/2 WPS fix.
Jeremy (jallison@whistle.com)
(This used to be commit 8a12b6a4f0)
1997-09-05 21:32:32 +00:00
Jeremy Allison
473c42a194 includes.h: Make sure REPLACE_GETPASS are wrapped with #ifdefs.
nmbsync.c: Make sure REPLACE_GETPASS is defined before including includes.h
clientutil.c: Catch null passwords.
Fixes for a nmbd crash bug found by Herb Lewis @ SGI.
Jermey(jallison@whistle.com)
(This used to be commit 45c266baae)
1997-08-28 20:59:51 +00:00
Samba Release Account
7971fb1feb charset.c: Added patch for client code page 852 (Eastern European) from
Leos Bitto <bitto@altec.cz>.
clitar.c:
proto.h: Fixed proto mismatch for strslashcmp().
Jermey (jallison@netcom.com)
(This used to be commit c7a4647b7a)
1997-08-27 20:20:58 +00:00
Samba Release Account
4c319ad046 charset.c : Add mapping for code page 932 (KANJI).
client.c : Fix crash bug. Add code to use BUFFER_SIZE for NetServerEnum calls.
namepacket.c: Fixed cast.
nmbsync.c : Add code to use BUFFER_SIZE for NetServerEnum calls.
smb.h : Set default client code page to 932 for KANJI.
system.c : Remove vendor specific code that crept in :-).
util.c : Added #define to allow Samba to behave as Win95 when doing
         KANJI case insensitivity tests.

Jeremy (jallison@whistle.com)
(This used to be commit 7f7d2faa07)
1997-08-25 22:18:31 +00:00
Samba Release Account
75bbf35a86 client.c: Minor change to cast parameters for DEC unix.
clientutil.c:	Minor change to cast parameters for DEC unix.
ipc.c:		Fixes to parameterise the stuff John wants.
loadparm.c:	Fixes to parameterise the stuff John wants.
nameannounce.c: Fixes to parameterise the stuff John wants.
namedbwork.c: Fixes to parameterise the stuff John wants.
nameserv.h:	Fixes to parameterise the stuff John wants.
proto.h: Fixes to parameterise the stuff John wants.
smb.h: Fixes to parameterise the stuff John wants.
util.c: tidy.
Jeremy (jallison@whistle.com)
(This used to be commit 9fbca2594b)
1997-07-30 19:17:51 +00:00
Samba Release Account
01d19fd31d Minor text mods, mostly checking that CVS still works
Dan
(This used to be commit 632bf0dab0)
1997-07-30 10:13:14 +00:00
Samba Release Account
7314126d9e client.c: Added amanda fixes.
clitar.c:	Added amanda fixes.
nameannounce.c:	Removed redundent code.
nameelect.c:	Removed redundent code.
nameserv.h:		Removed redundent code.
nameservresp.c:	Removed redundent code.
namework.c:		Removed redundent code.
password.c:		Prevented crash if getpwnam fails.
Jeremy (jallison@whistle.com)
(This used to be commit 760fe30353)
1997-07-28 18:59:57 +00:00
Samba Release Account
816897d4a2 patch by glenn burkhardt to allow recursive excluding of directories.
glenn@aoi.ultranet.com

lkcl
(This used to be commit 4aac8449ae)
1997-07-24 20:04:16 +00:00
Samba Release Account
15ae50ca52 Makefile: Added UNIXWARE 2.x with shadow passwords from fja@extratech.com
client.c:	Made prompt appear at debug level 0. Fixed strcasecmp redefinition.
            Caused client to use set_blocking rather than making fcntl calls itself.
dir.c:		Removed redundent snum parameters.
includes.h:	Added SCO fixes.
loadparm.c:	Made default 'files to hide' a null string.
nmbd.c:		Removed O_NONBLOCK from pid file open for platforms that dont have it.
proto.h:	Changed snum to cnum where needed. Changed is_xx_path to is_in_path
            (now called via MACRO).
quotas.c:	Swapped setuid/seteuid calls when restoring uid.
reply.c:	Removed redundent snum parameters.
server.c:	Changed snum to cnum where needed. Setup new veto_list, hide_list
            namelists. Added standard_sub changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
shmem.c:	Changed cast for sizeof to be int before negating.
smb.h:		Added new veto_list, hide_list entries to connections.
            Added IS_PRINT, IS_HIDDEN_PATH, IS_VETO_PATH macros.
trans2.c:	Removed redundent snum parameters.
util.c:		Added standard_sub_basic changes from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu> and
            Paul Rippin <pr3245@nopc.eurostat.cec.be>
            Fixed up veto/hidden path processing so the paths are
            pres-parsed and checked for wildcards (for speed).
Jeremy (jallison@whistle.com)
(This used to be commit 9afa36f787)
1997-07-24 17:25:11 +00:00
Samba Release Account
612111c7a1 charset.c: Split charset_initialise() into 2 - a charset_initialise() and
a codepage_initialise(). Fixes problem with initialising dos map
            twice.
charset.h:  Changes to support charset changes.
client.c:   Changes to support charset changes.
loadparm.c:	follow symlinks parameter from David Clerc <David.Clerc@cui.unige.ch>
nmbd.c:		Changes to support charset changes.
nmblookup.c:Changes to support charset changes.
proto.h:	Changes to support charset changes.
reply.c:	Don't call security=server with no user/no password guest. Fix from
            Stefaan A Eeckels <Stefaan.Eeckels@ecc.lu>
server.c:   follow symlinks code from David Clerc <David.Clerc@cui.unige.ch>
smbpasswd.c:Changes to support charset changes.
status.c:	Changes to support charset changes.
testparm.c: Changes to support charset changes.
testprns.c: Changes to support charset changes.
uid.c:		Fixed log message with no \n.
Jeremy (jallison@whistle.com)
(This used to be commit 2a28a6e5e4)
1997-07-18 20:21:32 +00:00
Samba Release Account
25eae02948 Makefile: Added AIX targets from Ole Holm Nielsen <Ole.H.Nielsen@uni-c.dk>
chgpasswd.c:	Added Samba/GPL notice (for obvious reasons).
clitar.c:		Updated Copyright date to include 1997 (for obvious reasons).
getsmbpass.c:	Updated Copyright date to include 1997 (for obvious reasons).
includes.h:		Added stropts for solaris.
loadparm.c:		Changed comment for hide files option.
nameconf.c:		Updated Copyright date to include 1997 (for obvious reasons).
nmbd.c:			Updated Copyright date to include 1997 (for obvious reasons).
pcap.c:			Updated Copyright date to include 1997 (for obvious reasons).
proto.h:		Re-added accidentaly deleted smb_shm_ calls.
quotas.c:		Added AIX quota patch from Ole Holm Nielsen <ohnielse@fysik.dtu.dk>
server.c:		Optimization on calling is_hidden_path. Updated Copyrights.
smb.h:			Changed DEFAULT_FILES_TO_HIDE from  "*/.*" to ".*".
smbpass.c:		Updated Copyright date to include 1997 (for obvious reasons).
ufc.c:			Updated Copyright date to include 1997 (for obvious reasons).
util.c:			Added last component code to is_in_path().
Jeremy (jallison@whistle.com)
(This used to be commit 9385ae1005)
1997-07-08 16:54:44 +00:00
Samba Release Account
fb1429c197 client.c: New print queue query code from Jeff C. Foster " <jfoste@wgc.woodward.com>
ipc.c:			Added code for returning restricted lists of servers.
loadparm.c:		Changed default for force create mode to 000.
				Changed default maxmux to 50 to comply with NT.
locking.c:		Fixed silly crash bug with slow share mode code.
nameannounce.c:	Added code for returning restricted lists of servers.
namedbserver.c:	Added code for returning restricted lists of servers.
nameelect.c:	Added code for returning restricted lists of servers.
namework.c:		Added code for returning restricted lists of servers.
nmbsync.c:		Added code for returning restricted lists of servers.
server.c:		Added quota fix Albrecht Gebhardt <albrecht.gebhardt@uni-klu.ac.at>
smb.h:			Added define for COPYBUF_SIZE.
system.c:		Rename across filesystems Patch from Warren Birnbaum
				<warrenb@hpcvscdp.cv.hp.com>
util.c:			Minor fix for warning.
(This used to be commit 1c6e433caa)
1997-07-01 01:19:13 +00:00
Samba Release Account
c6e63aa896 Makefile: Added quoata changes for Linux from Thorvald Natvig
Makefile.RPM:	Added quoata changes for Linux from Thorvald Natvig
charset.c:	Large changes to add multiple client code pages.
charset.h:	Changed charset_initialise() proto.
client.c:	Fixed message sending bug. Changed charset_initialise().
ipc.c:		Fixed #ifdef compile problems.
loadparm.c:	Added "client code page" option.
nmbd.c:		Changed charset_initialise(). Fixed lmhosts read.
nmblookup.c:	Changed charset_initialise().
proto.h:	Added lp_client_code_page(void).
quotas.c:	Added quoata changes for Linux from Thorvald Natvig
reply.c:	Changed debug level. Made SMBecho ignore tid.
server.c:	Changed charset_initialise().
smb.h:		Added DEFAULT_CLIENT_CODE_PAGE as 850.
smbpasswd.c:	Changed charset_initialise().
status.c:	Changed charset_initialise().
testparm.c:	Changed charset_initialise().
testprns.c:	Changed charset_initialise().
Jeremy Allison (jallison@whistle.com)
(This used to be commit 957025bace)
1997-06-11 01:03:06 +00:00
Samba Release Account
3ab97ebe6d charcnv.c: Fixed silly bugs detected on IRIX.
client.c:	Fixed silly bugs detected on IRIX.
namedbname.c:	Stopped 1d names from being registered in WINS db.
namedbsubnet.c:	Only register 1e names on broadcast subnet.
nameelect.c:	Changed add_my_name entries. Forced host announces if we
                have less than 10 servers listed. Fixed registering 1b
                domain name issues.
namepacket.c:	Added error message when dgram discarded.
nameserv.c:	Added notion of 'direct' names that are not registered on
                the network. Needed to get around bugs in earlier nmbd
                handling of DOMAIN(1b) names.
nameservreply.c:Tidied up debug message.
nameservresp.c:	Added response_name_query_domain() code. Deals with
                re-registering DOMAIN(1b) name.
nmbd.c:		Fixed silly bugs detected on IRIX.
nmblib.c:	Added paranoia debugs.
proto.h:	Updated remove_name_entry(), add_my_name_entry().
server.c:	Fixed silly bugs detected on IRIX.
trans2.c:	Fixed silly bugs detected on IRIX.
uid.c:		Fixed silly bugs detected on IRIX.
version.h:	Updated to alpha3.
Jeremy (jallison@whistle.com).
(This used to be commit f08222bd8b)
1997-05-30 20:40:48 +00:00
Samba Release Account
441855fe0e status.c: Added brief option. Patch from ccctim@mailbox.ucdavis.edu
client.c: Added translation of '/' characters to '\' characters. Suggested by friedl@mtndew.com (Stephen J. Friedl)
charcn.c: Fix for iso8859-2 (Eastern European) conversions based on a patch from Miroslaw M. Maczka <elvisbze@polbox.com>
(This used to be commit 27708a73ce)
1997-05-08 21:17:59 +00:00
Samba Release Account
0f1f0ceb95 'The mother of all checkins' :-). Jeremy Allison (jallison@whistle.com)
Wed May  7 1997: Update for 1.9.17alpha1 release - 'browsefix release'
designed to make browsing across subnets work.

byteorder.h:	Updated copyright to 1997.
charcnv.c:      Updated copyright to 1997.
charset.c 	Updated copyright to 1997.
charset.h	Updated copyright to 1997.
client.c	Updated copyright to 1997.
clientutil.c	Updated copyright to 1997.
dir.c		Updated copyright to 1997.
fault.c		Updated copyright to 1997.
includes.h	Updated copyright to 1997.
interface.c	Updated copyright to 1997.
ipc.c		Updated copyright to 1997.
kanji.c		Updated copyright to 1997.
kanji.h		Updated copyright to 1997.
loadparm.c	Updated copyright to 1997.
locking.c	Updated copyright to 1997.
mangle.c	Updated copyright to 1997.
message.c	Updated copyright to 1997.
nameannounce.c

	Made use of WINS subnet explicit.
Added reset_announce_timer() so announcement
can be made immediately when we become a master.
Expanded code to do sync with dmb.

namebrowse.c

	Removed redundent checks for AM_MASTER in
sync code. Made use of WINS subnet explicit.

namedbname.c	Made use of WINS subnet explicit.
namedbresp.c	Made use of WINS subnet explicit.
namedbserver.c	Made use of WINS subnet explicit.

namedbsubnet.c

	Explicitly add workgroup to WINS subnet
when we become a dmb. Made use of WINS subnet explicit.

namedbwork.c

	Made use of WINS subnet explicit. Removed
redundent check_work_servertype() function.

nameelect.c

	Explicitly add workgroup to WINS subnet
when we become a master browser. Made use of WINS subnet explicit.

namelogon.c	Updated copyright to 1997.
namepacket.c	Updated copyright to 1997.
namequery.c	Updated copyright to 1997.

nameresp.c

	Made use of WINS subnet explicit. Made nmbd fail if
configured as master browser and one exists already.

nameserv.c

	Made use of WINS subnet explicit. Remove redundent
logon server and domain master code.

nameserv.h	Add emumerate subnet macros.
nameservreply.c	Made use of WINS subnet explicit.
nameservresp.c	Updated copyright to 1997.

namework.c

	Made use of WINS subnet explicit. Updated code to
add sync browser entries to add subnet parameter.

nmbd.c

	Added sanity check for misconfigured nmbd.

nmblib.c	Updated copyright to 1997.
nmblookup.c	Updated copyright to 1997.
nmbsync.c

	Removed redundent AM_ANY_MASTER check.

params.c	Updated copyright to 1997.
password.c	Updated copyright to 1997.
pipes.c		Updated copyright to 1997.
predict.c	Updated copyright to 1997.
printing.c	Updated copyright to 1997.

proto.h

	Changed protos for new nmbd code.

quotas.c	Updated copyright to 1997.
replace.c	Updated copyright to 1997.
reply.c		Updated copyright to 1997.
server.c	Updated copyright to 1997.
shmem.c		Updated copyright to 1997.
smb.h		Updated copyright to 1997.
smbencrypt.c	Updated copyright to 1997.
smbpasswd.c	Updated copyright to 1997.
smbrun.c	Updated copyright to 1997.
status.c	Updated copyright to 1997.
system.c	Updated copyright to 1997.
testparm.c	Updated copyright to 1997.
testprns.c	Updated copyright to 1997.
time.c		Updated copyright to 1997.
trans2.c	Updated copyright to 1997.
trans2.h	Updated copyright to 1997.
uid.c		Updated copyright to 1997.
username.c	Updated copyright to 1997.
util.c		Updated copyright to 1997.
version.h

	Changed to 1.9.17alpha1.
(This used to be commit cf23a155a1)
1997-05-08 01:14:17 +00:00
Samba Release Account
02e610b927 name_type for name_query with smbclient -M name should be used. that way,
you get messages to the proper location.

lkcl
(This used to be commit deedac6523)
1997-04-03 16:57:06 +00:00
Samba Release Account
8bc7d6bebd Makefile: Changes to split Solaris into Solaris2.3 and previous, and 2.4 and after from Paul Eggert.
Makefile: Added AMIGA changes from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>.
charset.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at>
charset.h: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at>
clitar.c: Patch to re-sync after read fail from (lost contributor name, sorry).
includes.h: Patch for AMIGA from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>
includes.h: Patch for SunOS atexit by Jeremy (jra@cygnus.com)
interface.c: Patch for AMIGA from Rask Ingemann Lambertsen <rask@k4315.kampsax.dtu.dk>
kanji.h: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at>
locking.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
locking.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com)
pipes.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
proto.h: Patch to fix file locking from Jeremy (jra@cygnus.com)
reply.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
server.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
server.c: Patch for FAST_SHARE_MODE fix from (lost contributor name, sorry).
smb.h: Patch to fix file locking from Jeremy (jra@cygnus.com)
smb.h: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com)
status.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
statuc.c: Patch to add granularity of lock files to usec by Jeremy (jra@cygnus.com)
system.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at>
trans2.c: Patch to fix file locking from Jeremy (jra@cygnus.com)
trans2.c: Patch to fix volume name reported to Win95 from Jeremy (jra@cygnus.com)
util.c: Patch for Western European Languages from Josef Hinteregger <joehtg@joehtg.co.at>
util.c: Patch to fix client_name from continuously returning UNKNOWN (from various contributors).
version.h: Update to 1.9.16p10.
(This used to be commit 03d28fa32e)
1997-01-09 18:02:17 +00:00
Andrew Tridgell
08d00eb68e - added support for TMPDIR env variable
- fixed fault.c for linux 2.1
- put back in the FIND_SELF failing code
- cleaned up casts in encryption
(This used to be commit 3af04f1580)
1996-10-24 00:09:08 +00:00
Andrew Tridgell
dfa2b456c7 - continue when failing to load config file in nmblookup and smbclient
- fix important bug in nmbd where it set the return code for a
negative name response to 0 (which means success!)
(This used to be commit bfa816cc8f)
1996-10-07 11:06:34 +00:00
Andrew Tridgell
38087ccb40 - use workgroup from smb.conf in smbclient
- change debug level on clitar stuff

- define MAP_FILE if not defined

- ensure we never set authoritative on queries in nmbd

- fake a positive response to SMBioctl, apparently this is needed for
some WfWg printer drivers

- deny file access for non-fcbopen queries when (access_allowed == AREAD && flags == O_RDWR)

- add sys_waitpid()
(This used to be commit 61e3116e57)
1996-10-05 02:54:37 +00:00
Andrew Tridgell
e23f2b9cef - changed the umask handling. We now set the umask to 0 and explicitly
set the mode on all created files. I think this is a better policy.

- change the debug levels on some items

- fix a charset handling bug which affected foreign and extended
charset users

- no longer switch back to the original directory when idle, instead
switch to / as the original directory may not be readable by ordinary
users.

- fix some bugs where the create mode of files was not being
explicitly set (it was relying on the umask and using fopen). Not a
big bug as it only affected obscure commands like the messaging ops.

- got rid of the lock code in the lpq cache as its no longer needed

- rewrote smbrun to be faster and to remove the security hole. We now
don't actually need a external smbrun binary, its all done by smbd.

- add a more explicit warning about uids and gids of -1 or 65535
(This used to be commit 5aa735c940)
1996-10-04 09:31:07 +00:00
Andrew Tridgell
afd08462ad backout all the changes to nmbd.
The 1.9.16 tree is now back to 1.9.16p2 as far as nmbd is concerned
apart from a small change that fixes the announce type in two places.
(This used to be commit 45e66a69d3)
1996-10-02 15:41:30 +00:00
Andrew Tridgell
5a2f52b79e - a huge pile of changes from Luke which implement the browse.conf
stuff and also fix a pile of nmbd bugs. Unfortunately I found it very
hard to disentangle the new features from the bug fixes so I am
putting in the new code. I hope this is the last big pile of changes
to the 1.9.16 series!
(This used to be commit 20b6203dac)
1996-10-02 14:09:22 +00:00
Andrew Tridgell
69a458ba2c - fix client for pathworks 4 access
- fix "connection already connected" bug in open_socket_out()
(This used to be commit fcce452557)
1996-08-22 16:09:27 +00:00
Andrew Tridgell
9155889092 - add timeouts to connect() for password server connections. This
makes multiple password servers practical.
(This used to be commit 5c3e8326cc)
1996-08-22 06:32:03 +00:00
Andrew Tridgell
0c33046a0a - added "netbios name" option in smb.conf to make controlling the name
that samba uses possible

- added "socket address" option to allow virtual SMB servers (on
systems with IP aliasing line Linux)

- disabled FAST_SHARE_MODES by default in Linux as older Linux boxes
can't do shared writeable mappings. We really need autoconf ...

- added new option types in loadparm so a string type can be specified
ot be uppercase only, this is used for the workgroup and netbios name
options

- auto-create the lock directory if it doesn't exist in shared mem
startup

- get rid of announce_backup()

- change a few comments in nmbd code

- rewrote the chaining code completely. Hopefully it will handle any
depth chains now.

- added LPRng support
(This used to be commit e9eac6cd49)
1996-08-19 11:17:29 +00:00
Andrew Tridgell
efb8113d00 - made FAST_SHARE_MODES standard for Linux
- you can now press enter after a password prompt with "smbclient -L
hostname" and it will use a blank username and password, the same as
if you used -U%

- changed the wins.dat store code to not go via a string variable
(just use fprintf instead)

- removed a "unsigned long" that luke put back in, changing it to
uint32 to keep 64 bit machines happy. Naughtly luke!

- allow guest non-connnected print queue listings so ms client 3 can
work
(This used to be commit 917160dee6)
1996-08-17 14:27:12 +00:00
Andrew Tridgell
396311075c - sequent-ptx support from bressler@iftccu.ca.boeing.com (Rick
Bressler)
- machten support from Trevor Strohman (trev@figment.tenon.com)

- added qinfo command to client as part of drag-and-drop printer
support for win95 from David Chappell <chappell@mouse.cc.trincoll.edu>
He also added the "printer driver" option

- use sigblock() on more systems and use sigsetmask(0) instead of
sigunblock() as its more portable. This beats a problem with zombies
on heavilily loaded systems.

- added internals.doc written by David Chappell into the source tree

- get rid of PRINT_COMMAND options from local.h as they are no longer
relevent

- new kanji code from Fujita

- don't set the recursion_available flag on queries in nmbd

- fix a potential bug with pointer subtraction in printing.c

- got rid of error_count code as the real fix (the EOF problem) is now
in
(This used to be commit aa6f8b04d1)
1996-08-13 08:57:55 +00:00
Andrew Tridgell
2b4b7b4e1a fix a bug that we've had for a long time where we don't handle EOF
properly from clients, and end up looping like mad.

At least I _hope_ this is fixed.
(This used to be commit a7c7d7afe2)
1996-07-30 15:47:30 +00:00
Andrew Tridgell
1924f08d84 the client now loads the smb.conf config file so it can get the
interfaces info, and the workgroup right.
(This used to be commit fabd4230f1)
1996-07-24 06:14:23 +00:00
Andrew Tridgell
124beb45f8 fix up problems with "smbclient -L". It now uses a generic
NetServerEnum with no workgroup attached if the workgroup is
"WORKGROUP" (the default in the Makefile) and uses the specific
NetServerEnum (with workgroup attached) otherwise.
(This used to be commit 6fa3468c9b)
1996-07-22 12:00:39 +00:00
Andrew Tridgell
201fefd658 removed some debug stuff from luke
(This used to be commit 1fd1d7c27c)
1996-07-18 10:09:01 +00:00
Samba Release Account
25b30c08dc lots of changes to nmbd
lkcl
(This used to be commit 45d3b26447)
1996-07-17 18:33:36 +00:00
Andrew Tridgell
07fcf2df03 - moved the protocol defs in the client to keep sill C compilers happy
- added change for cnum range in reply_tdis()
(This used to be commit 609c3a5e1e)
1996-07-03 01:58:27 +00:00
Andrew Tridgell
7e3b4a1c0d got rid of a lot of redundent header files as we now globally generate
prototypes automatically using "make proto". This is much less prone
to error than the old method of manually adding prototypes
(This used to be commit b551dc98f7)
1996-06-10 04:38:24 +00:00
Andrew Tridgell
b9ae225b28 - added interface.c and removed all the references to myip, bcast_ip
and Netmask, instead replacing them with calls to routines in
interface.c

- got rid of old MAXINT define

- added code to ensure we only return one entry for each name in the ipc
enum routines

- added new_only option to add_netbios_entry() to prevent overwriting
of important names

- minor time handling fixup
(This used to be commit 7ed71b73ae)
1996-06-06 11:43:09 +00:00
Andrew Tridgell
e38afbf382 - changed some debug levels in clientutil.c
- added dir_check_ftype() to clean up the file type checking a bit

- added check for libc version >= 5 for setfsuid() for Linux

- moved the AM_MASTER() and related macros to nameserv.h

- added proper defines for the various netbios announce types

- don't call the announce_backup() code, as I'm pretty sure its wrong
it sent ANN_GetBackupListReq packets as broadcasts, they are supposed
to be used only by clients to the master browser to find a list of
available backup servers to remote a netserverenum to, I don't think
nmbd should ever send one.

- fixed a bug in the browse list writing

- minor debug cleanups

- put in the code to discard our own broadcasts (it won't work for
multi-homed hosts though)

- changed ELECTION_VERSION to 1 so we can be beaten by a NT 3.51 server by
lowering the os level.

- only do sync_browse_lists() if we are the master browser, otherwise
we'll cause network overload

- don't call tell_become_backup() as it appears to be badly broken, it
should only be used when the machine being told has its MAINTAIN_LIST
to to auto. Not calling it does no great harm anyway

- fix a nasty bug where becomebackup was confused with reset browser!

- make setbuffer() not get caught by the auto protototypes
(This used to be commit cfbad9b082)
1996-06-05 15:16:09 +00:00
Andrew Tridgell
a2641cfe00 Did more integration of Lukes code ready for the first release.
I've now got WINS registration working, and refresh working. Its
looking pretty good so far, but needs lots of testing.
(This used to be commit 045014aa57)
1996-06-04 15:14:47 +00:00
Andrew Tridgell
a2c1623827 a huge pile of changes :-)
The biggest thing is the integration of Lukes new nmbd. Its still
largely untested, so we will really need some feedback

I've also added auto prototype generation and cleaned up a lot of
minor things as a result
(This used to be commit 0d8dcfa13c)
1996-06-04 06:42:03 +00:00
Andrew Tridgell
58734631b4 Lots of changes!
- add faq info on NT printer handling
- add "delete readonly" option to help rcs users
- add stuff to man pages on new printer options
- add "proxy name resolution" option
- add "command string" -c option to smbclient (thanks Ken)
- split time functions into time.c
- rearrange the quotas stuff a bit and fix some bugs
- complete rehash of the time handling code thanks to Paul Eggert
- fix nmblookup output a bit
- add plp print queue parsing from Bertrand Wallrich
(This used to be commit 635b56f19c)
1996-05-31 15:13:29 +00:00
Andrew Tridgell
3ae4d22406 - handle CORE protocol better
- handle case where director exists when untarring
(This used to be commit 7d7bad70d3)
1996-05-05 11:12:54 +00:00
Samba Release Account
0e8fd33987 Initial version imported to CVS
(This used to be commit 291551d807)
1996-05-04 07:50:46 +00:00