X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fuser_ops.c;h=a144fc0d28b700f961c0d550f5ff6f3f9f9d49b5;hb=2cecb84bd7c2108b2e184b7ad196b39deb301ec4;hp=67eab32fc218bccbeb03e461efa2559e4468b5ea;hpb=e18b92d7b9ae559a42e84a68ca8ca11ae4ddec7c;p=citadel.git diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 67eab32fc..a144fc0d2 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -390,11 +390,15 @@ int CtdlLoginExistingUser(char *authname, char *trythisname) char pwdbuffer[256]; lprintf(CTDL_DEBUG, "asking host about <%s>\n", username); +#ifdef HAVE_GETPWNAM_R #ifdef SOLARIS_GETPWUID tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer); -#else +#else // SOLARIS_GETPWUID getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr); -#endif +#endif // SOLARIS_GETPWUID +#else // HAVE_GETPWNAM_R + tempPwdPtr = NULL; +#endif // HAVE_GETPWNAM_R if (tempPwdPtr == NULL) { return login_not_found; } @@ -876,11 +880,15 @@ int create_user(char *newusername, int become_user) struct passwd *tempPwdPtr; char pwdbuffer[256]; +#ifdef HAVE_GETPWNAM_R #ifdef SOLARIS_GETPWUID tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof(pwdbuffer)); -#else +#else // SOLARIS_GETPWUID getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr); -#endif +#endif // SOLARIS_GETPWUID +#else // HAVE_GETPWNAM_R + tempPwdPtr = NULL; +#endif // HAVE_GETPWNAM_R if (tempPwdPtr != NULL) { extract_token(username, pd.pw_gecos, 0, ',', sizeof username); uid = pd.pw_uid;