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

81350 Commits

Author SHA1 Message Date
Gregor Beck
0fb847b738 s3:net registry import: add option --precheck
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:19 +02:00
Gregor Beck
e78d647ebc s3:registry: add function registry_value_cmp()
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:19 +02:00
Gregor Beck
69add7e4fd s3:net registry import: check return values + codecleanup
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
cc052d0c77 s3:net registry: fix output of dwords with sign bit set
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
55ce9e1fa9 s3:registry: fix possible double free in import
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
619f0c07ff s3:registry: improve debug output in reg_parse
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
e10ea2b3cd s3:registry: add functions to conveniently create registry_values
Pair-Programmed-With: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Gregor Beck
35eccd0f53 s3:registry: silence net_deletekey_recursive
WERR_BADFILE may not be an error for the caller because the result is the same.

Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Michael Adam
fb706c7365 s3:registry: make reg_delete_path() delete the path recursively.
Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a56992ab71032b54d9879834c12f6b88e6174cb4)
2012-06-26 19:57:18 +02:00
Gregor Beck
353f614c96 s3:registry: compile reg_create_path() & reg_delete_path()
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-26 19:57:18 +02:00
Björn Jacke
a6c5376b97 Merge suggested fix from bug 7511 and enhance it
Changes from Lars Müller and Olaf Flebbe:

a) The location in the filesystem defaults to STATEDIR/usershare
b) If undefined the default location is used; if set to zero (the
   default) user defined shares are ignored.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jun 26 19:55:00 CEST 2012 on sn-devel-104
2012-06-26 19:55:00 +02:00
Björn Jacke
8ee76b173b s3:test_registry_upgrade: make more portable and eliminate "local" keyword
prefer to use function syntax with (...)  to make variables local
2012-06-26 18:06:12 +02:00
David Disseldorp
98ec5e95ca s3-torture: Use static printer for smbd spooler test
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Jun 26 18:04:43 CEST 2012 on sn-devel-104
2012-06-26 18:04:43 +02:00
David Disseldorp
e01ef8a9bd s3-printing: use euid for vlp job tracking
vlp can be called by print_run_command as root with euids set
appropriately, vlp should use this to track the job owner.
2012-06-26 16:10:39 +02:00
David Disseldorp
1c2f154323 s3-printing: fill print_generic sysjob id on job submission
Change the generic print backend to fill the printing backend job
identifier (sysjob) on submission of a new job.
This is needed to ensure correct mapping of spoolss jobs and entries in
the backend print queue.

This and the last 13 commits attempt to address bug 8719.
2012-06-26 16:10:39 +02:00
David Disseldorp
c29773d890 s3-printing: pass lpq command to job_submit
Currently the generic print backend does not fill the printing backend
job identifier (sysjob) on submission of a new job. The sysjob
identifier is required to correctly map jobs in the printer queue to
corresponding spoolss print jobs.

Passing the lpq command to job_submit allows the generic print backend
to check the printer queue for the new job following submission. This
behaviour will come in a later commit.
2012-06-26 16:10:39 +02:00
David Disseldorp
91cd9a4797 s3-printing: remove unused print_job_fname() 2012-06-26 16:10:39 +02:00
David Disseldorp
9a296efa9e s3-printing: pass a talloc ctx to unpack_pjob
Rather than allocating the devicemode on a null context.
2012-06-26 16:10:39 +02:00
David Disseldorp
2f85c1fcf2 s3-printing: return talloced print jobs
print_job_find() currently returns print jobs to callers via a
statically allocated variable, this is particularly messy as the
device mode is talloced under the static variable.

This change adds or passes a talloc context to all callers, giving them
ownership of the returned print job.
2012-06-26 16:10:39 +02:00
David Disseldorp
e1ddf8f0e4 s3-printing: clean up print_job_pause/resume interface
Currently both return a bool and sometimes set a werr pointer argument,
always return werror instead.
2012-06-26 16:10:39 +02:00
David Disseldorp
97073589d0 s3-printing: fix potential print db refcount leak 2012-06-26 16:10:39 +02:00
David Disseldorp
1cd2433e8d s3-spoolss: remove duplicate "." in smbd spooler path 2012-06-26 16:10:39 +02:00
David Disseldorp
4e33424581 s3-printing: remove print_parse_jobid()
With all callers fixed, it is now safe to remove.
2012-06-26 16:10:39 +02:00
David Disseldorp
fb2579e3ee s3-printing: remove redundant variable set 2012-06-26 16:10:39 +02:00
David Disseldorp
5eaa47c433 s3-printing: remove print_parse_jobid() calls from printing.c
In all cases the spoolss layer job id can be determinded from the
printing subsystem allocated job identifier (sysjob).
2012-06-26 16:10:39 +02:00
David Disseldorp
dbca645eec s3-printing: rename queue->job sysjob
Print jobs maintain two job identifiers, the jobid allocated by the
spoolss layer (pj->jobid), and the job identifier defined by the
printing backend (pj->sysjob).

Printer job queues currently only contain a single job identifier
variable (queue->job), the variable is sometimes representative of the
spoolss layer job identifier, and more often representative of the
printing backend id.

This change renames the queue job identifier from queue->job to
queue->sysjob, in preparation for a change to only store the printing
backend identifier.
2012-06-26 16:10:39 +02:00
David Disseldorp
a66618f402 s3-printing: remove print_parse_jobid() from print_cups.c
The spoolss print job identifier is now passed to the cups layer via
struct printjob, therefore it is no longer necessary to parse the job
filename to determine it.
2012-06-26 16:10:39 +02:00
David Disseldorp
a2d880ddcd s3-printing: store print jobid as part of struct printjob
Printing code in some places relies upon the spool-file format to
retrieve the print jobid. By storing the jobid as part of struct
printjob, and hence in the printing TDB, we can move away from this ugly
behaviour.
2012-06-26 16:10:39 +02:00
David Disseldorp
33f08906c6 torture: add test for smbd print job spooling
Clients can print by performing file IO on a printer share, rather than
issuing spoolss RPCs.
This commit attempts to reproduce bug 8719.
2012-06-26 16:10:39 +02:00
Andrew Bartlett
290e7de47a s3-pdbtest: Fix pdbtest to compare the same fields
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jun 26 16:09:28 CEST 2012 on sn-devel-104
2012-06-26 16:09:28 +02:00
Andrew Bartlett
43555d6439 s4-samldb: do not talloc_steal() the elements of the original request 2012-06-26 14:10:17 +02:00
Andrew Bartlett
a7f26d5c6d s3-pdbtest: Report and handle errors in pdb->getsampwnam() 2012-06-26 14:10:17 +02:00
Andrew Bartlett
ff4d8fcd8d s3-pdb_samba4: Allocate and free a talloc_stackframe() in pdb_samba4_replace_by_sam() 2012-06-26 14:10:17 +02:00
Volker Lendecke
5df1fda0f5 s3: Restore async i/o with the "native" AIO interface
eff3609 moved the async signal handler initialization to later in the process
to enable aio_fork and aio_pthread on platforms without realtime signals. This
commit broke the use of the native aio interface. aio_pending_size is
initialized to 0, so aio.c will not allow async i/0 at all if modules do not
set that variable correctly. Initialize to 100 right from the start.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jun 26 14:08:22 CEST 2012 on sn-devel-104
2012-06-26 14:08:22 +02:00
Stefan Metzmacher
93399c1ec3 s3:smbXsrv_tcon: pass max_tcons explicitly for smbXsrv_tcon_table_init()
metze
2012-06-26 12:18:03 +02:00
Stefan Metzmacher
9c36781580 s3:smbXsrv_session: pass max_sessions explicitly for smbXsrv_session_table_init()
metze
2012-06-26 12:17:33 +02:00
Rusty Russell
66f59f0409 tdb: finish weaning off err.h.
Commit 3c4263e758 said it removed err.h
from tdb, unfortuntely it didn't: tap-interface.h still included it.

This finishes it properly!

Reported-by:Stefan Metzmacher <metze@samba.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Tue Jun 26 10:22:03 CEST 2012 on sn-devel-104
2012-06-26 10:22:03 +02:00
Björn Jacke
d1aeb2d1c3 s3:test_net_registry_check: eliminate "local" keyword in shell
prefer to use function syntax with (...)  to make variables local

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Tue Jun 26 00:32:11 CEST 2012 on sn-devel-104
2012-06-26 00:32:10 +02:00
Björn Jacke
b2ba94b146 s3:Makefile: use our "$MAKE" instead of "make" in our own Makefile 2012-06-25 22:43:49 +02:00
Stefan Metzmacher
5c31e5d553 s3:selftest: run SMB2-SESSION-RECONNECT
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jun 25 22:42:03 CEST 2012 on sn-devel-104
2012-06-25 22:42:03 +02:00
Stefan Metzmacher
fbad41b1a4 selftest/known: samba3.smb2.session.*reconnect passes now
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
45cd2bc2b3 s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
299b63f875 s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
8acf6c90bd s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
9f2c89cbea s3:smbXsrv.idl: add smbXsrv_session_close*
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
da40aa0e68 s3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
ed75069460 s3:smb2_sesssetup: inline gensec_session_info() call
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
1b8bcaeda3 s3:smb2_sesssetup: make use of gensec_update_send/recv
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
f32e99a0fc s3:smb2_sesssetup: inline most of smbd_smb2_session_setup()
metze
2012-06-25 20:55:07 +02:00
Stefan Metzmacher
ed96b397f7 s3:selftest: run raw.session
Note: raw.session.reauth2 still fails:

	failure: samba3.raw.session.reauth2(s3dc) [
	_StringException: _StringException: ../source4/torture/raw/session.c:186: status
	was NT_STATUS_ACCESS_DENIED, expected NT_STATUS_OK: 2nd open failed

But it's not critical as real clients won't reauth as anonymous.

metze
2012-06-25 20:55:06 +02:00