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

971 Commits

Author SHA1 Message Date
Günther Deschner
f9f8007361 s3-build: only use ndr_security.h where needed.
Guenther
2010-05-31 11:32:37 +02:00
Simo Sorce
d9cffc01be s3:auth use info3 in auth_serversupplied_info
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-28 00:55:53 +02:00
Michael Adam
0fe1ff99a1 s3:registry: move reg_objects.h to registry/ and use it only where needed
Every place outside of registry/ where this is used, should probably
be changed to use pure reg_api.c code.
2010-05-25 10:35:31 +02:00
Michael Adam
b5d0fdd96c s3:nt_printing: use regval_ctr_init(). 2010-05-25 10:35:30 +02:00
Michael Adam
9ccf66379a s3:registry: adapt callers of regval_ctr_addvalue to uint8 * instead of char * 2010-05-25 10:35:25 +02:00
Andrew Bartlett
cba7f8b827 s3:dom_sid Global replace of DOM_SID with struct dom_sid
This matches the structure that new code is being written to,
and removes one more of the old-style named structures, and
the need to know that is is just an alias for struct dom_sid.

Andrew Bartlett

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-21 10:39:59 +02:00
Andreas Schneider
0953087f82 s3-spoolss: Added EN ISO 216, A0 and A1 to builtin forms.
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 16:37:16 +02:00
Simo Sorce
d6a73ad85b s3-spoolss: Removed the Phantom DeviceMode.
This was a hack that required a special client from HP.
The client code has never been released and was discontinued,
so this code was just dead weight.

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:52:28 +02:00
Andreas Schneider
7d363b8922 s3-spoolss: Create a spoolss_map_to_os2_driver function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:17:23 +02:00
Andreas Schneider
a3b81a908c s3-spoolss: Use better names for set_last_from_to.
Use set_driver_mapping() and get_win_driver(), get_os2_driver().

Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-18 15:16:55 +02:00
Günther Deschner
d4474ba470 s3-secdesc: use SD_REVISION from security.idl.
Guenther
2010-05-18 12:52:18 +02:00
Günther Deschner
7f6bb48bdf s3-secdesc: remove "typedef struct security_descriptor SEC_DESC".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
8951c8301a s3-secdesc: remove "typedef struct security_acl SEC_ACL".
Guenther
2010-05-18 12:30:12 +02:00
Günther Deschner
a8b01d1f3b s3-secdesc: remove "typedef struct security_ace SEC_ACE".
Guenther
2010-05-18 12:30:11 +02:00
Günther Deschner
8bc9c343c4 s3-secdesc: remove "typedef struct sec_desc_buf SEC_DESC_BUF".
Guenther
2010-05-18 12:30:11 +02:00
Jelmer Vernooij
b8268cf7b0 s3: Remove use of iconv_convenience. 2010-05-18 11:45:31 +02:00
Günther Deschner
fe31b67d5e s3-registry: only include registry headers when really needed.
Guenther
2010-05-18 01:15:38 +02:00
Günther Deschner
3b529d50be s3-rpc_misc: clean out include/rpc_misc.h.
Well known rids don't really belong into an rpc header, just use the ones
defined in security.idl.

Guenther
2010-05-18 00:44:26 +02:00
Günther Deschner
a052aa87be s3-printing: explicitly include "printing/pcap.h" as there is /usr/include/pcap.h.
Thanks metze for pointing this out. Simo, please check.

Guenther
2010-05-14 14:41:50 +02:00
Simo Sorce
348b4b9bab Make pcap headers private
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-14 14:15:08 +02:00
Simo Sorce
f36396f90f Move standard printcap parsing to print_standard.c
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-14 14:14:55 +02:00
Günther Deschner
c6ebab846d s3: only include gen_ndr headers where needed.
This shrinks include/includes.h.gch by the size of 7 MB and reduces build time
as follows:

ccache build w/o patch
real    4m21.529s
ccache build with patch
real    3m6.402s

pch build w/o patch
real    4m26.318s
pch build with patch
real    3m6.932s

Guenther
2010-05-06 00:22:59 +02:00
Andreas Schneider
66f7699511 s3-spoolss: Added a generic spoolss_create_default_secdesc function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-05 18:16:23 +02:00
Andreas Schneider
b2ea8fbcce s3-spoolss: Added a function to create a default spoolss_DeviceMode.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-05 18:08:56 +02:00
Andreas Schneider
6683b0d4b6 s3-lib: Create a sec_desc_merge and sec_desc_merge_buf function.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-05-04 19:37:39 +02:00
Simo Sorce
dffeb12f3d smbd: move printfile_offset() within write_file() 2010-04-30 11:52:39 -07:00
Günther Deschner
1691eb73da s3-spoolss: add support for SetJobInfo level 1 (for jobfile rename).
Guenther
2010-04-28 00:10:40 +02:00
Günther Deschner
2b7002f385 s3-lanman: remove unsupported print_job_set_place().
Guenther
2010-04-28 00:10:40 +02:00
Simo Sorce
168b86c384 s3-smbd: group print relate data in own structure 2010-04-23 14:26:33 -07:00
Simo Sorce
8f56cdfaee s3-spoolss: Move info_ctr conversion to a public helper.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23 16:23:49 +02:00
Andreas Schneider
d65485b3c5 s3-spoolss: Use const values for notify functions.
Signed-off-by: Günther Deschner <gd@samba.org>
2010-04-23 16:06:51 +02:00
Günther Deschner
413ffe9adb s3-spoolss: fix some crash bugs and missing error codes in AddDriver paths.
Found by torture test.

Guenther
2010-04-23 02:34:43 +02:00
Günther Deschner
63b111bd32 s3: add iconv_convenience handle to pull/push sz helpers.
Guenther
2010-04-09 18:33:45 +02:00
Günther Deschner
d9138f4ccf s3-spoolss: Fix an issue in _spoolss_DeleteForm.
Found by torture test.

Guenther
2010-04-07 23:53:19 +02:00
Jeremy Allison
32c8feab5d Fix for bug #7233 - print fails with jobs >4GB from Win7 clients.
Contains for by Sebastian Kloska <oncaphillis@snafu.de>. Submitter
confirms this fixes the problem.

Jeremy.
2010-03-30 15:27:26 -07:00
Günther Deschner
3da91b786e s3-printing: avoid mixing cups backend code with nt_printing code in cups_pull_comment_location.
Guenther
2010-03-26 14:36:46 +01:00
Jeremy Allison
92332fb236 Second part of bug #7288 - SMB job IDs in CUPS job names wrong.
Forgot to delete the overload of the smbjob bool.

Jeremy.
2010-03-25 18:20:33 -07:00
Jeremy Allison
c79ca41baf Fix bug #7288 - SMB job IDs in CUPS job names wrong.
Based on a patch from Michael Karcher <samba@mkarcher.dialup.fu-berlin.de>.

I think this is the correct fix. It causes cups_job_submit to use
print_parse_jobid(), which I've moved into printing/lpq_parse.c (to allow the
link to work).

It turns out the old print_parse_jobid() was *broken*, in that the pjob
filename was set as an absolute path - not relative to the sharename (due to it
not going through the VFS calls).

This meant that the original code doing a strncmp on the first part of the
filename would always fail - it starts with a "/", not the relative pathname of
PRINT_SPOOL_PREFIX ("smbprn.").

This fix could fix some other mysterious printing bugs - probably the ones
Guenther noticed where job control fails on non-cups backends.

Guenther PLEASE CHECK !

Jeremy.
2010-03-25 17:36:47 -07:00
Michael Karcher
845c2281c7 Fix bug #7269 - Job management commands don't work for CUPS queues.
Samba needs to retrieve pjob->sysjob from the CUPS response (as
is done in the iprint backend).
2010-03-24 17:33:21 -07:00
Jeremy Allison
0d6d068bc4 s3-printing: Fix "printer admin" functionality.
Fix bug #7255 ("printer admin" parameter does not work as expected).
2010-03-18 11:24:06 +01:00
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
Volker Lendecke
89c785c47a s3: Fix a long-standing problem with recycled PIDs
When a samba server process dies hard, it has no chance to clean up its entries
in locking.tdb, brlock.tdb, connections.tdb and sessionid.tdb.

For locking.tdb and brlock.tdb Samba is robust by checking every time we read
an entry from the database if the corresponding process still exists. If it
does not exist anymore, the entry is deleted. This is not 100% failsafe though:
On systems with a limited PID space there is a non-zero chance that between the
smbd's death and the fresh access, the PID is recycled by another long-running
process. This renders all files that had been locked by the killed smbd
potentially unusable until the new process also dies.

This patch is supposed to fix the problem the following way: Every process ID
in every database is augmented by a random 64-bit number that is stored in a
serverid.tdb. Whenever we need to check if a process still exists we know its
PID and the 64-bit number. We look up the PID in serverid.tdb and compare the
64-bit number. If it's the same, the process still is a valid smbd holding the
lock. If it is different, a new smbd has taken over.

I believe this is safe against an smbd that has died hard and the PID has been
taken over by a non-samba process. This process would not have registered
itself with a fresh 64-bit number in serverid.tdb, so the old one still exists
in serverid.tdb. We protect against this case by the parent smbd taking care of
deregistering PIDs from serverid.tdb and the fact that serverid.tdb is
CLEAR_IF_FIRST.

CLEAR_IF_FIRST does not work in a cluster, so the automatic cleanup does not
work when all smbds are restarted. For this, "net serverid wipe" has to be run
before smbd starts up. As a convenience, "net serverid wipedbs" also cleans up
sessionid.tdb and connections.tdb.

While there, this also cleans up overloading connections.tdb with all the
process entries just for messaging_send_all().

Volker
2010-03-10 16:07:10 +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
d9f31fea6a s3-print: Remove obsolete signal type cast. 2010-02-23 12:23:42 +01:00
Andrew Tridgell
7cff685c7e s3: convert registry and printing code to TYPESAFE_QSORT() 2010-02-14 18:44:21 +11:00
Jeremy Allison
9252df53d9 Use sec_initial_uid() in the places where being root doesn't matter,
and 0 in the places where it does.

Jeremy
2010-02-12 23:18:53 -08:00
Volker Lendecke
3ea64e0ad8 s3: Replace most calls to sid_append_rid() by sid_compose() 2010-01-10 20:56:16 +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
a367b2b5df s3-spoolss: a default printer should have at least a "PrintDriverData" key.
Guenther
2009-12-07 14:41:44 +01:00
Volker Lendecke
b1a0c68ff2 s3: "print_job_end" only looks at the size 2009-11-29 11:22:03 +01:00