From 82f7c084cf17fb8bc2b4d489c986e57f986b7a4d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 20 Feb 2014 13:29:07 -0300 Subject: Fix test output at xclip action --- ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index e7f7cf7..71f541d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-02-20 - Silvio Rhatto + + Fix test output at xclip action + 2014-02-20 - 0.3 - Silvio Rhatto Try to find a similar file at keyringer_get_file -- cgit v1.2.3 From a3061e30e6cfaef2bd40afd91866aac0f7062fa8 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 20 Feb 2014 13:41:01 -0300 Subject: Do not use RELATIVE_PATH on git action --- ChangeLog | 2 ++ lib/keyringer/actions/git | 9 +-------- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 71f541d..67b0407 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-02-20 - Silvio Rhatto + Do not use RELATIVE_PATH on git action + Fix test output at xclip action 2014-02-20 - 0.3 - Silvio Rhatto diff --git a/lib/keyringer/actions/git b/lib/keyringer/actions/git index 108ccea..d4e7aa4 100755 --- a/lib/keyringer/actions/git +++ b/lib/keyringer/actions/git @@ -13,12 +13,5 @@ CWD="`pwd`" # Run git command shift -# Set working folder -if [ ! -z "$RELATIVE_PATH" ]; then - WORK="$KEYDIR/$RELATIVE_PATH" -else - WORK="$BASEDIR" -fi - -mkdir -p "$WORK" && cd "$WORK" && git $* +mkdir -p "$BASEDIR" && cd "$BASEDIR" && git $* cd "$CWD" -- cgit v1.2.3 From 324dc0c1433413f739bd64ed7eda0207658bc84f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 20 Feb 2014 13:47:50 -0300 Subject: Fixed secret paths at mv action --- ChangeLog | 4 +++- lib/keyringer/actions/mv | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 67b0407..b753bc7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,10 @@ 2014-02-20 - Silvio Rhatto + Fixed secret paths at mv action + Do not use RELATIVE_PATH on git action - Fix test output at xclip action + Fixed test output at xclip action 2014-02-20 - 0.3 - Silvio Rhatto diff --git a/lib/keyringer/actions/mv b/lib/keyringer/actions/mv index aaf6772..daac7b0 100755 --- a/lib/keyringer/actions/mv +++ b/lib/keyringer/actions/mv @@ -25,4 +25,4 @@ if ! echo "$ORIG" | grep -q '*' && [ ! -e "$KEYDIR/$RELATIVE_PATH/$ORIG" ]; then fi # Run move command -keyringer_exec git "$BASEDIR" mv $ORIG $FILE +keyringer_exec git "$BASEDIR" mv "keys/$RELATIVE_PATH/$ORIG" "keys/$FILE" -- cgit v1.2.3 From 73eda56a8a1c0d2e262bfad5dee96deb7d4bcb62 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 22 Feb 2014 15:50:43 -0300 Subject: Using XA_PRIMARY selection at xclip action --- ChangeLog | 2 ++ lib/keyringer/actions/xclip | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index b753bc7..c9454e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-02-20 - Silvio Rhatto + Using XA_PRIMARY selection at xclip action + Fixed secret paths at mv action Do not use RELATIVE_PATH on git action diff --git a/lib/keyringer/actions/xclip b/lib/keyringer/actions/xclip index 0ce0652..e33c261 100755 --- a/lib/keyringer/actions/xclip +++ b/lib/keyringer/actions/xclip @@ -11,11 +11,13 @@ clip() { # in shell. There must be a better way to deal with this, but because I'm a dolt, # we're going with this for now. - before="$(xclip -o -selection clipboard | base64)" - echo -n "$1" | xclip -selection clipboard + #local xclip="xclip -selection clipboard" + local xclip="xclip" + before="$($xclip -o | base64)" + echo -n "$1" | $xclip ( sleep 45 - now="$(xclip -o -selection clipboard | base64)" + now="$($xclip -o | base64)" if [[ $now != $(echo -n "$1" | base64) ]]; then before="$now" fi @@ -29,7 +31,7 @@ clip() { # so we axe it here: qdbus org.kde.klipper /klipper org.kde.klipper.klipper.clearClipboardHistory &>/dev/null - echo "$before" | base64 -d | xclip -selection clipboard + echo "$before" | base64 -d | $xclip ) & disown echo "Copied $2 to clipboard. Will clear in 45 seconds." } -- cgit v1.2.3 From aa6ce1eafd8a89cea640841f8e0162415859d536 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 23 Feb 2014 11:33:55 -0300 Subject: Added find action into shell completions --- ChangeLog | 4 +++- lib/keyringer/completions/bash/keyringer | 2 +- lib/keyringer/completions/zsh/_keyringer | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index c9454e1..6304d56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -2014-02-20 - Silvio Rhatto +2014-02-23 - Silvio Rhatto + + Added find action into shell completions Using XA_PRIMARY selection at xclip action diff --git a/lib/keyringer/completions/bash/keyringer b/lib/keyringer/completions/bash/keyringer index a640583..0f2cb2b 100644 --- a/lib/keyringer/completions/bash/keyringer +++ b/lib/keyringer/completions/bash/keyringer @@ -94,7 +94,7 @@ _keyringer() { recipients) opts="ls edit" ;; - ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip) + ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip|find) cur="`echo ${cur} | sed -e "s|^/*||"`" # avoid leading slash opts="$(bash -c "set -f && export KEYRINGER_CHECK_VERSION=false && keyringer $instance ls -p -d ${cur}*" 2> /dev/null)" ;; diff --git a/lib/keyringer/completions/zsh/_keyringer b/lib/keyringer/completions/zsh/_keyringer index 1a6d8c6..b4ccdd4 100644 --- a/lib/keyringer/completions/zsh/_keyringer +++ b/lib/keyringer/completions/zsh/_keyringer @@ -50,7 +50,7 @@ _keyringer() { recipients) compadd "$@" ls edit ;; - ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip) + ls|tree|mkdir|encrypt|encrypt-batch|decrypt|edit|append|append-batch|del|rm|recrypt|open|clip|xclip|find) words[4]="`echo $words[4] | sed -e "s|^/*||"`" # avoid leading slash compadd "$@" $(KEYRINGER_CHECK_VERSION=false keyringer $words[2] ls -p -d $words[4]'*' 2> /dev/null) ;; -- cgit v1.2.3 From b160c9b14e035da1dd19df9be1b58c61ceea46ad Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 23 Feb 2014 11:35:41 -0300 Subject: Enhanced secret finder at keyringer_get_file --- ChangeLog | 2 ++ lib/keyringer/functions | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 6304d56..d5c74cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-02-23 - Silvio Rhatto + Enhanced secret finder at keyringer_get_file + Added find action into shell completions Using XA_PRIMARY selection at xclip action diff --git a/lib/keyringer/functions b/lib/keyringer/functions index 014c2c9..475514d 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -413,11 +413,10 @@ function keyringer_get_file { elif [ ! -f "$KEYDIR/$FILE" ]; then # Try to find a similar file count=0 - candidates=(`keyringer_exec find "$BASEDIR" "$1" | grep -e '.asc$'`) + candidates=(`keyringer_exec find "$BASEDIR" | grep -i "$1" | grep -e '.asc$'`) if [ ! -z "$candidates" ]; then - echo "Could not find exact match \"$1\", please chose one" - echo "of the following secrets:" + echo "Could not find exact match \"$1\", please chose one of the following secrets:" echo "" for candidate in ${candidates[@]}; do @@ -426,7 +425,7 @@ function keyringer_get_file { done echo "" - read -p "Enter option: " option + read -p "Enter option (Ctrl-C to abort): " option if [[ "$option" =~ ^[0-9]+$ ]] && [ ! -z "${candidates[$option]}" ]; then FILE="$(keyringer_filename "$RELATIVE_PATH/${candidates[$option]}")" -- cgit v1.2.3 From 43b9567ce09c7c9161b096d9cddac68ec659fa45 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 23 Feb 2014 11:39:02 -0300 Subject: Enhanced secret finder on find action --- ChangeLog | 2 +- lib/keyringer/actions/find | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index d5c74cf..cef7a83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ 2014-02-23 - Silvio Rhatto - Enhanced secret finder at keyringer_get_file + Enhanced secret finder at keyringer_get_file and on find action Added find action into shell completions diff --git a/lib/keyringer/actions/find b/lib/keyringer/actions/find index 21afc7a..9b18d66 100755 --- a/lib/keyringer/actions/find +++ b/lib/keyringer/actions/find @@ -15,5 +15,5 @@ shift ARGS="`echo "$*" | sed -e "s|^/*||"`" # Run find command -cd "$KEYDIR/$RELATIVE_PATH" && find -iname "*$ARGS*" | sed -e 's|^./||g' +cd "$KEYDIR/$RELATIVE_PATH" && find | grep -i "$ARGS" | sed -e 's|^./||g' cd "$CWD" -- cgit v1.2.3 From 6e3b2e49d62ae9418e80fe63e511ef3b8f73acae Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Mon, 24 Feb 2014 20:29:24 -0300 Subject: ChangeLog and TODO update --- ChangeLog | 4 +++- lib/keyringer/actions/canary | 2 +- lib/keyringer/actions/check | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index cef7a83..615902d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ -2014-02-23 - Silvio Rhatto +2014-02-24 - Silvio Rhatto + + Starting to code new actions: check (#39) and canary (#40) Enhanced secret finder at keyringer_get_file and on find action diff --git a/lib/keyringer/actions/canary b/lib/keyringer/actions/canary index a27d562..b00926d 100755 --- a/lib/keyringer/actions/canary +++ b/lib/keyringer/actions/canary @@ -32,7 +32,7 @@ # # How to run: # -# - First, "keyringer preferences edit # basic canary preferences". +# - First, "keyringer preferences edit # basic canary preferences". # # - Then, add the following at your ~/.profile or wherever you want your canary # be called from: "keyringer canary". diff --git a/lib/keyringer/actions/check b/lib/keyringer/actions/check index 14eb30b..098d163 100755 --- a/lib/keyringer/actions/check +++ b/lib/keyringer/actions/check @@ -27,3 +27,4 @@ source "$LIB" || exit 1 # This should be done here: # TODO: Check canaries' timestamps, warning by mail if configured by user preferences. +# TODO: Git maintenance operations. -- cgit v1.2.3 From e33b8aa1d3a8377abccb738b6af163b1881bb708 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 25 Feb 2014 15:56:54 -0300 Subject: Canary will be coded in a separate branch --- ChangeLog | 4 ++-- lib/keyringer/actions/canary | 46 -------------------------------------------- 2 files changed, 2 insertions(+), 48 deletions(-) delete mode 100755 lib/keyringer/actions/canary (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 615902d..dd2dc8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ -2014-02-24 - Silvio Rhatto +2014-02-25 - Silvio Rhatto - Starting to code new actions: check (#39) and canary (#40) + New action: check (#39) Enhanced secret finder at keyringer_get_file and on find action diff --git a/lib/keyringer/actions/canary b/lib/keyringer/actions/canary deleted file mode 100755 index b00926d..0000000 --- a/lib/keyringer/actions/canary +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -# -# Keyringer's canary warrant implementation. -# -# Inspired by: -# -# https://en.wikipedia.org/wiki/Warrant_canary -# http://www.rsync.net/resources/notices/canary.txt -# -# A canary is: -# -# - Generated using any combination of public available RSS -# feeds configured by user preferences. -# -# - Configured to generate new information once a day. -# If you run it more than that interval, no canary will -# be updated. -# -# A canary is stored: -# -# - In a folder called "canaries" followed by the user ID. -# -# - With an addiditonal timestamp stored plain+signed so it -# can be easily checked. -# -# - Can optionally be uploaded (encrypted or plain+signed) to a -# remote url via scp. -# -# - Can optinally be included in another git repository -# (encrypted or plain+signed), commited and pushed -# to a remote repository (ikiwiki instance, etc). -# -# How to run: -# -# - First, "keyringer preferences edit # basic canary preferences". -# -# - Then, add the following at your ~/.profile or wherever you want your canary -# be called from: "keyringer canary". - -# Load functions -LIB="`dirname $0`/../functions" -source "$LIB" || exit 1 - -# TODO: code! -echo "Not implemented :(" -exit 1 -- cgit v1.2.3 From 8498a11b0b94ea07acb5efc991b70f2fbe84b7ba Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 14 Mar 2014 13:24:08 -0300 Subject: ChangeLog update --- ChangeLog | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index dd2dc8d..fd7baca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2014-02-25 - Silvio Rhatto + Try to get an initial recipient (#32) + New action: check (#39) Enhanced secret finder at keyringer_get_file and on find action -- cgit v1.2.3 From 38c1700e6e21d070c39e0e64127995b3246d7460 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 14 Mar 2014 13:25:47 -0300 Subject: Keyringer 0.3.1 --- ChangeLog | 2 +- keyringer | 2 +- share/man/keyringer.1 | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index fd7baca..6730f39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2014-02-25 - Silvio Rhatto +2014-03-14 - 0.3.1 - Silvio Rhatto Try to get an initial recipient (#32) diff --git a/keyringer b/keyringer index a8dd5c7..dd6e828 100755 --- a/keyringer +++ b/keyringer @@ -138,7 +138,7 @@ function keyringer_dispatch { # Config NAME="keyringer" -KEYRINGER_VERSION="0.3" +KEYRINGER_VERSION="0.3.1" CONFIG_VERSION="0.1" CONFIG_BASE="$HOME/.$NAME" CONFIG="$CONFIG_BASE/config" diff --git a/share/man/keyringer.1 b/share/man/keyringer.1 index 8402b9c..9d2eae8 100644 --- a/share/man/keyringer.1 +++ b/share/man/keyringer.1 @@ -70,7 +70,7 @@ Create a directory inside the repository \f[I]keys\f[] folder. .RS .RE .TP -.B :rmdir <\f[I]path\f[]> +.B rmdir <\f[I]path\f[]> Remove an empty folder inside the repository \f[I]keys\f[] folder. .RS .RE @@ -101,6 +101,11 @@ Remove permanently a local copy of a repository, very dangerous if you have just a single copy. .RS .RE +.TP +.B check +Run maintenance checks in a keyring. +.RS +.RE .SH SECRET MANIPULATION ACTIONS .PP All secret manipulation actions operate upon a \f[I]secret\f[] which is -- cgit v1.2.3