[SCM] Samba Shared Repository - branch v4-2-test updated

Karolin Seeger kseeger at samba.org
Thu Oct 9 16:24:05 MDT 2014


The branch, v4-2-test has been updated
       via  02e1c6b SO_PROTOCOL is platform-dependent
       via  13c7b80 regedit: remove an old comment
       via  a38ad98 regedit: print error msg if opening registry fails
       via  96a5321 regedit: handle pgup/pgdn/home/end keys on lists
       via  0b70ddd regedit: handle del and backspace in hexeditor
       via  fb01459 regedit: grow hexedit buffer as the user types
       via  0f548f9 regedit: add a button to resize hexedit buffer
       via  6c736e2 regedit: add a number input box
       via  cf71665 regedit: don't expand single line text field buffer with cursor movement
       via  7720184 regedit: handle DEL key in text fields
       via  27e99f6 regedit: adjust some variable names to make them more distinct
       via  d9b67e6 regedit: find previous items
       via  05be096 regedit: search values and repeat search from cursor positions
       via  45afe22 regedit: flesh out search dialog and simplify search opts
       via  60b6297 regedit: don't use subwindows in hexedit
       via  afafda2 regedit: use pad as a canvas for dialogs
       via  77d9d4c regedit: clear value list after creating new key
       via  00ff031 regedit: use the right function to reopen a hive
       via  a226a52 regedit: move cursor to edited value in list and report edit errors
       via  47caf0b regedit: Introduce a new API to build the dialogs.
       via  ceafd11 regedit: improvements for hexedit
       via  7e11ecb regedit: add padding to fit REG_MULTI_SZ to the text field
       via  bff6822 regedit: simplify cleanup after loading children
       via  1fb0690 regedit: add a panic handler to restore terminal
       via  5e3df48 regedit: make all hives descend from a root node
       via  8bc4a73 regedit: add a refresh command to clear cache and reload current path
       via  ee89de1 regedit: reopen key after editing or removing values
       via  894f516 regedit: reopen parent keys when adding or removing subkeys
       via  6d61540 regedit: set cursor after creating a new key
       via  36cd9af regedit: set cursor to the parent node when ascending
       via  92d302f regedit: don't fail loading keys if just a few are unavailable
       via  d4c1b36 regedit: include error description in popups
       via  544c4ec regedit: notify user if there's a failure loading subkeys
       via  4867e76 regedit: handle awkward window sizes better
       via  2b74ee0 regedit: use talloc typesafety features
       via  fe5b9cd regedit: restore list cursor when window is resized
       via  db7aef6 regedit: make value list display data in multiple columns
       via  1ca1c74 regedit: add multicolumn list widget
       via  ca81665 regedit: add search feature.
       via  f5ac8ec regedit: add a color scheme for path and context help sections
       via  1ab3b87 regedit: sort keys
       via  196055d regedit: free value list subwindow
       via  93aa394 regedit: add borders around key and value lists, and change headings
       via  bb1b0ab regedit: add padding for key labels when there's not a prefix.
       via  c7802fc regedit: add white on blue color scheme
       via  0288af3 regedit: silence some warnings
       via  c7ebcd6 s3: smb2cli: query info return length check was reversed.
       via  ce0c5f6 registry: Don't leave dangling transactions
       via  ff9dd62 WHATSNEW: Fix typo.
      from  137c096 VERSION: Re-enable git snapshots.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-2-test


- Log -----------------------------------------------------------------
commit 02e1c6bc55d6137ff7694973a3d6e8602839eeae
Author: Jakub Hrozek <jakub.hrozek at gmail.com>
Date:   Thu Oct 2 07:04:15 2014 +0200

    SO_PROTOCOL is platform-dependent
    
    SO_PROTOCOL is not defined on all platforms. In particular, OSX doesn't
    include it and so far I haven't found any compatible declaration.
    
    Signed-off-by: Jakub Hrozek <jakub.hrozek at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 5e70d80e7d7752a1df16b871d57fbcd8334a44e6)
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10861
    socket_wrapper does not build on systems without SO_PROTOCOL (< Linux 2.6.32)
    
    Autobuild-User(v4-2-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-2-test): Thu Oct  9 23:38:36 CEST 2014 on sn-devel-104

commit 13c7b805bf0e38bf488986196d614450a1cece37
Author: Michael Adam <obnox at samba.org>
Date:   Wed Oct 1 11:36:36 2014 +0200

    regedit: remove an old comment
    
    Signed-off-by: Michael Adam <obnox at samba.org>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Wed Oct  1 16:55:05 CEST 2014 on sn-devel-104
    
    (cherry picked from commit fa9630e368df2446c5893b2fe51bada7a38760aa)
    
    The last 45 patches address bug #10859 (Improve samba-regedit).

commit a38ad98674e05143be76fcc161ef6af8089fa558
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Thu Aug 7 06:17:28 2014 -0700

    regedit: print error msg if opening registry fails
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 61cc5185e5ccf1bb6d1201063ac3a62e3b7fcfbb)

commit 96a5321a787fa25e211532e0e6686d50810d4cab
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sun Aug 10 18:26:14 2014 -0700

    regedit: handle pgup/pgdn/home/end keys on lists
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 3b80f256bac0842f4470f9d5361426d7cff88ea9)

commit 0b70dddafe808ede347e1516d46a0bd0fda51b5d
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sat Aug 9 17:11:00 2014 -0700

    regedit: handle del and backspace in hexeditor
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit b96c43219480c442d0264834101e5bee675e3b04)

commit fb014599d74cb69b2062d0754474f24a0840dbf0
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sat Aug 9 13:39:59 2014 -0700

    regedit: grow hexedit buffer as the user types
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 3c6541c44e2bfca2d1dfb7a971064d2c7143106f)

commit 0f548f95f1f48e9f7ad5a4c37ff17f187d9a415c
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Aug 8 23:55:25 2014 -0700

    regedit: add a button to resize hexedit buffer
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 4badab3a6062a473b9651564ce43bb51c63457c1)

commit 6c736e239d494a5345edee711763113b249ab99d
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Aug 8 23:36:48 2014 -0700

    regedit: add a number input box
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 8acb87e42e8004c6a2f04085825fadad3cfbc5b2)

commit cf716654593bba5b2eb29f7fb75d65816f76f2c5
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Aug 8 22:25:50 2014 -0700

    regedit: don't expand single line text field buffer with cursor movement
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 5bbed3d93dfddb0386401a032dc3321bc7f67e33)

commit 77201842bbf724a676e19f22285370116b8b6797
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Aug 8 19:58:03 2014 -0700

    regedit: handle DEL key in text fields
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 00765544af53cdfcc6f602b1825f14b97b96beb1)

commit 27e99f6a6522a5f9a0b59d1b3a4ffb705dc11cf4
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Aug 6 20:15:38 2014 -0700

    regedit: adjust some variable names to make them more distinct
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 58db858619339084c86a02fd226eaff0854c730f)

commit d9b67e699267d19eac1797e01f7c71ff10f8df04
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sat Aug 2 17:29:31 2014 -0700

    regedit: find previous items
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit fd95b0aa96067d4c9ce60b73168bf9fe5c95ffac)

commit 05be09641bbad211db1c2d93f7a151836d2eb9f7
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Thu Jul 31 23:24:19 2014 -0700

    regedit: search values and repeat search from cursor positions
    
    Recovering the search position from the cursors is safer than retaining
    a pointer to the last node, as the pointer will become invalid if the
    user deletes the item or refreshes the cache.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit bcab659516382d5dc51b1558a895a9a26d81c6b8)

commit 45afe22036a6c000db94f129417047d863730c88
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jul 30 22:04:50 2014 -0700

    regedit: flesh out search dialog and simplify search opts
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 09245177a4031fb1a1319071e745f0df10b1ee53)

commit 60b6297ed04b37b9740e0d737edbfe425d89fe45
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jul 28 23:23:32 2014 -0700

    regedit: don't use subwindows in hexedit
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 982c06f55a0ef8a80a0f87c9e77200ce952f85b3)

commit afafda2541437302b634c65371a8b515e770c993
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jul 28 23:04:10 2014 -0700

    regedit: use pad as a canvas for dialogs
    
    Drawing in a pad allows the dialog to maintain the same size even when
    the terminal window is shrunk to some awkwardly small size.  It also
    helps avoid hacks needed to update positions of subwindows when the
    panel is moved.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit c272178ccc6bb2f3b4a6621ef463489741c7e040)

commit 77d9d4c9ddc5ef249b2455ce8c4cdaa51394d7f0
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sun Jul 27 17:48:05 2014 -0700

    regedit: clear value list after creating new key
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit cc22cb5cd44fdcc078211d2b82502ca219b1e928)

commit 00ff03145aa3d7bddac3fc205f86ebbcf9130e8b
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sun Jul 27 17:39:06 2014 -0700

    regedit: use the right function to reopen a hive
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 1b6445ae03521d788bf247eb550d1b51113fc8df)

commit a226a52c232c30b79509c395e72aa118bddd0c54
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sat Jul 26 19:49:33 2014 -0700

    regedit: move cursor to edited value in list and report edit errors
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 061d3e9a66f7f71cc6532fa6b0bcf47bf0fe3e35)

commit 47caf0bbbde0845eebb127193a8ef279e3b9bbf5
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Jul 25 23:26:27 2014 -0700

    regedit: Introduce a new API to build the dialogs.
    
    This helps make new dialogs easier to create, because it provides some
    common building blocks and a consistent way to deal with user input.
    
    Dialogs are divided into sections that stack vertically, and common
    sections for typical UI things like text boxes, option lists, and
    buttons are provided.
    
    The old dialogs are rewritten to use this API.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit a728c391d7d4f6474e37f7118ba6df14dc9da6fd)

commit ceafd11b23a90fa0f59b716148233f7d82d735a5
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Jul 25 23:16:52 2014 -0700

    regedit: improvements for hexedit
    
    This mainly enables setting the hexedit buffer after the editor is
    allocated.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 30ae8f1014122258ff3b9415370fc679675929de)

commit 7e11ecb8789f03637ddf1744ecaef23f9420d95d
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Jul 18 13:35:14 2014 -0700

    regedit: add padding to fit REG_MULTI_SZ to the text field
    
    This fixes a bug loading REG_MULTI_SZ values into the editor dialog,
    since ncurses fields don't handle newline characters.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 42df2e643f68f5ec19e6a41eade29199a3266035)

commit bff6822cc9612a44eef47eca47d8dcedbe1099ce
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jul 7 21:30:49 2014 -0700

    regedit: simplify cleanup after loading children
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit c94c765f01dc145ee7f1abfe1379ed9c923f3d43)

commit 1fb0690c18c7f185ad5ca21199f5e7729c9a216f
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Tue Jul 1 16:00:16 2014 -0700

    regedit: add a panic handler to restore terminal
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit fec275a4a8e9ecd77fb30c4a242a2fe832d9f41c)

commit 5e3df482ec40c09325129977c132c956cce092d2
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jun 30 23:19:53 2014 -0700

    regedit: make all hives descend from a root node
    
    This helps simplify cleanup, since each node's talloc context is the
    parent node, and freeing the root node will destroy the entire tree
    without any extra utility functions.
    
    It also wouldn't be hard to extend this later on to support browsing
    multiple registries at the same time.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit f9a2f2eb7cc3c69f20ab615dd98b750414672fe3)

commit 8bc4a73cf2a7458c027503daa8e1eac2aa158ce7
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jun 30 23:14:20 2014 -0700

    regedit: add a refresh command to clear cache and reload current path
    
    This is needed to view changes made externally
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    (cherry picked from commit 41d5112407d7426d75671ac6967e62b080f63857)

commit ee89de1fac9b515ba7b78459fae124147cbef3c3
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Jun 27 19:33:03 2014 -0700

    regedit: reopen key after editing or removing values
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 5732d3f01284a0080740f1cb69c91cf4893fb401)

commit 894f516a5285144afee8e754211f02d3ca441e08
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Fri Jun 27 18:01:36 2014 -0700

    regedit: reopen parent keys when adding or removing subkeys
    
    This clears any cache associated with the parent key,
    and ensures the changes will be noticed by the UI.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 75045f052a5bc00fc8ffe35514c60e2f1611c9e9)

commit 6d61540ce2eabda842069829ccb90c9e63ade12e
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Thu Jun 26 07:51:22 2014 -0700

    regedit: set cursor after creating a new key
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 2a8beb99a49829adfbad1c887448e3a2caa32255)

commit 36cd9afe81efd96dadb0aba9d3bafb2b766c92c5
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jun 25 22:51:27 2014 -0700

    regedit: set cursor to the parent node when ascending
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit baf491ff0bdb40520d8a093e5c08c8608ed3075a)

commit 92d302f53c0c587e0cd22335d64a87bc5fd4cfbb
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jun 25 22:29:06 2014 -0700

    regedit: don't fail loading keys if just a few are unavailable
    
    Sometimes a key might fail to open due to access restrictions.
    Only report failure if all keys failed to be opened.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit aba2b04b6c5584db63d03adab57fe1fd12ee71b4)

commit d4c1b36ecf58595cab509fc76aa5b9b6405b77e7
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jun 25 21:55:27 2014 -0700

    regedit: include error description in popups
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit df36fe7998fee3fc22976aeb42c25e2a2f0d73c5)

commit 544c4ecc338c8edf85bc4f08b792b70b300a73a9
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jun 25 21:48:52 2014 -0700

    regedit: notify user if there's a failure loading subkeys
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 0b334dd1911206bac633421e1667052200574d29)

commit 4867e76358842dd8e4491339124f92b136438931
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jun 16 17:36:16 2014 -0700

    regedit: handle awkward window sizes better
    
    This fixes some assertion failures and an infinte loop that occurs
    when the terminal window is shrunk down far enough to the point
    regedit can't fit everything on screen.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 55662513e14c026eb4cfa044ed772b31be5d6ab9)

commit 2b74ee037a441086e25104448b447bd61ffe5847
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Sat Jun 14 14:13:10 2014 -0700

    regedit: use talloc typesafety features
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit c85cc6b8360284c64d60ff4d09ca8d5e03188f7b)

commit fe5b9cd7ea72766712ecf048ff9f9184a01dcb25
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed Jun 11 10:40:38 2014 -0700

    regedit: restore list cursor when window is resized
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit d38eba5244d0615994249070adee1f3df4c0d4aa)

commit db7aef6ea228fcd7d4de04218039cd644d04131b
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Tue Jun 10 10:35:19 2014 -0700

    regedit: make value list display data in multiple columns
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit ec6a7a7335f5b9e3a54b9967563ba198fc67b120)

commit 1ca1c74e7a73074137819996435805a570473fbc
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jun 9 18:29:56 2014 -0700

    regedit: add multicolumn list widget
    
    Widget works for lists with one or more column(s).
    Column headers are optional.
    
    As a test, the patch also modifies regedit to use the
    new widget for viewing registry keys. Valuelist still
    needs to be upgraded to use this.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 7ad75367b2a42225a9f3539172e0b0e320d3a517)

commit ca81665a904448c3a2f11fdfd1b35b0311d6afca
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Jun 2 21:50:01 2014 -0700

    regedit: add search feature.
    
    Open up a search input with '/'. 'x' key gets the next
    result.
    
    This patch also ensures that keys are always sorted, so
    that the search order matches the order the keys appear
    on screen.
    
    TODO:
    	+ flesh out search interface
    	+ find previous
    	+ search values
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 0ab07cb8069ae59e45fb0f6016096d30de9b4142)

commit f5ac8ec3841bccf135629f26ba905baef2dc31bc
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Thu May 22 15:23:52 2014 -0700

    regedit: add a color scheme for path and context help sections
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit b8b83509ca080d48530fbde9b012b9c3eb1c42fe)

commit 1ab3b872c04faba894048c66df911b94cdb9960e
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed May 21 17:08:06 2014 -0700

    regedit: sort keys
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit bd8abef327e68cf1c1fc9c2cf6e0b11738971521)

commit 196055da7da440bda1cd6aee6575aa84bca31c73
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Wed May 21 15:03:50 2014 -0700

    regedit: free value list subwindow
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit b5d0eb8ee06908ad8171f71b648c43de6303047b)

commit 93aa3942b71bf3707db6f8f35fab075c43078dc0
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Tue May 20 16:17:42 2014 -0700

    regedit: add borders around key and value lists, and change headings
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit c79837c215de59fa07b665bb79149058f36828d7)

commit bb1b0abfe023b7c5a1a261f96138bbc27561b7f8
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon May 19 17:34:01 2014 -0700

    regedit: add padding for key labels when there's not a prefix.
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit b48f081dc681a0a769165da43668b356c71fdb35)

commit c7802fc5913fa056a8a1d0d12dce1bab1194d9a0
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon May 19 11:08:09 2014 -0700

    regedit: add white on blue color scheme
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 994f1ed301e2023f0e4c8afa7429388ea90362e1)

commit 0288af3f3bcc6efc9edd46e271190cc012eb1ed1
Author: Chris Davis <cd.rattan at gmail.com>
Date:   Mon Aug 4 21:48:04 2014 -0700

    regedit: silence some warnings
    
    Signed-off-by: Chris Davis <cd.rattan at gmail.com>
    Reviewed-by: Andreas Schneider <asn at samba.org>
    Reviewed-by: Michael Adam <obnox at samba.org>
    (cherry picked from commit 7e7c649376bd17c7ac9908bbd0ffc235e7cd18f7)

commit c7ebcd6828d44d99ee9ff9fbf3cf242749249aae
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Oct 1 14:20:10 2014 -0700

    s3: smb2cli: query info return length check was reversed.
    
    Make it identical to the check in libcli/smb/smb2cli_ioctl.c
    
    https://bugzilla.samba.org/show_bug.cgi?id=10848
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: "Stefan (metze) Metzmacher" <metze at samba.org>
    Reviewed-by: David Disseldorp <ddiss at suse.de>
    
    Autobuild-User(master): Jeremy Allison <jra at samba.org>
    Autobuild-Date(master): Thu Oct  2 04:42:26 CEST 2014 on sn-devel-104
    
    (cherry picked from commit 6c05cd3e895831be7d9a68a51de2048d04c188a0)

commit ce0c5f6d11535f5b346fa72581ca716325c4df9a
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Oct 8 15:39:28 2014 +0200

    registry: Don't leave dangling transactions
    
    When a createkey fails due to access denied, we need to do a
    transaction_cancel. Otherwise the lock on the db will stay around.
    
    Signed-off-by: Volker Lendecke <vl at samba.org>
    Reviewed-by: Guenther Deschner <gd at samba.org>
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10860

commit ff9dd6227a867e873cf10080b3668048cd9a3993
Author: Karolin Seeger <kseeger at samba.org>
Date:   Wed Oct 8 20:42:35 2014 +0200

    WHATSNEW: Fix typo.
    
    Thanks to David Keegel <djk at cyber.com.au> for reporting!
    
    Signed-off-by: Karolin Seeger <kseeger at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                        |    2 +-
 lib/socket_wrapper/socket_wrapper.c |    3 +
 libcli/smb/smb2cli_query_info.c     |    2 +-
 source3/registry/reg_api.c          |    2 +-
 source3/utils/regedit.c             |  483 +++++--
 source3/utils/regedit.h             |   18 +-
 source3/utils/regedit_dialog.c      | 2738 ++++++++++++++++++++++++-----------
 source3/utils/regedit_dialog.h      |  204 +++-
 source3/utils/regedit_hexedit.c     |  243 +++-
 source3/utils/regedit_hexedit.h     |   38 +-
 source3/utils/regedit_list.c        |  591 ++++++++
 source3/utils/regedit_list.h        |   82 ++
 source3/utils/regedit_samba3.c      |    4 +-
 source3/utils/regedit_treeview.c    |  552 ++++++--
 source3/utils/regedit_treeview.h    |   29 +-
 source3/utils/regedit_valuelist.c   |  401 ++++--
 source3/utils/regedit_valuelist.h   |   35 +-
 source3/wscript_build               |    2 +-
 18 files changed, 4131 insertions(+), 1298 deletions(-)
 create mode 100644 source3/utils/regedit_list.c
 create mode 100644 source3/utils/regedit_list.h


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 78fc777..aaf17d9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -93,7 +93,7 @@ is no need to start the winbindd binary manually.
 Winbind now requires secured connections
 ========================================
 
-To improve protection against rouge domain controllers we now require
+To improve protection against rogue domain controllers we now require
 that when we connect to an AD DC in our forest, that the connection be
 signed using SMB Signing.  Set 'client signing = off' in the smb.conf
 to disable.
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index afd9343..67303eb 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -3169,6 +3169,8 @@ static int swrap_getsockopt(int s, int level, int optname,
 			*(int *)optval = si->family;
 			return 0;
 #endif /* SO_DOMAIN */
+
+#ifdef SO_PROTOCOL
 		case SO_PROTOCOL:
 			if (optval == NULL || optlen == NULL ||
 			    *optlen < (socklen_t)sizeof(int)) {
@@ -3179,6 +3181,7 @@ static int swrap_getsockopt(int s, int level, int optname,
 			*optlen = sizeof(int);
 			*(int *)optval = si->protocol;
 			return 0;
+#endif /* SO_PROTOCOL */
 		case SO_TYPE:
 			if (optval == NULL || optlen == NULL ||
 			    *optlen < (socklen_t)sizeof(int)) {
diff --git a/libcli/smb/smb2cli_query_info.c b/libcli/smb/smb2cli_query_info.c
index 454f25a..a24844b 100644
--- a/libcli/smb/smb2cli_query_info.c
+++ b/libcli/smb/smb2cli_query_info.c
@@ -154,7 +154,7 @@ static void smb2cli_query_info_done(struct tevent_req *subreq)
 			return;
 		}
 
-		if (output_buffer_length < dyn_len) {
+		if (output_buffer_length > dyn_len) {
 			tevent_req_nterror(
 				req, NT_STATUS_INVALID_NETWORK_RESPONSE);
 			return;
diff --git a/source3/registry/reg_api.c b/source3/registry/reg_api.c
index 47a717b..d1c70ec 100644
--- a/source3/registry/reg_api.c
+++ b/source3/registry/reg_api.c
@@ -634,7 +634,7 @@ WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
 				 key->token))
 	{
 		err = WERR_ACCESS_DENIED;
-		goto done;
+		goto trans_done;
 	}
 
 	/*
diff --git a/source3/utils/regedit.c b/source3/utils/regedit.c
index 21fd257..bff23ec 100644
--- a/source3/utils/regedit.c
+++ b/source3/utils/regedit.c
@@ -25,19 +25,20 @@
 #include "regedit_treeview.h"
 #include "regedit_valuelist.h"
 #include "regedit_dialog.h"
+#include "regedit_list.h"
 #include <ncurses.h>
 #include <menu.h>
 #include <panel.h>
 
 #define KEY_START_X 	0
-#define KEY_START_Y 	3
+#define KEY_START_Y 	1
 #define KEY_WIDTH 	(COLS / 4)
 #define KEY_HEIGHT	(LINES - KEY_START_Y - 2)
 #define VAL_START_X 	KEY_WIDTH
-#define VAL_START_Y 	3
+#define VAL_START_Y 	1
 #define VAL_WIDTH 	(COLS - KEY_WIDTH)
 #define VAL_HEIGHT	(LINES - VAL_START_Y - 2)
-#define HEADING_START_Y	(KEY_START_Y - 1)
+
 #define HELP1_START_Y	(LINES - 2)
 #define HELP1_START_X	0
 #define HELP1_WIDTH	(LINES)
@@ -51,12 +52,14 @@
 #define PATH_WIDTH_MAX	1024
 
 struct regedit {
+	struct registry_context *registry_context;
 	WINDOW *main_window;
 	WINDOW *path_label;
 	size_t path_len;
 	struct value_list *vl;
 	struct tree_view *keys;
 	bool tree_input;
+	struct regedit_search_opts active_search;
 };
 
 static struct regedit *regedit_main = NULL;
@@ -73,6 +76,8 @@ static void show_path(struct regedit *regedit)
 	}
 	copywin(regedit->path_label, regedit->main_window, 0, start_pad,
 		PATH_START_Y, start_win, PATH_START_Y, PATH_MAX_Y, false);
+
+	mvchgat(0, 0, COLS, A_BOLD, PAIR_YELLOW_CYAN, NULL);
 }
 
 static void print_path(struct regedit *regedit, struct tree_node *node)
@@ -81,53 +86,6 @@ static void print_path(struct regedit *regedit, struct tree_node *node)
 	show_path(regedit);
 }
 
-/* load all available hives */
-static struct tree_node *load_hives(TALLOC_CTX *mem_ctx,
-				    struct registry_context *ctx)
-{
-	const char *hives[] = {
-		"HKEY_CLASSES_ROOT",
-		"HKEY_CURRENT_USER",
-		"HKEY_LOCAL_MACHINE",
-		"HKEY_PERFORMANCE_DATA",
-		"HKEY_USERS",
-		"HKEY_CURRENT_CONFIG",
-		"HKEY_DYN_DATA",
-		"HKEY_PERFORMANCE_TEXT",
-		"HKEY_PERFORMANCE_NLSTEXT",
-		NULL
-	};
-	struct tree_node *root, *prev, *node;
-	struct registry_key *key;
-	WERROR rv;
-	size_t i;
-
-	root = NULL;
-	prev = NULL;
-
-	for (i = 0; hives[i] != NULL; ++i) {
-		rv = reg_get_predefined_key_by_name(ctx, hives[i], &key);
-		if (!W_ERROR_IS_OK(rv)) {
-			continue;
-		}
-
-		node = tree_node_new(mem_ctx, NULL, hives[i], key);
-		if (node == NULL) {
-			return NULL;
-		}
-
-		if (root == NULL) {
-			root = node;
-		}
-		if (prev) {
-			tree_node_append(prev, node);
-		}
-		prev = node;
-	}
-
-	return root;
-}
-
 static void print_help(struct regedit *regedit)
 {
 	const char *khelp = "[n] New Key [s] New Subkey [d] Del Key "
@@ -136,8 +94,9 @@ static void print_help(struct regedit *regedit)
 			    "[b] Edit binary";
 	const char *msg = "KEYS";
 	const char *help = khelp;
-	const char *genhelp = "[TAB] Switch sections [q] Quit regedit "
-			      "[UP] List up [DOWN] List down";
+	const char *genhelp = "[TAB] Switch sections [q] Quit "
+			      "[UP] List up [DOWN] List down "
+			      "[/] Search [x] Next";
 	int i, pad;
 
 	if (!regedit->tree_input) {
@@ -147,15 +106,16 @@ static void print_help(struct regedit *regedit)
 
 	move(HELP1_START_Y, HELP1_START_X);
 	clrtoeol();
-	attron(A_REVERSE);
+	attron(COLOR_PAIR(PAIR_BLACK_CYAN));
 	mvaddstr(HELP1_START_Y, HELP1_START_X, help);
 	pad = COLS - strlen(msg) - strlen(help);
 	for (i = 0; i < pad; ++i) {
 		addch(' ');
 	}
-	attron(A_BOLD);
+	attroff(COLOR_PAIR(PAIR_BLACK_CYAN));
+	attron(COLOR_PAIR(PAIR_YELLOW_CYAN) | A_BOLD);
 	addstr(msg);
-	attroff(A_REVERSE | A_BOLD);
+	attroff(COLOR_PAIR(PAIR_YELLOW_CYAN) | A_BOLD);
 
 	move(HELP2_START_Y, HELP2_START_X);
 	clrtoeol();
@@ -164,24 +124,13 @@ static void print_help(struct regedit *regedit)
 
 static void print_heading(struct regedit *regedit)
 {
-	move(HEADING_START_Y, 0);
-	clrtoeol();
-
 	if (regedit->tree_input) {
-		attron(A_REVERSE);
-	} else {
-		attroff(A_REVERSE);
-	}
-	mvprintw(HEADING_START_Y, KEY_START_X, "Key");
-	attroff(A_REVERSE);
-
-	if (!regedit->tree_input) {
-		attron(A_REVERSE);
+		tree_view_set_selected(regedit->keys, true);
+		value_list_set_selected(regedit->vl, false);
 	} else {
-		attroff(A_REVERSE);
+		tree_view_set_selected(regedit->keys, false);
+		value_list_set_selected(regedit->vl, true);
 	}
-	mvprintw(HEADING_START_Y, VAL_START_X, "Value");
-	attroff(A_REVERSE);
 
 	print_help(regedit);
 }
@@ -190,17 +139,17 @@ static void load_values(struct regedit *regedit)
 {
 	struct tree_node *node;
 
-	node = item_userptr(current_item(regedit->keys->menu));
+	node = tree_view_get_current_node(regedit->keys);
 	value_list_load(regedit->vl, node->key);
 }
 
 static void add_reg_key(struct regedit *regedit, struct tree_node *node,
 			bool subkey)
 {
-	char *name;
+	const char *name;
 	const char *msg;
 
-	if (!subkey && !node->parent) {
+	if (!subkey && tree_node_is_top_level(node)) {
 		return;
 	}
 
@@ -234,69 +183,262 @@ static void add_reg_key(struct regedit *regedit, struct tree_node *node,
 				new_node = tree_node_new(parent, parent,
 							 name, new_key);
 				SMB_ASSERT(new_node);
-				tree_node_append_last(list, new_node);
+				tree_node_insert_sorted(list, new_node);
+			} else {
+				/* Reopen the parent key to make sure the
+				   new subkey will be noticed. */
+				tree_node_reopen_key(regedit->registry_context,
+						     parent);
 			}
 
 			list = tree_node_first(node);
 			tree_view_clear(regedit->keys);
 			tree_view_update(regedit->keys, list);
+			if (!subkey) {
+				node = new_node;
+			}
+			tree_view_set_current_node(regedit->keys, node);
+			load_values(regedit);
 		} else {
+			msg = get_friendly_werror_msg(rv);
 			dialog_notice(regedit, DIA_ALERT, "New Key",
-				      "Failed to create key.");
+				      "Failed to create key: %s", msg);
 		}
-		talloc_free(name);
+		talloc_free(discard_const(name));
 	}
 }
 
+enum search_flags {
+	SEARCH_NEXT = (1<<0),
+	SEARCH_PREV = (1<<1),
+	SEARCH_REPEAT = (1<<2)
+};
+static WERROR regedit_search(struct regedit *regedit, struct tree_node *node,
+			     struct value_item *vitem, unsigned flags)
+{
+	struct regedit_search_opts *opts;
+	struct tree_node *found;
+	struct value_item *found_value;
+	bool search_key, need_sync;
+	char *save_value_name;
+	WERROR rv;
+	bool (*iterate)(struct tree_node **, bool, WERROR *);
+	struct value_item *(*find_item)(struct value_list *,
+				        struct value_item *,
+				        const char *,
+				        regedit_search_match_fn_t);
+
+	opts = &regedit->active_search;
+
+	if (!opts->query || !opts->match) {
+		return WERR_OK;
+	}
+
+	SMB_ASSERT(opts->search_key || opts->search_value);
+
+	rv = WERR_OK;
+	found = NULL;
+	found_value = NULL;
+	save_value_name = NULL;
+	search_key = opts->search_key;
+	need_sync = false;
+	iterate = tree_node_next;
+	find_item = value_list_find_next_item;
+
+	if (flags & SEARCH_PREV) {
+		iterate = tree_node_prev;
+		find_item = value_list_find_prev_item;
+	}
+
+	if (opts->search_value) {
+		struct value_item *it;
+
+		it = value_list_get_current_item(regedit->vl);
+		if (it) {
+			save_value_name = talloc_strdup(regedit,
+							it->value_name);
+			if (save_value_name == NULL) {
+				return WERR_NOMEM;
+			}
+		}
+
+		if (vitem) {
+			search_key = false;
+		}
+	}
+
+	if (!vitem && (flags & SEARCH_REPEAT)) {
+		if (opts->search_value) {
+			search_key = false;
+		} else if (!iterate(&node, opts->search_recursive, &rv)) {
+			beep();
+			return rv;
+		}
+	}
+
+	do {
+		if (search_key) {
+			SMB_ASSERT(opts->search_key == true);
+			if (opts->match(node->name, opts->query)) {
+				found = node;
+			} else if (opts->search_value) {
+				search_key = false;
+			}
+		}
+		if (!search_key) {
+			SMB_ASSERT(opts->search_value == true);
+			if (!vitem) {
+				rv = value_list_load_quick(regedit->vl,
+							   node->key);
+				if (!W_ERROR_IS_OK(rv)) {
+					goto out;
+				}
+				need_sync = true;
+			}
+			found_value = find_item(regedit->vl, vitem, opts->query,
+						opts->match);
+			if (found_value) {
+				found = node;
+			} else {
+				vitem = NULL;
+				search_key = opts->search_key;
+			}
+		}
+	} while (!found && iterate(&node, opts->search_recursive, &rv));
+
+	if (!W_ERROR_IS_OK(rv)) {
+		goto out;
+	}
+
+	if (found) {
+		/* Put the cursor on the node that was found */
+		if (!tree_view_is_node_visible(regedit->keys, found)) {
+			tree_view_update(regedit->keys,
+					 tree_node_first(found));
+			print_path(regedit, found);
+		}
+		tree_view_set_current_node(regedit->keys, found);
+		if (found_value) {
+			if (need_sync) {
+				value_list_sync(regedit->vl);
+			}
+			value_list_set_current_item(regedit->vl, found_value);
+			regedit->tree_input = false;
+		} else {
+			load_values(regedit);
+			regedit->tree_input = true;
+		}
+		tree_view_show(regedit->keys);
+		value_list_show(regedit->vl);
+		print_heading(regedit);
+	} else {
+		if (need_sync) {
+			load_values(regedit);
+			value_list_set_current_item_by_name(regedit->vl,
+							    save_value_name);
+		}
+		beep();
+	}
+
+out:
+	talloc_free(save_value_name);
+
+	return rv;
+}
+
+static void regedit_search_repeat(struct regedit *regedit, unsigned flags)
+{
+	struct tree_node *node;
+	struct value_item *vitem;
+	struct regedit_search_opts *opts;
+
+	opts = &regedit->active_search;
+	if (opts->query == NULL) {
+		return;
+	}
+
+	node = tree_view_get_current_node(regedit->keys);
+	vitem = NULL;
+	if (opts->search_value && !regedit->tree_input) {
+		vitem = value_list_get_current_item(regedit->vl);
+	}
+	regedit_search(regedit, node, vitem, flags | SEARCH_REPEAT);
+}
+
 static void handle_tree_input(struct regedit *regedit, int c)
 {
 	struct tree_node *node;
 
 	switch (c) {
 	case KEY_DOWN:
-		menu_driver(regedit->keys->menu, REQ_DOWN_ITEM);
+		tree_view_driver(regedit->keys, ML_CURSOR_DOWN);
 		load_values(regedit);
 		break;
 	case KEY_UP:
-		menu_driver(regedit->keys->menu, REQ_UP_ITEM);
+		tree_view_driver(regedit->keys, ML_CURSOR_UP);
+		load_values(regedit);
+		break;
+	case KEY_NPAGE:
+		tree_view_driver(regedit->keys, ML_CURSOR_PGDN);
+		load_values(regedit);
+		break;
+	case KEY_PPAGE:
+		tree_view_driver(regedit->keys, ML_CURSOR_PGUP);
+		load_values(regedit);
+		break;
+	case KEY_HOME:
+		tree_view_driver(regedit->keys, ML_CURSOR_HOME);
+		load_values(regedit);
+		break;
+	case KEY_END:
+		tree_view_driver(regedit->keys, ML_CURSOR_END);
 		load_values(regedit);
 		break;
 	case '\n':
 	case KEY_ENTER:
 	case KEY_RIGHT:
-		node = item_userptr(current_item(regedit->keys->menu));
+		node = tree_view_get_current_node(regedit->keys);
 		if (node && tree_node_has_children(node)) {
-			tree_node_load_children(node);
-			print_path(regedit, node->child_head);
-			tree_view_update(regedit->keys, node->child_head);
-			value_list_load(regedit->vl, node->child_head->key);
+			WERROR rv;
+
+			rv = tree_node_load_children(node);
+			if (W_ERROR_IS_OK(rv)) {
+				print_path(regedit, node->child_head);
+				tree_view_update(regedit->keys, node->child_head);
+				value_list_load(regedit->vl, node->child_head->key);
+			} else {
+				const char *msg = get_friendly_werror_msg(rv);
+				dialog_notice(regedit, DIA_ALERT, "Loading Subkeys",
+					      "Failed to load subkeys: %s", msg);
+			}
 		}
 		break;
 	case KEY_LEFT:
-		node = item_userptr(current_item(regedit->keys->menu));
-		if (node && node->parent) {
+		node = tree_view_get_current_node(regedit->keys);
+		if (node && !tree_node_is_top_level(node)) {
 			print_path(regedit, node->parent);
-			node = tree_node_first(node->parent);
-			tree_view_update(regedit->keys, node);


-- 
Samba Shared Repository


More information about the samba-cvs mailing list