From 7c2f586e6a3ac220403f2eb7181fbe5886d2e57b Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Thu, 26 Apr 2007 17:29:52 +0000 Subject: [PATCH] Remove module config for su shell --- custom/CHANGELOG | 2 ++ custom/config | 1 - custom/config-*-linux | 1 - custom/config.info | 1 - custom/config.info.ca | 2 -- custom/config.info.de | 6 ++---- custom/config.info.es | 2 -- custom/config.info.fr | 2 -- custom/config.info.it | 2 -- custom/config.info.nl | 2 -- custom/config.info.sk | 1 - custom/config.info.tr | 2 -- custom/custom-lib.pl | 3 +-- 13 files changed, 5 insertions(+), 22 deletions(-) diff --git a/custom/CHANGELOG b/custom/CHANGELOG index d01453528..e7bafe68a 100644 --- a/custom/CHANGELOG +++ b/custom/CHANGELOG @@ -13,3 +13,5 @@ The output from a command is now shown as it is generated, for commands run loca Added a Module Config parameter to change the number of columns used to display command buttons in. ---- Changes since 1.270 ---- The contents of uploaded files are no longer logged. +---- Changes since 1.340 ---- +Removed the Module Config option to control if a shell is used when executing a command as a user, since we can now work this out automatically. diff --git a/custom/config b/custom/config index b5ee8afde..0a6ade13e 100644 --- a/custom/config +++ b/custom/config @@ -1,3 +1,2 @@ display_mode=0 -su_shell=0 columns=2 diff --git a/custom/config-*-linux b/custom/config-*-linux index bb612c606..0a6ade13e 100644 --- a/custom/config-*-linux +++ b/custom/config-*-linux @@ -1,3 +1,2 @@ display_mode=0 -su_shell=1 columns=2 diff --git a/custom/config.info b/custom/config.info index 173b72c90..545c80dfa 100644 --- a/custom/config.info +++ b/custom/config.info @@ -5,4 +5,3 @@ height=Height of file editor window,3,Default (20 chars) wrap=File editor wrap mode,1,-Default (Soft),hard-Hard,off-Off columns=Columns to display commands in,1,2-2,1-1 line2=System configuration,11 -su_shell=su command supports -s shell option?,1,1-Yes,0-No diff --git a/custom/config.info.ca b/custom/config.info.ca index ebf7f1eed..ed49f128d 100644 --- a/custom/config.info.ca +++ b/custom/config.info.ca @@ -4,6 +4,4 @@ width=Amplada de la finestra de l'editor,3,Defecte (80 car height=Alçada de la finestra de l'editor,3,Defecte (20 caràcters) wrap=Mode wrap de l'editor,1,-Defecte (Soft),hard-Hard,off-Desactivat columns=Columnes per mostrar-hi les ordres,1,2-2,1-1 -line2=Configuració del sistema,11 -su_shell=L'ordre su suporta l'opció de shell -s,1,1-Sí,0-No diff --git a/custom/config.info.de b/custom/config.info.de index 021b073b5..8e68e8859 100644 --- a/custom/config.info.de +++ b/custom/config.info.de @@ -1,7 +1,5 @@ +line1=Konfigurierbare Optionen,11 display_mode=Hauptseite zeigt,1,0-Alle Befehle und Parameter,1-Verknüpfungen zu Befehlen height=Höhe des Dateieditor-Fensters,3,Standard (20 Zeichen) width=Breite des Dateieditor-Fensters,3,Standard (80 Zeichen) -wrap=Zeilenumbruch im Dateieditor,1,-Standard (Weich),hard-Hart,off-Ausschalten -line1=Konfigurierbare Optionen,11 -line2=Systemkonfiguration,11 -su_shell=Das su-Kommando unterstützt die -s-Shelloption?,1,1-Ja,0-Nein \ No newline at end of file +wrap=Zeilenumbruch im Dateieditor,1,-Standard (Weich),hard-Hart,off-Ausschalten \ No newline at end of file diff --git a/custom/config.info.es b/custom/config.info.es index e05e74e3a..438bfc5bd 100644 --- a/custom/config.info.es +++ b/custom/config.info.es @@ -3,5 +3,3 @@ display_mode=La página principal muestra,1,0-Todos los comandos y pará width=Anchura de la ventana del editor de archivos,3,Defecto (80 caracteres) height=Altura de la ventana del editor de archivos,3,Defecto (20 caracteres) wrap=Modo de palabra del editor de archivos,1,-Defecto (Soft),hard-Hard,off-Off -line2=Configuración de sistema,11 -su_shell=¿El comando su soporta la opción -s shell?,1,1-Sí,0-No diff --git a/custom/config.info.fr b/custom/config.info.fr index 88a2947c5..0f7e5d6d5 100644 --- a/custom/config.info.fr +++ b/custom/config.info.fr @@ -3,5 +3,3 @@ display_mode=La page principale montre,1,0-Toutes les commandes et parametres,1- width=Largeur de la fenetre d'edition du fichier,3,Defaut (80 caracteres) height=Hauteur de la fenetre d'edition du fichier,3,Defaut (20 caracteres) wrap=wrap mode de l'editeur de fichiers,1,-Defaut (Soft),hard-Hard,off-Off -line2=Configuration du systeme,11 -su_shell=La commande " su " supporte l'otpion " -s " ?,1,1-Oui,0-Non diff --git a/custom/config.info.it b/custom/config.info.it index 8d69bec54..26656cc7b 100755 --- a/custom/config.info.it +++ b/custom/config.info.it @@ -3,5 +3,3 @@ display_mode=La pagina principale visualizza,1,0-Tutti i comandi e parametri,1-C width=Larghezza della finestra del file editor,3,Predefinita (80 caratteri) height=Altezza della finestra del file editor,3,Predefinita (20 caratteri) wrap=Modalità di ritorno a capo del file editor,1,-Predefinita (Soft),hard-Hard,off-Disabilita -line2=Configurazione di sistema -su_shell=Il comando su supporta l'opzione della shell -s ?,1,1-Si,0-No diff --git a/custom/config.info.nl b/custom/config.info.nl index 4e328b233..5c7b7d82a 100644 --- a/custom/config.info.nl +++ b/custom/config.info.nl @@ -3,5 +3,3 @@ display_mode=Hoofdpagina toont,1,0-Alle opdrachten en parameters,1-Links naar op width=Breedte van bestands editor venster,3,Standaard (80 chars) height=Hoogte van bestands editor venster,3,Standaard (20 karakters) wrap=Bestands editor terugloop modus,1,-Standaard (Zacht),hard-Hard,off-Uit -line2=Systeem configuratie,11 -su_shell=su commando ondersteund -s shell optie?,1,1-Ja,0-Nee diff --git a/custom/config.info.sk b/custom/config.info.sk index 640a62fcb..e69de29bb 100644 --- a/custom/config.info.sk +++ b/custom/config.info.sk @@ -1 +0,0 @@ -line2=Systémové nastavenie,11 diff --git a/custom/config.info.tr b/custom/config.info.tr index 5597f235a..ed72fabd4 100644 --- a/custom/config.info.tr +++ b/custom/config.info.tr @@ -2,5 +2,3 @@ line1=Yap display_mode=Ana sayfada neler gösterilsin,1,0-Bütün komutlar ve parametreleri,1-Komutların linkleri width=Dosya düzenleyicisi penceresinin genişliği,3,Öntanımlı (80 karakter) height=Dosya düzenleyicisi penceresinin yüksekliği,3,Öntanımlı (20 karakter) -line2=Sistem yapılandırması,11 -su_shell=su komutu -s kabul seçeneğini desteklesin mi?,1,1-Evet,0-Hayır diff --git a/custom/custom-lib.pl b/custom/custom-lib.pl index 51996875c..b21ef0c82 100644 --- a/custom/custom-lib.pl +++ b/custom/custom-lib.pl @@ -467,9 +467,8 @@ if ($cmd->{'su'}) { &print_tempfile(TEMP, "$str\n"); &close_tempfile(TEMP); chmod(0755, $temp); - local $shell = $config{'su_shell'} ? "-s /bin/sh" : ""; $got = &foreign_call("proc", "safe_process_exec", - "su - $user $shell -c $temp", 0, 0, + &command_as_user($user, 1, $temp), 0, 0, $fh, undef, !$cmd->{'raw'}, 0, $cmd->{'timeout'}); unlink($temp);