04-07-2011
I agree that based on the code you posted the suid bit looks useless. Maybe, in a earlier version of the program, there used to be a first paragraph of code that needed suid and it was removed leaving the situation you have today. Try turning off the suid bit and see if anything breaks.
10 More Discussions You Might Find Interesting
1. Programming
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)
Discussion started by: solvman
1 Replies
2. Cybersecurity
Hi all,
Where can i find list of suid and gid files common for the system, let's say RedHat 7.1?
Thank you all
Regards
:D (1 Reply)
Discussion started by: solvman
1 Replies
3. UNIX for Dummies Questions & Answers
what is SUID ? can someone explain or point me to a link ?
thanks
simon2000 (2 Replies)
Discussion started by: simon2000
2 Replies
4. UNIX for Dummies Questions & Answers
good day!
i would just like to ask for advice regarding an lp problem i have..
we currently migrated a GIS appl from sol 2.6 to sol 8 but maintained the same version of jetadmin (for the appl plotters and printers). we are able to print files on a printer but not on a plotter. the... (1 Reply)
Discussion started by: maria_iris
1 Replies
5. UNIX for Advanced & Expert Users
Hi,
I have two file in my directory. "catter" file contains "cat ./file". And "file" contails "Hi ashish". I have SUID bit set for catter file. But when a different user in my group runs file catter, shell displays "Permission denied" message.
I just want to know can use of suid bit be... (3 Replies)
Discussion started by: shriashishpatil
3 Replies
6. Solaris
Hi all,
Thanks for all replays and for reading in advance (as per usual)
Anyhow I have been asked to come up with a list of programs that have SUID root permissions and also for any programs with SGID permissions. Has anyone got any idea with out going through each program indiviually how I... (2 Replies)
Discussion started by: B14speedfreak
2 Replies
7. UNIX for Advanced & Expert Users
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)
Discussion started by: Pankaj Mishra
3 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: StrengthThaDon
5 Replies
9. AIX
Hello,
I'm running AIX 6.1 box.
I tried to use suid on binary file but it doesn't work.
(I set suid on /usr/bin/sleep and tried to run it as user1(sleep owner is bin) - and program still runs as user1. It shoud run as bin isn't it ? - This test run as expected on Linux box)
Filesystem is... (3 Replies)
Discussion started by: vilius
3 Replies
10. UNIX for Dummies Questions & Answers
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
SXID(1) General Commands Manual SXID(1)
NAME
sxid - check for changes in s[ug]id files and directories
SYNOPSIS
sxid [ --config <file> ] [ --nomail ] [ --spotcheck ] [ --listall ]
DESCRIPTION
Sxid checks for changes in suid and sgid files and directories based on its last check. Logs are stored by default in /var/log/sxid.log.
The changes are then emailed to the address specified in the configuration file. The default location for the config file is /etc/sxid.conf
but this can be overridden with the --config option and specifying an alternate location.
OUTPUT
The program outputs several different checks concerning the current status of the suid and sgid files and directories on the system on
which it was run. This is a basic overview of the format.
In the add remove section, new files are preceded by a '+', old ones are preceded by a '-' NOTE: that removed does not mean gone from the
filesystem, just that it is no longer sgid or suid.
Most of it is pretty easy to understand. On the sections that show changes in the file's info (uid, gid, modes...) the format is old->new.
So if the old owner was 'mail' and it is now 'root' then it shows it as mail->root.
The list of files in the checks is in the following format:
/full/path *user.group MODE
(MODE is the 4 digit mode, as in 4755)
In the changes section, if the line is preceded by an 'i' then that item has changed inodes since the last check (regardless of any s[ug]id
change), if there is an 'm' then the md5sum has changed.
If a user or group entry is preceded by a '*' then it's execution bit is set (ie. *root.wheel is suid, root.*wheel is sgid, *root.*wheel is
+s).
On the forbidden directories, if ENFORCE is enabled an 'r' will precede forbidden items that were succesfully -s'd, and an '!' will show
that it was unsuccesfully -s'd (for what ever reason).
OPTIONS
-c, --config <file>
specifies an alternate configuration file
-n, --nomail
sends output to stdout instead of emailing, useful for spot checks
-k, --spotcheck
Checks for changes by recursing the current working directory. Log files will not be rotated and no email sent. All output will go
to stdout.
-l, --listall
Useful when doing --spotcheck or --nomail to list all files that are logged, regardless of changes.
AUTHOR
Ben Collins <bcollins@debian.org>
REPORTING BUGS
Report bugs to current maintainer Timur Birsh <taem@linukz.org>.
SEE ALSO
sxid.conf(5)
sXid 4.0.5 January 2002 SXID(1)