OSDN Git Service

Define HAVE_ATTRIBUTE__SENTINEL__ to 1.
[android-x86/external-openssh.git] / uidswap.c
index 392d631..54cfbd5 100644 (file)
--- a/uidswap.c
+++ b/uidswap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uidswap.c,v 1.37 2015/01/16 06:40:12 deraadt Exp $ */
+/* $OpenBSD: uidswap.c,v 1.39 2015/06/24 01:49:19 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo@cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -30,7 +30,7 @@
 
 #ifdef ANDROID
 #include <private/android_filesystem_config.h>
-#if !defined(GCE_PLATFORM_SDK_VERSION) || (GCE_PLATFORM_SDK_VERSION >= 17)
+#if !defined(GCE_PLATFORM_SDK_VERSION) || (GCE_PLATFORM_SDK_VERSION > 17)
 #include <sys/capability.h>
 #else
 #include <linux/capability.h>
@@ -96,7 +96,7 @@ temporarily_use_uid(struct passwd *pw)
        if (saved_egroupslen < 0)
                fatal("getgroups: %.100s", strerror(errno));
        if (saved_egroupslen > 0) {
-               saved_egroups = xrealloc(saved_egroups,
+               saved_egroups = xreallocarray(saved_egroups,
                    saved_egroupslen, sizeof(gid_t));
                if (getgroups(saved_egroupslen, saved_egroups) < 0)
                        fatal("getgroups: %.100s", strerror(errno));
@@ -114,7 +114,7 @@ temporarily_use_uid(struct passwd *pw)
                if (user_groupslen < 0)
                        fatal("getgroups: %.100s", strerror(errno));
                if (user_groupslen > 0) {
-                       user_groups = xrealloc(user_groups,
+                       user_groups = xreallocarray(user_groups,
                            user_groupslen, sizeof(gid_t));
                        if (getgroups(user_groupslen, user_groups) < 0)
                                fatal("getgroups: %.100s", strerror(errno));