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

493 Commits

Author SHA1 Message Date
Jeremy Allison
55f400bd84 This is *not* a big change (although it looks like one).
This is merely updating the Copyright statements from 1997 to 1998.
It's a once a year thing :-).
NO OTHER CHANGES WERE MADE.
Jeremy.
(This used to be commit b9c1697723)
1998-01-22 13:27:43 +00:00
Jeremy Allison
118213c059 printing.c: Bug fix for lpng reporting.
server.c: Large fix for oplock deadlock bug.
util.c: Fix for oplock deadlock bug.
Jeremy.
(This used to be commit 4cae830ab3)
1998-01-22 09:25:05 +00:00
Jeremy Allison
1ea8ceac45 charcnv.c: Added codepage 866 support onto the file system. Patch
from Max Khon <max@iclub.nsu.ru>.
chgpasswd.c: Allow old RAP change password to work with encrypted
passwords. Samba can now allow Windows 95/NT clients to securely
change the Lanman password ! (But not the NT hash - that gets lost).
ipc.c:
smbdes.c:
smbpass.c: Support for the above.
server.c: #ifdef'ed out fix for NT redirector bug.
util.c: Fix NIS bug with server name.
Jeremy.
(This used to be commit cd9fad92d0)
1998-01-17 07:08:21 +00:00
Jeremy Allison
4f9674d1c8 reply.c:
server.c: Test fix for NT worstation SMBmv oplock bug.
smbdes.c: Addition of 'forward' parameter in preparation of allowing
password change.
Jeremy.
(This used to be commit 0b0b1fb122)
1998-01-16 08:58:00 +00:00
Jeremy Allison
7ab9d270fe reply.c: Added timestamp to attack warning.
server.c: Fixed security=share problem where the vuid was still being
looked at.
Jeremy.
(This used to be commit ab8d615fe2)
1998-01-15 04:57:54 +00:00
Andrew Tridgell
221fda2454 *** empty log message ***
(This used to be commit 7b031586ca)
1998-01-12 00:20:10 +00:00
Andrew Tridgell
385e40c5dc *** empty log message ***
(This used to be commit 440535a0c7)
1998-01-11 23:59:11 +00:00
Andrew Tridgell
b13a8bdb40 *** empty log message ***
(This used to be commit a307b51555)
1998-01-11 23:28:39 +00:00
John Terpstra
0e7be48597 Following discussions with Cristian Gafton (Red Hat) we have decided to make
PAM silent about it's actions. This reduced error logging for EVERY password
validation request. Refer to password.c PAM section for further info.
Fiels Affected: password.c
(This used to be commit 7a1a8042dd)
1998-01-10 11:42:29 +00:00
Jeremy Allison
5c6525003c ipc.c: Fixed problem where we were not returning 'buffer too small'
when NT sends up a mdrcnt of zero.
Jeremy.
(This used to be commit 2a75519b85)
1998-01-10 08:11:15 +00:00
Christopher R. Hertel
10f844c988 Fixed an apparent typo:
2551c2551
< #endif /NO_FORK_DEBUG */
---
> #endif /* NO_FORK_DEBUG */
Chris -)-----
(This used to be commit 954fc7e0d0)
1998-01-08 03:04:55 +00:00
Jeremy Allison
6e2acebc77 Ensure that if we are in share mode security that the smb_uid
field is invalid.
Jeremy.
(This used to be commit a689ca1ce5)
1998-01-07 08:29:15 +00:00
Herb Lewis
19d7833b7a fix printer driver rpc to prevent core dumps.
(This used to be commit 0c82d139e3)
1998-01-02 13:33:20 +00:00
Herb Lewis
0a5073e985 fixes to make_printerdef.c to generate a correct printers.def file
changes to ipc.c to use new printers.def file
(This used to be commit 52e275c4cc)
1998-01-01 13:55:28 +00:00
Jeremy Allison
aef2c5d699 Added SIGUSR1/SIGUSR2 handling.
Sending nmbd/smbd a SIGUSR1 will raise the debug level by one (capped at 10)
sending a SIGUSR2 will lower it (lower limit at zero).
Jeremy.
(This used to be commit 6a3cb6f4b4)
1997-12-24 09:30:56 +00:00
Jeremy Allison
08bd3b8cc0 Fixed nastly little bug where client was sending open_and_X call
with smb_mode (smb_vwv[3]) of 0x20 == DENY_WRITE + read-only-open.
and smb_ofun (smb_vwv[8]) of 0x11 == Create if not exist plus append
on a read-only share.
This was mapped into the strange unix flags of (O_RDONLY|O_CREAT)
- essentially O_CREAT as O_RDONLY == 0.
We were checking the unix flags directly against O_RDONLY instead
of masking off the open mode flag bits before doing the comparison,
so this open was being refused even though it was valid on a
read-only share.
Also ensured that the O_CREAT bit was masked out of the flags
bit if the open was done on a read-only share (as doing a unix
open( filename, O_RDONLY|O_CREAT, xxx) will create a zero length
file if the user had permission to write into the directory - which
should be denied on a read-only share.
Thanks to Mark Peek @ Whistle for giving me this test case.
Jeremy.
(This used to be commit eae921ac63)
1997-12-23 13:21:36 +00:00
Jeremy Allison
d4979e7727 Fixed security bug when 'force user' and 'user only' are set.
Reported by Brian McCauley <B.A.McCauley@bham.ac.uk>.
Jeremy.
(This used to be commit 00067800a2)
1997-12-23 11:30:58 +00:00
Jeremy Allison
d1e796d857 Fixes to compile under OpenBSD from "Todd T. Fries" <toddf@acm.org>
Jeremy.
(This used to be commit 3c92925059)
1997-12-23 07:15:59 +00:00
Jeremy Allison
d57c055478 loadparm.c: Added fix for veto oplock files bug from Charles Hoch <hoch@hplcgh.hpl.hp.com>
server.c, util.c: Added fix for oplock break requests blocking due to server being
                  blocked in read call. Bug found by Charles Hoch <hoch@hplcgh.hpl.hp.com>.
Jeremy.
(This used to be commit 209f894fdb)
1997-12-20 10:52:00 +00:00
Jeremy Allison
42e0d9a1f0 trans2.c: Forced trans2_findfirst to behave as NT does in error returns.
util.c: Applied fix from Branko Cibej <branko.cibej@hermes.si> where
StrnCaseCmp tests one character too many.
Jeremy.
(This used to be commit cb771b2667)
1997-12-20 05:25:37 +00:00
Andrew Tridgell
662eaecee6 give out file handles differently on each new connection because of a
common bug in MS clients where they try to reuse a file descriptor
from an earlier smb connection. This code increases the chance that
the errant client will get an error rather than causing corruption
(This used to be commit 677d7a5a13)
1997-12-14 18:45:51 +00:00
Jeremy Allison
164c9db4de Fixed bug reported by Gert-Jan Vons <Gert-Jan.Vons@ocegr.fr>
with doing a dir /s into a unix directory ending in a ':'.
Jeremy.
(This used to be commit 273978b7d7)
1997-12-12 09:10:01 +00:00
Andrew Tridgell
87df23458e allow local_machine and remote_machine (%L and %m macros) to contain
spaces
(This used to be commit 93f0619e04)
1997-12-03 03:57:29 +00:00
Andrew Tridgell
69460b470f allow users to disable the NetWkstaUserLogon call in server level
security by changing a setting in local.h or adding it to their
Makefile. See comment in local.h
(This used to be commit cc10fdf758)
1997-12-03 03:43:05 +00:00
Andrew Tridgell
a53d7c1164 changing the comment in find_new_file() to say why a base of 1 is used
(This used to be commit 2b0f3fd149)
1997-12-02 23:29:57 +00:00
Andrew Tridgell
7097597fd6 HPUX trusted systems need to use bigcrypt() not crypt()
(This used to be commit 979eaf9e9c)
1997-12-02 23:27:40 +00:00
Jeremy Allison
c4aaa6bc3f asyncdns.c: Removed warning when compiling with -DSYNC_DNS.
nameelect.c: Tidied up settings of work->ServerType when unbecoming things.
nmbd.c: Fixed pidFile warning.
server.c: Fixed pidFile warning.
Jeremy.
(This used to be commit 94d53dcac5)
1997-12-02 19:00:18 +00:00
Jeremy Allison
15a6097263 clientgen.c: Added cli_mv() (used in a recent torture test).
reply.c: Changed reply_open_and_X to split out the oplock
request bits from core and extended and if an oplock was granted only set
the corresponding bit on reply.
server.c: Added code to dynamically allocate i/o buffers in oplock_break
(prevents recursion problems) , also made reset of sent_oplock_break
explicit.
Jeremy.
(This used to be commit 16e55ee2b8)
1997-11-30 02:58:34 +00:00
Andrew Tridgell
ec8e33cde6 use -1 not 0xffffffff in SIVALS() macros
use the same process_exists() code on all systems (it's probably
faster anyway)
(This used to be commit 901b95aa77)
1997-11-29 13:29:13 +00:00
Andrew Tridgell
cf9d07cc7d added a sent_oplock_break element to Files[] as a paranoia check so we
can't sent a oplock break twice on the same file.

changed some debug levels in the oplock code to level 0 so we can
track down a bug

zero the returned Files[] entry in find_free_file()

don't try to overcome client bugs in the handling of non-encrypted
passwords if in server level security mode

added paranoid null termination of password buffers

slight change to my ajt_panic() routine
(This used to be commit e360c79c9c)
1997-11-29 02:40:31 +00:00
Andrew Tridgell
bca5c727af there was a bug in my oplock bugfix :-)
It's fixed properly now :-)
(This used to be commit a6a04b5c6c)
1997-11-28 03:39:04 +00:00
Andrew Tridgell
f822c17d35 fixed a very nasty oplock bug. We could send oplock break requests on
files that aren't open if the file happened to close while the oplock
was in transit. We would end up sending a oplock break request on
another random file (actually the open file that happened to have the
highest fnum). Then we wouldn't get a response, so smbd would keep
sending and would actually flood the net with an infinite number of
oplock break requests!
(This used to be commit 0da20e0aec)
1997-11-28 03:30:24 +00:00
Andrew Tridgell
31e8936b9a added some debug lines to the rename code
(This used to be commit ee3042eefb)
1997-11-20 01:36:36 +00:00
Jeremy Allison
689ed3481d ipc.c: Changed reply_trans to use receive_next_smb() to cope
with local message processing.
reply.c: Added check to reply_lockingX for chain after oplock break.
server.c: Added receive_next_smb().
trans2.c: Changed reply_trans2 to use receive_next_smb() to cope
       with local message processing.
(This used to be commit f4ae644e13)
1997-11-18 23:30:49 +00:00
Jeremy Allison
9f804556c4 loadparm.c : Added "veto oplock files" parameter.
make_printerdef.c: Fixed warning.
quotas.c: Fixed irix root errors.
server.c: Fixed oplock reference count bug.
smb.h: Added IS_VETO_OPLOCK_PATH().
Jeremy.
(This used to be commit c28487df63)
1997-11-17 19:16:38 +00:00
Jeremy Allison
daa6189910 Left global_oplock_break set while request to break oplock is
outstanding to client. Done to allay Andrews' fears about
readbraw crossing on the wire :-).
Jeremy.
(This used to be commit 2fe8a730d9)
1997-11-11 01:19:32 +00:00
Andrew Tridgell
5c3f9f4e2c auto-create the locks directory on startup
(This used to be commit a0ab8fe54c)
1997-11-11 00:48:42 +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
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
b9c6add645 ipc.c :
added a #define around the alignment thing: it's a way to stop
	NetMonitor from decoding your packets!!!!

proto.h :

	usual.

reply.c :

	added what i believe to be the correct error messages for getting
	correct domain joining.

smb.h :

	some guesses at good names of the SAMR_XXXX functions.  sorting
	out the SAMR_LOOKUP_RIDS function.  this is *not* the same as
	the LSA_LOOKUP_RIDS function, unless paul accidentally put it
	on the ntlsa pipe by mistake, instead of the samr pipe :-)

rpc_pipes/lsa_hnd.c rpc_pipes/pipe_hnd.c :

	moved creation and allocation of unique policy handles into this module.

rpc_pipes/pipesamr.c rpc_pipes/samrparse.c rpc_pipes/smbparse.c :

	SAMR_LOOKUP_RIDS is beginning to look _suspiciously_ like the
	LSA_LOOKUP_RIDS function.  but i know that there are subtle
	discrepancies.
(This used to be commit 6bc07b0b41)
1997-11-07 03:28:43 +00:00
Christopher R. Hertel
f9bbcb3fb3 Modified Files:
mangle.c server.c proto.h

mangle.c
  I am planning to replace the mangled_stack array with a proper stack,
  but found many style inconsistencies (no, really).  As you might expect,
  I have standardized on my own preferences.  ;)

  I also found a potential problem in create_mangled_stack (which I've
  renamed as reset_mangled_stack).  If the stack size were passed into
  the function as 0 or less, there was the possibility that the array
  would have been freed twice.  I doubt that this ever happens, but I
  don't like to leave holes.

  Of course, the fix will be irrelevent once I replace the array with
  a linked-list-based stack.

server.c
  Changed the call to create_mangled_stack() to a call to reset_mangled_stack().

proto.h
  Regenerated to match the above changes.  (A real comment!  How unusual!)
(This used to be commit 34d1b3e4fa)
1997-11-07 03:06:24 +00:00
Jeremy Allison
36e5b646d9 ipc.c: Changing back arbitrary alignment change until I know *why*
luke changed it.
proto.h: The usual.
uid.c: Fix crash bug when attaching with smbclient -mCORE. A vuid
pointer was being used when it was null.
Jeremy.
(This used to be commit ff94f97cf2)
1997-11-06 23:34:51 +00:00
Luke Leighton
bd529d7a83 following a cvs error, i am rewriting this monster-commit. with bad grace.
Modified Files:
---------------

Makefile:

	adding extra files

ipc.c :

	send_trans_reply() - alignment issue.  this makes the alignment
	the same as that in NT.  this should be looked at by people who
	understand the SMB stuff better than i.

	api_fd_commands[] - added samr and wkssvc pipes.

loadparm.c :

	lp_domain_controller() changed to mean "samba is a domain controller".
	it's a "yes/no" parameter, now.  no, it isn't used _anywhere_.

namedbwork.c nameelect.c :

	if "domain controller = yes" then add SV_TYPE_DOMAIN_CTRL to the
	host _and_ workgroup announcements.  yes, you must do both: nt does.

namelogon.c :

	important NETLOGON bug in SAMLOGON request parsing, which may be
	the source of some people's problems with logging on to the Samba PDC.

password.c :

	get_smbpwnam() renamed to get_smbpwd_entry().

pipes.c :

	added samr and wkssvc pipes.

proto.h :

	usual.  can we actually _remove_ proto.h from the cvs tree, and
	have it as one of the Makefile dependencies, or something?

reply.c :

	get_smbpwnam() renamed to get_smbpwd_entry() - also changed response
	error code when logging in from a WORKSTATION$ account.  yes, paul
	is right: we need to know when to return the right error code, and why.

server.c :

	added call to reset_chain_pnum().

	#ifdef NTDOMAIN added call to init_lsa_policy_hnd() #endif.  jeremy,
	you'd be proud: i did a compile without NTDOMAIN, and caught a link
	error for this function.

smb.h :

	defines and structures for samr and wkssvc pipes.

smbpass.c :

	modified get_smbpwnam() to get_smbpwd_entry() and it now takes
	two arguments.  one for the name; if this is null, it looks up
	by smb_userid instead.

	oh, by the way, smb_userids are actually domain relative ids
	(RIDs).  concatenate a RID with the domain SID, and you have
	an internet globally unique way of identifying a user.

	we're using RIDs in the wrong way....

	added mod_smbpwnam() function.  this was based on code in smbpasswd.c

rpc_pipes/lsaparse.c :

	added enum trusted domain parsing.  this is incomplete: i need
	a packet trace to write it properly.

rpc_pipes/pipe_hnd.c :

	added reset_chain_pnum() function.

rpc_pipes/pipenetlog.c :

	get_smbpwnam() function renamed to get_smbpwd_entry().

	arcfour() issues.

	removed capability of get_md4pw() function to automatically add
	workstation accounts.  this should either be done using
	smbpasswd -add MACHINE$, or by using \PIPE\samr.

rpc_pipes/pipe_util.c :

	create_pol_hnd() - creates a unique LSA Policy Handle.  overkill
	function: uses a 64 bit sequence number; current unix time and
	the smbd pid.

rpc_pipes/smbparse.c :

	arcfour() issues.

	smb_io_unistr2() should advance by uni_str_len not uni_max_len.

	smb_io_smb_hdr_rb() - request bind uses uint16 for the context
	id, and uint8 for the num_syntaxes.  oops, i put these both as
	uint32s.


Added Files:
------------

rpc_pipes/lsa_hnd.c :

	on the samr pipe, allocate and associate an LSA Policy Handle
	with a SID.  you receive queries with the LSA Policy Handle,
	and have to turn this back into a SID in order to answer the
	query...

rpc_pipes/pipesamr.c rpc_pipes/samrparse.c

	\PIPE\samr processing.  samr i presume is the SAM Replication pipe.

rpc_pipes/pipewkssvc.c rpc_pipes/wksparse.c

	\PIPE\wkssvc processing.  the Workstation Service pipe?


holy cow.
(This used to be commit 1bd084b3e6)
1997-11-06 23:03:58 +00:00
Jeremy Allison
ec35f1c1cc local.h: Added OPLOCK_BREAK_TIMEOUT_FUDGEFACTOR.
proto.h: The usual.
server.c: Added timestring() messages to oplock logs. Added fix
          to allow file open processing to continue is an oplock
          break message times out.
Jeremy.
(This used to be commit c453692171)
1997-11-06 19:11:16 +00:00
Jeremy Allison
cdc6099647 Rolling back the files
loadparm.c : to equivalent to version 1.67
reply.c : to equivalent to version 1.69
server.c : to equivalent to version 1.122
util.c : to equivalent to version 1.98

to remove the incorrect changes.

proto.h: The usual.

rpc_pipes/smbparse.c : Backeting stuff that SHOULD NOT BE IN THE
                       none-NTDOMAIN build !

Jeremy.
(This used to be commit 6064c9d80f)
1997-11-03 19:24:45 +00:00
Luke Leighton
b26623bc3a Christian Lademann's contribution: new capabilities in smb.conf.
'<' and '|' characters indicate read file and execute command respectively,
and feed the output into the parameter (!!!).

'<$' and '|$' means run standard_sub_basic() on them.

this is going to be fun to document in smb.conf.5....

also, Christian created a new "online" service parameter.  services can
be taken "off-line"....
(This used to be commit 15f44d2891)
1997-11-02 20:35:20 +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
Andrew Tridgell
03deca0070 re-initialise the timezone on each new connection. This means you
don't need to restart smbd after a DST change.
(This used to be commit 2a50d5d5ed)
1997-11-01 07:22:18 +00:00
Luke Leighton
55e2dc7c6f storing pipe name state (from set named pipe handle state call) in the
pipes array.
(This used to be commit 5335d5cdc4)
1997-10-30 21:51:15 +00:00
Luke Leighton
739a730637 Makefile:
simply adding pipes.o to SMBDOBJ3.

rpc_pipes/pipe_hnd.c :

	created pipe handles module.

pipes.c server.c :

	use of pipe_hnd functions in SMBopenX and SMBclose, on the IPC$ pipe.
(This used to be commit ada256b5e3)
1997-10-30 17:08:42 +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
1337b61703 zero data parameter being passed to smb_io_rpc_hdr(), which couldn't cope.
(This used to be commit c0137cd8fe)
1997-10-29 20:08:09 +00:00
Luke Leighton
520878fd1f ipc.c ntclientpipe.c:
response to Bind Acknowledgment needs a lookup table for the PIPE string
	(secondary address in RPC_HDR_BA structure).

smbparse.c util.c :

	interesting problem, i think caused by us typecasting a uint16* buffer
	to char*.  found on a SPARC.
(This used to be commit 420408ee83)
1997-10-29 19:05:34 +00:00
Luke Leighton
0db5b8fdc9 ipc.c :
bind ack should contain \PIPE\pipename not just pipename.

ntclientpipe.c :

	sanity in bind ack: pipe name checks; transfer syntax checks; reason checks.
(This used to be commit c2e2197e9d)
1997-10-29 14:34:17 +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
Jeremy Allison
8f0316bdbc Adding Windows 95 printer driver code donated by Jean-Francois.Micouleau@utc.fr.
New program, make_printerdef, plus two new parameters :

[global] "printer driver file"
[local] "printer driver location"

Jeremy.
(This used to be commit 9a5b42e6b3)
1997-10-28 19:32:59 +00:00
Andrew Tridgell
7c20ee083f refuse pathworks type R connect (patch from Stephen Tweedie)
(This used to be commit c63fee2b28)
1997-10-28 06:07:07 +00:00
Luke Leighton
f868196c1d checks against file handle in api_fd_reply(). i don't know what error
message should be returned, so i just let it fall through to sending an
"api_unsupported"
(This used to be commit 85d132da67)
1997-10-27 16:14:29 +00:00
Andrew Tridgell
71d648cdb4 change the default file permissions on the SHARE_MEM_FILE* to
0644. smbstatus now gets only read permission on the share files and
does no locking.

also get rid of some unnecessary umask(0) calls. smbd always runs with
umask(0)
(This used to be commit c6ac10170d)
1997-10-27 14:27:17 +00:00
Andrew Tridgell
464dc54336 also disable read prediction in 1.9.18
(This used to be commit 0f15558efb)
1997-10-27 13:38:07 +00:00
Andrew Tridgell
8047228db4 Fixed 2 oplock bugs:
1) the oplock macros in smb.h used | where they should have used
&. This means that smbd thought that all clients were always
requesting oplocks. This would have _really_ confused smbclient
and smbfs when they started receiving async oplock break requests when
they don't even know what an oplock is!

2) an oplock break request from a client can be embedded in a normal
lockingX request, and will be if the client has batched any lock
requests internally. The smbd code assumed that all oplock break
requests had num_locks==num_ulocks==0 which is not true. The only
thing special about a oplock break request with
num_locks==num_ulocks==0 is that no reply is sent. Otherwise it is
processed as a normal locking request in addition to the oplock break
processing.

These two fixes get the MS mail system in Win98 working on a Samba
1.9.18 network drive.

Andrew
(This used to be commit ed71534df5)
1997-10-27 12:02:34 +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
Jeremy Allison
abb255cfe6 Big change to make nmbd code more readable/understandable.
Main change is removal of find_name_search() confusion.
This has been replaced with find_name_on_subnet() which
makes it explicit what is being searched.

Also changed wins_subnet to be wins_client_subnet in
preparation for splitting the wins subnet into client
and server pieces.

This is a big nmbd change and I'd appreciate any
bug reports.

Specific changes follow :

asyncdns.c:
     Removed wins entry from add_netbios_entry(). This is now
     explicit in the subnet_record parameter.

interface.c:
     iface_bcast(), iface_nmask(), iface_ip() return the
     default interface if none can be found. Made this
     behavior explicit - some code in nmbd incorrectly
     depended upon this (reply_name_status() for instance).

nameannounce.c:
     find_name_search changes to find_name_on_subnet.

namebrowse.c:
     wins_subnet renamed to wins_client_subnet.

namedbname.c:
     find_name_search removed. find_name_on_subnet added.
     add_netbios_entry - wins parameter removed.

namedbsubnet.c:
     find_req_subnet removed - not explicit enough.

nameelect.c:
     wins_subnet renamed to wins_client_subnet.

namepacket.c:
     listening() simplified.

nameresp.c:
     wins_subnet renamed to wins_client_subnet.

nameserv.c:
     find_name_search moved to find_name_on_subnet.

nameserv.h:
     FIND_XXX  -> changed to FIND_SELF_NAME, FIND_ANY_NAME.

nameservreply.c:
     find_name_search moved to find_name_on_subnet.
     Debug entries changed.

nameservresp.c:
     wins_subnet renamed to wins_client_subnet.

namework.c:
     wins_subnet renamed to wins_client_subnet.

nmbd.c:
     wins parameter removed from add_netbios_entry.

nmbsync:
     wins_subnet renamed to wins_client_subnet.

proto.h: The usual.

server.c:
     remove accepted fd from fd_set.

Jeremy (jallison@whistle.com)
(This used to be commit 2c97b33fc0)
1997-10-23 22:30:57 +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
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
Jeremy Allison
325738bd27 WHATSNEW.txt: Updated for alpha3.
server.c: int16 -> uint16 fix for port comparisons in oplock code.
          Needed for Solaris.
version.h: Updated to alpha3.
Jeremy (jallison@whistle.com)
(This used to be commit 2d9645e99b)
1997-10-21 22:51:21 +00:00
Jeremy Allison
79b314447b chgpasswd.c:
includes.h: SCO changes.
server.c: Added code in open_sockets to allow 'bind interfaces only' to
          work as documented.
Jeremy (jallison@whistle.com)
(This used to be commit 46ac5928d9)
1997-10-21 18:27:55 +00:00
Luke Leighton
efe9b26a7b loadparm.c :
added "domain admin users" parameter
	added "domain guest users" parameter

	these two complement the "domain groups" parameter.  the "domain groups"
	parameter should be for your own groups, and well-known aliases.

util.c :

	added ability to do "domain groups = power_users admin_users backup_ops"
	which are well-known RID aliases, not well-known RID groups.

pipenetlog.c :

	combine the "domain admin users"; "domain guest users" and "domain groups"
	parameters to give an array of RID groups to include in the SAM Logon
	response.

ipc.c smb.h :

	moved REALLOC() into smb.h
	added RID #defines.

proto.h:

	usual.
(This used to be commit f2554f231d)
1997-10-21 18:25:14 +00:00
Andrew Tridgell
0083afc90e damn, I spelt EACCES wrong.
actually it's wrong in the linux man page for utime ...
(This used to be commit 267b56de10)
1997-10-21 13:15:20 +00:00
Andrew Tridgell
bb9ca7fd64 check for EPERM or EACCESS in file_utime()
(This used to be commit afd7592ffd)
1997-10-21 13:03:46 +00:00
Andrew Tridgell
8f13fb0bdc don't check lp_alternate_permissions() in the new utime workaround
code. lp_alternate_permissions() is intended only to affect the
display of file permissions, not what you can actually do with the
files.
(This used to be commit 454802d592)
1997-10-21 12:55:49 +00:00
Andrew Tridgell
0aa3935917 fix the order of become_uid() and become_gid() in become_root(). This
was a harmless bug but left log entries

code cleanup in reply_lanman2()
(This used to be commit 8e90e1ef27)
1997-10-21 11:54:57 +00:00
Andrew Tridgell
0891bb6a91 rewrote the password server code using the new clientgen.c client
interface

The new code uses a source netbios name equal to the Samba servers
name, not the client name. It also uses NetWkstaUserLogon to do a full
network logon. This means it will honour the servers logon
restrictions (such as login times etc).
(This used to be commit 11de90f972)
1997-10-21 09:34:33 +00:00
Andrew Tridgell
ea92c8d3f1 add some debug info
(This used to be commit b22fa0d7e3)
1997-10-21 09:09:55 +00:00
Jeremy Allison
79f4fb52c1 loadparm.c: Changed 'interfaces only' parameter to 'bind interfaces only'. Added
'dos filetimes' parameter for UTIME fix.
locking_shm.c: Fixed typo (sorry Andrew :-).
namepacket.c: Changed lp_interfaces_only() to lp_bind_interfaces_only().
proto.h: The usual.
reply.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
server.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
system.c: Added Andrew's sanity checks to times in sys_utime().
time.c: Moved set_filetime() to server.c. Made null_mtime()global.
trans2.c: Made filetime calls use new file_utime call (wrapper for sys_utime).
Jeremy (jallison@whistle.com)
(This used to be commit 41a1d81c11)
1997-10-20 18:52:04 +00:00
Luke Leighton
423a7c4171 util.c password.c :
added automount_server() function which, if -DAUTOMOUNT is in use,
	returns the server name of the NIS auto.map entry.  otherwise,
	it returns local_server.

	added use of automount_server() for a new substitution %N for NIS
	home server.  this defaults, via automount_server(), to the same
	functionality as %L if -DAUTOMOUNT is not used.

	removed vuser->home_share.  moved code that grabbed the servername
	into the separate function automount_server().

loadparm.c :

	created "logon drive" (default of "")
	created "logon home"  (default of "\\%N\%U")
	changed default of "logon path" from NULL to "\\%N\%U\profile".

ipc.c pipenetlog.c :

	use lp_logon_drive(), lp_logon_home() and lp_logon_path() in their
	now easier-to-use form (don't have to check if *lp_logon_path() and
	manually substitute a default of \\%L\%U and do a standard_sub_basic()
	on the result, because the default automatically does this.
(This used to be commit c6c28a4c3c)
1997-10-20 12:10:58 +00:00
Andrew Tridgell
3e670e4057 a major share modes reorganisation.
The shares modes code is now split into separate files. The shared
memory implementation is in locking_shm.c. The slow implementation is
in locking_slow.c

It is all controlled by a struct share_ops structure that has function
pointers to the implementation of all the functions needed by a share
modes implementation. An initialisation function sets up this
structure. This will make adding new implementations easy and clean.

This also allowed me to get rid of the ugly code in smbstatus. Now
status.c links to the locking code and calls methods in share_ops.

I also renamed some things and generally organised things in a much
cleaner fashion. Defines and structures specific to each
implementation have been moved to the appropriate file and out of
smb.h.
(This used to be commit 65ab9adaa0)
1997-10-20 08:46:00 +00:00
Andrew Tridgell
f4b4b3e6e3 casting cleanups
(This used to be commit ab849a9782)
1997-10-20 02:50:12 +00:00
Luke Leighton
30ed3b5c77 pipes.c pipesrvsvc.c :
moved stub srvsvc pipe function into separate file, in preparation for
	further work.
(This used to be commit 2f2d18cc94)
1997-10-19 12:24:23 +00:00
Luke Leighton
0225c88104 put the NT_STATUS_ALLOTTED_SPACE_EXCEEDED error in instead of 0x99.
whatever that means.
(This used to be commit ce54f3a7a9)
1997-10-18 15:01:01 +00:00
Christopher R. Hertel
10087a663b Simply moved the #include for ubi_dLinkList.h from within dir.c to
includes.h.  More consistent with current practice.
(This used to be commit cb51c860b3)
1997-10-17 21:06:20 +00:00
John Terpstra
b676826bec Added Michael Johnsons' PAM modifications <johnsonm@redhat.com>
This patch has been checked over. JHT
(This used to be commit c84a043f89)
1997-10-16 05:33:24 +00:00
Christopher R. Hertel
50147ca41c Made changes to the dir cache functions:
- They now use the ubi_dLinkList linked list code.
  This is not a big gain, I suppose.  It would be significant if there
  were lots of doubly-linked lists in the code and I replaced them all.
  The only other advantage is that the code is more modular, which
  appeals to my own sense of order, if no one elses.  :-}
- I allocate space for the entry structure and the strings in one go,
  instead of using malloc() and separate strdup() calls.  This should
  be more efficient, and allows for a single call to free() to free the
  whole thing.
These are very minor changes, but they do serve to make me more familiar
with the code overall.
(This used to be commit 1dafef8887)
1997-10-16 01:03:18 +00:00
Jeremy Allison
359d42c08d ipc.c: Adding Andrews become_root code to the main branch.
locking.c: Adding Andrews become_root code to the main branch.
pipes.c: Fixing the close_file issue.
proto.h: The usual.
reply.c: Move smb_pass into NTDOMAIN defined code. Fixing the close_file issue.
server.c: Fixing the close_file issue.
trans2.c: Fixing the close_file issue.
uid.c: Adding Andrews become_root code to the main branch.
Jeremy (jallison@whistle.com)
(This used to be commit 16fd4337f7)
1997-10-15 21:53:59 +00:00
Luke Leighton
d838452413 smb.h smbparse.c pipenetlog.c :
whoops, the SAM Logon structure was wrong.  updated this, and
	cifsntdomain.txt.  more debug info in pipenetlog.c.  the crash
	is somewhere around deal_with_credentials().

byteorder.h :

	put in uint8, uint16 and uint32 typecasts around debug info, because
	sign extending was resulting in ffffffe8 being displayed instead of e8.

credentials.c :

	some debugging info, because i'm tracking a coredump.  without gdb.
	nothing like making things difficult.

reply.c :

	whoops, missed this (important) bit from paul's code, which tells
	the NT workstation that the MACHINE$ entry doesn't already exist,
	and we're going to create a default entry with a password "machine"
	right now.

proto.h:

	the usual.
(This used to be commit ed606bc7d4)
1997-10-15 19:16:38 +00:00
Luke Leighton
df4afea583 added srvsvc basic pipe, straight from paul's code. does NETSHAREENUM
and NETSERVERGETINFO.
(This used to be commit 96b17b829f)
1997-10-15 16:51:03 +00:00
Andrew Tridgell
91e56c7b7b force the salt to be a maximum of 2 characters long in calls
to crypt()

This might solve some password problems, particulary on HPUX
(This used to be commit 45f4ae4327)
1997-10-15 04:04:38 +00:00
Luke Leighton
1035aa9c73 split pipes.c down into util, netlog and ntlsa.
(This used to be commit 8fe02c239d)
1997-10-13 15:55:54 +00:00
Luke Leighton
fcc885e016 debugging... no idea what i'm doing.
(This used to be commit d7a9a02e0a)
1997-10-13 14:19:17 +00:00
Luke Leighton
2225fe1376 debug info added
(This used to be commit a3f96555b4)
1997-10-13 13:35:37 +00:00
Luke Leighton
081dcc7e8b checked in a file with a compile error. oops!
(This used to be commit 28d96c7e6d)
1997-10-13 12:55:07 +00:00
Luke Leighton
2259e56a94 byteorder.h :
debugging output wasn't (still isn't) perfect.

credentials.c lsaparse.c smbparse.c :

	added DEBUG strings.

pipes.c :

	lost some changes, to do with setup of RPC headers.  arg.
(This used to be commit 9fdd697d17)
1997-10-13 12:21:56 +00:00
Luke Leighton
db20ab9bbd getting somewhere.
ipc.c :

	removed srvsvc pipe reference: have to do that.

pipes.c lsaparse.c smbparse.c :

	more debugging info.  looks a bit like netmon output.
(This used to be commit e02aa88e25)
1997-10-12 19:02:55 +00:00
Luke Leighton
78f6bc4eba updated rpc header reply: callid wrong; alloc hint a uint32 not a uint16.
still doesn't get rid of the netlogon trans2 request with zero data.
(This used to be commit 0cf67955f0)
1997-10-12 17:07:35 +00:00
Luke Leighton
60575a888a ipc.c:
debugging info.  found that data = NULL because of short packet length
	indicated from the ntlsaRPC pipe _royally_ stuffs NT's packet handling.
	maybe this should go down as a service denial bug to the ntbugtraq list.

pipes.c lsaparse.c smbparse.c :

	added more debug stuff.  added length of header to data_len in MSRPC
	fragment_length field (0x18 bytes short) which caused the above bug
	from NT 4.0.  oops.
(This used to be commit a6f8de6815)
1997-10-12 14:17:55 +00:00
Luke Leighton
a26037ac7c added debugging macros (suitable eventually for use in tcpdump, hopefully)
(This used to be commit 946d73cf83)
1997-10-12 11:46:42 +00:00
Andrew Tridgell
b6dd030b45 remove { and } from the list of illegal characters in filenames. The
CIFS3 spec does not list them as illegal.

This allows things like the control panel icon to be placed on a Samba
drive.
(This used to be commit d2ac9e6fb6)
1997-10-12 03:48:47 +00:00
Luke Leighton
422c54ff38 added api_lsa_sam_logon() and api_sam_logoff(). that's it. lots of
run-time debugging, now.
(This used to be commit 75f32987d8)
1997-10-10 19:48:51 +00:00
Luke Leighton
7f296a8f90 added lsa_reply_srv_pwset()
(This used to be commit 0d043cfef2)
1997-10-10 18:03:30 +00:00
Luke Leighton
b94ddf082d ipc.c :
#if NTDOMAIN
		call to api_netlogRPC
	#endif

lsaparse.c :

	renamed lsa_io_q_auth2 to lsa_io_q_auth_2.

pipes.c :

	added api_lsa_reply_auth_2() and api_netlogRPC.

proto.h :

	the usual.
(This used to be commit e2e1979b62)
1997-10-10 16:40:23 +00:00
Luke Leighton
c5e739febe Makefile:
added credentials.c to smbd

credentials.c:

	using credential structures instead of char*

password.c uid.c server.c:

	added sid and attr to user_struct.

smbdes.c:

	smbhash and str_to_key make public instead of private.

pipes.c smb.h:

	lsa structures, sub-functions.

proto.h:

	usual.
(This used to be commit 87a0a94485)
1997-10-10 14:48:05 +00:00
Jeremy Allison
805749baab nmblookup.c: Added -A ability to do status on ip address.
smb.h: Added defines we will need for NT SMB calls.
trans2.c: Fixed SMB_QUERY_FILE_ALT_NAME_INFO return - this is only
for short name returns (and only used when you negotiate NT SMB calls
to boot !).
Jeremy (jallison@whistle.com)
(This used to be commit 53915bd160)
1997-10-10 01:32:26 +00:00
Jeremy Allison
f3f44f7dbb local.h: Fix spelling mistake :-).
namedbsubnet.c: Stop registering 1x name unless we can be a local master.
reply.c: Remove ERRbaddirectory code.
server.c: Remove abort() - use exit_server() instead.
trans2.c: Remove ERRbaddirectory code.
Jeremy (jallison@whistle.com)
(This used to be commit 7624722889)
1997-10-09 18:40:52 +00:00
Luke Leighton
3dd03e4bb7 added #ifdef NTDOMAIN. added call to api_ntLsarpc instead of api_Lsarpc
in ipc.c iff NTDOMAIN is defined.
(This used to be commit 7bc4c4c27b)
1997-10-09 16:14:53 +00:00
Luke Leighton
5a3ea52d4a pipes.c:
added api_ntlsarpcTNP() function.  hooray!

smb.h:

	added LSA #defines needed by above function.
(This used to be commit 5437f66698)
1997-10-09 15:48:40 +00:00
Luke Leighton
ad54a56714 credentials.c:
use UTIME structure (defined and commented in smb.h to be time, secs,
                         since 01jan1970)

pipes.c:

	another sub-function.

util.c:

	added char *unistr2(uint16 *buff) function.  same as unistr except
    it takes uint16* instead of char*.

smbparse.c smb.h:

	more structure sorting.

proto.h:

	the usual.
(This used to be commit 72a86f514f)
1997-10-09 14:40:46 +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
10424272be Put in fix for read-prediction extending files bug. Hard to test, can't
get read-prediction to happen :-).
Jeremy (jallison@whistle.com)
(This used to be commit fa69b3dda4)
1997-10-08 22:23:47 +00:00
Luke Leighton
f40427291e added a dummy function (space in front so make proto doesn't pick it up)
to call the unused static functions in pipes.c.  avoids need to move
#if UNDEFINED_NTDOMAIN about, to stop compiler warnings while code is
being developed, but might be released as-is.
(This used to be commit d7f41e3815)
1997-10-08 21:36:42 +00:00
Jeremy Allison
74113cd60e Makefile: Split definitions for SGI4,5,6.
includes.h: Split definitions for SGI4,5,6.
pipes.c: Moved Luke's #ifdef to remove warnings.
quotas.c: Two changes for FreeBSD and SGI.
server.c: Quota changes for large filesystems.
Jeremy (jallison@whistle.com)
(This used to be commit b8ff5543b9)
1997-10-08 20:34:13 +00:00
Luke Leighton
b270732424 added api_lsa_lookup_sids() function
(This used to be commit 35dd48740d)
1997-10-08 18:36:34 +00:00
Luke Leighton
8871297885 loadparm.c proto.h:
added lp_domainsid()

lsaparse.c smb.h:

	debugging structures and parsing functions

pipes.c:

	finally got to the functions that will go into the RPC switch statement.
(This used to be commit d15aed8a9c)
1997-10-08 17:12:07 +00:00
Luke Leighton
827aa6bc6a updating lsaparse.c and smbparse.c in line with changes to pipes.c and smb.h
from yesterday.
(This used to be commit 0b7049fae2)
1997-10-08 11:47:46 +00:00
Jeremy Allison
b0bdb42bd1 ipc.c: Added ERROR_MORE_DATA error if client buffer too small.
server.c: Allow admin_user on read only shares. I think this is
safe but it needs looking at.
Jeremy (jallison@whistle.com)
(This used to be commit cc50955a27)
1997-10-08 00:21:39 +00:00
Jeremy Allison
fb27bc139f locking.c: Added fix for race condition in slow share mode code.
lsaparse.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS.
pipes.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS.
server.c: Fixed last known oplock race condition.
smb.h: Re-removed USE_OPLOCK defines - someone checked in an old version.
smbparse.c: #ifdef'ed out code so this will compile - LUKE PLEASE CHECK THIS.
Jeremy (jallison@whistle.com)
(This used to be commit 1e1366ddc5)
1997-10-07 18:46:19 +00:00
Luke Leighton
577ae65ca5 pipes.c:
more static unused functions in pipes.c for the LSA RPC stream.

smb.h:

	corrections and altercations over the documentation

lsaparse.c:

	reflecting alterations in LSA structures...
(This used to be commit bef12478d2)
1997-10-07 18:18:10 +00:00
Luke Leighton
a3b7bdd7b9 pipes.c:
some routines to create LSA RPC packets.  none of them are used.

lsaparse.c:
smbparse.c:
smb.h:

	more tidy-up.
(This used to be commit b37e21273e)
1997-10-07 14:58:07 +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
5059fbf44f fix some "shadows global" errors.
(This used to be commit 25b7ada358)
1997-10-04 05:24:02 +00:00
Jeremy Allison
3c5998e29b Race condition with multiple oplock break requests happens
more often than you might think (reproduced here with 4 clients
and netbench :-).
Raising debug log level for report from 1 to 3.
Jeremy (jallison@whistle.com)
(This used to be commit 23eeab7aa2)
1997-10-04 00:23:57 +00:00
Jeremy Allison
2f7b04061e locking.c: Fixed incorrect parameter count in debug statements. May explain
solaris crashes.
reply.c: Added NT specific error code. Put oplock break code in correct place
         in reply_lockingX.
server.c: Removed unneeded error mapping stuff.
          Fixed race condition in oplock code.
trans2.c: Added NT specific error code.
util.c: Added paranoia check in interpret_addr. Some core dumps
        reported here. Upped fcntl debug levels.

Andrew. Please check the NT specific error code handling (search
for the string "/* Ugly - NT specific hack - but needed (JRA) */",
this makes NT and 95 clients behave correctly here - please check
your Visual Basic apps with this code.

Jeremy (jallison@whistle.com).
(This used to be commit 97ee4a5f69)
1997-10-03 20:36:06 +00:00
Andrew Tridgell
2534e0688b add "static" to a couple of functions that are only used locally.
set granted_oplock=False at the start of open_file(). This is
paranoia.
(This used to be commit c7f09ffd4a)
1997-10-03 03:34:19 +00:00
Jeremy Allison
4438d7b57e proto.h: Updated.
server.c: Updated after netbench observation. Oplocks must be
broken *before* share modes are checked, not after. Netbench seems
to be working now.
smb.h: Added offsets for oplock break time fields.
trans2.c: Upped debug messages.
util.c: Upped debug messages.
Jeremy (jallison@whistle.com)
(This used to be commit bc4b70c566)
1997-10-03 03:15:24 +00:00
Andrew Tridgell
a69125bae9 change a debug level in reply.c
change from ERRbaddirectory to ERRbadpath for ENOTDIR errors. This
reverts to the old Samba code. I've done quite a bit of testing
against NT4 and have yet to get it to produce the ERRbaddirectory
error code. Producing ERRbaddirectory made a visual basic application
that was sent to me not run. This might explain some of the "it
doesn't work any more" complaints we've got about 1.9.17.

Jeremy, can you remember how you got NT to produce ERRbaddirectory?
There might be some specific circumstances we need to cover.
(This used to be commit 1ed901ddff)
1997-10-02 14:11:34 +00:00
Jeremy Allison
fbd5dded7d Added debug message for oplock_break().
Jeremy (jallison@whistle.com)
(This used to be commit 4f29dfbc79)
1997-10-02 03:26:07 +00:00
Andrew Tridgell
85097a7c17 change the semantics of hosts allow/hosts deny so that a global
setting applies to all shares regardless of any settings on other
shares. This allows us to immediately drop a connection if it does not
come from a allowed host, without even parsing the first SMB
packet. The next time we get a nasty security hole we can offer people
the option of just setting their hosts allow line.

If we drop a connection in this way we generate a "Not listening for
calling name" response and then exit.


add a per share "oplocks" option in smb.conf. I think its important to
be able to disable oplocks on a per-share basis as there are occasions
then they are definately not wanted, for example when sharing data
between a windows box and a unix application. This also allows us to
tell people "try disabling oplocks" when diagnosing problems.


fix a bug in process_smb(). It was taking the length of the packet
from outbuf, not inbuf (this bug was introduced with the oplocks
code). Jeremy, I assume this wasn't deliberate?
(This used to be commit 44bc9f239a)
1997-10-02 03:14:32 +00:00
Jeremy Allison
c9cf77a6bb Modified some debug messages, moved from 5 -> 8.
Jeremy (jallison@whistle.com)
(This used to be commit cb83c74a6c)
1997-10-02 02:36:11 +00:00
Jeremy Allison
c557bb0517 Fixed problem with oplock_type being set with no port.
Jeremy (jallison@whistle.com)
(This used to be commit 90484db0bf)
1997-10-02 00:57:59 +00:00
Jeremy Allison
5864551aef OPLOCK CHECK-IN - oplocks are now *OPERATIONAL* !!!!
Yipeee. At least as far as I can check in a short time :-).

local.h: Changed OPLOCK_BREAK_TIMEOUT to 30 seconds.
locking.c: Big changes to delete oplocks on a share mode entry.
proto.h: updated.
reply.c: Added oplock break code in lockingX reply & readbraw reply.
server.c: Add batch oplock code. Force server shutdown if client fails
          to respond to oplock break.
smb.h: Fix silly slow share mode oplock define bug.
status.c: Add oplock status info.

Jeremy (jallison@whistle.com)
(This used to be commit 4c83d37239)
1997-10-01 23:32:22 +00:00
Jeremy Allison
a0cd12e221 dir.c: more pstrcpys.
local.h: Add OPLOCK_BREAK_TIMEOUT.
password.c: Fix for paranoia password server security bug.
proto.h: Updated.
reply.c: Oplock changes.
server.c: Massive oplock changes - nearly there....
smb.h: oplock definitions.
util.c: Add local message processing queues for oplocks.
Jeremy (jallison@whistle.com)
(This used to be commit 92f1553db2)
1997-09-30 02:38:19 +00:00
Jeremy Allison
a5af479e5d Fixed you're -> your text that some pedant complained about :-).
Jeremy (jallison@whistle.com).
(This used to be commit b11833f1bd)
1997-09-26 19:40:12 +00:00
Jeremy Allison
dff16872ca Syncing up current oplock work in progress. #ifdef'ed out
so should have no effect on other work.
Jeremy (jallison@whistle.com)
(This used to be commit 7e3d4c8b21)
1997-09-26 19:26:56 +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
Jeremy Allison
6dd6b1383c Makefile: Removed earlier errors.
includes.h: Added INADDR_LOOPBACK define.
locking.c: More code to support oplocks.
proto.h: Updated.
server.c: More code to support oplocks. Moved processing of an SMB out of
process() into a separate function so it is easier to call from an oplock
break.
smb.h: Added oplock fields.
Jeremy (jallison@whistle.com)
(This used to be commit f46dbaf08e)
1997-09-25 00:25:44 +00:00
Jeremy Allison
81eb442e88 Checkin to sync up oplock development code so that NT
domain development code won't diverge.

Makefile: Fixed make proto (again). Added GLIBC2 fixes for Linux.
includes.h: Added GLIBC2 fixes for Linux.
proto.h: Much tidier.
quotas.c: OSF/1 quota fix.
reply.c: Fix from Ray Frush <frush@engr.colostate.edu> for zero NT timestamps.
server.c util.c: First oplock checkin - nowhere near finished so bracketed
with #ifdef USE_OPLOCKS. Done to make sync with NT domain code easier.
Jeremy (jallison@whistle.com)
(This used to be commit 7dce7d8447)
1997-09-23 19:19:06 +00:00
Andrew Tridgell
570a5becfc added some debug stuff
(This used to be commit 95184fd1ec)
1997-09-18 07:05:43 +00:00
John Terpstra
a8064b0f00 JHT ===> Changed behaviour of logon script processing so that all macros
can be used in the logon script parameter definition in the smb.conf
         Globals section. This fixes a problem reported by Jacco de Leeuw
         where OS/2 does not see the %u variable. Jacco suggested using %U
         but we really do want the user for the netlogon share session.
         If this does not do the trick - well we eat our hat! Yeh!
(This used to be commit a7716b2e70)
1997-09-17 13:53:59 +00:00
Jeremy Allison
1590983eb0 Added 'delete veto files' paremeter. Ugly - but the only
way to allow Samba client users to delete directories
containing Mac metafile information (.AppleDouble directories).

Needed for clean integration with netatalk.

Jeremy (jallison@whistle.com)
(This used to be commit 29c6c037dc)
1997-09-17 01:29:53 +00:00
Andrew Tridgell
cda707f917 add a cast
(This used to be commit e712c6ed61)
1997-09-16 08:26:33 +00:00
Andrew Tridgell
57c2578cb2 - change generate_challenge() to use md4 instead of des
- move routines about a bit between smbencrypt.c and smbdes.c. Ensure
that there is no entry point for normal DES operation

- add the following comment:

   This code is NOT a complete DES implementation. It implements only
   the minimum necessary for SMB authentication, as used by all SMB
   products (including every copy of Microsoft Windows95 ever sold)

   In particular, it can only do a unchained forward DES pass. This
   means it is not possible to use this code for encryption/decryption
   of data, instead it is only useful as a "hash" algorithm.

   There is no entry point into this code that allows normal DES operation.

   I believe this means that this code does not come under ITAR
   regulations but this is NOT a legal opinion. If you are concerned
   about the applicability of ITAR regulations to this code then you
   should confirm it for yourself (and maybe let me know if you come
   up with a different answer to the one above)
(This used to be commit 35b92e725f)
1997-09-16 04:41:16 +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
3469592833 Added fix that means if connecting user sends guest account
with no password they are seen as guest. Previous patch
broke this.

Jeremy (jallison@whistle.com)
(This used to be commit 9a55c49626)
1997-09-12 16:29:36 +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
ab68ac375e Fix from Frank Varnavas <varnavas@ny.ubs.com>.
We cannot use the same name as the client to
the NT password server, as NT will drop client
connections if the same client name connects
twice. Instead, synthesize a name from our pid.
and the remote machine name.
Jeremy (jallison@whistle.com)
(This used to be commit ebf9487a9a)
1997-09-04 21:23:27 +00:00
Jeremy Allison
f5302af621 Fixed up determination of client type for PROTOCOL_NT1. Uses client
capabilities bits in session_setup_and_X to decide. Made remote_arch
an enum as well as a string, for easier use.
Jeremy (jallison@whistle.com)
(This used to be commit 99080705a2)
1997-09-04 20:26:07 +00:00
Jeremy Allison
82290216ad nameannounce.c
nameresp.c
nameserv.c
nameservreply.c
proto.h : Removed broadcast and recurse parameters in the
queue_netbios_pkt_wins() call - they are not needed as they
should always be 'false' and 'true' respectively.
Also fixed a bug with secure name registration (WINS
server code).
server.c: Finally fixed problem with error 267 being
returned to Win95. It is needed by NT. This is a horrid
fix and I would appreciate a better one :-).

Jeremy (jallison@whistle.com)
(This used to be commit fa1305d189)
1997-09-03 20:15:40 +00:00
Jeremy Allison
e1e4b37ac7 reply.c: Removed unused variables. Caught by gcc -Wall -Werror
server.c: Fix for old DOS clients not understanding ERRbaddirectory - map to ERRbadpath.
util.c: Fix for systems with no LOG_DAEMON facility.
Jeremy (jallison@whistle.com)
(This used to be commit dadb1ffb4c)
1997-09-02 22:21:38 +00:00
Luke Leighton
3fc24dc9ed added word count 3 support into reply_tcon_and_X (see cifs6.txt). the
only thing i couldn't do was get the chaining word count to point to
the end of the smb reply, for the next and_X (not that there is one).
(This used to be commit 54f11999d2)
1997-08-31 14:14:22 +00:00
Andrew Tridgell
f434139087 fixed a bug in the printjob encoding/decoding. We weren't doing it for
the print_ functions in reply.c, with the effect that you couldn't
cancel print jobs from smbclient or from older dos clients.

we now use a couple of utility functions printjob_encode() and
printjob_decode() rather than sticking the bitops inline in each
place.

also fixed a bunch of places that used foo%0xFF rather than foo&0xFF

Note that this isn't really me doing the commit, it can't be as I'm
working on my thesis ...
(This used to be commit 3556763be3)
1997-08-31 02:18:59 +00:00
Jeremy Allison
d95652780a Oops. Reversed mangled map change made in error. Testing
found this one. Jeremy (jallison@whistle.com)
(This used to be commit adf98469fc)
1997-08-28 22:54:41 +00:00
Jeremy Allison
45f9982930 mangle.c: Fixed bug that caused string to run off the end of the mangled map.
server.c: Changed comparison from dname to name2 - seems correct - don't know why
          I changed it originally. hmmmmm.
trans2.c: Made lanman2 code more similar to scan_directory(). I should
          make the trans2 code call scan_dir as they are so similar.
Jeremy(jallison@whistle.com).
(This used to be commit 3909576849)
1997-08-28 18:59:52 +00:00
Samba Release Account
38dc53828e doing that irritating compiler clash warning with the protos for standard_sub
and standard_sub_basic.  again.

lkcl
(This used to be commit b60ef755cf)
1997-08-27 19:27:25 +00:00
Samba Release Account
41bbc5e21f smb.h: Added error code used for OS2 WPS.
trans2.c: Added OS2 WPS fix - but ifdefed out for now. Will turn on
after 1.9.17 release.
Jeremy (jallison@whistle.com)
(This used to be commit 9d5d347686)
1997-08-26 01:28:27 +00:00
Samba Release Account
46dbd8c060 Changes to allow Samba to return the same error code as Windows NT.
Takes care of the cases where a Windows program is parsing a pathname
component by component and expects 2 different errors.
ERRbadpath - if a component in the path doesn't exist.
ERRbaddirectory - if a component in the path exists but is not a directory.
Extra error code added to smb.h to support this.
Code based on suggestions from "Christian Groessler" <chris@fast-ag.de>.

Jeremy (jallison@whistle.com)
(This used to be commit 28b3c6db8a)
1997-08-20 20:32:23 +00:00
Samba Release Account
c76dc7c296 Fix suggested by "Christian Groessler" <chris@fast-ag.de>
dir.c: Cause dptr_create to return -2 when failing on unix error.
reply.c: Use UNIXERROR in more cases.
server.c: Add ENOTDIR mapping to error table.
trans2.c: Correctly determine UNIX error on dptr_create.
Jeremy (jallison@whistle.com)
(This used to be commit de38a0b34f)
1997-08-20 01:22:05 +00:00
Samba Release Account
e9269c67a5 Makefile: Changed for HPUX10 tidyup.
includes.h:	Changed for HPUX10 tidyup.
ipc.c:		Fixed bug where getting local server list from NT browsers would
            fail.
nmbsync.c:	Fixed bug where getting local server list from NT browsers would
            fail.
proto.h:	Changed for crash bug on SCO with USE_MMAP.
quotas.c:	Added OSF quotas (patch from Bret Giddings <bret@essex.ac.uk>).
            Rolled back solaris uid change - I think it was wrong.
reply.c:	Changed for crash bug on SCO with USE_MMAP.
server.c:	Removed Lukes changes. Changed for crash bug on SCO with USE_MMAP.
smb.h:		Changed for crash bug on SCO with USE_MMAP.
smbpasswd.c:Fixed crash bug with Lukes changes.
uid.c:		Removed Lukes changes.
util.c:		Fixed I18N bug with extended char filenames and widelinks = no.
Jeremy (jallison@whistle.com)
(This used to be commit bf1c79f7fd)
1997-08-19 19:22:26 +00:00
Samba Release Account
ea4c7557dd connecting to IPC$ goes under the guest account. the IPC$ share should
be treated no differently than any other share (for any security setting:
user, server or share).

this will clear up a bug where, when clients connect to the IPC$ share, this
used to be done under the guest account.  the standard_sub_basic() macros
will substitute the _guest_ account for %U, causing the samba server to
look different from when the client then connects to any other share.

lkcl
(This used to be commit 3852656960)
1997-08-17 21:03:12 +00:00
Samba Release Account
b65fdef1ba includes.h: Fixed S_IFLNK for old DEC ultrix.
ipc.c:	Finally :-) fixed responses to NetServerEnum2 when SV_TYPE_ALL
        given.
Jeremy (jallison@whistle.com)
(This used to be commit 1dc37c8350)
1997-08-13 20:16:32 +00:00
Samba Release Account
9170cfd4b6 spelling.
lkcl
(This used to be commit 7e326450cf)
1997-08-11 18:06:44 +00:00
Samba Release Account
b5114b41f5 Makefile: Added IRIX 6 target.
loadparm.c: Fixed stupid static warnings with set_default_server_announce_type.
password.c:	Fixed char -> uchar cast warnings.
nameservreply.c: Fixed group fade out code.
Jeremy (jallison@whistle.com)
(This used to be commit a2dd5c5a55)
1997-08-05 01:31:55 +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
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
834518eddd loadparm.c: Changed default create mask to 755 to support MAP_ARCHIVE.
server.c:	Added check for MAP_ARCHIVE before we set archive bit.
Jeremy (jallison@whistle.com)
(This used to be commit d21a166277)
1997-07-24 22:42: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
a3de6a813e charset.c: Fixed signed/unsigned issues.
password.c:	Fixed problem with MS-Exchange services.
Jeremy (jallison@whistle.com)
(This used to be commit e723dd3dee)
1997-07-22 19:04:40 +00:00
Samba Release Account
0cdc68332d Removed lp_killunused() call from server main loop. This
WAS A MAJOR BUG THAT CAN CAUSE IPC$ to be removed !!!!!
Not sure how this one got introduced (but I have my
suspicions :-). lp_killunused() MUST ONLY BE CALLED from
reload_services().
Jeremy (jallison@whistle.com)
(This used to be commit 937f0fbf87)
1997-07-22 18:35:44 +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
8b904f4ecc Makefile: Added krb5 option from Nathan Neulinger <nneul@umr.edu>
includes.h:	Added krb5 option from Nathan Neulinger  <nneul@umr.edu>, added SGI5 fix.
password.c: Added krb5 option from Nathan Neulinger  <nneul@umr.edu>
quotas.c: Added inode quote fix.
reply.c: removed redundent code.
server.c: Changed error debug to 0, removed redundent check.
util.c: Added close_low_fd() to become_daemon - fix for rsh from Johnathan Knight.
Jeremy (jallison@whistle.com)
(This used to be commit 256afb7648)
1997-07-17 20:11:58 +00:00
Samba Release Account
0776dea81f local.h: Removed ununsed SHARE_MODES_XXX defines. Upped SMBD_RELOAD_CHECK
from 10 to 60.
server.c:	Removed unused code (was If 0'ed out).
trans2.c:	Backed out Luke's ctime->mtime change. I don't think it
            is correct. Left the other fixes, though.
util.c:		Changed veto/hide files separator back to '/'.
Jeremy (jallison@whistle.com)
(This used to be commit b47121624c)
1997-07-14 19:45:34 +00:00
Samba Release Account
136732a6f4 counter loop % usage only worked if counters were an exact multiple of
SMBD_LOOP time.  used >= instead.

lkcl
(This used to be commit c881dff3bf)
1997-07-13 14:05:01 +00:00
Samba Release Account
9a8c54f51b trans2 query file/path info - unix change times being reported as dos create
times.  now reports unix modified times as dos create times: the alternative
is to report zero (unknown create time).

w95 reports the info level 0x101 (smb query file basic) as data size 40 bytes
not 36.  put 40 bytes data instead.

put in comments into trans2 set file/path info, showing which is the create
time, which is the mod time.

lkcl
(This used to be commit ff455e4059)
1997-07-12 14:41:26 +00:00
Samba Release Account
792771ecc9 interface.c: Fix for AIX4.x finding interfaces.
server.c:		Subtle fix for filenames containing ':'.
Jeremy (jallison@whistle.com)
(This used to be commit ee9f57bab2)
1997-07-11 00:54:45 +00:00
John Terpstra
cec799512d JHT ==> Added copyright notations for my works. This is regretably needed!
(This used to be commit c80111cdf5)
1997-07-09 11:04:45 +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
bc4d8cb306 missed one OpenDir() and two is_vetoed_name() calls, both of which take
a service number as a parameter, in the rmdir code, when doing a recompile.

lkcl
(This used to be commit e095e339e6)
1997-07-06 14:07:00 +00:00
Samba Release Account
1fe89d0b71 added, tested and debugged new "hide files" option.
lkcl
(This used to be commit 60af320a43)
1997-07-06 13:48:10 +00:00
Samba Release Account
f6384eca67 Fix for deleting directories that contain only veto files.
Needed for interoperability with netatalk volumes.
Jeremy (jallison@whistle.com)
(This used to be commit e72a8513bc)
1997-07-03 19:44:06 +00:00
Samba Release Account
fc3901122d Fixes for UnixWare 2.x with shadow passwords from
Warren Young <tkennedy@cyberport.com>.
(This used to be commit 885b42b447)
1997-07-03 17:19:46 +00:00
Samba Release Account
594f8a4361 Fixed compile warnings for FreeBsd & Linux.
Jeremy (jallison@whistle.com).
(This used to be commit 93352e1aae)
1997-07-02 01:19:41 +00:00
Samba Release Account
1599e41ec4 Rolled back Lukes changes. Not quite ready for prime time.
Jeremy (jallison@whistle.com)
(This used to be commit ed04ec7ab8)
1997-07-01 20:50:57 +00:00
Samba Release Account
ce9baa3bac made "hide files" and "veto files" into per-service parameter sections,
instead of just [global].  this makes it easier to decide whether to
remove the "hide dot files" per-service parameter, and supercede it with
a default "hide files" value of ".*".

lkcl
(This used to be commit f3ee4620ea)
1997-07-01 19:42:42 +00:00
Samba Release Account
738d29667f added "hide files" option.
lkcl
(This used to be commit 6e594ce0e5)
1997-07-01 19:02:43 +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
9e37076f2b shmem.c: Changed debug to higher level
uid.c:		Stop smbrun from deleting device files.
util.c:		Added EAGAIN to known error list.
Jeremy (jallison@whistle.com)
(This used to be commit c07db8d8e7)
1997-06-27 00:26:59 +00:00
Samba Release Account
434d26acfe loadparm.c: Added "force create mode" and "force directory mode" params.
proto.h:	Added lp_force_create_mode()and lp_force_dir_mode().
server.c:	Fixed application of mode bits to be regular across files
		and directories.
smb.h:		Removed unused CREATE_MODE macro.
Jeremy (jallison@whistle.com)
(This used to be commit 2c92821250)
1997-06-19 00:18:23 +00:00
Samba Release Account
16c87e9198 Fixed *really* stupid bug in register_vuid - only a problem
on multi-user NT systems.
Jeremy (jallison@whistle.com)
(This used to be commit 6ca5c8ca32)
1997-06-18 01:04:57 +00:00
Samba Release Account
2a33e58d18 charset.c: Dropped debug message to level 6.
loadparm.c:	Added "time server" parameter.
nameserv.h:	Added "time server" parameter.
proto.h:	Added lp_time_server().
server.c:	Removed incorrect | 0700 - this was a whistle specific change.
Jeremy (jallison@whistle.com).
(This used to be commit 54dcca1240)
1997-06-16 20:49:15 +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
548196362b loadparm.c: Made explicit max packet now ignored.
namedbwork.c:	Don't announce potential browser if local master = False.
nameelect.c:	Raise debug level of comment to 2.
proto.h:	Added reset_globals_after_fork().
server.c:	Call reset_globals_after_fork() after forking child.
util.c:		Added reset_globals_after_fork() - should stop problems
                with % substitutions in children.
(This used to be commit 77be0f710c)
1997-06-06 16:14:17 +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
ccf4314fe7 loadparm.c: Ensure printer services cannot be read only and don't use share mode locking.
locking.c:	Changed aborts to returns so not so drastic on PANIC errors.
proto.h:	Removed definition of open_file as this is now never externally called.
reply.c:	Changed reply_mknew, reply_ctemp, reply_printopen to go through open_file_shared.
server.c:	Modified open_file_shared to be more robust and be useful for printer & temp files.
		Removed truncate option from open_file (now all truncates are done in open_file_shared).
util.c:		Added EAGAIN to errors checked in open_socket_out().
version.h:	Updated to 1.9.17alpha2.
jallison@whistle.com
(This used to be commit d8471909b7)
1997-05-27 20:28:45 +00:00
Samba Release Account
71e5f97555 Added fix from Paul Nelson @ Thursby - smb_mid field could be
corrupted if security = server.
jallison@whistle.com
(This used to be commit 52da1897ce)
1997-05-21 01:09:51 +00:00
Samba Release Account
aa864415c5 dir.c: Fixed double slash issue.
includes.h: Changed to ifdef FAST_SHARE_MODES.
ipc.c:  Changed lp_workgroup() to myworkgroup.
loadparm.c:  Added new shared mem parameters. Added Luke's fix.
locking.c: Rewrite to do share modes better (both fast and slow modes).
nameannounce.c:  Changed lp_workgroup() to myworkgroup. Added Luke's fix.
nameconf.c:  Changed lp_workgroup() to myworkgroup.
namedbname.c:  Improved debug.
namedbserver.c:  Changed lp_workgroup() to myworkgroup.
namedbsubnet.c:  Added Luke's fix - rewritten somewhat.
namedbwork.c:  Changed lp_workgroup() to myworkgroup.
nameelect.c:  Added Luke's fix - rewritten somewhat.
nameresp.c:  Stoped shadowing global.
nameserv.c:  Added Luke's fix - Improved debug.
nameservreply.c:  Improved debug.
namework.c:  Changed lp_workgroup() to myworkgroup.
nmbd.c:  Added Luke's fix - Changed lp_workgroup() to myworkgroup.
pipes.c:   Changed lp_workgroup() to myworkgroup.
proto.h:   Added Luke's fix, added smb_shm_ proto's.
reply.c:  Changed lp_workgroup() to myworkgroup.
server.c:  Rewrite to do share modes better (both fast and slow modes).
shmem.c:  Rewrite to do share modes better (both fast and slow modes).
smb.h:  Rewrite to do share modes better (both fast and slow modes).
status.c:  Rewrite to do share modes better (both fast and slow modes).
trans2.c:  Fixed double slash issue.
util.c:  Tidied up, created myworkgroup.
Jeremy Allison (jallison@whistle.com).
(This used to be commit 2a1711eaaf)
1997-05-20 00:32:51 +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
121c81e3d6 added automount home directory support. contributed by simeon@bangor.co.uk
and a mini bug-fix by rob.nacarrato@sheridanc.on.ca

reads in an entry from the auto.home file for the user when they log in,
and mounts their home directory as the default path for the [homes] service.

i might add this as to the %substitution system, so that you can
specify subdirectories for the user profiles, mainly.

lkcl
(This used to be commit 0bb6acc358)
1997-05-07 17:56:46 +00:00
Samba Release Account
aaba4712c8 JHT ===> Moved MAJOR_VERSION and MINOR_VERSION defines to smb.h
Made version info consistent in ipc.c and nameannounce.c
	Added define for BROWSER_ELECTION_VALUE and BROWSER_CONSTANT
	(see do_announce_host() in nameannounce.c).

	Sniffing with the latest bloodhound I found that the byte range
	occupied by the BROWSER_ELECTION_VALUE is interpreted depending
	on the type of announcement being made.

	In a Local_Master_Announcement it is BROWSER_ELECTION_VALUE
	but in both Workgroup_Announcement and Host_Announcement
	this is seen as Comment_String_Pointer. What does this mean?
	We need to know?
(This used to be commit 86b0018cc7)
1997-03-15 14:47:00 +00:00
Samba Release Account
b581d03240 1) updated ipc.c NetUserGetInfo - load \\%L\%U instead of \\%L\HOMES
because the share must be browseable by a w95 client

2) send_mailslot_reply - unique or group datagram argument added.

3) netlogon.c - rewrote response packet to do the right thing for w95.

4) server.c reply_nt1() - added OEMDomainstring to the end.

5) (deep breath) reworked the nmbd-browsing code a little bit.
   i discovered two months ago that becoming a primary domain controller
   (and domain master browser) is done independently of becoming a
   backup domain controller (logon server) is done independently of
   becoming a local master browser.

   therefore, three sets of state-machines (instead of just one) are in
   place - each of which is responsible for taking samba through the
   required stages to become:  a logon server; a domain master browser;
   and a local master browser.

   each of these three things can occur independently on each interface,
   _including_ the wins pseudo-interface.  the only slight caveat is that
   the wins pseudo-interface, by virtue of _not_ being a broadcast
   interface, does _not_ register as a local master browser with the wins
   server, as this doesn't make sense.

lkcl
(This used to be commit 88c6a00c3c)
1997-03-09 14:58:22 +00:00
Samba Release Account
3e2f9c3dee quotas.c: Fixed typo in #ifdef'ed compile.
ufc.c: Added pre-declaration of _ufc_doit().
jra@cygnus.com
(This used to be commit 7c690e020f)
1997-03-07 17:24:22 +00:00
Samba Release Account
da0a56a278 Split maxxmit parameter into two : max_send (auto configured by the
connecting client, as per CIFS4) and max_recv, which can be configured
as the old maxxmit was. Fixes problems with NT directory listings when
maxxmit is set very small.
jra@cygnus.com
(This used to be commit c2d5d1040a)
1997-02-28 20:39:36 +00:00
Samba Release Account
df42b0a7bc Makefile: Added cleandir target.
chgpasswd.c: Added patch from Roland Haag <haag@think.de> to allow
             password changes to be done more than once.
loadparm.c: Added entries for the "directory mode/directory mask parameters".
            Changed default file mode to 644.
proto.h: Added sys_gethostbyname.
server.c: Added directory mode changes.
system.c: Added sys_gethostbyname.
trans2.c: Added NT_FILE_ATTRIBUTE_NORMAL patch from Roger Orr
          <rorr@csfp.csfb.com>
trans2.h: Defined NT_FILE_ATTRIBUTE_NORMAL for above patch.
util.c: Changes calls to gethostbyname to sys_gethostbyname.
jra@cygnus.com
(This used to be commit d8d8a7ee00)
1997-02-23 05:18:09 +00:00
Samba Release Account
e9a4f896bd Fixed problem with renaming folder on top level share.
jra@cygnus.com
(This used to be commit 7ba1cff934)
1997-02-18 17:20:14 +00:00
Samba Release Account
8bd0dbb1af Replaced YOST code with more functionally equivalent code that
changes a bit less. Also added fix to tricky reply_mv case.
jra@cygnus.com
(This used to be commit f22ac13b14)
1997-02-11 22:53:29 +00:00
Samba Release Account
c6311f4e0a Removed YOST code. Removal of leading ./ chars should
be done in unix_clean_name in util.c
jra@cygnus.com
(This used to be commit f9f1085c7d)
1997-02-10 19:27:27 +00:00
Samba Release Account
8839603f03 JHT ===> William Yost patches integrated to fix leading path on 8.3
filename problem.
	Problem conditions:
		case sensitive = no
		default case = lower
		mangle case = yes
		preserve case = yes
		short preserve case = yes
	Problem: Win95 still writes upper case file names.
	Patches supplied have been incorporated into mangle.c and server.c
	but needs YOSTW to be defined for it to take effect.

	Action:
	=======
	If we are happy with the patch, delete old code in mangle.c, then
	remove all YOSTW #ifdefs.
(This used to be commit 84fc674c89)
1997-02-10 13:54:29 +00:00
Samba Release Account
cc55a88ddc JHT ===> Fixed potential PAM Security hole and second chance syndrome
spurious warning message "Warning - no crypt available"
(This used to be commit dc559428b8)
1997-02-04 10:35:38 +00:00
Samba Release Account
1fe69a7dd9 Fixed my stupid typo in earlier fix.
jra@cygnus.com
(This used to be commit e9a8ccb36b)
1997-02-04 01:21:52 +00:00
Samba Release Account
f24c04fc77 Fixed up problems with CDROM filesystems (return EROFS) and
also compile issue with USE_MMAP code.
jra@cygnus.com
(This used to be commit 8e9fe58991)
1997-02-03 19:48:56 +00:00
Samba Release Account
30ae26ba42 Fixed bug with NT and large directories.
jra@cygnus.com
(This used to be commit f0aa5e3ff0)
1997-02-03 19:40:15 +00:00
Samba Release Account
98bf10bc5d util.c: StrCaseCmp and StrnCaseCmp terminated incorrectly, giving false
answers when a string was partially identical.  this issue is still
outstanding, and needs to be investigated further.

loadparm.c: added lp_logon_path() parameter.
ipc.c: in NetUserGetInfo, lp_logon_path() can be returned instead of always
specifying \\SAMBA_SERVER\HOMES (which may not necessarily exist).
it is now possible to specify lp_logon_path() as \\ARBITRARY_SERVER\%U,
just like NT server can.  the default is \\SAMBA_SERVER\HOMES, just like
it used to be.

lkcl
(This used to be commit d5b6ad7cb8)
1997-02-02 18:12:36 +00:00
Samba Release Account
2831c62774 line 1960 - call to atexit - address of higher order function killkids
not needed (address already specified).

lkcl
(This used to be commit c5ab2eb71a)
1997-02-02 16:03:51 +00:00
Samba Release Account
691632e555 Added fix for file descriptor re-use failing when
file_exists is false.
Jeremy (jra@cygnus.com).
(This used to be commit b587f18247)
1997-01-23 19:39:57 +00:00
Samba Release Account
869f24e0b1 locking.c proto.h shmem.c smb.h status.c :
Changed shm_ prefixes to smb_shm_ prefixes as shm_ is a POSIX.4
prefix. Updated fd code in FAST_SHARE_MODE code
to work with new fd indirection.
quotas.c: Fixed #ifdef not on position zero.
Jeremy. (jra@cygnus.com).
(This used to be commit c9a9d56642)
1997-01-15 01:53:25 +00:00
Samba Release Account
586c6276ec Added an extra parameter for unix_convert. If present this is the
last component of the modified pathname before modification. This
is needed due to an exceptional condition in reply_mv when the
filesystem is case preserving, but not case sensitive and the
user wants to change the case of a filename. Code for this is
also added to reply.c
Jeremy (jra@cygnus.com).
(This used to be commit cdafa35f9d)
1997-01-13 19:41:08 +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
Samba Release Account
d613892674 JHT ==> Added extensions for PAM (Pluggable Authentication Module) support
for Linux and other little beasties that use PAM.
	Source: ftp.redhat.com/pub/Incoming/samba-1.9.16p9.src.rpm
	Originally from RedHat modifications to samba-1.9.15p8
(This used to be commit 79145bad56)
1997-01-02 04:04:49 +00:00
Samba Release Account
d68e27a3bc Added -f lockfile support.
jra@cygnus.com
(This used to be commit 84024a3df3)
1996-12-10 18:00:22 +00:00
Samba Release Account
53a9501444 Fixed quota support for FreeBsd.
jra@cygnus.com
(This used to be commit d1009c5351)
1996-12-10 17:58:11 +00:00
Samba Release Account
b719173ecb Added in veto files parameter create by Whistle.
jra@cygnus.com
(This used to be commit d5659df9c2)
1996-12-10 17:49:11 +00:00
Samba Release Account
b02557f80e Added Volkers fix for bundary condition. Needed as word
alignment wasn't being taken into account in space
calculations.
(This used to be commit 2fd77d66c0)
1996-12-03 19:05:27 +00:00
Samba Release Account
7da995a1dd Set num_validated_users to zero if Realloc fails.
(This used to be commit 57121e609e)
1996-11-09 01:56:20 +00:00
Samba Release Account
697e46373c Changed become_user to take a vuid as second arg.
Consistent with other changes to make smb_uid an index+offset
into the validated_users table.
jra@cygnus.com
(This used to be commit 89675f8ae8)
1996-10-25 20:50:31 +00:00
Samba Release Account
ddc18f4183 Modified all references to smb_uid to be vuid's.
jra@cygnus.com
(This used to be commit 5056672a3a)
1996-10-25 20:42:46 +00:00
Samba Release Account
2afda91963 Modified all references to uid to vuid.
jra@cygnus.com
(This used to be commit a2b07e5562)
1996-10-25 20:30:22 +00:00
Samba Release Account
8c5c55fea5 Core of the changes for returning smb_uid's. smb_uid's are now
returned as an index plus offset into the valudated_users table.
The offset (100) is added so that an smb_uid of zero becomes
an invalid value. All access into the validated_users table are
done by removing the offset and indexing into the table. Out of
ranges return NULL. Causes accesses into the validated_users table
to be more consistant and controlled.

This change made due to the fact that the uid field is only 16
bits in the smb header and we need for this not to be a unix
user id (which can ge 32 bits).

jra@cygnus.com
(This used to be commit ac265eff85)
1996-10-25 20:18:28 +00:00
Samba Release Account
9bc6d7f4d6 Changed definitions of prototypes to take uint16 vuid's not
int uid's. Part of the change for Samba to return an index+offset
into the registered users table rather than a raw unix uid.
Added casts to required prototypes for function pointers in
tables.
jra@cygnus.com
(This used to be commit ec2a3a1cf2)
1996-10-25 20:10:53 +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
Samba Release Account
dc0d4d2efb Jeremy <jra@cygnus.com>
Removed AS_USER requirement for SMBulogoff. A valid TID (cnum) is not
given for this call, which become_user needs if it is not to return
an error. This fixes a specific case with NT4.0 which stops users
attaching to a Samba server using a different account to the one they
are logged in under.
(This used to be commit c65a2cdd83)
1996-10-23 19:12:47 +00:00
Andrew Tridgell
6dc1fe06c1 - correctly handle non-encrypted share mode session-setup. We were
losing the username due to the recent "handle broken password lengths"
patch.
(This used to be commit b006cd6f91)
1996-10-09 15:08:29 +00:00
Andrew Tridgell
ec85f2e53d - revert to old idle dir code (marty pointed out a problem with the
new code)

- handle server level security in the new "detect NT password length
stuffups" code
(This used to be commit 7c135d4994)
1996-10-07 15:04:48 +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
f3c79936d7 - replace the base36 function with one that works on more systems
(compiler bugs were the problem)

- minor password cleanups (catch WfWG bug where it sets the password
to a space instead of a NULL)

- fix printing problem for kanji users

- minor cleanups
(This used to be commit 92566ecc31)
1996-10-05 13:13:31 +00:00
Andrew Tridgell
e5893bdfbe I have fixed quite a few important bugs in this commit.
Luke, can you take special note of the bug fixes to nmbd so you can
propogate them to your new code.

- rewrote the code that used to use fromhost(). We now call
gethostbyaddr() only if necessary and a maximum of once per
connection. Calling gethostbyaddr() causes problems on some systems so
avoiding it if possible is a good thing :-)

- added the "fake oplocks" option. See the docs in smb.conf(5) and
Speed.txt

- fixed a serious bug in nmbd where it would try a DNS lookup on
FIND_SELF queries. This caused a lot of unnecessary (and incorrect)
DNS lookups to happen. FIND_SELF queries should only go to the
internal name tables.

- don't set FIND_SELF for name queries if we are a wins proxy, as we
are supposed to be answering queries for other hosts.

- fixed a bug in nmbd which had "if (search | FIND_LOCAL)" instead of
"if (search & FIND_LOCAL)". Luke, this was in nameservreply.c

- the above 3 bugs together meant that DNS queries were being cached,
but the cache wasn't being used, so every query was going to DNS, no
wonder nmbd has been chewing so much CPU time! Another side effect was
that queries on names in lmhosts weren't being answered for bcast
queries with "wins proxy" set.

- ignore the maxxmit for seconday session setups (see CIFS spec)

- close user opened files in a uLogoffX for user level security (see
CIFS spec)

- added uid into the files struct to support the above change
(This used to be commit ea472b7217)
1996-10-05 10:41:13 +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
986edc0146 - fix the EALREADY bug so connections to slow hosts with smbclient get
through

- add workarounds to handle the win95 and WinNT bugs in handling
password lengths in sessionsetup
(This used to be commit 671b3a3a77)
1996-10-02 16:16:16 +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
11d9539d75 - accept either NT or lanman passwords in tconX
(This used to be commit b6c1c60d72)
1996-10-02 14:06:17 +00:00
Andrew Tridgell
908771bb0f added debug info
(This used to be commit 4a988021a2)
1996-08-24 01:46:47 +00:00
Samba Release Account
9ad5a3fe36 removed all of lukes recent changes. I need to do a p2 release but
can't test the multi group changes.

I also found that some of lukes changes wiped out some recent bug
fixes. Is your CVS tree ok luke?
(This used to be commit 8b7fe224bc)
1996-08-24 01:41:46 +00:00
Samba Release Account
8c41ad5614 fixed dircahe bug
(This used to be commit 050f941e21)
1996-08-24 01:32:51 +00:00
Samba Release Account
5945be9718 - fixed bugs in nmb response packet checking.
- added multiple workgroup code - samba can register under different
  (unique) NetBIOS aliases, one per workgroup it joins.

lkcl
(This used to be commit f24e341e7e)
1996-08-23 10:17:30 +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
3d088fd65e - fix a bug handling readraw packets that caused the timeout to be 30
milliseconds instead of 30 seconds as was intended. Thanks to Paul
Nelson for finding this bug.
(This used to be commit 78f62c83be)
1996-08-21 14:15:09 +00:00
Andrew Tridgell
a782ffb5ed handle sigpipe better for server security
(This used to be commit d87fdb3ee9)
1996-08-21 12:36:01 +00:00
Samba Release Account
da0761ac0d JHT ==> Upgraded Samba to Windows NT Server version 4.1
Just to keep ahead of the pack.
	Note: Really only done to differntiate our version ID from
	existing SMB Servers.
(This used to be commit 6636c7b5b8)
1996-08-21 08:11:03 +00:00
Andrew Tridgell
b5a64bb740 - new handling of ST_TYPE bits, they are now consolidated much more in
DFLT_SERVER_TYPE in nameserv.h

- got rid of a lot of spurious domain controller stuff. Samba is not a
domain controller yet, but it can be a domain master. We were claiming
to be a domain controller in some packets which may have caused
problems

- don't do preferred master startups on the WINS pseudo-net

- don't do election requests on the WINS pseudo-net

- fix a nasty bug in become_non_master() which wiped out the bits in
remove_type before using them. The result was that samba didn't like
losing its master status.

- changed the logic in the election packet handling to enable us to
become a non-master whenever we receive a winning election frame, even
if we aren't expecting it

- get another packet from the socket in nmbd when we reject one of our
own packets, this stops us from going into the packet reading code too
often and makes nmbd much snappier

- always remove a name immediately when we try to release it, don't
wait for the lack of response from the network, otherwise we will end
up replying to name that we don't really own. We still send the dereg
packets, we just don't wait for them to time out.
(This used to be commit eb84f2f342)
1996-08-21 06:09:00 +00:00