CBL-Mariner/SPECS/shadow-utils/chkname-allowcase.patch

22 строки
709 B
Diff

--- a/libmisc/chkname.c.orig 2021-08-13 16:07:31.746379418 -0500
+++ b/libmisc/chkname.c 2021-08-13 16:08:17.156379789 -0500
@@ -59,15 +59,17 @@
*/
if (('\0' == *name) ||
- !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
+ !((('a' <= *name) && ('z' >= *name)) || ('_' == *name) || (('A' <= *name) && ('Z' >= *name)))) {
return false;
}
while ('\0' != *++name) {
if (!(( ('a' <= *name) && ('z' >= *name) ) ||
+ ( ('A' <= *name) && ('Z' >= *name) ) ||
( ('0' <= *name) && ('9' >= *name) ) ||
('_' == *name) ||
('-' == *name) ||
+ ('.' == *name) ||
( ('$' == *name) && ('\0' == *(name + 1)) )
)) {
return false;