Hi all
I'm getting file info through stat( char *filename, struct stat *buf)
Taking all the file attributes to buf->st_mode,
How can i check the suid bit in there, if suid bit mask is 0004000??
Thank you all (1 Reply)
Hi
Senario: I have previleges to edit a file F but User B does not have sufficient privs to edit it.
In order for B to edit it I tried an indirect way. I created a script to edit F and SUID this script so that B can execute it with the privs of me. But this is not working . can some one help... (3 Replies)
I'm writing this command/script to allow students to vi a private file of mine
in a private directory of mine. chmod 700 dir chmod 660 file
however since i own the directory and file; the script has to be ran by me so to speak, im just not sure how to set about doing this.
the script is... (5 Replies)
Hi
I have this code, and i want work with a ls -shalR output in .txt
What i need read to do this??
Where start?
#!/usr/bin/perl
# Allrights- A perl tool for making backups of file permissions
# Copyright (C) 2005 Norbert Klein <norbert@acodedb.com>
# This program is free... (1 Reply)
Hello
My system is Debian-503-amd64. After I installed the "lpr" package, I found that some files with SUID bit come from this package. As:
ls -l /usr/bin/lp*
....
-rwsr-sr-x 1 root lp 31800 2008-05-20 /usr/bin/lpq
-rwsr-sr-x 1 root lp 28504 2008-05-20 /usr/bin/lpr
-rwsr-sr-x 1... (1 Reply)
Please help me to understand the issue:
Issue: There are shell scripts in a user home directory (/home/user_1)
without execute permissions (rw-r--r--) to owner,group and world
These shell scripts were able to execute/work previously but its not working now and it says permission denied or... (2 Replies)
Hey guys,
Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries.
However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
LEARN ABOUT HPUX
setresuid
setresuid(2) System Calls Manual setresuid(2)NAME
setresuid, setresgid - set real, effective, and saved user and group IDs
SYNOPSIS DESCRIPTION
sets the real, effective and/or saved user ID of the calling process.
If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective and
saved user IDs to ruid, euid, and suid, respectively. Otherwise, only sets the real, effective, and saved user IDs if ruid, euid, and suid
each match at least one of the current real, effective, or saved user IDs.
If ruid, euid, or suid is leaves the current real, effective or saved user ID unchanged.
sets the real, effective and/or saved group ID of the calling process.
If the current real, effective or saved user ID is equal to that of a user having appropriate privileges, sets the real, effective, and
saved group ID to rgid, egid, and sgid, respectively. Otherwise, only sets the real, effective and saved group ID if rgid, egid, and sgid
each match at least one of the current real, effective or saved group ID.
If rgid, egid, or sgid is leaves the current real, effective or saved group ID unchanged.
Security Restrictions
Some or all of the actions associated with this system call require the privilege (CHSUBJIDENT). Processes owned by the superuser will
have this privilege. Processes owned by other users may have this privilege, depending on system configuration.
See privileges(5) for more information about privileged access on systems that support fine-grained privileges.
RETURN VALUE
Upon successful completion, and return 0; otherwise, they return -1 and set to indicate the error.
ERRORS
and fail if any of the following conditions are encountered:
ruid, euid, or suid (rgid, egid, or sgid) is not a valid user (group) ID.
None of the conditions above are met.
AUTHOR
and were developed by HP.
SEE ALSO exec(2), getuid(2), setuid(2), privileges(5).
setresuid(2)