metze/samba/wip.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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

11 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

11 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>
11 years agoCheck for WRITE_ACCESS on the file before overriding an EACCESS.
Jeremy Allison [Thu, 25 Apr 2013 21:06:03 +0000 (14:06 -0700)]
Check for WRITE_ACCESS on the file before overriding an EACCESS.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Apr 27 15:57:17 CEST 2013 on sn-devel-104

11 years agoEnsure we don't try the open_file_fchmod() if we can't write to the file.
Jeremy Allison [Thu, 25 Apr 2013 21:02:24 +0000 (14:02 -0700)]
Ensure we don't try the open_file_fchmod() if we can't write to the file.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agoRemove indentation around code wrapped by unneeded CAN_WRITE.
Jeremy Allison [Thu, 25 Apr 2013 21:00:42 +0000 (14:00 -0700)]
Remove indentation around code wrapped by unneeded CAN_WRITE.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agoAdd early return in file_set_dosmode() on a read only share.
Jeremy Allison [Thu, 25 Apr 2013 20:59:22 +0000 (13:59 -0700)]
Add early return in file_set_dosmode() on a read only share.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agosmbd: Do not fetch the record in defer_open_done
Volker Lendecke [Fri, 26 Apr 2013 13:13:14 +0000 (15:13 +0200)]
smbd: Do not fetch the record in defer_open_done

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 27 02:06:10 CEST 2013 on sn-devel-104

11 years agodbwrap: Allow dbwrap_record_watch_recv to not lock the record
Volker Lendecke [Fri, 26 Apr 2013 13:12:05 +0000 (15:12 +0200)]
dbwrap: Allow dbwrap_record_watch_recv to not lock the record

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: We don't use DEFERRED_OPEN_ENTRY anymore
Volker Lendecke [Fri, 26 Apr 2013 13:05:50 +0000 (15:05 +0200)]
smbd: We don't use DEFERRED_OPEN_ENTRY anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Remove unused smb2_deferred_open_timer
Volker Lendecke [Fri, 26 Apr 2013 12:29:42 +0000 (14:29 +0200)]
smbd: Remove unused smb2_deferred_open_timer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Obsolete MSG_SMB_OPEN_RETRY
Volker Lendecke [Fri, 12 Apr 2013 12:12:38 +0000 (14:12 +0200)]
smbd: Obsolete MSG_SMB_OPEN_RETRY

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Remove the unused fsp->pending_break_messages array
Volker Lendecke [Fri, 12 Apr 2013 12:09:12 +0000 (14:09 +0200)]
smbd: Remove the unused fsp->pending_break_messages array

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Remove unused reply_to_oplock_break_requests
Volker Lendecke [Fri, 12 Apr 2013 12:06:59 +0000 (14:06 +0200)]
smbd: Remove unused reply_to_oplock_break_requests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Obsolete MSG_SMB_BREAK_RESPONSE
Volker Lendecke [Fri, 12 Apr 2013 12:03:08 +0000 (14:03 +0200)]
smbd: Obsolete MSG_SMB_BREAK_RESPONSE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Ignore OPEN_RETRY and BREAK_RESPONSE
Volker Lendecke [Wed, 10 Apr 2013 14:57:32 +0000 (16:57 +0200)]
smbd: Ignore OPEN_RETRY and BREAK_RESPONSE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agosmbd: Use dbwrap_record_watch_send for defer_open
Volker Lendecke [Thu, 29 Nov 2012 15:10:22 +0000 (16:10 +0100)]
smbd: Use dbwrap_record_watch_send for defer_open

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agobug 9830: fix panic in nt_printer_publish_ads
David Disseldorp [Thu, 25 Apr 2013 14:41:17 +0000 (16:41 +0200)]
bug 9830: fix panic in nt_printer_publish_ads

Check for ads_find_machine_acct() errors, to ensure a NULL LDAPMessage
pointer doesn't get passed to ldap_get_dn().

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-By: Günther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Apr 25 19:01:55 CEST 2013 on sn-devel-104

11 years agosource4/libcli: Only set ctemp set on success
Sam Lang [Mon, 22 Apr 2013 15:23:16 +0000 (10:23 -0500)]
source4/libcli: Only set ctemp set on success

If open fails ctemp.out.name probably won't be valid and strdup
will cause a segv.  Only set the path if open succeeds.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Apr 24 23:58:44 CEST 2013 on sn-devel-104

11 years agoImplements a vfs module for cephfs, a distributed file system
Sam Lang [Wed, 24 Apr 2013 19:52:57 +0000 (12:52 -0700)]
Implements a vfs module for cephfs, a distributed file system
with posix semantics, built on the ceph distributed object
storage layer.  The ceph vfs module interfaces to the libcephfs
userspace API, and is primarily a lightweight wrapper around
libcephfs, translating error codes and parameters as necessary.

Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoBUG 9817: Fix 'map untrusted to domain' with NTLMv2.
Andreas Schneider [Wed, 24 Apr 2013 13:27:21 +0000 (15:27 +0200)]
BUG 9817: Fix 'map untrusted to domain' with NTLMv2.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Wed Apr 24 17:14:48 CEST 2013 on sn-devel-104

11 years agodocs-xml: document dbwrap_tool exists
Christian Ambach [Mon, 22 Apr 2013 11:56:24 +0000 (13:56 +0200)]
docs-xml: document dbwrap_tool exists

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Mon Apr 22 18:43:42 CEST 2013 on sn-devel-104

11 years agos3:utils/dbwrap_tool add exists operation
Christian Ambach [Mon, 22 Apr 2013 11:51:52 +0000 (13:51 +0200)]
s3:utils/dbwrap_tool add exists operation

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agodocs: Fix bug 9809 -- missing entry in specfile
Volker Lendecke [Fri, 19 Apr 2013 14:17:13 +0000 (16:17 +0200)]
docs: Fix bug 9809 -- missing entry in specfile

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Karolin Seeger <kseeger@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Apr 22 11:35:52 CEST 2013 on sn-devel-104

11 years agoFix bug in old create temp SMB request. Only use VFS functions.
Jeremy Allison [Wed, 17 Apr 2013 21:42:20 +0000 (14:42 -0700)]
Fix bug in old create temp SMB request. Only use VFS functions.

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 20 21:13:36 CEST 2013 on sn-devel-104

11 years agoEnsure the RECVFILE path in vfs_pwrite_data() operates on a blocking socket.
Jeremy Allison [Mon, 8 Apr 2013 17:49:03 +0000 (10:49 -0700)]
Ensure the RECVFILE path in vfs_pwrite_data() operates on a blocking socket.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Apr 20 01:04:05 CEST 2013 on sn-devel-104

11 years agoEnsure the RECVFILE path in vfs_write_data() operates on a blocking socket.
Jeremy Allison [Mon, 8 Apr 2013 17:32:10 +0000 (10:32 -0700)]
Ensure the RECVFILE path in vfs_write_data() operates on a blocking socket.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoEnsure drain_socket() operates on a blocking socket.
Jeremy Allison [Mon, 8 Apr 2013 17:16:48 +0000 (10:16 -0700)]
Ensure drain_socket() operates on a blocking socket.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd the internals of is_smb2_recvfile_write.
Jeremy Allison [Mon, 1 Apr 2013 18:16:01 +0000 (11:16 -0700)]
Add the internals of is_smb2_recvfile_write.

This turns on the real receivefile detection, and completes
the receivefile code path changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoThe guts of the receivefile code changes.
Jeremy Allison [Mon, 1 Apr 2013 20:24:07 +0000 (13:24 -0700)]
The guts of the receivefile code changes.

If an incoming PDU might qualify, only read
SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN = (SMB2_HEADER + SMB2_WRITE_BODY_LEN)
bytes rather than the whole PDU.

Next time we're called, use is_smb2_recvfile_write() to decide if
this is an SMB2_WRITE that fit the receivefile criteria, otherwise
just read the rest of the PDU.

If we did do a short receivefile read, set up the smb2_req->smb1req->unread_bytes
value to show what bytes remain in the TCP buffers.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd stub static function that will turn on/off receivefile code path.
Jeremy Allison [Mon, 1 Apr 2013 20:19:01 +0000 (13:19 -0700)]
Add stub static function that will turn on/off receivefile code path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd extra fields into struct smbd_smb2_request_read_state to support receivefile.
Jeremy Allison [Mon, 1 Apr 2013 20:17:09 +0000 (13:17 -0700)]
Add extra fields into struct smbd_smb2_request_read_state to support receivefile.

Initialize min_recv_size with the size that will trigger the
receivefile write path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd macro SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN.
Jeremy Allison [Mon, 1 Apr 2013 20:14:13 +0000 (13:14 -0700)]
Add macro SMBD_SMB2_SHORT_RECEIVEFILE_WRITE_LEN.

This is the 'short' length we'll read in the SMB2_WRITE receivefile
code path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd utility function get_min_receive_file_size().
Jeremy Allison [Mon, 1 Apr 2013 20:12:55 +0000 (13:12 -0700)]
Add utility function get_min_receive_file_size().

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAllow smbd_smb2_request_error_ex() to cope with unread bytes on error.
Jeremy Allison [Tue, 19 Mar 2013 19:36:52 +0000 (12:36 -0700)]
Allow smbd_smb2_request_error_ex() to cope with unread bytes on error.

Drain the socket if a RECVFILE write failed.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoAdd function smbd_smb2_unread_bytes().
Jeremy Allison [Tue, 19 Mar 2013 19:24:17 +0000 (12:24 -0700)]
Add function smbd_smb2_unread_bytes().

Returns number of bytes left to read for recvfile. Will be
used in SMB_2_WRITE_FILE code path.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoIf we already have an smb1req attached to the struct smbd_smb2_request, don't recreat...
Jeremy Allison [Tue, 19 Mar 2013 19:16:32 +0000 (12:16 -0700)]
If we already have an smb1req attached to the struct smbd_smb2_request, don't recreate it.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agoEnsure we don't do an SMB2 aio write if RECVFILE is active.
Jeremy Allison [Mon, 18 Mar 2013 19:00:25 +0000 (12:00 -0700)]
Ensure we don't do an SMB2 aio write if RECVFILE is active.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan (metze) Metzmacher <metze@samba.org>
11 years agosamba-tool/dns: Fix a typo in ttl variable name
Amitay Isaacs [Fri, 19 Apr 2013 14:46:19 +0000 (00:46 +1000)]
samba-tool/dns: Fix a typo in ttl variable name

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agofileserver: raise the debug level for share connection from non IPC to 2
Matthieu Patou [Sat, 26 Jan 2013 22:42:57 +0000 (14:42 -0800)]
fileserver: raise the debug level for share connection from non IPC to 2

So that logs of make test are not spamed, the code dates from 1999 maybe
at that moment we wanted to have some warning I think nodays it's pretty
stable.

Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agos3:locking add NDR debug in share_mode_forall
Christian Ambach [Fri, 19 Apr 2013 09:10:45 +0000 (11:10 +0200)]
s3:locking add NDR debug in share_mode_forall

Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Apr 19 15:06:33 CEST 2013 on sn-devel-104

11 years agos3:rpc_server increase a debug level
Christian Ambach [Fri, 19 Apr 2013 09:21:06 +0000 (11:21 +0200)]
s3:rpc_server increase a debug level

those messages are not worth level 0 or 1 and potentially
clutter the system logs

Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
11 years agos3:registry increase a debug level
Christian Ambach [Fri, 19 Apr 2013 09:20:38 +0000 (11:20 +0200)]
s3:registry increase a debug level

do not clutter the logs

Reviewed-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
11 years agos3:smbd stop working on a dead client socket
Christian Ambach [Fri, 19 Apr 2013 08:04:08 +0000 (10:04 +0200)]
s3:smbd stop working on a dead client socket

when the client has already disconnected, exit server as done
in other paths in smbd_process

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:smbd increase a loglevel
Christian Ambach [Mon, 8 Apr 2013 16:09:05 +0000 (18:09 +0200)]
s3:smbd increase a loglevel

do not complain too loudly if the socket has already gone

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agos3:smbstatus do not print orphaned share entries
Christian Ambach [Thu, 18 Apr 2013 15:09:32 +0000 (17:09 +0200)]
s3:smbstatus do not print orphaned share entries

Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
11 years agosmbd: Fix signing when the async echo handler kicks in
Volker Lendecke [Fri, 19 Apr 2013 10:36:08 +0000 (12:36 +0200)]
smbd: Fix signing when the async echo handler kicks in

This was introduced as a copy&paste error in 5e0258fc932c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
11 years agos4:dsdb: Fix warnings about not set / set but unused / shadowed variables
Matthieu Patou [Fri, 12 Apr 2013 05:30:27 +0000 (22:30 -0700)]
s4:dsdb: Fix warnings about not set / set but unused / shadowed variables

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Apr 19 13:15:40 CEST 2013 on sn-devel-104

11 years agos3:smbd:smb2:scavenger: fix format error for debugging open_persistent_id in scavenge...
Michael Adam [Thu, 18 Apr 2013 21:45:24 +0000 (23:45 +0200)]
s3:smbd:smb2:scavenger: fix format error for debugging open_persistent_id in scavenger_timer()

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Apr 19 01:36:15 CEST 2013 on sn-devel-104

11 years agotalloc: Simplify _talloc_free_poolmem a bit
Volker Lendecke [Mon, 15 Apr 2013 20:19:25 +0000 (22:19 +0200)]
talloc: Simplify _talloc_free_poolmem a bit

Early returns are easier to understand than "else if"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 18 22:50:42 CEST 2013 on sn-devel-104

11 years agotalloc: Do an early return
Volker Lendecke [Mon, 15 Apr 2013 20:12:50 +0000 (22:12 +0200)]
talloc: Do an early return

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agotalloc: Avoid some "else" by doing early returns
Volker Lendecke [Mon, 15 Apr 2013 20:11:44 +0000 (22:11 +0200)]
talloc: Avoid some "else" by doing early returns

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agotalloc: Fix nonblank line endings
Volker Lendecke [Mon, 15 Apr 2013 19:44:38 +0000 (21:44 +0200)]
talloc: Fix nonblank line endings

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
11 years agoselftest: S3 does not do leases yet
Volker Lendecke [Wed, 17 Apr 2013 15:19:59 +0000 (17:19 +0200)]
selftest: S3 does not do leases yet

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

11 years agos4:torture/smb2: add v2 lease requests
Stefan Metzmacher [Wed, 31 Oct 2012 08:07:19 +0000 (09:07 +0100)]
s4:torture/smb2: add v2 lease requests

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>