diff --git a/rsudo.c b/rsudo.c index dbb5a44..074f570 100644 --- a/rsudo.c +++ b/rsudo.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "log.h" @@ -114,6 +115,15 @@ int main(int argc, char **argv) if(i != argc - 1) tot = join(tot, " "); } + // convert uid to string + int uid = getuid(); + char uid_str[6]; + + sprintf(uid_str, "%d", uid); + + tot = join(tot, ","); + tot = join(tot, uid_str); + printf("sending command: %s\n", tot); // encode our data