added support for new migrate feature
[util-vserver.git] / util-vserver / src / rpm-fake.c
index c9e4d72..62cba0e 100644 (file)
 #endif
 
 #include "pathconfig.h"
-#include "util.h"
 #include "sys_clone.h"
+#include "util.h"
 
 #include <vserver.h>
 
+#include <sys/socket.h>
 #include <dlfcn.h>
 #include <stdlib.h>
 #include <stdint.h>
@@ -43,7 +44,6 @@
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>
-#include <sys/socket.h>
 #include <sys/un.h>
 #include <fcntl.h>
 #include <pwd.h>
@@ -181,7 +181,7 @@ initPwSocket()
        connect(pw_sock, (struct sockaddr *)(&addr), sizeof addr)==-1 ||
        (flag=fcntl(pw_sock, F_GETFD))==-1 ||
        fcntl(pw_sock, F_SETFD, flag | FD_CLOEXEC)==-1) {
-      perror("error while initializing pw-socket");
+      perror("rpm-fake.so: error while initializing pw-socket");
       exit(255);
     }
   }
@@ -299,7 +299,7 @@ initEnvironment()
   if (ctx_s && *ctx_s) ctx_s = strdup(ctx_s);
   else                 ctx_s = 0;
 
-  ctx       = getAndClearEnv("RPM_FAKE_CTX",  VC_RANDCTX);
+  ctx       = getAndClearEnv("RPM_FAKE_CTX",  VC_DYNAMIC_XID);
   caps      = getAndClearEnv("RPM_FAKE_CAP",  ~0x3404040f);
   flags     = getAndClearEnv("RPM_FAKE_FLAGS", 0);
   root      = getenv("RPM_FAKE_CHROOT");