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

3018 Commits

Author SHA1 Message Date
Jeremy Allison
741dfefd56 Fix stupid logic bug in detecting start-of-pdu in writeX on pipe.
Found by JF.
Jeremy.
(This used to be commit 8315583694)
2000-03-11 01:28:57 +00:00
Jeremy Allison
7b97d056a1 You *must* use O_EXCL when using mktemp (security issue).
Glad this code never shipped :-).
This is not a problem in 2.0.x.
Jeremy.
(This used to be commit a0c302f4d0)
2000-03-11 01:02:45 +00:00
Shirish Kalele
d50abdee22 Cleaned up unused variables, returns from non-void functions etc.
(This used to be commit 6ce72c3742)
2000-03-10 23:13:11 +00:00
Shirish Kalele
f2d86add38 Cleaning warnings from configure.developer
(This used to be commit c48579a4fc)
2000-03-10 23:05:53 +00:00
Shirish Kalele
0307b23a31 Cleaning up the warnings from configure.developer.
Found that Jeremy had already made some of the changes.
(This used to be commit ca02d9f821)
2000-03-10 22:53:36 +00:00
Jeremy Allison
d56e3425a1 Fix for names with spaces and some I18N filename issues from
V. Fyodorov <V.Fyodorov@VAZ.RU>.
Jeremy.
(This used to be commit 4673aa1a4b)
2000-03-10 22:25:02 +00:00
Jeremy Allison
5e22394654 Fixups for compiles with gcc flags -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual
Partially implemented rpc daemon redirect (needs more work).
Jeremy.
(This used to be commit a462191698)
2000-03-10 19:50:03 +00:00
Luke Leighton
83ee9372fc you know, when you do a cvs commit, you _really_ expect it to actually work.
this explains why j-f wasn't happy.
(This used to be commit c51e38214a)
2000-03-10 18:10:10 +00:00
Jean-François Micouleau
e0ebb76a74 getprinter level 0: was to short, found most of the fields, undocumented,
undecoded, nothing in MSDN, but now it works :-)

cleanup of error codes.
fixed some dfs declarations function.

	J.F.
(This used to be commit 87da4404ab)
2000-03-10 17:12:24 +00:00
Jean-François Micouleau
115d98e639 removed unused variable
J.F.
(This used to be commit e2557ae551)
2000-03-10 17:06:12 +00:00
Jean-François Micouleau
32811abdf1 restore the spoolss pipe as Jeremy replaced srv_pipe with the one from
SAMBA_2_0 :-)

	J.F.
(This used to be commit 34a3781961)
2000-03-10 17:03:04 +00:00
Luke Leighton
adee6e06f7 indent went wrong. grr.
(This used to be commit 525338e807)
2000-03-10 00:24:40 +00:00
Luke Leighton
25ac9656a3 computer too slow to compile with debug info (100mins), but i need all the
warnings.
(This used to be commit 3f1d5f7c41)
2000-03-09 22:22:38 +00:00
Jeremy Allison
7f7c2e2590 Not used. Functionality folded back into rpc_server/srv_pipe.c (where it
originally came from).
Jeremy.
(This used to be commit b9bc7e8cb6)
2000-03-09 21:46:04 +00:00
Jeremy Allison
6bb92a6d38 Big update moving the multi-pdu support from 2.0.x into HEAD for JF
and the printer functions.
Also tidied up some header includes and got the order right so you
can now do a :

make proto
make clean
make

Jeremy.
(This used to be commit 833cd9fba9)
2000-03-09 21:45:16 +00:00
Jeremy Allison
18465ec2cd Fixups for Win2K security descriptors from the 2.0.x branch.
Jeremy.
(This used to be commit d22d4482b5)
2000-03-09 20:00:23 +00:00
Shirish Kalele
4e6e454c3a Corrected DEBUG messages.
(This used to be commit a2d62cd30a)
2000-03-09 18:58:10 +00:00
Shirish Kalele
952799d9af dded Microsoft Dfs services.
* added a new msdfs/ directory under source/
* added msdfs sources under this directory.
* modified configure setup to add a --with-msdfs configure time option

 Modified Files:
 	Makefile.in acconfig.h configure configure.in
 	include/config.h.in include/includes.h include/proto.h
 	include/smb.h include/smb_macros.h param/loadparm.c
 	smbd/negprot.c smbd/nttrans.c smbd/process.c smbd/reply.c
 	smbd/server.c smbd/trans2.c
 Added Files:
 	include/msdfs.h msdfs/README msdfs/msdfs.c msdfs/msdfs_tdb.c
 	msdfs/parse_dfs_map.c
 ----------------------------------------------------------------------
(This used to be commit 4684b4a188)
2000-03-08 22:14:30 +00:00
Luke Leighton
3958c39106 added a tcon test: make two tconXs with the same user/pass, open a file
with one of them and try to write to the file with the other.
(This used to be commit f8d3ce0419)
2000-03-07 21:55:42 +00:00
Jean-François Micouleau
fd69e4a13a Enumprinters level 1: reply *exactly* like an NT server
BTW, found a little memleak in it.

	J.F.
(This used to be commit 9c37b5df2d)
2000-03-07 18:10:20 +00:00
Jean-François Micouleau
0f987d77be fixed enumprinterdata.
J.F.
(This used to be commit 2b4f09e7bb)
2000-03-07 09:06:03 +00:00
Jean-François Micouleau
78d7ba5ca0 changed prs_unistr to parse empty and non-empty strings the same way.
fixed typo in SPOOLSS_SYNT
some cleanup of unused functions
wrote make_spoolss_enumprinter and make_spoolss_openprinterex for
rpcclient as I'm trying to keep in sync the parsing code between HEAD and
TNG.

Will commit changes to TNG after lunch.

	J.F.
(This used to be commit 025cdb345f)
2000-03-06 11:13:40 +00:00
Jeremy Allison
5eae8c7b02 Tidied up fchown code, error reporting.
Jeremy.
(This used to be commit 8e3239440d)
2000-03-02 03:04:26 +00:00
Jeremy Allison
ea1c3cc23d Correctly full buffer smbpasswd i/o streams.
Jeremy.
(This used to be commit 7b222ed713)
2000-03-02 02:58:48 +00:00
Jeremy Allison
4569595519 Update last changed time for new password entry.
Jeremy.
(This used to be commit a8ccf1d953)
2000-03-02 02:50:05 +00:00
Jeremy Allison
d82ea9d32b Fixed bugs with -x smbpasswd entry. Thanks to Bruce Tenison <btenison@dibbs.net>.
Jeremy.
(This used to be commit c7695c6677)
2000-03-02 02:45:02 +00:00
Jeremy Allison
99be80bd80 Off by one error in detecting Win2k unicode bug.
Jeremy.
(This used to be commit 4971e8b44a)
2000-03-01 23:37:33 +00:00
Jeremy Allison
27921069a7 Added new codepage from Ded Marazm <DedMarazm@mail.lv> - MSDOS baltic rim.
Jeremy.
(This used to be commit b8b98d5058)
2000-03-01 20:41:26 +00:00
Jeremy Allison
50444a0b5f Fixed smbpasswd crash bugs found by Giulio.
Jeremy.
(This used to be commit 54440428e5)
2000-03-01 18:58:50 +00:00
Jeremy Allison
7260655708 Fix for Win2k unicode bug where doing SMB_NT_TRANSACT_CREATE it uses
unicode filenames whilst *not* bothering to set the unicode bit. Nice :-(.
Jeremy.
(This used to be commit ccddf4d92e)
2000-03-01 02:42:06 +00:00
Tim Potter
9fd3d3963e Check for null tdb context in tdb_exists()
(This used to be commit bbacdb834f)
2000-03-01 01:10:25 +00:00
Jeremy Allison
4fb014372e Fixes from Luke, back-ported from TNG to Win2k. Correctly return FAULT_PDU on
unknown rpc calls. Win2k now correctly shows the owners of files.
Jeremy.
(This used to be commit 066898689f)
2000-02-29 21:39:54 +00:00
Jeremy Allison
f429162313 Fixes for strange Win2K attempts to auto-inherit ACLs.
Jeremy.
(This used to be commit 41e37c5181)
2000-02-29 18:46:45 +00:00
Tim Potter
1f6f8c2241 Makefile for tdb directory.
(This used to be commit 60ae73c257)
2000-02-28 00:51:53 +00:00
Tim Potter
0a77ae3f14 Oops - put back filename argument to tdb_open().
(This used to be commit 110ec9923b)
2000-02-28 00:38:45 +00:00
Tim Potter
79691801f4 Modifications to tdb_traverse() arguments to remove compile warnings.
(This used to be commit d64456b588)
2000-02-28 00:37:13 +00:00
Tim Potter
676df39cc7 Allow tdb databases to be created "in memory" without having a file
associated with them.  tdb can then be used as a hash table data
structure.
(This used to be commit b345c0a105)
2000-02-28 00:25:37 +00:00
Tim Potter
e4de0e523c Added tdbtool to .cvsignore list.
(This used to be commit 2892f6e534)
2000-02-28 00:22:45 +00:00
Jean-François Micouleau
fd3acf437a added enumprintprocessordatatypes
now NT is happy and the "always send data in RAW mode" is checked

	J.F.
(This used to be commit d7bcfe17ce)
2000-02-26 23:01:02 +00:00
Jean-François Micouleau
badee62bca rewrote enumprinterdata. still a bug in it but reproducing it hard and
borring.

I need a client test program urgently!!!

rewrote setprinter, doesn't coredump anymore, and no memleak.

	J.F.
(This used to be commit b76ae1f92f)
2000-02-26 22:22:24 +00:00
Jeremy Allison
0f1eee5c7a client/client.c:
libsmb/clientgen.c: Fixes for Win2k smbclient browsing.
Other fixes implement smbpasswd -x user to delete users. Also allows swat
to do the same.
Jeremy.
(This used to be commit 9f6ad04676)
2000-02-25 22:25:25 +00:00
Jean-François Micouleau
66018871c7 made dynamic the Printer struct. No more limits :-)
J.F.
(This used to be commit b59233b3b6)
2000-02-24 23:01:24 +00:00
Jean-François Micouleau
f3319f7963 converted a couple of bzero() to memset()
rewrote the printer notify code, so now it's compatible with SP5 and fully
dynamic. No more limits on printers and job lists.

removed the make_xxx() functions as they are not used and broken

fixed a bug in the open handle function.

	J.F.
(This used to be commit aa9054d14b)
2000-02-24 16:27:06 +00:00
Jeremy Allison
1f28a34552 Multiple-dot scope handling fix from Greg Bowering gb@pobox.com
Jeremy.
(This used to be commit 693a582c23)
2000-02-23 22:29:27 +00:00
Jeremy Allison
9db96b7646 lib/system.c: Fixed gcc warnings.
nmbd/nmbd_processlogon.c: Use "True" and "False" instead of 1 and 0.
Others - preparing for multiple pdu write code.
Jeremy.
(This used to be commit 9f879ec396)
2000-02-23 02:02:33 +00:00
Luke Leighton
f7324464b1 richard got the short request for GETDC right (hooray!) win9x _and_ nt
now work.
(This used to be commit 27ef178926)
2000-02-22 21:00:01 +00:00
Jeremy Allison
ed95d8ed4f Fix for crash bug from Paul Tyler <pct@ansto.gov.au>.
Jeremy.
(This used to be commit 89aa4d8ca9)
2000-02-21 18:47:21 +00:00
Jean-François Micouleau
0e004212d2 more rewrite ...
comitting before starting on new functions.

	J.F.
(This used to be commit f9c2080111)
2000-02-21 01:58:13 +00:00
Jeremy Allison
8dcac9f8da Fix for reporting file system attributes correctly.
Jeremy.
(This used to be commit 801ed2389b)
2000-02-18 03:54:26 +00:00
Jeremy Allison
1a27ef121a Fixes for Eastern Europe code page.
Jeremy.
(This used to be commit 0ec82d661a)
2000-02-18 03:11:22 +00:00
Tim Potter
92bf37e21d Don't assume that the (files_struct *) passed to fd_attempt_close()
will be non-NULL.
(This used to be commit 02f845e543)
2000-02-17 23:22:26 +00:00
Tim Potter
c988b69dfc Updated docs for tdb_traverse.
(This used to be commit 8cbc7dfa03)
2000-02-17 00:16:40 +00:00
Tim Potter
590d92c77a More checks for passing NULL tdb contexts to tdb functions.
(This used to be commit 7faa70d254)
2000-02-16 22:57:57 +00:00
Jeremy Allison
8b45838ffc Added support for SO_REUSEPORT for systems that have it.
Jeremy.
(This used to be commit 377515cf96)
2000-02-16 22:48:19 +00:00
Jeremy Allison
4feb8540b3 Make proto.
(This used to be commit a12ebc50be)
2000-02-16 17:52:25 +00:00
Tim Potter
f89a1e9999 tdb_traverse() now takes three arguments.
(This used to be commit 2d3e2f8877)
2000-02-16 04:56:11 +00:00
Jeremy Allison
4175061348 Added "source environment" parameter from Nicolas Williams <Nicolas.Williams@wdr.com>.
Jeremy.
(This used to be commit f29847cbee)
2000-02-16 02:35:53 +00:00
Jeremy Allison
3cf31a194f Added replacement functions sys_popen and sys_pclose. These are based
on the glibc source code and are safer than the traditional popen as
they don't use a shell to exec the requested command. Now we have
these functions they can be tightened up (environment etc.) as required
to make a safe popen. It should now be safe to add the environement
variable loading code to loadparm.c
Jeremy.
(This used to be commit b52e92b09d)
2000-02-15 19:36:47 +00:00
Jean-François Micouleau
8688933c7f fix the reply of rpc_alter_context
OpenPrinterEx is now decoding correctly the query
most of the EnumXXX use the new_buffer struct.
check the (un)marshalling return code.

conclusion: still a long way to go. all the client code has to be
rewritten, and I still wonder how to implement correctly the notify stuff.
(This used to be commit 3d6d386375)
2000-02-15 18:07:45 +00:00
Tim Potter
13ac8fd847 Return "Invalid tdb context" instead of crashing when tdb_error called
with NULL tdb context.
(This used to be commit ba9f24c096)
2000-02-15 06:13:38 +00:00
Tim Potter
74ca35e4ee Not enough args to DEBUG statement.
(This used to be commit 156f438bce)
2000-02-15 05:06:53 +00:00
Jeremy Allison
9d59503d55 Ooops. Fixed stupid typo with missing ! in cli error code.
Jeremy.
(This used to be commit 0babc4baea)
2000-02-14 21:52:35 +00:00
Andrew Tridgell
89c3cf8ab6 damn, masktest now needs the mangle code from smbd
not very clean
(This used to be commit 6c09c0fd9e)
2000-02-10 13:45:52 +00:00
Andrew Tridgell
dacbb15e9f the beginnings of a fnmatch() based wildcard matching routine
(This used to be commit ef256de9d9)
2000-02-10 13:43:59 +00:00
Jeremy Allison
fe05c85250 Fixed wildcard match bug with '****' with smbclient. Found by Andrew (damn him! :-).
Jeremy.
(This used to be commit c8ca70f99e)
2000-02-09 15:50:44 +00:00
Jeremy Allison
f452de7ed6 Correct for for core dump in smbpasswd with cli_errstr().
Jeremy.<F4>plit the test for NetBIOS name being *SMBSERVER.
(This used to be commit 34b0e2acb0)
2000-02-09 15:43:09 +00:00
Jeremy Allison
2768aecae6 Defensive programming for cli_error().
Jeremy.
(This used to be commit 94ed74d5b0)
2000-02-09 14:45:22 +00:00
Andrew Tridgell
94d68eb808 update masktest for new make_nmb_name() syntax
(This used to be commit 3609e835d4)
2000-02-09 14:17:12 +00:00
Andrew Tridgell
74f0d16da4 added masktest to head branch, in preparation for another assault on
the wildcard handling code
(This used to be commit 3f77690dad)
2000-02-09 14:10:08 +00:00
Jeremy Allison
27ce49e3e6 Moved over lib/util_sec (with added fixes) as the HEAD source
seems to have drifted a little.
Jeremy.
(This used to be commit ebcdb4afee)
2000-02-08 11:32:43 +00:00
Jean-François Micouleau
07fd3b392d Hum, I should remove my gloves when I'm in front of an xterm :)
fixed a stupid bug in unistr2_to_ascii that I introduced

fixed getprinterdata()
(This used to be commit 2f544a8077)
2000-02-07 18:06:54 +00:00
Jean-François Micouleau
cedf91b1f6 make proto ...
and the Makefile.in file

	J.F.
(This used to be commit aa22586aac)
2000-02-07 16:28:41 +00:00
Jean-François Micouleau
b7ef313b31 spoolss include definitions
J.F.
(This used to be commit 853a1a3027)
2000-02-07 16:27:03 +00:00
Jean-François Micouleau
195e3d44da spoolss definitions.
also added some prs_struct functions, 'cause I'm handling buffers as
prs_struct.

	J.F.
(This used to be commit 81e375bbbe)
2000-02-07 16:25:15 +00:00
Jean-François Micouleau
59ac32c255 Jeremy can you check lib/util_unistr.c for codepages support ?
I added 2 UNICODE <-> ASCII functions which _don't_ honor codepage
support.

	J.F.
(This used to be commit b81dc7b7f8)
2000-02-07 16:22:16 +00:00
Jean-François Micouleau
6a6749d81e First commit of the spoolss code to the HEAD branch.
still needs a lot of cleaning/debuging.

	J.F.
(This used to be commit bd9d4cdde9)
2000-02-07 16:17:59 +00:00
Jeremy Allison
868c81eefa Added check for SGI IRIX brokenness with semaphores when using gcc.
Code from Don Badrak <dbadrak@census.gov>
Jeremy.
(This used to be commit 773d6e504b)
2000-02-07 14:27:04 +00:00
Tim Potter
427a3baa9c Fix some more compile warnings.
(This used to be commit 507624dbc0)
2000-02-07 00:41:58 +00:00
Tim Potter
ebbb007ed2 Fixed compile warning in locking.c:traverse_fn()
(This used to be commit eefc897221)
2000-02-07 00:24:04 +00:00
Jean-François Micouleau
c473ca6259 After 3AM, it's getting hard for Luke :-)
(This used to be commit 61c970b10a)
2000-02-04 15:19:28 +00:00
Tim Potter
3b6298b001 Fix some compile warnings.
(This used to be commit ccbd936211)
2000-02-04 05:18:06 +00:00
Luke Leighton
bbe275e95b 1) added void* state argument to tdb_traverse. guess what! there were
two places i found where it was appropriate to _use_ that third argument,
in locking.c and brlock.c!  there was a static traverse_function and
i removed the static variable, typecast it to a void*, passed it to
tdb_traverse and re-cast it back to the traverse_function inside the
tdb_traverse function.  this makes the use of tdb_traverse() reentrant,
which is never going to happen, i know, i just don't like to see
statics lying about when there's no need for them.

as i had to do in samba-tng, all uses of tdb_traverse modified to take
the new void* state argument.

2) disabled rpcclient: referring people to use SAMBA_TNG rpcclient.
i don't know how the other samba team members would react if i deleted
rpcclient from cvs main.  damn, that code's so old, it's unreal.
20 rpcclient commands, instead of about 70 in SAMBA_TNG.
(This used to be commit 49d7f0afbc)
2000-02-04 04:59:31 +00:00
Tim Potter
ae7696117e Put back lots of missing calls to dos_to_unix(). Thanks to
aono@cc.osaka-kyoiku.ac.jp (Tomoki AONO)
(This used to be commit 176c405d27)
2000-02-03 23:08:24 +00:00
Tim Potter
79601327cb Backed out -rdynamic linker option. It seems to be GNU ld specific.
Need a platform independant way of exporting symbols for dlopen().
Perhaps this is only needed for certain platforms anyway...
(This used to be commit 8b26be1e82)
2000-02-03 05:55:11 +00:00
Tim Potter
bc48e6d9e9 make proto
(This used to be commit 8855d7346d)
2000-02-03 05:18:26 +00:00
Tim Potter
16bb009dbb Mega-VFS merge. Yeah baby!
Synopsis: change every disk access function to work through a vfs_ops
structure contained in the connection_struct.
(This used to be commit 3aad500c0f)
2000-02-03 05:17:25 +00:00
Tim Potter
6df7bfbd9f Added 'vfs object' and 'vfs options' smb.conf parameters.
(This used to be commit f872518972)
2000-02-03 05:11:26 +00:00
Tim Potter
3d9a9cbe96 Comments to use vfs_* functions instead of dos_* unless really
accessing files on local disk.
(This used to be commit b55f63da7e)
2000-02-03 05:10:09 +00:00
Tim Potter
71604bb213 Add -rdynamic to LDFLAGS if libdl found.
(This used to be commit 4c14a343d1)
2000-02-03 05:07:06 +00:00
Tim Potter
f3772fe91d Added smbd/vfs.o and smbd/vfs-wrap.o to smbd objects.
(This used to be commit d91bfec537)
2000-02-03 05:05:29 +00:00
Tim Potter
0696c8cef7 Added .dummy file.
(This used to be commit 71fc4dc791)
2000-02-03 04:49:11 +00:00
Tim Potter
04f7d80ac3 Busting up of source/include/smb.h into smaller pieces which can be
#included by VFS modules without bringing in too much other junk.
(This used to be commit 13a2cf80f6)
2000-02-03 04:47:50 +00:00
Tim Potter
1afd542747 system_name not server_name
(This used to be commit e9da530120)
2000-02-01 03:44:33 +00:00
Tim Potter
71e83b2544 Pass arguments to ./configure
(This used to be commit 6e9ab51578)
2000-01-31 02:44:05 +00:00
Herb Lewis
230f81bf64 made "enable" and "disable" the default "lpresume" and "lppause" commands
for SYSV instead of the lpc commands (since these are BSD commands)

I still don't like the default "lppause" and "lpresume" commands for
SYSV since these seem to be SUN specific additions to the lp command
(at least I don't find them in IRIX and HPUX). I think this should be
inside an ifdef SUN??? but I'm not sure what the define should be so
I have left it for now.
(This used to be commit d3557b7f72)
2000-01-30 01:00:00 +00:00
Jeremy Allison
21df01ff7d Wrapped popen calls in HAVE_POPEN - needed if we are to add the
env patch.
Jeremy.
(This used to be commit 94c075faee)
2000-01-29 00:23:40 +00:00
Jeremy Allison
ebfef23a7d Fix from Motonobu TAKAHASHI to sort code page parameters first.
Needed when reading the rest of smb.conf.
Jeremy.
(This used to be commit 171bef4d95)
2000-01-29 00:03:50 +00:00
Jeremy Allison
40122f6e32 Modified auto alignment of ud[] struct on stack to be declared as an
array of pointers. This should cause alignment on a correct boundary..
Spotted by Darren Reed <darrenr@telnetmedia.com>.
Jeremy.
(This used to be commit 91f4d06753)
2000-01-28 23:47:31 +00:00
Jeremy Allison
451dcb3351 Fixed code page conversions of messages outgoing/incoming.
Jeremy.
(This used to be commit 84b045cbc8)
2000-01-27 01:09:21 +00:00
Jeremy Allison
ace4006c9f Added hash-based stat cache code from Ying Chen.
Jeremy.
(This used to be commit b62a1bd632)
2000-01-26 21:25:35 +00:00
Jeremy Allison
d867b86721 Second set of inline optimisation fixes from Ying Chen <ying@almaden.ibm.com>.
Stop makeing function calls for every use of skip_multibyte_char. This function
is called several *million* times during a NetBench run :-).
Jeremy.
(This used to be commit e5a3deba46)
2000-01-26 00:12:35 +00:00
Jeremy Allison
b5e7e4277d First set of speed improvements from Ying Chen <ying@almaden.ibm.com>.
Inline several commonly used functions as macros.
Jeremy.
(This used to be commit fc0219c7cc)
2000-01-25 22:57:51 +00:00
Jeremy Allison
014bdf941f tdb record read error return check fix from Dave Airlie <airlied@samba.org>.
Jeremy.
(This used to be commit 82c99dc8d8)
2000-01-24 23:12:02 +00:00
Andrew Tridgell
43f1d804af we need -lc when making shared objects or glibc doesn't do its magic
binding for stat()
(This used to be commit b52e60d568)
2000-01-24 03:39:24 +00:00
Luke Leighton
d91bfabc5d made cvs main up-to-date with samba_tng, with addition of process id to
msrpc loop-back interface.
(This used to be commit adbf97c0a9)
2000-01-21 02:33:21 +00:00
Jeremy Allison
d85e6f2c9a Moved Herb's global -> local changes to HEAD.
Jeremy.
(This used to be commit bdb2ff6a38)
2000-01-20 17:16:07 +00:00
Jeremy Allison
ea9909cb34 Added Herb's swat fixes.
Jeremy.
(This used to be commit fa3d91de89)
2000-01-18 05:11:29 +00:00
Luke Leighton
34edb1b47e SAMR_R_UNKNOWN_38 is 3 uint16 params (4-byte aligned) followed by status code.
(This used to be commit 55035b8984)
2000-01-17 23:01:23 +00:00
Andrew Tridgell
4e15be9cf1 fixed some typos in access_table() which, amaziingly enough, make no
difference to the result.
(This used to be commit 9e28b7220b)
2000-01-16 13:17:05 +00:00
Andrew Tridgell
62b02ca2e2 made access_table() a pure logic function - makes it simpler to apply
maths to
(This used to be commit 0ad62f128d)
2000-01-16 12:53:12 +00:00
Andrew Tridgell
6389b81f9d renamed DENY to DENY1
added DENY2 test that checks all 648 deny combinations for the case
of two opens on the same connection
(This used to be commit 01d4c4784d)
2000-01-16 12:28:43 +00:00
Andrew Tridgell
b09e4c370e use GET_DENY_MODE() macro
(This used to be commit d9c3e0e61f)
2000-01-16 12:27:20 +00:00
Andrew Tridgell
446f2aef83 as obelix would say "these romans are crazy"
I've finally got the access table code right for the case where the
two opens are on the same connection. It is _incredibly_ complex, but
now all 1296 test cases pass.

I'll be very surprised if anyone by MS and us gets this right at
CIFS2000
(This used to be commit 31a5857ce4)
2000-01-16 12:26:42 +00:00
Andrew Tridgell
2513cd5f17 use GET_DENY_MODE() macro instead of the bit shift
(This used to be commit d72c98a931)
2000-01-16 12:24:01 +00:00
Andrew Tridgell
48ff3b95a4 proto update
(This used to be commit ab492d4694)
2000-01-16 11:24:07 +00:00
Andrew Tridgell
8cf023fee3 a consequence of the access_table() fixes is that we can't treat
DENY_DOS and DENY_FCB as the same thing anymore (the difference
matters for *.exe files)
(This used to be commit 8f3ff09283)
2000-01-16 11:22:39 +00:00
Andrew Tridgell
2d96e58287 rewrote the access_table() code to get it right for *.exe, *.dll,
*.sym and *.com files. I still find it incredible that SMB treats file
locking differently depending on the file name - that is so ugly it
stinks.

anyway, we now behave the same way as NT, except for the
same-connection case which I'm still working on.
(This used to be commit 5b9be3feca)
2000-01-16 11:21:33 +00:00
Andrew Tridgell
b3b634ff42 use string_set() instead of string_init()
bug pointed out by Richard
(This used to be commit 070f49397f)
2000-01-16 11:18:04 +00:00
Andrew Tridgell
54e1176ba1 added code to allow traversal of the byte range lock database
this is used with "smbstatus -B" to dump the lock list
(This used to be commit 5f02262914)
2000-01-16 11:14:44 +00:00
Andrew Tridgell
33157e9bfc fixed a formatting error
(This used to be commit 10d9d81e8b)
2000-01-16 11:09:32 +00:00
Andrew Tridgell
5eae2eaebe make string_init() static
use string_set() instead, to avoid the bug Richard discovered
(This used to be commit fdcbf6b52d)
2000-01-16 11:07:11 +00:00
Andrew Tridgell
0cbae6fc3d make a br_off a SMB_BIG_UINT
(This used to be commit 0751a0ea4c)
2000-01-16 11:06:00 +00:00
Jeremy Allison
94bdf0572b useable_space does not include the alignment offset calculations.
Bugfix from Marc_Jacobsen@hp.com.
Jeremy.
(This used to be commit eb06c19916)
2000-01-14 23:50:38 +00:00
Jeremy Allison
86da0e8ac1 HP changes for registry querying.
Jeremy.
(This used to be commit fd8582cc0a)
2000-01-14 21:16:59 +00:00
Jeremy Allison
012be9ee73 Added HP change.
Jeremy.
(This used to be commit 4914d2f161)
2000-01-14 19:34:57 +00:00
Andrew Tridgell
1359195c50 casts and defines to make solaris happy
(This used to be commit 77cf152c02)
2000-01-14 08:33:20 +00:00
Andrew Tridgell
7bc1cc7e07 damn, Solaris already has a "enum lock_type"
changed it to "enum brl_type"
(This used to be commit 6b9ee7662c)
2000-01-14 08:01:44 +00:00
Andrew Tridgell
82af221e4a we now pass all byte range locking tests
the last piece was to use a smb timeout slightly larger than the
locking timeout in bloking locks to prevent a race
(This used to be commit 1b54cb4a33)
2000-01-14 04:32:57 +00:00
Jeremy Allison
3a6c2069d7 Added "inherit permissions" patch.
Fixed locking bug found by Andrew.
Jeremy.
(This used to be commit 38dffd360d)
2000-01-14 01:41:04 +00:00
Andrew Tridgell
2afd5d5eb5 some more work on the byte range locking
note the ugly global_smbpid - I hope that won't bethere for long, I
just didn't want to do two lots of major surgery at the one time.
Using global_smbpid avoids the big change of getting rid of our
inbuf/outbuf interface to reply routines. I'll do that once the
locking stuff passes all tests.
(This used to be commit f8bebf91ab)
2000-01-14 00:50:48 +00:00
Andrew Tridgell
cdb8c99fce greatly expanded the lock4 locking test. we now pass all but one test
- that should be fixed soon.
(This used to be commit 23bb936e1f)
2000-01-13 12:11:30 +00:00
Andrew Tridgell
826446ddef changes to reflect the new syntax of the locking calls.
(This used to be commit 44117df2c9)
2000-01-13 12:10:48 +00:00
Andrew Tridgell
6c2a1fdf36 the bulk of the new byte range locking coode
it doesn't map to posix locks yet, that will come later.
(This used to be commit 7f2a493095)
2000-01-13 12:09:36 +00:00
Andrew Tridgell
6bad53f758 the lock routines now take a enumerated type for read/write locks, and
we now don't pass the lock type at all for unlocks.

I was surprised to discover that NT totally ignores the lock type in
unlocks. It unlocks a matching write lock if there is one, otherwise
it removes the first matching read lock.
(This used to be commit 1bbc1ce18b)
2000-01-13 12:08:53 +00:00
Andrew Tridgell
415e3c0cec added Enosuchshare and a lock_type enum
(This used to be commit 6927aa1905)
2000-01-13 12:06:39 +00:00
Andrew Tridgell
0704684614 new prototypes
(This used to be commit 671e52cec2)
2000-01-13 12:05:58 +00:00
Andrew Tridgell
e18a2cad69 defined br_off as a type for byte range offsets. For now I've set it
as SMB_OFF_T, we need to do some autoconf changes to generate a 64 bit
int whenever possible (eg. long long on 32 bit i386)
(This used to be commit 09dbe8bcce)
2000-01-13 12:05:40 +00:00
Andrew Tridgell
08685f6a62 added locking/brlock.c, a byte range locking system
(This used to be commit 67b7b2a5a6)
2000-01-13 12:04:31 +00:00
Jeremy Allison
6d81c60a05 Added missing #ifdef for WITH_UTMP.
Jeremy.
(This used to be commit 465c5a8308)
2000-01-13 00:42:04 +00:00
Jeremy Allison
1e2f92af55 Added utmp fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 95d37a1d25)
2000-01-12 03:09:17 +00:00
Jeremy Allison
a2dac5f8f2 Use slprintf not snprintf.
Jeremy.
(This used to be commit b0a5ba9e01)
2000-01-12 02:52:42 +00:00
Jeremy Allison
50be4e1f34 Fix problems with broken libc fvct returns.
Jeremy.
(This used to be commit 6b61f2fe66)
2000-01-12 02:52:02 +00:00
Jeremy Allison
8f4e672094 Fixed pointer arithmetic found by IRIX compiler.
Jeremy.
(This used to be commit 20d72e8959)
2000-01-11 20:12:46 +00:00
Jeremy Allison
ec5b3043bf Fixed bug in unix_mask_match() that caused veto files not to work.
Jeremy.
(This used to be commit f5fedf80bc)
2000-01-11 02:18:46 +00:00
Luke Leighton
8433aa4379 modified smbd/msrpc credential transfer system. user session key
is *missing* from samba cvs main, therefore it is set to all zeros.
this will cause, amongst other things, administrator-changing-user-passwords,
and setting up new accounts, to fail, as the user's password can only be
decoded with the session key (in this case, the administrator's usr sess key).

it's never a perfect world, is it?
(This used to be commit 3362fcdfa4)
2000-01-11 02:00:31 +00:00
Andrew Tridgell
0af00edf67 I'm currently designing a new locking system (using a tdb database!)
that will make us match NT semantics exactly and do away with the
horrible fd multiplexing in smbd.

this is some diag stuff to get me started.

- added the ability to do read or write locks in clientgen.c

- added a LOCK4 test to smbtorture. This produces a report on the server
and its locking capabilities. For example, NT4 gives this:

the same process cannot set overlapping write locks
the same process can set overlapping read locks
a different connection cannot set overlapping write locks
a different connection can set overlapping read locks
a different pid cannot set overlapping write locks
a different pid can set overlapping read locks
the same process can set the same read lock twice
the same process cannot set the same write lock twice
the same process cannot override a read lock with a write lock
the same process can override a write lock with a read lock
a different pid cannot override a write lock with a read lock
the same process cannot coalesce read locks
this server does strict write locking
this server does strict read locking


whereas Samba currently gives this:

the same process can set overlapping write locks
the same process can set overlapping read locks
a different connection cannot set overlapping write locks
a different connection can set overlapping read locks
a different pid can set overlapping write locks
a different pid can set overlapping read locks
the same process can set the same read lock twice
the same process can set the same write lock twice
the same process can override a read lock with a write lock
the same process can override a write lock with a read lock
a different pid can override a write lock with a read lock
the same process can coalesce read locks
this server does strict write locking
this server does strict read locking


win95 gives this - I don't understand why!

the same process cannot set overlapping write locks
the same process cannot set overlapping read locks
a different connection cannot set overlapping write locks
a different connection cannot set overlapping read locks
a different pid cannot set overlapping write locks
a different pid cannot set overlapping read locks
the same process cannot set the same read lock twice
the same process cannot set the same write lock twice
the same process cannot override a read lock with a write lock
the same process cannot override a write lock with a read lock
a different pid cannot override a write lock with a read lock
the same process cannot coalesce read locks
this server does strict write locking
this server does strict read locking
(This used to be commit 49637936b6)
2000-01-10 14:41:20 +00:00
Andrew Tridgell
735ee07018 don't treat a packet as a oplock break unless it is a request, not a
reply!
(This used to be commit 45b8f1c92c)
2000-01-10 13:40:27 +00:00
Andrew Tridgell
c01663c1a9 extent smbtorture to test with both an exe file and a dat file
(This used to be commit dd2ce57504)
2000-01-08 11:37:45 +00:00
Andrew Tridgell
f2fc3a2dca fix a error in access_table revealed by the new deny test in smbtorture. We now exactly match NT for normal files. We still don't match for *.exe files though
(This used to be commit 3f7fea58e8)
2000-01-08 11:32:00 +00:00
Andrew Tridgell
e8b5cb4515 cli_open() wasn't handling DENY_FCB or O_WRONLY correctly.
After fixing that I needed to use O_RDWR instead of O_WRONLY in
several places to avoid the silly bug in MS servers that doesn't allow
getattrE on a file opened with O_WRONLY
(This used to be commit e21aa4cb08)
2000-01-08 10:15:53 +00:00
Andrew Tridgell
6ba295ce0b added a DENY test that tests deny mode handling. It produces a matrix
of 324 lines (6*6*3*3) of all possible deny mode behaviour. This
allows us to compare with NT. We currently don't match :)
(This used to be commit 2071105b43)
2000-01-08 09:49:52 +00:00
Andrew Tridgell
5b7f0c733c improved the error checking
(This used to be commit 2a152998a1)
2000-01-08 08:16:02 +00:00
Jeremy Allison
fab3e0eb08 smbd/mangle.c
smbd/negprot.c: Tidyup of static initializers.
smbd/server.c: Fix -l option.
Jeremy.
(This used to be commit d120f22fef)
2000-01-08 02:16:15 +00:00
Jeremy Allison
faa302c768 Fixed deny mode bug :
: If a file is resident on NT and the first user opens it read/write with DENY_READ then a subsequent
: attempt by a second user (running under Windows 95) to open it read/write DENY_NONE fails.
: Under samba 2.0.5a the second open succeeds but the file is write only.
Jeremy.
(This used to be commit 974af581fe)
2000-01-08 01:23:13 +00:00
Andrew Tridgell
6e8548acb3 fixed a comment
(This used to be commit 32f29c490e)
2000-01-07 12:40:34 +00:00
Andrew Tridgell
3c37bfe1aa netbios scope is a DOS_STRING
(This used to be commit e42b629baa)
2000-01-07 08:48:04 +00:00
Andrew Tridgell
dd9e8074f7 always restart nmbd and smbd when asked, even if they appear not to be
responding. They could be stuck
(This used to be commit 8728c0bc94)
2000-01-07 08:47:34 +00:00
Andrew Tridgell
1dac1ec030 remove scope parameter here too
(This used to be commit c78deb1d22)
2000-01-07 08:46:33 +00:00
Andrew Tridgell
171da4d787 this looks like a big commit, but it isn't really :)
This fixes our netbios scope handling. We now have a 'netbios scope' option
in smb.conf and the scope option is removed from make_nmb_name()

this was prompted by a bug in our PDC finding code where it didn't append
the scope to the query of the '*' name.
(This used to be commit b563be824b)
2000-01-07 06:55:36 +00:00
Andrew Tridgell
102e44e446 don't use strcpy
(This used to be commit bf9b1328c5)
2000-01-07 06:14:43 +00:00
Andrew Tridgell
112faa49e6 don't require readline
(This used to be commit 2dbe70da8d)
2000-01-07 03:02:13 +00:00
Andrew Tridgell
e91ceacb6c - patch from Rusty to neaten up the code a bit
- fixed a race condition in tdb_open()
(This used to be commit 21d4882f64)
2000-01-07 03:01:55 +00:00
Jeremy Allison
f0a3883379 Removed unneeded #define.
Jeremy.
(This used to be commit c33b6d2aba)
2000-01-06 21:58:26 +00:00
Jeremy Allison
20bd653b48 Fixed spurious error message when doing a 'put' of an empty file.
Jeremy
(This used to be commit 9ba8ad1d3d)
2000-01-06 21:23:49 +00:00
Jeremy Allison
cebc23762d Generic wildcard matching fix from weidel@multichart.de.
Jeremy.
(This used to be commit 8b790cf3e2)
2000-01-06 21:09:11 +00:00
Jeremy Allison
8bd94c178f Re-added "dfree command" functionality that was described in the man pages
but was not in the code.
Jeremy.
(This used to be commit f4898a1f16)
2000-01-06 01:41:27 +00:00
Jeremy Allison
eb87c3fbdc Fix for renaming directories on OS/2 server. Fix from John Janosik <jpjanosi@us.ibm.com>.
Jeremy.
(This used to be commit b3c0dd7233)
2000-01-06 00:06:46 +00:00
Jeremy Allison
5983a77020 Moved check_plaintext_password() into smbd/chgpasswd.c from smbd/ipc.c.
configure configure.in include/config.h.in: Added <sys/un.h> autoconf
code for Luke's UNIX domain sockets code.
Jeremy.
(This used to be commit 210d61db08)
2000-01-05 23:46:47 +00:00
Jeremy Allison
c4914e2202 client/client.c: I18N fixes.
smbd/dir.c: Reformatting comments.
smbd/ipc.c: New password change code for Win98.
Jeremy.
(This used to be commit 9e90122afd)
2000-01-05 19:59:42 +00:00
Andrew Tridgell
5e9f559187 implemented talloc() as described on samba-technical. This fixes the
lp_string() bug properly.

we still need to add lp_talloc_free() calls in all the main event
loops, I've only put it in smbd and nmbd thus far.
(This used to be commit aa7f815525)
2000-01-05 06:36:36 +00:00
Andrew Tridgell
1f438ffb7e lower the default hash size a bit
(This used to be commit 51ed6e8cec)
2000-01-05 01:50:06 +00:00
Andrew Tridgell
437c68b5fe use a minimal hash size in the unexpected packet database. A large
hash is only useful when we fetch by key, not when we use
tdb_traverse()
(This used to be commit e154f041e8)
2000-01-05 01:48:30 +00:00
Jeremy Allison
794aafe349 Added "crap" fix for rotating string buffers. (Increased to 20, added #define).
Andrew - please fix this properly when you have time :-).
Jeremy.
(This used to be commit 8515bdb39c)
2000-01-04 19:19:07 +00:00
Luke Leighton
ac9c6994e0 using read_with_timeout(), min data size 16 bytes (DCE/RPC header), max
size of SMBtrans response, timeout of 10 seconds.  read_data() _certainly_
doesn't work, as you don't know what size of the data is going to come
back that needs to be fed back in the SMBtrans response.  yes, oops :-)
(This used to be commit 70d6f76357)
2000-01-04 15:59:57 +00:00
Luke Leighton
528399a8a2 oops, must use read_data() not read(), as read() may only provide
part of the data stream.  read_data() is a wrapper to guarantee
receiving exactly the requested number of bytes.
(This used to be commit 90c27b7bff)
2000-01-04 07:52:21 +00:00
Jeremy Allison
7434c1aabd Fixed getgrent() recurse problem.
Jeremy.
(This used to be commit b5420f6152)
2000-01-04 01:01:27 +00:00
Luke Leighton
fbd17c8daf simple mods to add msrpc pipe redirection. default behaviour: fall back
to using internal msrpc code in smbd.
(This used to be commit 8976e26d46)
2000-01-03 19:19:48 +00:00
Andrew Tridgell
632b4f806e added suppport for unexpected udp/138 packets
I also fixed up the lookup_pdc_name() code so that it now works, even
with a NT server that insists on replying to udp/138.

The method I used to match packets was to use the mailslot string as a
datagram ID. The true dgm_id doesn't work as NT doesn't set it
correctly. uggh.

PS: Jeremy, I had to change your code quite a bit, are you sure this
worked with a Samba PDC?? The code looked broken, it got the offsets
wrong in the SMB portion of the packet and filled in the IP
incorrectly.
(This used to be commit 32f66f4ea6)
2000-01-03 06:30:50 +00:00
Andrew Tridgell
8d1d27b43c ignore a few files
(This used to be commit 8767334d8a)
2000-01-03 03:39:04 +00:00
Andrew Tridgell
d705b62141 got rid of mem_man
yamd is much better, and doesn't require any source code changes
if you haven't seen yamd then take a look at
	http://www3.hmc.edu/~neldredge/yamd/
its excellent!
(This used to be commit 25b13f8b79)
2000-01-03 03:31:41 +00:00
Andrew Tridgell
8ae3366268 the bulk of the unexpected packet handling code is in here
(This used to be commit 771f610f0d)
2000-01-03 03:24:23 +00:00
Andrew Tridgell
574788039f added the unexpected packet database (unexpected.tdb)
this means "nmblookup -S" now always works, even with broken servers
the database stores all unexpected replies and these can be accessed
by any client.
while doing this I cleaned up a couple of functions, and put in place
a better trn_id generator. in most places the code got quite a bit
simpler due to the addition of simple helper functions.

I haven't yet put the code in to take advantage of this for pdc
replies - that will be next. Jeremys pdc finding code will then work :)
(This used to be commit 280e6359d3)
2000-01-03 03:17:16 +00:00
Andrew Tridgell
c0ad729de6 drop the alignment to 4 bytes - this makes tdb more space efficient
and doesn't seem to affect performance
(This used to be commit 1fb293732e)
2000-01-03 00:52:14 +00:00
Andrew Tridgell
98b1c568af fixed active shares display
(This used to be commit b87d1442db)
2000-01-03 00:32:14 +00:00
Andrew Tridgell
5105c1b450 don't close the database after each claim_connection()
(This used to be commit d5ceb2972b)
2000-01-03 00:22:43 +00:00
Andrew Tridgell
8b1229c3fe updated docs
(This used to be commit c199ec9543)
2000-01-02 23:03:32 +00:00
Andrew Tridgell
9a781a8c6d - added tdb_flags option to tdb_open()
- added TDB_CLEAR_IF_FIRST flag to clear the database if this is the
  first attached process. Useful for non-persistent databases like our
  locking area (this will also make upgrades to new database layouts easier)
- use lock_path() in a couple of places
- leave connections database open while smbd running
- cleaned up some tdb code a little, using macros for constants
(This used to be commit 00e9da3ca5)
2000-01-02 23:00:27 +00:00
Andrew Tridgell
321983bb6b show test result in ops/sec
(This used to be commit 88a146ab04)
2000-01-02 01:40:54 +00:00
Andrew Tridgell
7a0bc53221 - optimise tdb_store() a little
- prevent a free of an unallocated pointer
(This used to be commit b35b5c6388)
2000-01-02 01:40:35 +00:00
Jeremy Allison
211697ee6c Converted most of the functions in lib/util_str.c to smb_ucs2_t equivalents.
Jeremy.
(This used to be commit 1ba42aca21)
1999-12-29 02:00:38 +00:00
Andrew Tridgell
4a85b76dae a useful locking tester - it uses lots of simultaneous writers
(This used to be commit 3b3fdd8661)
1999-12-24 08:46:02 +00:00
Andrew Tridgell
d6a5878c76 fixed more locking bugs - all seems OK now
(This used to be commit 584537961b)
1999-12-24 08:45:02 +00:00
Jeremy Allison
f0161cf815 Fixed range checking in unicode to multibyte function. Oops.
Jeremy.
(This used to be commit 61e06c44b4)
1999-12-23 18:58:44 +00:00
Jeremy Allison
3a3afec47f Added wtoupper/wtolower.
Jeremy.
(This used to be commit 2e03ed6254)
1999-12-23 02:01:37 +00:00
Jeremy Allison
7c51c5ddf3 Samba now includes a full ucs2 upper to lower case (and vica versa) map table.
Jeremy.
(This used to be commit d7b72d4cbf)
1999-12-23 01:57:43 +00:00
Jeremy Allison
63ca6eaff0 Upper to lower case map table for unicode.
Jeremy.
(This used to be commit 82421e93c0)
1999-12-23 01:53:25 +00:00
Jeremy Allison
8dc6098539 Awk script to create #include C code from unicode upper -> lower case map.
Jeremy.
(This used to be commit e59fe73f19)
1999-12-23 01:41:19 +00:00
Jeremy Allison
681e50c096 Unicode upper <--> lower character map. Needed for wisXXX functions.
Jeremy.
(This used to be commit a42cf2036f)
1999-12-23 01:39:01 +00:00
Andrew Tridgell
c23a552c58 fixed locking code
(This used to be commit 1f5dc92404)
1999-12-23 01:14:20 +00:00
Jeremy Allison
5b3096a32f include/includes.h: Trimmed down unicode directory entry to be POSIX complient.
lib/system.c: Trimmed down unicode directory entry to be POSIX complient.
lib/util_unistr.c: Added wstrdup().
Jeremy.
(This used to be commit ca64f4ab00)
1999-12-22 18:46:05 +00:00
Andrew Tridgell
fc4e722127 improved error message in case the lock list is truncated
(This used to be commit f4ecc5a8e3)
1999-12-22 01:36:27 +00:00
Andrew Tridgell
ecfee3f170 fixed a bug in the handling of tdb version number upgrade
(This used to be commit ed7541668e)
1999-12-22 01:31:09 +00:00
Jeremy Allison
e7851ce52e First cut at unicode sys_xx functions. Now to start moving upwards.....
Jeremy.
(This used to be commit b5eb009cc3)
1999-12-22 01:29:22 +00:00
Andrew Tridgell
30cecd8d2c added some paranoia code
(This used to be commit c547ffa9e9)
1999-12-22 01:22:14 +00:00
Jeremy Allison
02496ae415 Ok - we now have the following functions for UNICODE support :
unicode_to_unix()
unix_to_unicode()
unicode_to_dos()
dos_to_unicode()
wstrlen()
safe_wstrcpy()
safe_wstrcat()
wstrcmp()
wstrncmp()
wstrstr()
wstrchr()
wstrrchr()
wstrtok()
Jeremy.
(This used to be commit ae34e2589a)
1999-12-22 00:17:35 +00:00
Andrew Tridgell
4b37a2c1ee when no shares are returned the *shares pointer must be set to null
(This used to be commit 84fe2337c7)
1999-12-22 00:08:25 +00:00
Jeremy Allison
8177fc778b Added new unicode functions - not used yet, but are the basis for the
internal unicode conversion of Samba.
Jeremy.
(This used to be commit 302412df64)
1999-12-21 23:14:01 +00:00
Jeremy Allison
44dc314fea Changed MAX to MIN in SET_FILE_BASIC_INFO as recommended by "Michael C. Adler" <Michael.Adler@compaq.com>
as this breaks the least number of programs.
Jeremy.
(This used to be commit 2cf408772f)
1999-12-21 19:14:17 +00:00
Andrew Tridgell
d171864c93 expanded the tdb documentation
(This used to be commit efb4fbcca8)
1999-12-21 11:44:43 +00:00
Andrew Tridgell
3da55bfb8e changed %g to %3.1f to be friendly to our poor snprintf() code
(This used to be commit 6d506ee641)
1999-12-21 09:54:24 +00:00
Andrew Tridgell
488115dbce changed message is connections.tdb doesn't exist
(This used to be commit 835b9881c0)
1999-12-21 09:33:45 +00:00
Andrew Tridgell
4e1291a83f converted all our existing shared memory code to use a tdb database
instead of either sysv or mmap shared memory or lock files.

this means we can now completely remove
	locking_shm.c
	locking_slow.c
	shmem.c
	shmem_sysv.c
and lots of other things also got simpler

locking.c got a bit larger, but is much better compartmentalised now
(This used to be commit e48c2d9937)
1999-12-21 09:25:59 +00:00
Andrew Tridgell
69d24d869b first cut at using the tdb code for the connections structure, the
SWAT status page and smbstatus. It made the code _much_ simpler, I
wish we'd done a database module a long time ago!
(This used to be commit 4951755413)
1999-12-21 04:54:30 +00:00
Andrew Tridgell
0c4b1ea014 this was left out from the 2.0.6 merge
(This used to be commit 7067aeecab)
1999-12-21 03:05:38 +00:00
Andrew Tridgell
c2c42b8694 first pass at the database code for Samba. This also includes a test
suite and a very simple tool for manuipulating the databases.

the main code is in tdb/tdb.c and includes both mmap and file based
IO. All databases auto-expand and allow multiple simultaneous writers.

the next step is using this new capability in lots of places in Samba
where we have existing ad-hoc databases
(This used to be commit c89d29cc5e)
1999-12-21 03:04:37 +00:00
Jeremy Allison
e004340f71 Fix based on code from monyo@home.monyo.com to fix multibyte continuation
issues.
Jeremy.
(This used to be commit 023f90e766)
1999-12-21 02:15:53 +00:00
Jeremy Allison
7b39ef2950 Fix from tulipant-gergely@dbrt.hu for returning incorrect error code
on user auth fail.
Jeremy.
(This used to be commit 886ad59d79)
1999-12-21 00:06:00 +00:00
Jeremy Allison
80a180853d *Finally*. Correct patch to fix timestamp problems from Paul Eggert <eggert@twinsun.com>.
I wish I had written this one :-).
Jeremy.
(This used to be commit 8f93c08881)
1999-12-20 21:46:41 +00:00
Andrew Tridgell
ce394449c7 added basic nsswitch support - this allows you to use a "wins" entry
in a /etc/nsswitch.conf hosts line.

Only tested on RH6.1, but should work on a broad range of Linux
distributions. It could probably be made to work with Solaris pretty
easily.

It does not build by default. Build it with "make nsswitch"
(This used to be commit 4058eb5bff)
1999-12-17 06:11:25 +00:00
Andrew Tridgell
418ba2933f more files from 2.0.6
(This used to be commit 4a20579571)
1999-12-17 01:52:05 +00:00
Andrew Tridgell
5919c86830 update version to pre-3.0.0
(This used to be commit c3a30ce459)
1999-12-17 01:51:33 +00:00
Andrew Tridgell
a0b9e3ef4f client/smbspool.c from 2.0.6
(This used to be commit 599a7e7f9e)
1999-12-17 01:48:16 +00:00
Andrew Tridgell
e983ca6c46 lib/fnmatch.c from 2.0.6
(This used to be commit dadad3ed67)
1999-12-17 01:47:25 +00:00
Andrew Tridgell
f6cf850f16 printing/print_cups.c from 2.0.6
(This used to be commit 452776a5a7)
1999-12-17 01:46:15 +00:00
Andrew Tridgell
20aba767ea interfaces.h from 2.0.6
(This used to be commit a3d7ec0c9d)
1999-12-17 01:44:30 +00:00
Andrew Tridgell
9564ab8610 interfaces.c from 2.0.6
(This used to be commit 4e1458b8c1)
1999-12-17 01:41:55 +00:00
Andrew Tridgell
173f7e66dc util_sec.c from 2.0.6
(This used to be commit 955d187139)
1999-12-17 01:39:47 +00:00
Jeremy Allison
92a036cc37 Unicode conversion fix in Japanese environment from Motonobu TAKAHASHI.
Jeremy.
(This used to be commit decc6ebca2)
1999-12-13 19:17:40 +00:00
Andrew Tridgell
32a965e09c 2nd phase of head branch sync with SAMBA_2_0 - this delets all the files that were in the head branch but weren't in SAMBA_2_0
(This used to be commit d7b2087865)
1999-12-13 13:35:20 +00:00
Andrew Tridgell
3db52feb1f first pass at updating head branch to be to be the same as the SAMBA_2_0 branch
(This used to be commit 453a822a76)
1999-12-13 13:27:58 +00:00
Luke Leighton
f6276724ba changed function name of get_home_dir() to get_unixhome_dir(), to stop
clash with gnu readline library.

fixed issue with [homes] service not being there - call lp_add_home()
just before starting the msrpc processing.
(This used to be commit 054195df9b)
1999-12-12 21:00:35 +00:00
Luke Leighton
4f8a24522c final part of "first" phase converting over to msrpc daemon architecture.
done a minimal amout of clean-up in the Makefile, removing unnecessary
modules from the link stage.  this is not complete, yet, and will
involve some changes, for example to smbd, to remove dependencies on
the password database API that shouldn't be there.  for example,
smbd should not ever call getsmbpwXXX() it should call the Samr or Lsa
API.

this first implementation has minor problems with not reinstantiating
the same services as the caller.  the "homes" service is a good example.
(This used to be commit caa5052522)
1999-12-12 20:03:42 +00:00
Luke Leighton
0ce128e355 delineation between smb and msrpc more marked. smbd now constructs
pdus, and then feeds them over either a "local" function call or a "remote"
function call to an msrpc service.  the "remote" msrpc daemon, on the
other side of a unix socket, then calls the same "local" function that
smbd would, if the msrpc service were being run from inside smbd.

this allows a transition from local msrpc services (inside the same smbd
process) to remote (over a unix socket).

removed reference to pipes_struct in msrpc services.  all msrpc processing
functions take rpcsrv_struct which is a structure containing state info
for the msrpc functions to decode and create pdus.

created become_vuser() which does everything not related to connection_struct
that become_user() does.

removed, as best i could, connection_struct dependencies from the nt spoolss
printing code.

todo: remove dcinfo from rpcsrv_struct because this stores NETLOGON-specific
info on a per-connection basis, and if the connection dies then so does
the info, and that's a fairly serious problem.

had to put pretty much everything that is in user_struct into parse_creds.c
to feed unix user info over to the msrpc daemons.  why?  because it's
expensive to do unix password/group database lookups, and it's definitely
expensive to do nt user profile lookups, not to mention pretty difficult
and if you did either of these it would introduce a complication /
unnecessary interdependency.  so, send uid/gid/num_groups/gid_t* +
SID+num_rids+domain_group_rids* + unix username + nt username + nt domain
+ user session key etc.  this is the MINIMUM info identified so far that's
actually implemented.  missing bits include the called and calling
netbios names etc.  (basically, anything that can be loaded into
standard_sub() and standard_sub_basic()...)
(This used to be commit aa3c659a8d)
1999-12-12 01:25:49 +00:00
Gerald Carter
12ca139d5c OK. This code works on a RedHat 6.0 system. However smbpasswd
time out of sending the session setup on Solaris 2.6.  No idea.
I'll work on it some tomorrow.  This is to fix the "Unable to
setup password vectors" thingy.

Also changed an inet_aton() to inet_addr() as the former is
not very portable :-)

Luke,  I set the redir flag to false because the connection to
the smb-agent was failing and smbpasswd bombed.  Double check me
on this one.



-jc
(This used to be commit e1d2b174ca)
1999-12-09 07:06:12 +00:00
Luke Leighton
d45f5cf6b0 jerry spotted that get_domain_sids() was being called with the wrong
arguments: get_any_dc_name() was being called with a server name
not a domain name.  oops.
(This used to be commit 631814302d)
1999-12-08 23:03:42 +00:00
Luke Leighton
6281c5d7a9 moved sys/un.h to after sys/socket.h. done a gnu autoconf around sys/un.h
(This used to be commit b2ea37a8f1)
1999-12-08 22:57:34 +00:00
Luke Leighton
6b22909bde parsing code for transferring unix and nt security credentials over-the-wire.
at present, a unix password is missing from the unix credentials, but is
not _actually_ expected to be needed.  weeelll... maybe :-)

this is used to transfer credentials between smbd and msrpc daemons, down
a unix socket, so that the unix and nt credentials can be inherited by
an msrpc daemon called up from smbd.
(This used to be commit 5e68403bbb)
1999-12-08 21:45:57 +00:00
Luke Leighton
4ab9d91428 ABOUT TIME!!!!!!!!
damn, this one is bad.

started, at least two days ago, to add an authentication mechanism to
the smbd<->msrpc redirector/relay, such that sufficient unix / nt
information could be transferred across the unix socket to do a
become_user() on the other side of the socket.

it is necessary that the msrpc daemon inherit the same unix and nt
credentials as the smbd process from which it was spawned, until
such time as the msrpc daemon receives an authentication request
of its own, whereupon the msrpc daemon is responsible for authenticating
the new credentials and doing yet another become_user() etc sequence.
(This used to be commit 30c7fdd6ef)
1999-12-08 21:43:03 +00:00
Luke Leighton
a0ba234cf9 the first independent msrpc daemon - lsarpcd.
one horrible cut / paste job from smbd, plus a code split of shared
components between the two.

the job is not _yet_ complete, as i need to be able to do a become_user()
call for security reasons.  i picked lsarpcd first because you don't
_need_ security on it (microsoft botched so badly on this one, it's not
real.  at least they fixed this in nt5 with restrictanonymous=0x2).
fixing this involves sending the current smb and unix credentials down
the unix pipe so that the daemon it eventually goes to can pick them
up at the other end.

i can't believe this all worked!!!
(This used to be commit 2245b0c6d1)
1999-12-06 00:44:32 +00:00
Luke Leighton
7c53f158ba reenabled retry_time (commented out accidentally in name_status)
(This used to be commit bf9422832c)
1999-12-05 02:22:28 +00:00
Luke Leighton
92bc7a4263 first version of msrpc agent redirector code. client-side only.
(This used to be commit 5e5a1dceee)
1999-12-05 01:34:34 +00:00
Luke Leighton
854f35e20f created create_pipe_socket() function.
(This used to be commit a3af3b4312)
1999-12-05 00:13:17 +00:00
Luke Leighton
ddda7722a6 argh! how horrible! spent ages working out why packets weren't being
received properly when a UDP "retry" occurs.  it's because reads and
writes must be interleaved / matched.

scenario:

nmblookup connects to agent, sends request.

agent receives request, broadcasts it on 137.

agent RECEIVES 137 broadcast, sends it to nmblookup

agent receives RESPONSE to 137 broadcast, sends it to nmblookup.

if reads are not equally interspersed with writes, then second send
will fail.

if you think this is odd behaviour and that the agent should be filtering
its own UDP traffic, think again.

agent will be, potentially, redirecting nmbd traffic (including WINS
server) not just client programs.
(This used to be commit 43e158c426)
1999-12-04 23:40:21 +00:00
Luke Leighton
97913d82f5 argh. trying to get the nmb agent code to filter out "self" packets.
(This used to be commit 84d7cc6323)
1999-12-04 22:22:37 +00:00
Luke Leighton
c41205e28f even more cool! nmb-agent moved over to new vagent style, too!
(This used to be commit 49c157eae4)
1999-12-04 22:05:59 +00:00
Luke Leighton
f6077db317 cool! created higher-order function table for agent redirection.
(This used to be commit 7bb2e55d0d)
1999-12-04 21:55:39 +00:00
Luke Leighton
9b44e117f9 more similar agent code
(This used to be commit 2c778313b8)
1999-12-04 20:43:45 +00:00
Luke Leighton
4503221852 nmb agent memory free problems
(This used to be commit b4306cbf06)
1999-12-04 20:29:03 +00:00
Luke Leighton
409798953d trying to make redirector agent code same base.
(This used to be commit 9ba9df453a)
1999-12-04 20:11:31 +00:00
Luke Leighton
f521205cb3 jeremy is going to hate me for this.
created an "nmb-agent" utility that, yes: it connects to the 137 socket
and accepts unix socket connections which it redirects onto port 137.

it uses the name_trn_id field to filter requests to the correct
location.

name_query() and name_status() are the first victims to use this
feature (by specifying a file descriptor of -1).
(This used to be commit d923bc8da2)
1999-12-04 19:14:37 +00:00