Précédent   Forum des professionnels en informatique > Systèmes > Linux > Applications > Shell
Shell Vos questions sur l'utilisation des commandes shell
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 06/04/2011, 13h22   #1
Candidat au titre de Membre du Club
 
Inscription : mars 2009
Messages : 20
Détails du profil
Informations forums :
Inscription : mars 2009
Messages : 20
Points : 14
Points : 14
Par défaut Execution accidentelle d'un .so

Bonjour,

ce n'est pas un vrai problème, je voudrais seulement savoir si ça a pu modifier certaines choses quand j'ai fait par accident :
Code :
1
2
 
./usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/i386/libhprof.so
Les commandes qui suivent ont été lancées les unes après les autres à cause de cette exécution accidentelle :

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
 
intranet:/# less /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib/jvm.hprof.txt
intranet:/# cd /usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib
 
 
intranet:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib# ls
 
alt-rt.jar desktop fontconfig.RedHat.4.bfc fontconfig.Ubuntu.bfc jsse.jar psfontj2d.properties
 
applet ext fontconfig.RedHat.4.properties.src fontconfig.Ubuntu.properties.src jvm.hprof.txt psfont.properties.ja
 
audio flavormap.properties fontconfig.RedHat.bfc fonts locale resources.jar
 
calendars.properties fontconfig.bfc fontconfig.RedHat.properties.src i386 logging.properties rt.jar
 
charsets.jar fontconfig.properties fontconfig.Sun.bfc im management security
 
classlist fontconfig.properties.src fontconfig.Sun.properties.src images management-agent.jar servicetag
 
cmm fontconfig.RedHat.2.1.bfc fontconfig.SuSE.bfc jar.binfmt meta-index sound.properties
 
content-types.properties fontconfig.RedHat.2.1.properties.src fontconfig.SuSE.properties.src javaws.jar net.properties zi
 
deploy fontconfig.RedHat.3.bfc fontconfig.Turbo.bfc jce.jar oblique-fonts
 
deploy.jar fontconfig.RedHat.3.properties.src fontconfig.Turbo.properties.src jexec plugin.jar
 
 
intranet:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib# ls -l
 
total 65504
 
-rw-r--r--  1 root root    68071 avr 12  2010 alt-rt.jar
drwxr-xr-x  2 root root     4096 avr 12  2010 applet
drwxr-xr-x  2 root root     4096 nov 22 15:09 audio
lrwxrwxrwx  1 root root       36 nov 22 15:10 calendars.properties -> /etc/java-6-sun/calendars.properties
-rw-r--r--  1 root root  6832225 avr 24  2010 charsets.jar
-rw-r--r--  1 root root    80589 avr 12  2010 classlist
drwxr-xr-x  2 root root     4096 nov 22 15:09 cmm
lrwxrwxrwx  1 root root       40 nov 22 15:10 content-types.properties -> /etc/java-6-sun/content-types.properties
drwxr-xr-x  2 root root     4096 nov 22 15:10 deploy
-rw-r--r--  1 root root  3343266 mai 27  2010 deploy.jar
drwxr-xr-x  5 root root     4096 nov 22 15:10 desktop
drwxr-xr-x  2 root root     4096 nov 22 15:10 ext
lrwxrwxrwx  1 root root       36 nov 22 15:10 flavormap.properties -> /etc/java-6-sun/flavormap.properties
-rw-r--r--  1 root root     1678 avr 12  2010 fontconfig.bfc
lrwxrwxrwx  1 root root       37 nov 22 15:10 fontconfig.properties -> /etc/java-6-sun/fontconfig.properties
-rw-r--r--  1 root root     1973 avr 12  2010 fontconfig.properties.src
-rw-r--r--  1 root root     5438 avr 12  2010 fontconfig.RedHat.2.1.bfc
-rw-r--r--  1 root root     9060 avr 12  2010 fontconfig.RedHat.2.1.properties.src
-rw-r--r--  1 root root     5760 avr 12  2010 fontconfig.RedHat.3.bfc
-rw-r--r--  1 root root    11040 avr 12  2010 fontconfig.RedHat.3.properties.src
-rw-r--r--  1 root root     4494 avr 12  2010 fontconfig.RedHat.4.bfc
-rw-r--r--  1 root root     8816 avr 12  2010 fontconfig.RedHat.4.properties.src
-rw-r--r--  1 root root     4532 avr 12  2010 fontconfig.RedHat.bfc
-rw-r--r--  1 root root     8878 avr 12  2010 fontconfig.RedHat.properties.src
-rw-r--r--  1 root root     4644 avr 12  2010 fontconfig.Sun.bfc
-rw-r--r--  1 root root     8679 avr 12  2010 fontconfig.Sun.properties.src
-rw-r--r--  1 root root     1678 avr 12  2010 fontconfig.SuSE.bfc
-rw-r--r--  1 root root     1972 avr 12  2010 fontconfig.SuSE.properties.src
-rw-r--r--  1 root root     4668 avr 12  2010 fontconfig.Turbo.bfc
-rw-r--r--  1 root root     9233 avr 12  2010 fontconfig.Turbo.properties.src
-rw-r--r--  1 root root     6040 avr 12  2010 fontconfig.Ubuntu.bfc 
-rw-r--r--  1 root root    11359 avr 12  2010 fontconfig.Ubuntu.properties.src
drwxr-xr-x  2 root root     4096 nov 22 15:09 fonts
drwxr-xr-x  9 root root     4096 nov 22 15:10 i386
drwxr-xr-x  2 root root     4096 nov 22 15:09 im
drwxr-xr-x  4 root root     4096 nov 22 15:09 images
-rw-r--r--  1 root root       94 mai 27  2010 jar.binfmt
-rw-r--r--  1 root root   904786 mai 27  2010 javaws.jar
-rw-r--r--  1 root root    88256 avr 12  2010 jce.jar
-rwxr-xr-x  1 root root    15853 avr 12  2010 jexec
-rw-r--r--  1 root root   622110 avr 24  2010 jsse.jar
-rw-r--r--  1 root root     2807 avr 12  2010 jvm.hprof.txt
drwxr-xr-x 15 root root     4096 nov 22 15:10 locale
lrwxrwxrwx  1 root root       34 nov 22 15:10 logging.properties -> /etc/java-6-sun/logging.properties
drwxr-xr-x  2 root root     4096 nov 22 15:10 management
-rw-r--r--  1 root root      382 avr 12  2010 management-agent.jar
-rw-r--r--  1 root root     2190 avr 12  2010 meta-index
lrwxrwxrwx  1 root root       30 nov 22 15:10 net.properties -> /etc/java-6-sun/net.properties
drwxr-xr-x  2 root root     4096 nov 22 15:09 oblique-fonts
-rw-r--r--  1 root root  1801333 mai 27  2010 plugin.jar
-rw-r--r--  1 root root    10669 avr 12  2010 psfontj2d.properties
-rw-r--r--  1 root root     3070 avr 12  2010 psfont.properties.ja
-rw-r--r--  1 root root  1146137 avr 12  2010 resources.jar
-rw-r--r--  1 root root 51796975 mai 27  2010 rt.jar
drwxr-xr-x  2 root root     4096 nov 22 15:10 security
drwxr-xr-x  2 root root     4096 nov 22 15:10 servicetag
lrwxrwxrwx  1 root root       32 nov 22 15:10 sound.properties -> /etc/java-6-sun/sound.properties
drwxr-xr-x 13 root root     4096 nov 22 15:09 zi
 
 
intranet:/usr/lib/jvm/java-6-sun-1.6.0.20/jre/lib# cd ..
 
intranet:/usr/lib/jvm/java-6-sun-1.6.0.20/jre#
Ces commandes sont-elles sans incidence (je soupçonne même que la plupart a du produire des "command not found", mais sait-on jamais) ?

j'ai regardé des listes de commandes linux, mais j'ai rien trouvé...
http://www.oreillynet.com/linux/cmd/
http://ss64.com/bash/
Lorenzaccio est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 06/04/2011, 14h47   #2
Expert Confirmé Sénior
 
Avatar de frp31
 
Homme francois
Ingénieur systèmes et réseaux
Inscription : juillet 2006
Messages : 3 534
Détails du profil
Informations personnelles :
Nom : Homme francois
Âge : 35
Localisation : France, Haute Garonne (Midi Pyrénées)

Informations professionnelles :
Activité : Ingénieur systèmes et réseaux
Secteur : Aéronautique - Marine - Espace - Armement

Informations forums :
Inscription : juillet 2006
Messages : 3 534
Points : 7 743
Points : 7 743
potentiellement il peut y avoir des problèmes quand on exécute un truc lorsque le texte contenu est identique à une commande interprétable

Code :
1
2
3
 
par exemple 
 > toto
peut créer un fichier vide nommé toto

sous réserve de ta copie écran, il semble que ça n'ai rien "fait" de ce genre ...
frp31 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 06/04/2011, 15h55   #3
Candidat au titre de Membre du Club
 
Inscription : mars 2009
Messages : 20
Détails du profil
Informations forums :
Inscription : mars 2009
Messages : 20
Points : 14
Points : 14
C'est bien ce que je pensais, mais je voulais en être sûr... En effet, j'ai fait ça sur un server de prod d'une application web, qui comme par hasard ne fonctionne plus correctement (pas de mise en prod effectuée entre temps, appli qui fonctionnait 'normalement').
Lorenzaccio est déconnecté   Envoyer un message privé Réponse avec citation 10
Vieux 07/04/2011, 16h43   #4
Membre Expert
 
Homme
Ingénieur développement logiciels
Inscription : octobre 2008
Messages : 1 375
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 33
Localisation : France

Informations professionnelles :
Activité : Ingénieur développement logiciels

Informations forums :
Inscription : octobre 2008
Messages : 1 375
Points : 2 034
Points : 2 034
Je ne comprend pas... On ne peut pas exécuter un .so, tu as fais quoi exactement ?
matafan est déconnecté   Envoyer un message privé Réponse avec citation 01
Vieux 07/04/2011, 17h53   #5
Membre Expert
 
Étudiant
Inscription : août 2004
Messages : 500
Détails du profil
Informations personnelles :
Âge : 22

Informations professionnelles :
Activité : Étudiant

Informations forums :
Inscription : août 2004
Messages : 500
Points : 1 017
Points : 1 017
Envoyer un message via MSN à Senaku-seishin
@Lorenzaccio : La hprof sert pour des stats sur le CPU, ...
http://java.sun.com/developer/techni...ing/HPROF.html

L'avoir exécuté n'a à mon avis pas d'effet néfaste.

@matafan : Si on peut :

En 32 bits:
Code :
1
2
 
/lib/ld-linux.so.2 /bin/su
En 64 bits:
Code :
/lib/ld-linux-x86-64.so.2 /bin/su

L'explication est simple, le symbole main() est par convention celui où on fait appelle pour entré dans un programme.

Par exemple le code :
Code :
1
2
3
4
5
int main() {
}
 
int autre_fonction() {
}
En llvm on obtient :
Code :
1
2
3
4
5
6
7
8
9
define i32 @main() nounwind {
  ret i32 0
}
 
define i32 @autre_fonction() nounwind {
  %1 = alloca i32, align 4 
  %2 = load i32* %1
  ret i32 %2
}
Il n'y a pas de différence dans la définition de la fonction entre les deux.
__________________
Avoir un regard neutre sur notre vie dénuée de sens, c'est la voir tel un ignorant
Senaku-seishin est déconnecté   Envoyer un message privé Réponse avec citation 10
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 02h11.


 
 
 
 
Partenaires

Hébergement Web