projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
improve error handling of ttyname_r and isatty
[musl]
/
src
/
passwd
/
getspnam_r.c
diff --git
a/src/passwd/getspnam_r.c
b/src/passwd/getspnam_r.c
index
e488b67
..
541206f
100644
(file)
--- a/
src/passwd/getspnam_r.c
+++ b/
src/passwd/getspnam_r.c
@@
-76,7
+76,7
@@
int getspnam_r(const char *name, struct spwd *sp, char *buf, size_t size, struct
/* Buffer size must at least be able to hold name, plus some.. */
if (size < l+100)
- return errno = E
INVAL
;
+ return errno = E
RANGE
;
/* Protect against truncation */
if (snprintf(path, sizeof path, "/etc/tcb/%s/shadow", name) >= sizeof path)