4b967f9e69
vmware-tools ports.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
--- lib/auth/authPosix.c 2008-03-19 08:49:49.000000000 +0100
|
|
+++ lib/auth/authPosix.c 2008-03-27 11:20:20.000000000 +0100
|
|
@@ -264,7 +264,11 @@
|
|
#endif
|
|
/* If this point is reached, the user has been authenticated. */
|
|
setpwent();
|
|
+#if defined(__FreeBSD__)
|
|
+ pwd = getpwnam(user);
|
|
+#else
|
|
pwd = Posix_Getpwnam(user);
|
|
+#endif
|
|
endpwent();
|
|
|
|
#else /* !USE_PAM */
|
|
@@ -274,7 +278,11 @@
|
|
corresponding #endif below. */
|
|
|
|
setpwent(); //XXX can kill?
|
|
+#if defined(__FreeBSD__)
|
|
+ pwd = getpwnam(user);
|
|
+#else
|
|
pwd = Posix_Getpwnam(user);
|
|
+#endif
|
|
endpwent(); //XXX can kill?
|
|
|
|
if (!pwd) {
|
|
--- lib/impersonate/impersonatePosix.c 2008-03-19 08:49:50.000000000 +0100
|
|
+++ lib/impersonate/impersonatePosix.c 2008-03-27 11:21:38.000000000 +0100
|
|
@@ -432,7 +432,11 @@
|
|
struct passwd *ppw = &pw;
|
|
int error;
|
|
|
|
+#if defined(__FreeBSD__)
|
|
+ if ((error = getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
|
|
+#else
|
|
if ((error = Posix_Getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
|
|
+#endif
|
|
if (error == 0) {
|
|
error = ENOENT;
|
|
}
|