Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please give description too SEED Labs - Environment Variable and Set-UID Program Lab 2.7 Task 7: The LD PRELOAD Environment Variable and Set-UID Programs In
please give description too
SEED Labs - Environment Variable and Set-UID Program Lab 2.7 Task 7: The LD PRELOAD Environment Variable and Set-UID Programs In this task, we study how Set-UID programs deal with some of the environment variables. Several en- vironment variables, including LD PRELOAD, LD LIBRARY PATH, and other LD influence the behavior of dynamic loader/linker. A dynamic loader/linker is the part of an operating system (OS) that loads (from persistent storage to RAM) and links the shared libraries needed by an executable at run time. In Linux, ld.so orld-linux.so, are the dynamic loader/linker (each for different types of binary). Among the environment variables that affect their behaviors, LD LIBRARY PATH and LD PRELOAD are the two that we are concerned in this lab. In Linux, LD LIBRARY PATH is a colon-separated set of di- rectories where libraries should be searched for first, before the standard set of directories. LD PRELOAD specifies a list of additional, user-specified, shared libraries to be loaded before all others. In this task, we will only study LD PRELOAD. Step 1. First, we will see how these environment variables influence the behavior of dynamic loader/linker when running a normal program. Please follow these steps: 1. Let us build a dynamic link library. Create the following program, and name it my 11b. c. It basically overrides the sleep() function in 1ibe: #include Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started