1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-27 14:04:05 +03:00

3174 Commits

Author SHA1 Message Date
Jeremy Allison
59545276f2 Try and fix bug #7233 - print fails with jobs >4GB from Win7 clients.
Remove an arbitrarty 4G B limit that *doesn't need to be there* !
Jeremy.
2010-03-10 17:46:09 -08:00
Günther Deschner
c5ba525748 s3-winreg: add some debug statements to _winreg_QueryValue().
Guenther
2010-03-10 16:12:22 +01:00
Jeremy Allison
c61c9c3a4c Fix for bug #7189 - Open txt files with notepad on samba shares creates problem.
Ensure we don't use any of the create_options for Samba private
use. Add a new parameter to the VFS_CREATE call (private_flags)
which is only used internally. Renumber NTCREATEX_OPTIONS_PRIVATE_DENY_DOS
and NTCREATEX_OPTIONS_PRIVATE_DENY_FCB to match the S4 code).
Rev. the VFS interface to version 28.

Jeremy.
2010-03-05 15:13:37 -08:00
Andreas Schneider
f405503350 s3-rpc_server: Document rpc_pipe_open_internal.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-03-05 21:25:54 +01:00
Günther Deschner
5532654985 s3-spoolss: fix _spoolss_EnumPrinterDataEx after idl
Guenther
2010-03-05 15:18:01 +01:00
Günther Deschner
fbb6d00eed s3-spoolss: fix _spoolss_GetPrinterDataEx after IDL change.
Guenther
2010-03-05 15:18:00 +01:00
Günther Deschner
9a93483279 s3-spoolss: fix _spoolss_SetPrinterData{Ex} after IDL change.
Guenther
2010-03-05 15:17:59 +01:00
Jeremy Allison
cb06eee86a srv_pipe.c doesn't reference current_user anymore. Remove it.
Jeremy.
2010-03-04 14:59:29 -08:00
Günther Deschner
3ca8d28bb7 spoolss: fix build and version in spoolss_PrinterInfo0 (aka PRINTER_INFO_STRESS).
Guenther
2010-02-26 17:39:21 +01:00
Günther Deschner
10c8b0fb73 s3-spoolss: Save entire devicemode.
found by RPC-SPOOLSS-PRINTER torture test.

Guenther
2010-02-25 14:35:41 +01:00
Simo Sorce
1d0938c629 schannel_tdb: make code compilable in both trees 2010-02-23 12:46:50 -05:00
Simo Sorce
3b12c38ac0 s3:schannel streamline interface
Make calling schannel much easier by removing the need to explicitly open the
database. Let the abstraction do it instead.
2010-02-23 12:46:50 -05:00
Simo Sorce
b4c9dc3724 s3:schannel more readable check logic
Make the initial schannel check logic more understandable.
Make it easy to define different policies depending on ther caller's security
requirements (Integrity/Privacy/Both/None)
2010-02-23 12:46:50 -05:00
Stefan Metzmacher
a2cd203982 s3:spoolss: construct the devmode the same way for level 2 and 8
metze
2010-02-23 16:41:26 +01:00
Simo Sorce
0c8608bbab s3 Fix the build
I didn't mean to puch the GetForestTrustInformation patch just yet,
now that it is in fix the s3 build ...
2010-02-22 21:18:07 -05:00
Jeremy Allison
91a4db6358 More fixes for bug #7146 - Samba miss-parses authenticated RPC packets.
Alignment space calculations are tricky :-).

Jeremy.
2010-02-18 16:12:04 -08:00
Günther Deschner
13533e12fd s3-spoolss: add support for _spoolss_SetPrinter level 8.
Guenther
2010-02-19 00:42:25 +01:00
Jeremy Allison
11a87cd31e More fixes for bug #7146 - Samba miss-parses authenticated RPC packets.
Ensure we calculate the space correctly (including the ss_padding_len)
when constructing reply packets.

Jeremy.
2010-02-18 15:03:30 -08:00
Günther Deschner
b3c2b2260a s3-spoolss: Fix _spoolss_EnumPrinters servername handling.
Guenther
2010-02-18 12:40:36 +01:00
Günther Deschner
43e3d8f51d s3-spoolss: fix return code of spoolss_DeletePrinter.
When the printer has been removed by the "deleteprinter command", we need to
check if it is still there and then fail, not fail if we successfully removed
it (found by RPC-SPOOLSS-PRINTER).

Guenther
2010-02-18 02:19:59 +01:00
Günther Deschner
8ce66fba03 s3-spoolss: in spoolss_EnumPrinters r->in.server is a *unique* pointer!
Guenther
2010-02-18 02:19:50 +01:00
Günther Deschner
2d2db2a822 s3-spoolss: more AddPrinter{Ex} checks.
Windows will allow to add a non-shared printer that is returned by EnumPrinters.
Samba has no notion of non-shared local printers yet, so just make sure to
behave like we do elsewhere: a printer autoloaded by samba or added to samba is
shared.

Guenther
2010-02-18 02:19:42 +01:00
Günther Deschner
5cff7e1692 s3-spoolss: add some printer info validation for AddPrinter calls.
Guenther
2010-02-18 02:19:33 +01:00
Jeremy Allison
7b4387f765 Fix bug #7146 - Samba miss-parses authenticated RPC packets.
Parts of the Samba RPC client and server code misinterpret authenticated
packets.

DCE authenticated packets actually look like this :

+--------------------------+
|header                    |
| ... frag_len (packet len)|
| ... auth_len             |
+--------------------------+
|                          |
| Data payload             |
...                     ....
|                          |
+--------------------------+
|                          |
| auth_pad_len bytes       |
+--------------------------+
|                          |
| Auth footer              |
| auth_pad_len value       |
+--------------------------+
|                          |
| Auth payload             |
| (auth_len bytes long)    |
+--------------------------+

That's right. The pad bytes come *before* the footer specifying how many pad
bytes there are. In order to read this you must seek to the end of the packet
and subtract the auth_len (in the packet header) and the auth footer length (a
known value).

The client and server code gets this right (mostly) in 3.0.x -> 3.4.x so long
as the pad alignment is on an 8 byte boundary (there are some special cases in
the code for this).

Tridge discovered there are some (DRS replication) cases where on 64-bit
machines where the pad alignment is on a 16-byte boundary. This breaks the
existing S3 hand-optimized rpc code.

This patch removes all the special cases in client and server code, and allows
the pad alignment for generated packets to be specified by changing a constant
in include/local.h (this doesn't affect received packets, the new code always
handles them correctly whatever pad alignment is used).

This patch also works correctly with rpcclient using sign+seal from
the 3.4.x and 3.3.x builds (testing with 3.0.x and 3.2.x to follow)
so even as a server it should still work with older libsmbclient and
winbindd code.

Jeremy
2010-02-17 15:27:59 -08:00
Simo Sorce
d14c3756e8 s3:rpc streamline memory handling 2010-02-16 19:15:56 -05:00
Günther Deschner
ddbda92f87 spoolss: disable GetPrinterDriver level 101 (as called by XP).
We still dont get the marshalling right, disable and XP will just fall back to
level 6.

Guenther
2010-02-15 11:17:29 +01:00
Andrew Tridgell
bc5d203eeb s3-rpc: convert wkssvc to use TYPESAFE_QSORT() 2010-02-14 18:44:21 +11:00
Günther Deschner
a16e974593 spoolss: allow to set server architecture via parametric option.
This allows to set "spoolss:architecture = 'Windows x64'" for debugging purpose.

Guenther
2010-02-11 13:29:59 +01:00
Günther Deschner
25001bbd1b s3-spoolss: implement spoolss_EnumJobs level 3.
Level 3 has been added with NT 4.0 and Windows 7 (at least 64bit version) makes
use of it in order to display queued jobs. Windows 7 will *not* fall back to
level 2 if we just return WERR_UNKNOWN_LEVEL, instead there will be no printjobs
displayed at all.

Guenther
2010-02-11 13:27:46 +01:00
Jeremy Allison
a056eb85ff Missed one check on the memcpy for bug #7063.
Jeremy.
2010-02-09 14:56:12 -08:00
Jeremy Allison
539bbf8653 Second part of fix for bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Ensure we have no naked memcpy calls. This isn't a crash bug (it's
already checked in the data_blob_talloc_zero() above, but I want to
get into the pattern of having all memcpy's covered by safety checks.

Jeremy.
2010-02-09 14:48:15 -08:00
Jeremy Allison
110a6f29f0 Fix bug 7063 - Samba 3.4.5 on ubuntu 8.04 64 bit - Core dumps.
Reported and found by Martin Hochreiter <linuxbox@wavenet.at>.
Ensure we copy the right amount of registry data into the outgoing
buffer.

Jeremy.
2010-02-02 16:32:51 -08:00
Volker Lendecke
0beac794b6 s3: Fix some DEBUG messages 2010-01-31 15:40:59 +01:00
Günther Deschner
f720f7512e s3-spoolss: stricter name checks when opening back-channel notify connection.
Make sure to always check if the name the client passed in
spoolss_RemoteFindFirstPrinterChangeNotifyEx is not one of our names.

Guenther
2010-01-19 14:14:30 +01:00
Volker Lendecke
86a73e6eba s3: Use sid_check_is_domain instead of a direct sid_equal 2010-01-10 20:56:16 +01:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +01:00
Volker Lendecke
081573091b s3: Remove the typedef for "auth_serversupplied_info" 2010-01-10 20:56:16 +01:00
Volker Lendecke
9bb4766bba s3: Remove the typedef for "auth_usersupplied_info" 2010-01-10 20:56:16 +01:00
Volker Lendecke
8289b46173 s3: Lock down some srvsvc calls according to what w2k3 seems to do 2010-01-07 12:05:33 +01:00
Jeremy Allison
d5995eec7e Second part of the fix for bug #7020 - smbd using 2G memory.
There was a second leak in the processing of the out_data.frag
prs_struct. It needs freeing once the current pdu has been returned
asynchronously.

Jeremy.
2010-01-06 13:11:00 -08:00
Andrew Bartlett
802e9328ed s3:ntlmssp: only include ntlmssp.h where actually needed
Andrew Bartlett
2009-12-22 21:07:53 +01:00
Volker Lendecke
20bcdf85f1 s3: Fix _samr_GetAliasMembership for results with 0 rids 2009-12-15 20:28:47 +01:00
Günther Deschner
f20effc437 s3-spoolss: fix enumprinter key client and server.
Guenther
2009-12-10 17:48:50 +01:00
Günther Deschner
e14fb8f913 s3-spoolss: use SPOOLSS_ARCHITECTURE_ALL in driver enum server code.
Guenther
2009-12-08 16:20:51 +01:00
Günther Deschner
7770d1492b s3-spoolss: cleanup _spoolss_EnumPrinterDrivers().
Guenther
2009-12-08 11:51:02 +01:00
Günther Deschner
0efbd932b6 s3-spoolss: remove unused architecture from fill_printer_driver_info1().
Guenther
2009-12-08 11:50:54 +01:00
Günther Deschner
af08962c94 s3-spoolss: remove ridiculous amount of duplicate driver code.
Guenther
2009-12-08 11:50:47 +01:00
Günther Deschner
1c9eba40ae s3-spoolss: fully support level 8 drivers.
Guenther
2009-12-08 11:50:40 +01:00
Günther Deschner
35c50dcce3 s3-spoolss: use driver level info8 everywhere in spoolss server internally.
Guenther
2009-12-08 11:05:21 +01:00
Günther Deschner
ef9d6580ef s3-spoolss: let _spoolss_DeletePrinterData call into _spoolss_DeletePrinterDataEx.
Guenther
2009-12-07 14:42:13 +01:00