diff options
Diffstat (limited to 'src/nss-mymachines/nss-mymachines.c')
-rw-r--r-- | src/nss-mymachines/nss-mymachines.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index 3d1fc28353..332d440a51 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -153,7 +153,7 @@ enum nss_status _nss_mymachines_gethostbyname4_r( l = strlen(name); ms = ALIGN(l+1) + ALIGN(sizeof(struct gaih_addrtuple)) * c; if (buflen < ms) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); *h_errnop = NETDB_INTERNAL; return NSS_STATUS_TRYAGAIN; } @@ -227,7 +227,7 @@ enum nss_status _nss_mymachines_gethostbyname4_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); *h_errnop = NO_DATA; return NSS_STATUS_UNAVAIL; } @@ -313,7 +313,7 @@ enum nss_status _nss_mymachines_gethostbyname3_r( ms = ALIGN(l+1) + c * ALIGN(alen) + (c+2) * sizeof(char*); if (buflen < ms) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); *h_errnop = NETDB_INTERNAL; return NSS_STATUS_TRYAGAIN; } @@ -396,7 +396,7 @@ enum nss_status _nss_mymachines_gethostbyname3_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); *h_errnop = NO_DATA; return NSS_STATUS_UNAVAIL; } @@ -484,7 +484,7 @@ enum nss_status _nss_mymachines_getpwnam_r( l = strlen(name); if (buflen < l+1) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); return NSS_STATUS_TRYAGAIN; } @@ -501,7 +501,7 @@ enum nss_status _nss_mymachines_getpwnam_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); return NSS_STATUS_UNAVAIL; } @@ -564,7 +564,7 @@ enum nss_status _nss_mymachines_getpwuid_r( return NSS_STATUS_NOTFOUND; if (snprintf(buffer, buflen, "vu-%s-" UID_FMT, machine, (uid_t) mapped) >= (int) buflen) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); return NSS_STATUS_TRYAGAIN; } @@ -579,7 +579,7 @@ enum nss_status _nss_mymachines_getpwuid_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); return NSS_STATUS_UNAVAIL; } @@ -662,7 +662,7 @@ enum nss_status _nss_mymachines_getgrnam_r( l = sizeof(char*) + strlen(name) + 1; if (buflen < l) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); return NSS_STATUS_TRYAGAIN; } @@ -677,7 +677,7 @@ enum nss_status _nss_mymachines_getgrnam_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); return NSS_STATUS_UNAVAIL; } @@ -740,13 +740,13 @@ enum nss_status _nss_mymachines_getgrgid_r( return NSS_STATUS_NOTFOUND; if (buflen < sizeof(char*) + 1) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); return NSS_STATUS_TRYAGAIN; } memzero(buffer, sizeof(char*)); if (snprintf(buffer + sizeof(char*), buflen - sizeof(char*), "vg-%s-" GID_FMT, machine, (gid_t) mapped) >= (int) buflen) { - *errnop = ERANGE; + *errnop = DISARM_PROTECT_ERRNO(ERANGE); return NSS_STATUS_TRYAGAIN; } @@ -758,6 +758,6 @@ enum nss_status _nss_mymachines_getgrgid_r( return NSS_STATUS_SUCCESS; fail: - *errnop = -r; + *errnop = DISARM_PROTECT_ERRNO(r); return NSS_STATUS_UNAVAIL; } |