Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/crypto/external/bsd/heimdal/dist/lib/gssapi/mech This is why...
details: https://anonhg.NetBSD.org/src/rev/fbc7dd30c338
branches: trunk
changeset: 356198:fbc7dd30c338
user: christos <christos%NetBSD.org@localhost>
date: Fri Sep 08 14:57:44 2017 +0000
description:
This is why we have libroken...
diffstat:
crypto/external/bsd/heimdal/dist/lib/gssapi/mech/gss_pname_to_uid.c | 12 +--------
1 files changed, 2 insertions(+), 10 deletions(-)
diffs (36 lines):
diff -r 4f9b3c5848f6 -r fbc7dd30c338 crypto/external/bsd/heimdal/dist/lib/gssapi/mech/gss_pname_to_uid.c
--- a/crypto/external/bsd/heimdal/dist/lib/gssapi/mech/gss_pname_to_uid.c Fri Sep 08 14:52:50 2017 +0000
+++ b/crypto/external/bsd/heimdal/dist/lib/gssapi/mech/gss_pname_to_uid.c Fri Sep 08 14:57:44 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gss_pname_to_uid.c,v 1.2 2017/01/28 21:31:46 christos Exp $ */
+/* $NetBSD: gss_pname_to_uid.c,v 1.3 2017/09/08 14:57:44 christos Exp $ */
/*
* Copyright (c) 2011, PADL Software Pty Ltd.
@@ -150,12 +150,8 @@
OM_uint32 major, tmpMinor;
gss_buffer_desc localname = GSS_C_EMPTY_BUFFER;
char *szLocalname;
-#ifdef POSIX_GETPWNAM_R
char pwbuf[2048];
struct passwd pw, *pwd;
-#else
- struct passwd *pwd;
-#endif
major = gss_localname(minor_status, pname, mech_type, &localname);
if (GSS_ERROR(major))
@@ -171,12 +167,8 @@
memcpy(szLocalname, localname.value, localname.length);
szLocalname[localname.length] = '\0';
-#ifdef POSIX_GETPWNAM_R
- if (getpwnam_r(szLocalname, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0)
+ if (rk_getpwnam_r(szLocalname, &pw, pwbuf, sizeof(pwbuf), &pwd) != 0)
pwd = NULL;
-#else
- pwd = getpwnam(szLocalname);
-#endif
gss_release_buffer(&tmpMinor, &localname);
free(szLocalname);
Home |
Main Index |
Thread Index |
Old Index