1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

813 Commits

Author SHA1 Message Date
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
74c807fcc5 architecture.doc: Re-added since I lost it (sorry Dan :-).
nmbd.c nmbd_responserecordsdb.c: Spelling mistake fixes.
Jeremy.
(This used to be commit f5dfc8913b)
1997-12-23 06:38:36 +00:00
Dan Shearer
8105ad49d5 Put it in the right directory :~)
(This used to be commit 49694879a0)
1997-12-20 23:44:25 +00:00
Jeremy Allison
6f56211721 Fixed stupid bug in read_smb_len where I was calling itself - now
calling the correct fn.
Jeremy.
(This used to be commit c62aa0a760)
1997-12-20 14:52:48 +00:00
Jeremy Allison
be71d43585 client.c:
clientgen.c:
clientutil.c:
clitar.c: Changed usage of receive_smb to new function client_receive_smb
          except for one use of receive_smb in client.c. This is the
          receive_smb used to discard packets received whilst in a
          keyboard wait state.
util.c: Created new function client_receive_smb that ignores session
        keepalives just as the old receive_smb used to do. Created
        internal function read_smb_length_return_keepalive that is
        used internally by the changed receive_smb call.
        Changed read_smb_len to not use an internal buffer - it is
        never called with a null buffer so such code is redundant.
Jeremy.
(This used to be commit 1084fb4682)
1997-12-20 14:36:11 +00:00
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
Christopher R. Hertel
b88f43dfdb Adding the cache module.
I'll be using the cache module to replace the name cache in mangle.c.  The
new one should be much faster and should require less memory.
Another feature is that the cache size can be limited by the amount of
memory used in addition to the number of entries allowed.  With the
current cache, the default is to allocate 12800 bytes representing 50
entries (256 bytes each).  With the same amount of memory, I should be able
to load over around two hundred entries.
Changes to the AVL trees were minor (missing comments).
Chris -)-----
(This used to be commit 45962779a6)
1997-12-19 09:32:58 +00:00
Jeremy Allison
b80b6ea3b4 kanji.h: Fixed problems with re-definitions of strchr and others on AIX.
nmbd_nameregister.c: Applied fix found by "Eloy A. Paris" <eparis@ven.ra.rockwell.com>
(don't re-use lists after you have freed them :-).
Jeremy.
(This used to be commit bcfcc39a27)
1997-12-18 11:05:00 +00:00
Jeremy Allison
efa661cb17 Missed terminating {-1,NULL} in an enum parameter list.
Jeremy.
(This used to be commit 5ea3633445)
1997-12-17 04:56:55 +00:00
Andrew Tridgell
637c3ed4a3 - handle ENOSPC in shmem init.
- be a little bit more friendly about grabbing semaphores
(This used to be commit 87f8870893)
1997-12-16 14:06:09 +00:00
Samba Release Account
59fcf14107 preparing for release of 1.9.18alpha13
(This used to be commit 90b8675b88)
1997-12-16 12:35:10 +00:00
Jeremy Allison
e9ef2a5a5e WHATSNEW.txt - updated for 1.9.18alpha13.
docs/smb.conf.5: Removed unused NTDOMAIN params. Added new params.
source/loadparm.c: Put #ifdef NTDOMAIN around unused params.
source/nmbd_become_lmb.c: Removed check for workgroup name in lmb name.
Jeremy.
(This used to be commit 5136c5ec11)
1997-12-16 12:21:39 +00:00
Jeremy Allison
16bf14adf1 Added Lanman announce patch from Jacco de Leeuw <leeuw@wins.uva.nl>.
Also added code to stop old Samba servers that announce the workgroup
name as master browser name when they are a local master browser.
Jeremy.
(This used to be commit 3605da0557)
1997-12-16 09:20:34 +00:00
Jeremy Allison
5d4345b66d nmbd_incomingdgrams.c: Fix bug with Syntax 5.1 servers reported by SGI where
they do host announcements to LOCAL_MASTER_BROWSER_NAME<00> rather than
WORKGROUP<1d>.
nmbd_incomingrequests.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
nmbd_serverlistdb.c: Stopped writing "Unknown" for local master browsers
we don't know.
nmbd_winsproxy.c: Deal with WINS_PROXY_NAME issues - don't reply
with that name if it's the same broadcast net.
Jeremy.
(This used to be commit 5adfff94c9)
1997-12-16 07:30:25 +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
Andrew Tridgell
111245cd73 allow name_type 0x20 as well as name_type 0x0 in dns proxying
(This used to be commit be8a40487c)
1997-12-14 17:49:41 +00:00
Andrew Tridgell
edc0554f7c fix a bug that sometimes prevented smbclient from connecting with
protocol < LANMAN1
(This used to be commit 95ad2c284d)
1997-12-14 17:48:55 +00:00
Jeremy Allison
64f0348a3f This is it ! The mega-merge of the JRA_NMBD_REWRITE branch
back into the main tree.
For the cvs logs of all the files starting nmbd_*.c, look
in the JRA_NMBD_REWRITE branch. That branch has now been
discontinued.
Jeremy.
(This used to be commit d80b0cb645)
1997-12-13 14:16:07 +00:00
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
Jeremy Allison
155562e514 fixed over char 127 problems with isupper/islower.
Jeremy.
(This used to be commit 4ac95226ff)
1997-12-11 12:25:01 +00:00
Christopher R. Hertel
7735e4d586 While working on a general-purpose caching module (out soon), I thought of
a better way to handle the node pointer array used in ubi_BinTree.  The
change simplified the code a bigbunch.  It also forced updates to all of
the binary tree modules.  CRH
(This used to be commit db9898559f)
1997-12-11 11:44:18 +00:00
Jeremy Allison
419e8823e9 kanji.c: Patch from Anders Blomdell <anders.blomdell@control.lth.se>
for problem with kanji sj_strXXX functions.
Jeremy.
(This used to be commit bf48151e6d)
1997-12-11 11:07:09 +00:00
Andrew Tridgell
00fc025b93 catch signals in the async dns daemon and allow it to auto-restart if
necessary
(This used to be commit fa599067f0)
1997-12-04 10:58:40 +00:00
Andrew Tridgell
bb97a6adac allow for zero size reads in asyncdns. These can happen after a signal
(This used to be commit 8bac91a6e7)
1997-12-04 08:10:49 +00:00
Andrew Tridgell
c81a3b8a56 got rid of the WRAP_MALLOC code - mem_man does it better
(This used to be commit d9bb3a4eba)
1997-12-04 07:49:37 +00:00
Andrew Tridgell
500069329a added optonal MEM_MAN code
(This used to be commit b524c8da51)
1997-12-04 07:48:06 +00:00
Andrew Tridgell
28f37efd34 don't use free and alloc as structure elements
(This used to be commit f7066355b0)
1997-12-04 07:41:48 +00:00
Andrew Tridgell
63a35dc8cd Makefile.lib does nothing, so remove it
(This used to be commit 4800a02a92)
1997-12-03 14:17:38 +00:00
Andrew Tridgell
d3046caa5c slight cleanup to the linked list handling
(This used to be commit 97b62b3476)
1997-12-03 05:54:51 +00:00
Andrew Tridgell
e94d563239 put the default PRINTCAP_NAME def in includes.h not local.h so that
it can see the SYSV definitions
(This used to be commit e439115366)
1997-12-03 05:22:24 +00:00
Andrew Tridgell
7a668a7641 applied a patch from Norm Jacobs to allow "printcap name = lpstat"
to use lpstat to obtain the printer list on systemV systems.

I've now made this the default on all SYSV systems.

Jeremy, you were a little worried about the security of this patch. I
believe it's OK as the user has no control over the options given to
popen() and the pipe is only open for reading.
(This used to be commit 6a83de0ae9)
1997-12-03 05:08:07 +00:00
Andrew Tridgell
02bc90ea44 change the "username map" option to allow the user to stop the
processing part way through the file if a match is found. If a line
starts with ! and a match is made by that line then processing
stops. This allows better wildcard handling.

(patch from Anselm.Kruis@Physik.Uni-Muenchen.DE)
(This used to be commit af57bc05fe)
1997-12-03 04:20:39 +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
Jeremy Allison
0aa493cc03 loadparm.c: Added lp_we_are_a_wins_server as an alias for lp_wins_support.
Used by the new nmbd and just makes more sense :-).
Jeremy.
(This used to be commit 7a2a45eae2)
1997-12-03 03:50:05 +00:00
Andrew Tridgell
2b8247dd09 add a warning if the timezone is not a multiple of 1 minute. This
should catch broken timezone files in slackware linux.
(This used to be commit ce37bd9dca)
1997-12-03 03:46:43 +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
11d7f4a2aa make the "printing" option a per share option rather than global. When
printing to lots of different sorts of remote printers this is useful
(This used to be commit 7a88bed4a5)
1997-12-03 03:37:02 +00:00
Andrew Tridgell
cc12fc66d1 I'm slowly getting though the todo list :-)
This change allows people to select the SYSLOG_FACILITY in local.h, or
add it to the Makefile if they want to.
(This used to be commit afe88facbf)
1997-12-03 03:21:25 +00:00
Andrew Tridgell
bd1abc6927 hopefully handle "ready and waiting" messages in print queue output a
little better
(This used to be commit 465edceecf)
1997-12-03 03:00:49 +00:00
Andrew Tridgell
3e23d79cfe fix toupper(c) on a already uppercase char and tolower(c) on an
already lowercase char when using code pages. Jeremy, can you confirm
that this looks right?  It comes from PR#1992
(This used to be commit 157fde3396)
1997-12-03 02:27:50 +00:00
Andrew Tridgell
1463cb1a43 fixed the help message for -p (someone complained!)
(This used to be commit c779ed654e)
1997-12-02 23:32:03 +00:00
Andrew Tridgell
f97a49c39e add the null string to SMBsetatr calls
(This used to be commit fbb2be050d)
1997-12-02 23:30:43 +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
6a012a8153 the default GUEST_ACCOUNT should be here not in smb.h
(This used to be commit 13c2f432d6)
1997-12-02 23:28:14 +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
Andrew Tridgell
c65bcc26f7 get rid of some things out of smb.h that are already in local.h
(This used to be commit d55df52487)
1997-12-02 23:26:42 +00:00
Andrew Tridgell
7b10574429 dont try getpeername() when Client isn't initialised
(This used to be commit a32ca542ad)
1997-12-02 23:24:26 +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
Herb Lewis
ceb047f601 remove stutter from closing instructions
(This used to be commit 358fcbf2e4)
1997-12-01 15:21:23 +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
7da2663f0d don't display locks for dead processes in smbstatus
(This used to be commit c7df484ef6)
1997-11-29 13:35:09 +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
7c025b60ac pass the mailslot name to process_logon_packet()
- fixed process_logon_packet() to always send the reply to/from the
correct netbios name (it should match the query)

- only do a NT style QUERYFORPDC if the query came in on a
NT_LOGON_MAILSLOT

Luke, can you check to see if these changes work in your branch with
NT logons?
(This used to be commit e89611985b)
1997-11-28 05:52:31 +00:00
Andrew Tridgell
7f2cd86196 get_entries is an int not a bool
(This used to be commit 84215c9b91)
1997-11-28 05:48:48 +00:00
Samba Release Account
f4e60aab71 preparing for release of 1.9.18alpha12
(This used to be commit 9cac33a13d)
1997-11-28 03:46:03 +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
6c158adf25 oh no! my favourite hack is broken. You can't do:
[%U]
	path = %H

to get a new homes area. I wonder when it broke?

Anyway, I've fixed it. We can all rest easy now, knowing that you
really can produce an incomprehensible smb.conf and get it to work.
(This used to be commit 2245da4ad6)
1997-11-26 23:43:06 +00:00
Andrew Tridgell
e54a611dad get rid of stat command (it is a hangover from an old experiment)
(This used to be commit 8ced76c4c7)
1997-11-25 12:20:55 +00:00
Andrew Tridgell
ebe7c7a173 added cli_rmdir and cli_mkdir
added test in smbtorture for the server updating the directory modify
time when a file is added to a directory

cleanup in smbtorture so no garbage files are left on the server
(This used to be commit 3a5e07f1e9)
1997-11-24 13:44:52 +00:00
Andrew Tridgell
931d0150b0 added a SMB_QUERY_FILE_ALL_INFO test into smbtorture
W95 doesn't seem to support this call.
(This used to be commit 162947c6e6)
1997-11-23 07:26:42 +00:00
Andrew Tridgell
c16d132bf9 added some QPATHINFO and QFILEINFO tests into smbtorture.
This tests for things like midnight access times, sticky create times
and word reversed INFO_STANDARD returns
(This used to be commit 89141de14e)
1997-11-23 05:55:44 +00:00
Andrew Tridgell
a1c5442abb test SMBsetatr as well
(This used to be commit 2f29c24ba7)
1997-11-23 03:09:59 +00:00
Andrew Tridgell
74f06e4062 minor wsmbconf and cgi changes
(This used to be commit bca9c49e6f)
1997-11-23 02:42:22 +00:00
Andrew Tridgell
8bf0f359f3 added a test for the NT SMBgetatr bug in smbtorture
added support for choosing the protocol level in smbtorture (-m option)

use -1 for null date in cli_close()

get the attributes right in cli_open()
(This used to be commit d64d40a6ec)
1997-11-23 02:41:22 +00:00
Andrew Tridgell
8d971f1db1 this new cgi code includes the ability to act as a mini web server,
allowing people to use web configuration of Samba without installing a
web server
(This used to be commit b4e05c360e)
1997-11-22 07:51:23 +00:00
Andrew Tridgell
a5d239e873 fixed some typecasts of (char *) to (unsigned char *)
(This used to be commit c98ba8c748)
1997-11-22 07:17:32 +00:00
Andrew Tridgell
ab3f4464e8 the usual :-)
(This used to be commit d6467d44b1)
1997-11-22 07:10:22 +00:00
Andrew Tridgell
51f20adc6b added true enumerated types in loadparm.c. Now we don't need all those
"interpret_security" and similar functions. This also means that
testparm produces string values for these enumerated types rather than
an integer. This was done to make the web interface much cleaner.

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

I've also removed the "coding system" global and made it a
P_STRING. The integer value was never used anywhere in Samba.
(This used to be commit bac6b0daa2)
1997-11-22 07:09:12 +00:00
Jeremy Allison
5a1c907d3c Just fixed a *serious* bug in nameelect.c to do with local
master browsers. Once we have become a local master, we would
*NEVER* stop announcing ourselves as such. This has serious
implications for the new nmbd code.
Jeremy.
(This used to be commit 8e8d239d9e)
1997-11-21 21:06:40 +00:00
John Terpstra
4e92c7d1a3 Added in mods for new smb.conf "remote browse sync" option as posted to
the samba-1.9.17 tree moments ago.
(This used to be commit 2ee25cd117)
1997-11-21 14:01:23 +00:00
Andrew Tridgell
e8f3f79aa5 use LocTimeDiff() not TimeDiff() to ensure that longdate conversion is
consistent (this is really just a cosmetic change)
(This used to be commit 30b84bb68b)
1997-11-21 04:57:37 +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
Andrew Tridgell
6a6653f815 changed nmblookup to only set recursion_desired in queries if the -R
option is used.
(This used to be commit 4561b8242e)
1997-11-19 23:50:02 +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
Andrew Tridgell
eb97fc7d5a don't do the 255.255.255.255 mapping for group names if the name type
is 0x1c. This allows remote logon servers when using a Samba WINS server.

I did some experiments with a real NT WINS server and this behaviour
is much closer to being correct. It will only be totally correct when
we add proper group name support.
(This used to be commit c43b7e29ba)
1997-11-18 04:12:54 +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
Andrew Tridgell
30dfa00877 added code to test the cli_NetServerEnum() function in clientgen.c
(This used to be commit 4933ba49b5)
1997-11-11 02:51:20 +00:00
Andrew Tridgell
5b6d9d4376 fixed a bug which caused nmbd to core dump. The problem was incorrect
parameters to cli_NetServerEnum()
(This used to be commit 628d5895aa)
1997-11-11 02:38:54 +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
c2d2a17fbd Removed pwd_validate.c as no longer in main branch.
Jeremy
(This used to be commit 5a4a936b2c)
1997-11-10 19:38:17 +00:00
Jeremy Allison
77aec4ae63 Rolled back tree state to 11:59pm 8th November 1997 EST to
remove problems.
Jeremy
(This used to be commit 4a36ac236c)
1997-11-10 19:23:17 +00:00
Luke Leighton
cc512947c9 byteorder.h :
typecasting for the debug messages of the data dump.  hm.

#ifdef NTDOMAIN

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

	adding "Net Server Password Set" functionality to smbclient.

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

there might be a bug in reply_session_setup_andX.  i indented and added { }
around single-line if statements: the lm password checking code now doesn't
look right (around the GUEST_SESSSETUP bits).  *no code semantics have been
changed by the indentation process*.
(This used to be commit f27966957f)
1997-11-09 17:30:10 +00:00
Luke Leighton
a81dd62af0 mod_smbpasswd() was junking the smbpasswd file...
uninitialised variable warnings.
(This used to be commit 1b0bd98bb3)
1997-11-08 14:23:49 +00:00
Andrew Tridgell
fbb57e5923 a few more tests added, including one that tests whether the server
understand the full range of byte offsets in locking requests. Samba
doesn't (due to the 31 bit limitation in fcntl locking)
(This used to be commit af1f408a05)
1997-11-08 05:33:45 +00:00
Andrew Tridgell
a90d206131 added two more sets of tests to the smbtorture test. The tests I added
are ones that I know Samba fails. They are:

  1) correct support for retaining locks over a close (ie. the server
     must not use posix semantics)
  2) support for lock timeouts
  3) the server supports multiple locking contexts on the one SMB
  connection, distinguished by PID.
  4) the server correctly fails overlapping locks made by the same PID (this
     goes against POSIX behaviour, which is why it is tricky to implement)
  5) the server denies unlock requests by an incorrect client PID

I've been discussing with Jeremy ways that we can re-implement the
locking code to handle these correctly. This test code will be useful
to see that we have got it right.
(This used to be commit 097781e299)
1997-11-08 04:02:05 +00:00
Luke Leighton
029904995d local time discrepancies between the date on my computer and the date on
chris' computer (probably about four minutes) meant that chris' commits
didn't get downloaded when i did a cvs update.

therefore, i did a cvs update; make proto; cvs commit, and still got problems.

so, five minutes later, i do a cvs update, and _then_ chris' server.c and
mangle.c mods get downloaded, and i have to do another make proto.


this particular problem has hit us *really* badly in the past, because i
was taking files home (onto a portable that i hadn't reset the time on
since i went to the states) and then recopying them back onto the computer
here.  if i do this, i do a touch *.c *.h; cvs -t update.  *then* a cvs commit.
(This used to be commit edb9c52948)
1997-11-07 03:37:18 +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
Andrew Tridgell
3670f3d9c0 change from %D to %m/%d/%Y in timestring(). This doesn't really matter
as it is only for logging but it will prevent people from writing in
to say that we are not y2k compliant after running auto-diagnostic
tests.
(This used to be commit b4e55cd476)
1997-11-06 13:45:50 +00:00
Andrew Tridgell
ba5086d03e no asm/signal.h for linux as this is not portable
add auto username from LOGNAME for smbtorture

proto fix in ufc.c
(This used to be commit f13dbdf307)
1997-11-06 06:50:21 +00:00
Jeremy Allison
52fa04d173 Change to always register the WORKGROUP<1e> name as does Win95.
Jeremy.
(This used to be commit 313fdcd3e9)
1997-11-05 22:09:15 +00:00
Andrew Tridgell
bd83f461a1 add NO_SEMUN for HP
I really wish you could say

	#ifndef "struct foo_struct"

in C :-)
(This used to be commit acffb39f1a)
1997-11-05 12:21:45 +00:00