Back to index

enigmail  1.4.3
chown_revert.c File Reference
#include <unistd.h>
#include <stdio.h>

Go to the source code of this file.


int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 

Definition at line 4 of file chown_revert.c.

  if (argc != 2)
    return 1;

  uid_t realuser = getuid();
  char uidstring[20];
  snprintf(uidstring, 19, "%i", realuser);
  uidstring[19] = '\0';

  return execl("/usr/sbin/chown",
               "/usr/sbin/chown", "-R", "-h", uidstring, argv[1], (char*) 0);