summaryrefslogtreecommitdiffstats
path: root/source3/utils
Commit message (Collapse)AuthorAgeFilesLines
* s3-smbstatus: Fix exit code of profile output.Andreas Schneider2014-11-241-2/+5
| | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=10961 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Nov 24 21:13:51 CET 2014 on sn-devel-104
* s3:smbprofile: rewrite the internal macrosStefan Metzmacher2014-11-191-711/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now autogenerate a lot of code using SMBPROFILE_STATS_ALL_SECTIONS macro which expands to different SMBPROFILE_STATS_{COUNT,BASIC,BYTES,IOBYTES} macros. This also allows async profiling using: struct mystate { ... SMBPROFILE_BASIC_ASYNC_STATE(profile_state); ... }; ... SMBPROFILE_BASIC_ASYNC_START(SMB2_negotiate, profile_p, mystate->profile_state); ... SMBPROFILE_BYTES_ASYNC_SET_IDLE(mystate->profile_state); ... SMBPROFILE_BYTES_ASYNC_SET_BUSY(mystate->profile_state); ... SMBPROFILE_BASIC_ASYNC_END(mystate->profile_state); The current START_PROFILE*()/END_PROFILE*() are implemented as legacy wrappers. Signed-off-by: Stefan Metzmacher <metze@samba.org>
* s3:smbprofile: Make "status_profile.h" a proper headerVolker Lendecke2014-11-194-6/+31
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbd: improve writecache profilingStefan Metzmacher2014-11-191-28/+30
| | | | | | | | | | | | | | | | | In order to have useful profiling counters should never be decremented. We need a separate counter for deallocation events. The current value can be calculated by allocations - deallocations. We also use better names and avoid having an array for the flush reasons. This will simplify further profiling improvements a lot. The value writecache_num_write_caches (this was similar to writecache_allocations) is replaced by writecache_cached_writes, which counts the amount of writes which were completely handled by the cache. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbprofile: remove unused nmbd related countersStefan Metzmacher2014-11-191-73/+0
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:smbstatus: fix return value in print_share_mode()Stefan Metzmacher2014-11-071-1/+1
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* smbcontrol: Use server_id_str_bufVolker Lendecke2014-11-051-11/+8
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Wed Nov 5 13:03:39 CET 2014 on sn-devel-104
* smbstatus: check for lock_path talloc failuresDavid Disseldorp2014-11-041-4/+21
| | | | | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Nov 4 02:07:35 CET 2014 on sn-devel-104
* smbcontrol: don't leak state_path onto talloc tosDavid Disseldorp2014-11-031-4/+20
| | | | | | | Also check for allocation failures. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net_registry: don't leak state_path onto talloc tosDavid Disseldorp2014-11-031-5/+12
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* net_idmap: don't leak state_path onto talloc tosDavid Disseldorp2014-11-031-7/+17
| | | | | | | | net_idmap currently uses a net_idmap_dbfile() helper to return the idmap backed specific db path. Fix leaks in all callers. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s3:locking: allow early return for share_entry_forall()Volker Lendecke2014-10-311-5/+7
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3:locking: Rename share_mode_forall->share_entry_forallVolker Lendecke2014-10-311-1/+1
| | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* nbt-cli: display all known NBT_SERVER flags.Günther Deschner2014-10-241-2/+6
| | | | | | | Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* ntlm_auth: Allow the --option parameter to work against ntlm_authAndrew Bartlett2014-10-171-0/+1
| | | | | | | | | Change-Id: Iee386624359c2bf8437719f286e306cdfbb628c6 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Oct 17 15:20:59 CEST 2014 on sn-devel-104
* ntlm_auth: Allow us to use kerberos when we are an AD DCAndrew Bartlett2014-10-171-1/+1
| | | | | | Change-Id: I88caff9ded915d914cb7fda8829ccbcd3ad64af1 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s3-net: display full value of "msDS-SupportedEncryptionTypes".Günther Deschner2014-10-081-4/+3
| | | | | | | | | | Guenther Signed-off-by: Günther Deschner <gd@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Günther Deschner <gd@samba.org> Autobuild-Date(master): Wed Oct 8 18:18:50 CEST 2014 on sn-devel-104
* s3-rpc_client: Adapt cli_rpc_pipe_open_generic_auth to use enum ↵Andrew Bartlett2014-10-081-0/+1
| | | | | | | | | | | credentials_kerberos_state This allows us to pass this value in directly from the cli_credentials structure in winbindd, once we merge this with cli_rpc_pipe_open_spnego(). Andrew Bartlett Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* status: 80 chars per lineVolker Lendecke2014-10-071-367/+734
| | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* gpo: don't leak cache_path onto talloc tosDavid Disseldorp2014-10-061-4/+12
| | | | | | | | Also check for allocation failures. Reported-by: Franz Pförtsch <franz.pfoertsch@brose.com> Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* profiling: Only compile utils/status_profile.c if profiling is enabledVolker Lendecke2014-10-032-21/+33
| | | | | | | | This conditional compile avoids some #ifdef WITH_PROFILE, which makes the code more readable Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* regedit: remove an old commentMichael Adam2014-10-011-2/+0
| | | | | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Wed Oct 1 16:55:05 CEST 2014 on sn-devel-104
* regedit: print error msg if opening registry failsChris Davis2014-10-011-0/+2
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: handle pgup/pgdn/home/end keys on listsChris Davis2014-10-013-4/+97
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: handle del and backspace in hexeditorChris Davis2014-10-013-11/+71
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: grow hexedit buffer as the user typesChris Davis2014-10-012-24/+46
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a button to resize hexedit bufferChris Davis2014-10-012-2/+48
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a number input boxChris Davis2014-10-012-12/+116
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: don't expand single line text field buffer with cursor movementChris Davis2014-10-011-1/+24
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: handle DEL key in text fieldsChris Davis2014-10-011-0/+3
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: adjust some variable names to make them more distinctChris Davis2014-10-011-19/+19
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: find previous itemsChris Davis2014-10-013-8/+62
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: search values and repeat search from cursor positionsChris Davis2014-10-016-83/+265
| | | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: flesh out search dialog and simplify search optsChris Davis2014-10-013-19/+87
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: don't use subwindows in hexeditChris Davis2014-10-013-38/+15
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: use pad as a canvas for dialogsChris Davis2014-10-012-23/+57
| | | | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: clear value list after creating new keyChris Davis2014-10-011-0/+1
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: use the right function to reopen a hiveChris Davis2014-10-013-9/+26
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: move cursor to edited value in list and report edit errorsChris Davis2014-10-015-23/+77
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: Introduce a new API to build the dialogs.Chris Davis2014-10-012-854/+1800
| | | | | | | | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: improvements for hexeditChris Davis2014-10-012-38/+74
| | | | | | | | | This mainly enables setting the hexedit buffer after the editor is allocated. Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add padding to fit REG_MULTI_SZ to the text fieldChris Davis2014-10-011-8/+21
| | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: simplify cleanup after loading childrenChris Davis2014-10-011-8/+3
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a panic handler to restore terminalChris Davis2014-10-011-0/+8
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: make all hives descend from a root nodeChris Davis2014-10-013-77/+79
| | | | | | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: add a refresh command to clear cache and reload current pathChris Davis2014-10-013-15/+104
| | | | | | | This is needed to view changes made externally Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org>
* regedit: reopen key after editing or removing valuesChris Davis2014-10-011-0/+3
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: reopen parent keys when adding or removing subkeysChris Davis2014-10-013-0/+15
| | | | | | | | | 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@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: set cursor after creating a new keyChris Davis2014-10-011-0/+4
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* regedit: set cursor to the parent node when ascendingChris Davis2014-10-011-2/+3
| | | | | | Signed-off-by: Chris Davis <cd.rattan@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>