Skip to content

Commit 69076fb

Browse files
lib/chkname.c: is_valid_name(): Split Samba check
Signed-off-by: Alejandro Colomar <alx@kernel.org>
1 parent 4259b5b commit 69076fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/chkname.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,13 @@ is_valid_name(const char *name)
9696
}
9797

9898
while (!streq(++name, "")) {
99+
if (streq(name, "$")) // Samba
100+
return true;
101+
99102
if (!(isalnum(*name) ||
100103
*name == '_' ||
101104
*name == '.' ||
102-
*name == '-' ||
103-
streq(name, "$")
105+
*name == '-'
104106
))
105107
{
106108
errno = EILSEQ;

0 commit comments

Comments
 (0)