1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-31 17:18:04 +03:00
Commit Graph

844 Commits

Author SHA1 Message Date
Andrew Tridgell
f074d6ef57 split fsusage() into a separate module (to fix linking problems with
spoolssd in tng)
(This used to be commit e2eacdd74c)
2000-04-19 08:23:13 +00:00
Andrew Tridgell
59f992f12d patch from luke to split out lanman code from ipc.c into lanman.c
(This used to be commit 95246a8432)
2000-04-19 07:00:22 +00:00
Andrew Tridgell
612682354f - got rid of the "passive" option
- cleaned up the standard_sub_*() calls a lot
(This used to be commit 2c2d95d77d)
2000-04-19 04:01:16 +00:00
Jeremy Allison
4217c939ec locking/locking.c: Fixed placeholder code for POSIX locking.
printing/printing.c: Cast tdb_delete to (tdb_traverse_func) to stop warning.
                     tmpfile gives mirror warning.
smbd/groupname.c: Remember to file_lines_free() on exit.
tdb/tdb.h: Add tdb_traverse_func typedef.
Jeremy
(This used to be commit 204ca1195c)
2000-04-18 20:41:04 +00:00
Luke Leighton
9ff032320d ReadDirName calls vfs->readdirname calls dos_readdirname.
replaced with readdirname.  ditto for OpenDir and CloseDir.
(This used to be commit a0afe0d5f8)
2000-04-18 02:09:50 +00:00
Andrew Tridgell
8d7e498db1 converted a couple more functions to use a fd instead of a FILE*
added a new utility fn file_lines_slashcont() which is used to handle
files that treat a \ followed by a newline as a blank
(This used to be commit 384ecd9d66)
2000-04-16 11:17:19 +00:00
Andrew Tridgell
19f946ba6f converted a bunch more functions to use a fd instead of a FILE*
to support some of this I added the following functions in util_file.c

file_lines_pload : load lines from a pipe
file_pload : load a pipe into memory
(This used to be commit a09470817c)
2000-04-16 11:00:21 +00:00
Andrew Tridgell
d79a8c68d6 removed old comments
(This used to be commit 9f49d17d4c)
2000-04-16 08:04:06 +00:00
Andrew Tridgell
2c80622a94 use some symbolic names for print queue status
(This used to be commit e8418ab736)
2000-04-16 07:38:45 +00:00
Andrew Tridgell
99acf45fa4 added helper fns to change from internal status codes to nt spoolss codes
(This used to be commit 8af879b3f5)
2000-04-16 07:28:36 +00:00
Andrew Tridgell
54de56a1be the changes to the main smb code
------------
The following series of commits are for the new tdb based printing
backend. This completely replaces our old printing backend.

Major changes include:

- all print ops are now done in printing/*.c rather than scattered all
  over the place
- system job ids are decoupled from SMB job ids
- the lpq parsers don't need to be nearly so smart, they only need to
  parse the filename, the status and system job id
- we can store lots more info about a job, including the full job name
- the queue cache control is much better

I also added a new utility routine file_lines_load() that loads a text
file and parses it into lines. This is used in out lpq parsing and I
also want to use it to replace all of our fgets() based code in other
places.
(This used to be commit d870542c28)
2000-04-16 06:22:31 +00:00
Jeremy Allison
ce5e230952 Log file check patch from Mattias Gronlund <Mattias.Gronlund@sa.erisoft.se>.
Modified to do checks in timeout processing not in main loop. This (IMHO)
is the correct place as (a) we are already root, and (b) it is guarenteed
to be called every 200 smb requests.
Jeremy.
(This used to be commit c3794fd29f)
2000-04-15 00:31:56 +00:00
Jeremy Allison
96b3bf3140 Implmented mapping of lock offset/count from 64 bit MS ranges
to either 63 or 31 bit POSIX ranges. Code to get these locks
not yet added.
Jeremy.
(This used to be commit 9c3b9146a3)
2000-04-12 21:46:22 +00:00
Jeremy Allison
8316237e9c Code to map tdb locks onto POSIX. Mainly placeholder code at the moment,
but the structure is done enough so that Andrew can look it over and give
a yea/nay decision.
Jeremy.
(This used to be commit db96f83e34)
2000-04-12 17:59:09 +00:00
Jeremy Allison
e1083ea7df Roll back to using static MACHINE.SID after consultation with Andrew. This
code will be removed soon and a SID auto-generated from (probably) primary
hostname and never stored in a file will replace it.
Jeremy.
(This used to be commit fbfe94a799)
2000-04-12 00:37:08 +00:00
Jeremy Allison
2311ecab4c The latest open() code changes broke the NT directory opens. Detect if a
read-only open on a directory was done and return an EISDIR from open_file().
Changed interface to fd_close to return error.
Jeremy.
(This used to be commit df4302f391)
2000-04-11 21:38:45 +00:00
Jeremy Allison
f6be38cae2 include/byteorder.h: ALIGN4/ALIGN2 macros.
include/includes.h: Added SMB_BIG_UINT_BITS.
lib/util.c: Removed align2/align4 - use macros.
libsmb/namequery.c: Use ALIGN2.
locking/locking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
                   Needed to move to hiding POSIX locks at a lower layer.
nmbd/nmbd_processlogon.c: Use ALIGN2/ALIGN4 macros.
smbd/blocking.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
smbd/reply.c: Replace do_lock, do_unlock, args with SMB_BIG_UINT, not SMB_OFF_T.
Jeremy.
(This used to be commit 491eea8a20)
2000-04-11 19:44:54 +00:00
Andrew Tridgell
2fa922611b finally got sick of the "extern int Client" code and the stupid
assumption that we have one socket everywhere

while doing so I discovered a few bugs!

1) the clientgen session retarget code if used from smbd or nmbd would
cause a crash as it called close_sockets() which closed our main
socket! fixed by removing close_sockets() completely - it is unnecessary

2) the caching in client_addr() and client_name() was bogus - it could
easily get fooled and give the wrong result. fixed.

3) the retarget could could recurse, allowing an easy denial of
service attack on nmbd. fixed.
(This used to be commit 5937ab14d2)
2000-04-11 13:55:53 +00:00
Jeremy Allison
4379d359a8 Fix for soft quotas not being set from
Norbert Pschel <Pueschel.Norbert@Walzbarren-VAW.ne.uunet.de>
Jeremy.
(This used to be commit 5480ecf24b)
2000-04-10 21:02:45 +00:00
Andrew Tridgell
2733f5352a initialise fsp->fd to -1
(This used to be commit 5257ff5d67)
2000-04-10 13:12:04 +00:00
Andrew Tridgell
689ec46450 the bulk of the changes to get rid of fd_ptr and move print open
handling to printing/printing.c

most of this was just replacing things like fsp->fd_ptr->fd with fsp->fd

the changes in open.c are quite dramatic. Most of it is removing all
the functions that handled the fd multiplexing
(This used to be commit d1827a3648)
2000-04-10 13:05:23 +00:00
Andrew Tridgell
f4274fe897 utmp compile fix from peter@cadcamlab.org
(This used to be commit c0562a02c3)
2000-04-10 02:44:06 +00:00
Jeremy Allison
2d15c34f4f Change to vfs API. POSIX states fsync should return an int, not a void.
Jeremy.
(This used to be commit 6c442d68af)
2000-04-04 18:44:04 +00:00
Jeremy Allison
9d5ddab766 Removed strange optimisation (paranoia fix maybe ?) that stopped smbd
from returning '.' and '..' in a top level listing of a trans2 directory
scan. NT does return these entries.
Jeremy.
(This used to be commit 7325059a09)
2000-04-04 01:13:54 +00:00
Jeremy Allison
0d9d264625 Fixed bug found by JF where if the amount of data to return in the prs_struct
was small enough to pass the SMBtrans max data test we weren't setting the
"more data needed" error. I was fogetting the RPC_HEADER_LEN.... I now
check the correct length (current pdu staging area length). More printer
spool enum stuff works now. This bug does not affect TNG.
Jeremy.
(This used to be commit 1c9d2c016a)
2000-03-29 22:19:58 +00:00
Tim Potter
84b16407bf More Japanese filename fixes wrt VFS code from
Tomoki AONO <aono@cc.osaka-kyoiku.ac.jp>
(This used to be commit a9b628ebaa)
2000-03-29 07:44:23 +00:00
Jeremy Allison
b546035ba8 Win2k will only accept volume labels in UNICODE. Fixed.... :-(.
Jeremy.
(This used to be commit 676db02f1c)
2000-03-28 02:38:59 +00:00
Jeremy Allison
aaa8aadd35 Moved common code to set parameter offset field correctly oout of 'if'
statement into main function code path.
Jeremy.
(This used to be commit f15ca0d927)
2000-03-28 02:20:57 +00:00
Andrew Tridgell
18bc76a0c6 changed the definition of dos_PutUniCode
the previous definition could result is us overflowing a buffer. The
null termination was always added yet the size returned did not
include the null termination.

the new function takes a BOOL null_terminate, and always returns the
total number of bytes consumed by the string.
(This used to be commit 426c904333)
2000-03-27 12:38:45 +00:00
Jeremy Allison
614929752e rpc_parse/parse_spoolss.c: Added checks on mallocs/overflow checks on all prs_xx
calls.
smbd/connection.c: Fix from David Lee <T.D.Lee@durham.ac.uk>.
Jeremy.
(This used to be commit 53721fbc7d)
2000-03-25 01:37:08 +00:00
Jeremy Allison
6814d0f456 Correctly convert from little-endian UNICODE to dos_codepage when doing
secure file create.
Jeremy.
(This used to be commit 90134dd137)
2000-03-22 20:39:31 +00:00
Jeremy Allison
8f1620125d acconfig.h configure configure.in: Added check for UT_SYSLEN for utmp code.
include/byteorder.h: Added alignment macros.
include/nameserv.h: Added defines for msg_type field options - from rfc1002.
lib/time.c: Typo fix.
lib/util_unistr.c: Updates from UNICODE branch.
printing/nt_printing.c: bzero -> memset.
smbd/connection.c: Added check for UT_SYSLEN for utmp code.

Other fixes : Rollback of unapproved commit from Luke.
Please *ask* next time before doing large changes to HEAD.

Jeremy.
(This used to be commit f02999dbf7)
2000-03-22 19:03:12 +00:00
Luke Leighton
2864ac574b indent update to make t easier to see setuid mods in TNG. some
code from these modules i had to leave out (nothing to do withj setuid)
(This used to be commit 96717211ed)
2000-03-21 21:08:07 +00:00
Jeremy Allison
e601c0259e Fixes to add "paranoid" option to popen. Checks some basic things.
Jeremy
(This used to be commit 3b8cbb10de)
2000-03-16 20:55:37 +00:00
Jeremy Allison
01d88573ea include/smb.h:
smbd/negprot.c:
smbd/reply.c: Fixes to recognise Win2k.
param/loadparm.c: Put debug timestamp parameter back to correct default.
smbd/nttrans.c: Fix to detect Win2k unicode bug with transact create.
Jeremy.
(This used to be commit bb100352ab)
2000-03-13 20:05:18 +00:00
Shirish Kalele
7d2a8cd4c6 Cleaning up call_trans2getdfsreferral.
Instead of a #ifdef MS_DFS in call_trans2getdfsreferral()... , now using a generic call leading to some #define problems.. hopefully I've corrected the last of them.
(This used to be commit b5a489fbb8)
2000-03-13 18:18:36 +00:00
Shirish Kalele
3e07f63b7c Cleaned up call_trans2getdfsreferral for when MS_DFS is not defined.
(This used to be commit 2b99318341)
2000-03-13 17:38:13 +00:00
Jean-François Micouleau
530a01c2cb moved #endif to end of function to compile when dfs is disabled.
J.F.
(This used to be commit b534fb03b1)
2000-03-13 11:05:59 +00:00
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
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
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
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
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
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
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
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