nivanova/samba-autobuild/.git
10 years agoTests processing an oplock break within a compound SMB2 request.
Richard Sharpe [Thu, 2 May 2013 21:36:05 +0000 (14:36 -0700)]
Tests processing an oplock break within a compound SMB2 request.

Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Tue May  7 19:45:36 CEST 2013 on sn-devel-104

10 years agoRemove the compound_related_in_progress state from the smb2 global state.
Jeremy Allison [Thu, 2 May 2013 21:16:22 +0000 (14:16 -0700)]
Remove the compound_related_in_progress state from the smb2 global state.

And also remove the restriction that we can't read a new
request whilst we're in this state.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@samba.org>
10 years agoThe core of the fix to allow opens to go async inside a compound request.
Jeremy Allison [Thu, 2 May 2013 20:55:53 +0000 (13:55 -0700)]
The core of the fix to allow opens to go async inside a compound request.

This is only allowed for opens that cause an oplock break, otherwise it
is not allowed. See [MS-SMB2].pdf note <194> on Section 3.3.5.2.7.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
10 years agoMove a variable into the area of code where it's used.
Jeremy Allison [Thu, 2 May 2013 20:08:16 +0000 (13:08 -0700)]
Move a variable into the area of code where it's used.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
10 years agoEnsure we don't try and cancel anything that is in a compound-related request.
Jeremy Allison [Thu, 2 May 2013 19:34:54 +0000 (12:34 -0700)]
Ensure we don't try and cancel anything that is in a compound-related request.

Too hard to deal with splitting off the replies.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
10 years agoOnly do the 1 second delay for sharing violations for SMB1, not SMB2.
Jeremy Allison [Thu, 2 May 2013 18:12:47 +0000 (11:12 -0700)]
Only do the 1 second delay for sharing violations for SMB1, not SMB2.

Match Windows behavior.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
10 years agoMakefile: Fix bug 9868 - Don't know how to make LIBNDR_PREG_OBJ.
Volker Lendecke [Tue, 7 May 2013 13:07:34 +0000 (15:07 +0200)]
Makefile: Fix bug 9868 - Don't know how to make LIBNDR_PREG_OBJ.

Thanks to Lucs for finding the issue

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue May  7 17:57:57 CEST 2013 on sn-devel-104

10 years agowinbind: Fix bug 9854 -- NULL pointer dereference
Volker Lendecke [Tue, 7 May 2013 10:39:16 +0000 (12:39 +0200)]
winbind: Fix bug 9854 -- NULL pointer dereference

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue May  7 14:49:07 CEST 2013 on sn-devel-104

10 years agoFix up the man pages to explain that "store dos attributes" overrides them.
Jeremy Allison [Mon, 6 May 2013 21:10:58 +0000 (14:10 -0700)]
Fix up the man pages to explain that "store dos attributes" overrides them.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue May  7 01:24:54 CEST 2013 on sn-devel-104

10 years agoAllow "store dos attributes" to override the other "map XXX" parameters.
Jeremy Allison [Mon, 6 May 2013 21:10:15 +0000 (14:10 -0700)]
Allow "store dos attributes" to override the other "map XXX" parameters.

Makes us consistent with what is described in the man pages.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agobuild: default --with-regedit to "auto" instead of "yes"
Michael Adam [Mon, 6 May 2013 11:16:49 +0000 (13:16 +0200)]
build: default --with-regedit to "auto" instead of "yes"

This means we don't build regedit when there is no ncurses
and this is not an error for the overall build.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Mon May  6 20:11:09 CEST 2013 on sn-devel-104

10 years agobuild: fix --with-regedit to properly honour the yes/no/auto scheme
Michael Adam [Mon, 6 May 2013 12:14:02 +0000 (14:14 +0200)]
build: fix --with-regedit to properly honour the yes/no/auto scheme

I.e. fail configure when ncurses support is not found but
regedit build was requested.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agobuild: simplify ncurses checks: --with-regedit does not take a path list
Michael Adam [Mon, 6 May 2013 11:19:24 +0000 (13:19 +0200)]
build: simplify ncurses checks: --with-regedit does not take a path list

--with-regedit is defined using SAMBA3_ADD_OPTION(), and can hence
take the values "yes", "no", and "auto". So it is not possible to
hand in paths to look for ncurses-config via this option.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Kai Blin <kai@samba.org>
10 years agodocs: update the description of the formulas in the idmap_autorid manpage
Michael Adam [Thu, 25 Apr 2013 23:06:58 +0000 (01:06 +0200)]
docs: update the description of the formulas in the idmap_autorid manpage

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Mon May  6 18:23:56 CEST 2013 on sn-devel-104

10 years agos3:idmap:autorid: add a comment block explaining the calculations
Michael Adam [Thu, 25 Apr 2013 22:52:49 +0000 (00:52 +0200)]
s3:idmap:autorid: add a comment block explaining the calculations

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: simplify the id->sid calculation
Michael Adam [Thu, 25 Apr 2013 18:24:36 +0000 (20:24 +0200)]
s3:idmap:autorid: simplify the id->sid calculation

To make it more intutive.

rid = reduced_rid + domain_range_index * range_size

where

reduced_rid = (id - id_low) % range_size

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: calculate the range's low_id in idmap_autorid_get_domainrange()
Michael Adam [Thu, 25 Apr 2013 18:12:39 +0000 (20:12 +0200)]
s3:idmap:autorid: calculate the range's low_id in idmap_autorid_get_domainrange()

This way, the calculation needs to be don only in one central place and
the formulas get simpler.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious
Michael Adam [Thu, 25 Apr 2013 17:47:00 +0000 (19:47 +0200)]
s3:idmap:autorid: make calculation in idmap_autorid_sid_to_id much more obvious

This is my attempt to make the sid->unix-id calculation much more obvious.
Especially with the introduction of the multi-range support an the originally
named "multiplier", the calculation

id = low_id + range_size * domain_number + rid - range_size * multiplier

was rather opaque to me.

What really happens here is this:
The rid is split into a reduced_rid part that is < rangesize and
a multiple of rangesize. This is given by the formula

rid = rid % range_size + (rid / range_size) * range_size

We define
 reduced_rid := rid % range_size
and
 domain_range_index := rid / range_size ( == the original multiplier)

and the original formula is equivalent to:

id = reduced_rid + low_id + range_number * range_size;

and reads

id = reduced_rid + range_minvalue

if we set range_minvalue := low_id + range_number * range_size.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: rename range.multiplier to domain_range_index
Michael Adam [Thu, 25 Apr 2013 17:18:27 +0000 (19:18 +0200)]
s3:idmap:autorid: rename range.multiplier to domain_range_index

The name multiplier is very confusing (at least for me).
This is an index that is used to reference the various
per-domain ranges.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: rename autorid_range_config.sid to domsid, along with instances
Michael Adam [Thu, 25 Apr 2013 17:13:45 +0000 (19:13 +0200)]
s3:idmap:autorid: rename autorid_range_config.sid to domsid, along with instances

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: rename autorid_domain_config --> autorid_range_config and instances...
Michael Adam [Thu, 25 Apr 2013 17:04:56 +0000 (19:04 +0200)]
s3:idmap:autorid: rename autorid_domain_config --> autorid_range_config and instances to "range"

This describes it better with the new support for multiple ranges for domains.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agos3:idmap:autorid: rename domainnum to rangenum
Michael Adam [Thu, 25 Apr 2013 11:56:03 +0000 (13:56 +0200)]
s3:idmap:autorid: rename domainnum to rangenum

Now ranges don't correspond to domains any more, but
multiple ranges are associated to a domain. So the name
is misleading.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
10 years agodocs-xml: manpage update for autorid multirange support
Abhidnya Joshi [Tue, 16 Apr 2013 11:11:45 +0000 (16:41 +0530)]
docs-xml: manpage update for autorid multirange support

Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com>
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3:winbindd/autorid multiple range support
Abhidnya Joshi [Wed, 10 Apr 2013 10:56:07 +0000 (16:26 +0530)]
s3:winbindd/autorid multiple range support

when a mapping request for a RID comes in that is larger
than the rangesize, allocate an extension range to be able
to map this one

This is especially important for large installations which
might have large RIDs being used in a trusted domain that
the administrator was not aware of when planning for autorid
usage and so those objects could not be mapped up to now.
As it is not possible to change the rangesize after the first
start of autorid, this would lead to big trouble.

Signed-off-by: Abhidnya Joshi <achirmul@in.ibm.com>
Reviewed-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3:utils fix wrong usage of PRIu64 in sscanf
Christian Ambach [Tue, 16 Apr 2013 10:39:55 +0000 (12:39 +0200)]
s3:utils fix wrong usage of PRIu64 in sscanf

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3:lib fix wrong usage of PRIu64 in sscanf
Christian Ambach [Tue, 16 Apr 2013 10:39:39 +0000 (12:39 +0200)]
s3:lib fix wrong usage of PRIu64 in sscanf

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agolib/replace: add SCNx macros
Christian Ambach [Tue, 16 Apr 2013 08:56:29 +0000 (10:56 +0200)]
lib/replace: add SCNx macros

we already have PRI*, but the corresponding SCN* were missing

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agolib/replace: prefer inttypes.h over stdint.h
Christian Ambach [Tue, 9 Apr 2013 21:10:16 +0000 (23:10 +0200)]
lib/replace: prefer inttypes.h over stdint.h

according to C99 7.8, inttypes.h should include stdint.h so prefer inttypes.h
and fall back to stdint.h (and our own definitions of PRI*) only when inttypes.h
could not be found

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoselftest: do not run doc tests if we don't build manpages
Matthieu Patou [Sun, 5 May 2013 22:37:58 +0000 (15:37 -0700)]
selftest: do not run doc tests if we don't build manpages

if XSLTPROC_MANPAGES is not set then manpages won't be built so there is
no sense trying to test it.
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon May  6 12:53:37 CEST 2013 on sn-devel-104

10 years agoselftest: Output error when samba_tool user command fails
Matthieu Patou [Sun, 5 May 2013 22:37:00 +0000 (15:37 -0700)]
selftest: Output error when samba_tool user command fails

It should help to debug why is it failing on some hosts in the build
farm (ie. sn-devel)
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agoconfigure: print a message when docbook.xsl is missing localy
Matthieu Patou [Sun, 5 May 2013 22:05:37 +0000 (15:05 -0700)]
configure: print a message when docbook.xsl is missing localy

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
10 years agolibsmb: call directly tevent_req_simple_finish_ntstatus
Matthieu Patou [Sun, 5 May 2013 21:53:40 +0000 (14:53 -0700)]
libsmb: call directly tevent_req_simple_finish_ntstatus

The CC compiler on openindiana is not pleased with a void function doing
a return of another void function.

It should help the build of openindiana on the buildfarm

Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon May  6 08:35:10 CEST 2013 on sn-devel-104

10 years agoFix warnings and one compile error caused by newer gcc 4.7.
Jeremy Allison [Fri, 3 May 2013 17:06:39 +0000 (10:06 -0700)]
Fix warnings and one compile error caused by newer gcc 4.7.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sun May  5 19:01:38 CEST 2013 on sn-devel-104

10 years agoidmap: Store negative cache entries if the backend fails
Volker Lendecke [Fri, 3 May 2013 10:28:59 +0000 (10:28 +0000)]
idmap: Store negative cache entries if the backend fails

This changes the behaviour for out-of-range queries: The tdb backend
(probably all backends) returns NT_STATUS_NONE_MAPPED and does not set the
map.status value to ID_UNMAPPED. This means that we did an early error
exit, not setting a negative cache value. This makes smbd ask winbind
over and over again for out-of-range gids, which can be a performance
problem in certain scenarios.

The new code makes us fall through to the code setting the negative
cache entry in all cases.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May  3 14:48:35 CEST 2013 on sn-devel-104

10 years agoidmap: Print error from idmap_backends_unixid_to_sid
Volker Lendecke [Fri, 3 May 2013 10:24:17 +0000 (10:24 +0000)]
idmap: Print error from idmap_backends_unixid_to_sid

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agolibsmb: Use sizeof instead of explicit numbers
Volker Lendecke [Thu, 25 Apr 2013 12:24:08 +0000 (14:24 +0200)]
libsmb: Use sizeof instead of explicit numbers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Apr 30 16:02:19 CEST 2013 on sn-devel-104

10 years agolibsmb: Use smb2_lease_push in smb2_create_send
Volker Lendecke [Thu, 25 Apr 2013 12:19:36 +0000 (14:19 +0200)]
libsmb: Use smb2_lease_push in smb2_create_send

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibcli: Add smb2_lease marshalling
Volker Lendecke [Wed, 17 Apr 2013 15:04:38 +0000 (17:04 +0200)]
libcli: Add smb2_lease marshalling

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agolibsmb: Move "struct smb2_lease" to common
Volker Lendecke [Wed, 17 Apr 2013 14:48:21 +0000 (16:48 +0200)]
libsmb: Move "struct smb2_lease" to common

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agocheck_parent_exists() can change errno. Ensure we preserve it across calls.
Anand Avati [Mon, 29 Apr 2013 22:21:00 +0000 (15:21 -0700)]
check_parent_exists() can change errno. Ensure we preserve it across calls.

Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Apr 30 11:00:11 CEST 2013 on sn-devel-104

10 years agowinbind4: Fix bug 9832 -- talloc use after free
Volker Lendecke [Mon, 29 Apr 2013 16:40:08 +0000 (18:40 +0200)]
winbind4: Fix bug 9832 -- talloc use after free

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
10 years agoregedit: Use color only when available.
Andreas Schneider [Fri, 26 Oct 2012 17:52:08 +0000 (19:52 +0200)]
regedit: Use color only when available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Apr 29 15:02:19 CEST 2013 on sn-devel-104

10 years agoregedit: Improve the while loop.
Andreas Schneider [Fri, 26 Oct 2012 17:21:50 +0000 (19:21 +0200)]
regedit: Improve the while loop.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Remove talloc leak report.
Andreas Schneider [Fri, 26 Oct 2012 16:46:29 +0000 (18:46 +0200)]
regedit: Remove talloc leak report.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Mark string values if they contain unprintable chars.
C. Davis [Mon, 20 Aug 2012 03:09:53 +0000 (20:09 -0700)]
regedit: Mark string values if they contain unprintable chars.

Also, edit the values in bin mode to avoid screen glitches.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add an edit binary command.
C. Davis [Mon, 20 Aug 2012 03:02:51 +0000 (20:02 -0700)]
regedit: Add an edit binary command.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Handle zero-length buffers better with hexedit.
C. Davis [Mon, 20 Aug 2012 02:11:16 +0000 (19:11 -0700)]
regedit: Handle zero-length buffers better with hexedit.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Load values on startup.
C. Davis [Mon, 20 Aug 2012 01:29:06 +0000 (18:29 -0700)]
regedit: Load values on startup.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Simplify the editor dialog input loop.
C. Davis [Sun, 19 Aug 2012 07:18:22 +0000 (00:18 -0700)]
regedit: Simplify the editor dialog input loop.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Fix white space and wrap long lines.
C. Davis [Sun, 19 Aug 2012 06:44:59 +0000 (23:44 -0700)]
regedit: Fix white space and wrap long lines.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add missing copyright headers to hexedit code.
C. Davis [Sat, 18 Aug 2012 02:03:12 +0000 (19:03 -0700)]
regedit: Add missing copyright headers to hexedit code.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Enable using tab to cycle thru dialog buttons.
C. Davis [Fri, 17 Aug 2012 10:06:20 +0000 (03:06 -0700)]
regedit: Enable using tab to cycle thru dialog buttons.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Restore cursor position when user tabs to a field.
C. Davis [Fri, 17 Aug 2012 09:15:20 +0000 (02:15 -0700)]
regedit: Restore cursor position when user tabs to a field.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add a general help section.
C. Davis [Thu, 16 Aug 2012 04:05:01 +0000 (21:05 -0700)]
regedit: Add a general help section.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Print help on left side of screen instead of the right.
C. Davis [Thu, 16 Aug 2012 03:50:00 +0000 (20:50 -0700)]
regedit: Print help on left side of screen instead of the right.

This is little bit easier to read to my eye.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Reduce magic numbers in edit dialog, clean up edit dialog creation.
C. Davis [Mon, 13 Aug 2012 05:39:21 +0000 (22:39 -0700)]
regedit: Reduce magic numbers in edit dialog, clean up edit dialog creation.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add help msgs for key and value sections at bottom of screen.
C. Davis [Mon, 13 Aug 2012 05:38:06 +0000 (22:38 -0700)]
regedit: Add help msgs for key and value sections at bottom of screen.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Prefer copywin() over prefresh() for displaying path.
C. Davis [Sun, 12 Aug 2012 06:29:13 +0000 (23:29 -0700)]
regedit: Prefer copywin() over prefresh() for displaying path.

copywin() works better with panels, dialogs, etc.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Cut off the front of the path when screen width is too small.
C. Davis [Sun, 12 Aug 2012 06:22:06 +0000 (23:22 -0700)]
regedit: Cut off the front of the path when screen width is too small.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Uese a pad for path label.
C. Davis [Sun, 12 Aug 2012 05:10:51 +0000 (22:10 -0700)]
regedit: Uese a pad for path label.

This makes it easier scale the label on resize.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Improve padding for value summary.
C. Davis [Sat, 11 Aug 2012 22:00:55 +0000 (15:00 -0700)]
regedit: Improve padding for value summary.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Update dialog position on screen resize.
C. Davis [Sat, 11 Aug 2012 04:56:58 +0000 (21:56 -0700)]
regedit: Update dialog position on screen resize.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Handle term resizes.
C. Davis [Sat, 11 Aug 2012 03:05:20 +0000 (20:05 -0700)]
regedit: Handle term resizes.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Create subkeys.
C. Davis [Fri, 10 Aug 2012 20:16:20 +0000 (13:16 -0700)]
regedit: Create subkeys.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Delete and add keys.
C. Davis [Fri, 10 Aug 2012 01:14:42 +0000 (18:14 -0700)]
regedit: Delete and add keys.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Edit binary values with hexedit.
C. Davis [Thu, 9 Aug 2012 03:44:58 +0000 (20:44 -0700)]
regedit: Edit binary values with hexedit.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Initialize hexedit buf with data if available.
C. Davis [Thu, 9 Aug 2012 03:16:05 +0000 (20:16 -0700)]
regedit: Initialize hexedit buf with data if available.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit:hexedit: make sure cursor is updated on physical screen.
C. Davis [Thu, 9 Aug 2012 03:06:13 +0000 (20:06 -0700)]
regedit:hexedit: make sure cursor is updated on physical screen.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add an input dialog.
C. Davis [Thu, 9 Aug 2012 00:49:06 +0000 (17:49 -0700)]
regedit: Add an input dialog.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Simplify notice dialogs, don't overwrite existing values.
C. Davis [Wed, 8 Aug 2012 22:36:01 +0000 (15:36 -0700)]
regedit: Simplify notice dialogs, don't overwrite existing values.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Don't pass empty value names to new_item().
C. Davis [Wed, 8 Aug 2012 21:37:20 +0000 (14:37 -0700)]
regedit: Don't pass empty value names to new_item().

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Really delete value.
C. Davis [Wed, 8 Aug 2012 21:16:41 +0000 (14:16 -0700)]
regedit: Really delete value.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add new value type selection dialog.
C. Davis [Wed, 8 Aug 2012 19:09:03 +0000 (12:09 -0700)]
regedit: Add new value type selection dialog.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Save contents of value editor.
C. Davis [Wed, 8 Aug 2012 06:41:50 +0000 (23:41 -0700)]
regedit: Save contents of value editor.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Value editor changes.
C. Davis [Wed, 8 Aug 2012 02:19:28 +0000 (19:19 -0700)]
regedit: Value editor changes.

* Handle tab and back-tab for navigating among sections of the
  editor dialog.

* Read in REG_MULTI_SZ values into a multi-line form field.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Don't refresh treeview and value list.
C. Davis [Tue, 7 Aug 2012 02:18:56 +0000 (19:18 -0700)]
regedit: Don't refresh treeview and value list.

This is handled by update_panels() and doupdate() now.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Some work on dialogs.
C. Davis [Tue, 7 Aug 2012 02:11:13 +0000 (19:11 -0700)]
regedit: Some work on dialogs.

* Make dialogs modal with a separate getch() loop to avoid extra
  complexity keeping track of dialogs and getting the result.

* Start work on the value editor dialog.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Import hex editor.
C. Davis [Tue, 7 Aug 2012 02:06:15 +0000 (19:06 -0700)]
regedit: Import hex editor.

This was tested separately editing files. It needs to be
connected to regedit's value editor.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Link to ncurses form library
C. Davis [Mon, 6 Aug 2012 19:29:11 +0000 (12:29 -0700)]
regedit: Link to ncurses form library

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Don't panic if we can't open the file.
Andreas Schneider [Thu, 2 Aug 2012 10:41:49 +0000 (12:41 +0200)]
regedit: Don't panic if we can't open the file.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agowaf: Create a better wscript for finding ncurses.
Andreas Schneider [Thu, 2 Aug 2012 09:29:10 +0000 (11:29 +0200)]
waf: Create a better wscript for finding ncurses.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Improve calculation for centering dialogs.
C. Davis [Sat, 28 Jul 2012 01:39:54 +0000 (18:39 -0700)]
regedit: Improve calculation for centering dialogs.

Add some sanity checks to avoid crashing.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Introduce dialog windows.
C. Davis [Fri, 27 Jul 2012 10:37:22 +0000 (03:37 -0700)]
regedit: Introduce dialog windows.

Link to ncurses "panels" library to support popup dialog
windows, and begin working on a small dialog library.

Right now, it is useful for "yes/no" confirmation popups,
but later it'll be used for more complex forms for editing
values.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Take into account that getch() may return a '\n' instead of KEY_ENTER.
C. Davis [Thu, 26 Jul 2012 08:56:31 +0000 (01:56 -0700)]
regedit: Take into account that getch() may return a '\n' instead of KEY_ENTER.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Use tab key to switch between key and value sections.
C. Davis [Tue, 24 Jul 2012 11:12:56 +0000 (04:12 -0700)]
regedit: Use tab key to switch between key and value sections.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Don't overwrite the '/' when printing path.
C. Davis [Tue, 24 Jul 2012 10:10:45 +0000 (03:10 -0700)]
regedit: Don't overwrite the '/' when printing path.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Print value summary, fix heap corruption and path printing.
C. Davis [Fri, 20 Jul 2012 10:53:42 +0000 (03:53 -0700)]
regedit: Print value summary, fix heap corruption and path printing.

Added code to summarize value data. Also fixed a few bugs,
including some heap corruption found with valgrind.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: List values for the selected key.
C. Davis [Wed, 18 Jul 2012 09:31:41 +0000 (02:31 -0700)]
regedit: List values for the selected key.

Next step is to format a preview for the data and show that
next to the data type.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Print the registry path.
C. Davis [Sat, 14 Jul 2012 00:16:51 +0000 (17:16 -0700)]
regedit: Print the registry path.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Make all hives browsable.
C. Davis [Sat, 14 Jul 2012 00:07:44 +0000 (17:07 -0700)]
regedit: Make all hives browsable.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: load the configuration after processing the command line
Michael Adam [Fri, 13 Jul 2012 08:57:02 +0000 (10:57 +0200)]
regedit: load the configuration after processing the command line

this way the "-s" parameter can change the config file to be loaded...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoregedit: Setup a test tree view of HKLM.
C. Davis [Fri, 13 Jul 2012 04:11:55 +0000 (21:11 -0700)]
regedit: Setup a test tree view of HKLM.

Expand on the former test by allowing the user to walk HKLM
with the tree view. Subkeys are loaded dynamically in memory
as the user walks the hierarchy with tree_node_load_children().

One issue with this at the moment is detecting if the
in-memory copy of the hierarchy is out of date.

TODO: figure out when to reload out of date portions of the
hierarchy (probably by checking last_modified_time).

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Initial import of treeview code
C. Davis [Tue, 10 Jul 2012 13:23:33 +0000 (06:23 -0700)]
regedit: Initial import of treeview code

Reviewed-by: Andreas Schneider <asn@samba.org>
10 years agoregedit: First crack at linking to ncurses.
C. Davis [Tue, 10 Jul 2012 13:16:35 +0000 (06:16 -0700)]
regedit: First crack at linking to ncurses.

First attempt of editing build scripts to link to ncurses
libraries. It seems to work, though checks may need to be
expanded upon.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoregedit: Add regedit main source file
C. Davis [Fri, 6 Jul 2012 10:08:17 +0000 (03:08 -0700)]
regedit: Add regedit main source file

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoSupport s3 local access with the s4 libregistry framework
C. Davis [Fri, 6 Jul 2012 09:57:55 +0000 (02:57 -0700)]
Support s3 local access with the s4 libregistry framework

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agos3: Wrap calls to the s3 registry API.
C. Davis [Fri, 6 Jul 2012 09:42:53 +0000 (02:42 -0700)]
s3: Wrap calls to the s3 registry API.

To use Samba 4's libregistry in the registry editor, some
compatibility issues with Samba 3 need to be addressed.
"struct registry_key" is defined differently in source3 and
source4, and so this wrapper is used to isolate conflicting
types and avoid headaches compiling the code.

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
10 years agoFix bug #9822 - Samba crashing during Win8 sync.
Jeremy Allison [Fri, 26 Apr 2013 17:47:41 +0000 (10:47 -0700)]
Fix bug #9822 - Samba crashing during Win8 sync.

When refactoring the dptr desctructor in the
fix for bug:

9778 (Samba directory code uses dirfd() without vectoring through a VFS call)

I removed the code to NULL out the struct smb_Dir *
pointer inside the fsp struct by mistake.

Re-add the NULLing out of that pointer when
closing a directory pointer associated with
an open file.

Reporter confirms it fixes the crash.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Sat Apr 27 20:44:55 CEST 2013 on sn-devel-104

10 years agotorture: Only test leases if supported
Volker Lendecke [Wed, 17 Apr 2013 11:41:54 +0000 (13:41 +0200)]
torture: Only test leases if supported

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
Autobuild-User(master): Richard Sharpe <sharpe@samba.org>
Autobuild-Date(master): Sat Apr 27 18:09:37 CEST 2013 on sn-devel-104

10 years agotorture: Use ZERO_STRUCTPN instead of explicit deref
Volker Lendecke [Wed, 17 Apr 2013 10:34:14 +0000 (12:34 +0200)]
torture: Use ZERO_STRUCTPN instead of explicit deref

Signed-off-by: Volker Lendecke <vl@samba.org>