1
0
This commit is contained in:
Daniel Tartavel 2020-05-06 17:00:29 +02:00
parent 99584b3fb0
commit f5b5cdb275

4
main.c
View File

@ -123,8 +123,8 @@ int getprocinfo( int ppid, char cmdline[], char cmd[], char user[] )
return 5; return 5;
} }
fgets( str, 1024, fh1); fgets( str, 1024, fh1);
pos = strstr( str, "USER=") + 5; pos = strstr( str, "USER=");
sprintf( user, "%s", pos); sprintf( user, "%s", pos+5);
fclose(fh1); fclose(fh1);
return retval; return retval;
} }