+// 12.11.2022
#include <unistd.h>
+#include <errno.h>
#define TARGET "###TARGET;"
int main(int argc, char *argv[], char *envp[])
{
+ uid_t euid;
+ gid_t egid;
int r;
+ euid = geteuid();
+ egid = getegid();
+ if ((r = setreuid(euid, euid)))
+ return (r = errno);
+ if ((r = setregid(egid, egid)))
+ return (r = errno);
r=execve(TARGET,argv,envp);
return r;
}
cpbin: git-http-backend
$(MKDIR) -p $(OD)
- $(CP) git-http-backend $(OD)
+ $(CP) -p git-http-backend $(OD)
rmbin:
$rm -f $(OD)/git-http-backend