Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
execle call kills suid programs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jbaublitz
n00b
n00b


Joined: 23 Feb 2015
Posts: 10

PostPosted: Fri Apr 17, 2015 2:08 am    Post subject: execle call kills suid programs Reply with quote

So I have run into the most bizarre bug I think I have ever seen. After I run the following code:

Code:

#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
 
int main(void) {
     pid_t pid = fork();
     if (pid == 0) {
         char *env[] = {"DISPLAY=:0", NULL};
         if (execle("/usr/bin/slock", "slock", (char *)NULL, env) < 0)
             printf("%s\n", strerror(errno));
     }
 
     return 0;
 }


a whole bunch of commands on my computer break. dmesg no longer works, su no longer works, sudo no longer works to name a few. All of them mention the same error: Operation not permitted. I'm wondering if this has anything to do with grsecurity being enabled... Have any of you seen anything like this before?

[EDIT]
I just discovered it kills ALL suid programs. This looks like it might be grsecurity problem after all.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum