Mercurial > pkg
annotate src/save-acls.c @ 24:eab9ad213a69
implemented script to restore acls.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 12:49:52 +0000 |
parents | 4d1bc23e4d09 |
children |
rev | line source |
---|---|
rlm@22 | 1 #include <unistd.h> |
rlm@23 | 2 #include <stdio.h> |
rlm@22 | 3 |
rlm@22 | 4 main( int argc, char ** argv){ |
rlm@22 | 5 setreuid(geteuid(), geteuid()); |
rlm@22 | 6 setregid(getegid(), getegid()); |
rlm@23 | 7 printf("saving acls to /etc/acls\n"); |
rlm@22 | 8 system("getfacl -R /usr /opt /etc > /etc/acls"); |
rlm@22 | 9 } |
rlm@22 | 10 |
rlm@22 | 11 |
rlm@22 | 12 |