Questions tagged [suid]

78 questions
21
votes
7 answers

How to restart Linux from inside a C++ program?

I have a Qt 4 GUI where I need to have a option in a drop-down menu that allows the user to choose to restart the computer. I realize this might seem redunant with the ability to restart the computer in other ways, but the choice needs to stay…
Dave K
  • 211
  • 1
  • 2
  • 3
14
votes
1 answer

Security concerns with a Python PAM module?

I'm interested in writing a PAM module that would make use of a popular authentication mechanism for Unix logins. Most of my past programming experience has been in Python, and the system I'm interacting with already has a Python API. I googled…
lfaraone
  • 49,562
  • 17
  • 52
  • 70
12
votes
2 answers

SUID not working with shell script

I have created a small shell script with the following content: cat /usr/bin/checksuid.sh !/bin/bash echo "Hello" > /etc/myfile.cnf ls -l /usr/bin/checksuid.sh -rwsr-xr-x 1 root root 56 Sep 9 12:56 /usr/bin/checksuid.sh I have also created a…
Sachin Gupta
  • 121
  • 1
  • 1
  • 7
8
votes
2 answers

How to use $ORIGIN and suid application?

I'm using python with setcap CAP_NET_RAW enabled. My python script imports a shared library which has $ORIGIN in its RPATH. Since my python is now a suid app, $ORIGIN is not evaluated and the library does not load correctly (this is due to a…
7
votes
1 answer

Is running GNU Screen suid root the only way to make multiuser mode work?

I'm running Ubuntu 11.10 and GNU Screen version "4.00.03jw4", and I'm trying to use multiuser mode. The following process works for me: as user "first_user" > sudo chmod u+s /usr/bin/screen > sudo chmod 755 /var/run/screen and only after that can…
danielpcox
  • 466
  • 4
  • 11
6
votes
2 answers

What choices do I have on MS Windows platforms for the equivalent of SUID from Unix-based platforms?

To understand what I'm asking, it's important to distinguish from among the several uses of SUID in Unix. I have a project that uses an executable in the user's PATH which is owned by the project and which has the SUID bit set. In this way, when it…
Richard T
  • 4,570
  • 5
  • 37
  • 49
6
votes
1 answer

NSTask, command line tools and root

I'm working on an app that needs to use dd (I do this with a shell script in the app bundle, that collects parameters from the app itself, makes some checks and then launches dd). To make this operation I need to call dd with root, and I already…
opoloko
  • 347
  • 5
  • 13
6
votes
3 answers

Semantics of SUID (Set-User-ID)

it seems that I have some trouble understanding the semantics of the SUID bit, perhaps someone can help me clarify the situation. My understanding of the semantic of the SUID bit are as follows: When I set the SUID bit with a file, then the file…
evermean
  • 1,255
  • 21
  • 49
6
votes
2 answers

compile & execute Chromium failed due to SUID sandbox issue

What I'm trying to do : Compile and run Chromium source code on Ubuntu 13.10 Steps I've taken : git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git add to bashrc : export PATH="$PATH":/home/y0.kim/project/depot_tools …
RNA
  • 1,164
  • 2
  • 19
  • 35
6
votes
0 answers

how to debug "Permission denied" errors in Linux (lstat() = -1 EACCES)

Is there a way to debug why I get lstat("/path/to/file", 0x...) = -1 EACCES (permission denied) error when accessing a file/directory? whether it is because of selinux issues or because of user/group permission or NFS or any ACLs that might be…
VanagaS
  • 3,130
  • 3
  • 27
  • 41
5
votes
2 answers

Howto debug program that needs to run as root from gdb (Eclipse) as user (set gdb suid root?)

I need to debug a program on Linux with Eclipse (gdb). The program run as root and is quite large. The binary with debug symbols is about 250MB large and has more than 60 running threads after startup. I'm thinking about the best solution: Use…
IanH
  • 3,968
  • 2
  • 23
  • 26
5
votes
1 answer

taint-mode perl: preserve suid when running external program via system()

I'm trying to add a feature to a legacy script. The script is suid, and uses perl -T (taint mode: man perlsec), for extra security. The feature I need to add is implemented in Python. The problem is that I can't convince perlsec to preserve the suid…
bukzor
  • 37,539
  • 11
  • 77
  • 111
5
votes
0 answers

Is it possible to make programs interpret $ORIGIN in loaded shared libraries with the CAP_NET_RAW capability?

I'm writing an application that has both Python and C++ libraries. The Python part needs to send and receive raw packets, so I'm giving the Python executable the CAP_NET_RAW capability. I also load C++ shared libraries with Cython in the same…
Amir Rachum
  • 76,817
  • 74
  • 166
  • 248
4
votes
1 answer

seteuid/geteuid: Program always has root id

I'm currently trying to figure out how the SUID-bit and the corresponding functions seteuid and geteuid work. So I wrote this little program: #include #include #include #include int main(int argc, char…
Chris
  • 2,030
  • 1
  • 16
  • 22
4
votes
3 answers

what is the difference between suid and other permission (world permission)?

In simple words users will get file owner’s permissions as well as owner UID and GID when executing a file/program.It will not change the file's owner. If you imposed in a program: rwsrwxr-- or rwxr--rwx What is the difference if I set the SUID…
bilz
  • 41
  • 1
1
2 3 4 5 6