Back to index

enigmail  1.4.3
chown_revert.c
Go to the documentation of this file.
00001 #include <unistd.h>
00002 #include <stdio.h>
00003 
00004 int main(int argc, char **argv)
00005 {
00006   if (argc != 2)
00007     return 1;
00008 
00009   uid_t realuser = getuid();
00010   char uidstring[20];
00011   snprintf(uidstring, 19, "%i", realuser);
00012   uidstring[19] = '\0';
00013 
00014   return execl("/usr/sbin/chown",
00015                "/usr/sbin/chown", "-R", "-h", uidstring, argv[1], (char*) 0);
00016 }