#include "internal.h"
#include "vserver.h"
#include "util.h"
-#include "wrappers.h"
-#include "wrappers-vserver.h"
#include <getopt.h>
#include <stdlib.h>
#include <stdbool.h>
#include <grp.h>
#include <pwd.h>
+#include <fcntl.h>
+#include <errno.h>
+
+#define ENSC_WRAPPERS_PREFIX "rpm-fake-resolver: "
+#define ENSC_WRAPPERS_VSERVER 1
+#define ENSC_WRAPPERS_UNISTD 1
+#define ENSC_WRAPPERS_FCNTL 1
+#include <wrappers.h>
#define MAX_RQSIZE 0x1000
int main(int argc, char * argv[])
{
struct ArgInfo args = {
- .ctx = VC_RANDCTX,
+ .ctx = VC_DYNAMIC_XID,
.uid = 99,
.gid = 99,
.do_fork = true,
};
int pid_fd = -1;
+#ifndef __dietlibc__
+# warning *** rpm-fake-resolver is built against glibc; please do not report errors before trying a dietlibc version ***
+ WRITE_MSG(2,
+ "*** rpm-fake-resolver was built with glibc; please do ***\n"
+ "*** not report errors before trying a dietlibc version. ***\n");
+#endif
+
parseArgs(&args, argc, argv);
if (args.pid_file && args.do_fork)
- pid_fd = Eopen(args.pid_file, O_CREAT|O_WRONLY, 0644);
+ pid_fd = EopenD(args.pid_file, O_CREAT|O_WRONLY, 0644);
if (args.chroot) Echroot(args.chroot);
Echdir("/");