diff options
author | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-08-25 01:51:58 -0500 |
---|---|---|
committer | Epoch Qwert <epoch@53flpnlls43fcguy.onion> | 2014-08-25 01:51:58 -0500 |
commit | 1e023da47a5d0248808e33fb5feac18df6df3585 (patch) | |
tree | e2b3064440ca9f0174561f84acb583d5c4b42697 | |
parent | 0c9ea86d2e00ccb13d81ea0623927be86be3adf2 (diff) | |
download | segfault-1e023da47a5d0248808e33fb5feac18df6df3585.tar.gz segfault-1e023da47a5d0248808e33fb5feac18df6df3585.zip |
fixed shitty #define MYUSER
-rw-r--r-- | segfault.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,7 +14,7 @@ #define SERVER "127.0.0.1" #define PORT "6667" #define NICK "SegFault" //override with argv[0] -#define MYUSER getenv("seguser")?getenv("seguser"):"segfault" +#define MYUSER "segfault" #define LINES_SENT_LIMIT 1 #define LINELEN 400 #define RAWLOG "./files/rawlog" @@ -1133,7 +1133,8 @@ int main(int argc,char *argv[]) { myuser->host="I_dunno"; printf("starting segfault...\n"); if(!getuid() || !geteuid()) { - pwd=getpwnam(MYUSER); + s=getenv("seguser"); + pwd=getpwnam(s?s:MYUSER); if(!pwd) { printf("I'm running with euid or uid of 0 and I can't find myself."); return 0; } setgroups(0,0); setgid(pwd->pw_gid); |