summaryrefslogtreecommitdiffstats
path: root/src/nss-mymachines
diff options
context:
space:
mode:
Diffstat (limited to 'src/nss-mymachines')
-rw-r--r--src/nss-mymachines/nss-mymachines.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
index 332d440a51..3d1fc28353 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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = 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 = DISARM_PROTECT_ERRNO(r);
+ *errnop = -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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = 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 = DISARM_PROTECT_ERRNO(r);
+ *errnop = -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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
@@ -501,7 +501,7 @@ enum nss_status _nss_mymachines_getpwnam_r(
return NSS_STATUS_SUCCESS;
fail:
- *errnop = DISARM_PROTECT_ERRNO(r);
+ *errnop = -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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
@@ -579,7 +579,7 @@ enum nss_status _nss_mymachines_getpwuid_r(
return NSS_STATUS_SUCCESS;
fail:
- *errnop = DISARM_PROTECT_ERRNO(r);
+ *errnop = -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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
@@ -677,7 +677,7 @@ enum nss_status _nss_mymachines_getgrnam_r(
return NSS_STATUS_SUCCESS;
fail:
- *errnop = DISARM_PROTECT_ERRNO(r);
+ *errnop = -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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = 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 = DISARM_PROTECT_ERRNO(ERANGE);
+ *errnop = ERANGE;
return NSS_STATUS_TRYAGAIN;
}
@@ -758,6 +758,6 @@ enum nss_status _nss_mymachines_getgrgid_r(
return NSS_STATUS_SUCCESS;
fail:
- *errnop = DISARM_PROTECT_ERRNO(r);
+ *errnop = -r;
return NSS_STATUS_UNAVAIL;
}