Mercurial > pkg
changeset 22:43cfd1a2c523
create program to save acls.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 07:36:04 +0000 |
parents | d46aeb3166d0 |
children | 4d1bc23e4d09 |
files | .hgignore src/Makefile src/hgrc src/pkg.pl src/save-acls.c src/system-init.pl |
diffstat | 6 files changed, 19 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/.hgignore Thu Jan 10 07:02:49 2013 +0000 1.2 +++ b/.hgignore Thu Jan 10 07:36:04 2013 +0000 1.3 @@ -1,2 +1,3 @@ 1.4 syntax:glob 1.5 -./src/hg-wrapper 1.6 \ No newline at end of file 1.7 +./src/hg-wrapper 1.8 +./src/save-acls 1.9 \ No newline at end of file
2.1 --- a/src/Makefile Thu Jan 10 07:02:49 2013 +0000 2.2 +++ b/src/Makefile Thu Jan 10 07:36:04 2013 +0000 2.3 @@ -1,4 +1,5 @@ 2.4 all: 2.5 gcc -I/usr/include -lpipeline hg-wrapper.c -o hg-wrapper 2.6 + gcc save-acls.c -o save-acls 2.7 clean: 2.8 rm hg-wrapper
3.1 --- a/src/hgrc Thu Jan 10 07:02:49 2013 +0000 3.2 +++ b/src/hgrc Thu Jan 10 07:36:04 2013 +0000 3.3 @@ -1,2 +1,6 @@ 3.4 [extensions] 3.5 hgext.purge = 3.6 + 3.7 + 3.8 +[hooks] 3.9 +pre-commit = echo "it's a commit" 3.10 \ No newline at end of file
4.1 --- a/src/pkg.pl Thu Jan 10 07:02:49 2013 +0000 4.2 +++ b/src/pkg.pl Thu Jan 10 07:36:04 2013 +0000 4.3 @@ -110,7 +110,6 @@ 4.4 print "Copy Default Files.\n"; 4.5 4.6 execute(@pkg_copy_hg_wrapper_cmd); 4.7 -copy_default_file(".hgrc"); 4.8 copy_default_file(".profile"); 4.9 4.10 #execute(@pkg_link_bashrc_cmd);
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 5.2 +++ b/src/save-acls.c Thu Jan 10 07:36:04 2013 +0000 5.3 @@ -0,0 +1,10 @@ 5.4 +#include <unistd.h> 5.5 + 5.6 +main( int argc, char ** argv){ 5.7 + setreuid(geteuid(), geteuid()); 5.8 + setregid(getegid(), getegid()); 5.9 + system("getfacl -R /usr /opt /etc > /etc/acls"); 5.10 +} 5.11 + 5.12 + 5.13 +
6.1 --- a/src/system-init.pl Thu Jan 10 07:02:49 2013 +0000 6.2 +++ b/src/system-init.pl Thu Jan 10 07:36:04 2013 +0000 6.3 @@ -127,10 +127,11 @@ 6.4 execute("gpasswd --add hg-committer hg-wheel"); 6.5 execute("gpasswd --add hg-committer users"); 6.6 execute("ln -sf $pwd/profile /pkg/hg-committer/.profile"); 6.7 -execute("ln -sf $pwd/hgrc /pkg/hg-committer/.hgrc"); 6.8 execute("ln -sf $pwd/hg-wrapper /pkg/hg-committer/"); 6.9 execute("ln -sf `which hg` /pkg/hg-committer/"); 6.10 + 6.11 execute("install -o hg-committer -g hg-wheel -m 660 $pwd/hgignore /.hgignore"); 6.12 +execute("install -o hg-committer -g hg-wheel -m 660 $pwd/hgrc /.hg/"); 6.13 6.14 6.15