10-07-2006
Knowing which OS you are using would be nice...I'm guessing Solaris? Do not rely on LD_LIBRARY_PATH to find stuff. When you run ld to produce bin you can specify what libraries to search. Do that and use absolute pathnames as you do. If that doesn't work, there are more complex arguments to ld that will nail a symbol to a particular library. I believe that one of these will probably work. The issue is allowing a malicious user the ability to change an environment variable to insert random code into the executable. Once you are no longer relying on an environment variable, I would expect it work. The options you need will be on your OS's ld man page.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a binary. It is having the following permissions
rws rws rwx mqm:mqm runmqtrm
The same program on another machine is
rws rws rwx root: mqm runmqtrm
This program is a setuid program.
This is what my understanding is. Whatever user the program is started under, it will finally be... (0 Replies)
Discussion started by: bandaru
0 Replies
2. Shell Programming and Scripting
Hi friends ,
how do i view a dynamically linked file in unix ?
its there on other system and do i have to ftp it in ASCII format or binary ?
and after the ftp how do i view it ?
thanks in advance
veeras (1 Reply)
Discussion started by: sveera
1 Replies
3. UNIX for Advanced & Expert Users
Hi friends,
i have a dynamically linked file on my solaris system.this is script that runs regularly. How can i read the contents of that ?
when i tried to say "vi filename " then it says executable and nothing is seen.
Please help.
thanks in advance
Veera (5 Replies)
Discussion started by: sveera
5 Replies
4. Programming
how to get the list of all dynamically loaded libraries in memory ?thanks! (3 Replies)
Discussion started by: rainshadow
3 Replies
5. HP-UX
hi i have written small script which will login 2 two different users with su but if we run from normal user it prompts for password so
i chnaged the owner of script to root and added setuid bit
with
chmod u+s <script_name>
but when i run the script i get following message
Warning:... (3 Replies)
Discussion started by: zedex
3 Replies
6. SCO
How do i get the list of linked libraries in a built binaries on SCO UNIX.
I appreciate your help (1 Reply)
Discussion started by: param_it
1 Replies
7. UNIX for Dummies Questions & Answers
Can anyone explain me difference between setuid and sticky bit? and also between setuid and chown? (3 Replies)
Discussion started by: kkalyan
3 Replies
8. Linux
Dear all,
I am newbie with linux, i dont understand any code. I have googled a long time. Please help me explain about setuid bit on linux (Centos 6)
Here:
1/ I chmod u+s for /sbin/iptables but normal user still cannot perform command (ex: /sbin/iptables -L)
2/Someone says : setuid only... (6 Replies)
Discussion started by: all4cfa
6 Replies
9. UNIX for Beginners Questions & Answers
So I have a file called queens.cc and I need to do the following:
Compile and make a .o file while specifying that the compiler is to search /student/214/include for system include files.
Use g++, link and load .o file to make a dynamically linked executable file called queens and to also... (1 Reply)
Discussion started by: steezuschrist96
1 Replies
10. UNIX for Beginners Questions & Answers
Just learning about the privilege escalation method provided by setuid. Correct me if I am wrong but what it does is change the uid of the current process to whatever uid I set. Right ?
So what stops me from writing my own C program and calling setuid(0) within it and gaining root privileges ?
... (2 Replies)
Discussion started by: sreyan32
2 Replies
LEARN ABOUT DEBIAN
cr_run
CR_RUN(1) User Commands CR_RUN(1)
NAME
cr_run - runs a subprocess with checkpoint library loaded.
SYNOPSIS
cr_run [OPTIONS] COMMAND [ARGS]
DESCRIPTION
cr_run takes an arbitrary command and runs it with the "LD_PRELOAD" environment variable set so that an appropriate shared library is
loaded at program startup. Such a library must be loaded if you wish to take a checkpoint of the process with cr_checkpoint(1).
cr_run assumes that BLCR's libraries (libcr*.so) can be found in the default library search path or via the "LD_LIBRARY_PATH" environment
variable.
You do not need to use cr_run if you explicitly link your application with -lcr (you may also need to modify your linker's search path with
a -L directive, depending on the library's location), or if libcr.so or a related library is loaded by other libraries you have linked with
(such as a checkpoint-ready MPI library), or by your system's parallel job startup script, etc. Check your system documentation for
details.
OPTIONS
-?,--help
print a usage message and exit.
--version
print version information and exit.
-- ends options processing.
--omit causes executed process(es) to be omitted (rather than included) in any checkpoint taken.
--run overrides any occurance of --omit earlier in the options (restoring the default behavior).
BUGS
Because cr_run relies on the "LD_PRELOAD" environment variable, it is ineffective for statically-linked executables, and for setuid/gid
programs.
AUTHORS
Jason Duell, Paul Hargrove, and Eric Roman, Lawrence Berkeley National Laboratory.
REPORTING BUGS
Bug reports may be filed on the web at http://mantis.lbl.gov/bugzilla.
SEE ALSO
cr_checkpoint(1), cr_restart(1),
Berkeley Lab Checkpoint/Restart May 2008 CR_RUN(1)