diff options
author | Herbert Dürr <hdu@apache.org> | 2012-03-21 11:58:54 +0000 |
---|---|---|
committer | Herbert Dürr <hdu@apache.org> | 2012-03-21 11:58:54 +0000 |
commit | 46b0dd7c0f2ce0263aac0c57762e82dbfa3c2d61 (patch) | |
tree | 654039d2b3025ee46dd5d1c1efcff4c565a19a34 /sal/osl | |
parent | 6c8c5e063acb3a19f7d89326aa6994c4666a3d3e (diff) |
drop support for getspnam_r's ancient API
Diffstat (limited to 'sal/osl')
-rw-r--r-- | sal/osl/unx/security.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c index 88b138f32ca0..ee53b24da3eb 100644 --- a/sal/osl/unx/security.c +++ b/sal/osl/unx/security.c @@ -583,7 +583,7 @@ osl_psz_loginUser(const sal_Char* pszUserName, const sal_Char* pszPasswd, char buffer[1024]; struct spwd spwdStruct; buffer[0] = '\0'; -#ifndef NEW_SHADOW_API +#ifdef OLD_SHADOW_API if (getspnam_r(pszUserName, &spwdStruct, buffer, sizeof buffer) != NULL) #else if (getspnam_r(pszUserName, &spwdStruct, buffer, sizeof buffer, NULL) == 0) @@ -597,7 +597,7 @@ osl_psz_loginUser(const sal_Char* pszUserName, const sal_Char* pszPasswd, if (strcmp(spwdStruct.sp_pwdp, cryptPasswd) == 0) { nError = osl_Security_E_None; } else if (getuid() == 0 && -#ifndef NEW_SHADOW_API +#ifdef OLD_SHADOW_API (getspnam_r("root", &spwdStruct, buffer, sizeof buffer) != NULL)) #else (getspnam_r("root", &spwdStruct, buffer, sizeof buffer, NULL) == 0)) |