Browse Source

Security fix patch. Fix insecure temporary file and directory creations. (CAN-2004-0231)

Andrew V. Samoilov 20 years ago
parent
commit
d65d90116c
7 changed files with 28 additions and 14 deletions
  1. 4 2
      doc/es/mc.1.in
  2. 4 2
      doc/hu/mc.1.in
  3. 4 2
      doc/it/mc.1.in
  4. 4 2
      doc/mc.1.in
  5. 4 2
      doc/pl/mc.1.in
  6. 4 2
      doc/ru/mc.1.in
  7. 4 2
      doc/sr/mc.1.in

+ 4 - 2
doc/es/mc.1.in

@@ -1375,8 +1375,10 @@ A	Vuelca el contenido del archivo seleccionado
 	od -c %f
 
 B	Edita un informe de errores y lo envía al superusuario
-	vi /tmp/mail.$$
-	mail -s "Error Midnight Commander" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Error Midnight Commander" root < $I
+	rm -f $I
 
 M	Lee al correo
 	emacs -f rmail

+ 4 - 2
doc/hu/mc.1.in

@@ -1381,8 +1381,10 @@ A       A kiv
         od -c %f
 
 B       A hiba leírás szerkesztése és elküldése a root-nak
-        vi /tmp/mail.$$
-        mail -s "Midnight Commander bug" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+        vi $I
+        mail -s "Midnight Commander bug" root < $I
+	rm -f $I
 
 M       Levél olvasás
         emacs -f rmail

+ 4 - 2
doc/it/mc.1.in

@@ -1390,8 +1390,10 @@ A	Mostra un dump del file correntemente selezionato
 	od -c %f
 
 B	Modifica un rapporto bachi e lo spedisce a root
-	vi /tmp/mail.$$
-	mail -s "Midnight Commander bug" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Midnight Commander bug" root < $I
+	rm -f $I
 
 M	Legge la posta
 	emacs -f rmail

+ 4 - 2
doc/mc.1.in

@@ -1401,8 +1401,10 @@ A	Dump the currently selected file
 	od -c %f
 
 B	Edit a bug report and send it to root
-	vi /tmp/mail.$$
-	mail -s "Midnight Commander bug" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Midnight Commander bug" root < $I
+	rm -f $I
 
 M	Read mail
 	emacs -f rmail

+ 4 - 2
doc/pl/mc.1.in

@@ -1174,8 +1174,10 @@ A	Wyrzu
 	od -c %f
 
 B	Stwórz raport o błędzie i wyślij do roota.
-	vi ~/tmp/mail.$$
-	mail -s "Błąd Midnight Commandera" root < ~/tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Błąd Midnight Commandera" root < $I
+	rm -f $I
 
 M	Przeczytaj pocztę.
 	emacs -f rmail

+ 4 - 2
doc/ru/mc.1.in

@@ -1563,8 +1563,10 @@ A	Dump the currently selected file
 	od -c %f
 
 B	Edit a bug report and send it to root
-	vi /tmp/mail.$$
-	mail -s "Midnight Commander bug" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Midnight Commander bug" root < $I
+	rm -f $I
 
 M	Read mail
 	emacs -f rmail

+ 4 - 2
doc/sr/mc.1.in

@@ -1383,8 +1383,10 @@ A	
 	od -c %f
 
 B	Уређује пријаву грешке и шаље је администратору
-	vi /tmp/mail.$$
-	mail -s "Грешка у поноћном нареднику" root < /tmp/mail.$$
+	I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+	vi $I
+	mail -s "Грешка у поноћном нареднику" root < $I
+	rm -f $I
 
 M	Чита пошту
 	emacs -f rmail