add uid to the thing
This commit is contained in:
parent
4704f83e3e
commit
8fce80df33
1 changed files with 10 additions and 0 deletions
10
rsudo.c
10
rsudo.c
|
@ -16,6 +16,7 @@
|
|||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in a new issue