source: build-files/ports-overlay/emulators/open-vm-tools/files/patch-getpwnam @ 1e102bd

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 1e102bd was 1e102bd, checked in by Kris Moore <kris@…>, 9 months ago

Add a bunch of modified ports for 10.0, so we can fix the building

  • Property mode set to 100644
File size: 1.1 KB
Line 
1--- lib/auth/authPosix.c        2008-03-19 08:49:49.000000000 +0100
2+++ lib/auth/authPosix.c        2008-03-27 11:20:20.000000000 +0100
3@@ -264,7 +264,11 @@
4 #endif
5    /* If this point is reached, the user has been authenticated. */
6    setpwent();
7+#if defined(__FreeBSD__)
8+   pwd = getpwnam(user);
9+#else
10    pwd = Posix_Getpwnam(user);
11+#endif
12    endpwent();
13 
14 #else /* !USE_PAM */
15@@ -274,7 +278,11 @@
16       corresponding #endif below. */
17   
18    setpwent(); //XXX can kill?
19+#if defined(__FreeBSD__)
20+   pwd = getpwnam(user);
21+#else
22    pwd = Posix_Getpwnam(user);
23+#endif
24    endpwent(); //XXX can kill?
25 
26    if (!pwd) {
27--- lib/impersonate/impersonatePosix.c  2008-03-19 08:49:50.000000000 +0100
28+++ lib/impersonate/impersonatePosix.c  2008-03-27 11:21:38.000000000 +0100
29@@ -432,7 +432,11 @@
30    struct passwd *ppw = &pw;
31    int error;
32 
33+#if defined(__FreeBSD__)
34+   if ((error = getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
35+#else
36    if ((error = Posix_Getpwnam_r(user, &pw, buffer, BUFSIZ, &ppw)) != 0 || !ppw) {
37+#endif
38       if (error == 0) {
39          error = ENOENT;
40       }
Note: See TracBrowser for help on using the repository browser.