Skip to content
Advertisement

Tag: linux-capabilities

Setcap over SSHFS

I am running a VM on my machine and have mounted a host folder inside VM using sshfs (auto-mounted via fstab). That folder has an executable which I want to run inside the VM. But I also need some capabilities before running that executable. So my script looks like: But I am getting below error : But if I copy

How to resolve “setsockopt(3, SOL_SOCKET, SO_MARK, [10], 4) = -1 EPERM” Operation denied for none root users

I got two network interfaces (ethernet and wlan). Now I found a little script on github (https://github.com/Intika-Linux-Firewall/App-Route-Jail) which seems to allow me to route specific applications through the none default gateway to loadbalance the traffic a little bit. The script is using the following call: setsockopt(sd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)); As I found out via an strace I got: ‘-1

Read /proc//fd/ without full root access

I have a program (https://github.com/raboof/connbeat) that relies on /proc/[pid]/fd/* to find processes given a (networking) inode. /proc/[pid]/fd can only be read by root, but I’d like to drop privileges as much as possible for security. Is there some way I could (efficiently) get to the relationship between processes and inodes without requiring full root rights? Perhaps some syscall that I

Is it possible to export the raw text password in Linux when the user is logging in?

I was just wondering, is it possible to export the raw text password into a file using echo “$password” >> /home/user/Desktop/file name. I know that the password is validated against the shadow file by pam_unix.so. Can the username and password exported before the raw text is being converted? Answer Of course you can substitute the login(1) command with one of

Does using linux capabilities disable LD_PRELOAD

In my custom environment an interceptor library is preloaded which runs a special implementation of bind(), connect(), etc. calls. The problem I see is whenever an application is explicitly enabled capabilities using command setcap, executing the application fails to preload interceptor library and calls default libc connect(). Is it an expected behavior? If yes, what could be the reason to

Edit linux capabilities in Perl

In a C program, you can edit your capabilities with cap_set_proc from libcap. How can I achieve the same in a Perl program? Answer Linux::Prctl may meet your needs. If not, you can use syscall() and try to do it the hard way. If that’s unpalatable, too (and I would find it so), I’m sure CPAN would welcome you to

Advertisement