08-15-2014
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am very new to Unix. We have a script that will remove files from a directory. The account removing the files has the same permissions as the directory the files are located. We have logged in as the account and deleted the files from that directory but when we run the script with the account... (7 Replies)
Discussion started by: Cech2002
7 Replies
2. UNIX for Advanced & Expert Users
When I do a 'cd /appl' and issue 'ls -al' command, I get the following error for .. directory.
./..: Permission denied
But still I get a listing of other directories under /appl.
Also, if I give 'man' for any command under this /appl folder, I get the following error:
... (3 Replies)
Discussion started by: Deepa
3 Replies
3. Programming
I tried using the following code to execute a program but it doesnt seems to be working .. I would like to know whats wrong wit it .
execve("/bin/cat", "words", NULL); (0 Replies)
Discussion started by: winsonlee
0 Replies
4. UNIX for Dummies Questions & Answers
I am writing a VERY simple script that copies my catalina log file to a new filename then copies /dev/null inotthe catalina.out. Since the log is the live log, it is open and written to as I copy. I can do the 2 copy commands from a command promp with no problem, it works. I have the probmel in... (2 Replies)
Discussion started by: rschille
2 Replies
5. Programming
Hello there! Is there a way to use execve() to run md5sum function?
for example execve("md5sum <filename>, NULL,NULL);"
thanx! (2 Replies)
Discussion started by: nicos
2 Replies
6. Programming
Hi everyone , after a pipe() system call i've forked and entred into the child process to execve a shell script .the problem here is that when the execve sys call fail , i want to send the error code (eg errno) to the parent process using the pipe writer side p , there is nothing received in the... (4 Replies)
Discussion started by: xtremejames183
4 Replies
7. UNIX for Dummies Questions & Answers
for FNAME in `find /unixsxxx/interface/2.0/xxxxxxx -type f \( -name '*.KSH' -o -name '*.sh' -o -name '*.sql' -o -name '*.ksh' \) -exec grep -il xxx.xxx.xxx.xxx {} \;`; do C=`grep -c xxx.xxx.xxx.xxx ${FNAME}`; echo "${C}:${FNAME}" >> /unixsxxx/apps/41.txt;done
How to avoid my command from... (2 Replies)
Discussion started by: TimHortons
2 Replies
8. Programming
Hi,
I'm writing a monitor program that can be notified once a process makes an execve system call and then stop that process for examining before it starts to run the new code. I know I can ptrace a process to achieve this, but I do not want to ptrace every process in the system. Is it possible?... (1 Reply)
Discussion started by: aaron.lwe
1 Replies
9. UNIX for Dummies Questions & Answers
Disclaimer: This is just a rainy day experiment. There is no expected "goal" other than to understand UNIX better.
After reading about fork and exec, my understanding is that forking, as the UNIX shell does by design, consequentially may sacrafice some speed versus an approach that runs in... (1 Reply)
Discussion started by: uiop44
1 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I was trying a perl-cgi tutorial and saving the data from online form to a file named (guests.txt). I am using the localhost port 80 for practice.
My page file "guestbook.html" is working as I saw the online form. After filled out the blanks and submit, I was expecting to see the result... (3 Replies)
Discussion started by: yifangt
3 Replies
LEARN ABOUT MOJAVE
issetugid
ISSETUGID(2) BSD System Calls Manual ISSETUGID(2)
NAME
issetugid -- is current process tainted by uid or gid changes
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
issetugid(void);
DESCRIPTION
The issetugid() system call returns 1 if the process environment or memory address space is considered ``tainted'', and returns 0 otherwise.
A process is tainted if it was created as a result of an execve(2) system call which had either of the setuid or setgid bits set (and extra
privileges were given as a result) or if it has changed any of its real, effective or saved user or group ID's since it began execution.
This system call exists so that library routines (eg: libc, libtermcap) can reliably determine if it is safe to use information that was
obtained from the user, in particular the results from getenv(3) should be viewed with suspicion if it is used to control operation.
A ``tainted'' status is inherited by child processes as a result of the fork(2) system call (or other library code that calls fork, such as
popen(3)).
It is assumed that a program that clears all privileges as it prepares to execute another will also reset the environment, hence the
``tainted'' status will not be passed on. This is important for programs such as su(1) which begin setuid but need to be able to create an
untainted process.
ERRORS
The issetugid() system call is always successful, and no return value is reserved to indicate an error.
SEE ALSO
execve(2), fork(2), setegid(2), seteuid(2), setgid(2), setregid(2), setreuid(2), setuid(2)
HISTORY
The issetugid() system call first appeared in OpenBSD 2.0 and was also implemented in FreeBSD 3.0.
BSD
August 25, 1996 BSD