diff --git a/utils/cranspasswords b/utils/cranspasswords index aaaf5caa..4a13e2c7 100755 --- a/utils/cranspasswords +++ b/utils/cranspasswords @@ -86,6 +86,12 @@ function chiffre () { [[ "$#" == "0" ]] && ssh ${SRV} "sudo sh -c \"cat > ${REP}/${CHOIX}.asc\"" < ${TMP}.asc || echo -e "\033[1;31mErreur, abandon...\033[1;0m" } +function droits () { + # modifie les droits du fichier chiffré + echo -e "\033[1;34mChangement des droits sur le fichier\033[1;0m" + ssh ${SRV} "sudo sh -c \"chmod 600 ${REP}/${CHOIX}.asc\"" +} + function edite () { # édite le fichier temporaire $EDITOR ${TMP} @@ -125,6 +131,7 @@ if [[ "$ACTION" == "--re-encrypt-all" ]] ; then echo dechiffre chiffre + droits rm -f ${TMP} ${TMP}.asc echo done @@ -133,6 +140,7 @@ elif [[ "$ACTION" == "--edit" ]] ; then dechiffre edite chiffre + droits elif [[ "$ACTION" == "--remove" ]] ; then choix supprime