Mercurial > pkg
annotate src/hg-wrapper.c @ 22:43cfd1a2c523
create program to save acls.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Thu, 10 Jan 2013 07:36:04 +0000 |
parents | c75924bd38e3 |
children | 5caff062fd36 |
rev | line source |
---|---|
rlm@12 | 1 #include <pipeline.h> |
rlm@13 | 2 #include <unistd.h> |
rlm@12 | 3 |
rlm@12 | 4 main( int argc, char ** argv){ |
rlm@20 | 5 pipecmd* p = |
rlm@20 | 6 pipecmd_new("/pkg/hg-committer/hg"); |
rlm@13 | 7 |
rlm@12 | 8 int i; |
rlm@12 | 9 for(i = 1; i < argc; i++){ |
rlm@12 | 10 pipecmd_arg(p, argv[i]); |
rlm@12 | 11 } |
rlm@12 | 12 |
rlm@13 | 13 setreuid(geteuid(), geteuid()); |
rlm@13 | 14 setregid(getegid(), getegid()); |
rlm@13 | 15 |
rlm@12 | 16 pipecmd_exec(p); |
rlm@12 | 17 } |