Commit Graph

832 Commits (006141b911f7d4c4fcff93eaa7f0534015e21eaa)

Author SHA1 Message Date
Tim Stack 1850c4f678 Merge pull request #318 from sureshsundriyal/db-attach
[secure-mode] Prevent users from attaching db files.
9 years ago
Timothy Stack 5ea5504aec [time] fix time rollover for days
Fixes #304
9 years ago
Suresh Sundriyal a13047a9ed [secure-mode] Check to see if URIs are enabled.
Check to see if URIs are enabled or not before continuing on with the
file uri checks.
9 years ago
Timothy Stack a4deaa1e8b [spectro] log_time must be in ascending order 9 years ago
Suresh Sundriyal 1e6878164f [secure-mode] Refactoring and check for sqlite version.
'mode=memory' query parameter is only supported from sqlite3 version
3.8.0 onwards. Make sure to check for the version before continuing with
the 'ATTACH' statement.

Turning off some of the tests, since they fail on the Travis CI setup
which uses sqlite version 3.6.0.
9 years ago
Suresh Sundriyal e6c87678e9 [secure-mode] Prevent users from attaching db files.
Prevent the users from attaching an external db file which they may not
have ownership of.

The current authorizer method is hooked in only when the LNAVSECURE
variable is set. This is done deliberately, since the method will be
called on every sqlite query and I did not want to incur a performance
hit.

If the scope of this authorizer increases, we should consider passing in
the lnav_data as pUserData and do the checks inside the authorizer
itself.
9 years ago
Timothy Stack 834fea5f73 oops, left debugging stuff in 9 years ago
Timothy Stack 82f970c09e [config] add a config option to control A_DIM for text
Fixes #298
9 years ago
Timothy Stack 3167302722 [data-parser] fix some issues with parsing hierarchical data and improve the debugger 9 years ago
Timothy Stack 1477c2ae51 [text-view] swap the rotation of f/F to something more natural 9 years ago
Suresh Sundriyal e4ef35e652 [commands] Remove eval from the list of sandboxed commands. 9 years ago
Suresh Sundriyal 88833c8035 [commands] Read and honor the 'LNAVSECURE' environment variable.
Read the value of the 'LNAVSECURE' environment variable upfront and
store it in the lnav_data structure. When this variable is set prior to
the binary execution, the following commands are disabled:

* 'open'
* 'pipe-to'
* 'pipe-line-to'
* 'write-*-to'

This is a proposed fix for tstack/lnav#305.
9 years ago
Timothy Stack 54b9c5ebf5 [parser] handle empty groups 9 years ago
Timothy Stack 2b76181fd6 [parser] try to handle apostrophes better 9 years ago
Timothy Stack a8cd28097b [spectro] add some better error messages for the spectrogram command and fix some vtable glitches 9 years ago
Timothy Stack efc74a5a0e [docs] some minor doc updates 9 years ago
Timothy Stack 96191badf3 [release] update versions for release and fix some time issues 9 years ago
Timothy Stack cbe3541366 [spectro] add tab-completion for DB column names 9 years ago
Timothy Stack 3dcc59c405 [build] missing include 9 years ago
Timothy Stack cc16c9a214 [build] fix attempt #2 9 years ago
Timothy Stack fbae8a4b18 try to fix a build issue 9 years ago
Timothy Stack 4f05af6408 [time] add support for TAI64N timestamps
Fixes #300
9 years ago
Timothy Stack 9c364bf48e [spectro] add spectro view support for sql results 9 years ago
Timothy Stack cad311f557 [views] do auto-scroll-down for all views 9 years ago
Timothy Stack afc8cc44b6 [json-format] support integer values for log levels in json formats 9 years ago
Timothy Stack acd8e24943 add '/min' to the error rate display 9 years ago
Timothy Stack fc637ab6dc [doc] some more error rate explanation and other minor tweaks 9 years ago
Timothy Stack 7a6429519f [summary-line] change error count to error rate and do some cleanup on message levels 9 years ago
Timothy Stack 13c90726a2 [tests] some more testing and stats for logfiles 9 years ago
Timothy Stack 99eb3a54f3 [spectro] support marking lines in a bucket 9 years ago
Timothy Stack 7f6b352143 set file size for gzip files 9 years ago
Timothy Stack e8f400abfa [logfile] truncation detection was not taking into account compressed files 9 years ago
Timothy Stack 619076d89c no, we don't want to scroll... 9 years ago
Timothy Stack 0e2d204be4 missed a new file in the makefile 9 years ago
Timothy Stack 1d9c403053 missing include 9 years ago
Timothy Stack fdc2748e3e [spectro] add a spectrogram view that works with known message fields 9 years ago
Timothy Stack 7c74ecf1e7 [logview] add a "time span" section to the summary and right justify the summary 9 years ago
Timothy Stack ff35d811e2 [logview] more summary line tweaks 9 years ago
Timothy Stack 062cc63037 missed checking for an empty view stack 9 years ago
Timothy Stack fe05fcc077 scroll if there's one blank row in the log view 9 years ago
Timothy Stack 80e5e8fcce [logview] add a line with summary information to the log view 9 years ago
Timothy Stack 8de5d3b749 [logfile] add more options when opening files 9 years ago
Timothy Stack 9ba690e041 [readline] change the break chars for the SQL context 9 years ago
Timothy Stack 2b2e1c0af9 [sql] add parens to function complete values and do not open empty output files from scripts 9 years ago
Timothy Stack 4b318e45e0 [parser] some more parser tweaking and fix a jget() issue 9 years ago
Timothy Stack 36c9c63966 [logview] some cleanup of the field overlay 9 years ago
Timothy Stack 2d04d047e4 [sql] change extract() to regexp_match() and make extract() an interface to the data_parser 9 years ago
Timothy Stack d4a69cbf22 no joy
Revert "[sql] change extract() to regexp_match() and make extract() an interface to the data_parser"

This reverts commit 85eee6514b.
9 years ago
Timothy Stack 85eee6514b [sql] change extract() to regexp_match() and make extract() an interface to the data_parser 9 years ago
Timothy Stack 0f67f8d1f0 [logfile] multiline out-of-time-order messages were not being updated completely
Defect Number:
    Reviewed By:
   Testing Done:
9 years ago
Timothy Stack 9feb53f02a [sql] add extract() function to extract values from a string using a regex
This function should be preferred over creating log search tables
for scripts.
9 years ago
Timothy Stack 9213a6b58b [out-of-order] some more tweaks for out-of-order 9 years ago
Timothy Stack cdd43549ab [cmds] automatically capture echo/write output from scripts so they can generate reports
Add another example script, dhclient-summary.

Add a 'search-table' section to formats so you can automatically
define a search-based table.
9 years ago
Timothy Stack f81d4aefd8 [logview] some more work on highlighting out-of-time-order messages 9 years ago
Timothy Stack 61b2403a64 some cleanup 9 years ago
Timothy Stack 27a326ae20 [build] try to silence some warnings 9 years ago
Timothy Stack 3ef38c1250 missed some checks for an empty view stack 9 years ago
Timothy Stack 3523526174 [statusview] check for a status source during update since this is reachable through callbacks 9 years ago
Timothy Stack 0f33256482 [debug] cleanup some logging and use the original time from out-of-order json logs 9 years ago
Timothy Stack fd98fadc7e [yajlpp] fix a bug with child handlers 9 years ago
Timothy Stack 53e2d92eef [ui] highlight out-of-time-order messages in yellow with an underline 9 years ago
Timothy Stack 32f022a333 don't use children for now 9 years ago
Timothy Stack 757f460c0a missed algorithm header too 9 years ago
Timothy Stack 9523f983aa build fix 9 years ago
Timothy Stack d12fe9e0a9 [json] add some schema validation code 9 years ago
Timothy Stack 33682de936 [status] always check the width and trigger a window_change if it is different from the last draw
Fixes #293
9 years ago
Timothy Stack 89be76ef42 [filters] clear the state for filters that have been deleted
Fixes #292
9 years ago
Timothy Stack fb7225ed3f add a time format 9 years ago
Justin Berger 2aa26082f8 Added O_TRUNC flag so new format installation doesn't result in trailing garbage message 9 years ago
Timothy Stack a2b381ca19 [config] initial impl with clock-format as the only option at the moment 9 years ago
Timothy Stack c96ab11d0f [scanner] tweak to the time scanner 9 years ago
Timothy Stack e5f786bc2c [script] add metadata to script files 9 years ago
Timothy Stack ab62d27757 [cmd] replace wordexp with shlex 9 years ago
Timothy Stack 16e988d132 [shlex] add a readline highlighter for shlex 9 years ago
Timothy Stack 6e196bff79 [line_buffer] clear cached data when doing a read 9 years ago
Timothy Stack 87b07a0087 [sql] allow log_part to be updated 9 years ago
Timothy Stack 84c157d543 [build] more build 9 years ago
Timothy Stack cedd89d9b6 [build] try to fix some warnings and debug breakage 9 years ago
Timothy Stack e07b4e448f [exec] add a prompt to execute lnav scripts 9 years ago
Timothy Stack c4ae8d158c [fmt] minor fix for the generic_log format and add another pattern to vmw_log 9 years ago
Timothy Stack feab733742 [cmd] add reltime possibilities for some commands 9 years ago
Timothy Stack 27f300b677 [sql] some more json-related updates/fixes 9 years ago
Timothy Stack 187d62334f [json] record the type of json data in json_ptr_walk 9 years ago
Timothy Stack e987a5164f [hist] rewrite the histogram code 9 years ago
Timothy Stack 224a7196e4 [cmd] hide lines commands 9 years ago
Timothy Stack aa0999bd0e [opid] missed adding opid to the json log and some other bug fixes
Defect Number:
    Reviewed By:
   Testing Done:
9 years ago
Timothy Stack d1bbc433b7 [view] start to refactor the bar chart code 9 years ago
Timothy Stack 7c92d16297 [sql] add an overlay showing the values in json columns 9 years ago
Timothy Stack e5a32362e0 build fix 9 years ago
Timothy Stack 7489dd514c [sql] graph columns that contain json objects 9 years ago
Timothy Stack f3ca72f42d [jget] fix the jget function 9 years ago
Timothy Stack b6e10f4ee4 bump the max line size to try and solve some json log issues 9 years ago
Timothy Stack 5a718bc0ec [sql] missed checking for null in graphable columns 9 years ago
Timothy Stack 62075fb340 [sql] add json_group_object aggregate function 9 years ago
Timothy Stack 4eb797ce9a [hist] start to replace the old hist_source class 9 years ago
Timothy Stack 8964232374 [json] fixes for json log parsing
I was careless with the initial json log impl since it did not deal
with incomplete log lines very well.  This seems to fix some cases.
But, I was still able to replicate a lockup at one point, so it
might not be complete.
9 years ago
Timothy Stack 64cbab1281 [sql] exec .sql files in format dirs 9 years ago
Timothy Stack 91406be91e [nav] add "opid" support with a hotkey 9 years ago
Timothy Stack 885f65f402 [fmt] add an ELB format 9 years ago
Timothy Stack 3c9ba126a9 [glob] ignore files picked up by a glob that are not readable 9 years ago
Timothy Stack ff929391f3 need to fflush(stdout) to get the mouse working again 9 years ago
Timothy Stack e799638889 missed flushing the stream when setting the term title, it could cause some screen corruption 9 years ago
Timothy Stack 6cb42fc690 the log_search table regex should be case-insensitive 9 years ago
Timothy Stack 0c3a303066 set 'level' as the default name for the level field 9 years ago
Timothy Stack 0237aaad21 [release] update the release Makefile 9 years ago
Timothy Stack dfb009595b [loader] prefer user-provided formats when breaking a cycle 9 years ago
Timothy Stack 4f775dc1ae [pt] don't poll if max time is set 9 years ago
Timothy Stack f11cca2366 [sql] add a timeslice() function 9 years ago
Timothy Stack 99d103cd58 [logline] add a log_msg_instance column to the table 9 years ago
Timothy Stack 9c23431779 [all_logs] add a .msgformats SQL command 9 years ago
Timothy Stack ecd3eb05bc [coverity] next set of fixes 9 years ago
Timothy Stack 69e927e91b [coverity] some more fixes 9 years ago
Timothy Stack d298f45fe0 some coverity fixes 9 years ago
Timothy Stack c3a26ceb6f fix some copy pasta in pt-time commands 9 years ago
Timothy Stack 4f32bddd93 [pt] allow relative times for papertrail time bounds 9 years ago
Timothy Stack ec473edc85 [cmd] add support for times in goto 9 years ago
Timothy Stack 7407fd429d user alerter instead of flash() 9 years ago
Timothy Stack 4422e9d82b [curl] use ssh-agent for auth 9 years ago
Timothy Stack 3c0d78d28e [sql] fix spurious loading bar flash while searching 9 years ago
Timothy Stack 399c78d86d [pretty] pretty-print the contents of strings
Fixes #250
9 years ago
Timothy Stack 443053da62 [all_logs] add log_msg_schema hidden column to the all_logs table and refine the msg format 9 years ago
Timothy Stack e95bd90dfc [filter] check for too many filters being created 9 years ago
Timothy Stack 0fee92b08f add 're-' prefix to data_scanner 9 years ago
Timothy Stack feaff13b13 [data_parser] some fixes for the debugger and some parsing improvements 9 years ago
Timothy Stack a6ffff5126 don't restore time-offset mode since people might not know how to turn it off 9 years ago
Timothy Stack 25a375f08d [misc] fix various bugs 9 years ago
Timothy Stack 6ce2d9e6a1 [pt] write out the error message for a request 9 years ago
Timothy Stack 0d37a8c142 [text] pretty-printing should work in the text view 9 years ago
Timothy Stack b4cb092ce1 [view] stop scrolling to the right when the end is reached
Fixes #84
9 years ago
Timothy Stack 87cfe63613 fix an issue with module formats 9 years ago
Timothy Stack 5bb0599d7e [fmt] add a sudo_log format 9 years ago
Timothy Stack bedae8c8c2 [fmt] install/update formats from git repos
Fixes #244
9 years ago
Timothy Stack 9139e6de5b [search-table] guess the column types based on the regex 9 years ago
Timothy Stack 2b5447f59c [sql] add a log_search table 9 years ago
Timothy Stack 6f26aa7f3e [sql] multiline text was not returned correctly 9 years ago
Timothy Stack b76b6175c6 build fix 9 years ago
Timothy Stack cd0145a49d build fix 9 years ago
Timothy Stack 83b92c3b65 [papertrail] add support for time ranges 9 years ago
Timothy Stack 9df95b33e1 build fix 9 years ago
Timothy Stack cc5e70fb30 [cmd] add help to the command prompt 9 years ago
Timothy Stack e9a96caf09 [papertrail] use the curl_looper 9 years ago
Timothy Stack 9555ad911a more build fixes 9 years ago
Timothy Stack 4f52a5ea5c build fix 9 years ago
Timothy Stack f286950854 [curl] add a curl looper to handle url requests 9 years ago
Timothy Stack b7d7fe70c7 [pretty] remove extraneous newline 9 years ago
Timothy Stack 82574e2e27 [line_buffer] missed invalidating a sb ref 9 years ago
Timothy Stack fa89ecc5e5 redo the search in the pretty view
Fixes #245
9 years ago
Timothy Stack d616509958 build fix 9 years ago
Timothy Stack d2d8c75135 [sql] add an lnav_views table 9 years ago
Timothy Stack 9496a960f6 [check] print the partial match of non-matching lines when checking a log file 9 years ago