Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
-1 votes
1 answer
68 views

I am trying to write a cpp program that will act as "sudo" for a faceless account. Basically i want the command to be run AS the faceless account rather than as the user invoking the command....
1 vote
2 answers
104 views

When using exec() or proc_open() after posix_seteuid() or posix_setuid() I expected the resulting process to run as the UID I set inside the running script. This does not happen. is this how it's ...
0 votes
0 answers
100 views

I have a process which is running under sudo. I'm need to launch a child process which has my uid and gid. I'm currently playing a game where I change the parent euid and egid to my id's, launch the ...
1 vote
1 answer
165 views

In gcc, as root user, I call setuid system call with invalid user id (3009). errno variable is 0 (successful). When the program is running, in another session I execute ps command and I see the value ...
0 votes
1 answer
43 views

I'm writing an auditd plugin, which is executed as root user by auditd, and as per the man recommendation I'm looking to lower it's privileges. I assumed just setting the scripts setuid would be ...
Maikol's user avatar
  • 357
-1 votes
1 answer
185 views

I have the following program: $ cat cat.c #include <err.h> #include <stdlib.h> #include <stdio.h> int main(int argc, char *argv[]) { char buf[32]; if(argc == 1) { errx(1, &...
xiaogw's user avatar
  • 765
1 vote
1 answer
1k views

I want to create a simple script to restart the Mac. The command requires root privileges, so I decided to create an executable with the setuid bit set and the owner being root. For testing the setuid ...
3 votes
0 answers
890 views

I am build docker images for a node.js application in a Github Actions workflow and I publish them on Azure ACR. When I try to pull the image from the ACR to my machine or the Azure App Service, on ...
1 vote
2 answers
604 views

➜ go version go version go1.19.6 linux/amd64 ➜ uname -a Linux dmitry-desktop 6.1.18-200.fc37.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Mar 11 16:09:14 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux I am ...
2 votes
1 answer
2k views

Consider running the following Python code as root: import os f=os.open("/etc/shadow", os.O_RDONLY) os.setuid(65535) os.open(f"/proc/self/fd/{f}", os.O_RDONLY) Here is a one-liner ...
0 votes
1 answer
4k views

I read this but I couldn't solve my problem. I don't know how do I use setuid I have a small python app that runs python commands and bash command in linux machine. I want only this part below to run ...
user avatar
0 votes
1 answer
107 views

I created a VERY simple script: //#escalate.c - a setuid utility so that we can call shutdown //# and other things safely without needing root access. We //# do need to: //# gcc escalate.c -o ...
jpmh's user avatar
  • 11
0 votes
1 answer
137 views

This question has been asked here in multiple forms. I am asking it again because all these questions had too many details. Hence the answers all boiled down to how to solve those specific problems ...
Garo's user avatar
  • 1,540
1 vote
1 answer
326 views

I'm trying to write a C program which is supposed to open a file which can only be read/written to by (non-root) User A. When run by users who are neither root nor User A, the program should allow the ...
strugglecity's user avatar
0 votes
1 answer
912 views

How can I launch a child process that has root privileges? I have a python program in MacOS that can do most of its operations as a normal user. But occasionally, triggered by some user interaction, ...

15 30 50 per page
1
2 3 4 5
...
18

AltStyle によって変換されたページ (->オリジナル) /