There's no need to call getpwuid/getpwnam_r 5 times. Do it once before chroot, once...
[util-vserver.git] / lib / vserver-internal.h
index 872f5a6..c937320 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: vserver-internal.h 2415 2006-12-08 13:24:49Z dhozac $    --*- c++ -*--
+// $Id: vserver-internal.h 2446 2007-01-09 13:22:11Z dhozac $    --*- c++ -*--
 
 // Copyright (C) 2003 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
 //  
@@ -50,7 +50,7 @@ inline static ALWAYSINLINE void vc_noop0() {}
 #  define CALL_VC(...)                                 \
   do {                                                 \
     int        ver = utilvserver_checkCompatVersion();         \
-    int UNUSED conf = utilvserver_checkCompatConfig();         \
+    uint_least32_t conf = utilvserver_checkCompatConfig();     \
     if (ver==-1) return -1;                            \
     VC_SUFFIX, __VA_ARGS__, VC_PREFIX;                 \
     errno = ENOSYS;                                    \
@@ -210,6 +210,8 @@ inline static ALWAYSINLINE void vc_noop0() {}
                                         (X)==vcNET_IPV6   ? NXA_TYPE_IPV6     : \
                                         (X)==vcNET_IPV4B  ? (NXA_TYPE_IPV4 | NXA_MOD_BCAST) : \
                                         (X)==vcNET_IPV6B  ? (NXA_TYPE_IPV6 | NXA_MOD_BCAST) : \
+                                        (X)==vcNET_IPV4A  ? (NXA_TYPE_IPV4 | NXA_MOD_ALL) : \
+                                        (X)==vcNET_IPV6A  ? (NXA_TYPE_IPV6 | NXA_MOD_ALL) : \
                                         (X)==vcNET_ANY    ? NXA_TYPE_ANY      : \
                                         (X))
 #  define NETTYPE_KERNEL2USER(X)       ((X)==NXA_TYPE_IPV4     ? vcNET_IPV4   : \
@@ -253,10 +255,6 @@ inline static ALWAYSINLINE void vc_noop0() {}
 inline static UNUSED ALWAYSINLINE
 int vserver(uint32_t cmd, uint32_t id, void *data)
 {
-#if defined __dietlibc__
-  extern long int syscall (long int __sysno, ...);
-#endif
   return syscall(__NR_vserver, cmd, id, data);
 }
 #else