From b99fabbaf1714d0761c7f2654e1e3fe57dca9f65 Mon Sep 17 00:00:00 2001 From: salles Date: Fri, 17 Mar 2006 13:24:26 +0100 Subject: [PATCH] On met jour aussi les droits sur les fichiers. Dans le cas o ils viendraient tre modifi. (notamment ils sont 644 la cration) darcs-hash:20060317122426-72cb0-a4c7325bc6700c1a9fc10ad0ee7783b3a1e896c2.gz --- utils/cranspasswords | 8 ++++++++ 1 file changed, 8 insertions(+) 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