[bootlin/training-materials updates] master: debugging: labs: improve ltrace lab (7f26bf85)

Clément Léger clement.leger at bootlin.com
Wed Nov 16 12:26:08 CET 2022


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/7f26bf858df3aa5c3c1cf0108c6be55bc73a36ca

>---------------------------------------------------------------

commit 7f26bf858df3aa5c3c1cf0108c6be55bc73a36ca
Author: Clément Léger <clement.leger at bootlin.com>
Date:   Wed Nov 16 12:27:04 2022 +0100

    debugging: labs: improve ltrace lab
    
    Signed-off-by: Clément Léger <clement.leger at bootlin.com>


>---------------------------------------------------------------

7f26bf858df3aa5c3c1cf0108c6be55bc73a36ca
 .../debugging-application-tracing.tex                   | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/labs/debugging-application-tracing/debugging-application-tracing.tex b/labs/debugging-application-tracing/debugging-application-tracing.tex
index 911044d4..61b100af 100644
--- a/labs/debugging-application-tracing/debugging-application-tracing.tex
+++ b/labs/debugging-application-tracing/debugging-application-tracing.tex
@@ -10,15 +10,17 @@
 
 \section{ltrace}
 
-Go into the \code{ltrace} folder
+On your computer, go into the \code{ltrace} lab folder:
 
 \begin{bashinput}
-$ cd /root/ltrace/
+$ cd /home/<user>/debugging-labs/nfsroot/root/ltrace/
+$ make
 \end{bashinput}
 
-From there, run the \code{traceme} application:
+From there, run the \code{traceme} application on the target:
 
 \begin{bashinput}
+$ cd /root/ltrace
 $ export LD_LIBRARY_PATH=$PWD
 $ ./authent
 Error: failed to authenticate the user !
@@ -26,8 +28,13 @@ Error: failed to authenticate the user !
 
 As you can see, it seems our application is failing to correctly authenticate
 the system. Using {\em ltrace}, trace the application in order to understand
-what is going on. From what we can see, some function is failing and seems to
-returns 1 instead of 0.
+what is going on.
+
+\begin{bashinput}
+$ ltrace ./authent
+\end{bashinput}
+
+From that trace, try to find which function fails.
 
 In order to overload this check, we can use a \code{LD_PRELOAD} a library.
 We'll override the \code{al_authent_user()} based on the




More information about the training-materials-updates mailing list