about summary refs log tree commit diff
path: root/shadow
diff options
context:
space:
mode:
Diffstat (limited to 'shadow')
-rw-r--r--shadow/fgetspent_r.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/shadow/fgetspent_r.c b/shadow/fgetspent_r.c
index a61483c95a..8f7e303e07 100644
--- a/shadow/fgetspent_r.c
+++ b/shadow/fgetspent_r.c
@@ -53,6 +53,7 @@ __fgetspent_r (FILE *stream, struct spwd *resbuf, char *buffer, size_t buflen,
 	{
 	  funlockfile (stream);
 	  *result = NULL;
+	  __set_errno (ENOENT);
 	  return errno;
 	}
       if (p == NULL || buffer[buflen - 1] != '\xff')