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

3505 Commits

Author SHA1 Message Date
Andrew Tridgell
2df82862c0 JF and Jeremy - please have a look at what I did to the spoolss
code. It now uses the new printing backend.

------------
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.
-
Andrew Tridgell
a902caf8d7 the bulk of the changes. Also split the loadparm related code into printing/load.c
so swat can get it without linking to the backend 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.
-
Andrew Tridgell
be1e98b3f7 the new file_lines_load() and file_lines_free() routines. Very useful!
------------
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.
-
Andrew Tridgell
4973b7e276 the fsp needs a jobid in it now
------------
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.
-
Andrew Tridgell
0b68660159 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.
-
Andrew Tridgell
f35fe3b4a1 added standard_sub_snum() function for modules that don't have
a connection structure
-
Andrew Tridgell
a82a5acff2 use macros for table boundaries -
Andrew Tridgell
180312c4a6 don't need this monster any more -
Andrew Tridgell
c1496736bb a quick hack to reduce the size of the unicode map table headers from
3MB to 250k.

I split the table into 3 sections, after noticing that 5/6 of the
table was empty.
-
Andrew Tridgell
3992a5169c use open() not fopen() on codepage files.
in general we need to get rid of all uses of fopen(). The hard one
will be the debug code and dbf.
-
Jeremy Allison
c3794fd29f 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.
-
Jeremy Allison
018ec4fdd9 Ensure sign&seal work. Data len must have RPC_HEADER_LEN removed, but
offset should not (rpc header already consumed). This fix does not affect tng.
Jeremy.
-
Andrew Tridgell
f65c6ec6db use interpret_addr2() instead of inet_aton() -
Jeremy Allison
c2aa6d66b3 rpc_parse/parse_rpc.c: Changes from TNG (thanks Luke) for NTLMSSP parsing.
smbd/reply.c: Fixed typo in debug.
Jeremy.
-
Jeremy Allison
0216d81f06 Typo - missing '}'.
Jeremy.
-
Jeremy Allison
3de058bd43 Removed "ole locking compat" parameter (no longer used).
We now get/set/check POSIX locks, but I still need to code up the
close fd braindamage...
Jeremy.
-
Jeremy Allison
9c3b9146a3 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.
-
Jeremy Allison
db96f83e34 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.
-
Luke Leighton
5086e6425f logic for domainsidsize is if size is zero, there's no sid, so don't
advance over it and 4-byte align.

this _used_ to be "regardless of domainsidsize, advance by domainsidsize+3"
which is wrong.
-
Jeremy Allison
d2fff2596a Ensure that CHECK_FNUM rejects fd == -1 correctly.
Jeremy.
-
Jeremy Allison
fbfe94a799 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.
-
Jeremy Allison
f2a775d3fb Andrew made it faster :-).
Jeremy.
-
Jeremy Allison
83734b6761 Bloody typo ! It should be & 3 , & 1 *not* &~3, &~1.
Jeremy.
-
Jeremy Allison
5bdaa043f0 The changes made here broke NT security descriptor returning to NT clients.
We need to talk about the MACHINE.SID/<WORKGROUP_NAME>.SID mess.....
Jeremy.
-
Jeremy Allison
df4302f391 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.
-
Jeremy Allison
491eea8a20 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.
-
Andrew Tridgell
04bee56160 prototypes -
Andrew Tridgell
0da440c8fe add a comment -
Andrew Tridgell
7969f4dccb add an align4() function -
Andrew Tridgell
1682faa1b0 some updates to the process logon code to reflect lukes latest
research plus some cleanups
-
Andrew Tridgell
be7ecd0977 new prototypes -
Andrew Tridgell
5937ab14d2 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.
-
Andrew Tridgell
707401fc1e added a cheap and nasty skip_unibuf() fn to allow easier merging from
TNG

out unicode string handling functions need a lot of work
-
Andrew Tridgell
d35bbe56bc two minor bugfixes for SCO UnixWare. The first is to catch SIGPIPE so that putmsg() inside their send() doesn't kill swat and the scond is to open /dev/null to replace stdin after we close that -
Jean-François Micouleau
a7b09e3e11 added checks to open both \\server\printer and \\server\share.
it doesn't work, the getprinter level 0 reply is wrong...

	J.F.
-
Jeremy Allison
5480ecf24b Fix for soft quotas not being set from
Norbert Pschel <Pueschel.Norbert@Walzbarren-VAW.ne.uunet.de>
Jeremy.
-
Andrew Tridgell
5257ff5d67 initialise fsp->fd to -1 -
Andrew Tridgell
d9130377b2 new prototypes -
Andrew Tridgell
d1827a3648 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
-
Andrew Tridgell
e064422af3 rather than doing print file open processing in open.c we now handle
it in print_open_file()

that removes a lot of special cases in open.c and makes the print
handling code much easier to understand.

there is still lots to do in printing.c, but this at least gets
printing separated from the mainline code
-
Andrew Tridgell
368b0bc1b1 the first of a bunch of changes to code with getting rid of the fd_ptr
element in the fsp

pretty mechanical stuff, but it affects lots of files.
-
Andrew Tridgell
c3b61b3327 got rid of the file_fd_struct structure completely.
With the new br_lock() code we no longer need the fd multiplexing,
which is great because it was really horrible :)

Moved the dev, inode and delete_on_close elements into the fsp.

A nice side effect is that this has greatly simplified open.c
-
Andrew Tridgell
08de67ced4 removed the read prediction code from the head branch. I think the
idea is fundamentally flawed anyway and it has been disabled for a
long time.
-
Andrew Tridgell
0ec1072e01 split out the lpq parsing code into a separate file
printing/lpq_parse.c

getting ready for the new printing backend
-
Andrew Tridgell
64a3fd2bc5 don't echo warning messages twice -
Andrew Tridgell
c0562a02c3 utmp compile fix from peter@cadcamlab.org -
Jeremy Allison
9a118cd4a2 Modified interfaces and added checks around *all* *alloc calls
so that errors are returned on memory allocation failure.
Jeremy.
-
Jean-François Micouleau
3fea49e1d8 filled the architecture table (useless for the moment).
fixed GetJob.

	J.F.
-
Tim Potter
26972823cf fsync() returns an int rather than void. -
Tim Potter
e6d11483e2 Added *.so -