gd/samba-autobuild/.git
11 years agoselftest: run pdbtest against s3dc as well
Andrew Bartlett [Thu, 28 Jun 2012 11:21:23 +0000 (21:21 +1000)]
selftest: run pdbtest against s3dc as well

This validates the password expiry, account disable in the s3 auth code
and the save/restore of values in tdbsam.

It also provides the first test of some net sam set subcommands.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jun 28 20:39:38 CEST 2012 on sn-devel-104

11 years agoselftest: use a loop rather than declare tests for both dc and s3dc
Andrew Bartlett [Thu, 28 Jun 2012 10:42:31 +0000 (20:42 +1000)]
selftest: use a loop rather than declare tests for both dc and s3dc

11 years agolibrpc/ndr: Initilaise the remainder of struct dom_sid after a pull
Andrew Bartlett [Tue, 26 Jun 2012 10:07:32 +0000 (20:07 +1000)]
librpc/ndr: Initilaise the remainder of struct dom_sid after a pull

This copes with the fact that r->sub_auths is a fixed-size array, not
an allocated pointer, and so will still have some bytes no filled in
if the sid did not have a MAX_SUB_AUTHS sub-authorities.

Andrew Bartlett

11 years agos4-torture: fix typo in samlogon test.
Günther Deschner [Thu, 28 Jun 2012 12:57:17 +0000 (14:57 +0200)]
s4-torture: fix typo in samlogon test.

Guenther

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Jun 28 18:43:46 CEST 2012 on sn-devel-104

11 years agos4-torture: use torture context for printing debug output.
Günther Deschner [Thu, 28 Jun 2012 11:59:50 +0000 (13:59 +0200)]
s4-torture: use torture context for printing debug output.

Guenther

11 years agos3: Fix compilation of pthreadpool_sync.c on platforms without pthread.h
Volker Lendecke [Thu, 28 Jun 2012 09:19:31 +0000 (11:19 +0200)]
s3: Fix compilation of pthreadpool_sync.c on platforms without pthread.h

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jun 28 16:43:13 CEST 2012 on sn-devel-104

11 years agos3:smbd: change nt_open_pipe() to uint16_t pnum/fnum
Stefan Metzmacher [Thu, 28 Jun 2012 10:22:07 +0000 (12:22 +0200)]
s3:smbd: change nt_open_pipe() to uint16_t pnum/fnum

This is SMB1 code...

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 28 14:47:45 CEST 2012 on sn-devel-104

11 years agos3:smb2_create: add usefull DEBUG() message
Stefan Metzmacher [Thu, 28 Jun 2012 08:02:01 +0000 (10:02 +0200)]
s3:smb2_create: add usefull DEBUG() message

All calls which take an file handle have the same,
so we should also log it, when we create a handle.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 28 12:41:49 CEST 2012 on sn-devel-104

11 years agos3:smbd/files: fsp->fnum is uint64_t not int!
Stefan Metzmacher [Thu, 28 Jun 2012 08:00:37 +0000 (10:00 +0200)]
s3:smbd/files: fsp->fnum is uint64_t not int!

metze

11 years agos3:brlock: s/int/uint64_t for fnum
Stefan Metzmacher [Thu, 28 Jun 2012 07:54:41 +0000 (09:54 +0200)]
s3:brlock: s/int/uint64_t for fnum

fsp->fnum and lock->fnum are uint64_t already and we should not truncate the value here.

Currently this doesn't matter as we only use 16-bit.

But as 'int' is int32_t and we later compare fnum with lock->fnum == fnum,
the cast from int32_t to uint64_t goes via int64_t instead of uint32_t.

This means even if fsp->fnum just uses 32-bit of the uint64_t
we'll get the wrong result, as the implicit cast from a negative int32_t
value to uint64_t adds 0xFFFFFFFF00000000.

metze

11 years agos3:brlock: add some const to print_lock_struct()
Stefan Metzmacher [Thu, 28 Jun 2012 07:54:14 +0000 (09:54 +0200)]
s3:brlock: add some const to print_lock_struct()

metze

11 years agos3:wscript: use LOCKING subsystem for smbtorture3
Stefan Metzmacher [Wed, 27 Jun 2012 22:51:45 +0000 (00:51 +0200)]
s3:wscript: use LOCKING subsystem for smbtorture3

metze

11 years agosource4/smbd/pidfile: don't panic if pid file is corrupt.
Rusty Russell [Thu, 28 Jun 2012 01:34:25 +0000 (11:04 +0930)]
source4/smbd/pidfile: don't panic if pid file is corrupt.

In particular, on a virtual machine after a forced reboot, it
contained "Ille" instead of a valid PID.  Given it was the right
length, I'm assuming it was filesystem corruption.

process_exists_by_pid() then panics, when given a pid < 1.

Reported-by: lostogre on #samba-technical
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date(master): Thu Jun 28 05:19:24 CEST 2012 on sn-devel-104

11 years agoreplace: define INT64_MAX when not defined
Björn Jacke [Wed, 27 Jun 2012 17:23:15 +0000 (19:23 +0200)]
replace: define INT64_MAX when not defined

Tru64 doesn't have any stdint.h

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu Jun 28 00:45:58 CEST 2012 on sn-devel-104

11 years agos3-param: Rename loadparm_s3_context -> loadparm_s3_helpers
Andrew Bartlett [Wed, 27 Jun 2012 13:24:39 +0000 (23:24 +1000)]
s3-param: Rename loadparm_s3_context -> loadparm_s3_helpers

This helps clarify the role of this structure and wrapper function.

The purpose here is to provide helper functions to the lib/param
loadparm_context that point back at the s3 lp_ functions.  This allows
a struct loadparm_context to be passed to any point in the code, and
always refer to the correct loadparm system.  If this has not been
set, the variables loaded in the lib/param code will be returned.

As requested by Michael Adam.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 17:11:16 CEST 2012 on sn-devel-104

11 years agos3-pdb_samba4: Remove dupliate profilePath handling
Andrew Bartlett [Wed, 27 Jun 2012 09:23:05 +0000 (19:23 +1000)]
s3-pdb_samba4: Remove dupliate profilePath handling

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Jun 27 13:16:26 CEST 2012 on sn-devel-104

11 years agos4-selftest: expand passdb testing
Andrew Bartlett [Tue, 26 Jun 2012 10:59:25 +0000 (20:59 +1000)]
s4-selftest: expand passdb testing

This tests pdb_samba4 in the first instance

11 years agos3-pdbtest: Initialise more elements for testing
Andrew Bartlett [Wed, 27 Jun 2012 04:36:31 +0000 (14:36 +1000)]
s3-pdbtest: Initialise more elements for testing

If these were left as defaults, they cause issues when the backend (pdb_samba4)
returns the internal defaults from the directory, not the defaults from samu_new()

Andrew Bartlett

11 years agos3-pdb_samba4: Add support for lastLogon and lastLogoff
Andrew Bartlett [Wed, 27 Jun 2012 04:34:47 +0000 (14:34 +1000)]
s3-pdb_samba4: Add support for lastLogon and lastLogoff

11 years agos3-pdb_samba4: Fix time handling, use nt_time_to_unix()
Andrew Bartlett [Wed, 27 Jun 2012 04:56:04 +0000 (14:56 +1000)]
s3-pdb_samba4: Fix time handling, use nt_time_to_unix()

This matches 478d74fe1447c4588b14ef7040c8c13339d54026 which I failed to
merge from pdb_ads.

Andrew Bartlett

11 years agolib/ldb: Print trace messages for modify correctly
Andrew Bartlett [Wed, 27 Jun 2012 04:33:42 +0000 (14:33 +1000)]
lib/ldb: Print trace messages for modify correctly

11 years agos4-selftest: Test login with a password expired user
Andrew Bartlett [Wed, 27 Jun 2012 02:47:59 +0000 (12:47 +1000)]
s4-selftest: Test login with a password expired user

This uses rkpty to test changing an expired password.

Andrew Bartlett

11 years agos4-dsdb when setting DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID make it non-critical
Andrew Bartlett [Wed, 27 Jun 2012 02:45:37 +0000 (12:45 +1000)]
s4-dsdb when setting DSDB_CONTROL_PASSWORD_BYPASS_LAST_SET_OID make it non-critical

11 years agos4-dsdb: Remove hooks for non-directory password handling
Andrew Bartlett [Wed, 27 Jun 2012 02:42:31 +0000 (12:42 +1000)]
s4-dsdb: Remove hooks for non-directory password handling

This was an interesting hack, and the local_password module still exists, but
until it has a use case and a test case, remove the bypass of password_hash.

Andrew Bartlett

11 years agoselftest: allow NSS_WRAPPER_* vars to be exported to the environment
Andrew Bartlett [Wed, 27 Jun 2012 02:40:59 +0000 (12:40 +1000)]
selftest: allow NSS_WRAPPER_* vars to be exported to the environment

11 years agoselftest: Add extra users to nss_wrapper
Andrew Bartlett [Wed, 27 Jun 2012 07:51:55 +0000 (17:51 +1000)]
selftest: Add extra users to nss_wrapper

These will be used for a test using pdbtest and to run the client
test environment under nss_wrapper.

Andrew Bartlett

11 years agos3-pdbtest: show mis-matching times
Andrew Bartlett [Tue, 26 Jun 2012 23:04:46 +0000 (09:04 +1000)]
s3-pdbtest: show mis-matching times

11 years agos3:registry: change reg_import.c according to coding guidelines.
Michael Adam [Wed, 27 Jun 2012 06:20:59 +0000 (08:20 +0200)]
s3:registry: change reg_import.c according to coding guidelines.

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Jun 27 10:07:54 CEST 2012 on sn-devel-104

11 years agos3:registry: use TALLOC_CTX * instead of const void * in reg_import_adapter()
Michael Adam [Wed, 27 Jun 2012 06:20:31 +0000 (08:20 +0200)]
s3:registry: use TALLOC_CTX * instead of const void * in reg_import_adapter()

11 years agos3: add a tool "cclean" to cleanup orphaned entries from connections.tdb
Gregor Beck [Thu, 7 Jun 2012 11:34:35 +0000 (13:34 +0200)]
s3: add a tool "cclean" to cleanup orphaned entries from connections.tdb

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:conn_tdb: add a function connections_fetch_entry_ext() that also takes the cnum
Gregor Beck [Thu, 7 Jun 2012 11:25:17 +0000 (13:25 +0200)]
s3:conn_tdb: add a function connections_fetch_entry_ext() that also takes the cnum

and have connections_fetch_entry() call connections_fetch_entry_ext().

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:lib:dbwrap: fix return value of db_ctdb_traverse[_read] for non-persistent dbs
Gregor Beck [Tue, 12 Jun 2012 08:10:36 +0000 (10:10 +0200)]
s3:lib:dbwrap: fix return value of db_ctdb_traverse[_read] for non-persistent dbs

to return the number of traversed records upon successful traverse.

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3-printing: fix broken print_job_get_name() return
David Disseldorp [Tue, 26 Jun 2012 23:23:57 +0000 (01:23 +0200)]
s3-printing: fix broken print_job_get_name() return

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Wed Jun 27 04:04:56 CEST 2012 on sn-devel-104

11 years agos3:test_net_registry_check.sh: grep -E isn't portable, use egrep
Björn Jacke [Tue, 26 Jun 2012 22:25:53 +0000 (00:25 +0200)]
s3:test_net_registry_check.sh: grep -E isn't portable, use egrep

grep -E doesn't work on Solaris /usr/bin/grep e.g.

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Jun 27 02:18:07 CEST 2012 on sn-devel-104

11 years agotests: make test_ldb portable, eliminate "local" keyword
Björn Jacke [Tue, 26 Jun 2012 10:23:41 +0000 (12:23 +0200)]
tests: make test_ldb portable, eliminate "local" keyword

this is BASH only, don't use it.

11 years agos3:net registry import: implement dry-run with "--test"
Michael Adam [Tue, 26 Jun 2012 13:35:32 +0000 (15:35 +0200)]
s3:net registry import: implement dry-run with "--test"

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Jun 26 21:43:49 CEST 2012 on sn-devel-104

11 years agos3:net registry import: add an assert
Michael Adam [Tue, 26 Jun 2012 13:13:28 +0000 (15:13 +0200)]
s3:net registry import: add an assert

Pair-Programmed-With: Gergor Beck <gbeck@sernet.de>

11 years agos3:net registry import: reduce indentation
Michael Adam [Tue, 26 Jun 2012 13:12:28 +0000 (15:12 +0200)]
s3:net registry import: reduce indentation

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

11 years agos3:net registry import: fix the return code when transaction commit fails
Michael Adam [Tue, 26 Jun 2012 13:11:22 +0000 (15:11 +0200)]
s3:net registry import: fix the return code when transaction commit fails

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

11 years agos3:net registry import: improve regdb_open/close layering
Michael Adam [Tue, 26 Jun 2012 13:02:41 +0000 (15:02 +0200)]
s3:net registry import: improve regdb_open/close layering

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

11 years agos3:net registry import: untangle nested function calls
Michael Adam [Tue, 26 Jun 2012 11:37:46 +0000 (13:37 +0200)]
s3:net registry import: untangle nested function calls

11 years agos3:net registry import: reduce indentation and untangle assignment from check
Michael Adam [Tue, 26 Jun 2012 11:32:40 +0000 (13:32 +0200)]
s3:net registry import: reduce indentation and untangle assignment from check

in import_with_precheck_action().

11 years agos3:net registry import: move precheck-and-import code to its own function
Michael Adam [Tue, 26 Jun 2012 11:29:50 +0000 (13:29 +0200)]
s3:net registry import: move precheck-and-import code to its own function

This is the code that is executed in a registry transaction.
The purpose of the refactoring is to be able to simplify and
untangle the code structure in the sequel.

11 years agos3:net registry: fix violation of coding conventions
Gregor Beck [Wed, 13 Jun 2012 12:32:55 +0000 (14:32 +0200)]
s3:net registry: fix violation of coding conventions

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:net registry import: add option --precheck
Gregor Beck [Fri, 4 May 2012 11:51:01 +0000 (13:51 +0200)]
s3:net registry import: add option --precheck

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:registry: add function registry_value_cmp()
Gregor Beck [Mon, 7 May 2012 13:43:27 +0000 (15:43 +0200)]
s3:registry: add function registry_value_cmp()

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:net registry import: check return values + codecleanup
Gregor Beck [Fri, 4 May 2012 07:35:37 +0000 (09:35 +0200)]
s3:net registry import: check return values + codecleanup

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:net registry: fix output of dwords with sign bit set
Gregor Beck [Mon, 7 May 2012 13:48:16 +0000 (15:48 +0200)]
s3:net registry: fix output of dwords with sign bit set

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:registry: fix possible double free in import
Gregor Beck [Mon, 7 May 2012 13:44:21 +0000 (15:44 +0200)]
s3:registry: fix possible double free in import

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:registry: improve debug output in reg_parse
Gregor Beck [Mon, 7 May 2012 13:46:41 +0000 (15:46 +0200)]
s3:registry: improve debug output in reg_parse

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3:registry: add functions to conveniently create registry_values
Gregor Beck [Mon, 30 Apr 2012 08:27:56 +0000 (10:27 +0200)]
s3:registry: add functions to conveniently create registry_values

Pair-Programmed-With: Michael Adam <obnox@samba.org>

11 years agos3:registry: silence net_deletekey_recursive
Gregor Beck [Wed, 2 May 2012 09:22:54 +0000 (11:22 +0200)]
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>
11 years agos3:registry: make reg_delete_path() delete the path recursively.
Michael Adam [Fri, 4 May 2012 15:57:51 +0000 (17:57 +0200)]
s3:registry: make reg_delete_path() delete the path recursively.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>
(cherry picked from commit a56992ab71032b54d9879834c12f6b88e6174cb4)

11 years agos3:registry: compile reg_create_path() & reg_delete_path()
Gregor Beck [Mon, 30 Apr 2012 08:26:32 +0000 (10:26 +0200)]
s3:registry: compile reg_create_path() & reg_delete_path()

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agoMerge suggested fix from bug 7511 and enhance it
Björn Jacke [Tue, 26 Jun 2012 09:33:36 +0000 (11:33 +0200)]
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

11 years agos3:test_registry_upgrade: make more portable and eliminate "local" keyword
Björn Jacke [Mon, 25 Jun 2012 19:21:31 +0000 (21:21 +0200)]
s3:test_registry_upgrade: make more portable and eliminate "local" keyword

prefer to use function syntax with (...)  to make variables local

11 years agos3-torture: Use static printer for smbd spooler test
David Disseldorp [Fri, 22 Jun 2012 16:49:50 +0000 (18:49 +0200)]
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

11 years agos3-printing: use euid for vlp job tracking
David Disseldorp [Thu, 21 Jun 2012 13:49:55 +0000 (15:49 +0200)]
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.

11 years agos3-printing: fill print_generic sysjob id on job submission
David Disseldorp [Thu, 9 Feb 2012 11:08:27 +0000 (12:08 +0100)]
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.

11 years agos3-printing: pass lpq command to job_submit
David Disseldorp [Wed, 8 Feb 2012 17:47:11 +0000 (18:47 +0100)]
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.

11 years agos3-printing: remove unused print_job_fname()
David Disseldorp [Wed, 8 Feb 2012 16:03:06 +0000 (17:03 +0100)]
s3-printing: remove unused print_job_fname()

11 years agos3-printing: pass a talloc ctx to unpack_pjob
David Disseldorp [Wed, 8 Feb 2012 16:57:02 +0000 (17:57 +0100)]
s3-printing: pass a talloc ctx to unpack_pjob

Rather than allocating the devicemode on a null context.

11 years agos3-printing: return talloced print jobs
David Disseldorp [Wed, 8 Feb 2012 15:55:40 +0000 (16:55 +0100)]
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.

11 years agos3-printing: clean up print_job_pause/resume interface
David Disseldorp [Wed, 8 Feb 2012 14:01:15 +0000 (15:01 +0100)]
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.

11 years agos3-printing: fix potential print db refcount leak
David Disseldorp [Wed, 8 Feb 2012 12:45:40 +0000 (13:45 +0100)]
s3-printing: fix potential print db refcount leak

11 years agos3-spoolss: remove duplicate "." in smbd spooler path
David Disseldorp [Wed, 1 Feb 2012 12:21:04 +0000 (13:21 +0100)]
s3-spoolss: remove duplicate "." in smbd spooler path

11 years agos3-printing: remove print_parse_jobid()
David Disseldorp [Mon, 30 Jan 2012 16:35:28 +0000 (17:35 +0100)]
s3-printing: remove print_parse_jobid()

With all callers fixed, it is now safe to remove.

11 years agos3-printing: remove redundant variable set
David Disseldorp [Mon, 30 Jan 2012 15:05:21 +0000 (16:05 +0100)]
s3-printing: remove redundant variable set

11 years agos3-printing: remove print_parse_jobid() calls from printing.c
David Disseldorp [Mon, 30 Jan 2012 12:35:21 +0000 (13:35 +0100)]
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).

11 years agos3-printing: rename queue->job sysjob
David Disseldorp [Fri, 27 Jan 2012 11:33:27 +0000 (12:33 +0100)]
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.

11 years agos3-printing: remove print_parse_jobid() from print_cups.c
David Disseldorp [Mon, 30 Jan 2012 12:44:33 +0000 (13:44 +0100)]
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.

11 years agos3-printing: store print jobid as part of struct printjob
David Disseldorp [Thu, 26 Jan 2012 14:28:34 +0000 (15:28 +0100)]
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.

11 years agotorture: add test for smbd print job spooling
David Disseldorp [Thu, 21 Jun 2012 15:12:23 +0000 (17:12 +0200)]
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.

11 years agos3-pdbtest: Fix pdbtest to compare the same fields
Andrew Bartlett [Tue, 26 Jun 2012 11:06:25 +0000 (21:06 +1000)]
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

11 years agos4-samldb: do not talloc_steal() the elements of the original request
Andrew Bartlett [Tue, 26 Jun 2012 10:53:08 +0000 (20:53 +1000)]
s4-samldb: do not talloc_steal() the elements of the original request

11 years agos3-pdbtest: Report and handle errors in pdb->getsampwnam()
Andrew Bartlett [Tue, 26 Jun 2012 10:52:07 +0000 (20:52 +1000)]
s3-pdbtest: Report and handle errors in pdb->getsampwnam()

11 years agos3-pdb_samba4: Allocate and free a talloc_stackframe() in pdb_samba4_replace_by_sam()
Andrew Bartlett [Tue, 26 Jun 2012 10:51:17 +0000 (20:51 +1000)]
s3-pdb_samba4: Allocate and free a talloc_stackframe() in pdb_samba4_replace_by_sam()

11 years agos3: Restore async i/o with the "native" AIO interface
Volker Lendecke [Mon, 25 Jun 2012 10:23:22 +0000 (12:23 +0200)]
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

11 years agos3:smbXsrv_tcon: pass max_tcons explicitly for smbXsrv_tcon_table_init()
Stefan Metzmacher [Mon, 25 Jun 2012 06:13:59 +0000 (08:13 +0200)]
s3:smbXsrv_tcon: pass max_tcons explicitly for smbXsrv_tcon_table_init()

metze

11 years agos3:smbXsrv_session: pass max_sessions explicitly for smbXsrv_session_table_init()
Stefan Metzmacher [Mon, 25 Jun 2012 06:13:59 +0000 (08:13 +0200)]
s3:smbXsrv_session: pass max_sessions explicitly for smbXsrv_session_table_init()

metze

11 years agotdb: finish weaning off err.h.
Rusty Russell [Tue, 26 Jun 2012 05:48:52 +0000 (15:18 +0930)]
tdb: finish weaning off err.h.

Commit 3c4263e7580143c69225729f5b67f09c00add2fd 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

11 years agos3:test_net_registry_check: eliminate "local" keyword in shell
Björn Jacke [Mon, 25 Jun 2012 18:28:22 +0000 (20:28 +0200)]
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

11 years agos3:Makefile: use our "$MAKE" instead of "make" in our own Makefile
Björn Jacke [Mon, 25 Jun 2012 17:44:24 +0000 (19:44 +0200)]
s3:Makefile: use our "$MAKE" instead of "make" in our own Makefile

11 years agos3:selftest: run SMB2-SESSION-RECONNECT
Stefan Metzmacher [Fri, 22 Jun 2012 12:08:30 +0000 (14:08 +0200)]
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

11 years agoselftest/known: samba3.smb2.session.*reconnect passes now
Stefan Metzmacher [Fri, 22 Jun 2012 12:26:42 +0000 (14:26 +0200)]
selftest/known: samba3.smb2.session.*reconnect passes now

metze

11 years agos3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv
Stefan Metzmacher [Wed, 16 May 2012 22:32:40 +0000 (00:32 +0200)]
s3:smb2_sesssetup: make use of smb2srv_session_close_previous_send/recv

metze

11 years agos3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE
Stefan Metzmacher [Mon, 14 May 2012 14:17:49 +0000 (16:17 +0200)]
s3:smbXsrv_session: react on MSG_SMBXSRV_SESSION_CLOSE

metze

11 years agos3:smbXsrv_session: add smb2srv_session_close_previous_send/recv
Stefan Metzmacher [Tue, 17 Apr 2012 18:39:58 +0000 (20:39 +0200)]
s3:smbXsrv_session: add smb2srv_session_close_previous_send/recv

metze

11 years agos3:smbXsrv.idl: add smbXsrv_session_close*
Stefan Metzmacher [Mon, 11 Jun 2012 17:29:25 +0000 (19:29 +0200)]
s3:smbXsrv.idl: add smbXsrv_session_close*

metze

11 years agos3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE
Stefan Metzmacher [Wed, 18 Apr 2012 10:44:12 +0000 (12:44 +0200)]
s3:messaging.idl: define MSG_SMBXSRV_SESSION_CLOSE

metze

11 years agos3:smb2_sesssetup: inline gensec_session_info() call
Stefan Metzmacher [Wed, 16 May 2012 22:30:43 +0000 (00:30 +0200)]
s3:smb2_sesssetup: inline gensec_session_info() call

metze

11 years agos3:smb2_sesssetup: make use of gensec_update_send/recv
Stefan Metzmacher [Wed, 16 May 2012 14:05:48 +0000 (16:05 +0200)]
s3:smb2_sesssetup: make use of gensec_update_send/recv

metze

11 years agos3:smb2_sesssetup: inline most of smbd_smb2_session_setup()
Stefan Metzmacher [Wed, 16 May 2012 13:56:15 +0000 (15:56 +0200)]
s3:smb2_sesssetup: inline most of smbd_smb2_session_setup()

metze

11 years agos3:selftest: run raw.session
Stefan Metzmacher [Fri, 22 Jun 2012 10:11:43 +0000 (12:11 +0200)]
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

11 years agos3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2
Stefan Metzmacher [Fri, 22 Jun 2012 11:06:41 +0000 (13:06 +0200)]
s3:selftest: run rpc.samba3.smb-reauth1 and rpc.samba3.smb-reauth2

metze

11 years agos3:smbd/sesssetup: implement dynamic re-authentication and expire session if client...
Stefan Metzmacher [Wed, 25 Apr 2012 17:36:20 +0000 (19:36 +0200)]
s3:smbd/sesssetup: implement dynamic re-authentication and expire session if client supports it

metze

11 years agos3:selftest: run smbtorture3 SMB2-SESSION-REAUTH
Stefan Metzmacher [Fri, 22 Jun 2012 11:06:01 +0000 (13:06 +0200)]
s3:selftest: run smbtorture3 SMB2-SESSION-REAUTH

metze

11 years agos3:selftest: run smb2.session as ntlm and krb5
Stefan Metzmacher [Fri, 22 Jun 2012 11:03:16 +0000 (13:03 +0200)]
s3:selftest: run smb2.session as ntlm and krb5

This activates the smb2.session.expire1 test, when krb5 is used.

metze

11 years agoselftest/knownfail: only reauth5 still fails
Stefan Metzmacher [Thu, 17 May 2012 17:28:06 +0000 (19:28 +0200)]
selftest/knownfail: only reauth5 still fails

metze

11 years agos3:smb2_sesssetup: implement dynamic re-authentication and expire sessions
Stefan Metzmacher [Mon, 14 May 2012 12:24:08 +0000 (14:24 +0200)]
s3:smb2_sesssetup: implement dynamic re-authentication and expire sessions

metze